diff --git a/alphatrion/server/graphql/resolvers.py b/alphatrion/server/graphql/resolvers.py index 9eb90bf5..9200a1c9 100644 --- a/alphatrion/server/graphql/resolvers.py +++ b/alphatrion/server/graphql/resolvers.py @@ -692,3 +692,21 @@ def remove_user_from_team(input: RemoveUserFromTeamInput) -> bool: # Remove user from team (deletes TeamMember entry) return metadb.remove_user_from_team(user_id=user_id, team_id=team_id) + + @staticmethod + # TODO: We should have the team_id in the header for authz, and verify the + # team_id matches the experiment's team_id before allowing deletion. + def delete_experiment(experiment_id: strawberry.ID) -> bool: + metadb = runtime.storage_runtime().metadb + # Soft delete experiment by setting is_del flag + return metadb.delete_experiment(experiment_id=experiment_id) + + @staticmethod + # TODO: We should have the team_id in the header for authz, and verify the + # team_id matches the experiment's team_id before allowing deletion. + def delete_experiments(experiment_ids: list[strawberry.ID]) -> int: + metadb = runtime.storage_runtime().metadb + # Convert strawberry IDs to UUIDs + uuids = [uuid.UUID(exp_id) for exp_id in experiment_ids] + # Soft delete experiments by setting is_del flag + return metadb.delete_experiments(experiment_ids=uuids) diff --git a/alphatrion/server/graphql/schema.py b/alphatrion/server/graphql/schema.py index d1265c15..9c8a81ad 100644 --- a/alphatrion/server/graphql/schema.py +++ b/alphatrion/server/graphql/schema.py @@ -126,5 +126,13 @@ def add_user_to_team(self, input: AddUserToTeamInput) -> bool: def remove_user_from_team(self, input: RemoveUserFromTeamInput) -> bool: return GraphQLMutations.remove_user_from_team(input=input) + @strawberry.mutation + def delete_experiment(self, experiment_id: strawberry.ID) -> bool: + return GraphQLMutations.delete_experiment(experiment_id=experiment_id) + + @strawberry.mutation + def delete_experiments(self, experiment_ids: list[strawberry.ID]) -> int: + return GraphQLMutations.delete_experiments(experiment_ids=experiment_ids) + schema = strawberry.Schema(query=Query, mutation=Mutation) diff --git a/alphatrion/storage/sql_models.py b/alphatrion/storage/sql_models.py index 72eb030d..1e943729 100644 --- a/alphatrion/storage/sql_models.py +++ b/alphatrion/storage/sql_models.py @@ -114,7 +114,9 @@ class Experiment(Base): uuid = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4) team_id = Column(UUID(as_uuid=True), nullable=False) - user_id = Column(UUID(as_uuid=True), nullable=True) + user_id = Column( + UUID(as_uuid=True), nullable=True, comment="User who created the experiment" + ) name = Column(String, nullable=False) description = Column(String, nullable=True) meta = Column( @@ -171,7 +173,9 @@ class Run(Base): uuid = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4) team_id = Column(UUID(as_uuid=True), nullable=False) experiment_id = Column(UUID(as_uuid=True), nullable=False) - user_id = Column(UUID(as_uuid=True), nullable=True) + user_id = Column( + UUID(as_uuid=True), nullable=True, comment="User who created the run" + ) meta = Column( MutableDict.as_mutable(JSON), nullable=True, diff --git a/alphatrion/storage/sqlstore.py b/alphatrion/storage/sqlstore.py index 60586a9c..6659bc18 100644 --- a/alphatrion/storage/sqlstore.py +++ b/alphatrion/storage/sqlstore.py @@ -346,6 +346,20 @@ def create_experiment( uid = uuid.uuid4() session = self._session() + # TODO: add back the validation. + # # verify user is in the team + # membership = ( + # session.query(TeamMember) + # .filter( + # TeamMember.user_id == user_id, + # TeamMember.team_id == team_id, + # ) + # .first() + # ) + # if membership is None: + # session.close() + # raise ValueError("User must be a member of the team to create experiment") + new_exp = Experiment( uuid=uid, team_id=team_id, @@ -396,22 +410,22 @@ def get_experiment(self, experiment_id: uuid.UUID) -> Experiment | None: return exp # Different team may have the same experiment name. - def get_exp_by_name(self, name: str, team_id: uuid.UUID) -> Experiment | None: + def get_exp_by_name( + self, name: str, team_id: uuid.UUID, include_deleted: bool = False + ) -> Experiment | None: # make sure the team exists team = self.get_team(team_id) if team is None: return None session = self._session() - trial = ( - session.query(Experiment) - .filter( - Experiment.name == name, - Experiment.team_id == team_id, - Experiment.is_del == 0, - ) - .first() + query = session.query(Experiment).filter( + Experiment.name == name, + Experiment.team_id == team_id, ) + if not include_deleted: + query = query.filter(Experiment.is_del == 0) + trial = query.first() session.close() return trial @@ -532,6 +546,70 @@ def list_exps_by_timeframe( session.close() return exps + def delete_experiment(self, experiment_id: uuid.UUID) -> bool: + session = self._session() + + # Try to delete the experiment + exp = ( + session.query(Experiment) + .filter(Experiment.uuid == experiment_id, Experiment.is_del == 0) + .first() + ) + + if exp and exp.status == Status.RUNNING: + raise ValueError( + "Cannot delete a running experiment. Please stop it first." + ) + + # Delete all runs associated with this experiment + # (regardless of experiment status) + session.query(Run).filter(Run.experiment_id == experiment_id).update( + {Run.is_del: 1}, synchronize_session=False + ) + if exp: + exp.is_del = 1 + session.commit() + session.close() + return True + + # Even if experiment doesn't exist, commit the run deletions + session.commit() + session.close() + return False + + def delete_experiments(self, experiment_ids: list[uuid.UUID]) -> int: + """ + Batch delete experiments by setting is_del flag. + Also deletes all associated runs. + Returns the number of experiments successfully deleted. + """ + session = self._session() + # Delete the experiments + # if experiment is running, skip deletion for that experiment + filtered_exps = ( + session.query(Experiment.uuid) + .filter( + Experiment.uuid.in_(experiment_ids), + Experiment.is_del == 0, + Experiment.status != Status.RUNNING, + ) + .all() + ) + filtered_exp_ids = [exp_id for (exp_id,) in filtered_exps] # unpack tuples + + deleted_count = ( + session.query(Experiment) + .filter(Experiment.uuid.in_(filtered_exp_ids)) + .update({Experiment.is_del: 1}, synchronize_session=False) + ) + # Delete all runs associated with these experiments + session.query(Run).filter(Run.experiment_id.in_(filtered_exp_ids)).update( + {Run.is_del: 1}, synchronize_session=False + ) + session.commit() + session.close() + return deleted_count + # ---------- Run APIs ---------- def create_run( diff --git a/dashboard/src/components/ui/checkbox.tsx b/dashboard/src/components/ui/checkbox.tsx new file mode 100644 index 00000000..1cd24216 --- /dev/null +++ b/dashboard/src/components/ui/checkbox.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { cn } from '../../lib/utils'; + +export interface CheckboxProps + extends React.InputHTMLAttributes {} + +const Checkbox = React.forwardRef( + ({ className, ...props }, ref) => { + return ( + + ); + } +); + +Checkbox.displayName = 'Checkbox'; + +export { Checkbox }; diff --git a/dashboard/src/hooks/use-experiment-mutations.ts b/dashboard/src/hooks/use-experiment-mutations.ts new file mode 100644 index 00000000..d81e96fc --- /dev/null +++ b/dashboard/src/hooks/use-experiment-mutations.ts @@ -0,0 +1,54 @@ +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { graphqlMutation, mutations } from '../lib/graphql-client'; + +interface DeleteExperimentResponse { + deleteExperiment: boolean; +} + +interface DeleteExperimentsResponse { + deleteExperiments: number; +} + +/** + * Hook to delete a single experiment + */ +export function useDeleteExperiment() { + const queryClient = useQueryClient(); + + return useMutation({ + mutationFn: async (experimentId: string) => { + const data = await graphqlMutation( + mutations.deleteExperiment, + { experimentId } + ); + return data.deleteExperiment; + }, + onSuccess: () => { + // Invalidate experiments queries to refetch the list + queryClient.invalidateQueries({ queryKey: ['experiments'] }); + queryClient.invalidateQueries({ queryKey: ['experiment'] }); + }, + }); +} + +/** + * Hook to delete multiple experiments in batch + */ +export function useDeleteExperiments() { + const queryClient = useQueryClient(); + + return useMutation({ + mutationFn: async (experimentIds: string[]) => { + const data = await graphqlMutation( + mutations.deleteExperiments, + { experimentIds } + ); + return data.deleteExperiments; + }, + onSuccess: () => { + // Invalidate experiments queries to refetch the list + queryClient.invalidateQueries({ queryKey: ['experiments'] }); + queryClient.invalidateQueries({ queryKey: ['experiment'] }); + }, + }); +} diff --git a/dashboard/src/lib/graphql-client.ts b/dashboard/src/lib/graphql-client.ts index 2882be7a..b5e9c476 100644 --- a/dashboard/src/lib/graphql-client.ts +++ b/dashboard/src/lib/graphql-client.ts @@ -3,10 +3,8 @@ import axios from 'axios'; /** * GraphQL client for AlphaTrion backend * - * The backend provides a read-only GraphQL API at /graphql - * with queries for teams, experiments, runs, and metrics. - * - * No subscriptions or mutations are currently supported. + * The backend provides a GraphQL API at /graphql + * with queries and mutations for teams, experiments, runs, and metrics. */ // Use relative URL to work with proxy in development @@ -63,6 +61,17 @@ export async function graphqlQuery( } } +/** + * Execute a GraphQL mutation + */ +export async function graphqlMutation( + mutation: string, + variables?: Record +): Promise { + // Mutations use the same endpoint and logic as queries + return graphqlQuery(mutation, variables); +} + // GraphQL query templates export const queries = { listTeams: ` @@ -343,3 +352,18 @@ export const queries = { `, }; + +// GraphQL mutation templates +export const mutations = { + deleteExperiment: ` + mutation DeleteExperiment($experimentId: ID!) { + deleteExperiment(experimentId: $experimentId) + } + `, + + deleteExperiments: ` + mutation DeleteExperiments($experimentIds: [ID!]!) { + deleteExperiments(experimentIds: $experimentIds) + } + `, +}; diff --git a/dashboard/src/pages/experiments/[id].tsx b/dashboard/src/pages/experiments/[id].tsx index b196a18f..fb624b8d 100644 --- a/dashboard/src/pages/experiments/[id].tsx +++ b/dashboard/src/pages/experiments/[id].tsx @@ -366,7 +366,7 @@ export function ExperimentDetailPage() { UUID Status - Created + Created @@ -385,7 +385,7 @@ export function ExperimentDetailPage() { {run.status} - + {formatDistanceToNow(new Date(run.createdAt), { addSuffix: true, })} diff --git a/dashboard/src/pages/experiments/index.tsx b/dashboard/src/pages/experiments/index.tsx index 1e15a4e4..78da8dcc 100644 --- a/dashboard/src/pages/experiments/index.tsx +++ b/dashboard/src/pages/experiments/index.tsx @@ -1,8 +1,9 @@ import { useState, useMemo } from 'react'; import { Link } from 'react-router-dom'; -import { Search } from 'lucide-react'; +import { Search, Trash2 } from 'lucide-react'; import { useTeamContext } from '../../context/team-context'; import { useExperiments } from '../../hooks/use-experiments'; +import { useDeleteExperiments } from '../../hooks/use-experiment-mutations'; import { useTeam } from '../../hooks/use-teams'; import { Card, @@ -18,10 +19,20 @@ import { } from '../../components/ui/table'; import { Badge } from '../../components/ui/badge'; import { Input } from '../../components/ui/input'; +import { Button } from '../../components/ui/button'; +import { Checkbox } from '../../components/ui/checkbox'; import { Skeleton } from '../../components/ui/skeleton'; import { Dropdown } from '../../components/ui/dropdown'; import { MultiSelectDropdown } from '../../components/ui/multi-select-dropdown'; import { Pagination } from '../../components/ui/pagination'; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '../../components/ui/dialog'; import { formatDistanceToNow } from 'date-fns'; import type { Status } from '../../types'; @@ -75,6 +86,10 @@ export function ExperimentsPage() { const [labelFilters, setLabelFilters] = useState([]); const [searchQuery, setSearchQuery] = useState(''); const [currentPage, setCurrentPage] = useState(0); + const [selectedExperiments, setSelectedExperiments] = useState>(new Set()); + const [showDeleteDialog, setShowDeleteDialog] = useState(false); + + const deleteExperimentsMutation = useDeleteExperiments(); // Fetch team info for total count const { data: team } = useTeam(selectedTeamId || '', { enabled: !!selectedTeamId }); @@ -209,6 +224,54 @@ export function ExperimentsPage() { return filtered; }, [experiments, statusFilter, labelFilters, searchQuery]); + // Check if all filtered experiments are selected + const allSelected = filteredExperiments.length > 0 && + filteredExperiments.every(exp => selectedExperiments.has(exp.id)); + + // Toggle select all + const handleSelectAll = () => { + if (allSelected) { + setSelectedExperiments(new Set()); + } else { + setSelectedExperiments(new Set(filteredExperiments.map(exp => exp.id))); + } + }; + + // Toggle individual experiment selection + const handleSelectExperiment = (experimentId: string) => { + const newSelected = new Set(selectedExperiments); + if (newSelected.has(experimentId)) { + newSelected.delete(experimentId); + } else { + newSelected.add(experimentId); + } + setSelectedExperiments(newSelected); + }; + + // Handle delete confirmation + const handleDeleteClick = () => { + if (selectedExperiments.size === 0) return; + setShowDeleteDialog(true); + }; + + // Handle delete confirmation + const handleDeleteConfirm = async (e?: React.MouseEvent) => { + e?.preventDefault(); + e?.stopPropagation(); + + if (selectedExperiments.size === 0) return; + + try { + const result = await deleteExperimentsMutation.mutateAsync(Array.from(selectedExperiments)); + console.log(`Successfully deleted ${result} experiments`); + setSelectedExperiments(new Set()); + setShowDeleteDialog(false); + } catch (error) { + console.error('Failed to delete experiments:', error); + alert('Failed to delete experiments. Please try again.'); + } + }; + return (
{/* Header */} @@ -270,11 +333,30 @@ export function ExperimentsPage() { + +
+ + {selectedExperiments.size > 0 && ( + + )} +
+
ID Name Labels Status - Created + Created
@@ -283,6 +365,13 @@ export function ExperimentsPage() { key={experiment.id} className="hover:bg-accent/50 transition-colors border-b last:border-0" > + + handleSelectExperiment(experiment.id)} + aria-label={`Select experiment ${experiment.name}`} + /> + - + {formatDistanceToNow(new Date(experiment.createdAt), { addSuffix: true, })} @@ -344,6 +433,55 @@ export function ExperimentsPage() { )} + + {/* Delete Confirmation Dialog */} + + + + + Delete {selectedExperiments.size === 1 ? 'Experiment' : 'Experiments'} + + + You are about to delete {selectedExperiments.size} {selectedExperiments.size === 1 ? 'experiment' : 'experiments'}. + This action cannot be undone. + + + + + + + + ); } diff --git a/dashboard/src/pages/runs/index.tsx b/dashboard/src/pages/runs/index.tsx index 465b0cec..947d0b71 100644 --- a/dashboard/src/pages/runs/index.tsx +++ b/dashboard/src/pages/runs/index.tsx @@ -154,7 +154,7 @@ export function RunsPage() { ID Experiment ID Status - Created + Created @@ -184,7 +184,7 @@ export function RunsPage() { {run.status} - + {formatDistanceToNow(new Date(run.createdAt), { addSuffix: true, })} diff --git a/dashboard/static/assets/index-BT9mQZGg.js b/dashboard/static/assets/index-BT9mQZGg.js new file mode 100644 index 00000000..46f6ef44 --- /dev/null +++ b/dashboard/static/assets/index-BT9mQZGg.js @@ -0,0 +1,610 @@ +var ww=e=>{throw TypeError(e)};var gm=(e,t,r)=>t.has(e)||ww("Cannot "+r);var C=(e,t,r)=>(gm(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?ww("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(gm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),de=(e,t,r)=>(gm(e,t,"access private method"),r);var Jc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return C(e,t,n)}});function bM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aA={exports:{}},qh={},oA={exports:{}},me={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Tc=Symbol.for("react.element"),xM=Symbol.for("react.portal"),wM=Symbol.for("react.fragment"),SM=Symbol.for("react.strict_mode"),OM=Symbol.for("react.profiler"),PM=Symbol.for("react.provider"),jM=Symbol.for("react.context"),EM=Symbol.for("react.forward_ref"),AM=Symbol.for("react.suspense"),_M=Symbol.for("react.memo"),TM=Symbol.for("react.lazy"),Sw=Symbol.iterator;function kM(e){return e===null||typeof e!="object"?null:(e=Sw&&e[Sw]||e["@@iterator"],typeof e=="function"?e:null)}var sA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lA=Object.assign,uA={};function nl(e,t,r){this.props=e,this.context=t,this.refs=uA,this.updater=r||sA}nl.prototype.isReactComponent={};nl.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")};nl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cA(){}cA.prototype=nl.prototype;function W0(e,t,r){this.props=e,this.context=t,this.refs=uA,this.updater=r||sA}var H0=W0.prototype=new cA;H0.constructor=W0;lA(H0,nl.prototype);H0.isPureReactComponent=!0;var Ow=Array.isArray,fA=Object.prototype.hasOwnProperty,K0={current:null},dA={key:!0,ref:!0,__self:!0,__source:!0};function hA(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)fA.call(t,n)&&!dA.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=$[V];if(0>>1;Vi(we,W))Wei(Oe,we)?($[V]=Oe,$[We]=W,V=We):($[V]=we,$[ne]=W,V=ne);else if(Wei(Oe,W))$[V]=Oe,$[We]=W,V=We;else break e}}return F}function i($,F){var W=$.sortIndex-F.sortIndex;return W!==0?W:$.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,v=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x($){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=$)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S($){if(m=!1,x($),!v)if(r(l)!==null)v=!0,R(w);else{var F=r(u);F!==null&&z(S,F.startTime-$)}}function w($,F){v=!1,m&&(m=!1,g(E),E=-1),p=!0;var W=d;try{for(x(F),f=r(l);f!==null&&(!(f.expirationTime>F)||$&&!_());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var H=V(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(l)&&n(l),x(F)}else n(l);f=r(l)}if(f!==null)var Y=!0;else{var ne=r(u);ne!==null&&z(S,ne.startTime-F),Y=!1}return Y}finally{f=null,d=W,p=!1}}var O=!1,P=null,E=-1,A=5,k=-1;function _(){return!(e.unstable_now()-k$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function($){switch(d){case 1:case 2:case 3:var F=3;break;default:F=d}var W=d;d=F;try{return $()}finally{d=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,F){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var W=d;d=$;try{return F()}finally{d=W}},e.unstable_scheduleCallback=function($,F,W){var V=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0V?($.sortIndex=W,t(u,$),r(l)===null&&$===r(u)&&(m?(g(E),E=-1):m=!0,z(S,W-V))):($.sortIndex=H,t(l,$),v||p||(v=!0,R(w))),$},e.unstable_shouldYield=_,e.unstable_wrapCallback=function($){var F=d;return function(){var W=d;d=F;try{return $.apply(this,arguments)}finally{d=W}}}})(gA);yA.exports=gA;var zM=yA.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var UM=j,xr=zM;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uv=Object.prototype.hasOwnProperty,WM=/^[: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]*$/,jw={},Ew={};function HM(e){return Uv.call(Ew,e)?!0:Uv.call(jw,e)?!1:WM.test(e)?Ew[e]=!0:(jw[e]=!0,!1)}function KM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qM(e,t,r,n){if(t===null||typeof t>"u"||KM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Xt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Xt(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){Tt[e]=new Xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var G0=/[\-:]([a-z])/g;function Y0(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(G0,Y0);Tt[t]=new Xt(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(G0,Y0);Tt[t]=new Xt(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(G0,Y0);Tt[t]=new Xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Xt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function X0(e,t,r,n){var i=Tt.hasOwnProperty(t)?Tt[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{wm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Yl(e):""}function VM(e){switch(e.tag){case 5:return Yl(e.type);case 16:return Yl("Lazy");case 13:return Yl("Suspense");case 19:return Yl("SuspenseList");case 0:case 2:case 15:return e=Sm(e.type,!1),e;case 11:return e=Sm(e.type.render,!1),e;case 1:return e=Sm(e.type,!0),e;default:return""}}function qv(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 Mo:return"Fragment";case $o:return"Portal";case Wv:return"Profiler";case Q0:return"StrictMode";case Hv:return"Suspense";case Kv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wA:return(e.displayName||"Context")+".Consumer";case xA:return(e._context.displayName||"Context")+".Provider";case J0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z0:return t=e.displayName||null,t!==null?t:qv(e.type)||"Memo";case bi:t=e._payload,e=e._init;try{return qv(e(t))}catch{}}return null}function GM(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 qv(t);case 8:return t===Q0?"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 Ji(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function OA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function YM(e){var t=OA(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rf(e){e._valueTracker||(e._valueTracker=YM(e))}function PA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=OA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function sd(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 Vv(e,t){var r=t.checked;return Xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function _w(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ji(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jA(e,t){t=t.checked,t!=null&&X0(e,"checked",t,!1)}function Gv(e,t){jA(e,t);var r=Ji(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Yv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Yv(e,t.type,Ji(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Yv(e,t,r){(t!=="number"||sd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Xl=Array.isArray;function Xo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=nf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var tu={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},XM=["Webkit","ms","Moz","O"];Object.keys(tu).forEach(function(e){XM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tu[t]=tu[e]})});function TA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||tu.hasOwnProperty(e)&&tu[e]?(""+t).trim():t+"px"}function kA(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=TA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var QM=Xe({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 Jv(e,t){if(t){if(QM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Zv(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 ey=null;function eb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ty=null,Qo=null,Jo=null;function Cw(e){if(e=Cc(e)){if(typeof ty!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Qh(t),ty(e.stateNode,e.type,t))}}function NA(e){Qo?Jo?Jo.push(e):Jo=[e]:Qo=e}function CA(){if(Qo){var e=Qo,t=Jo;if(Jo=Qo=null,Cw(e),t)for(e=0;e>>=0,e===0?32:31-(lI(e)/uI|0)|0}var af=64,of=4194304;function Ql(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 fd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Ql(s):(a&=o,a!==0&&(n=Ql(a)))}else o=r&~i,o!==0?n=Ql(o):a!==0&&(n=Ql(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function kc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function hI(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=nu),zw=" ",Uw=!1;function JA(e,t){switch(e){case"keyup":return zI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Io=!1;function WI(e,t){switch(e){case"compositionend":return ZA(t);case"keypress":return t.which!==32?null:(Uw=!0,zw);case"textInput":return e=t.data,e===zw&&Uw?null:e;default:return null}}function HI(e,t){if(Io)return e==="compositionend"||!lb&&JA(e,t)?(e=XA(),Hf=ab=Mi=null,Io=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qw(r)}}function n_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?n_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function i_(){for(var e=window,t=sd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=sd(e.document)}return t}function ub(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 ZI(e){var t=i_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&n_(r.ownerDocument.documentElement,r)){if(n!==null&&ub(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Vw(r,a);var o=Vw(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Do=null,sy=null,au=null,ly=!1;function Gw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ly||Do==null||Do!==sd(n)||(n=Do,"selectionStart"in n&&ub(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),au&&Eu(au,n)||(au=n,n=pd(sy,"onSelect"),0Fo||(e.current=py[Fo],py[Fo]=null,Fo--)}function De(e,t){Fo++,py[Fo]=e.current,e.current=t}var Zi={},Lt=na(Zi),nr=na(!1),Va=Zi;function ws(e,t){var r=e.type.contextTypes;if(!r)return Zi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ir(e){return e=e.childContextTypes,e!=null}function vd(){Ue(nr),Ue(Lt)}function t1(e,t,r){if(Lt.current!==Zi)throw Error(K(168));De(Lt,t),De(nr,r)}function h_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,GM(e)||"Unknown",i));return Xe({},r,n)}function yd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zi,Va=Lt.current,De(Lt,e),De(nr,nr.current),!0}function r1(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=h_(e,t,Va),n.__reactInternalMemoizedMergedChildContext=e,Ue(nr),Ue(Lt),De(Lt,e)):Ue(nr),De(nr,r)}var Dn=null,Jh=!1,Dm=!1;function p_(e){Dn===null?Dn=[e]:Dn.push(e)}function fD(e){Jh=!0,p_(e)}function ia(){if(!Dm&&Dn!==null){Dm=!0;var e=0,t=ke;try{var r=Dn;for(ke=1;e>=o,i-=o,zn=1<<32-tn(t)+i|r<E?(A=P,P=null):A=P.sibling;var k=d(g,P,x[E],S);if(k===null){P===null&&(P=A);break}e&&P&&k.alternate===null&&t(g,P),b=a(k,b,E),O===null?w=k:O.sibling=k,O=k,P=A}if(E===x.length)return r(g,P),He&&va(g,E),w;if(P===null){for(;EE?(A=P,P=null):A=P.sibling;var _=d(g,P,k.value,S);if(_===null){P===null&&(P=A);break}e&&P&&_.alternate===null&&t(g,P),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_,P=A}if(k.done)return r(g,P),He&&va(g,E),w;if(P===null){for(;!k.done;E++,k=x.next())k=f(g,k.value,S),k!==null&&(b=a(k,b,E),O===null?w=k:O.sibling=k,O=k);return He&&va(g,E),w}for(P=n(g,P);!k.done;E++,k=x.next())k=p(P,g,E,k.value,S),k!==null&&(e&&k.alternate!==null&&P.delete(k.key===null?E:k.key),b=a(k,b,E),O===null?w=k:O.sibling=k,O=k);return e&&P.forEach(function(T){return t(g,T)}),He&&va(g,E),w}function y(g,b,x,S){if(typeof x=="object"&&x!==null&&x.type===Mo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case tf:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===Mo){if(O.tag===7){r(g,O.sibling),b=i(O,x.props.children),b.return=g,g=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===bi&&a1(w)===O.type){r(g,O.sibling),b=i(O,x.props),b.ref=Cl(g,O,x),b.return=g,g=b;break e}r(g,O);break}else t(g,O);O=O.sibling}x.type===Mo?(b=Ua(x.props.children,g.mode,S,x.key),b.return=g,g=b):(S=Jf(x.type,x.key,x.props,null,g.mode,S),S.ref=Cl(g,b,x),S.return=g,g=S)}return o(g);case $o:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(g,b.sibling),b=i(b,x.children||[]),b.return=g,g=b;break e}else{r(g,b);break}else t(g,b);b=b.sibling}b=Hm(x,g.mode,S),b.return=g,g=b}return o(g);case bi:return O=x._init,y(g,b,O(x._payload),S)}if(Xl(x))return v(g,b,x,S);if(Al(x))return m(g,b,x,S);hf(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(g,b.sibling),b=i(b,x),b.return=g,g=b):(r(g,b),b=Wm(x,g.mode,S),b.return=g,g=b),o(g)):r(g,b)}return y}var Os=g_(!0),b_=g_(!1),xd=na(null),wd=null,Uo=null,hb=null;function pb(){hb=Uo=wd=null}function mb(e){var t=xd.current;Ue(xd),e._currentValue=t}function yy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function es(e,t){wd=e,hb=Uo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tr=!0),e.firstContext=null)}function Fr(e){var t=e._currentValue;if(hb!==e)if(e={context:e,memoizedValue:t,next:null},Uo===null){if(wd===null)throw Error(K(308));Uo=e,wd.dependencies={lanes:0,firstContext:e}}else Uo=Uo.next=e;return t}var Pa=null;function vb(e){Pa===null?Pa=[e]:Pa.push(e)}function x_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,vb(t)):(r.next=i.next,i.next=r),t.interleaved=r,Jn(e,n)}function Jn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var xi=!1;function yb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w_(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 qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Jn(e,r)}return i=n.interleaved,i===null?(t.next=t,vb(n)):(t.next=i.next,i.next=t),n.interleaved=t,Jn(e,r)}function qf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rb(e,r)}}function o1(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Sd(e,t,r,n){var i=e.updateQueue;xi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var d=s.lane,p=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(d=t,p=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(p,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,d=typeof v=="function"?v.call(p,f,d):v,d==null)break e;f=Xe({},f,d);break e;case 2:xi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Xa|=o,e.lanes=o,e.memoizedState=f}}function s1(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Lm.transition;Lm.transition={};try{e(!1),t()}finally{ke=r,Lm.transition=n}}function L_(){return Br().memoizedState}function mD(e,t,r){var n=Ki(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},F_(e))B_(t,r);else if(r=x_(e,t,r,n),r!==null){var i=Vt();rn(r,e,n,i),z_(r,t,n)}}function vD(e,t,r){var n=Ki(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(F_(e))B_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,an(s,o)){var l=t.interleaved;l===null?(i.next=i,vb(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=x_(e,t,i,n),r!==null&&(i=Vt(),rn(r,e,n,i),z_(r,t,n))}}function F_(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function B_(e,t){ou=Pd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function z_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rb(e,r)}}var jd={readContext:Fr,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},yD={readContext:Fr,useCallback:function(e,t){return mn().memoizedState=[e,t===void 0?null:t],e},useContext:Fr,useEffect:u1,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Gf(4194308,4,$_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Gf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gf(4,2,e,t)},useMemo:function(e,t){var r=mn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=mn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=mD.bind(null,Ye,e),[n.memoizedState,e]},useRef:function(e){var t=mn();return e={current:e},t.memoizedState=e},useState:l1,useDebugValue:jb,useDeferredValue:function(e){return mn().memoizedState=e},useTransition:function(){var e=l1(!1),t=e[0];return e=pD.bind(null,e[1]),mn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ye,i=mn();if(He){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),wt===null)throw Error(K(349));Ya&30||j_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,u1(A_.bind(null,n,a,e),[e]),n.flags|=2048,Mu(9,E_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=mn(),t=wt.identifierPrefix;if(He){var r=Un,n=zn;r=(n&~(1<<32-tn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[bn]=t,e[Tu]=n,Q_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Zv(r,n),r){case"dialog":Fe("cancel",e),Fe("close",e),i=n;break;case"iframe":case"object":case"embed":Fe("load",e),i=n;break;case"video":case"audio":for(i=0;iEs&&(t.flags|=128,n=!0,$l(a,!1),t.lanes=4194304)}else{if(!n)if(e=Od(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),$l(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!He)return Nt(t),null}else 2*rt()-a.renderingStartTime>Es&&r!==1073741824&&(t.flags|=128,n=!0,$l(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=rt(),t.sibling=null,r=qe.current,De(qe,n?r&1|2:r&1),t):(Nt(t),null);case 22:case 23:return Nb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?pr&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function jD(e,t){switch(fb(t),t.tag){case 1:return ir(t.type)&&vd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ps(),Ue(nr),Ue(Lt),xb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bb(t),null;case 13:if(Ue(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(qe),null;case 4:return Ps(),null;case 10:return mb(t.type._context),null;case 22:case 23:return Nb(),null;case 24:return null;default:return null}}var mf=!1,$t=!1,ED=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Wo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ze(e,t,n)}else r.current=null}function Ey(e,t,r){try{r()}catch(n){Ze(e,t,n)}}var x1=!1;function AD(e,t){if(uy=dd,e=i_(),ub(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===i&&(s=o),d===a&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(cy={focusedElem:e,selectionRange:r},dd=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,y=v.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Vr(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){Ze(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return v=x1,x1=!1,v}function su(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Ey(t,r,a)}i=i.next}while(i!==n)}}function tp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ay(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function eT(e){var t=e.alternate;t!==null&&(e.alternate=null,eT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bn],delete t[Tu],delete t[hy],delete t[uD],delete t[cD])),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 tT(e){return e.tag===5||e.tag===3||e.tag===4}function w1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tT(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 _y(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=md));else if(n!==4&&(e=e.child,e!==null))for(_y(e,t,r),e=e.sibling;e!==null;)_y(e,t,r),e=e.sibling}function Ty(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Ty(e,t,r),e=e.sibling;e!==null;)Ty(e,t,r),e=e.sibling}var jt=null,Xr=!1;function hi(e,t,r){for(r=r.child;r!==null;)rT(e,t,r),r=r.sibling}function rT(e,t,r){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(Vh,r)}catch{}switch(r.tag){case 5:$t||Wo(r,t);case 6:var n=jt,i=Xr;jt=null,hi(e,t,r),jt=n,Xr=i,jt!==null&&(Xr?(e=jt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):jt.removeChild(r.stateNode));break;case 18:jt!==null&&(Xr?(e=jt,r=r.stateNode,e.nodeType===8?Im(e.parentNode,r):e.nodeType===1&&Im(e,r),Pu(e)):Im(jt,r.stateNode));break;case 4:n=jt,i=Xr,jt=r.stateNode.containerInfo,Xr=!0,hi(e,t,r),jt=n,Xr=i;break;case 0:case 11:case 14:case 15:if(!$t&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Ey(r,t,o),i=i.next}while(i!==n)}hi(e,t,r);break;case 1:if(!$t&&(Wo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ze(r,t,s)}hi(e,t,r);break;case 21:hi(e,t,r);break;case 22:r.mode&1?($t=(n=$t)||r.memoizedState!==null,hi(e,t,r),$t=n):hi(e,t,r);break;default:hi(e,t,r)}}function S1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ED),t.forEach(function(n){var i=DD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Hr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=rt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*TD(n/1960))-n,10e?16:e,Ii===null)var n=!1;else{if(e=Ii,Ii=null,_d=0,xe&6)throw Error(K(331));var i=xe;for(xe|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lrt()-Tb?za(e,0):_b|=r),ar(e,t)}function cT(e,t){t===0&&(e.mode&1?(t=of,of<<=1,!(of&130023424)&&(of=4194304)):t=1);var r=Vt();e=Jn(e,t),e!==null&&(kc(e,t,r),ar(e,r))}function ID(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),cT(e,r)}function DD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),cT(e,r)}var fT;fT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||nr.current)tr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return tr=!1,OD(e,t,r);tr=!!(e.flags&131072)}else tr=!1,He&&t.flags&1048576&&m_(t,bd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Yf(e,t),e=t.pendingProps;var i=ws(t,Lt.current);es(t,r),i=Sb(null,t,n,e,i,r);var a=Ob();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,ir(n)?(a=!0,yd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yb(t),i.updater=ep,t.stateNode=i,i._reactInternals=t,by(t,n,e,r),t=Sy(null,t,n,!0,a,r)):(t.tag=0,He&&a&&cb(t),Ut(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Yf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=LD(n),e=Vr(n,e),i){case 0:t=wy(null,t,n,e,r);break e;case 1:t=y1(null,t,n,e,r);break e;case 11:t=m1(null,t,n,e,r);break e;case 14:t=v1(null,t,n,Vr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),wy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),y1(e,t,n,i,r);case 3:e:{if(G_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,w_(e,t),Sd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=js(Error(K(423)),t),t=g1(e,t,n,r,i);break e}else if(n!==i){i=js(Error(K(424)),t),t=g1(e,t,n,r,i);break e}else for(yr=Ui(t.stateNode.containerInfo.firstChild),gr=t,He=!0,Zr=null,r=b_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ss(),n===i){t=Zn(e,t,r);break e}Ut(e,t,n,r)}t=t.child}return t;case 5:return S_(t),e===null&&vy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,fy(n,i)?o=null:a!==null&&fy(n,a)&&(t.flags|=32),V_(e,t),Ut(e,t,o,r),t.child;case 6:return e===null&&vy(t),null;case 13:return Y_(e,t,r);case 4:return gb(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Os(t,null,n,r):Ut(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),m1(e,t,n,i,r);case 7:return Ut(e,t,t.pendingProps,r),t.child;case 8:return Ut(e,t,t.pendingProps.children,r),t.child;case 12:return Ut(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,De(xd,n._currentValue),n._currentValue=o,a!==null)if(an(a.value,o)){if(a.children===i.children&&!nr.current){t=Zn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=qn(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),yy(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),yy(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ut(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,es(t,r),i=Fr(i),n=n(i),t.flags|=1,Ut(e,t,n,r),t.child;case 14:return n=t.type,i=Vr(n,t.pendingProps),i=Vr(n.type,i),v1(e,t,n,i,r);case 15:return K_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),Yf(e,t),t.tag=1,ir(n)?(e=!0,yd(t)):e=!1,es(t,r),U_(t,n,i),by(t,n,i,r),Sy(null,t,n,!0,e,r);case 19:return X_(e,t,r);case 22:return q_(e,t,r)}throw Error(K(156,t.tag))};function dT(e,t){return FA(e,t)}function RD(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(e,t,r,n){return new RD(e,t,r,n)}function $b(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LD(e){if(typeof e=="function")return $b(e)?1:0;if(e!=null){if(e=e.$$typeof,e===J0)return 11;if(e===Z0)return 14}return 2}function qi(e,t){var r=e.alternate;return r===null?(r=$r(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Jf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")$b(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Mo:return Ua(r.children,i,a,t);case Q0:o=8,i|=8;break;case Wv:return e=$r(12,r,t,i|2),e.elementType=Wv,e.lanes=a,e;case Hv:return e=$r(13,r,t,i),e.elementType=Hv,e.lanes=a,e;case Kv:return e=$r(19,r,t,i),e.elementType=Kv,e.lanes=a,e;case SA:return np(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xA:o=10;break e;case wA:o=9;break e;case J0:o=11;break e;case Z0:o=14;break e;case bi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=$r(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ua(e,t,r,n){return e=$r(7,e,n,t),e.lanes=r,e}function np(e,t,r,n){return e=$r(22,e,n,t),e.elementType=SA,e.lanes=r,e.stateNode={isHidden:!1},e}function Wm(e,t,r){return e=$r(6,e,null,t),e.lanes=r,e}function Hm(e,t,r){return t=$r(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FD(e,t,r,n,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=Pm(0),this.expirationTimes=Pm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mb(e,t,r,n,i,a,o,s,l){return e=new FD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=$r(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},yb(a),e}function BD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vT)}catch(e){console.error(e)}}vT(),vA.exports=wr;var Lb=vA.exports;const KD=Ee(Lb);var k1=Lb;zv.createRoot=k1.createRoot,zv.hydrateRoot=k1.hydrateRoot;var ol=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(){}},qD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ji,U0,GE,VD=(GE=class{constructor(){te(this,ji,qD);te(this,U0,!1)}setTimeoutProvider(e){X(this,ji,e)}setTimeout(e,t){return C(this,ji).setTimeout(e,t)}clearTimeout(e){C(this,ji).clearTimeout(e)}setInterval(e,t){return C(this,ji).setInterval(e,t)}clearInterval(e){C(this,ji).clearInterval(e)}},ji=new WeakMap,U0=new WeakMap,GE),Ea=new VD;function GD(e){setTimeout(e,0)}var Ja=typeof window>"u"||"Deno"in globalThis;function Wt(){}function YD(e,t){return typeof e=="function"?e(t):e}function My(e){return typeof e=="number"&&e>=0&&e!==1/0}function yT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vi(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function N1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Fb(o,t.options))return!1}else if(!Du(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function C1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Za(t.options.mutationKey)!==Za(a))return!1}else if(!Du(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Fb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Za)(e)}function Za(e){return JSON.stringify(e,(t,r)=>Iy(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Du(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Du(e[r],t[r])):!1}var XD=Object.prototype.hasOwnProperty;function gT(e,t){if(e===t)return e;const r=$1(e)&&$1(t);if(!r&&!(Iy(e)&&Iy(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{Ea.setTimeout(t,e)})}function Dy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?gT(e,t):t}function JD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function ZD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Bb=Symbol();function bT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xT(e,t){return typeof e=="function"?e(...t):!!e}var Ca,Ei,ls,YE,eR=(YE=class extends ol{constructor(){super();te(this,Ca);te(this,Ei);te(this,ls);X(this,ls,t=>{if(!Ja&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,Ei)||this.setEventListener(C(this,ls))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Ei))==null||t.call(this),X(this,Ei,void 0))}setEventListener(t){var r;X(this,ls,t),(r=C(this,Ei))==null||r.call(this),X(this,Ei,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,Ca)!==t&&(X(this,Ca,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,Ca)=="boolean"?C(this,Ca):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ca=new WeakMap,Ei=new WeakMap,ls=new WeakMap,YE),zb=new eR;function Ry(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var tR=GD;function rR(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=tR;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var ht=rR(),us,Ai,cs,XE,nR=(XE=class extends ol{constructor(){super();te(this,us,!0);te(this,Ai);te(this,cs);X(this,cs,t=>{if(!Ja&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){C(this,Ai)||this.setEventListener(C(this,cs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Ai))==null||t.call(this),X(this,Ai,void 0))}setEventListener(t){var r;X(this,cs,t),(r=C(this,Ai))==null||r.call(this),X(this,Ai,t(this.setOnline.bind(this)))}setOnline(t){C(this,us)!==t&&(X(this,us,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,us)}},us=new WeakMap,Ai=new WeakMap,cs=new WeakMap,XE),Cd=new nR;function iR(e){return Math.min(1e3*2**e,3e4)}function wT(e){return(e??"online")==="online"?Cd.isOnline():!0}var Ly=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ST(e){let t=!1,r=0,n;const i=Ry(),a=()=>i.status!=="pending",o=m=>{var y;if(!a()){const g=new Ly(m);d(g),(y=e.onCancel)==null||y.call(e,g)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>zb.isFocused()&&(e.networkMode==="always"||Cd.isOnline())&&e.canRun(),c=()=>wT(e.networkMode)&&e.canRun(),f=m=>{a()||(n==null||n(),i.resolve(m))},d=m=>{a()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var y;n=g=>{(a()||u())&&m(g)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const y=r===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(f).catch(g=>{var O;if(a())return;const b=e.retry??(Ja?0:3),x=e.retryDelay??iR,S=typeof x=="function"?x(r,g):x,w=b===!0||typeof b=="number"&&ru()?void 0:p()).then(()=>{t?d(g):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?v():p().then(v),i)}}var $a,QE,OT=(QE=class{constructor(){te(this,$a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),My(this.gcTime)&&X(this,$a,Ea.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ja?1/0:5*60*1e3))}clearGcTimeout(){C(this,$a)&&(Ea.clearTimeout(C(this,$a)),X(this,$a,void 0))}},$a=new WeakMap,QE),Ma,fs,_r,Ia,yt,Pc,Da,Gr,$n,JE,aR=(JE=class extends OT{constructor(t){super();te(this,Gr);te(this,Ma);te(this,fs);te(this,_r);te(this,Ia);te(this,yt);te(this,Pc);te(this,Da);X(this,Da,!1),X(this,Pc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,Ia,t.client),X(this,_r,C(this,Ia).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Ma,I1(this.options)),this.state=t.state??C(this,Ma),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,yt))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,Pc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=I1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,Ma,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,_r).remove(this)}setData(t,r){const n=Dy(this.state.data,t,this.options);return de(this,Gr,$n).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){de(this,Gr,$n).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=C(this,yt))==null?void 0:n.promise;return(i=C(this,yt))==null||i.cancel(t),r?r.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Ma))}isActive(){return this.observers.some(t=>Tr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Vi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,yt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,_r).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,yt)&&(C(this,Da)?C(this,yt).cancel({revert:!0}):C(this,yt).cancelRetry()),this.scheduleGc()),C(this,_r).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,Gr,$n).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,c,f,d,p,v,m,y,g,b,x;if(this.state.fetchStatus!=="idle"&&((l=C(this,yt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,yt))return C(this,yt).continueRetry(),C(this,yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,Da,!0),n.signal)})},a=()=>{const S=bT(this.options,r),O=(()=>{const P={client:C(this,Ia),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return X(this,Da,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,Ia),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,fs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&de(this,Gr,$n).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),X(this,yt,ST({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof Ly&&S.revert&&this.setState({...C(this,fs),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{de(this,Gr,$n).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{de(this,Gr,$n).call(this,{type:"pause"})},onContinue:()=>{de(this,Gr,$n).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await C(this,yt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(d=C(this,_r).config).onSuccess)==null||p.call(d,S,this),(m=(v=C(this,_r).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof Ly){if(S.silent)return C(this,yt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw de(this,Gr,$n).call(this,{type:"error",error:S}),(g=(y=C(this,_r).config).onError)==null||g.call(y,S,this),(x=(b=C(this,_r).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},Ma=new WeakMap,fs=new WeakMap,_r=new WeakMap,Ia=new WeakMap,yt=new WeakMap,Pc=new WeakMap,Da=new WeakMap,Gr=new WeakSet,$n=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...PT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,fs,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,_r).notify({query:this,type:"updated",action:t})})},JE);function PT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Jt,ve,jc,Bt,Ra,ds,Rn,_i,Ec,hs,ps,La,Fa,Ti,ms,je,Zl,Fy,By,zy,Uy,Wy,Hy,Ky,jT,ZE,oR=(ZE=class extends ol{constructor(t,r){super();te(this,je);te(this,Jt);te(this,ve);te(this,jc);te(this,Bt);te(this,Ra);te(this,ds);te(this,Rn);te(this,_i);te(this,Ec);te(this,hs);te(this,ps);te(this,La);te(this,Fa);te(this,Ti);te(this,ms,new Set);this.options=r,X(this,Jt,t),X(this,_i,null),X(this,Rn,Ry()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,ve).addObserver(this),D1(C(this,ve),this.options)?de(this,je,Zl).call(this):this.updateResult(),de(this,je,Uy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qy(C(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qy(C(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,je,Wy).call(this),de(this,je,Hy).call(this),C(this,ve).removeObserver(this)}setOptions(t){const r=this.options,n=C(this,ve);if(this.options=C(this,Jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,C(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,je,Ky).call(this),C(this,ve).setOptions(this.options),r._defaulted&&!Nd(this.options,r)&&C(this,Jt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ve),observer:this});const i=this.hasListeners();i&&R1(C(this,ve),n,this.options,r)&&de(this,je,Zl).call(this),this.updateResult(),i&&(C(this,ve)!==n||Tr(this.options.enabled,C(this,ve))!==Tr(r.enabled,C(this,ve))||Vi(this.options.staleTime,C(this,ve))!==Vi(r.staleTime,C(this,ve)))&&de(this,je,Fy).call(this);const a=de(this,je,By).call(this);i&&(C(this,ve)!==n||Tr(this.options.enabled,C(this,ve))!==Tr(r.enabled,C(this,ve))||a!==C(this,Ti))&&de(this,je,zy).call(this,a)}getOptimisticResult(t){const r=C(this,Jt).getQueryCache().build(C(this,Jt),t),n=this.createResult(r,t);return lR(this,n)&&(X(this,Bt,n),X(this,ds,this.options),X(this,Ra,C(this,ve).state)),n}getCurrentResult(){return C(this,Bt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,Rn).status==="pending"&&C(this,Rn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){C(this,ms).add(t)}getCurrentQuery(){return C(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=C(this,Jt).defaultQueryOptions(t),n=C(this,Jt).getQueryCache().build(C(this,Jt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return de(this,je,Zl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Bt)))}createResult(t,r){var A;const n=C(this,ve),i=this.options,a=C(this,Bt),o=C(this,Ra),s=C(this,ds),u=t!==n?t.state:C(this,jc),{state:c}=t;let f={...c},d=!1,p;if(r._optimisticResults){const k=this.hasListeners(),_=!k&&D1(t,r),T=k&&R1(t,n,r,i);(_||T)&&(f={...f,...PT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:y}=f;p=f.data;let g=!1;if(r.placeholderData!==void 0&&p===void 0&&y==="pending"){let k;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(k=a.data,g=!0):k=typeof r.placeholderData=="function"?r.placeholderData((A=C(this,ps))==null?void 0:A.state.data,C(this,ps)):r.placeholderData,k!==void 0&&(y="success",p=Dy(a==null?void 0:a.data,k,r),d=!0)}if(r.select&&p!==void 0&&!g)if(a&&p===(o==null?void 0:o.data)&&r.select===C(this,Ec))p=C(this,hs);else try{X(this,Ec,r.select),p=r.select(p),p=Dy(a==null?void 0:a.data,p,r),X(this,hs,p),X(this,_i,null)}catch(k){X(this,_i,k)}C(this,_i)&&(v=C(this,_i),p=C(this,hs),m=Date.now(),y="error");const b=f.fetchStatus==="fetching",x=y==="pending",S=y==="error",w=x&&b,O=p!==void 0,E={status:y,fetchStatus:f.fetchStatus,isPending:x,isSuccess:y==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&O,isStale:Ub(t,r),refetch:this.refetch,promise:C(this,Rn),isEnabled:Tr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=I=>{E.status==="error"?I.reject(E.error):E.data!==void 0&&I.resolve(E.data)},_=()=>{const I=X(this,Rn,E.promise=Ry());k(I)},T=C(this,Rn);switch(T.status){case"pending":t.queryHash===n.queryHash&&k(T);break;case"fulfilled":(E.status==="error"||E.data!==T.value)&&_();break;case"rejected":(E.status!=="error"||E.error!==T.reason)&&_();break}}return E}updateResult(){const t=C(this,Bt),r=this.createResult(C(this,ve),this.options);if(X(this,Ra,C(this,ve).state),X(this,ds,this.options),C(this,Ra).data!==void 0&&X(this,ps,C(this,ve)),Nd(r,t))return;X(this,Bt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!C(this,ms).size)return!0;const o=new Set(a??C(this,ms));return this.options.throwOnError&&o.add("error"),Object.keys(C(this,Bt)).some(s=>{const l=s;return C(this,Bt)[l]!==t[l]&&o.has(l)})};de(this,je,jT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,je,Uy).call(this)}},Jt=new WeakMap,ve=new WeakMap,jc=new WeakMap,Bt=new WeakMap,Ra=new WeakMap,ds=new WeakMap,Rn=new WeakMap,_i=new WeakMap,Ec=new WeakMap,hs=new WeakMap,ps=new WeakMap,La=new WeakMap,Fa=new WeakMap,Ti=new WeakMap,ms=new WeakMap,je=new WeakSet,Zl=function(t){de(this,je,Ky).call(this);let r=C(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Wt)),r},Fy=function(){de(this,je,Wy).call(this);const t=Vi(this.options.staleTime,C(this,ve));if(Ja||C(this,Bt).isStale||!My(t))return;const n=yT(C(this,Bt).dataUpdatedAt,t)+1;X(this,La,Ea.setTimeout(()=>{C(this,Bt).isStale||this.updateResult()},n))},By=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ve)):this.options.refetchInterval)??!1},zy=function(t){de(this,je,Hy).call(this),X(this,Ti,t),!(Ja||Tr(this.options.enabled,C(this,ve))===!1||!My(C(this,Ti))||C(this,Ti)===0)&&X(this,Fa,Ea.setInterval(()=>{(this.options.refetchIntervalInBackground||zb.isFocused())&&de(this,je,Zl).call(this)},C(this,Ti)))},Uy=function(){de(this,je,Fy).call(this),de(this,je,zy).call(this,de(this,je,By).call(this))},Wy=function(){C(this,La)&&(Ea.clearTimeout(C(this,La)),X(this,La,void 0))},Hy=function(){C(this,Fa)&&(Ea.clearInterval(C(this,Fa)),X(this,Fa,void 0))},Ky=function(){const t=C(this,Jt).getQueryCache().build(C(this,Jt),this.options);if(t===C(this,ve))return;const r=C(this,ve);X(this,ve,t),X(this,jc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},jT=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(C(this,Bt))}),C(this,Jt).getQueryCache().notify({query:C(this,ve),type:"observerResultsUpdated"})})},ZE);function sR(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function D1(e,t){return sR(e,t)||e.state.data!==void 0&&qy(e,t,t.refetchOnMount)}function qy(e,t,r){if(Tr(t.enabled,e)!==!1&&Vi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ub(e,t)}return!1}function R1(e,t,r,n){return(e!==t||Tr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ub(e,r)}function Ub(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(Vi(t.staleTime,e))}function lR(e,t){return!Nd(e.getCurrentResult(),t)}function L1(e){return{onFetch:(t,r)=>{var c,f,d,p,v;const n=t.options,i=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=bT(t.options,t.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const P=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return y(_),_})(),E=await g(P),{maxPages:A}=t.options,k=w?ZD:JD;return{pages:k(x.pages,E,A),pageParams:k(x.pageParams,S,A)}};if(i&&a.length){const x=i==="backward",S=x?uR:F1,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:F1(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function F1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function uR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ac,vn,zt,Ba,yn,yi,eA,cR=(eA=class extends OT{constructor(t){super();te(this,yn);te(this,Ac);te(this,vn);te(this,zt);te(this,Ba);X(this,Ac,t.client),this.mutationId=t.mutationId,X(this,zt,t.mutationCache),X(this,vn,[]),this.state=t.state||ET(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,vn).includes(t)||(C(this,vn).push(t),this.clearGcTimeout(),C(this,zt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,vn,C(this,vn).filter(r=>r!==t)),this.scheduleGc(),C(this,zt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,vn).length||(this.state.status==="pending"?this.scheduleGc():C(this,zt).remove(this))}continue(){var t;return((t=C(this,Ba))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,c,f,d,p,v,m,y,g,b,x,S,w,O,P,E,A;const r=()=>{de(this,yn,yi).call(this,{type:"continue"})},n={client:C(this,Ac),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,Ba,ST({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(k,_)=>{de(this,yn,yi).call(this,{type:"failed",failureCount:k,error:_})},onPause:()=>{de(this,yn,yi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,zt).canRun(this)}));const i=this.state.status==="pending",a=!C(this,Ba).canStart();try{if(i)r();else{de(this,yn,yi).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=C(this,zt).config).onMutate)==null?void 0:s.call(o,t,this,n));const _=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));_!==this.state.context&&de(this,yn,yi).call(this,{type:"pending",context:_,variables:t,isPaused:a})}const k=await C(this,Ba).start();return await((f=(c=C(this,zt).config).onSuccess)==null?void 0:f.call(c,k,t,this.state.context,this,n)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,k,t,this.state.context,n)),await((m=(v=C(this,zt).config).onSettled)==null?void 0:m.call(v,k,null,this.state.variables,this.state.context,this,n)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,k,null,t,this.state.context,n)),de(this,yn,yi).call(this,{type:"success",data:k}),k}catch(k){try{throw await((x=(b=C(this,zt).config).onError)==null?void 0:x.call(b,k,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,k,t,this.state.context,n)),await((P=(O=C(this,zt).config).onSettled)==null?void 0:P.call(O,void 0,k,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,k,t,this.state.context,n)),k}finally{de(this,yn,yi).call(this,{type:"error",error:k})}}finally{C(this,zt).runNext(this)}}},Ac=new WeakMap,vn=new WeakMap,zt=new WeakMap,Ba=new WeakMap,yn=new WeakSet,yi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ht.batch(()=>{C(this,vn).forEach(n=>{n.onMutationUpdate(t)}),C(this,zt).notify({mutation:this,type:"updated",action:t})})},eA);function ET(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ln,Yr,_c,tA,fR=(tA=class extends ol{constructor(t={}){super();te(this,Ln);te(this,Yr);te(this,_c);this.config=t,X(this,Ln,new Set),X(this,Yr,new Map),X(this,_c,0)}build(t,r,n){const i=new cR({client:t,mutationCache:this,mutationId:++Jc(this,_c)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){C(this,Ln).add(t);const r=gf(t);if(typeof r=="string"){const n=C(this,Yr).get(r);n?n.push(t):C(this,Yr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,Ln).delete(t)){const r=gf(t);if(typeof r=="string"){const n=C(this,Yr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&C(this,Yr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=gf(t);if(typeof r=="string"){const n=C(this,Yr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=gf(t);if(typeof r=="string"){const i=(n=C(this,Yr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{C(this,Ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,Ln).clear(),C(this,Yr).clear()})}getAll(){return Array.from(C(this,Ln))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>C1(r,n))}findAll(t={}){return this.getAll().filter(r=>C1(t,r))}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(Wt))))}},Ln=new WeakMap,Yr=new WeakMap,_c=new WeakMap,tA);function gf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Fn,ki,Zt,Bn,Yn,Zf,Vy,rA,dR=(rA=class extends ol{constructor(r,n){super();te(this,Yn);te(this,Fn);te(this,ki);te(this,Zt);te(this,Bn);X(this,Fn,r),this.setOptions(n),this.bindMethods(),de(this,Yn,Zf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=C(this,Fn).defaultMutationOptions(r),Nd(this.options,n)||C(this,Fn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Zt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Za(n.mutationKey)!==Za(this.options.mutationKey)?this.reset():((i=C(this,Zt))==null?void 0:i.state.status)==="pending"&&C(this,Zt).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=C(this,Zt))==null||r.removeObserver(this)}onMutationUpdate(r){de(this,Yn,Zf).call(this),de(this,Yn,Vy).call(this,r)}getCurrentResult(){return C(this,ki)}reset(){var r;(r=C(this,Zt))==null||r.removeObserver(this),X(this,Zt,void 0),de(this,Yn,Zf).call(this),de(this,Yn,Vy).call(this)}mutate(r,n){var i;return X(this,Bn,n),(i=C(this,Zt))==null||i.removeObserver(this),X(this,Zt,C(this,Fn).getMutationCache().build(C(this,Fn),this.options)),C(this,Zt).addObserver(this),C(this,Zt).execute(r)}},Fn=new WeakMap,ki=new WeakMap,Zt=new WeakMap,Bn=new WeakMap,Yn=new WeakSet,Zf=function(){var n;const r=((n=C(this,Zt))==null?void 0:n.state)??ET();X(this,ki,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Vy=function(r){ht.batch(()=>{var n,i,a,o,s,l,u,c;if(C(this,Bn)&&this.hasListeners()){const f=C(this,ki).variables,d=C(this,ki).context,p={client:C(this,Fn),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((i=(n=C(this,Bn)).onSuccess)==null||i.call(n,r.data,f,d,p),(o=(a=C(this,Bn)).onSettled)==null||o.call(a,r.data,null,f,d,p)):(r==null?void 0:r.type)==="error"&&((l=(s=C(this,Bn)).onError)==null||l.call(s,r.error,f,d,p),(c=(u=C(this,Bn)).onSettled)==null||c.call(u,void 0,r.error,f,d,p))}this.listeners.forEach(f=>{f(C(this,ki))})})},rA),gn,nA,hR=(nA=class extends ol{constructor(t={}){super();te(this,gn);this.config=t,X(this,gn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Fb(i,r);let o=this.get(a);return o||(o=new aR({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,gn).has(t.queryHash)||(C(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,gn).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,gn).get(t)}getAll(){return[...C(this,gn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>N1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>N1(t,n)):r}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,nA),Je,Ni,Ci,vs,ys,$i,gs,bs,iA,pR=(iA=class{constructor(e={}){te(this,Je);te(this,Ni);te(this,Ci);te(this,vs);te(this,ys);te(this,$i);te(this,gs);te(this,bs);X(this,Je,e.queryCache||new hR),X(this,Ni,e.mutationCache||new fR),X(this,Ci,e.defaultOptions||{}),X(this,vs,new Map),X(this,ys,new Map),X(this,$i,0)}mount(){Jc(this,$i)._++,C(this,$i)===1&&(X(this,gs,zb.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Je).onFocus())})),X(this,bs,Cd.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Je).onOnline())})))}unmount(){var e,t;Jc(this,$i)._--,C(this,$i)===0&&((e=C(this,gs))==null||e.call(this),X(this,gs,void 0),(t=C(this,bs))==null||t.call(this),X(this,bs,void 0))}isFetching(e){return C(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Ni).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,Je).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,Je).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Vi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,Je).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=C(this,Je).get(n.queryHash),a=i==null?void 0:i.state.data,o=YD(t,a);if(o!==void 0)return C(this,Je).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return ht.batch(()=>C(this,Je).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,Je).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,Je);ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,Je);return ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ht.batch(()=>C(this,Je).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return ht.batch(()=>(C(this,Je).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=ht.batch(()=>C(this,Je).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Wt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,Je).build(this,t);return r.isStaleByTime(Vi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=L1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=L1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cd.isOnline()?C(this,Ni).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Je)}getMutationCache(){return C(this,Ni)}getDefaultOptions(){return C(this,Ci)}setDefaultOptions(e){X(this,Ci,e)}setQueryDefaults(e,t){C(this,vs).set(Za(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,vs).values()],r={};return t.forEach(n=>{Du(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,ys).set(Za(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,ys).values()],r={};return t.forEach(n=>{Du(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Ci).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fb(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===Bb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Ci).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Je).clear(),C(this,Ni).clear()}},Je=new WeakMap,Ni=new WeakMap,Ci=new WeakMap,vs=new WeakMap,ys=new WeakMap,$i=new WeakMap,gs=new WeakMap,bs=new WeakMap,iA),AT=j.createContext(void 0),lp=e=>{const t=j.useContext(AT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mR=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(AT.Provider,{value:e,children:t})),_T=j.createContext(!1),vR=()=>j.useContext(_T);_T.Provider;function yR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gR=j.createContext(yR()),bR=()=>j.useContext(gR),xR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},wR=e=>{j.useEffect(()=>{e.clearReset()},[e])},SR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||xT(r,[e.error,n])),OR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},PR=(e,t)=>e.isLoading&&e.isFetching&&!t,jR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,B1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ER(e,t,r){var f,d,p,v,m;const n=vR(),i=bR(),a=lp(),o=a.defaultQueryOptions(e);(d=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",OR(o),xR(o,i),wR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=j.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(y=>{const g=c?l.subscribe(ht.batchCalls(y)):Wt;return l.updateResult(),g},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),j.useEffect(()=>{l.setOptions(o)},[o,l]),jR(o,u))throw B1(o,l,i);if(SR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,u),o.experimental_prefetchInRender&&!Ja&&PR(u,n)){const y=s?B1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;y==null||y.catch(Wt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function Or(e,t){return ER(e,oR)}function AR(e,t){const r=lp(),[n]=j.useState(()=>new dR(r,e));j.useEffect(()=>{n.setOptions(e)},[n,e]);const i=j.useSyncExternalStore(j.useCallback(o=>n.subscribe(ht.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=j.useCallback((o,s)=>{n.mutate(o,s).catch(Wt)},[n]);if(i.error&&xT(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ru(){return Ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function TT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TR(){return Math.random().toString(36).substr(2,8)}function U1(e,t){return{usr:e.state,key:e.key,idx:t}}function Gy(e,t,r,n){return r===void 0&&(r=null),Ru({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sl(t):t,{state:r,key:t&&t.key||n||TR()})}function $d(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function sl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function kR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Di.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Ru({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Di.Pop;let y=c(),g=y==null?null:y-u;u=y,l&&l({action:s,location:m.location,delta:g})}function d(y,g){s=Di.Push;let b=Gy(m.location,y,g);u=c()+1;let x=U1(b,u),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function p(y,g){s=Di.Replace;let b=Gy(m.location,y,g);u=c();let x=U1(b,u),S=m.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:$d(y);return b=b.replace(/ $/,"%20"),at(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let m={get action(){return s},get location(){return e(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(z1,f),l=y,()=>{i.removeEventListener(z1,f),l=null}},createHref(y){return t(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:p,go(y){return o.go(y)}};return m}var W1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(W1||(W1={}));function NR(e,t,r){return r===void 0&&(r="/"),CR(e,t,r)}function CR(e,t,r,n){let i=typeof t=="string"?sl(t):t,a=Wb(i.pathname||"/",r);if(a==null)return null;let o=kT(e);$R(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(at(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Gi([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kT(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:BR(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of NT(a.path))i(a,o,l)}),t}function NT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=NT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function $R(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:zR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const MR=/^:[\w-]+$/,IR=3,DR=2,RR=1,LR=10,FR=-2,H1=e=>e==="*";function BR(e,t){let r=e.split("/"),n=r.length;return r.some(H1)&&(n+=FR),t&&(n+=DR),r.filter(i=>!H1(i)).reduce((i,a)=>i+(MR.test(a)?IR:a===""?RR:LR),n)}function zR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function UR(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:p}=c;if(d==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return p&&!v?u[d]=void 0:u[d]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function HR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),TT(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function KR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return TT(!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 Wb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function qR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?sl(e):e;return{pathname:r?r.startsWith("/")?r:VR(r,t):t,search:XR(n),hash:QR(i)}}function VR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Km(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function GR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function CT(e,t){let r=GR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function $T(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=sl(e):(i=Ru({},e),at(!i.pathname||!i.pathname.includes("?"),Km("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),Km("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),Km("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=qR(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Gi=e=>e.join("/").replace(/\/\/+/g,"/"),YR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function JR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MT=["post","put","patch","delete"];new Set(MT);const ZR=["get",...MT];new Set(ZR);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),j.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=$T(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gi([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}const nL=j.createContext(null);function iL(e){let t=j.useContext(si).outlet;return t&&j.createElement(nL.Provider,{value:e},t)}function RT(){let{matches:e}=j.useContext(si),t=e[e.length-1];return t?t.params:{}}function LT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=j.useContext(ho),{matches:i}=j.useContext(si),{pathname:a}=po(),o=JSON.stringify(CT(i,n.v7_relativeSplatPath));return j.useMemo(()=>$T(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function aL(e,t){return oL(e,t)}function oL(e,t,r,n){Mc()||at(!1);let{navigator:i}=j.useContext(ho),{matches:a}=j.useContext(si),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=po(),c;if(t){var f;let y=typeof t=="string"?sl(t):t;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||at(!1),c=y}else c=u;let d=c.pathname||"/",p=d;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=NR(e,{pathname:p}),m=fL(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Gi([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Gi([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,r,n);return t&&m?j.createElement(up.Provider,{value:{location:Lu({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Di.Pop}},m):m}function sL(){let e=mL(),t=JR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:i},r):null,null)}const lL=j.createElement(sL,null);class uL extends j.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?j.createElement(si.Provider,{value:this.props.routeContext},j.createElement(IT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cL(e){let{routeContext:t,match:r,children:n}=e,i=j.useContext(Hb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),j.createElement(si.Provider,{value:t},n)}function fL(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||at(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let p,v=!1,m=null,y=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||lL,l&&(u<0&&d===0?(yL("route-fallback"),v=!0,y=null):u===d&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,d+1)),b=()=>{let x;return p?x=m:v?x=y:f.route.Component?x=j.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,j.createElement(cL,{match:f,routeContext:{outlet:c,matches:g,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?j.createElement(uL,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var FT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(FT||{}),BT=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}(BT||{});function dL(e){let t=j.useContext(Hb);return t||at(!1),t}function hL(e){let t=j.useContext(eL);return t||at(!1),t}function pL(e){let t=j.useContext(si);return t||at(!1),t}function zT(e){let t=pL(),r=t.matches[t.matches.length-1];return r.route.id||at(!1),r.route.id}function mL(){var e;let t=j.useContext(IT),r=hL(),n=zT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function vL(){let{router:e}=dL(FT.UseNavigateStable),t=zT(BT.UseNavigateStable),r=j.useRef(!1);return DT(()=>{r.current=!0}),j.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Lu({fromRouteId:t},a)))},[e,t])}const K1={};function yL(e,t,r){K1[e]||(K1[e]=!0)}function gL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function bL(e){return iL(e.context)}function qr(e){at(!1)}function xL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Di.Pop,navigator:a,static:o=!1,future:s}=e;Mc()&&at(!1);let l=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:l,navigator:a,static:o,future:Lu({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=sl(n));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:v="default"}=n,m=j.useMemo(()=>{let y=Wb(c,l);return y==null?null:{location:{pathname:y,search:f,hash:d,state:p,key:v},navigationType:i}},[l,c,f,d,p,v,i]);return m==null?null:j.createElement(ho.Provider,{value:u},j.createElement(up.Provider,{children:r,value:m}))}function wL(e){let{children:t,location:r}=e;return aL(Yy(t),r)}new Promise(()=>{});function Yy(e,t){t===void 0&&(t=[]);let r=[];return j.Children.forEach(e,(n,i)=>{if(!j.isValidElement(n))return;let a=[...t,i];if(n.type===j.Fragment){r.push.apply(r,Yy(n.props.children,a));return}n.type!==qr&&at(!1),!n.props.index||!n.props.children||at(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Yy(n.props.children,a)),r.push(o)}),r}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Xy(){return Xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function OL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PL(e,t){return e.button===0&&(!t||t==="_self")&&!OL(e)}function Qy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function jL(e,t){let r=Qy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const EL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],AL="6";try{window.__reactRouterVersion=AL}catch{}const _L="startTransition",q1=V0[_L];function TL(e){let{basename:t,children:r,future:n,window:i}=e,a=j.useRef();a.current==null&&(a.current=_R({window:i,v5Compat:!0}));let o=a.current,[s,l]=j.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=j.useCallback(f=>{u&&q1?q1(()=>l(f)):l(f)},[l,u]);return j.useLayoutEffect(()=>o.listen(c),[o,c]),j.useEffect(()=>gL(n),[n]),j.createElement(xL,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const kL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eo=j.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=SL(t,EL),{basename:p}=j.useContext(ho),v,m=!1;if(typeof u=="string"&&NL.test(u)&&(v=u,kL))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=Wb(S.pathname,p);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let y=tL(u,{relative:i}),g=CL(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function b(x){n&&n(x),x.defaultPrevented||g(x)}return j.createElement("a",Xy({},d,{href:v||y,onClick:m||a?n:b,ref:r,target:l}))});var V1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(V1||(V1={}));var G1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(G1||(G1={}));function CL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Kb(),u=po(),c=LT(e,{relative:o});return j.useCallback(f=>{if(PL(f,r)){f.preventDefault();let d=n!==void 0?n:$d(u)===$d(c);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}function $L(e){let t=j.useRef(Qy(e)),r=j.useRef(!1),n=po(),i=j.useMemo(()=>jL(n.search,r.current?null:t.current),[n.search]),a=Kb(),o=j.useCallback((s,l)=>{const u=Qy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const ML=new pR({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function qb(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function UT(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const WT=j.createContext(void 0);function IL({children:e}){const[t,r]=j.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return h.jsx(WT.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function ll(){const e=j.useContext(WT);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function DL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function RL(){return(await DL()).userId}function HT(e,t){return function(){return e.apply(t,arguments)}}const{toString:LL}=Object.prototype,{getPrototypeOf:Vb}=Object,{iterator:cp,toStringTag:KT}=Symbol,fp=(e=>t=>{const r=LL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),un=e=>(e=e.toLowerCase(),t=>fp(t)===e),dp=e=>t=>typeof t===e,{isArray:ul}=Array,As=dp("undefined");function Ic(e){return e!==null&&!As(e)&&e.constructor!==null&&!As(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qT=un("ArrayBuffer");function FL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qT(e.buffer),t}const BL=dp("string"),or=dp("function"),VT=dp("number"),Dc=e=>e!==null&&typeof e=="object",zL=e=>e===!0||e===!1,ed=e=>{if(fp(e)!=="object")return!1;const t=Vb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(KT in e)&&!(cp in e)},UL=e=>{if(!Dc(e)||Ic(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},WL=un("Date"),HL=un("File"),KL=un("Blob"),qL=un("FileList"),VL=e=>Dc(e)&&or(e.pipe),GL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=fp(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},YL=un("URLSearchParams"),[XL,QL,JL,ZL]=["ReadableStream","Request","Response","Headers"].map(un),e3=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),ul(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YT=e=>!As(e)&&e!==Aa;function Jy(){const{caseless:e,skipUndefined:t}=YT(this)&&this||{},r={},n=(i,a)=>{const o=e&>(r,a)||a;ed(r[o])&&ed(i)?r[o]=Jy(r[o],i):ed(i)?r[o]=Jy({},i):ul(i)?r[o]=i.slice():(!t||!As(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Rc(t,(i,a)=>{r&&or(i)?e[a]=HT(i,r):e[a]=i},{allOwnKeys:n}),e),r3=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),n3=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},i3=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Vb(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},a3=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},o3=e=>{if(!e)return null;if(ul(e))return e;let t=e.length;if(!VT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},s3=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vb(Uint8Array)),l3=(e,t)=>{const n=(e&&e[cp]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},u3=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},c3=un("HTMLFormElement"),f3=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Y1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),d3=un("RegExp"),XT=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Rc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},h3=e=>{XT(e,(t,r)=>{if(or(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(or(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},p3=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return ul(e)?n(e):n(String(e).split(t)),r},m3=()=>{},v3=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function y3(e){return!!(e&&or(e.append)&&e[KT]==="FormData"&&e[cp])}const g3=e=>{const t=new Array(10),r=(n,i)=>{if(Dc(n)){if(t.indexOf(n)>=0)return;if(Ic(n))return n;if(!("toJSON"in n)){t[i]=n;const a=ul(n)?[]:{};return Rc(n,(o,s)=>{const l=r(o,i+1);!As(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},b3=un("AsyncFunction"),x3=e=>e&&(Dc(e)||or(e))&&or(e.then)&&or(e.catch),QT=((e,t)=>e?setImmediate:t?((r,n)=>(Aa.addEventListener("message",({source:i,data:a})=>{i===Aa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Aa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",or(Aa.postMessage)),w3=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof process<"u"&&process.nextTick||QT,S3=e=>e!=null&&or(e[cp]),L={isArray:ul,isArrayBuffer:qT,isBuffer:Ic,isFormData:GL,isArrayBufferView:FL,isString:BL,isNumber:VT,isBoolean:zL,isObject:Dc,isPlainObject:ed,isEmptyObject:UL,isReadableStream:XL,isRequest:QL,isResponse:JL,isHeaders:ZL,isUndefined:As,isDate:WL,isFile:HL,isBlob:KL,isRegExp:d3,isFunction:or,isStream:VL,isURLSearchParams:YL,isTypedArray:s3,isFileList:qL,forEach:Rc,merge:Jy,extend:t3,trim:e3,stripBOM:r3,inherits:n3,toFlatObject:i3,kindOf:fp,kindOfTest:un,endsWith:a3,toArray:o3,forEachEntry:l3,matchAll:u3,isHTMLForm:c3,hasOwnProperty:Y1,hasOwnProp:Y1,reduceDescriptors:XT,freezeMethods:h3,toObjectSet:p3,toCamelCase:f3,noop:m3,toFiniteNumber:v3,findKey:GT,global:Aa,isContextDefined:YT,isSpecCompliantForm:y3,toJSONObject:g3,isAsyncFn:b3,isThenable:x3,setImmediate:QT,asap:w3,isIterable:S3};function fe(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(fe,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:L.toJSONObject(this.config),code:this.code,status:this.status}}});const JT=fe.prototype,ZT={};["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=>{ZT[e]={value:e}});Object.defineProperties(fe,ZT);Object.defineProperty(JT,"isAxiosError",{value:!0});fe.from=(e,t,r,n,i,a)=>{const o=Object.create(JT);L.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return fe.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const O3=null;function Zy(e){return L.isPlainObject(e)||L.isArray(e)}function ek(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function X1(e,t,r){return e?e.concat(t).map(function(i,a){return i=ek(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function P3(e){return L.isArray(e)&&!e.some(Zy)}const j3=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function hp(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!L.isUndefined(y[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(L.isDate(v))return v.toISOString();if(L.isBoolean(v))return v.toString();if(!l&&L.isBlob(v))throw new fe("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(v)||L.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,y){let g=v;if(v&&!y&&typeof v=="object"){if(L.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(L.isArray(v)&&P3(v)||(L.isFileList(v)||L.endsWith(m,"[]"))&&(g=L.toArray(v)))return m=ek(m),g.forEach(function(x,S){!(L.isUndefined(x)||x===null)&&t.append(o===!0?X1([m],S,a):o===null?m:m+"[]",u(x))}),!1}return Zy(v)?!0:(t.append(X1(y,m,a),u(v)),!1)}const f=[],d=Object.assign(j3,{defaultVisitor:c,convertValue:u,isVisitable:Zy});function p(v,m){if(!L.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),L.forEach(v,function(g,b){(!(L.isUndefined(g)||g===null)&&i.call(t,g,L.isString(b)?b.trim():b,m,d))===!0&&p(g,m?m.concat(b):[b])}),f.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Q1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Gb(e,t){this._pairs=[],e&&hp(e,this,t)}const tk=Gb.prototype;tk.append=function(t,r){this._pairs.push([t,r])};tk.toString=function(t){const r=t?function(n){return t.call(this,n,Q1)}:Q1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function E3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rk(e,t,r){if(!t)return e;const n=r&&r.encode||E3;L.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=L.isURLSearchParams(t)?t.toString():new Gb(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class J1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},A3=typeof URLSearchParams<"u"?URLSearchParams:Gb,_3=typeof FormData<"u"?FormData:null,T3=typeof Blob<"u"?Blob:null,k3={isBrowser:!0,classes:{URLSearchParams:A3,FormData:_3,Blob:T3},protocols:["http","https","file","blob","url","data"]},Yb=typeof window<"u"&&typeof document<"u",eg=typeof navigator=="object"&&navigator||void 0,N3=Yb&&(!eg||["ReactNative","NativeScript","NS"].indexOf(eg.product)<0),C3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$3=Yb&&window.location.href||"http://localhost",M3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yb,hasStandardBrowserEnv:N3,hasStandardBrowserWebWorkerEnv:C3,navigator:eg,origin:$3},Symbol.toStringTag,{value:"Module"})),Rt={...M3,...k3};function I3(e,t){return hp(e,new Rt.classes.URLSearchParams,{visitor:function(r,n,i,a){return Rt.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function D3(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function R3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&L.isArray(i)?i.length:o,l?(L.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&L.isArray(i[o])&&(i[o]=R3(i[o])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,i)=>{t(D3(n),i,r,0)}),r}return null}function L3(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Lc={transitional:nk,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=L.isObject(t);if(a&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(ik(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return I3(t,this.formSerializer).toString();if((s=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return hp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),L3(t)):t}],transformResponse:[function(t){const r=this.transitional||Lc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?fe.from(s,fe.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:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Lc.headers[e]={}});const F3=L.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"]),B3=e=>{const t={};let r,n,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&F3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Z1=Symbol("internals");function Il(e){return e&&String(e).trim().toLowerCase()}function td(e){return e===!1||e==null?e:L.isArray(e)?e.map(td):String(e)}function z3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const U3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qm(e,t,r,n,i){if(L.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!L.isString(t)){if(L.isString(n))return t.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(t)}}function W3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function H3(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let sr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=Il(l);if(!c)throw new Error("header name must be a non-empty string");const f=L.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=td(s))}const o=(s,l)=>L.forEach(s,(u,c)=>a(u,c,l));if(L.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(L.isString(t)&&(t=t.trim())&&!U3(t))o(B3(t),r);else if(L.isObject(t)&&L.isIterable(t)){let s={},l,u;for(const c of t){if(!L.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?L.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=Il(t),t){const n=L.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return z3(i);if(L.isFunction(r))return r.call(this,i,n);if(L.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Il(t),t){const n=L.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||qm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=Il(o),o){const s=L.findKey(n,o);s&&(!r||qm(n,n[s],s,r))&&(delete n[s],i=!0)}}return L.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||qm(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return L.forEach(this,(i,a)=>{const o=L.findKey(n,a);if(o){r[o]=td(i),delete r[a];return}const s=t?W3(a):String(a).trim();s!==a&&delete r[a],r[s]=td(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return L.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&L.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Z1]=this[Z1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Il(o);n[s]||(H3(i,o),n[s]=!0)}return L.isArray(t)?t.forEach(a):a(t),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(sr);function Vm(e,t){const r=this||Lc,n=t||r,i=sr.from(n.headers);let a=n.data;return L.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function ak(e){return!!(e&&e.__CANCEL__)}function cl(e,t,r){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(cl,fe,{__CANCEL__:!0});function ok(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new fe("Request failed with status code "+r.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function K3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function q3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=c,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const Md=(e,t,r=3)=>{let n=0;const i=q3(50,250);return V3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},eS=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tS=e=>(...t)=>L.asap(()=>e(...t)),G3=Rt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Rt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0,Y3=Rt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];L.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),L.isString(n)&&o.push("path="+n),L.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.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 X3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Q3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sk(e,t,r){let n=!X3(t);return e&&(n||r==!1)?Q3(e,t):t}const rS=e=>e instanceof sr?{...e}:e;function to(e,t){t=t||{};const r={};function n(u,c,f,d){return L.isPlainObject(u)&&L.isPlainObject(c)?L.merge.call({caseless:d},u,c):L.isPlainObject(c)?L.merge({},c):L.isArray(c)?c.slice():c}function i(u,c,f,d){if(L.isUndefined(c)){if(!L.isUndefined(u))return n(void 0,u,f,d)}else return n(u,c,f,d)}function a(u,c){if(!L.isUndefined(c))return n(void 0,c)}function o(u,c){if(L.isUndefined(c)){if(!L.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,f)=>i(rS(u),rS(c),f,!0)};return L.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);L.isUndefined(d)&&f!==s||(r[c]=d)}),r}const lk=e=>{const t=to({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=sr.from(o),t.url=rk(sk(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),L.isFormData(r)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(Rt.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&G3(t.url))){const l=i&&a&&Y3.read(a);l&&o.set(i,l)}return t},J3=typeof XMLHttpRequest<"u",Z3=J3&&function(e){return new Promise(function(r,n){const i=lk(e);let a=i.data;const o=sr.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const x=sr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:e,request:y};ok(function(P){r(P),m()},function(P){n(P),m()},w),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(n(new fe("Request aborted",fe.ECONNABORTED,e,y)),y=null)},y.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new fe(w,fe.ERR_NETWORK,e,y);O.event=S||null,n(O),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||nk;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new fe(S,w.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,y)),y=null},a===void 0&&o.setContentType(null),"setRequestHeader"in y&&L.forEach(o.toJSON(),function(S,w){y.setRequestHeader(w,S)}),L.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([d,v]=Md(u,!0),y.addEventListener("progress",d)),l&&y.upload&&([f,p]=Md(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=x=>{y&&(n(!x||x.type?new cl(null,e,y):x),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=K3(i.url);if(b&&Rt.protocols.indexOf(b)===-1){n(new fe("Unsupported protocol "+b+":",fe.ERR_BAD_REQUEST,e));return}y.send(a||null)})},eF=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof fe?c:new cl(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new fe(`timeout ${t} of ms exceeded`,fe.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>L.asap(s),l}},tF=function*(e,t){let r=e.byteLength;if(r{const i=rF(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let f=c.byteLength;if(r){let d=a+=f;r(d)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},iS=64*1024,{isFunction:bf}=L,iF=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:aS,TextEncoder:oS}=L.global,sS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},aF=e=>{e=L.merge.call({skipUndefined:!0},iF,e);const{fetch:t,Request:r,Response:n}=e,i=t?bf(t):typeof fetch=="function",a=bf(r),o=bf(n);if(!i)return!1;const s=i&&bf(aS),l=i&&(typeof oS=="function"?(v=>m=>v.encode(m))(new oS):async v=>new Uint8Array(await new r(v).arrayBuffer())),u=a&&s&&sS(()=>{let v=!1;const m=new r(Rt.origin,{body:new aS,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),c=o&&s&&sS(()=>L.isReadableStream(new n("").body)),f={stream:c&&(v=>v.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!f[v]&&(f[v]=(m,y)=>{let g=m&&m[v];if(g)return g.call(m);throw new fe(`Response type '${v}' is not supported`,fe.ERR_NOT_SUPPORT,y)})});const d=async v=>{if(v==null)return 0;if(L.isBlob(v))return v.size;if(L.isSpecCompliantForm(v))return(await new r(Rt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(L.isArrayBufferView(v)||L.isArrayBuffer(v))return v.byteLength;if(L.isURLSearchParams(v)&&(v=v+""),L.isString(v))return(await l(v)).byteLength},p=async(v,m)=>{const y=L.toFiniteNumber(v.getContentLength());return y??d(m)};return async v=>{let{url:m,method:y,data:g,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:P,headers:E,withCredentials:A="same-origin",fetchOptions:k}=lk(v),_=t||fetch;P=P?(P+"").toLowerCase():"text";let T=eF([b,x&&x.toAbortSignal()],S),I=null;const M=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let D;try{if(O&&u&&y!=="get"&&y!=="head"&&(D=await p(E,g))!==0){let V=new r(m,{method:"POST",body:g,duplex:"half"}),H;if(L.isFormData(g)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,ne]=eS(D,Md(tS(O)));g=nS(V.body,iS,Y,ne)}}L.isString(A)||(A=A?"include":"omit");const R=a&&"credentials"in r.prototype,z={...k,signal:T,method:y.toUpperCase(),headers:E.normalize().toJSON(),body:g,duplex:"half",credentials:R?A:void 0};I=a&&new r(m,z);let $=await(a?_(I,k):_(m,z));const F=c&&(P==="stream"||P==="response");if(c&&(w||F&&M)){const V={};["status","statusText","headers"].forEach(we=>{V[we]=$[we]});const H=L.toFiniteNumber($.headers.get("content-length")),[Y,ne]=w&&eS(H,Md(tS(w),!0))||[];$=new n(nS($.body,iS,Y,()=>{ne&&ne(),M&&M()}),V)}P=P||"text";let W=await f[L.findKey(f,P)||"text"]($,v);return!F&&M&&M(),await new Promise((V,H)=>{ok(V,H,{data:W,headers:sr.from($.headers),status:$.status,statusText:$.statusText,config:v,request:I})})}catch(R){throw M&&M(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new fe("Network Error",fe.ERR_NETWORK,v,I),{cause:R.cause||R}):fe.from(R,R&&R.code,v,I)}}},oF=new Map,uk=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,c=oF;for(;s--;)l=a[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:aF(t)),c=u;return u};uk();const tg={http:O3,xhr:Z3,fetch:{get:uk}};L.forEach(tg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const lS=e=>`- ${e}`,sF=e=>L.isFunction(e)||e===null||e===!1,ck={getAdapter:(e,t)=>{e=L.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : +`+o.map(lS).join(` +`):" "+lS(o[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:tg};function Gm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cl(null,e)}function uS(e){return Gm(e),e.headers=sr.from(e.headers),e.data=Vm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ck.getAdapter(e.adapter||Lc.adapter,e)(e).then(function(n){return Gm(e),n.data=Vm.call(e,e.transformResponse,n),n.headers=sr.from(n.headers),n},function(n){return ak(n)||(Gm(e),n&&n.response&&(n.response.data=Vm.call(e,e.transformResponse,n.response),n.response.headers=sr.from(n.response.headers))),Promise.reject(n)})}const fk="1.12.2",pp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pp[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const cS={};pp.transitional=function(t,r,n){function i(a,o){return"[Axios v"+fk+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new fe(i(o," has been removed"+(r?" in "+r:"")),fe.ERR_DEPRECATED);return r&&!cS[o]&&(cS[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};pp.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function lF(e,t,r){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new fe("option "+a+" must be "+l,fe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new fe("Unknown option "+a,fe.ERR_BAD_OPTION)}}const rd={assertOptions:lF,validators:pp},pn=rd.validators;let Wa=class{constructor(t){this.defaults=t||{},this.interceptors={request:new J1,response:new J1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=to(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&rd.assertOptions(n,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean)},!1),i!=null&&(L.isFunction(i)?r.paramsSerializer={serialize:i}:rd.assertOptions(i,{encode:pn.function,serialize:pn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),rd.assertOptions(r,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&L.merge(a.common,a[r.method]);a&&L.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),r.headers=sr.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){const v=[uS.bind(this),void 0];for(v.unshift(...s),v.push(...u),d=v.length,c=Promise.resolve(r);f{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new cl(a,o,s),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new dk(function(i){t=i}),cancel:t}}};function cF(e){return function(r){return e.apply(null,r)}}function fF(e){return L.isObject(e)&&e.isAxiosError===!0}const rg={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(rg).forEach(([e,t])=>{rg[t]=e});function hk(e){const t=new Wa(e),r=HT(Wa.prototype.request,t);return L.extend(r,Wa.prototype,t,{allOwnKeys:!0}),L.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return hk(to(e,i))},r}const tt=hk(Lc);tt.Axios=Wa;tt.CanceledError=cl;tt.CancelToken=uF;tt.isCancel=ak;tt.VERSION=fk;tt.toFormData=hp;tt.AxiosError=fe;tt.Cancel=tt.CanceledError;tt.all=function(t){return Promise.all(t)};tt.spread=cF;tt.isAxiosError=fF;tt.mergeConfig=to;tt.AxiosHeaders=sr;tt.formToJSON=e=>ik(L.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=ck.getAdapter;tt.HttpStatusCode=rg;tt.default=tt;const{Axios:Zhe,AxiosError:epe,CanceledError:tpe,isCancel:rpe,CancelToken:npe,VERSION:ipe,all:ape,Cancel:ope,isAxiosError:spe,spread:lpe,toFormData:upe,AxiosHeaders:cpe,HttpStatusCode:fpe,formToJSON:dpe,getAdapter:hpe,mergeConfig:ppe}=tt,dF="/graphql";async function Ft(e,t){try{const r=await tt.post(dF,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw tt.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}async function hF(e,t){return Ft(e,t)}const lr={listTeams:` + query ListTeams($userId: ID!) { + teams(userId: $userId) { + id + name + description + meta + createdAt + updatedAt + } + } + `,getUser:` + query GetUser($id: ID!) { + user(id: $id) { + id + username + email + avatarUrl + meta + createdAt + updatedAt + } + } + `,getTeam:` + query GetTeam($id: ID!) { + team(id: $id) { + id + name + description + meta + createdAt + updatedAt + totalExperiments + totalRuns + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + } + } + `,getTeamWithExperiments:` + query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { + team(id: $id) { + id + name + expsByTimeframe(startTime: $startTime, endTime: $endTime) { + id + teamId + userId + name + status + createdAt + } + } + } + `,getTeamWithLabelKeys:` + query GetTeamWithLabelKeys($id: ID!) { + team(id: $id) { + id + labelKeys + } + } + `,listExperiments:` + query ListExperiments($teamId: ID!, $labelName: String, $labelValue: String, $page: Int, $pageSize: Int) { + experiments(teamId: $teamId, labelName: $labelName, labelValue: $labelValue, page: $page, pageSize: $pageSize) { + id + teamId + userId + name + description + kind + meta + params + labels { + name + value + } + duration + status + createdAt + updatedAt + } + } + `,getExperiment:` + query GetExperiment($id: ID!) { + experiment(id: $id) { + id + teamId + userId + name + description + kind + meta + params + labels { + name + value + } + duration + status + createdAt + updatedAt + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + metrics { + id + key + value + teamId + experimentId + runId + createdAt + } + } + } + `,listRuns:` + query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { + runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { + id + teamId + userId + experimentId + meta + duration + status + createdAt + } + } + `,getRun:` + query GetRun($id: ID!) { + run(id: $id) { + id + teamId + userId + experimentId + meta + duration + status + createdAt + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + metrics { + id + key + value + teamId + experimentId + runId + createdAt + } + spans { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + semanticKind + serviceName + duration + statusCode + statusMessage + teamId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + } + `,listArtifactRepositories:` + query ListArtifactRepositories { + artifactRepos { + name + } + } + `,listArtifactTags:` + query ListArtifactTags($team_id: ID!, $repo_name: String!) { + artifactTags(teamId: $team_id, repoName: $repo_name) { + name + } + } + `,getArtifactContent:` + query GetArtifactContent($team_id: ID!, $tag: String!, $repo_name: String!) { + artifactContent(teamId: $team_id, tag: $tag, repoName: $repo_name) { + filename + content + contentType + } + } + `,listTraces:` + query ListTraces($runId: ID!) { + traces(runId: $runId) { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + semanticKind + serviceName + duration + statusCode + statusMessage + teamId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + `,getDailyTokenUsage:` + query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { + dailyTokenUsage(teamId: $teamId, days: $days) { + date + totalTokens + inputTokens + outputTokens + } + } + `},pF={deleteExperiments:` + mutation DeleteExperiments($experimentIds: [ID!]!) { + deleteExperiments(experimentIds: $experimentIds) + } + `},pk=j.createContext(null);function mF({user:e,children:t}){const[r,n]=j.useState(e),i=a=>{n(o=>({...o,...a}))};return h.jsx(pk.Provider,{value:{user:r,updateUser:i},children:t})}function Xb(){const e=j.useContext(pk);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),fS=e=>{const t=yF(e);return t.charAt(0).toUpperCase()+t.slice(1)},mk=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),gF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var bF={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"};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xF=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>j.createElement("svg",{ref:l,...bF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:mk("lucide",i),...!a&&!gF(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>j.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Le=(e,t)=>{const r=j.forwardRef(({className:n,...i},a)=>j.createElement(xF,{ref:a,iconNode:t,className:mk(`lucide-${vF(fS(e))}`,`lucide-${e}`,n),...i}));return r.displayName=fS(e),r};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wF=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],SF=Le("bot",wF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],dS=Le("building-2",OF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vk=Le("check",PF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mp=Le("chevron-down",jF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qb=Le("chevron-right",EF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_F=Le("chevron-left",AF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ng=Le("clock",TF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kF=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],NF=Le("coins",kF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CF=[["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"}]],yk=Le("copy",CF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $F=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Jb=Le("database",$F);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MF=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],IF=Le("download",MF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Zb=Le("eye",DF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gk=Le("file-text",RF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],bk=Le("flask-conical",LF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],BF=Le("git-branch",FF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],UF=Le("github",zF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WF=[["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"}]],HF=Le("globe",WF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qF=Le("info",KF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VF=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],GF=Le("layout-dashboard",VF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],rs=Le("package",YF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XF=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],QF=Le("play",XF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fu=Le("search",JF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZF=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],hS=Le("trash-2",ZF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e5=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],pS=Le("user",e5);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Id=Le("x",t5);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r5=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],n5=Le("zap",r5);function xk(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),wk=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Dd="-",mS=[],o5="arbitrary..",s5=e=>{const t=u5(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return l5(o);const s=o.split(Dd),l=s[0]===""&&s.length>1?1:0;return Sk(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?i5(u,l):l:u||mS}return r[o]||mS}}},Sk=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=Sk(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Dd):e.slice(t).join(Dd),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?o5+n:void 0})(),u5=e=>{const{theme:t,classGroups:r}=e;return c5(r,t)},c5=(e,t)=>{const r=wk();for(const n in e){const i=e[n];ex(i,r,n,t)}return r},ex=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){d5(e,t,r);return}if(typeof e=="function"){h5(e,t,r,n);return}p5(e,t,r,n)},d5=(e,t,r)=>{const n=e===""?t:Ok(t,e);n.classGroupId=r},h5=(e,t,r,n)=>{if(m5(e)){ex(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(a5(r,e))},p5=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Dd),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,v5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},ig="!",vS=":",y5=[],yS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),g5=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const c=i.length;for(let m=0;ml?u-l:void 0;return yS(a,p,d,v)};if(t){const i=t+vS,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):yS(y5,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},b5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},x5=e=>({cache:v5(e.cacheSize),parseClassName:g5(e),sortModifiers:b5(e),...s5(e)}),w5=/\s+/,S5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(w5);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=r(c);if(f){l=c+(l.length>0?" "+l:l);continue}let y=!!m,g=n(y?v.substring(0,m):v);if(!g){if(!y){l=c+(l.length>0?" "+l:l);continue}if(g=n(v),!g){l=c+(l.length>0?" "+l:l);continue}y=!1}const b=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=p?b+ig:b,S=x+g;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(g,y);for(let O=0;O0?" "+l:l)}return l},O5=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((c,f)=>f(c),e());return r=x5(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const c=S5(l,r);return i(l,c),c};return a=o,(...l)=>a(O5(...l))},j5=[],ut=e=>{const t=r=>r[e]||j5;return t.isThemeGetter=!0,t},jk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ek=/^\((?:(\w[\w-]*):)?(.+)\)$/i,E5=/^\d+\/\d+$/,A5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_5=/\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$/,T5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,k5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>E5.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),Ym=e=>e.endsWith("%")&&he(e.slice(0,-1)),Nn=e=>A5.test(e),C5=()=>!0,$5=e=>_5.test(e)&&!T5.test(e),Ak=()=>!1,M5=e=>k5.test(e),I5=e=>N5.test(e),D5=e=>!Z(e)&&!ee(e),R5=e=>fl(e,kk,Ak),Z=e=>jk.test(e),da=e=>fl(e,Nk,$5),Xm=e=>fl(e,U5,he),gS=e=>fl(e,_k,Ak),L5=e=>fl(e,Tk,I5),xf=e=>fl(e,Ck,M5),ee=e=>Ek.test(e),Dl=e=>dl(e,Nk),F5=e=>dl(e,W5),bS=e=>dl(e,_k),B5=e=>dl(e,kk),z5=e=>dl(e,Tk),wf=e=>dl(e,Ck,!0),fl=(e,t,r)=>{const n=jk.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},dl=(e,t,r=!1)=>{const n=Ek.exec(e);return n?n[1]?t(n[1]):r:!1},_k=e=>e==="position"||e==="percentage",Tk=e=>e==="image"||e==="url",kk=e=>e==="length"||e==="size"||e==="bg-size",Nk=e=>e==="length",U5=e=>e==="number",W5=e=>e==="family-name",Ck=e=>e==="shadow",H5=()=>{const e=ut("color"),t=ut("font"),r=ut("text"),n=ut("font-weight"),i=ut("tracking"),a=ut("leading"),o=ut("breakpoint"),s=ut("container"),l=ut("spacing"),u=ut("radius"),c=ut("shadow"),f=ut("inset-shadow"),d=ut("text-shadow"),p=ut("drop-shadow"),v=ut("blur"),m=ut("perspective"),y=ut("aspect"),g=ut("ease"),b=ut("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],E=()=>[ee,Z,l],A=()=>[Po,"full","auto",...E()],k=()=>[pi,"none","subgrid",ee,Z],_=()=>["auto",{span:["full",pi,ee,Z]},pi,ee,Z],T=()=>[pi,"auto",ee,Z],I=()=>["auto","min","max","fr",ee,Z],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...E()],z=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],$=()=>[e,ee,Z],F=()=>[...S(),bS,gS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",B5,R5,{size:[ee,Z]}],H=()=>[Ym,Dl,da],Y=()=>["","none","full",u,ee,Z],ne=()=>["",he,Dl,da],we=()=>["solid","dashed","dotted","double"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[he,Ym,bS,gS],Ot=()=>["","none",v,ee,Z],G=()=>["none",he,ee,Z],se=()=>["none",he,ee,Z],le=()=>[he,ee,Z],U=()=>[Po,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nn],breakpoint:[Nn],color:[C5],container:[Nn],"drop-shadow":[Nn],ease:["in","out","in-out"],font:[D5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nn],shadow:[Nn],spacing:["px",he],text:[Nn],"text-shadow":[Nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,Z,ee,y]}],container:["container"],columns:[{columns:[he,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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"],sr:["sr-only","not-sr-only"],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:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",ee,Z]}],basis:[{basis:[Po,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,Po,"auto","initial","none",Z]}],grow:[{grow:["",he,ee,Z]}],shrink:[{shrink:["",he,ee,Z]}],order:[{order:[pi,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Dl,da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,Xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ym,Z]}],"font-family":[{font:[F5,Z,t]}],"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:[i,ee,Z]}],"line-clamp":[{"line-clamp":[he,"none",ee,Xm]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",ee,da]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[he,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,ee,Z],radial:["",ee,Z],conic:[pi,ee,Z]},z5,L5]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,ee,Z]}],"outline-w":[{outline:["",he,Dl,da]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",c,wf,xf]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,wf,xf]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[he,da]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",d,wf,xf]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[he,ee,Z]}],"mix-blend":[{"mix-blend":[...We(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":We()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:Ot()}],brightness:[{brightness:[he,ee,Z]}],contrast:[{contrast:[he,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",p,wf,xf]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",he,ee,Z]}],"hue-rotate":[{"hue-rotate":[he,ee,Z]}],invert:[{invert:["",he,ee,Z]}],saturate:[{saturate:[he,ee,Z]}],sepia:[{sepia:["",he,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":Ot()}],"backdrop-brightness":[{"backdrop-brightness":[he,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[he,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",he,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[he,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[he,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",he,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",ee,Z]}],ease:[{ease:["linear","initial",g,ee,Z]}],delay:[{delay:[he,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ee,Z]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[he,Dl,da,Xm]}],stroke:[{stroke:["none",...$()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},K5=P5(H5);function ue(...e){return K5(ce(e))}const q5="/static/assets/logo-D6hHn9pX.png",V5=[{title:"Dashboard",href:"/",icon:GF},{title:"Experiments",href:"/experiments",icon:bk},{title:"Artifacts",href:"/artifacts",icon:rs}];function G5(){const e=po(),t=Xb(),[r,n]=j.useState(!1);return h.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[h.jsxs(eo,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[h.jsx("img",{src:q5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),h.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),h.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:V5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/experiments"&&(o=o||e.pathname.startsWith("/runs")),h.jsxs(eo,{to:i.href,className:ue("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),h.jsx(a,{className:ue("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),h.jsxs("div",{className:"relative p-3 mt-auto",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[h.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:h.jsx(pS,{className:"h-3.5 w-3.5"})})}),h.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[h.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:h.jsx(UF,{className:"h-3.5 w-3.5"})}),h.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),h.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):h.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:h.jsx(pS,{className:"h-6 w-6"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),h.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function Y5(e=0,t=100){const r=Xb();return Or({queryKey:["teams",r.id,e,t],queryFn:async()=>(await Ft(lr.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function tx(e){return Or({queryKey:["team",e],queryFn:async()=>(await Ft(lr.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const ur=j.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return h.jsx("button",{className:ue("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});ur.displayName="Button";function Ve({className:e,...t}){return h.jsx("div",{className:ue("animate-pulse rounded-md bg-muted",e),...t})}function X5(){const e=Kb(),{data:t,isLoading:r}=Y5(),{selectedTeamId:n,setSelectedTeamId:i}=ll(),a=Xb(),[o,s]=j.useState(!1),[l,u]=j.useState(null),c=(d,p)=>{p.stopPropagation(),navigator.clipboard.writeText(d),u(d),setTimeout(()=>u(null),2e3)};if(r)return h.jsx(Ve,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return h.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[h.jsx(dS,{className:"h-4 w-4"}),"No teams available"]});const f=t.find(d=>d.id===n);return h.jsxs("div",{className:"relative",children:[h.jsxs(ur,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[h.jsx(dS,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs font-medium",children:(f==null?void 0:f.name)||"Select team"}),h.jsx(mp,{className:ue("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),h.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-64 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-1.5",children:t.map((d,p)=>{const v=d.id===n,m=l===d.id;return h.jsxs("button",{onClick:()=>{i(d.id,a.id),s(!1),e("/")},className:ue("flex w-full items-start justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",v?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[h.jsxs("div",{className:"flex-1 text-left min-w-0",children:[h.jsx("div",{className:"text-xs font-medium break-words",children:d.name||"Unnamed Team"}),h.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[h.jsx("span",{className:"text-[10px] font-mono text-muted-foreground truncate",children:d.id}),h.jsx("button",{onClick:y=>c(d.id,y),className:"flex-shrink-0 p-0.5 hover:bg-accent rounded transition-colors",title:m?"Copied!":"Copy Team ID",children:h.jsx(yk,{className:ue("h-3 w-3",m?"text-green-600":"text-muted-foreground")})})]})]}),v&&h.jsx(vk,{className:"h-3 w-3 flex-shrink-0 text-primary mt-0.5"})]},d.id)})})})]})]})}function $k(e,t){const{page:r=0,pageSize:n=100,labelName:i,labelValue:a,enabled:o=!0}=t||{};return Or({queryKey:["experiments",e,i,a,r,n],queryFn:async()=>(await Ft(lr.listExperiments,{teamId:e,labelName:i,labelValue:a,page:r,pageSize:n})).experiments,enabled:o&&!!e,refetchInterval:s=>{const l=s.state.data;if(!l)return!1;const u=l.map(c=>c.status);return qb(u)}})}function vp(e,t){const{enabled:r=!0}=t||{};return Or({queryKey:["experiment",e],queryFn:async()=>(await Ft(lr.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?qb([i.status]):!1}})}function Q5(e){return Or({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await Ft(lr.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return qb(n)}})}function ag(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Or({queryKey:["runs",e,r,n],queryFn:async()=>(await Ft(lr.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return UT(s)}})}function Mk(e,t){const{enabled:r=!0}=t||{};return Or({queryKey:["run",e],queryFn:async()=>(await Ft(lr.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?UT([i.status]):!1}})}function Qm(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function J5(){const e=po(),t=e.pathname.split("/").filter(Boolean),r=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,n=t[0]==="runs"&&t[1]?t[1]:void 0,{data:i}=vp(r||"",{enabled:!!r}),{data:a}=Mk(n||"",{enabled:!!n}),s=(()=>{const l=e.pathname.split("/").filter(Boolean);if(l.length===0)return[{label:"Home"}];const u=[{label:"Home",href:"/"}];return l[0]==="experiments"?r&&i?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Qm(i.id),href:l.length===2?void 0:`/experiments/${i.id}`})):u.push({label:"Experiments",href:void 0}):l[0]==="runs"?n&&a?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Qm(a.experimentId),href:`/experiments/${a.experimentId}`}),u.push({label:"Runs",href:`/experiments/${a.experimentId}`}),u.push({label:Qm(a.id),href:void 0})):u.push({label:"Runs",href:void 0}):l.forEach((c,f)=>{const d="/"+l.slice(0,f+1).join("/"),p=f===l.length-1,v=c.charAt(0).toUpperCase()+c.slice(1);u.push({label:v,href:p?void 0:d})}),u})();return h.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[h.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:s.map((l,u)=>{const c=u===s.length-1;return h.jsxs("div",{className:"flex items-center",children:[u>0&&h.jsx(Qb,{className:"mx-2 h-4 w-4 text-muted-foreground"}),l.href&&!c?h.jsx(eo,{to:l.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.label}):h.jsx("span",{className:"text-foreground font-medium",children:l.label})]},u)})}),h.jsx(X5,{})]})}function Z5(){return h.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(G5,{})}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(J5,{})}),h.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:h.jsx(bL,{})})]})]})}function Rd(e){"@babel/helpers - typeof";return Rd=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},Rd(e)}function on(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ae(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Te(e){Ae(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Rd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function e4(e,t){Ae(2,arguments);var r=Te(e),n=on(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function t4(e,t){Ae(2,arguments);var r=Te(e),n=on(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function r4(e,t){Ae(2,arguments);var r=Te(e).getTime(),n=on(t);return new Date(r+n)}var n4={};function Fc(){return n4}function og(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function sg(e){Ae(1,arguments);var t=Te(e);return t.setHours(0,0,0,0),t}function nd(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function i4(e){return Ae(1,arguments),e instanceof Date||Rd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function a4(e){if(Ae(1,arguments),!i4(e)&&typeof e!="number")return!1;var t=Te(e);return!isNaN(Number(t))}function o4(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function s4(e,t){return Ae(2,arguments),Te(e).getTime()-Te(t).getTime()}var l4={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},u4="trunc";function c4(e){return l4[u4]}function f4(e){Ae(1,arguments);var t=Te(e);return t.setHours(23,59,59,999),t}function d4(e){Ae(1,arguments);var t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function h4(e){Ae(1,arguments);var t=Te(e);return f4(t).getTime()===d4(t).getTime()}function p4(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=nd(r,n),a=Math.abs(o4(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=nd(r,n)===-i;h4(Te(e))&&a===1&&nd(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function m4(e,t,r){Ae(2,arguments);var n=s4(e,t)/1e3;return c4()(n)}function v4(e,t){Ae(2,arguments);var r=on(t);return r4(e,-r)}var y4=864e5;function g4(e){Ae(1,arguments);var t=Te(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/y4)+1}function Ld(e){Ae(1,arguments);var t=1,r=Te(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function b4(e){Ae(1,arguments);var t=Ik(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ld(r);return n}var x4=6048e5;function w4(e){Ae(1,arguments);var t=Te(e),r=Ld(t).getTime()-b4(t).getTime();return Math.round(r/x4)+1}function Fd(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Fc(),f=on((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Te(e),p=d.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var m=Fd(v,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var g=Fd(y,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=g.getTime()?f:f-1}function S4(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Fc(),f=on((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=Dk(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var v=Fd(p,t);return v}var O4=6048e5;function P4(e,t){Ae(1,arguments);var r=Te(e),n=Fd(r,t).getTime()-S4(r,t).getTime();return Math.round(n/O4)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){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:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},j4={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return mi.y(t,r)},Y:function(t,r,n,i){var a=Dk(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=Ik(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return mi.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=P4(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=w4(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):mi.d(t,r)},D:function(t,r,n){var i=g4(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":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"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=jo.noon:i===0?a=jo.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=jo.evening:i>=12?a=jo.afternoon:i>=4?a=jo.morning:a=jo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return mi.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):mi.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):mi.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):mi.s(t,r)},S:function(t,r){return mi.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wS(o);case"XXXX":case"XX":return ga(o);case"XXXXX":case"XXX":default:return ga(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return wS(o);case"xxxx":case"xx":return ga(o);case"xxxxx":case"xxx":default:return ga(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+xS(o,":");case"OOOO":default:return"GMT"+ga(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+xS(o,":");case"zzzz":default:return"GMT"+ga(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function xS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function wS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return ga(e,t)}function ga(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var SS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Rk=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},E4=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return SS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",SS(i,r)).replace("{{time}}",Rk(a,r))},A4={p:Rk,P:E4},_4=["D","DD"],T4=["YY","YYYY"];function k4(e){return _4.indexOf(e)!==-1}function N4(e){return T4.indexOf(e)!==-1}function OS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var C4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$4=function(t,r,n){var i,a=C4[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Jm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var M4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},I4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},D4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R4={date:Jm({formats:M4,defaultWidth:"full"}),time:Jm({formats:I4,defaultWidth:"full"}),dateTime:Jm({formats:D4,defaultWidth:"full"})},L4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F4=function(t,r,n,i){return L4[t]};function Rl(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var B4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},U4={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"]},W4={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"]},H4={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"}},K4={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"}},q4=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},V4={ordinalNumber:q4,era:Rl({values:B4,defaultWidth:"wide"}),quarter:Rl({values:z4,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Rl({values:U4,defaultWidth:"wide"}),day:Rl({values:W4,defaultWidth:"wide"}),dayPeriod:Rl({values:H4,defaultWidth:"wide",formattingValues:K4,defaultFormattingWidth:"wide"})};function Ll(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Y4(s,function(f){return f.test(o)}):G4(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function G4(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function Y4(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var Q4=/^(\d+)(th|st|nd|rd)?/i,J4=/\d+/i,Z4={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},eB={any:[/^b/i,/^(a|c)/i]},tB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rB={any:[/1/i,/2/i,/3/i,/4/i]},nB={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},iB={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]},aB={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},oB={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]},sB={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},lB={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}},uB={ordinalNumber:X4({matchPattern:Q4,parsePattern:J4,valueCallback:function(t){return parseInt(t,10)}}),era:Ll({matchPatterns:Z4,defaultMatchWidth:"wide",parsePatterns:eB,defaultParseWidth:"any"}),quarter:Ll({matchPatterns:tB,defaultMatchWidth:"wide",parsePatterns:rB,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ll({matchPatterns:nB,defaultMatchWidth:"wide",parsePatterns:iB,defaultParseWidth:"any"}),day:Ll({matchPatterns:aB,defaultMatchWidth:"wide",parsePatterns:oB,defaultParseWidth:"any"}),dayPeriod:Ll({matchPatterns:sB,defaultMatchWidth:"any",parsePatterns:lB,defaultParseWidth:"any"})},Lk={code:"en-US",formatDistance:$4,formatLong:R4,formatRelative:F4,localize:V4,match:uB,options:{weekStartsOn:0,firstWeekContainsDate:1}},cB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dB=/^'([^]*?)'?$/,hB=/''/g,pB=/[a-zA-Z]/;function Yi(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,v,m,y;Ae(2,arguments);var g=String(t),b=Fc(),x=(n=(i=void 0)!==null&&i!==void 0?i:b.locale)!==null&&n!==void 0?n:Lk,S=on((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(u=b.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=on((f=(d=(p=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&p!==void 0?p:b.weekStartsOn)!==null&&d!==void 0?d:(m=b.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Te(e);if(!a4(O))throw new RangeError("Invalid time value");var P=og(O),E=v4(O,P),A={firstWeekContainsDate:S,weekStartsOn:w,locale:x,_originalDate:O},k=g.match(fB).map(function(_){var T=_[0];if(T==="p"||T==="P"){var I=A4[T];return I(_,x.formatLong)}return _}).join("").match(cB).map(function(_){if(_==="''")return"'";var T=_[0];if(T==="'")return mB(_);var I=j4[T];if(I)return N4(_)&&OS(_,t,String(e)),k4(_)&&OS(_,t,String(e)),I(E,_,x.localize,A);if(T.match(pB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return _}).join("");return k}function mB(e){var t=e.match(dB);return t?t[1].replace(hB,"'"):e}function Fk(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function vB(e){return Fk({},e)}var PS=1440,yB=2520,Zm=43200,gB=86400;function bB(e,t,r){var n,i;Ae(2,arguments);var a=Fc(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:Lk;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=nd(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=Fk(vB(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=Te(t),c=Te(e)):(u=Te(e),c=Te(t));var f=m4(c,u),d=(og(c)-og(u))/1e3,p=Math.round((f-d)/60),v;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p{const n=new Date,i=lg(n,3);return(await Ft(lr.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.expsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}function wB(e,t=30){return Or({queryKey:["dailyTokenUsage",e,t],queryFn:async()=>(await Ft(lr.getDailyTokenUsage,{teamId:e,days:t})).dailyTokenUsage,enabled:!!e,staleTime:5*60*1e3})}const SB=` + query GetModelDistributions($teamId: ID!) { + team(id: $teamId) { + id + modelDistributions { + model + count + } + } + } +`;function OB(e){return Or({queryKey:["model-distributions",e],queryFn:async()=>{var r;return e?((r=(await Ft(SB,{teamId:e})).team)==null?void 0:r.modelDistributions)||[]:[]},enabled:!!e,staleTime:5*60*1e3})}const ge=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ge.displayName="Card";const Dr=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));Dr.displayName="CardHeader";const Rr=j.forwardRef(({className:e,...t},r)=>h.jsx("h3",{ref:r,className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t}));Rr.displayName="CardTitle";const sn=j.forwardRef(({className:e,...t},r)=>h.jsx("p",{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));sn.displayName="CardDescription";const be=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:ue("p-6 pt-0",e),...t}));be.displayName="CardContent";const PB=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:ue("flex items-center p-6 pt-0",e),...t}));PB.displayName="CardFooter";var jB=Array.isArray,fr=jB,EB=typeof Zc=="object"&&Zc&&Zc.Object===Object&&Zc,Bk=EB,AB=Bk,_B=typeof self=="object"&&self&&self.Object===Object&&self,TB=AB||_B||Function("return this")(),Tn=TB,kB=Tn,NB=kB.Symbol,Bc=NB,jS=Bc,zk=Object.prototype,CB=zk.hasOwnProperty,$B=zk.toString,Fl=jS?jS.toStringTag:void 0;function MB(e){var t=CB.call(e,Fl),r=e[Fl];try{e[Fl]=void 0;var n=!0}catch{}var i=$B.call(e);return n&&(t?e[Fl]=r:delete e[Fl]),i}var IB=MB,DB=Object.prototype,RB=DB.toString;function LB(e){return RB.call(e)}var FB=LB,ES=Bc,BB=IB,zB=FB,UB="[object Null]",WB="[object Undefined]",AS=ES?ES.toStringTag:void 0;function HB(e){return e==null?e===void 0?WB:UB:AS&&AS in Object(e)?BB(e):zB(e)}var li=HB;function KB(e){return e!=null&&typeof e=="object"}var ui=KB,qB=li,VB=ui,GB="[object Symbol]";function YB(e){return typeof e=="symbol"||VB(e)&&qB(e)==GB}var hl=YB,XB=fr,QB=hl,JB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZB=/^\w*$/;function ez(e,t){if(XB(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||QB(e)?!0:ZB.test(e)||!JB.test(e)||t!=null&&e in Object(t)}var nx=ez;function tz(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var aa=tz;const pl=Ee(aa);var rz=li,nz=aa,iz="[object AsyncFunction]",az="[object Function]",oz="[object GeneratorFunction]",sz="[object Proxy]";function lz(e){if(!nz(e))return!1;var t=rz(e);return t==az||t==oz||t==iz||t==sz}var ix=lz;const oe=Ee(ix);var uz=Tn,cz=uz["__core-js_shared__"],fz=cz,ev=fz,_S=function(){var e=/[^.]+$/.exec(ev&&ev.keys&&ev.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dz(e){return!!_S&&_S in e}var hz=dz,pz=Function.prototype,mz=pz.toString;function vz(e){if(e!=null){try{return mz.call(e)}catch{}try{return e+""}catch{}}return""}var Uk=vz,yz=ix,gz=hz,bz=aa,xz=Uk,wz=/[\\^$.*+?()[\]{}|]/g,Sz=/^\[object .+?Constructor\]$/,Oz=Function.prototype,Pz=Object.prototype,jz=Oz.toString,Ez=Pz.hasOwnProperty,Az=RegExp("^"+jz.call(Ez).replace(wz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _z(e){if(!bz(e)||gz(e))return!1;var t=yz(e)?Az:Sz;return t.test(xz(e))}var Tz=_z;function kz(e,t){return e==null?void 0:e[t]}var Nz=kz,Cz=Tz,$z=Nz;function Mz(e,t){var r=$z(e,t);return Cz(r)?r:void 0}var mo=Mz,Iz=mo,Dz=Iz(Object,"create"),yp=Dz,TS=yp;function Rz(){this.__data__=TS?TS(null):{},this.size=0}var Lz=Rz;function Fz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Bz=Fz,zz=yp,Uz="__lodash_hash_undefined__",Wz=Object.prototype,Hz=Wz.hasOwnProperty;function Kz(e){var t=this.__data__;if(zz){var r=t[e];return r===Uz?void 0:r}return Hz.call(t,e)?t[e]:void 0}var qz=Kz,Vz=yp,Gz=Object.prototype,Yz=Gz.hasOwnProperty;function Xz(e){var t=this.__data__;return Vz?t[e]!==void 0:Yz.call(t,e)}var Qz=Xz,Jz=yp,Zz="__lodash_hash_undefined__";function eU(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Jz&&t===void 0?Zz:t,this}var tU=eU,rU=Lz,nU=Bz,iU=qz,aU=Qz,oU=tU;function ml(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var OU=SU,PU=gp;function jU(e,t){var r=this.__data__,n=PU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var EU=jU,AU=uU,_U=yU,TU=xU,kU=OU,NU=EU;function vl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},_a=function(t){return ro(t)&&t.indexOf("%")===t.length-1},q=function(t){return Q8(t)&&!zc(t)},t6=function(t){return ae(t)},mt=function(t){return q(t)||ro(t)},r6=0,vo=function(t){var r=++r6;return"".concat(t||"").concat(r)},Kt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!ro(t))return n;var a;if(_a(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return zc(a)&&(a=n),i&&a>r&&(a=r),a},Pi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},n6=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}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)}var DS={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"},Vn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},RS=null,rv=null,px=function e(t){if(t===RS&&Array.isArray(rv))return rv;var r=[];return j.Children.forEach(t,function(n){ae(n)||(q8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),rv=r,RS=t,r};function Gt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Vn(i)}):n=[Vn(t)],px(e).forEach(function(i){var a=br(i,"type.displayName")||br(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function mr(e,t){var r=Gt(e,t);return r&&r[0]}var LS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},d6=["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"],h6=function(t){return t&&t.type&&ro(t.type)&&d6.indexOf(t.type)>=0},p6=function(t){return t&&cg(t)==="object"&&"clipDot"in t},m6=function(t,r,n,i){var a,o=(a=tv==null?void 0:tv[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||s6.includes(r))||n&&hx.includes(r)},re=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!pl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;m6((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},fg=function e(t,r){if(t===r)return!0;var n=j.Children.count(t);if(n!==j.Children.count(r))return!1;if(n===0)return!0;if(n===1)return FS(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function x6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hg(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=b6(e,g6),c=i||{width:r,height:n,x:0,y:0},f=ce("recharts-surface",a);return N.createElement("svg",dg({},re(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),N.createElement("title",null,s),N.createElement("desc",null,l),t)}var w6=["children","className"];function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function O6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var pe=N.forwardRef(function(e,t){var r=e.children,n=e.className,i=S6(e,w6),a=ce("recharts-layer",n);return N.createElement("g",pg({className:a},re(i,!0),{ref:t}),r)}),nn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:E6(e,t,r)}var _6=A6,T6="\\ud800-\\udfff",k6="\\u0300-\\u036f",N6="\\ufe20-\\ufe2f",C6="\\u20d0-\\u20ff",$6=k6+N6+C6,M6="\\ufe0e\\ufe0f",I6="\\u200d",D6=RegExp("["+I6+T6+$6+M6+"]");function R6(e){return D6.test(e)}var Jk=R6;function L6(e){return e.split("")}var F6=L6,Zk="\\ud800-\\udfff",B6="\\u0300-\\u036f",z6="\\ufe20-\\ufe2f",U6="\\u20d0-\\u20ff",W6=B6+z6+U6,H6="\\ufe0e\\ufe0f",K6="["+Zk+"]",mg="["+W6+"]",vg="\\ud83c[\\udffb-\\udfff]",q6="(?:"+mg+"|"+vg+")",eN="[^"+Zk+"]",tN="(?:\\ud83c[\\udde6-\\uddff]){2}",rN="[\\ud800-\\udbff][\\udc00-\\udfff]",V6="\\u200d",nN=q6+"?",iN="["+H6+"]?",G6="(?:"+V6+"(?:"+[eN,tN,rN].join("|")+")"+iN+nN+")*",Y6=iN+nN+G6,X6="(?:"+[eN+mg+"?",mg,tN,rN,K6].join("|")+")",Q6=RegExp(vg+"(?="+vg+")|"+X6+Y6,"g");function J6(e){return e.match(Q6)||[]}var Z6=J6,eW=F6,tW=Jk,rW=Z6;function nW(e){return tW(e)?rW(e):eW(e)}var iW=nW,aW=_6,oW=Jk,sW=iW,lW=qk;function uW(e){return function(t){t=lW(t);var r=oW(t)?sW(t):void 0,n=r?r[0]:t.charAt(0),i=r?aW(r,1).join(""):t.slice(1);return n[e]()+i}}var cW=uW,fW=cW,dW=fW("toUpperCase"),hW=dW;const Cp=Ee(hW);function Ie(e){return function(){return e}}const aN=Math.cos,Ud=Math.sin,cn=Math.sqrt,Wd=Math.PI,$p=2*Wd,yg=Math.PI,gg=2*yg,ba=1e-6,pW=gg-ba;function oN(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return oN;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iba)if(!(Math.abs(f*l-u*c)>ba)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-s,m=l*l+u*u,y=p*p+v*v,g=Math.sqrt(m),b=Math.sqrt(d),x=a*Math.tan((yg-Math.acos((m+d-y)/(2*g*b)))/2),S=x/b,w=x/g;Math.abs(S-1)>ba&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>c*v)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ba||Math.abs(this._y1-c)>ba)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%gg+gg),d>pW?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>ba&&this._append`A${n},${n},0,${+(d>=yg)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function mx(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new vW(t)}function vx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function sN(e){this._context=e}sN.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 Mp(e){return new sN(e)}function lN(e){return e[0]}function uN(e){return e[1]}function cN(e,t){var r=Ie(!0),n=null,i=Mp,a=null,o=mx(s);e=typeof e=="function"?e:e===void 0?lN:Ie(e),t=typeof t=="function"?t:t===void 0?uN:Ie(t);function s(l){var u,c=(l=vx(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=c;++u)!(u=p;--v)s.point(x[v],S[v]);s.lineEnd(),s.areaEnd()}g&&(x[d]=+e(y,d,f),S[d]=+t(y,d,f),s.point(n?+n(y,d,f):x[d],r?+r(y,d,f):S[d]))}if(b)return s=null,b+""||null}function c(){return cN().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class fN{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function yW(e){return new fN(e,!0)}function gW(e){return new fN(e,!1)}const yx={draw(e,t){const r=cn(t/Wd);e.moveTo(r,0),e.arc(0,0,r,0,$p)}},bW={draw(e,t){const r=cn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},dN=cn(1/3),xW=dN*2,wW={draw(e,t){const r=cn(t/xW),n=r*dN;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},SW={draw(e,t){const r=cn(t),n=-r/2;e.rect(n,n,r,r)}},OW=.8908130915292852,hN=Ud(Wd/10)/Ud(7*Wd/10),PW=Ud($p/10)*hN,jW=-aN($p/10)*hN,EW={draw(e,t){const r=cn(t*OW),n=PW*r,i=jW*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=$p*a/5,s=aN(o),l=Ud(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},nv=cn(3),AW={draw(e,t){const r=-cn(t/(nv*3));e.moveTo(0,r*2),e.lineTo(-nv*r,-r),e.lineTo(nv*r,-r),e.closePath()}},Pr=-.5,jr=cn(3)/2,bg=1/cn(12),_W=(bg/2+1)*3,TW={draw(e,t){const r=cn(t/_W),n=r/2,i=r*bg,a=n,o=r*bg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Pr*n-jr*i,jr*n+Pr*i),e.lineTo(Pr*a-jr*o,jr*a+Pr*o),e.lineTo(Pr*s-jr*l,jr*s+Pr*l),e.lineTo(Pr*n+jr*i,Pr*i-jr*n),e.lineTo(Pr*a+jr*o,Pr*o-jr*a),e.lineTo(Pr*s+jr*l,Pr*l-jr*s),e.closePath()}};function kW(e,t){let r=null,n=mx(i);e=typeof e=="function"?e:Ie(e||yx),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Hd(){}function Kd(e,t,r){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+r)/6)}function pN(e){this._context=e}pN.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:Kd(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:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NW(e){return new pN(e)}function mN(e){this._context=e}mN.prototype={areaStart:Hd,areaEnd:Hd,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:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CW(e){return new mN(e)}function vN(e){this._context=e}vN.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Kd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $W(e){return new vN(e)}function yN(e){this._context=e}yN.prototype={areaStart:Hd,areaEnd:Hd,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 MW(e){return new yN(e)}function zS(e){return e<0?-1:1}function US(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(zS(a)+zS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function WS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function iv(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function qd(e){this._context=e}qd.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:iv(this,this._t0,WS(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 r=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,iv(this,WS(this,r=US(this,e,t)),r);break;default:iv(this,this._t0,r=US(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function gN(e){this._context=new bN(e)}(gN.prototype=Object.create(qd.prototype)).point=function(e,t){qd.prototype.point.call(this,t,e)};function bN(e){this._context=e}bN.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function IW(e){return new qd(e)}function DW(e){return new gN(e)}function xN(e){this._context=e}xN.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=HS(e),i=HS(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function LW(e){return new Ip(e,.5)}function FW(e){return new Ip(e,0)}function BW(e){return new Ip(e,1)}function _s(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function zW(e,t){return e[t]}function UW(e){const t=[];return t.key=e,t}function WW(){var e=Ie([]),t=xg,r=_s,n=zW;function i(a){var o=Array.from(e.apply(this,arguments),UW),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var wN={symbolCircle:yx,symbolCross:bW,symbolDiamond:wW,symbolSquare:SW,symbolStar:EW,symbolTriangle:AW,symbolWye:TW},ZW=Math.PI/180,e7=function(t){var r="symbol".concat(Cp(t));return wN[r]||yx},t7=function(t,r,n){if(r==="area")return t;switch(n){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*ZW;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}},r7=function(t,r){wN["symbol".concat(Cp(t))]=r},Dp=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=QW(t,VW),u=qS(qS({},l),{},{type:n,size:a,sizeType:s}),c=function(){var y=e7(n),g=kW().type(y).size(t7(a,s,n));return g()},f=u.className,d=u.cx,p=u.cy,v=re(u,!0);return d===+d&&p===+p&&a===+a?N.createElement("path",wg({},v,{className:ce("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:c()})):null};Dp.registerSymbol=r7;function Ts(e){"@babel/helpers - typeof";return Ts=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},Ts(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?u:p.color;return N.createElement("li",Sg({className:y,style:f,key:"legend-item-".concat(v)},ea(n.props,p,v)),N.createElement(hg,{width:o,height:o,viewBox:c,style:d},n.renderIcon(p)),N.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(g,p,v):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return N.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(j.PureComponent);zu(gx,"displayName","Legend");zu(gx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var d7=bp;function h7(){this.__data__=new d7,this.size=0}var p7=h7;function m7(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var v7=m7;function y7(e){return this.__data__.get(e)}var g7=y7;function b7(e){return this.__data__.has(e)}var x7=b7,w7=bp,S7=ox,O7=sx,P7=200;function j7(e,t){var r=this.__data__;if(r instanceof w7){var n=r.__data__;if(!S7||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&V7?new W7:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=QH}var Sx=JH,ZH=li,e9=Sx,t9=ui,r9="[object Arguments]",n9="[object Array]",i9="[object Boolean]",a9="[object Date]",o9="[object Error]",s9="[object Function]",l9="[object Map]",u9="[object Number]",c9="[object Object]",f9="[object RegExp]",d9="[object Set]",h9="[object String]",p9="[object WeakMap]",m9="[object ArrayBuffer]",v9="[object DataView]",y9="[object Float32Array]",g9="[object Float64Array]",b9="[object Int8Array]",x9="[object Int16Array]",w9="[object Int32Array]",S9="[object Uint8Array]",O9="[object Uint8ClampedArray]",P9="[object Uint16Array]",j9="[object Uint32Array]",Be={};Be[y9]=Be[g9]=Be[b9]=Be[x9]=Be[w9]=Be[S9]=Be[O9]=Be[P9]=Be[j9]=!0;Be[r9]=Be[n9]=Be[m9]=Be[i9]=Be[v9]=Be[a9]=Be[o9]=Be[s9]=Be[l9]=Be[u9]=Be[c9]=Be[f9]=Be[d9]=Be[h9]=Be[p9]=!1;function E9(e){return t9(e)&&e9(e.length)&&!!Be[ZH(e)]}var A9=E9;function _9(e){return function(t){return e(t)}}var CN=_9,Xd={exports:{}};Xd.exports;(function(e,t){var r=Bk,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Xd,Xd.exports);var T9=Xd.exports,k9=A9,N9=CN,ZS=T9,eO=ZS&&ZS.isTypedArray,C9=eO?N9(eO):k9,$N=C9,$9=DH,M9=xx,I9=fr,D9=NN,R9=wx,L9=$N,F9=Object.prototype,B9=F9.hasOwnProperty;function z9(e,t){var r=I9(e),n=!r&&M9(e),i=!r&&!n&&D9(e),a=!r&&!n&&!i&&L9(e),o=r||n||i||a,s=o?$9(e.length,String):[],l=s.length;for(var u in e)(t||B9.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||R9(u,l)))&&s.push(u);return s}var U9=z9,W9=Object.prototype;function H9(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||W9;return e===r}var K9=H9;function q9(e,t){return function(r){return e(t(r))}}var MN=q9,V9=MN,G9=V9(Object.keys,Object),Y9=G9,X9=K9,Q9=Y9,J9=Object.prototype,Z9=J9.hasOwnProperty;function eK(e){if(!X9(e))return Q9(e);var t=[];for(var r in Object(e))Z9.call(e,r)&&r!="constructor"&&t.push(r);return t}var tK=eK,rK=ix,nK=Sx;function iK(e){return e!=null&&nK(e.length)&&!rK(e)}var Uc=iK,aK=U9,oK=tK,sK=Uc;function lK(e){return sK(e)?aK(e):oK(e)}var Rp=lK,uK=PH,cK=MH,fK=Rp;function dK(e){return uK(e,fK,cK)}var hK=dK,tO=hK,pK=1,mK=Object.prototype,vK=mK.hasOwnProperty;function yK(e,t,r,n,i,a){var o=r&pK,s=tO(e),l=s.length,u=tO(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:vK.call(t,d)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++f-1}var mV=pV;function vV(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=NV){var u=t?null:TV(e);if(u)return kV(u);o=!1,i=_V,l=new jV}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GV(e){return e.value}function YV(e,t){if(N.isValidElement(e))return N.cloneElement(e,t);if(typeof e=="function")return N.createElement(e,t);t.ref;var r=qV(t,LV);return N.createElement(gx,r)}var yO=1,Lr=function(e){function t(){var r;FV(this,t);for(var n=arguments.length,i=new Array(n),a=0;ayO||Math.abs(i.height-this.lastBoundingBox.height)>yO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Cn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();d={top:((c||0)-v.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Cn(Cn({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=Cn(Cn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return N.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},YV(a,Cn(Cn({},this.props),{},{payload:zN(c,u,GV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Cn(Cn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(j.PureComponent);Lp(Lr,"displayName","Legend");Lp(Lr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var gO=Bc,XV=xx,QV=fr,bO=gO?gO.isConcatSpreadable:void 0;function JV(e){return QV(e)||XV(e)||!!(bO&&e&&e[bO])}var ZV=JV,eG=TN,tG=ZV;function HN(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=tG),i||(i=[]);++a0&&r(s)?t>1?HN(s,t-1,r,n,i):eG(i,s):n||(i[i.length]=s)}return i}var KN=HN;function rG(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var nG=rG,iG=nG,aG=iG(),oG=aG,sG=oG,lG=Rp;function uG(e,t){return e&&sG(e,t,lG)}var qN=uG,cG=Uc;function fG(e,t){return function(r,n){if(r==null)return r;if(!cG(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var jG=PG,lv=ux,EG=cx,AG=kn,_G=VN,TG=xG,kG=CN,NG=jG,CG=xl,$G=fr;function MG(e,t,r){t.length?t=lv(t,function(a){return $G(a)?function(o){return EG(o,a.length===1?a[0]:a)}:a}):t=[CG];var n=-1;t=lv(t,kG(AG));var i=_G(e,function(a,o,s){var l=lv(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return TG(i,function(a,o){return NG(a,o,r)})}var IG=MG;function DG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var RG=DG,LG=RG,wO=Math.max;function FG(e,t,r){return t=wO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=wO(n.length-t,0),o=Array(a);++i0){if(++t>=YG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ZG=JG,eY=GG,tY=ZG,rY=tY(eY),nY=rY,iY=xl,aY=BG,oY=nY;function sY(e,t){return oY(aY(e,t,iY),e+"")}var lY=sY,uY=ax,cY=Uc,fY=wx,dY=aa;function hY(e,t,r){if(!dY(r))return!1;var n=typeof t;return(n=="number"?cY(r)&&fY(t,r.length):n=="string"&&t in r)?uY(r[t],e):!1}var Fp=hY,pY=KN,mY=IG,vY=lY,OO=Fp,yY=vY(function(e,t){if(e==null)return[];var r=t.length;return r>1&&OO(e,t[0],t[1])?t=[]:r>2&&OO(t[0],t[1],t[2])&&(t=[t[0]]),mY(e,pY(t,1),[])}),gY=yY;const jx=Ee(gY);function Uu(e){"@babel/helpers - typeof";return Uu=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},Uu(e)}function kg(){return kg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Bl,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat(Bl,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(c,l[n]):Math.max(f,l[n])}function $Y(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function MY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=EO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=EO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=$Y({translateX:c,translateY:f,useTranslate3d:s})):u=NY,{cssProperties:u,cssClasses:CY({translateX:c,translateY:f,coordinate:r})}}function Ns(e){"@babel/helpers - typeof";return Ns=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},Ns(e)}function AO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _O(e){for(var t=1;tTO||Math.abs(n.height-this.state.lastBoundingBox.height)>TO)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.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 n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,y=i.useTranslate3d,g=i.viewBox,b=i.wrapperStyle,x=MY({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:g}),S=x.cssClasses,w=x.cssProperties,O=_O(_O({transition:d&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return N.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(j.PureComponent),HY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},oa={isSsr:HY()};function Cs(e){"@babel/helpers - typeof";return Cs=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},Cs(e)}function kO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NO(e){for(var t=1;t0;return N.createElement(WY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:c,hasPayload:O,offset:p,position:y,reverseDirection:g,useTranslate3d:b,viewBox:x,wrapperStyle:S},eX(u,NO(NO({},this.props),{},{payload:w})))}}])}(j.PureComponent);Ex(Et,"displayName","Tooltip");Ex(Et,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!oa.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 tX=Tn,rX=function(){return tX.Date.now()},nX=rX,iX=/\s/;function aX(e){for(var t=e.length;t--&&iX.test(e.charAt(t)););return t}var oX=aX,sX=oX,lX=/^\s+/;function uX(e){return e&&e.slice(0,sX(e)+1).replace(lX,"")}var cX=uX,fX=cX,CO=aa,dX=hl,$O=NaN,hX=/^[-+]0x[0-9a-f]+$/i,pX=/^0b[01]+$/i,mX=/^0o[0-7]+$/i,vX=parseInt;function yX(e){if(typeof e=="number")return e;if(dX(e))return $O;if(CO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=CO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=fX(e);var r=pX.test(e);return r||mX.test(e)?vX(e.slice(2),r?2:8):hX.test(e)?$O:+e}var ZN=yX,gX=aa,cv=nX,MO=ZN,bX="Expected a function",xX=Math.max,wX=Math.min;function SX(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(bX);t=MO(t)||0,gX(r)&&(c=!!r.leading,f="maxWait"in r,a=f?xX(MO(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(O){var P=n,E=i;return n=i=void 0,u=O,o=e.apply(E,P),o}function v(O){return u=O,s=setTimeout(g,t),c?p(O):o}function m(O){var P=O-l,E=O-u,A=t-P;return f?wX(A,a-E):A}function y(O){var P=O-l,E=O-u;return l===void 0||P>=t||P<0||f&&E>=a}function g(){var O=cv();if(y(O))return b(O);s=setTimeout(g,m(O))}function b(O){return s=void 0,d&&n?p(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(cv())}function w(){var O=cv(),P=y(O);if(n=arguments,i=this,l=O,P){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(g,t),p(l)}return s===void 0&&(s=setTimeout(g,t)),o}return w.cancel=x,w.flush=S,w}var OX=SX,PX=OX,jX=aa,EX="Expected a function";function AX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(EX);return jX(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),PX(e,t,{leading:n,maxWait:t,trailing:i})}var _X=AX;const eC=Ee(_X);function Hu(e){"@babel/helpers - typeof";return Hu=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},Hu(e)}function IO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(I=eC(I,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(I),D=w.current.getBoundingClientRect(),R=D.width,z=D.height;return _(R,z),M.observe(w.current),function(){M.disconnect()}},[_,m]);var T=j.useMemo(function(){var I=A.containerWidth,M=A.containerHeight;if(I<0||M<0)return null;nn(_a(o)||_a(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),nn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=_a(o)?I:o,R=_a(l)?M:l;r&&r>0&&(D?R=D/r:R&&(D=R*r),d&&R>d&&(R=d)),nn(D>0||R>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.`,D,R,o,l,c,f,r);var z=!Array.isArray(p)&&Vn(p.type).endsWith("Chart");return N.Children.map(p,function($){return N.isValidElement($)?j.cloneElement($,jf({width:D,height:R},z?{style:jf({height:"100%",width:"100%",maxHeight:R,maxWidth:D},$.props.style)}:{})):$})},[r,p,l,d,f,c,A,o]);return N.createElement("div",{id:y?"".concat(y):void 0,className:ce("recharts-responsive-container",g),style:jf(jf({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:w},T)}),yo=function(t){return null};yo.displayName="Cell";function Ku(e){"@babel/helpers - typeof";return Ku=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},Ku(e)}function RO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||oa.isSsr)return{width:0,height:0};var n=UX(r),i=JSON.stringify({text:t,copyStyle:n});if(Eo.widthCache[i])return Eo.widthCache[i];try{var a=document.getElementById(LO);a||(a=document.createElement("span"),a.setAttribute("id",LO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Mg(Mg({},zX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Eo.widthCache[i]=l,++Eo.cacheCount>BX&&(Eo.cacheCount=0,Eo.widthCache={}),l}catch{return{width:0,height:0}}},WX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function qu(e){"@babel/helpers - typeof";return qu=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},qu(e)}function eh(e,t){return VX(e)||qX(e,t)||KX(e,t)||HX()}function HX(){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 KX(e,t){if(e){if(typeof e=="string")return FO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FO(e,t)}}function FO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function KO(e,t){return fQ(e)||cQ(e,t)||uQ(e,t)||lQ()}function lQ(){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 uQ(e,t){if(e){if(typeof e=="string")return qO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qO(e,t)}}function qO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(R,z){var $=z.word,F=z.width,W=R[R.length-1];if(W&&(i==null||a||W.width+F+nz.width?R:z})};if(!c)return p;for(var m="…",y=function(D){var R=f.slice(0,D),z=iC({breakAll:u,style:l,children:R+m}).wordsWithComputedWidth,$=d(z),F=$.length>o||v($).width>Number(i);return[F,$]},g=0,b=f.length-1,x=0,S;g<=b&&x<=f.length-1;){var w=Math.floor((g+b)/2),O=w-1,P=y(O),E=KO(P,2),A=E[0],k=E[1],_=y(w),T=KO(_,1),I=T[0];if(!A&&!I&&(g=w+1),A&&I&&(b=w-1),!A&&I){S=k;break}x++}return S||p},VO=function(t){var r=ae(t)?[]:t.toString().split(nC);return[{words:r}]},hQ=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!oa.isSsr){var l,u,c=iC({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return VO(i);return dQ({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return VO(i)},GO="#808080",no=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,p=d===void 0?"start":d,v=t.verticalAnchor,m=v===void 0?"end":v,y=t.fill,g=y===void 0?GO:y,b=HO(t,aQ),x=j.useMemo(function(){return hQ({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,P=b.className,E=b.breakAll,A=HO(b,oQ);if(!mt(n)||!mt(a))return null;var k=n+(q(S)?S:0),_=a+(q(w)?w:0),T;switch(m){case"start":T=fv("calc(".concat(u,")"));break;case"middle":T=fv("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:T=fv("calc(".concat(x.length-1," * -").concat(s,")"));break}var I=[];if(f){var M=x[0].width,D=b.width;I.push("scale(".concat((q(D)?D/M:1)/M,")"))}return O&&I.push("rotate(".concat(O,", ").concat(k,", ").concat(_,")")),I.length&&(A.transform=I.join(" ")),N.createElement("text",Ig({},re(A,!0),{x:k,y:_,className:ce("recharts-text",P),textAnchor:p,fill:g.includes("url")?GO:g}),x.map(function(R,z){var $=R.words.join(E?"":" ");return N.createElement("tspan",{x:k,dy:z===0?T:s,key:"".concat($,"-").concat(z)},$)}))};function Xi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function pQ(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Ax(e){let t,r,n;e.length!==2?(t=Xi,r=(s,l)=>Xi(e(s),l),n=(s,l)=>e(s)-l):(t=e===Xi||e===pQ?e:mQ,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function mQ(){return 0}function aC(e){return e===null?NaN:+e}function*vQ(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const yQ=Ax(Xi),Wc=yQ.right;Ax(aC).center;class YO extends Map{constructor(t,r=xQ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(XO(this,t))}has(t){return super.has(XO(this,t))}set(t,r){return super.set(gQ(this,t),r)}delete(t){return super.delete(bQ(this,t))}}function XO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function gQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function bQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function xQ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wQ(e=Xi){if(e===Xi)return oC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function oC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const SQ=Math.sqrt(50),OQ=Math.sqrt(10),PQ=Math.sqrt(2);function th(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=SQ?10:a>=OQ?5:a>=PQ?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function JO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function sC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?oC:wQ(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+d)),v=Math.min(n,Math.floor(t+(l-u)*f/l+d));sC(e,t,p,v,i)}const a=e[t];let o=r,s=n;for(zl(e,r,t),i(e[n],a)>0&&zl(e,r,n);o0;)--s}i(e[r],a)===0?zl(e,r,s):(++s,zl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function zl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function jQ(e,t,r){if(e=Float64Array.from(vQ(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return JO(e);if(t>=1)return QO(e);var n,i=(n-1)*t,a=Math.floor(i),o=QO(sC(e,a).subarray(0,a+1)),s=JO(e.subarray(a+1));return o+(s-o)*(i-a)}}function EQ(e,t,r=aC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function AQ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Af(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Af(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=TQ.exec(e))?new rr(t[1],t[2],t[3],1):(t=kQ.exec(e))?new rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=NQ.exec(e))?Af(t[1],t[2],t[3],t[4]):(t=CQ.exec(e))?Af(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$Q.exec(e))?aP(t[1],t[2]/100,t[3]/100,1):(t=MQ.exec(e))?aP(t[1],t[2]/100,t[3]/100,t[4]):ZO.hasOwnProperty(e)?rP(ZO[e]):e==="transparent"?new rr(NaN,NaN,NaN,0):null}function rP(e){return new rr(e>>16&255,e>>8&255,e&255,1)}function Af(e,t,r,n){return n<=0&&(e=t=r=NaN),new rr(e,t,r,n)}function RQ(e){return e instanceof Hc||(e=Xu(e)),e?(e=e.rgb(),new rr(e.r,e.g,e.b,e.opacity)):new rr}function Bg(e,t,r,n){return arguments.length===1?RQ(e):new rr(e,t,r,n??1)}function rr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Tx(rr,Bg,uC(Hc,{brighter(e){return e=e==null?rh:Math.pow(rh,e),new rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gu:Math.pow(Gu,e),new rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rr(Ha(this.r),Ha(this.g),Ha(this.b),nh(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:nP,formatHex:nP,formatHex8:LQ,formatRgb:iP,toString:iP}));function nP(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function LQ(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function iP(){const e=nh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ha(this.r)}, ${Ha(this.g)}, ${Ha(this.b)}${e===1?")":`, ${e})`}`}function nh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ha(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ta(e){return e=Ha(e),(e<16?"0":"")+e.toString(16)}function aP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new en(e,t,r,n)}function cC(e){if(e instanceof en)return new en(e.h,e.s,e.l,e.opacity);if(e instanceof Hc||(e=Xu(e)),!e)return new en;if(e instanceof en)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new en(o,s,l,e.opacity)}function FQ(e,t,r,n){return arguments.length===1?cC(e):new en(e,t,r,n??1)}function en(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Tx(en,FQ,uC(Hc,{brighter(e){return e=e==null?rh:Math.pow(rh,e),new en(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gu:Math.pow(Gu,e),new en(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new rr(dv(e>=240?e-240:e+120,i,n),dv(e,i,n),dv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new en(oP(this.h),_f(this.s),_f(this.l),nh(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=nh(this.opacity);return`${e===1?"hsl(":"hsla("}${oP(this.h)}, ${_f(this.s)*100}%, ${_f(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oP(e){return e=(e||0)%360,e<0?e+360:e}function _f(e){return Math.max(0,Math.min(1,e||0))}function dv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const kx=e=>()=>e;function BQ(e,t){return function(r){return e+r*t}}function zQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function UQ(e){return(e=+e)==1?fC:function(t,r){return r-t?zQ(t,r,e):kx(isNaN(t)?r:t)}}function fC(e,t){var r=t-e;return r?BQ(e,r):kx(isNaN(e)?t:e)}const sP=function e(t){var r=UQ(t);function n(i,a){var o=r((i=Bg(i)).r,(a=Bg(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=fC(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function WQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ih(n,i)})),r=hv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function eJ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?tJ:eJ,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((u||(u=s(t,e.map(n),ih)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,ah),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=Nx,c()},f.clamp=function(d){return arguments.length?(o=d?!0:qt,c()):o!==qt},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,c()}}function Cx(){return Bp()(qt,qt)}function rJ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function oh(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $s(e){return e=oh(Math.abs(e)),e?e[1]:NaN}function nJ(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function iJ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var aJ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qu(e){if(!(t=aJ.exec(e)))throw new Error("invalid format: "+e);var t;return new $x({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]})}Qu.prototype=$x.prototype;function $x(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+""}$x.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 oJ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var dC;function sJ(e,t){var r=oh(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(dC=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+oh(e,Math.max(0,t+a-1))[0]}function uP(e,t){var r=oh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const cP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rJ,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)=>uP(e*100,t),r:uP,s:sJ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fP(e){return e}var dP=Array.prototype.map,hP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lJ(e){var t=e.grouping===void 0||e.thousands===void 0?fP:nJ(dP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?fP:iJ(dP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Qu(f);var d=f.fill,p=f.align,v=f.sign,m=f.symbol,y=f.zero,g=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):cP[w]||(x===void 0&&(x=12),S=!0,w="g"),(y||d==="0"&&p==="=")&&(y=!0,d="0",p="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=m==="$"?n:/[%p]/.test(w)?o:"",E=cP[w],A=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function k(_){var T=O,I=P,M,D,R;if(w==="c")I=E(_)+I,_="";else{_=+_;var z=_<0||1/_<0;if(_=isNaN(_)?l:E(Math.abs(_),x),S&&(_=oJ(_)),z&&+_==0&&v!=="+"&&(z=!1),T=(z?v==="("?v:s:v==="-"||v==="("?"":v)+T,I=(w==="s"?hP[8+dC/3]:"")+I+(z&&v==="("?")":""),A){for(M=-1,D=_.length;++MR||R>57){I=(R===46?i+_.slice(M+1):_.slice(M))+I,_=_.slice(0,M);break}}}b&&!y&&(_=t(_,1/0));var $=T.length+_.length+I.length,F=$>1)+T+_+I+F.slice($);break;default:_=F+T+_+I;break}return a(_)}return k.toString=function(){return f+""},k}function c(f,d){var p=u((f=Qu(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor($s(d)/3)))*3,m=Math.pow(10,-v),y=hP[8+v/3];return function(g){return p(m*g)+y}}return{format:u,formatPrefix:c}}var Tf,Mx,hC;uJ({thousands:",",grouping:[3],currency:["$",""]});function uJ(e){return Tf=lJ(e),Mx=Tf.format,hC=Tf.formatPrefix,Tf}function cJ(e){return Math.max(0,-$s(Math.abs(e)))}function fJ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function dJ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function pC(e,t,r,n){var i=Lg(e,t,r),a;switch(n=Qu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=fJ(i,o))&&(n.precision=a),hC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=dJ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=cJ(i))&&(n.precision=a-(n.type==="%")*2);break}}return Mx(n)}function sa(e){var t=e.domain;return e.ticks=function(r){var n=t();return Dg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return pC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=Rg(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function sh(){var e=Cx();return e.copy=function(){return Kc(e,sh())},Wr.apply(e,arguments),sa(e)}function mC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,ah),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return mC(e).unknown(t)},e=arguments.length?Array.from(e,ah):[0,1],sa(r)}function vC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function yJ(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 vP(e){return(t,r)=>-e(-t,r)}function Ix(e){const t=e(pP,mP),r=t.domain;let n=10,i,a;function o(){return i=yJ(n),a=vJ(n),r()[0]<0?(i=vP(i),a=vP(a),e(hJ,pJ)):e(pP,mP),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=p;++d)for(v=1;vc)break;g.push(m)}}else for(;d<=p;++d)for(v=n-1;v>=1;--v)if(m=d>0?v/a(-d):v*a(d),!(mc)break;g.push(m)}g.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Qu(l)).precision==null&&(l.trim=!0),l=Mx(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(vC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function yC(){const e=Ix(Bp()).domain([1,10]);return e.copy=()=>Kc(e,yC()).base(e.base()),Wr.apply(e,arguments),e}function yP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Dx(e){var t=1,r=e(yP(t),gP(t));return r.constant=function(n){return arguments.length?e(yP(t=+n),gP(t)):t},sa(r)}function gC(){var e=Dx(Bp());return e.copy=function(){return Kc(e,gC()).constant(e.constant())},Wr.apply(e,arguments)}function bP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gJ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bJ(e){return e<0?-e*e:e*e}function Rx(e){var t=e(qt,qt),r=1;function n(){return r===1?e(qt,qt):r===.5?e(gJ,bJ):e(bP(r),bP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},sa(t)}function Lx(){var e=Rx(Bp());return e.copy=function(){return Kc(e,Lx()).exponent(e.exponent())},Wr.apply(e,arguments),e}function xJ(){return Lx.apply(null,arguments).exponent(.5)}function xP(e){return Math.sign(e)*e*e}function wJ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bC(){var e=Cx(),t=[0,1],r=!1,n;function i(a){var o=wJ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(xP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,ah)).map(xP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return bC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Wr.apply(i,arguments),sa(i)}function xC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return wC().domain([e,t]).range(i).unknown(a)},Wr.apply(sa(o),arguments)}function SC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Wc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return SC().domain(e).range(t).unknown(r)},Wr.apply(i,arguments)}const pv=new Date,mv=new Date;function vt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uvt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(pv.setTime(+a),mv.setTime(+o),e(pv),e(mv),Math.floor(r(pv,mv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const lh=vt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);lh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?vt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):lh);lh.range;const Wn=1e3,Mr=Wn*60,Hn=Mr*60,ei=Hn*24,Fx=ei*7,wP=ei*30,vv=ei*365,ka=vt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getUTCSeconds());ka.range;const Bx=vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wn)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getMinutes());Bx.range;const zx=vt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getUTCMinutes());zx.range;const Ux=vt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wn-e.getMinutes()*Mr)},(e,t)=>{e.setTime(+e+t*Hn)},(e,t)=>(t-e)/Hn,e=>e.getHours());Ux.range;const Wx=vt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hn)},(e,t)=>(t-e)/Hn,e=>e.getUTCHours());Wx.range;const qc=vt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mr)/ei,e=>e.getDate()-1);qc.range;const zp=vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ei,e=>e.getUTCDate()-1);zp.range;const OC=vt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ei,e=>Math.floor(e/ei));OC.range;function go(e){return vt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Mr)/Fx)}const Up=go(0),uh=go(1),SJ=go(2),OJ=go(3),Ms=go(4),PJ=go(5),jJ=go(6);Up.range;uh.range;SJ.range;OJ.range;Ms.range;PJ.range;jJ.range;function bo(e){return vt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Fx)}const Wp=bo(0),ch=bo(1),EJ=bo(2),AJ=bo(3),Is=bo(4),_J=bo(5),TJ=bo(6);Wp.range;ch.range;EJ.range;AJ.range;Is.range;_J.range;TJ.range;const Hx=vt(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());Hx.range;const Kx=vt(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());Kx.range;const ti=vt(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());ti.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ti.range;const ri=vt(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());ri.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ri.range;function PC(e,t,r,n,i,a){const o=[[ka,1,Wn],[ka,5,5*Wn],[ka,15,15*Wn],[ka,30,30*Wn],[a,1,Mr],[a,5,5*Mr],[a,15,15*Mr],[a,30,30*Mr],[i,1,Hn],[i,3,3*Hn],[i,6,6*Hn],[i,12,12*Hn],[n,1,ei],[n,2,2*ei],[r,1,Fx],[t,1,wP],[t,3,3*wP],[e,1,vv]];function s(u,c,f){const d=cy).right(o,d);if(p===o.length)return e.every(Lg(u/vv,c/vv,f));if(p===0)return lh.every(Math.max(Lg(u,c,f),1));const[v,m]=o[d/o[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ye=gv(Ul(U.y,0,1)),st=ye.getUTCDay(),ye=st>4||st===0?ch.ceil(ye):ch(ye),ye=zp.offset(ye,(U.V-1)*7),U.y=ye.getUTCFullYear(),U.m=ye.getUTCMonth(),U.d=ye.getUTCDate()+(U.w+6)%7):(ye=yv(Ul(U.y,0,1)),st=ye.getDay(),ye=st>4||st===0?uh.ceil(ye):uh(ye),ye=qc.offset(ye,(U.V-1)*7),U.y=ye.getFullYear(),U.m=ye.getMonth(),U.d=ye.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),st="Z"in U?gv(Ul(U.y,0,1)).getUTCDay():yv(Ul(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(st+5)%7:U.w+U.U*7-(st+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,gv(U)):yv(U)}}function E(G,se,le,U){for(var Qe=0,ye=se.length,st=le.length,lt,Qt;Qe=st)return-1;if(lt=se.charCodeAt(Qe++),lt===37){if(lt=se.charAt(Qe++),Qt=w[lt in SP?se.charAt(Qe++):lt],!Qt||(U=Qt(G,le,U))<0)return-1}else if(lt!=le.charCodeAt(U++))return-1}return U}function A(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function k(G,se,le){var U=p.exec(se.slice(le));return U?(G.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=f.exec(se.slice(le));return U?(G.w=d.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=g.exec(se.slice(le));return U?(G.m=b.get(U[0].toLowerCase()),le+U[0].length):-1}function I(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=y.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){return E(G,t,se,le)}function D(G,se,le){return E(G,r,se,le)}function R(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function $(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function ne(G){return a[G.getUTCDay()]}function we(G){return l[G.getUTCMonth()]}function We(G){return s[G.getUTCMonth()]}function Oe(G){return i[+(G.getUTCHours()>=12)]}function Ot(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=P(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=P(G+="",!0);return se.toString=function(){return G},se}}}var SP={"-":"",_:" ",0:"0"},St=/^\s*\d+/,IJ=/^%/,DJ=/[\\^$*+?|[\]().{}]/g;function Se(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function LJ(e,t,r){var n=St.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function FJ(e,t,r){var n=St.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function BJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function zJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function UJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function OP(e,t,r){var n=St.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function PP(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function WJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function HJ(e,t,r){var n=St.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function KJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function jP(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function qJ(e,t,r){var n=St.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function EP(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function VJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function GJ(e,t,r){var n=St.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function YJ(e,t,r){var n=St.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function XJ(e,t,r){var n=St.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function QJ(e,t,r){var n=IJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function JJ(e,t,r){var n=St.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function ZJ(e,t,r){var n=St.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function AP(e,t){return Se(e.getDate(),t,2)}function eZ(e,t){return Se(e.getHours(),t,2)}function tZ(e,t){return Se(e.getHours()%12||12,t,2)}function rZ(e,t){return Se(1+qc.count(ti(e),e),t,3)}function jC(e,t){return Se(e.getMilliseconds(),t,3)}function nZ(e,t){return jC(e,t)+"000"}function iZ(e,t){return Se(e.getMonth()+1,t,2)}function aZ(e,t){return Se(e.getMinutes(),t,2)}function oZ(e,t){return Se(e.getSeconds(),t,2)}function sZ(e){var t=e.getDay();return t===0?7:t}function lZ(e,t){return Se(Up.count(ti(e)-1,e),t,2)}function EC(e){var t=e.getDay();return t>=4||t===0?Ms(e):Ms.ceil(e)}function uZ(e,t){return e=EC(e),Se(Ms.count(ti(e),e)+(ti(e).getDay()===4),t,2)}function cZ(e){return e.getDay()}function fZ(e,t){return Se(uh.count(ti(e)-1,e),t,2)}function dZ(e,t){return Se(e.getFullYear()%100,t,2)}function hZ(e,t){return e=EC(e),Se(e.getFullYear()%100,t,2)}function pZ(e,t){return Se(e.getFullYear()%1e4,t,4)}function mZ(e,t){var r=e.getDay();return e=r>=4||r===0?Ms(e):Ms.ceil(e),Se(e.getFullYear()%1e4,t,4)}function vZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Se(t/60|0,"0",2)+Se(t%60,"0",2)}function _P(e,t){return Se(e.getUTCDate(),t,2)}function yZ(e,t){return Se(e.getUTCHours(),t,2)}function gZ(e,t){return Se(e.getUTCHours()%12||12,t,2)}function bZ(e,t){return Se(1+zp.count(ri(e),e),t,3)}function AC(e,t){return Se(e.getUTCMilliseconds(),t,3)}function xZ(e,t){return AC(e,t)+"000"}function wZ(e,t){return Se(e.getUTCMonth()+1,t,2)}function SZ(e,t){return Se(e.getUTCMinutes(),t,2)}function OZ(e,t){return Se(e.getUTCSeconds(),t,2)}function PZ(e){var t=e.getUTCDay();return t===0?7:t}function jZ(e,t){return Se(Wp.count(ri(e)-1,e),t,2)}function _C(e){var t=e.getUTCDay();return t>=4||t===0?Is(e):Is.ceil(e)}function EZ(e,t){return e=_C(e),Se(Is.count(ri(e),e)+(ri(e).getUTCDay()===4),t,2)}function AZ(e){return e.getUTCDay()}function _Z(e,t){return Se(ch.count(ri(e)-1,e),t,2)}function TZ(e,t){return Se(e.getUTCFullYear()%100,t,2)}function kZ(e,t){return e=_C(e),Se(e.getUTCFullYear()%100,t,2)}function NZ(e,t){return Se(e.getUTCFullYear()%1e4,t,4)}function CZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Is(e):Is.ceil(e),Se(e.getUTCFullYear()%1e4,t,4)}function $Z(){return"+0000"}function TP(){return"%"}function kP(e){return+e}function NP(e){return Math.floor(+e/1e3)}var Ao,TC,kC;MZ({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 MZ(e){return Ao=MJ(e),TC=Ao.format,Ao.parse,kC=Ao.utcFormat,Ao.utcParse,Ao}function IZ(e){return new Date(e)}function DZ(e){return e instanceof Date?+e:+new Date(+e)}function qx(e,t,r,n,i,a,o,s,l,u){var c=Cx(),f=c.invert,d=c.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),y=u("%I %p"),g=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>jQ(e,a/n))},r.copy=function(){return MC(t).domain(e)},ci.apply(r,arguments)}function Kp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=qt,c,f=!1,d;function p(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-a)*(n*mt}var LC=WZ,HZ=qp,KZ=LC,qZ=xl;function VZ(e){return e&&e.length?HZ(e,qZ,KZ):void 0}var GZ=VZ;const Vp=Ee(GZ);function YZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ze;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Gn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return $e(Gn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ot(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(vr))throw Error(zr+"NaN");if(r.s<1)throw Error(zr+(r.s?"NaN":"-Infinity"));return r.eq(vr)?new n(0):(Ke=!1,t=Gn(Ju(r,a),Ju(e,a),a),Ke=!0,$e(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WC(t,e):zC(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(zr+"NaN");return r.s?(Ke=!1,t=Gn(r,e,0,1).times(e),Ke=!0,r.minus(t)):$e(new n(r),i)};J.naturalExponential=J.exp=function(){return UC(this)};J.naturalLogarithm=J.ln=function(){return Ju(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zC(t,e):WC(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ka+e);if(t=ot(i)+1,n=i.d.length-1,r=n*ze+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(zr+"NaN")}for(e=ot(s),Ke=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=wn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Pl((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),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Gn(s,a,o+2)).times(.5),wn(a.d).slice(0,o)===(t=wn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ke=!0,$e(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,d=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=p.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*d[i-n-1]+t,a[i--]=s%gt|0,t=s/gt|0;a[i]=(a[i]+t)%gt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ke?$e(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(_n(e,0,Ol),t===void 0?t=n.rounding:_n(t,0,8),$e(r,e+ot(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=io(n,!0):(_n(e,0,Ol),t===void 0?t=i.rounding:_n(t,0,8),n=$e(new i(n),e+1,t),r=io(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?io(i):(_n(e,0,Ol),t===void 0?t=a.rounding:_n(t,0,8),n=$e(new a(i),e+ot(i)+1,t),r=io(n.abs(),!1,e+ot(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ot(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(vr);if(s=new l(s),!s.s){if(e.s<1)throw Error(zr+"Infinity");return s}if(s.eq(vr))return s;if(n=l.precision,e.eq(vr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=BC){for(i=new l(vr),t=Math.ceil(n/ze+4),Ke=!1;r%2&&(i=i.times(s),MP(i.d,t)),r=Pl(r/2),r!==0;)s=s.times(s),MP(s.d,t);return Ke=!0,e.s<0?new l(vr).div(i):$e(i,n)}}else if(a<0)throw Error(zr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ke=!1,i=e.times(Ju(s,n+u)),Ke=!0,i=UC(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ot(i),n=io(i,r<=a.toExpNeg||r>=a.toExpPos)):(_n(e,1,Ol),t===void 0?t=a.rounding:_n(t,0,8),i=$e(new a(i),e,t),r=ot(i),n=io(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(_n(e,1,Ol),t===void 0?t=n.rounding:_n(t,0,8)),$e(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ot(e),r=e.constructor;return io(e,t<=r.toExpNeg||t>=r.toExpPos)};function zC(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Ke?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/ze),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/gt|0,l[a]%=gt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ke?$e(t,f):t}function _n(e,t,r){if(e!==~~e||er)throw Error(Ka+e)}function wn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,d,p,v,m,y,g,b,x,S,w,O,P,E,A=n.constructor,k=n.s==i.s?1:-1,_=n.d,T=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(zr+"Division by zero");for(l=n.e-i.e,P=T.length,w=_.length,p=new A(k),v=p.d=[],u=0;T[u]==(_[u]||0);)++u;if(T[u]>(_[u]||0)&&--l,a==null?b=a=A.precision:o?b=a+(ot(n)-ot(i))+1:b=a,b<0)return new A(0);if(b=b/ze+2|0,u=0,P==1)for(c=0,T=T[0],b++;(u1&&(T=e(T,c),_=e(_,c),P=T.length,w=_.length),S=P,m=_.slice(0,P),y=m.length;y=gt/2&&++O;do c=0,s=t(T,m,P,y),s<0?(g=m[0],P!=y&&(g=g*gt+(m[1]||0)),c=g/O|0,c>1?(c>=gt&&(c=gt-1),f=e(T,c),d=f.length,y=m.length,s=t(f,m,d,y),s==1&&(c--,r(f,P16)throw Error(Yx+ot(e));if(!e.s)return new c(vr);for(Ke=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(wa(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(vr),c.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(Gn(i,r,s)),wn(o.d).slice(0,s)===wn(a.d).slice(0,s)){for(;u--;)a=$e(a.times(a),s);return c.precision=f,t==null?(Ke=!0,$e(a,f)):a}a=o}}function ot(e){for(var t=e.e*ze,r=e.d[0];r>=10;r/=10)t++;return t}function bv(e,t,r){if(t>e.LN10.sd())throw Ke=!0,r&&(e.precision=r),Error(zr+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function wi(e){for(var t="";e--;)t+="0";return t}function Ju(e,t){var r,n,i,a,o,s,l,u,c,f=1,d=10,p=e,v=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(zr+(p.s?"NaN":"-Infinity"));if(p.eq(vr))return new m(0);if(t==null?(Ke=!1,u=y):u=t,p.eq(10))return t==null&&(Ke=!0),bv(m,u);if(u+=d,m.precision=u,r=wn(v),n=r.charAt(0),a=ot(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=wn(p.d),n=r.charAt(0),f++;a=ot(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=bv(m,u+2,y).times(a+""),p=Ju(new m(n+"."+r.slice(1)),u-d).plus(l),m.precision=y,t==null?(Ke=!0,$e(p,y)):p;for(s=o=p=Gn(p.minus(vr),p.plus(vr),u),c=$e(p.times(p),u),i=3;;){if(o=$e(o.times(c),u),l=s.plus(Gn(o,new m(i),u)),wn(l.d).slice(0,u)===wn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(bv(m,u+2,y).times(a+""))),s=Gn(s,new m(f),u),m.precision=y,t==null?(Ke=!0,$e(s,y)):s;s=l,i+=2}}function $P(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Pl(r/ze),e.d=[],n=(r+1)%ze,r<0&&(n+=ze),nfh||e.e<-fh))throw Error(Yx+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=ze,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/ze),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=ze,i=n-ze+o}if(r!==void 0&&(a=wa(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/wa(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ot(e),f.length=1,t=t-a-1,f[0]=wa(10,(ze-t%ze)%ze),e.e=Pl(-t/ze)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=wa(10,ze-n),f[c]=i>0?(u/wa(10,o-i)%wa(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==gt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=gt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ke&&(e.e>fh||e.e<-fh))throw Error(Yx+ot(e));return e}function WC(e,t){var r,n,i,a,o,s,l,u,c,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ke?$e(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(p/ze),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+wi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+wi(-i-1)+a,r&&(n=r-o)>0&&(a+=wi(n))):i>=o?(a+=wi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+wi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=wi(n))),e.s<0?"-"+a:a}function MP(e,t){if(e.length>t)return e.length=t,!0}function HC(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ka+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return $P(o,a.toString())}else if(typeof a!="string")throw Error(Ka+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,vee.test(a))$P(o,a);else throw Error(Ka+a)}if(i.prototype=J,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=HC,i.config=i.set=yee,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ka+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ka+r+": "+n);return this}var Xx=HC(mee);vr=new Xx(1);const Ce=Xx;function gee(e){return See(e)||wee(e)||xee(e)||bee()}function bee(){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 xee(e,t){if(e){if(typeof e=="string")return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}}function wee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function See(e){if(Array.isArray(e))return Wg(e)}function Wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,IP(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Ree(e){if(Array.isArray(e))return e}function YC(e){var t=Zu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function XC(e,t,r){if(e.lte(0))return new Ce(0);var n=Xp.getDigitCount(e.toNumber()),i=new Ce(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ce(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ce(Math.ceil(l))}function Lee(e,t,r){var n=1,i=new Ce(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ce(10).pow(Xp.getDigitCount(e)-1),i=new Ce(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ce(Math.floor(e)))}else e===0?i=new Ce(Math.floor((t-1)/2)):r||(i=new Ce(Math.floor(e)));var o=Math.floor((t-1)/2),s=Eee(jee(function(l){return i.add(new Ce(l-o).mul(n)).toNumber()}),Hg);return s(0,t)}function QC(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=XC(new Ce(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ce(0):(o=new Ce(e).add(t).div(2),o=o.sub(new Ce(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ce(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?QC(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ce(s).mul(a)),tickMax:o.add(new Ce(l).mul(a))})}function Fee(e){var t=Zu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=YC([r,n]),l=Zu(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(qg(Hg(0,i-1).map(function(){return 1/0}))):[].concat(qg(Hg(0,i-1).map(function(){return-1/0})),[c]);return r>n?Kg(f):f}if(u===c)return Lee(u,i,a);var d=QC(u,c,o,a),p=d.step,v=d.tickMin,m=d.tickMax,y=Xp.rangeStep(v,m.add(new Ce(.1).mul(p)),p);return r>n?Kg(y):y}function Bee(e,t){var r=Zu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=YC([n,i]),s=Zu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=XC(new Ce(u).sub(l).div(c-1),a,0),d=[].concat(qg(Xp.rangeStep(new Ce(l),new Ce(u).sub(new Ce(.99).mul(f)),f)),[u]);return n>i?Kg(d):d}var zee=VC(Fee),Uee=VC(Bee),Wee="Invariant failed";function ao(e,t){throw new Error(Wee)}var Hee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ds(e){"@babel/helpers - typeof";return Ds=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},Ds(e)}function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Jee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,d=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Ht(f-c)!==Ht(d-f)){var v=[];if(Ht(d-f)===Ht(l[1]-l[0])){p=d;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{p=c;var y=d+l[1]-l[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var g=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>g[0]&&t<=g[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var b=Math.min(c,d),x=Math.max(c,d);if(t>(b+f)/2&&t<=(x+f)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Qx=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},vte=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(g&&g.length){var b=g[0].type.defaultProps,x=b!==void 0?et(et({},b),g[0].props):g[0].props,S=x.barSize,w=x[y];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:g[0],stackList:g.slice(1),barSize:ae(O)?void 0:Kt(O,n,0)})}}return o},yte=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Kt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/l,v=o.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&p>0&&(d=!0,p*=.9,v=l*p);var m=(i-v)/2>>0,y={offset:m-u,size:0};c=o.reduce(function(S,w){var O={item:w.item,position:{offset:y.offset+y.size+u,size:d?p:w.barSize}},P=[].concat(LP(S),[O]);return y=P[P.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:y})}),P},f)}else{var g=Kt(n,i,0,!0);i-2*g-(l-1)*u<=0&&(u=0);var b=(i-2*g-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;c=o.reduce(function(S,w,O){var P=[].concat(LP(S),[{item:w.item,position:{offset:g+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},f)}return c},gte=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=t$({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,d=c.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&q(t[p]))return et(et({},t),{},os({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&q(t[v]))return et(et({},t),{},os({},v,t[v]+(d||0)))}return t},bte=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},r$=function(t,r,n,i,a){var o=r.props.children,s=Gt(o,jl).filter(function(u){return bte(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ge(c,n);if(ae(f))return u;var d=Array.isArray(f)?[Gp(f),Vp(f)]:[f,f],p=l.reduce(function(v,m){var y=Ge(c,m,0),g=d[0]-Math.abs(Array.isArray(y)?y[0]:y),b=d[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(g,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},xte=function(t,r,n,i,a){var o=r.map(function(s){return r$(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},n$=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&r$(t,l,u,i)||du(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?Ht(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+u,value:f,offset:u}});return c.filter(function(f){return!zc(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:i(f)+u,value:f,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,d){return{coordinate:i(f)+u,value:a?a[f]:f,index:d,offset:u}})},xv=new WeakMap,kf=function(t,r){if(typeof r!="function")return t;xv.has(t)||xv.set(t,new WeakMap);var n=xv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},o$=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Vu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:sh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:fu(),realScaleType:"point"}:a==="category"?{scale:Vu(),realScaleType:"band"}:{scale:sh(),realScaleType:"linear"};if(ro(i)){var l="scale".concat(Cp(i));return{scale:(CP[l]||fu)(),realScaleType:CP[l]?l:"point"}}return oe(i)?{scale:i}:{scale:fu(),realScaleType:"point"}},BP=1e-4,s$=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-BP,o=Math.max(i[0],i[1])+BP,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},wte=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},Pte=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},jte={sign:Ote,expand:HW,none:_s,silhouette:KW,wiggle:qW,positive:Pte},Ete=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=jte[n],o=WW().keys(i).value(function(s,l){return+Ge(s,l,0)}).order(xg).offset(a);return o(t)},Ate=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var p,v=(p=d.type)!==null&&p!==void 0&&p.defaultProps?et(et({},d.type.defaultProps),d.props):d.props,m=v.stackId,y=v.hide;if(y)return f;var g=v[n],b=f[g]||{hasStack:!1,stackGroups:{}};if(mt(m)){var x=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[vo("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return et(et({},f),{},os({},g,b))},l),c={};return Object.keys(u).reduce(function(f,d){var p=u[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var g=p.stackGroups[y];return et(et({},m),{},os({},y,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:Ete(t,g.items,a)}))},v)}return et(et({},f),{},os({},d,p))},c)},l$=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=zee(u,a,s);return t.domain([Gp(c),Vp(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),d=Uee(f,a,s);return{niceTicks:d}}return null};function ph(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=Bd(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Ge(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var zP=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Ge(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},_te=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Tte=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(mt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},kte=function(t){return t.reduce(function(r,n){return[Gp(n.concat([r[0]]).filter(q)),Vp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},u$=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=kte(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},UP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xg=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(UP.test(t[0])){var a=+UP.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(WP.test(t[1])){var o=+WP.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},mh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=jx(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Fte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=Kt(t.cx,o,o/2),f=Kt(t.cy,s,s/2),d=d$(o,s,n),p=Kt(t.innerRadius,d,0),v=Kt(t.outerRadius,d,d*.8),m=Object.keys(r);return m.reduce(function(y,g){var b=r[g],x=b.domain,S=b.reversed,w;if(ae(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[p,v]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,P=$te(O,2);l=P[0],u=P[1]}var E=o$(b,a),A=E.realScaleType,k=E.scale;k.domain(x).range(w),s$(k);var _=l$(k,In(In({},b),{},{realScaleType:A})),T=In(In(In({},b),_),{},{range:w,radius:v,realScaleType:A,scale:k,cx:c,cy:f,innerRadius:p,outerRadius:v,startAngle:l,endAngle:u});return In(In({},y),{},f$({},g,T))},{})},Bte=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},zte=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Bte({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:Lte(u),angleInRadian:u}},Ute=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Wte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},VP=function(t,r){var n=t.x,i=t.y,a=zte({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=Ute(r),f=c.startAngle,d=c.endAngle,p=s,v;if(f<=d){for(;p>d;)p-=360;for(;p=f&&p<=d}else{for(;p>f;)p-=360;for(;p=d&&p<=f}return v?In(In({},r),{},{radius:o,angle:Wte(p,r)}):null},h$=function(t){return!j.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function nc(e){"@babel/helpers - typeof";return nc=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},nc(e)}var Hte=["offset"];function Kte(e){return Yte(e)||Gte(e)||Vte(e)||qte()}function qte(){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 Vte(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function Gte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yte(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=p+b*o,S=m):i==="insideEnd"?(x=v-b*o,S=!m):i==="end"&&(x=v+b*o,S=m),S=g<=0?S:!S;var w=Re(u,c,y,x),O=Re(u,c,y,x+(S?1:-1)*359),P="M".concat(w.x,",").concat(w.y,` + A`).concat(y,",").concat(y,",0,1,").concat(S?0:1,`, + `).concat(O.x,",").concat(O.y),E=ae(t.id)?vo("recharts-radial-line-"):t.id;return N.createElement("text",ic({},n,{dominantBaseline:"central",className:ce("recharts-radial-bar-label",s)}),N.createElement("defs",null,N.createElement("path",{id:E,d:P})),N.createElement("textPath",{xlinkHref:"#".concat(E)},r))},ire=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,d=(c+f)/2;if(i==="outside"){var p=Re(o,s,u+n,d),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,g=Re(o,s,y,d),b=g.x,x=g.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},are=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*i,p=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,y=m*i,g=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return ft(ft({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:v};return ft(ft({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var w={x:s-y,y:l+c/2,textAnchor:g,verticalAnchor:"middle"};return ft(ft({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if(a==="right"){var O={x:s+u+y,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return ft(ft({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var P=n?{width:u,height:c}:{};return a==="insideLeft"?ft({x:s+y,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},P):a==="insideRight"?ft({x:s+u-y,y:l+c/2,textAnchor:g,verticalAnchor:"middle"},P):a==="insideTop"?ft({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:v},P):a==="insideBottom"?ft({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:p},P):a==="insideTopLeft"?ft({x:s+y,y:l+d,textAnchor:b,verticalAnchor:v},P):a==="insideTopRight"?ft({x:s+u-y,y:l+d,textAnchor:g,verticalAnchor:v},P):a==="insideBottomLeft"?ft({x:s+y,y:l+c-d,textAnchor:b,verticalAnchor:p},P):a==="insideBottomRight"?ft({x:s+u-y,y:l+c-d,textAnchor:g,verticalAnchor:p},P):pl(a)&&(q(a.x)||_a(a.x))&&(q(a.y)||_a(a.y))?ft({x:s+Kt(a.x,u),y:l+Kt(a.y,c),textAnchor:"end",verticalAnchor:"end"},P):ft({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},ore=function(t){return"cx"in t&&q(t.cx)};function xt(e){var t=e.offset,r=t===void 0?5:t,n=Xte(e,Hte),i=ft({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,d=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!j.isValidElement(u)&&!oe(u))return null;if(j.isValidElement(u))return j.cloneElement(u,i);var p;if(oe(u)){if(p=j.createElement(u,i),j.isValidElement(p))return p}else p=tre(i);var v=ore(a),m=re(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return nre(i,p,m);var y=v?ire(i):are(i);return N.createElement(no,ic({className:ce("recharts-label",f)},m,y,{breakAll:d}),p)}xt.displayName="Label";var p$=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,p=t.top,v=t.left,m=t.width,y=t.height,g=t.clockWise,b=t.labelViewBox;if(b)return b;if(q(m)&&q(y)){if(q(f)&&q(d))return{x:f,y:d,width:m,height:y};if(q(p)&&q(v))return{x:p,y:v,width:m,height:y}}return q(f)&&q(d)?{x:f,y:d,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:g}:t.viewBox?t.viewBox:{}},sre=function(t,r){return t?t===!0?N.createElement(xt,{key:"label-implicit",viewBox:r}):mt(t)?N.createElement(xt,{key:"label-implicit",viewBox:r,value:t}):j.isValidElement(t)?t.type===xt?j.cloneElement(t,{key:"label-implicit",viewBox:r}):N.createElement(xt,{key:"label-implicit",content:t,viewBox:r}):oe(t)?N.createElement(xt,{key:"label-implicit",content:t,viewBox:r}):pl(t)?N.createElement(xt,ic({viewBox:r},t,{key:"label-implicit"})):null:null},lre=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=p$(t),o=Gt(i,xt).map(function(l,u){return j.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=sre(t.label,r||a);return[s].concat(Kte(o))};xt.parseViewBox=p$;xt.renderCallByParent=lre;function ure(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var cre=ure;const fre=Ee(cre);function ac(e){"@babel/helpers - typeof";return ac=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},ac(e)}var dre=["valueAccessor"],hre=["data","dataKey","clockWise","id","textBreakAll"];function pre(e){return gre(e)||yre(e)||vre(e)||mre()}function mre(){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 vre(e,t){if(e){if(typeof e=="string")return Jg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jg(e,t)}}function yre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gre(e){if(Array.isArray(e))return Jg(e)}function Jg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Sre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ore=function(t){return Array.isArray(t.value)?fre(t.value):t.value};function jn(e){var t=e.valueAccessor,r=t===void 0?Ore:t,n=QP(e,dre),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=QP(n,hre);return!i||!i.length?null:N.createElement(pe,{className:"recharts-label-list"},i.map(function(c,f){var d=ae(a)?r(c,f):Ge(c&&c.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(f)};return N.createElement(xt,yh({},re(c,!0),u,p,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:xt.parseViewBox(ae(o)?c:XP(XP({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}jn.displayName="LabelList";function Pre(e,t){return e?e===!0?N.createElement(jn,{key:"labelList-implicit",data:t}):N.isValidElement(e)||oe(e)?N.createElement(jn,{key:"labelList-implicit",data:t,content:e}):pl(e)?N.createElement(jn,yh({data:t},e,{key:"labelList-implicit"})):null:null}function jre(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Gt(n,jn).map(function(o,s){return j.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=Pre(e.label,t);return[a].concat(pre(i))}jn.renderCallByParent=jre;function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var p=Re(r,n,i,o),v=Re(r,n,i,u);d+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},kre=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ht(c-u),d=Nf({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=d.circleTangency,v=d.lineTangency,m=d.theta,y=Nf({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),g=y.circleTangency,b=y.lineTangency,x=y.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-x;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):m$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var w="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` + A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(g.x,",").concat(g.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` + `);if(i>0){var O=Nf({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=O.circleTangency,E=O.lineTangency,A=O.theta,k=Nf({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=k.circleTangency,T=k.lineTangency,I=k.theta,M=l?Math.abs(u-c):Math.abs(u-c)-A-I;if(M<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(T.x,",").concat(T.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,` + A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(P.x,",").concat(P.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},Nre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},v$=function(t){var r=ZP(ZP({},Nre),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o0&&Math.abs(c-f)<360?y=kre({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):y=m$({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),N.createElement("path",Zg({},re(r,!0),{className:p,d:y,role:"img"}))};function sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;tHre.call(e,t));function xo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Vre="__v",Gre="__o",Yre="_owner",{getOwnPropertyDescriptor:ij,keys:aj}=Object;function Xre(e,t){return e.byteLength===t.byteLength&&gh(new Uint8Array(e),new Uint8Array(t))}function Qre(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Jre(e,t){return e.byteLength===t.byteLength&&gh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Zre(e,t){return xo(e.getTime(),t.getTime())}function ene(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function tne(e,t){return e===t}function oj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const d=o.value,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const rne=xo;function nne(e,t,r){const n=aj(e);let i=n.length;if(aj(t).length!==i)return!1;for(;i-- >0;)if(!x$(e,t,r,n[i]))return!1;return!0}function Vl(e,t,r){const n=nj(e);let i=n.length;if(nj(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!x$(e,t,r,a)||(o=ij(e,a),s=ij(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ine(e,t){return xo(e.valueOf(),t.valueOf())}function ane(e,t){return e.source===t.source&&e.flags===t.flags}function sj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function gh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function one(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function x$(e,t,r,n){return(n===Yre||n===Gre||n===Vre)&&(e.$$typeof||t.$$typeof)?!0:qre(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const sne="[object ArrayBuffer]",lne="[object Arguments]",une="[object Boolean]",cne="[object DataView]",fne="[object Date]",dne="[object Error]",hne="[object Map]",pne="[object Number]",mne="[object Object]",vne="[object RegExp]",yne="[object Set]",gne="[object String]",bne={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},xne="[object URL]",wne=Object.prototype.toString;function Sne({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:v}){return function(y,g,b){if(y===g)return!0;if(y==null||g==null)return!1;const x=typeof y;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?s(y,g,b):x==="function"?a(y,g,b):!1;const S=y.constructor;if(S!==g.constructor)return!1;if(S===Object)return l(y,g,b);if(Array.isArray(y))return t(y,g,b);if(S===Date)return n(y,g,b);if(S===RegExp)return c(y,g,b);if(S===Map)return o(y,g,b);if(S===Set)return f(y,g,b);const w=wne.call(y);if(w===fne)return n(y,g,b);if(w===vne)return c(y,g,b);if(w===hne)return o(y,g,b);if(w===yne)return f(y,g,b);if(w===mne)return typeof y.then!="function"&&typeof g.then!="function"&&l(y,g,b);if(w===xne)return p(y,g,b);if(w===dne)return i(y,g,b);if(w===lne)return l(y,g,b);if(bne[w])return d(y,g,b);if(w===sne)return e(y,g,b);if(w===cne)return r(y,g,b);if(w===une||w===pne||w===gne)return u(y,g,b);if(v){let O=v[w];if(!O){const P=Kre(y);P&&(O=v[P])}if(O)return O(y,g,b)}return!1}}function One({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Xre,areArraysEqual:r?Vl:Qre,areDataViewsEqual:Jre,areDatesEqual:Zre,areErrorsEqual:ene,areFunctionsEqual:tne,areMapsEqual:r?wv(oj,Vl):oj,areNumbersEqual:rne,areObjectsEqual:r?Vl:nne,arePrimitiveWrappersEqual:ine,areRegExpsEqual:ane,areSetsEqual:r?wv(sj,Vl):sj,areTypedArraysEqual:r?wv(gh,Vl):gh,areUrlsEqual:one,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=$f(n.areArraysEqual),a=$f(n.areMapsEqual),o=$f(n.areObjectsEqual),s=$f(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function Pne(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function jne({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const Ene=ua();ua({strict:!0});ua({circular:!0});ua({circular:!0,strict:!0});ua({createInternalComparator:()=>xo});ua({strict:!0,createInternalComparator:()=>xo});ua({circular:!0,createInternalComparator:()=>xo});ua({circular:!0,createInternalComparator:()=>xo,strict:!0});function ua(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=One(e),o=Sne(a),s=r?r(o):Pne(o);return jne({circular:t,comparator:o,createState:n,equals:s,strict:i})}function Ane(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):Ane(i)};requestAnimationFrame(n)}function t0(e){"@babel/helpers - typeof";return t0=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},t0(e)}function _ne(e){return Cne(e)||Nne(e)||kne(e)||Tne()}function Tne(){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 kne(e,t){if(e){if(typeof e=="string")return uj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uj(e,t)}}function uj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:g<0?0:g},m=function(g){for(var b=g>1?1:g,x=b,S=0;S<8;++S){var w=f(x)-b,O=p(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var p=-(c-f)*n,v=d*a,m=d+(p-v)*s/1e3,y=d*s/1e3+c;return Math.abs(y-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uie(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function Sv(e){return hie(e)||die(e)||fie(e)||cie()}function cie(){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 fie(e,t){if(e){if(typeof e=="string")return o0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o0(e,t)}}function die(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hie(e){if(Array.isArray(e))return o0(e)}function o0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"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 wh(e){return wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wh(e)}var ln=function(e){gie(r,e);var t=bie(r);function r(n,i){var a;pie(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(u0(a)),a.changeStyle=a.changeStyle.bind(u0(a)),!s||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:c}),l0(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof d=="function")return a.state={style:u},l0(a);a.state={style:l?eu({},l,u):u}}else a.state={style:{}};return a}return vie(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,d=this.state.style;if(s){if(!o){var p={style:l?eu({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(p);return}if(!(Ene(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&d){var y={style:l?eu({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(y)}this.runAnimation(Kr(Kr({},this.props),{},{from:m,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 a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,d=i.onAnimationStart,p=oie(o,s,Yne(u),l,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([d,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,p=function(m,y,g){if(g===0)return m;var b=y.duration,x=y.easing,S=x===void 0?"ease":x,w=y.style,O=y.properties,P=y.onAnimationEnd,E=g>0?o[g-1]:y,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(Sv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:b,easing:S}),b]);var k=dj(A,b,S),_=Kr(Kr(Kr({},E.style),w),{},{transition:k});return[].concat(Sv(m),[_,b,P]).filter(Rne)};return this.manager.start([l].concat(Sv(o.reduce(p,[c,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=$ne());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,d=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var m=s?eu({},s,l):l,y=dj(Object.keys(m),o,u);v.start([c,a,Kr(Kr({},m),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=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 l=lie(i,sie),u=j.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(p){var v=p.props,m=v.style,y=m===void 0?{}:m,g=v.className,b=j.cloneElement(p,Kr(Kr({},l),{},{style:Kr(Kr({},y),c),className:g}));return b};return u===1?f(j.Children.only(a)):N.createElement("div",null,j.Children.map(a,function(d){return f(d)}))}}]),r}(j.PureComponent);ln.displayName="Animate";ln.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ln.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function Sh(){return Sh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],d=0,p=4;do?o:a[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, + `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` + L `).concat(t+n-l*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` + L `).concat(t+n,",").concat(r+i-s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` + L `).concat(t+l*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},Tie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=d}return!1},kie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Jx=function(t){var r=xj(xj({},kie),t),n=j.useRef(),i=j.useState(-1),a=wie(i,2),o=a[0],s=a[1];j.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,p=r.className,v=r.animationEasing,m=r.animationDuration,y=r.animationBegin,g=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=ce("recharts-rectangle",p);return b?N.createElement(ln,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:b},function(S){var w=S.width,O=S.height,P=S.x,E=S.y;return N.createElement(ln,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:g,easing:v},N.createElement("path",Sh({},re(r,!0),{className:x,d:wj(P,E,w,O,d),ref:n})))}):N.createElement("path",Sh({},re(r,!0),{className:x,d:wj(l,u,c,f,d)}))},Nie=["points","className","baseLinePoints","connectNulls"];function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sj(e){return Rie(e)||Die(e)||Iie(e)||Mie()}function Mie(){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 Iie(e,t){if(e){if(typeof e=="string")return c0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c0(e,t)}}function Die(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rie(e){if(Array.isArray(e))return c0(e)}function c0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Oj(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Oj(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},pu=function(t,r){var n=Lie(t);r&&(n=[n.reduce(function(a,o){return[].concat(Sj(a),Sj(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},Fie=function(t,r,n){var i=pu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(pu(r.reverse(),n).slice(1))},Bie=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=Cie(t,Nie);if(!r||!r.length)return null;var s=ce("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=Fie(r,i,a);return N.createElement("g",{className:s},N.createElement("path",qo({},re(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?N.createElement("path",qo({},re(o,!0),{fill:"none",d:pu(r,a)})):null,l?N.createElement("path",qo({},re(o,!0),{fill:"none",d:pu(i,a)})):null)}var c=pu(r,a);return N.createElement("path",qo({},re(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function f0(){return f0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Gie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Yie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,p=d===void 0?0:d,v=t.className,m=qie(t,zie),y=Uie({x:n,y:a,top:s,left:u,width:f,height:p},m);return!q(n)||!q(a)||!q(f)||!q(p)||!q(s)||!q(u)?null:N.createElement("path",d0({},re(y,!0),{className:ce("recharts-cross",v),d:Gie(n,a,f,p,s,u)}))},Xie=qp,Qie=LC,Jie=kn;function Zie(e,t){return e&&e.length?Xie(e,Jie(t),Qie):void 0}var eae=Zie;const tae=Ee(eae);var rae=qp,nae=kn,iae=FC;function aae(e,t){return e&&e.length?rae(e,nae(t),iae):void 0}var oae=aae;const sae=Ee(oae);var lae=["cx","cy","angle","ticks","axisLine"],uae=["ticks","tick","angle","tickFormatter","stroke"];function Ls(e){"@babel/helpers - typeof";return Ls=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},Ls(e)}function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aj(e,t){for(var r=0;rkj?o=i==="outer"?"start":"end":a<-kj?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ma(ma({},re(this.props,!1)),{},{fill:"none"},re(s,!1));if(l==="circle")return N.createElement(Qp,Sa({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return Re(i,a,o,d.coordinate)});return N.createElement(Bie,Sa({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=re(this.props,!1),f=re(o,!1),d=ma(ma({},c),{},{fill:"none"},re(s,!1)),p=a.map(function(v,m){var y=n.getTickLineCoord(v),g=n.getTickTextAnchor(v),b=ma(ma(ma({textAnchor:g},c),{},{stroke:"none",fill:u},f),{},{index:m,payload:v,x:y.x2,y:y.y2});return N.createElement(pe,Sa({className:ce("recharts-polar-angle-axis-tick",h$(o)),key:"tick-".concat(v.coordinate)},ea(n.props,v,m)),s&&N.createElement("line",Sa({className:"recharts-polar-angle-axis-tick-line"},d,y)),o&&t.renderTickItem(o,b,l?l(v.value,m):v.value))});return N.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:N.createElement(pe,{className:ce("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return N.isValidElement(n)?o=N.cloneElement(n,i):oe(n)?o=n(i):o=N.createElement(no,Sa({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(j.PureComponent);em(tm,"displayName","PolarAngleAxis");em(tm,"axisType","angleAxis");em(tm,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Eae=MN,Aae=Eae(Object.getPrototypeOf,Object),_ae=Aae,Tae=li,kae=_ae,Nae=ui,Cae="[object Object]",$ae=Function.prototype,Mae=Object.prototype,N$=$ae.toString,Iae=Mae.hasOwnProperty,Dae=N$.call(Object);function Rae(e){if(!Nae(e)||Tae(e)!=Cae)return!1;var t=kae(e);if(t===null)return!0;var r=Iae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&N$.call(r)==Dae}var Lae=Rae;const Fae=Ee(Lae);var Bae=li,zae=ui,Uae="[object Boolean]";function Wae(e){return e===!0||e===!1||zae(e)&&Bae(e)==Uae}var Hae=Wae;const Kae=Ee(Hae);function hc(e){"@babel/helpers - typeof";return hc=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},hc(e)}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:m,animationEasing:v,isActive:g},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,P=x.x,E=x.y;return N.createElement(ln,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:v},N.createElement("path",jh({},re(r,!0),{className:b,d:Mj(P,E,S,w,O),ref:n})))}):N.createElement("g",null,N.createElement("path",jh({},re(r,!0),{className:b,d:Mj(l,u,c,f,d)})))},roe=["option","shapeType","propTransformer","activeClassName","isActive"];function pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function noe(e,t){if(e==null)return{};var r=ioe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ioe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ij(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eh(e){for(var t=1;t0?br(x,"paddingAngle",0):0;if(w){var P=At(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Me(Me({},x),{},{startAngle:b+O,endAngle:b+P(m)+O});y.push(E),b=E.endAngle}else{var A=x.endAngle,k=x.startAngle,_=At(0,A-k),T=_(m),I=Me(Me({},x),{},{startAngle:b+O,endAngle:b+T+O});y.push(I),b=I.endAngle}}),N.createElement(pe,null,n.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Sl(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,p=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(c)||!q(f)||!q(d))return null;var m=ce("recharts-pie",s);return N.createElement(pe,{tabIndex:this.props.rootTabIndex,className:m,ref:function(g){n.pieRef=g}},this.renderSectors(),l&&this.renderLabels(o),xt.renderCallByParent(this.props,null,!1),(!p||v)&&jn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=y-b*p-x,w=i.reduce(function(E,A){var k=Ge(A,g,0);return E+(q(k)?k:0)},0),O;if(w>0){var P;O=i.map(function(E,A){var k=Ge(E,g,0),_=Ge(E,c,A),T=(q(k)?k:0)/w,I;A?I=P.endAngle+Ht(m)*l*(k!==0?1:0):I=o;var M=I+Ht(m)*((k!==0?p:0)+T*S),D=(I+M)/2,R=(v.innerRadius+v.outerRadius)/2,z=[{name:_,value:k,payload:E,dataKey:g,type:d}],$=Re(v.cx,v.cy,R,D);return P=Me(Me(Me({percent:T,cornerRadius:a,name:_,tooltipPayload:z,midAngle:D,middleRadius:R,tooltipPosition:$},E),v),{},{value:Ge(E,g),startAngle:I,endAngle:M,payload:E,paddingAngle:Ht(m)*l}),P})}return Me(Me({},v),{},{sectors:O,data:i})});var joe=Math.ceil,Eoe=Math.max;function Aoe(e,t,r,n){for(var i=-1,a=Eoe(joe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var _oe=Aoe,Toe=ZN,Fj=1/0,koe=17976931348623157e292;function Noe(e){if(!e)return e===0?e:0;if(e=Toe(e),e===Fj||e===-Fj){var t=e<0?-1:1;return t*koe}return e===e?e:0}var M$=Noe,Coe=_oe,$oe=Fp,Ov=M$;function Moe(e){return function(t,r,n){return n&&typeof n!="number"&&$oe(t,r,n)&&(r=n=void 0),t=Ov(t),r===void 0?(r=t,t=0):r=Ov(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),hr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),hr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),hr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),hr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),hr(n,"handleSlideDragStart",function(i){var a=Hj(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Goe(t,e),Hoe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:p-p%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Ge(a[n],s,n);return oe(o)?o(l,n):l}},{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(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,p=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==d||y.endIndex!==p)&&v&&v(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Hj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,p=c.travellerWidth,v=c.onChange,m=c.gap,y=c.data,g={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-p-u):b<0&&(b=Math.max(b,f-u)),g[o]=u+b;var x=this.getIndex(g),S=x.startIndex,w=x.endIndex,O=function(){var E=y.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(hr(hr({},o,u+b),"brushMoveStartX",n.pageX),function(){v&&O()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var p=s[d];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(hr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return N.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=j.Children.only(u);return f?N.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,p=l.ariaLabel,v=l.data,m=l.startIndex,y=l.endIndex,g=Math.max(n,this.props.x),b=Pv(Pv({},re(this.props,!1)),{},{x:g,y:u,width:c,height:f}),x=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[y])===null||o===void 0?void 0:o.name);return N.createElement(pe,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return N.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,p=5,v={pointerEvents:"none",fill:u};return N.createElement(pe,{className:"recharts-brush-texts"},N.createElement(no,kh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+s/2},v),this.getTextOfTick(i)),N.createElement(no,kh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,p=d.startX,v=d.endX,m=d.isTextActive,y=d.isSlideMoving,g=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(c)||u<=0||c<=0)return null;var x=ce("recharts-brush",a),S=N.Children.count(o)===1,w=Uoe("userSelect","none");return N.createElement(pe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||y||g||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return N.createElement(N.Fragment,null,N.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),N.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),N.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return N.isValidElement(n)?a=N.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return Pv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Xoe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(j.PureComponent);hr(Us,"displayName","Brush");hr(Us,"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 Qoe=Px;function Joe(e,t){var r;return Qoe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Zoe=Joe,ese=EN,tse=kn,rse=Zoe,nse=fr,ise=Fp;function ase(e,t,r){var n=nse(e)?ese:rse;return r&&ise(e,t,r)&&(t=void 0),n(e,tse(t))}var ose=ase;const sse=Ee(ose);var En=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Kj=GN;function lse(e,t,r){t=="__proto__"&&Kj?Kj(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var use=lse,cse=use,fse=qN,dse=kn;function hse(e,t){var r={};return t=dse(t),fse(e,function(n,i,a){cse(r,i,t(n,i,a))}),r}var pse=hse;const mse=Ee(pse);function vse(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $se(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mse(e,t){var r=e.x,n=e.y,i=Cse(e,_se),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),d=parseInt(f,10);return Gl(Gl(Gl(Gl(Gl({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Vj(e){return N.createElement(Ah,y0({shapeType:"rectangle",propTransformer:Mse,activeClassName:"recharts-active-bar"},e))}var Ise=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||t6(n);return a?t(n,i):(a||ao(),r)}},Dse=["value","background"],F$;function Ws(e){"@babel/helpers - typeof";return Ws=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},Ws(e)}function Rse(e,t){if(e==null)return{};var r=Lse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(D)0&&Math.abs(M)0&&(I=Math.min((ne||0)-(M[we-1]||0),I))}),Number.isFinite(I)){var D=I/T,R=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(P=D*R/2),m.padding==="no-gap"){var z=Kt(t.barCategoryGap,D*R),$=D*R/2;P=$-z-($-z)/R*z}}}i==="xAxis"?E=[n.left+(x.left||0)+(P||0),n.left+n.width-(x.right||0)-(P||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(P||0),n.top+n.height-(x.bottom||0)-(P||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=o$(m,a,d),W=F.scale,V=F.realScaleType;W.domain(g).range(E),s$(W);var H=l$(W,Qr(Qr({},m),{},{realScaleType:V}));i==="xAxis"?(_=y==="top"&&!S||y==="bottom"&&S,A=n.left,k=f[O]-_*m.height):i==="yAxis"&&(_=y==="left"&&!S||y==="right"&&S,A=f[O]-_*m.width,k=n.top);var Y=Qr(Qr(Qr({},m),H),{},{realScaleType:V,x:A,y:k,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=mh(Y,H),!m.hide&&i==="xAxis"?f[O]+=(_?-1:1)*Y.height:m.hide||(f[O]+=(_?-1:1)*Y.width),Qr(Qr({},p),{},im({},v,Y))},{})},H$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Yse=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return H$({x:r,y:n},{x:i,y:a})},K$=function(){function e(t){qse(this,e),this.scale=t}return Vse(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();im(K$,"EPS",1e-4);var Zx=function(t){var r=Object.keys(t).reduce(function(n,i){return Qr(Qr({},n),{},im({},i,K$.create(t[i])))},{});return Qr(Qr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return mse(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return L$(i,function(a,o){return r[o].isInRange(a)})}})};function Xse(e){return(e%180+180)%180}var Qse=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Xse(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var rle=tle,nle=M$;function ile(e){var t=nle(e),r=t%1;return t===t?r?t-r:t:0}var ale=ile,ole=BN,sle=kn,lle=ale,ule=Math.max;function cle(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:lle(r);return i<0&&(i=ule(n+i,0)),ole(e,sle(t),i)}var fle=cle,dle=rle,hle=fle,ple=dle(hle),mle=ple;const vle=Ee(mle);var yle=s8(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("")}),ew=j.createContext(void 0),tw=j.createContext(void 0),q$=j.createContext(void 0),V$=j.createContext({}),G$=j.createContext(void 0),Y$=j.createContext(0),X$=j.createContext(0),Jj=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=yle(a);return N.createElement(ew.Provider,{value:n},N.createElement(tw.Provider,{value:i},N.createElement(V$.Provider,{value:a},N.createElement(q$.Provider,{value:c},N.createElement(G$.Provider,{value:o},N.createElement(Y$.Provider,{value:u},N.createElement(X$.Provider,{value:l},s)))))))},gle=function(){return j.useContext(G$)},Q$=function(t){var r=j.useContext(ew);r==null&&ao();var n=r[t];return n==null&&ao(),n},ble=function(){var t=j.useContext(ew);return Pi(t)},xle=function(){var t=j.useContext(tw),r=vle(t,function(n){return L$(n.domain,Number.isFinite)});return r||Pi(t)},J$=function(t){var r=j.useContext(tw);r==null&&ao();var n=r[t];return n==null&&ao(),n},wle=function(){var t=j.useContext(q$);return t},Sle=function(){return j.useContext(V$)},rw=function(){return j.useContext(X$)},nw=function(){return j.useContext(Y$)};function Hs(e){"@babel/helpers - typeof";return Hs=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},Hs(e)}function Ole(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ple(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function aue(e,t){return a2(e,t+1)}function oue(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:a2(n,u)};var m=l,y,g=function(){return y===void 0&&(y=r(v,m)),y},b=v.coordinate,x=l===0||Rh(e,b,g,c,s);x||(l=0,c=o,u+=1),x&&(c=b+e*(g()/2+i),l+=u)},d;u<=a.length;)if(d=f(),d)return d.v;return[]}function bc(e){"@babel/helpers - typeof";return bc=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},bc(e)}function oE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else a[d]=p=Ct(Ct({},p),{},{tickCoord:p.coordinate});var g=Rh(e,p.tickCoord,m,s,l);g&&(l=p.tickCoord-e*(m()/2+i),a[d]=Ct(Ct({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function fue(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=Ct(Ct({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var p=Rh(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Ct(Ct({},c),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Ct(Ct({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Ct(Ct({},x),{},{tickCoord:x.coordinate});var P=Rh(e,x.tickCoord,w,l,u);P&&(l=x.tickCoord+e*(w()/2+i),o[b]=Ct(Ct({},x),{},{isShow:!0}))},y=0;y=2?Ht(i[1].coordinate-i[0].coordinate):1,g=iue(a,y,p);return l==="equidistantPreserveStart"?oue(y,g,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=fue(y,g,m,i,o,l==="preserveStartEnd"):d=cue(y,g,m,i,o),d.filter(function(b){return b.isShow}))}var due=["viewBox"],hue=["viewBox"],pue=["ticks"];function Vs(e){"@babel/helpers - typeof";return Vs=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},Vs(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lE(e,t){for(var r=0;r0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:N.createElement(pe,{className:ce("recharts-cartesian-axis",u),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),xt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ce(i.className,"recharts-cartesian-axis-tick-value");return N.isValidElement(n)?o=N.cloneElement(n,ct(ct({},i),{},{className:s})):oe(n)?o=n(ct(ct({},i),{},{className:s})):o=N.createElement(no,Go({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(j.Component);sw(El,"displayName","CartesianAxis");sw(El,"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 Oue=["x1","y1","x2","y2","key"],Pue=["offset"];function oo(e){"@babel/helpers - typeof";return oo=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},oo(e)}function uE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _ue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Tue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return N.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function l2(e,t){var r;if(N.isValidElement(e))r=N.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=cE(t,Oue),u=re(l,!1);u.offset;var c=cE(u,Pue);r=N.createElement("line",Na({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function kue(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return l2(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Nue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return l2(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Cue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],m=v?i+o-d:c[p+1]-d;if(m<=0)return null;var y=p%t.length;return N.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:m,width:a,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function $ue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],m=v?a+s-d:c[p+1]-d;if(m<=0)return null;var y=p%n.length;return N.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:m,height:l,stroke:"none",fill:n[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var Mue=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return a$(ow(Mt(Mt(Mt({},El.defaultProps),n),{},{ticks:Kn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},Iue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return a$(ow(Mt(Mt(Mt({},El.defaultProps),n),{},{ticks:Kn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},_o={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Gs(e){var t,r,n,i,a,o,s=rw(),l=nw(),u=Sle(),c=Mt(Mt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:_o.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:_o.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:_o.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:_o.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:_o.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:_o.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),f=c.x,d=c.y,p=c.width,v=c.height,m=c.syncWithTicks,y=c.horizontalValues,g=c.verticalValues,b=ble(),x=xle();if(!q(p)||p<=0||!q(v)||v<=0||!q(f)||f!==+f||!q(d)||d!==+d)return null;var S=c.verticalCoordinatesGenerator||Mue,w=c.horizontalCoordinatesGenerator||Iue,O=c.horizontalPoints,P=c.verticalPoints;if((!O||!O.length)&&oe(w)){var E=y&&y.length,A=w({yAxis:x?Mt(Mt({},x),{},{ticks:E?y:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);nn(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(oo(A),"]")),Array.isArray(A)&&(O=A)}if((!P||!P.length)&&oe(S)){var k=g&&g.length,_=S({xAxis:b?Mt(Mt({},b),{},{ticks:k?g:b.ticks}):void 0,width:s,height:l,offset:u},k?!0:m);nn(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(oo(_),"]")),Array.isArray(_)&&(P=_)}return N.createElement("g",{className:"recharts-cartesian-grid"},N.createElement(Tue,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),N.createElement(kue,Na({},c,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),N.createElement(Nue,Na({},c,{offset:u,verticalPoints:P,xAxis:b,yAxis:x})),N.createElement(Cue,Na({},c,{horizontalPoints:O})),N.createElement($ue,Na({},c,{verticalPoints:P})))}Gs.displayName="CartesianGrid";var Due=["type","layout","connectNulls","ref"],Rue=["key"];function Ys(e){"@babel/helpers - typeof";return Ys=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},Ys(e)}function fE(e,t){if(e==null)return{};var r=Lue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){p=[].concat(To(l.slice(0,v)),[f-m]);break}var y=p.length%2===0?[0,d]:[d];return[].concat(To(t.repeat(l,c)),To(p),y).map(function(g){return"".concat(g,"px")}).join(", ")}),Jr(r,"id",vo("recharts-line-")),Jr(r,"pathRef",function(o){r.mainCurve=o}),Jr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Jr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Gue(t,e),Hue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=Gt(c,jl);if(!f)return null;var d=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:Ge(m.payload,y)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return N.createElement(pe,p,f.map(function(v){return N.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=re(this.props,!1),d=re(l,!0),p=u.map(function(m,y){var g=dr(dr(dr({key:"dot-".concat(y),r:3},f),d),{},{index:y,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,g)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return N.createElement(pe,vu({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=fE(s,Due),d=dr(dr(dr({},re(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return N.createElement(lc,vu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,y=o.height,g=this.state,b=g.prevPoints,x=g.totalLength;return N.createElement(ln,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(b){var O=b.length/s.length,P=s.map(function(T,I){var M=Math.floor(I*O);if(b[M]){var D=b[M],R=At(D.x,T.x),z=At(D.y,T.y);return dr(dr({},T),{},{x:R(w),y:z(w)})}if(v){var $=At(m*2,T.x),F=At(y/2,T.y);return dr(dr({},T),{},{x:$(w),y:F(w)})}return dr(dr({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(P,n,i)}var E=At(0,x),A=E(w),k;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});k=a.getStrokeDasharray(A,x,_)}else k=a.generateSimpleStrokeDasharray(x,A);return a.renderCurveStatically(s,n,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Sl(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,d=i.left,p=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var g=this.state.isAnimationFinished,b=s.length===1,x=ce("recharts-line",l),S=u&&u.allowDataOverflow,w=c&&c.allowDataOverflow,O=S||w,P=ae(y)?this.id:y,E=(n=re(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=E.r,k=A===void 0?3:A,_=E.strokeWidth,T=_===void 0?2:_,I=p6(o)?o:{},M=I.clipDot,D=M===void 0?!0:M,R=k*2+T;return N.createElement(pe,{className:x},S||w?N.createElement("defs",null,N.createElement("clipPath",{id:"clipPath-".concat(P)},N.createElement("rect",{x:S?d:d-p/2,y:w?f:f-v/2,width:S?p:p*2,height:w?v:v*2})),!D&&N.createElement("clipPath",{id:"clipPath-dots-".concat(P)},N.createElement("rect",{x:d-R/2,y:f-R/2,width:p+R,height:v+R}))):null,!b&&this.renderCurve(O,P),this.renderErrorBar(O,P),(b||o)&&this.renderDots(O,D,P),(!m||g)&&jn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(To(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sce(e){var t=e.option,r=e.isActive,n=ace(e,ice);return typeof t=="string"?j.createElement(Ah,yu({option:j.createElement(Dp,yu({type:t},n)),isActive:r,shapeType:"symbols"},n)):j.createElement(Ah,yu({option:t,isActive:r,shapeType:"symbols"},n))}function Qs(e){"@babel/helpers - typeof";return Qs=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},Qs(e)}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rfe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ife(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function T2(e){return e==="number"?[0,"auto"]:void 0}var L0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=cm(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;d=Bd(p,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(tl(l),[c$(u,d)]):l},[])},wE=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=vfe(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=mte(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=L0(t,r,c,f),p=yfe(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:p}}return null},gfe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,p=i$(c,a);return n.reduce(function(v,m){var y,g=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,b=g.type,x=g.dataKey,S=g.allowDataOverflow,w=g.allowDuplicatedCategory,O=g.scale,P=g.ticks,E=g.includeHidden,A=g[o];if(v[A])return v;var k=cm(t.data,{graphicalItems:i.filter(function(H){var Y,ne=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return ne===A}),dataStartIndex:l,dataEndIndex:u}),_=k.length,T,I,M;Hce(g.domain,S,b)&&(T=Xg(g.domain,null,S),p&&(b==="number"||O!=="auto")&&(M=du(k,x,"category")));var D=T2(b);if(!T||T.length===0){var R,z=(R=g.domain)!==null&&R!==void 0?R:D;if(x){if(T=du(k,x,b),b==="category"&&p){var $=n6(T);w&&$?(I=T,T=Th(0,_)):w||(T=HP(z,T,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(tl(H),[Y])},[]))}else if(b==="category")w?T=T.filter(function(H){return H!==""&&!ae(H)}):T=HP(z,T,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(tl(H),[Y])},[]);else if(b==="number"){var F=xte(k,i.filter(function(H){var Y,ne,we=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],We="hide"in H.props?H.props.hide:(ne=H.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return we===A&&(E||!We)}),x,a,c);F&&(T=F)}p&&(b==="number"||O!=="auto")&&(M=du(k,x,"category"))}else p?T=Th(0,_):s&&s[A]&&s[A].hasStack&&b==="number"?T=d==="expand"?[0,1]:u$(s[A].stackGroups,l,u):T=n$(k,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],ne="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===A&&(E||!ne)}),b,c,!0);if(b==="number")T=I0(f,T,A,a,P),z&&(T=Xg(z,T,S));else if(b==="category"&&z){var W=z,V=T.every(function(H){return W.indexOf(H)>=0});V&&(T=W)}}return B(B({},v),{},ie({},A,B(B({},g),{},{axisType:a,domain:T,categoricalDomain:M,duplicateDomain:I,originalDomain:(y=g.domain)!==null&&y!==void 0?y:D,isCategorical:p,layout:c})))},{})},bfe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=cm(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,v=i$(c,a),m=-1;return n.reduce(function(y,g){var b=g.type.defaultProps!==void 0?B(B({},g.type.defaultProps),g.props):g.props,x=b[o],S=T2("number");if(!y[x]){m++;var w;return v?w=Th(0,p):s&&s[x]&&s[x].hasStack?(w=u$(s[x].stackGroups,l,u),w=I0(f,w,x,a)):(w=Xg(S,n$(d,n.filter(function(O){var P,E,A=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],k="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return A===x&&!k}),"number",c),i.defaultProps.allowDataOverflow),w=I0(f,w,x,a)),B(B({},y),{},ie({},x,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:br(pfe,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:v,layout:c})))}return y},{})},xfe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),d=Gt(c,a),p={};return d&&d.length?p=gfe(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=bfe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},wfe=function(t){var r=Pi(t),n=Kn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:jx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:mh(r,n)}},SE=function(t){var r=t.children,n=t.defaultShowTooltip,i=mr(r,Us),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Sfe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Vn(r&&r.type);return n&&n.indexOf("Bar")>=0})},OE=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"}},Ofe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},p=mr(f,Us),v=mr(f,Lr),m=Object.keys(l).reduce(function(w,O){var P=l[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,w[E]+P.width)):w},{left:d.left||0,right:d.right||0}),y=Object.keys(o).reduce(function(w,O){var P=o[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,br(w,"".concat(E))+P.height)):w},{top:d.top||0,bottom:d.bottom||0}),g=B(B({},y),m),b=g.bottom;p&&(g.bottom+=p.props.height||Us.defaultProps.height),v&&r&&(g=gte(g,i,n,r));var x=u-g.left-g.right,S=c-g.top-g.bottom;return B(B({brushBottom:b},g),{},{width:Math.max(x,0),height:Math.max(S,0)})},Pfe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},lw=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(g,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,P=b.dataStartIndex,E=b.dataEndIndex,A=g.barSize,k=g.layout,_=g.barGap,T=g.barCategoryGap,I=g.maxBarSize,M=OE(k),D=M.numericAxisName,R=M.cateAxisName,z=Sfe(x),$=[];return x.forEach(function(F,W){var V=cm(g.data,{graphicalItems:[F],dataStartIndex:P,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,ne=H.maxBarSize,we=H["".concat(D,"Id")],We=H["".concat(R,"Id")],Oe={},Ot=l.reduce(function(ca,fa){var ym=b["".concat(fa.axisType,"Map")],bw=H["".concat(fa.axisType,"Id")];ym&&ym[bw]||fa.axisType==="zAxis"||ao();var xw=ym[bw];return B(B({},ca),{},ie(ie({},fa.axisType,xw),"".concat(fa.axisType,"Ticks"),Kn(xw)))},Oe),G=Ot[R],se=Ot["".concat(R,"Ticks")],le=S&&S[we]&&S[we].hasStack&&Tte(F,S[we].stackGroups),U=Vn(F.type).indexOf("Bar")>=0,Qe=mh(G,se),ye=[],st=z&&vte({barSize:A,stackGroups:S,totalSize:Pfe(Ot,R)});if(U){var lt,Qt,di=ae(ne)?I:ne,So=(lt=(Qt=mh(G,se,!0))!==null&&Qt!==void 0?Qt:di)!==null&<!==void 0?lt:0;ye=yte({barGap:_,barCategoryGap:T,bandSize:So!==Qe?So:Qe,sizeList:st[We],maxBarSize:di}),So!==Qe&&(ye=ye.map(function(ca){return B(B({},ca),{},{position:B(B({},ca.position),{},{offset:ca.position.offset-So/2})})}))}var Qc=F&&F.type&&F.type.getComposedData;Qc&&$.push({props:B(B({},Qc(B(B({},Ot),{},{displayedData:V,props:g,dataKey:Y,item:F,bandSize:Qe,barPosition:ye,offset:w,stackedData:le,layout:k,dataStartIndex:P,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},D,Ot[D]),R,Ot[R]),"animationId",O)),childIndex:y6(F,g.children),item:F})}),$},p=function(g,b){var x=g.props,S=g.dataStartIndex,w=g.dataEndIndex,O=g.updateId;if(!LS({props:x}))return null;var P=x.children,E=x.layout,A=x.stackOffset,k=x.data,_=x.reverseStackOrder,T=OE(E),I=T.numericAxisName,M=T.cateAxisName,D=Gt(P,n),R=Ate(k,D,"".concat(I,"Id"),"".concat(M,"Id"),A,_),z=l.reduce(function(H,Y){var ne="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},ne,xfe(x,B(B({},Y),{},{graphicalItems:D,stackGroups:Y.axisType===I&&R,dataStartIndex:S,dataEndIndex:w}))))},{}),$=Ofe(B(B({},z),{},{props:x,graphicalItems:D}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(H){z[H]=c(x,z[H],$,H.replace("Map",""),r)});var F=z["".concat(M,"Map")],W=wfe(F),V=d(x,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:D,stackGroups:R,offset:$}));return B(B({formattedGraphicalItems:V,graphicalItems:D,offset:$,stackGroups:R},W),z)},v=function(y){function g(b){var x,S,w;return nfe(this,g),w=ofe(this,g,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new Wce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var P=w.state,E=P.dataStartIndex,A=P.dataEndIndex,k=P.updateId;w.setState(B({legendBBox:O},p({props:w.props,dataStartIndex:E,dataEndIndex:A,updateId:k},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,P,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(P)}}),ie(w,"handleBrushChange",function(O){var P=O.startIndex,E=O.endIndex;if(P!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return B({dataStartIndex:P,dataEndIndex:E},p({props:w.props,dataStartIndex:P,dataEndIndex:E,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseEnter;oe(A)&&A(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var P=w.getMouseInfo(O),E=P?B(B({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseMove;oe(A)&&A(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var E=w.props.onMouseLeave;oe(E)&&E(P,O)}),ie(w,"handleOuterEvent",function(O){var P=v6(O),E=br(w.props,"".concat(P));if(P&&oe(E)){var A,k;/.*touch.*/i.test(P)?k=w.getMouseInfo(O.changedTouches[0]):k=w.getMouseInfo(O),E((A=k)!==null&&A!==void 0?A:{},O)}}),ie(w,"handleClick",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onClick;oe(A)&&A(E,O)}}),ie(w,"handleMouseDown",function(O){var P=w.props.onMouseDown;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleMouseUp",function(O){var P=w.props.onMouseUp;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var P=w.props.onDoubleClick;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleContextMenu",function(O){var P=w.props.onContextMenu;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&Ev.emit(Av,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var P=w.props,E=P.layout,A=P.syncMethod,k=w.state.updateId,_=O.dataStartIndex,T=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:_,dataEndIndex:T},p({props:w.props,dataStartIndex:_,dataEndIndex:T,updateId:k},w.state)));else if(O.activeTooltipIndex!==void 0){var I=O.chartX,M=O.chartY,D=O.activeTooltipIndex,R=w.state,z=R.offset,$=R.tooltipTicks;if(!z)return;if(typeof A=="function")D=A($,O);else if(A==="value"){D=-1;for(var F=0;F<$.length;F++)if($[F].value===O.activeLabel){D=F;break}}var W=B(B({},z),{},{x:z.left,y:z.top}),V=Math.min(I,W.x+W.width),H=Math.min(M,W.y+W.height),Y=$[D]&&$[D].value,ne=L0(w.state,w.props.data,D),we=$[D]?{x:E==="horizontal"?$[D].coordinate:V,y:E==="horizontal"?H:$[D].coordinate}:_2;w.setState(B(B({},O),{},{activeLabel:Y,activeCoordinate:we,activePayload:ne,activeTooltipIndex:D}))}else w.setState(O)}),ie(w,"renderCursor",function(O){var P,E=w.state,A=E.isTooltipActive,k=E.activeCoordinate,_=E.activePayload,T=E.offset,I=E.activeTooltipIndex,M=E.tooltipAxisBandSize,D=w.getTooltipEventType(),R=(P=O.props.active)!==null&&P!==void 0?P:A,z=w.props.layout,$=O.key||"_recharts-cursor";return N.createElement(Xce,{key:$,activeCoordinate:k,activePayload:_,activeTooltipIndex:I,chartName:r,element:O,isActive:R,layout:z,offset:T,tooltipAxisBandSize:M,tooltipEventType:D})}),ie(w,"renderPolarAxis",function(O,P,E){var A=br(O,"type.axisType"),k=br(w.state,"".concat(A,"Map")),_=O.type.defaultProps,T=_!==void 0?B(B({},_),O.props):O.props,I=k&&k[T["".concat(A,"Id")]];return j.cloneElement(O,B(B({},I),{},{className:ce(A,I.className),key:O.key||"".concat(P,"-").concat(E),ticks:Kn(I,!0)}))}),ie(w,"renderPolarGrid",function(O){var P=O.props,E=P.radialLines,A=P.polarAngles,k=P.polarRadius,_=w.state,T=_.radiusAxisMap,I=_.angleAxisMap,M=Pi(T),D=Pi(I),R=D.cx,z=D.cy,$=D.innerRadius,F=D.outerRadius;return j.cloneElement(O,{polarAngles:Array.isArray(A)?A:Kn(D,!0).map(function(W){return W.coordinate}),polarRadius:Array.isArray(k)?k:Kn(M,!0).map(function(W){return W.coordinate}),cx:R,cy:z,innerRadius:$,outerRadius:F,key:O.key||"polar-grid",radialLines:E})}),ie(w,"renderLegend",function(){var O=w.state.formattedGraphicalItems,P=w.props,E=P.children,A=P.width,k=P.height,_=w.props.margin||{},T=A-(_.left||0)-(_.right||0),I=t$({children:E,formattedGraphicalItems:O,legendWidth:T,legendContent:u});if(!I)return null;var M=I.item,D=bE(I,Qce);return j.cloneElement(M,B(B({},D),{},{chartWidth:A,chartHeight:k,margin:_,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),ie(w,"renderTooltip",function(){var O,P=w.props,E=P.children,A=P.accessibilityLayer,k=mr(E,Et);if(!k)return null;var _=w.state,T=_.isTooltipActive,I=_.activeCoordinate,M=_.activePayload,D=_.activeLabel,R=_.offset,z=(O=k.props.active)!==null&&O!==void 0?O:T;return j.cloneElement(k,{viewBox:B(B({},R),{},{x:R.left,y:R.top}),active:z,label:D,payload:z?M:[],coordinate:I,accessibilityLayer:A})}),ie(w,"renderBrush",function(O){var P=w.props,E=P.margin,A=P.data,k=w.state,_=k.offset,T=k.dataStartIndex,I=k.dataEndIndex,M=k.updateId;return j.cloneElement(O,{key:O.key||"_recharts-brush",onChange:kf(w.handleBrushChange,O.props.onChange),data:A,x:q(O.props.x)?O.props.x:_.left,y:q(O.props.y)?O.props.y:_.top+_.height+_.brushBottom-(E.bottom||0),width:q(O.props.width)?O.props.width:_.width,startIndex:T,endIndex:I,updateId:"brush-".concat(M)})}),ie(w,"renderReferenceElement",function(O,P,E){if(!O)return null;var A=w,k=A.clipPathId,_=w.state,T=_.xAxisMap,I=_.yAxisMap,M=_.offset,D=O.type.defaultProps||{},R=O.props,z=R.xAxisId,$=z===void 0?D.xAxisId:z,F=R.yAxisId,W=F===void 0?D.yAxisId:F;return j.cloneElement(O,{key:O.key||"".concat(P,"-").concat(E),xAxis:T[$],yAxis:I[W],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:k})}),ie(w,"renderActivePoints",function(O){var P=O.item,E=O.activePoint,A=O.basePoint,k=O.childIndex,_=O.isRange,T=[],I=P.props.key,M=P.item.type.defaultProps!==void 0?B(B({},P.item.type.defaultProps),P.item.props):P.item.props,D=M.activeDot,R=M.dataKey,z=B(B({index:k,dataKey:R,cx:E.x,cy:E.y,r:4,fill:Qx(P.item),strokeWidth:2,stroke:"#fff",payload:E.payload,value:E.value},re(D,!1)),zd(D));return T.push(g.renderActiveDot(D,z,"".concat(I,"-activePoint-").concat(k))),A?T.push(g.renderActiveDot(D,B(B({},z),{},{cx:A.x,cy:A.y}),"".concat(I,"-basePoint-").concat(k))):_&&T.push(null),T}),ie(w,"renderGraphicChild",function(O,P,E){var A=w.filterFormatItem(O,P,E);if(!A)return null;var k=w.getTooltipEventType(),_=w.state,T=_.isTooltipActive,I=_.tooltipAxis,M=_.activeTooltipIndex,D=_.activeLabel,R=w.props.children,z=mr(R,Et),$=A.props,F=$.points,W=$.isRange,V=$.baseLine,H=A.item.type.defaultProps!==void 0?B(B({},A.item.type.defaultProps),A.item.props):A.item.props,Y=H.activeDot,ne=H.hide,we=H.activeBar,We=H.activeShape,Oe=!!(!ne&&T&&z&&(Y||we||We)),Ot={};k!=="axis"&&z&&z.props.trigger==="click"?Ot={onClick:kf(w.handleItemMouseEnter,O.props.onClick)}:k!=="axis"&&(Ot={onMouseLeave:kf(w.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:kf(w.handleItemMouseEnter,O.props.onMouseEnter)});var G=j.cloneElement(O,B(B({},A.props),Ot));function se(fa){return typeof I.dataKey=="function"?I.dataKey(fa.payload):null}if(Oe)if(M>=0){var le,U;if(I.dataKey&&!I.allowDuplicatedCategory){var Qe=typeof I.dataKey=="function"?se:"payload.".concat(I.dataKey.toString());le=Bd(F,Qe,D),U=W&&V&&Bd(V,Qe,D)}else le=F==null?void 0:F[M],U=W&&V&&V[M];if(We||we){var ye=O.props.activeIndex!==void 0?O.props.activeIndex:M;return[j.cloneElement(O,B(B(B({},A.props),Ot),{},{activeIndex:ye})),null,null]}if(!ae(le))return[G].concat(tl(w.renderActivePoints({item:A,activePoint:le,basePoint:U,childIndex:M,isRange:W})))}else{var st,lt=(st=w.getItemByXY(w.state.activeCoordinate))!==null&&st!==void 0?st:{graphicalItem:G},Qt=lt.graphicalItem,di=Qt.item,So=di===void 0?O:di,Qc=Qt.childIndex,ca=B(B(B({},A.props),Ot),{},{activeIndex:Qc});return[j.cloneElement(So,ca),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,P,E){return j.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:If,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:If},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:If},YAxis:{handler:If},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:vo("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=eC(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return ufe(g,y),afe(g,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,P=x.layout,E=mr(S,Et);if(E){var A=E.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=L0(this.state,w,A,k),T=this.state.tooltipTicks[A].coordinate,I=(this.state.offset.top+O)/2,M=P==="horizontal",D=M?{x:T,y:I}:{y:T,x:I},R=this.state.formattedGraphicalItems.find(function($){var F=$.item;return F.type.name==="Scatter"});R&&(D=B(B({},D),R.props.points[A].tooltipPosition),_=R.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:k,activePayload:_,activeCoordinate:D};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){fg([mr(x.children,Et)],[mr(this.props.children,Et)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=mr(this.props.children,Et);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=WX(w),P={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},E=w.width/S.offsetWidth||1,A=this.inRange(P.chartX,P.chartY,E);if(!A)return null;var k=this.state,_=k.xAxisMap,T=k.yAxisMap,I=this.getTooltipEventType(),M=wE(this.state,this.props.data,this.props.layout,A);if(I!=="axis"&&_&&T){var D=Pi(_).scale,R=Pi(T).scale,z=D&&D.invert?D.invert(P.chartX):null,$=R&&R.invert?R.invert(P.chartY):null;return B(B({},P),{},{xValue:z,yValue:$},M)}return M?B(B({},P),M):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=x/w,E=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,k=P>=A.left&&P<=A.left+A.width&&E>=A.top&&E<=A.top+A.height;return k?{x:P,y:E}:null}var _=this.state,T=_.angleAxisMap,I=_.radiusAxisMap;if(T&&I){var M=Pi(T);return VP({x:P,y:E},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=mr(x,Et),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={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 P=zd(this.props,this.handleOuterEvent);return B(B({},P),O)}},{key:"addListener",value:function(){Ev.on(Av,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Ev.removeListener(Av,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,P=0,E=O.length;P{const i=Efe.find(s=>s.value===t);if(!i)return[];const a=new Date,o=new Map;for(let s=0;s{const l=new Date(s.createdAt),u=Yi(sg(l),"yyyy-MM-dd"),c=o.get(u)||0;o.set(u,c+1)}),Array.from(o.entries()).map(([s,l])=>({date:s,experiments:l,displayDate:Yi(new Date(s),"MMM dd")})).sort((s,l)=>s.date.localeCompare(l.date))},[e,t]),n=j.useMemo(()=>e.length,[e]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n]})]}),h.jsx(ta,{width:"100%",height:240,children:h.jsxs(fm,{data:r,margin:{left:10,right:15,top:10,bottom:5},children:[h.jsx(Gs,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(ni,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:50}),h.jsx(ii,{tick:{fontSize:10},width:50,label:{value:"Count",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(Et,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:i,payload:a,label:o})=>{if(!i||!a||!a.length)return null;const s=a[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:o}),h.jsx("div",{className:"space-y-0.5 text-[10px]",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"}),h.jsx("span",{className:"text-muted-foreground",children:"Launched:"}),h.jsx("span",{className:"font-medium ml-auto",children:s.experiments})]})})]})}}),h.jsx(Lr,{wrapperStyle:{fontSize:"11px",paddingTop:"2px"},iconType:"circle",iconSize:8,verticalAlign:"bottom",height:25}),h.jsx(An,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Launched"})]})})]})}const PE={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function _fe({experiments:e}){const t=j.useMemo(()=>{const n=new Map;return e.forEach(i=>{const a=i.status,o=n.get(a)||0;n.set(a,o+1)}),Array.from(n.entries()).map(([i,a])=>({name:i,value:a,color:PE[i]||PE.UNKNOWN})).sort((i,a)=>a.value-i.value)},[e]);if(t.length===0)return h.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"});const r=t.reduce((n,i)=>n+i.value,0);return h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),h.jsx(ta,{width:"100%",height:240,children:h.jsxs(uw,{children:[h.jsx(fn,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:75,labelLine:!1,label:n=>`${(n.value/r*100).toFixed(1)}%`,style:{fontSize:"11px"},children:t.map((n,i)=>h.jsx(yo,{fill:n.color},`cell-${i}`))}),h.jsx(Et,{formatter:n=>[n,"Count"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),h.jsx(Lr,{wrapperStyle:{fontSize:"11px"}})]})})]})}const Tfe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function kfe({data:e,timeRange:t}){const r=j.useMemo(()=>{const o=Tfe.find(u=>u.value===t);if(!o)return[];const s=new Date,l=new Map;for(let u=0;u{const c=Yi(new Date(u.date),"yyyy-MM-dd");l.has(c)&&l.set(c,{totalTokens:u.totalTokens,inputTokens:u.inputTokens,outputTokens:u.outputTokens})}),Array.from(l.entries()).map(([u,c])=>({date:u,displayDate:Yi(new Date(u),"MMM dd"),totalTokens:c.totalTokens,inputTokens:c.inputTokens,outputTokens:c.outputTokens})).sort((u,c)=>u.date.localeCompare(c.date))},[e,t]),n=j.useMemo(()=>r.reduce((o,s)=>o+s.totalTokens,0),[r]),i=j.useMemo(()=>r.reduce((o,s)=>o+s.inputTokens,0),[r]),a=j.useMemo(()=>r.reduce((o,s)=>o+s.outputTokens,0),[r]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Token Usage"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n.toLocaleString()," (",i.toLocaleString(),"↓ ",a.toLocaleString(),"↑)"]})]}),h.jsx(ta,{width:"100%",height:240,children:h.jsxs(fm,{data:r,margin:{left:10,right:15,top:10,bottom:5},children:[h.jsx(Gs,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(ni,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:50}),h.jsx(ii,{tick:{fontSize:10},width:50,tickFormatter:o=>o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:o.toString(),label:{value:"Tokens",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(Et,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:o,payload:s,label:l})=>{if(!o||!s||!s.length)return null;const u=s[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:l}),h.jsxs("div",{className:"space-y-0.5 text-[10px]",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Total:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.totalTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Input:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.inputTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Output:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.outputTokens.toLocaleString()})]})]})]})}}),h.jsx(Lr,{wrapperStyle:{fontSize:"11px",paddingTop:"2px"},iconType:"circle",iconSize:8,verticalAlign:"bottom",height:25}),h.jsx(An,{type:"monotone",dataKey:"totalTokens",stroke:"#3b82f6",strokeWidth:2,dot:{fill:"#3b82f6",r:3},activeDot:{r:5},name:"Total"}),h.jsx(An,{type:"monotone",dataKey:"inputTokens",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:3},activeDot:{r:5},name:"Input"}),h.jsx(An,{type:"monotone",dataKey:"outputTokens",stroke:"#f59e0b",strokeWidth:2,dot:{fill:"#f59e0b",r:3},activeDot:{r:5},name:"Output"})]})})]})}const jE=["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#06b6d4","#84cc16","#f97316","#6366f1"];function Nfe({data:e}){if(!e||e.length===0)return h.jsx("div",{className:"flex items-center justify-center h-80 text-sm text-muted-foreground",children:"No model data available"});const t=e.reduce((n,i)=>n+i.count,0),r=e.map(n=>({name:n.model,value:n.count}));return h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Model Distribution"}),h.jsx(ta,{width:"100%",height:240,children:h.jsxs(uw,{children:[h.jsx(fn,{data:r,cx:"50%",cy:"50%",labelLine:!1,label:n=>`${(n.value/t*100).toFixed(1)}%`,outerRadius:75,dataKey:"value",style:{fontSize:"11px"},children:r.map((n,i)=>h.jsx(yo,{fill:jE[i%jE.length]},`cell-${i}`))}),h.jsx(Et,{formatter:n=>[n,"Count"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),h.jsx(Lr,{wrapperStyle:{fontSize:"11px"}})]})})]})}const EE=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function Cfe(){var p,v,m,y;const{selectedTeamId:e}=ll(),[t,r]=j.useState("7days"),{data:n,isLoading:i}=tx(e||""),{data:a,isLoading:o}=xB(e||"",{enabled:!!e}),s=((p=EE.find(g=>g.value===t))==null?void 0:p.days)||30,{data:l,isLoading:u}=wB(e||"",s),{data:c,isLoading:f}=OB(e||""),d=j.useMemo(()=>{if(!a)return[];const g=new Date,b=t==="7days"?rx(g,7):t==="1month"?lg(g,1):lg(g,3);return a.filter(x=>{const S=new Date(x.createdAt);return S>=b&&S<=g})},[a,t]);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Overview of your team's experiments and activity"})]}),h.jsx("div",{children:h.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(Ve,{className:"h-14 w-full"}),h.jsx(Ve,{className:"h-14 w-full"}),h.jsx(Ve,{className:"h-14 w-full"})]}):h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),h.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:h.jsx(bk,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),h.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:h.jsx(QF,{className:"h-3.5 w-3.5 text-green-600"})})]})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"TOKENS"}),h.jsxs("p",{className:"text-lg font-bold tabular-nums text-foreground",children:[(((v=n==null?void 0:n.aggregatedTokens)==null?void 0:v.totalTokens)||0).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1 font-normal",children:["(",(((m=n==null?void 0:n.aggregatedTokens)==null?void 0:m.inputTokens)||0).toLocaleString(),"↓ ",(((y=n==null?void 0:n.aggregatedTokens)==null?void 0:y.outputTokens)||0).toLocaleString(),"↑)"]})]})]}),h.jsx("div",{className:"p-1.5 bg-orange-100 rounded-lg",children:h.jsx(NF,{className:"h-3.5 w-3.5 text-orange-600"})})]})})})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),h.jsx("div",{className:"flex gap-1",children:EE.map(g=>h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>r(g.value),className:`h-8 px-2.5 text-xs transition-colors ${t===g.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:g.label},g.value))})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:o?h.jsx(Ve,{className:"h-72 w-full"}):d&&d.length>0?h.jsx(_fe,{experiments:d}):h.jsx("div",{className:"flex h-72 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:o?h.jsx(Ve,{className:"h-72 w-full"}):d&&d.length>0?h.jsx(Afe,{experiments:d,timeRange:t}):h.jsx("div",{className:"flex h-72 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:f?h.jsx(Ve,{className:"h-72 w-full"}):c&&c.length>0?h.jsx(Nfe,{data:c}):h.jsx("div",{className:"flex items-center justify-center h-72 text-sm text-muted-foreground",children:"No model distribution data available"})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:u?h.jsx(Ve,{className:"h-72 w-full"}):l?h.jsx(kfe,{data:l,timeRange:t}):h.jsx("div",{className:"flex items-center justify-center h-72 text-sm text-muted-foreground",children:"No token usage data available for this time range"})})})]})]})]})}function $fe(){const e=lp();return AR({mutationFn:async t=>(await hF(pF.deleteExperiments,{experimentIds:t})).deleteExperiments,onSuccess:()=>{e.invalidateQueries({queryKey:["experiments"]}),e.invalidateQueries({queryKey:["experiment"]})}})}const Gc=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:r,className:ue("w-full caption-bottom text-sm",e),...t})}));Gc.displayName="Table";const Yc=j.forwardRef(({className:e,...t},r)=>h.jsx("thead",{ref:r,className:ue("[&_tr]:border-b",e),...t}));Yc.displayName="TableHeader";const Xc=j.forwardRef(({className:e,...t},r)=>h.jsx("tbody",{ref:r,className:ue("[&_tr:last-child]:border-0",e),...t}));Xc.displayName="TableBody";const Mfe=j.forwardRef(({className:e,...t},r)=>h.jsx("tfoot",{ref:r,className:ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Mfe.displayName="TableFooter";const ai=j.forwardRef(({className:e,...t},r)=>h.jsx("tr",{ref:r,className:ue("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ai.displayName="TableRow";const It=j.forwardRef(({className:e,...t},r)=>h.jsx("th",{ref:r,className:ue("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));It.displayName="TableHead";const Dt=j.forwardRef(({className:e,...t},r)=>h.jsx("td",{ref:r,className:ue("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Dt.displayName="TableCell";const Ife=j.forwardRef(({className:e,...t},r)=>h.jsx("caption",{ref:r,className:ue("mt-4 text-sm text-muted-foreground",e),...t}));Ife.displayName="TableCaption";function cr({className:e,variant:t="default",...r}){const n={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-slate-100 text-slate-700 border-slate-200",destructive:"bg-red-50 text-red-700 border-red-200",outline:"text-foreground",success:"bg-emerald-50 text-emerald-700 border-emerald-200",warning:"bg-amber-50 text-amber-700 border-amber-200",unknown:"bg-purple-50 text-purple-700 border-purple-200",info:"bg-blue-50 text-blue-700 border-blue-200"};return h.jsx("div",{className:ue("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors",n[t],e),...r})}const rl=j.forwardRef(({className:e,type:t,...r},n)=>h.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));rl.displayName="Input";const F0=j.forwardRef(({className:e,...t},r)=>h.jsx("input",{type:"checkbox",className:ue("h-4 w-4 rounded border-gray-300 text-primary cursor-pointer","focus:ring-0 focus:ring-offset-0 focus:outline-none","checked:border-primary checked:bg-primary",e),ref:r,...t}));F0.displayName="Checkbox";function cw({value:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=j.useState(!1),s=j.useRef(null),l=r.find(u=>u.value===e);return j.useEffect(()=>{const u=c=>{s.current&&!s.current.contains(c.target)&&o(!1)};return a&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[a]),h.jsxs("div",{ref:s,className:ue("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:ue("flex h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-[13px] font-medium text-foreground","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("span",{children:(l==null?void 0:l.label)||i||"Select..."}),h.jsx(mp,{className:ue("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-60 overflow-auto p-1",children:r.map(u=>h.jsx("button",{type:"button",onClick:()=>{t(u.value),o(!1)},className:ue("w-full rounded-sm px-2 py-1.5 text-[13px] text-left cursor-pointer transition-colors","hover:bg-accent hover:text-accent-foreground",e===u.value&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value))})})]})}function Dfe({values:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=j.useState(!1),s=j.useRef(null),l=r.filter(p=>e.includes(p.value)),u=j.useMemo(()=>{const p={};return r.forEach(v=>{const m=v.group||"Other";p[m]||(p[m]=[]),p[m].push(v)}),p},[r]);j.useEffect(()=>{const p=v=>{s.current&&!s.current.contains(v.target)&&o(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const c=p=>{e.includes(p)?t(e.filter(v=>v!==p)):t([...e,p])},f=(p,v)=>{v.stopPropagation(),t(e.filter(m=>m!==p))},d=p=>{p.stopPropagation(),t([])};return h.jsxs("div",{ref:s,className:ue("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:ue("flex min-h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-1.5 text-[13px]","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:l.length===0?h.jsx("span",{className:"text-muted-foreground font-medium",children:i||"Select labels..."}):l.map(p=>{const v=p.value.endsWith(":*")?p.label:`${p.group}:${p.label}`;return h.jsxs(cr,{variant:"outline",className:"text-[11px] px-1.5 py-0 font-normal",children:[v,h.jsx(Id,{className:"ml-1 h-3 w-3 cursor-pointer hover:text-destructive",onClick:m=>f(p.value,m)})]},p.value)})}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[l.length>0&&h.jsx(Id,{className:"h-3.5 w-3.5 opacity-50 hover:opacity-100 cursor-pointer",onClick:d}),h.jsx(mp,{className:ue("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-80 overflow-auto p-1",children:Object.entries(u).map(([p,v])=>h.jsxs("div",{children:[h.jsx("div",{className:"px-2 py-1.5 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:p}),v.map(m=>h.jsxs("button",{type:"button",onClick:()=>c(m.value),className:ue("w-full rounded-sm px-2 py-1.5 pl-6 text-[13px] text-left cursor-pointer transition-colors flex items-center gap-2","hover:bg-accent hover:text-accent-foreground"),children:[h.jsx("input",{type:"checkbox",checked:e.includes(m.value),onChange:()=>{},className:"h-3.5 w-3.5 rounded border-gray-300"}),h.jsx("span",{className:ue(e.includes(m.value)&&"font-medium"),children:m.label})]},m.value))]},p))})})]})}function fw({currentPage:e,totalPages:t,pageSize:r,totalItems:n,onPageChange:i,itemName:a="items"}){return n===0?null:h.jsx("div",{className:"flex items-center justify-end px-6 py-4 border-t",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>i(Math.max(0,e-1)),disabled:e===0,className:"h-8 w-8 p-0",children:h.jsx(_F,{className:"h-4 w-4"})}),h.jsxs("div",{className:"text-[13px] font-medium text-muted-foreground",children:[e+1," / ",t]}),h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>i(Math.min(t-1,e+1)),disabled:e>=t-1,className:"h-8 w-8 p-0",children:h.jsx(Qb,{className:"h-4 w-4"})})]})})}function Qi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function AE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function k2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=AE(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=j.useMemo(()=>s,Object.values(s));return h.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=j.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Lfe(e,t=[]){let r=[];function n(a,o){const s=j.createContext(o),l=r.length;r=[...r,o];const u=f=>{var g;const{scope:d,children:p,...v}=f,m=((g=d==null?void 0:d[e])==null?void 0:g[l])||s,y=j.useMemo(()=>v,Object.values(v));return h.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,v=j.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>j.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,Ffe(i,...t)]}function Ffe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var Sc=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},Bfe=V0[" useId ".trim().toString()]||(()=>{}),zfe=0;function Tv(e){const[t,r]=j.useState(Bfe());return Sc(()=>{r(n=>n??String(zfe++))},[e]),e||(t?`radix-${t}`:"")}var Ufe=V0[" useInsertionEffect ".trim().toString()]||Sc;function Wfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Hfe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const c=j.useRef(e!==void 0);j.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=j.useCallback(c=>{var f;if(s){const d=Kfe(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else a(c)},[s,e,a,o]);return[l,u]}function Hfe({defaultProp:e,onChange:t}){const[r,n]=j.useState(e),i=j.useRef(r),a=j.useRef(t);return Ufe(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Kfe(e){return typeof e=="function"}function N2(e){const t=qfe(e),r=j.forwardRef((n,i)=>{const{children:a,...o}=n,s=j.Children.toArray(a),l=s.find(Gfe);if(l){const u=l.props.children,c=s.map(f=>f===l?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return h.jsx(t,{...o,ref:i,children:j.isValidElement(u)?j.cloneElement(u,void 0,c):null})}return h.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function qfe(e){const t=j.forwardRef((r,n)=>{const{children:i,...a}=r;if(j.isValidElement(i)){const o=Xfe(i),s=Yfe(a,i.props);return i.type!==j.Fragment&&(s.ref=n?k2(n,o):o),j.cloneElement(i,s)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vfe=Symbol("radix.slottable");function Gfe(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vfe}function Yfe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Xfe(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fi=Qfe.reduce((e,t)=>{const r=N2(`Primitive.${t}`),n=j.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jfe(e,t){e&&Lb.flushSync(()=>e.dispatchEvent(t))}function Oc(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Zfe(e,t=globalThis==null?void 0:globalThis.document){const r=Oc(e);j.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ede="DismissableLayer",B0="dismissableLayer.update",tde="dismissableLayer.pointerDownOutside",rde="dismissableLayer.focusOutside",_E,C2=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$2=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=j.useContext(C2),[c,f]=j.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=j.useState({}),v=wo(t,P=>f(P)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),b=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=g,w=ade(P=>{const E=P.target,A=[...u.branches].some(k=>k.contains(E));!S||A||(i==null||i(P),o==null||o(P),P.defaultPrevented||s==null||s())},d),O=ode(P=>{const E=P.target;[...u.branches].some(k=>k.contains(E))||(a==null||a(P),o==null||o(P),P.defaultPrevented||s==null||s())},d);return Zfe(P=>{b===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),j.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_E=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),TE(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=_E)}},[c,d,r,u]),j.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),TE())},[c,u]),j.useEffect(()=>{const P=()=>p({});return document.addEventListener(B0,P),()=>document.removeEventListener(B0,P)},[]),h.jsx(fi.div,{...l,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Qi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Qi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Qi(e.onPointerDownCapture,w.onPointerDownCapture)})});$2.displayName=ede;var nde="DismissableLayerBranch",ide=j.forwardRef((e,t)=>{const r=j.useContext(C2),n=j.useRef(null),i=wo(t,n);return j.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),h.jsx(fi.div,{...e,ref:i})});ide.displayName=nde;function ade(e,t=globalThis==null?void 0:globalThis.document){const r=Oc(e),n=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){M2(tde,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ode(e,t=globalThis==null?void 0:globalThis.document){const r=Oc(e),n=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!n.current&&M2(rde,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TE(){const e=new CustomEvent(B0);document.dispatchEvent(e)}function M2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Jfe(i,a):i.dispatchEvent(a)}var kv="focusScope.autoFocusOnMount",Nv="focusScope.autoFocusOnUnmount",kE={bubbles:!1,cancelable:!0},sde="FocusScope",I2=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=j.useState(null),u=Oc(i),c=Oc(a),f=j.useRef(null),d=wo(t,m=>l(m)),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(n){let m=function(x){if(p.paused||!s)return;const S=x.target;s.contains(S)?f.current=S:gi(f.current,{select:!0})},y=function(x){if(p.paused||!s)return;const S=x.relatedTarget;S!==null&&(s.contains(S)||gi(f.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&gi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(g);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[n,s,p.paused]),j.useEffect(()=>{if(s){CE.add(p);const m=document.activeElement;if(!s.contains(m)){const g=new CustomEvent(kv,kE);s.addEventListener(kv,u),s.dispatchEvent(g),g.defaultPrevented||(lde(hde(D2(s)),{select:!0}),document.activeElement===m&&gi(s))}return()=>{s.removeEventListener(kv,u),setTimeout(()=>{const g=new CustomEvent(Nv,kE);s.addEventListener(Nv,c),s.dispatchEvent(g),g.defaultPrevented||gi(m??document.body,{select:!0}),s.removeEventListener(Nv,c),CE.remove(p)},0)}}},[s,u,c,p]);const v=j.useCallback(m=>{if(!r&&!n||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const b=m.currentTarget,[x,S]=ude(b);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),r&&gi(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),r&&gi(S,{select:!0})):g===b&&m.preventDefault()}},[r,n,p.paused]);return h.jsx(fi.div,{tabIndex:-1,...o,ref:d,onKeyDown:v})});I2.displayName=sde;function lde(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(gi(n,{select:t}),document.activeElement!==r)return}function ude(e){const t=D2(e),r=NE(t,e),n=NE(t.reverse(),e);return[r,n]}function D2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function NE(e,t){for(const r of e)if(!cde(r,{upTo:t}))return r}function cde(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 fde(e){return e instanceof HTMLInputElement&&"select"in e}function gi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fde(e)&&t&&e.select()}}var CE=dde();function dde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=$E(e,t),e.unshift(t)},remove(t){var r;e=$E(e,t),(r=e[0])==null||r.resume()}}}function $E(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hde(e){return e.filter(t=>t.tagName!=="A")}var pde="Portal",R2=j.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=j.useState(!1);Sc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?KD.createPortal(h.jsx(fi.div,{...n,ref:t}),o):null});R2.displayName=pde;function mde(e,t){return j.useReducer((r,n)=>t[r][n]??r,e)}var dm=e=>{const{present:t,children:r}=e,n=vde(t),i=typeof r=="function"?r({present:n.isPresent}):j.Children.only(r),a=wo(n.ref,yde(i));return typeof r=="function"||n.isPresent?j.cloneElement(i,{ref:a}):null};dm.displayName="Presence";function vde(e){const[t,r]=j.useState(),n=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[s,l]=mde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const u=Df(n.current);a.current=s==="mounted"?u:"none"},[s]),Sc(()=>{const u=n.current,c=i.current;if(c!==e){const d=a.current,p=Df(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Sc(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=p=>{const m=Df(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Df(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:j.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Df(e){return(e==null?void 0:e.animationName)||"none"}function yde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Cv=0;function gde(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ME()),document.body.insertAdjacentElement("beforeend",e[1]??ME()),Cv++,()=>{Cv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Cv--}},[])}function ME(){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 xn=function(){return xn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Ide;var t=Dde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Lde=z2(),ss="data-scroll-locked",Fde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(xde,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body[`).concat(ss,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(ad,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(od,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(ad," .").concat(ad,` { + right: 0 `).concat(n,`; + } + + .`).concat(od," .").concat(od,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(ss,`] { + `).concat(wde,": ").concat(s,`px; + } +`)},DE=function(){var e=parseInt(document.body.getAttribute(ss)||"0",10);return isFinite(e)?e:0},Bde=function(){j.useEffect(function(){return document.body.setAttribute(ss,(DE()+1).toString()),function(){var e=DE()-1;e<=0?document.body.removeAttribute(ss):document.body.setAttribute(ss,e.toString())}},[])},zde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Bde();var a=j.useMemo(function(){return Rde(i)},[i]);return j.createElement(Lde,{styles:Fde(a,!t,i,r?"":"!important")})},z0=!1;if(typeof window<"u")try{var Rf=Object.defineProperty({},"passive",{get:function(){return z0=!0,!0}});window.addEventListener("test",Rf,Rf),window.removeEventListener("test",Rf,Rf)}catch{z0=!1}var ko=z0?{passive:!1}:!1,Ude=function(e){return e.tagName==="TEXTAREA"},U2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ude(e)&&r[t]==="visible")},Wde=function(e){return U2(e,"overflowY")},Hde=function(e){return U2(e,"overflowX")},RE=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=W2(e,n);if(i){var a=H2(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Kde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},W2=function(e,t){return e==="v"?Wde(t):Hde(t)},H2=function(e,t){return e==="v"?Kde(t):qde(t)},Vde=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gde=function(e,t,r,n,i){var a=Vde(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,d=0;do{if(!s)break;var p=H2(e,s),v=p[0],m=p[1],y=p[2],g=m-y-a*v;(v||g)&&W2(e,s)&&(f+=g,d+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(d)<1)&&(u=!0),u},Lf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},LE=function(e){return[e.deltaX,e.deltaY]},FE=function(e){return e&&"current"in e?e.current:e},Yde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xde=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Qde=0,No=[];function Jde(e){var t=j.useRef([]),r=j.useRef([0,0]),n=j.useRef(),i=j.useState(Qde++)[0],a=j.useState(z2)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=bde([e.lockRef.current],(e.shards||[]).map(FE),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var g=Lf(m),b=r.current,x="deltaX"in m?m.deltaX:b[0]-g[0],S="deltaY"in m?m.deltaY:b[1]-g[1],w,O=m.target,P=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&P==="h"&&O.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,k=A?A===O||A.contains(O):!1;if(k)return!1;var _=RE(P,O);if(!_)return!0;if(_?w=P:(w=P==="v"?"h":"v",_=RE(P,O)),!_)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=w),!w)return!0;var T=n.current||w;return Gde(T,y,m,T==="h"?x:S)},[]),l=j.useCallback(function(m){var y=m;if(!(!No.length||No[No.length-1]!==a)){var g="deltaY"in y?LE(y):Lf(y),b=t.current.filter(function(w){return w.name===y.type&&(w.target===y.target||y.target===w.shadowParent)&&Yde(w.delta,g)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(FE).filter(Boolean).filter(function(w){return w.contains(y.target)}),S=x.length>0?s(y,x[0]):!o.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=j.useCallback(function(m,y,g,b){var x={name:m,delta:y,target:g,should:b,shadowParent:Zde(g)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=j.useCallback(function(m){r.current=Lf(m),n.current=void 0},[]),f=j.useCallback(function(m){u(m.type,LE(m),m.target,s(m,e.lockRef.current))},[]),d=j.useCallback(function(m){u(m.type,Lf(m),m.target,s(m,e.lockRef.current))},[]);j.useEffect(function(){return No.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ko),document.addEventListener("touchmove",l,ko),document.addEventListener("touchstart",c,ko),function(){No=No.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ko),document.removeEventListener("touchmove",l,ko),document.removeEventListener("touchstart",c,ko)}},[]);var p=e.removeScrollBar,v=e.inert;return j.createElement(j.Fragment,null,v?j.createElement(a,{styles:Xde(i)}):null,p?j.createElement(zde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ehe=_de(B2,Jde);var K2=j.forwardRef(function(e,t){return j.createElement(hm,xn({},e,{ref:t,sideCar:ehe}))});K2.classNames=hm.classNames;var the=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Co=new WeakMap,Ff=new WeakMap,Bf={},Dv=0,q2=function(e){return e&&(e.host||q2(e.parentNode))},rhe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=q2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nhe=function(e,t,r,n){var i=rhe(t,Array.isArray(e)?e:[e]);Bf[r]||(Bf[r]=new WeakMap);var a=Bf[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var p=d.getAttribute(n),v=p!==null&&p!=="false",m=(Co.get(d)||0)+1,y=(a.get(d)||0)+1;Co.set(d,m),a.set(d,y),o.push(d),m===1&&v&&Ff.set(d,!0),y===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return c(t),s.clear(),Dv++,function(){o.forEach(function(f){var d=Co.get(f)-1,p=a.get(f)-1;Co.set(f,d),a.set(f,p),d||(Ff.has(f)||f.removeAttribute(n),Ff.delete(f)),p||f.removeAttribute(r)}),Dv--,Dv||(Co=new WeakMap,Co=new WeakMap,Ff=new WeakMap,Bf={})}},ihe=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=the(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),nhe(n,i,r,"aria-hidden")):function(){return null}},pm="Dialog",[V2]=Lfe(pm),[ahe,dn]=V2(pm),G2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),l=j.useRef(null),[u,c]=Wfe({prop:n,defaultProp:i??!1,onChange:a,caller:pm});return h.jsx(ahe,{scope:t,triggerRef:s,contentRef:l,contentId:Tv(),titleId:Tv(),descriptionId:Tv(),open:u,onOpenChange:c,onOpenToggle:j.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};G2.displayName=pm;var Y2="DialogTrigger",ohe=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=dn(Y2,r),a=wo(t,i.triggerRef);return h.jsx(fi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":pw(i.open),...n,ref:a,onClick:Qi(e.onClick,i.onOpenToggle)})});ohe.displayName=Y2;var dw="DialogPortal",[she,X2]=V2(dw,{forceMount:void 0}),Q2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=dn(dw,t);return h.jsx(she,{scope:t,forceMount:r,children:j.Children.map(n,o=>h.jsx(dm,{present:r||a.open,children:h.jsx(R2,{asChild:!0,container:i,children:o})}))})};Q2.displayName=dw;var Kh="DialogOverlay",J2=j.forwardRef((e,t)=>{const r=X2(Kh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=dn(Kh,e.__scopeDialog);return a.modal?h.jsx(dm,{present:n||a.open,children:h.jsx(uhe,{...i,ref:t})}):null});J2.displayName=Kh;var lhe=N2("DialogOverlay.RemoveScroll"),uhe=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=dn(Kh,r);return h.jsx(K2,{as:lhe,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(fi.div,{"data-state":pw(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),so="DialogContent",Z2=j.forwardRef((e,t)=>{const r=X2(so,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=dn(so,e.__scopeDialog);return h.jsx(dm,{present:n||a.open,children:a.modal?h.jsx(che,{...i,ref:t}):h.jsx(fhe,{...i,ref:t})})});Z2.displayName=so;var che=j.forwardRef((e,t)=>{const r=dn(so,e.__scopeDialog),n=j.useRef(null),i=wo(t,r.contentRef,n);return j.useEffect(()=>{const a=n.current;if(a)return ihe(a)},[]),h.jsx(eM,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Qi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Qi(e.onFocusOutside,a=>a.preventDefault())})}),fhe=j.forwardRef((e,t)=>{const r=dn(so,e.__scopeDialog),n=j.useRef(!1),i=j.useRef(!1);return h.jsx(eM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),eM=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=dn(so,r),l=j.useRef(null),u=wo(t,l);return gde(),h.jsxs(h.Fragment,{children:[h.jsx(I2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:h.jsx($2,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":pw(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(dhe,{titleId:s.titleId}),h.jsx(phe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),hw="DialogTitle",tM=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=dn(hw,r);return h.jsx(fi.h2,{id:i.titleId,...n,ref:t})});tM.displayName=hw;var rM="DialogDescription",nM=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=dn(rM,r);return h.jsx(fi.p,{id:i.descriptionId,...n,ref:t})});nM.displayName=rM;var iM="DialogClose",aM=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=dn(iM,r);return h.jsx(fi.button,{type:"button",...n,ref:t,onClick:Qi(e.onClick,()=>i.onOpenChange(!1))})});aM.displayName=iM;function pw(e){return e?"open":"closed"}var oM="DialogTitleWarning",[mpe,sM]=Rfe(oM,{contentName:so,titleName:hw,docsSlug:"dialog"}),dhe=({titleId:e})=>{const t=sM(oM),r=`\`${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 j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},hhe="DialogDescriptionWarning",phe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sM(hhe).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},mhe=G2,vhe=Q2,lM=J2,uM=Z2,cM=tM,fM=nM,yhe=aM;const dM=mhe,ghe=vhe,hM=j.forwardRef(({className:e,...t},r)=>h.jsx(lM,{ref:r,className:ue("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",e),...t}));hM.displayName=lM.displayName;const mw=j.forwardRef(({className:e,children:t,hideCloseButton:r=!1,...n},i)=>h.jsxs(ghe,{children:[h.jsx(hM,{}),h.jsxs(uM,{ref:i,className:ue("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",e),...n,children:[t,!r&&h.jsxs(yhe,{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:[h.jsx(Id,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));mw.displayName=uM.displayName;const vw=({className:e,...t})=>h.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vw.displayName="DialogHeader";const pM=({className:e,...t})=>h.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pM.displayName="DialogFooter";const yw=j.forwardRef(({className:e,...t},r)=>h.jsx(cM,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));yw.displayName=cM.displayName;const mM=j.forwardRef(({className:e,...t},r)=>h.jsx(fM,{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));mM.displayName=fM.displayName;const bhe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},xhe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Rv=[{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-300"},{bg:"bg-green-100",text:"text-green-700",border:"border-green-300"},{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-300"},{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300"},{bg:"bg-pink-100",text:"text-pink-700",border:"border-pink-300"},{bg:"bg-cyan-100",text:"text-cyan-700",border:"border-cyan-300"},{bg:"bg-indigo-100",text:"text-indigo-700",border:"border-indigo-300"},{bg:"bg-teal-100",text:"text-teal-700",border:"border-teal-300"},{bg:"bg-amber-100",text:"text-amber-700",border:"border-amber-300"},{bg:"bg-rose-100",text:"text-rose-700",border:"border-rose-300"},{bg:"bg-violet-100",text:"text-violet-700",border:"border-violet-300"},{bg:"bg-lime-100",text:"text-lime-700",border:"border-lime-300"},{bg:"bg-fuchsia-100",text:"text-fuchsia-700",border:"border-fuchsia-300"},{bg:"bg-emerald-100",text:"text-emerald-700",border:"border-emerald-300"},{bg:"bg-sky-100",text:"text-sky-700",border:"border-sky-300"},{bg:"bg-red-100",text:"text-red-700",border:"border-red-300"},{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300"},{bg:"bg-slate-100",text:"text-slate-700",border:"border-slate-300"},{bg:"bg-zinc-100",text:"text-zinc-700",border:"border-zinc-300"},{bg:"bg-stone-100",text:"text-stone-700",border:"border-stone-300"}],Lv=10;function whe(){const{selectedTeamId:e}=ll(),[t,r]=j.useState("ALL"),[n,i]=j.useState([]),[a,o]=j.useState(""),[s,l]=j.useState(0),[u,c]=j.useState(new Set),[f,d]=j.useState(!1),p=$fe(),{data:v}=tx(e||""),{data:m,isLoading:y}=$k(e||"",{page:s,pageSize:Lv,enabled:!!e}),g=(v==null?void 0:v.totalExperiments)||0,b=Math.ceil(g/Lv),x=j.useMemo(()=>{if(!m||m.length===0)return new Map;const _=new Set;m.forEach(M=>{var D;(D=M.labels)==null||D.forEach(R=>{_.add(R.name)})});const T=Array.from(_).sort(),I=new Map;return T.forEach((M,D)=>{I.set(M,Rv[D%Rv.length])}),I},[m]),S=j.useMemo(()=>{if(!m||m.length===0)return[];const _=new Map;m.forEach(I=>{var M;(M=I.labels)==null||M.forEach(D=>{_.has(D.name)||_.set(D.name,new Set),_.get(D.name).add(D.value)})});const T=[];return Array.from(_.entries()).sort(([I],[M])=>I.localeCompare(M)).forEach(([I,M])=>{T.push({value:`${I}:*`,label:`(Any ${I})`,group:I}),Array.from(M).sort().forEach(D=>{T.push({value:`${I}:${D}`,label:D,group:I})})}),T},[m]),w=j.useMemo(()=>{if(!m)return[];let _=[...m];if(a.trim()){const T=a.toLowerCase();_=_.filter(I=>{var M,D,R,z;return((M=I.name)==null?void 0:M.toLowerCase().includes(T))||((D=I.description)==null?void 0:D.toLowerCase().includes(T))||((R=I.id)==null?void 0:R.toLowerCase().includes(T))||((z=I.labels)==null?void 0:z.some($=>$.name.toLowerCase().includes(T)||$.value.toLowerCase().includes(T)))})}return t!=="ALL"&&(_=_.filter(T=>T.status===t)),n.length>0&&(_=_.filter(T=>n.every(I=>{var R,z;const[M,D]=I.split(":",2);return D==="*"?(R=T.labels)==null?void 0:R.some($=>$.name===M):(z=T.labels)==null?void 0:z.some($=>$.name===M&&$.value===D)}))),_.sort((T,I)=>new Date(I.createdAt).getTime()-new Date(T.createdAt).getTime()),_},[m,t,n,a]),O=w.length>0&&w.every(_=>u.has(_.id)),P=()=>{c(O?new Set:new Set(w.map(_=>_.id)))},E=_=>{const T=new Set(u);T.has(_)?T.delete(_):T.add(_),c(T)},A=()=>{u.size!==0&&d(!0)},k=async _=>{if(_==null||_.preventDefault(),_==null||_.stopPropagation(),u.size!==0)try{const T=await p.mutateAsync(Array.from(u));console.log(`Successfully deleted ${T} experiments`),c(new Set),d(!1)}catch(T){console.error("Failed to delete experiments:",T),alert("Failed to delete experiments. Please try again.")}};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx(Fu,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(rl,{placeholder:"Search experiments...",value:a,onChange:_=>o(_.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(Dfe,{values:n,onChange:_=>i(_),options:S,className:"w-64",placeholder:"Filter by labels..."}),h.jsx(cw,{value:t,onChange:_=>r(_),options:xhe,className:"w-40"})]})]}),h.jsx(ge,{className:"border-0 shadow-sm",children:h.jsxs(be,{className:"p-0",children:[y?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!w||w.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:a.trim()||t!=="ALL"||n.length>0?"No experiments match your filters":"No experiments found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Gc,{children:[h.jsx(Yc,{children:h.jsxs(ai,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(F0,{checked:O,onChange:P,"aria-label":"Select all experiments"}),u.size>0&&h.jsx("button",{onClick:A,disabled:p.isPending,className:"inline-flex items-center justify-center h-6 w-6 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors disabled:opacity-50 disabled:pointer-events-none",title:`Delete ${u.size} ${u.size===1?"experiment":"experiments"}`,children:h.jsx(hS,{className:"h-3.5 w-3.5"})})]})}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Name"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Labels"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Created"})]})}),h.jsx(Xc,{children:w.map((_,T)=>h.jsxs(ai,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3",children:h.jsx(F0,{checked:u.has(_.id),onChange:()=>E(_.id),"aria-label":`Select experiment ${_.name}`})}),h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(eo,{to:`/experiments/${_.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:_.id})}),h.jsx(Dt,{className:"py-3 text-sm font-medium text-foreground",children:_.name}),h.jsx(Dt,{className:"py-3 text-sm",children:_.labels&&_.labels.length>0?h.jsx("div",{className:"flex gap-1 flex-wrap",children:_.labels.map((I,M)=>{const D=x.get(I.name)||Rv[0];return h.jsxs(cr,{variant:"outline",className:`text-xs px-2 py-0.5 font-normal ${D.bg} ${D.text} ${D.border}`,children:[I.name,": ",I.value]},M)})}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(Dt,{className:"py-3",children:h.jsx(cr,{variant:bhe[_.status],children:_.status})}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground",children:ns(new Date(_.createdAt),{addSuffix:!0})})]},_.id))})]})}),w&&w.length>0&&h.jsx(fw,{currentPage:s,totalPages:b,pageSize:Lv,totalItems:g,onPageChange:l,itemName:"experiments"})]})}),h.jsx(dM,{open:f,onOpenChange:d,children:h.jsxs(mw,{className:"pointer-events-auto sm:max-w-[440px]",children:[h.jsxs(vw,{className:"space-y-3",children:[h.jsxs(yw,{className:"text-lg font-semibold text-foreground",children:["Delete ",u.size===1?"Experiment":"Experiments"]}),h.jsxs(mM,{className:"text-sm text-muted-foreground leading-relaxed",children:["You are about to delete ",h.jsx("span",{className:"font-medium text-foreground",children:u.size})," ",u.size===1?"experiment":"experiments",". This action cannot be undone."]})]}),h.jsxs(pM,{className:"gap-2 sm:gap-2",children:[h.jsx(ur,{type:"button",variant:"outline",onClick:_=>{_.preventDefault(),_.stopPropagation(),d(!1)},disabled:p.isPending,className:"h-9",children:"Cancel"}),h.jsx(ur,{type:"button",variant:"destructive",onClick:k,disabled:p.isPending,className:"h-9",children:p.isPending?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mr-2",children:"Deleting..."}),h.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-solid border-current border-r-transparent"})]}):h.jsxs(h.Fragment,{children:[h.jsx(hS,{className:"h-3.5 w-3.5 mr-2"}),"Delete"]})})]})]})})]})}function vM(e){const{data:t,...r}=vp(e),n=j.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const She="modulepreload",Ohe=function(e){return"/static/"+e},BE={},Phe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=Ohe(l),l in BE)return;BE[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":She,u||(f.as="script"),f.crossOrigin="",f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),u)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function jhe(e){const{data:t,...r}=vp(e),{runMetrics:n,availableMetrics:i}=j.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((c,f)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()).forEach(c=>{!c.key||c.value===null||(s.add(c.key),o.has(c.runId)||o.set(c.runId,new Map),o.get(c.runId).set(c.key,c.value))});const u=[];return o.forEach((c,f)=>{const d={};c.forEach((p,v)=>{d[v]=p}),u.push({runId:f,metrics:d})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function Ehe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;aPhe(()=>import("./react-plotly-DmGF6ToQ.js").then(e=>e.r),[])),vi=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],zE="#10b981",UE="#9ca3af",WE="#f59e0b";function The({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=j.useState(i[0]||""),[s,l]=j.useState("timeline"),[u,c]=j.useState([]),{runMetrics:f,availableMetrics:d}=jhe(t),p=j.useMemo(()=>{const P=[];return Object.values(e).forEach(E=>{P.push(...E)}),P.length===0?null:P[0].runId},[e]),v=j.useMemo(()=>u.length===0?f:f.filter(P=>u.every(E=>P.metrics[E.key]!==void 0)),[f,u]),m=j.useMemo(()=>u.length<2||v.length<2?new Set:Ahe(v,u),[v,u]),y=j.useMemo(()=>{var E;if(i.length===0||!a)return[];const P=[];return e[a]&&e[a].forEach((A,k)=>{A.value!==null&&P.push({timestamp:new Date(A.createdAt).getTime(),index:k,time:Yi(new Date(A.createdAt),"MMM dd HH:mm:ss"),value:A.value,runId:A.runId})}),P.sort((A,k)=>A.timestamp-k.timestamp),P.forEach((A,k)=>{A.index=k}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",P.length),console.log("[MetricsChart] All data points:",P),P},[e,i,a]),g=j.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const P=u[0],E=u[1],A=u.length>=3?u[2]:void 0,k=v.map(T=>({runId:T.runId,x:T.metrics[P.key],y:T.metrics[E.key],z:A?T.metrics[A.key]:void 0,isParetoOptimal:m.has(T.runId),metrics:T.metrics})),_=k.filter(T=>T.isParetoOptimal).sort((T,I)=>T.x-I.x);return{all:k,paretoLine:_}},[v,u,m]),b=j.useMemo(()=>{if(u.length!==3||g.all.length===0)return null;const P=[...g.paretoLine].sort((T,I)=>T.x!==I.x?T.x-I.x:T.y!==I.y?T.y-I.y:(T.z||0)-(I.z||0)),E=g.all.find(T=>T.runId===p),A=P.filter(T=>T.runId!==p),k=g.all.filter(T=>!T.isParetoOptimal&&T.runId!==p),_=[{x:k.map(T=>T.x),y:k.map(T=>T.y),z:k.map(T=>T.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:UE,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:k.map(T=>[T.runId,T.x,T.y,T.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:A.map(T=>T.x),y:A.map(T=>T.y),z:A.map(T=>T.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:zE,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:A.map(T=>[T.runId,T.x,T.y,T.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&_.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:WE,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),_},[g,u,p]),x=P=>{o(P)},S=P=>{u.length>=3||u.some(E=>E.key===P)||c([...u,{key:P,direction:"maximize"}])},w=P=>{c(u.filter(E=>E.key!==P))},O=P=>{c(u.map(E=>E.key===P?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?h.jsxs(ge,{children:[h.jsxs(Dr,{className:"pb-3",children:[h.jsx(Rr,{className:"text-sm",children:r}),n&&h.jsx(sn,{className:"text-xs",children:n})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):h.jsxs(ge,{children:[h.jsxs(Dr,{className:"pb-3",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx(Rr,{className:"text-sm",children:r}),n&&h.jsx(sn,{className:"text-xs",children:n})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>l("timeline"),className:`h-7 px-3 text-xs transition-colors ${s==="timeline"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Timeline"}),h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>l("pareto"),className:`h-7 px-3 text-xs transition-colors ${s==="pareto"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Pareto"})]})]}),s==="timeline"?h.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((P,E)=>h.jsx(cr,{variant:a===P?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===P?vi[E%vi.length]:void 0},onClick:()=>x(P),children:P},P))}):h.jsxs("div",{className:"space-y-2 pt-3",children:[h.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map((P,E)=>{const A=u.find(_=>_.key===P),k=(A==null?void 0:A.direction)==="maximize";return h.jsxs(cr,{variant:A?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:A?vi[E%vi.length]:void 0,borderColor:A?vi[E%vi.length]:void 0},onClick:()=>{A?O(P):u.length<3&&S(P)},onContextMenu:_=>{_.preventDefault(),A&&w(P)},children:[P,A&&h.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:k?"↑":"↓"})]},P)})}),u.length>0&&h.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),h.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?h.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?h.jsx("span",{children:"Select at least 2 metrics for analysis"}):h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsxs("span",{children:["Runs: ",v.length]}),m.size>0&&h.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),h.jsx(be,{className:"pt-0",children:s==="timeline"?a?h.jsx(ta,{width:"100%",height:280,children:h.jsxs(fm,{data:y,margin:{top:5,right:20,left:10,bottom:5},onClick:P=>{if(P&&P.activePayload&&P.activePayload[0]){const E=P.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[h.jsx(Gs,{strokeDasharray:"3 3"}),h.jsx(ni,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:10}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:10}}),h.jsx(ii,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}},tick:{fontSize:10}}),h.jsx(Et,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:P,payload:E})=>{if(!P||!E||E.length===0)return null;const A=E[0].payload;return A.runId?h.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[h.jsxs("div",{style:{fontWeight:600,fontSize:"10px"},children:["Run: ",A.runId]}),h.jsxs("div",{style:{fontSize:"10px"},children:[a,": ",typeof A.value=="number"?A.value.toFixed(4):A.value]})]}):null}}),h.jsx(An,{type:"monotone",dataKey:"value",name:a,stroke:vi[i.indexOf(a)%vi.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):g.all.length===0?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?h.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[h.jsx("style",{children:` + #pareto-3d-plot .nsewdrag { + cursor: default !important; + } + #pareto-3d-plot .nsewdrag.cursor-crosshair { + cursor: default !important; + } + `}),h.jsx(j.Suspense,{fallback:h.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),h.jsx("div",{children:"Loading 3D visualization..."})]})}),children:h.jsx(_he,{divId:"pareto-3d-plot",data:b,onInitialized:(P,E)=>{E.on("plotly_click",A=>{var k;if(A&&A.points&&A.points[0]){const T=(k=A.points[0].customdata)==null?void 0:k[0];T&&window.open(`/runs/${T}`,"_blank")}})},onUpdate:(P,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",A=>{var k;if(A&&A.points&&A.points[0]){const T=(k=A.points[0].customdata)==null?void 0:k[0];T&&window.open(`/runs/${T}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):h.jsx(ta,{width:"100%",height:400,children:h.jsxs(jfe,{margin:{top:20,right:20,bottom:60,left:60},children:[h.jsx(Gs,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),h.jsx(ni,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(ii,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(Et,{cursor:{strokeDasharray:"3 3"},content:({active:P,payload:E})=>{var M,D;if(!P||!E||!E[0])return null;const A=E[0].payload,k=A.runId===p,_=A.isParetoOptimal,T=k?"#fef3c7":_?"#f0fdf4":"#fafafa",I=k?"#fcd34d":_?"#86efac":"#d1d5db";return h.jsxs("div",{style:{backgroundColor:T,border:`1px solid ${I}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"10px"},children:[h.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",A.runId,k?" (StartPoint)":""]}),h.jsxs("div",{children:[u[0].key,": ",(M=A.x)==null?void 0:M.toFixed(4)]}),h.jsxs("div",{children:[u[1].key,": ",(D=A.y)==null?void 0:D.toFixed(4)]})]})}}),h.jsx(qa,{name:"Dominated",data:g.all.filter(P=>!P.isParetoOptimal&&P.runId!==p),fill:UE,fillOpacity:.4,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),h.jsx(qa,{name:"Pareto",data:g.all.filter(P=>P.isParetoOptimal&&P.runId!==p),fill:zE,fillOpacity:.95,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),p&&h.jsx(qa,{name:"Start",data:g.all.filter(P=>P.runId===p),fill:WE,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")})]})})})]})}const gw=j.createContext(void 0),mm=j.forwardRef(({className:e,value:t,onValueChange:r,...n},i)=>h.jsx(gw.Provider,{value:{value:t,onValueChange:r},children:h.jsx("div",{ref:i,className:ue("w-full",e),...n})}));mm.displayName="Tabs";const vm=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:ue("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));vm.displayName="TabsList";const lo=j.forwardRef(({className:e,value:t,...r},n)=>{const i=j.useContext(gw);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return h.jsx("button",{ref:n,className:ue("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});lo.displayName="TabsTrigger";const uo=j.forwardRef(({className:e,value:t,...r},n)=>{const i=j.useContext(gw);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:h.jsx("div",{ref:n,className:ue("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});uo.displayName="TabsContent";const HE={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},khe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Fv=10;function Nhe(){var w;const{id:e}=RT(),[t,r]=j.useState("overview"),[n,i]=j.useState(0),[a,o]=j.useState(""),[s,l]=j.useState("ALL"),{data:u,isLoading:c,error:f}=vp(e),{data:d,isLoading:p}=ag(e,{page:n,pageSize:Fv}),{data:v}=ag(e,{page:0,pageSize:1e3}),m=(v==null?void 0:v.length)||0,y=Math.ceil(m/Fv),{data:g,isLoading:b}=vM(e),x=j.useMemo(()=>{if(!d)return[];let O=[...d];if(a.trim()){const P=a.toLowerCase();O=O.filter(E=>{var A;return(A=E.id)==null?void 0:A.toLowerCase().includes(P)})}return s!=="ALL"&&(O=O.filter(P=>P.status===s)),O.sort((P,E)=>new Date(E.createdAt).getTime()-new Date(P.createdAt).getTime()),O},[d,a,s]),S=j.useMemo(()=>!v||v.length===0?[]:[{name:"COMPLETED",value:v.filter(P=>P.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:v.filter(P=>P.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:v.filter(P=>P.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:v.filter(P=>P.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:v.filter(P=>P.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:v.filter(P=>P.status==="UNKNOWN").length,color:"#a78bfa"}].filter(P=>P.value>0),[v]);return c?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):f||!u?h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Error"}),h.jsx(sn,{children:"Failed to load experiment"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Experiment not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),h.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),h.jsx(cr,{variant:HE[u.status],children:u.status})]}),h.jsxs(mm,{value:t,onValueChange:r,children:[h.jsxs(vm,{children:[h.jsx(lo,{value:"overview",children:"Overview"}),h.jsx(lo,{value:"runs",children:"Runs"})]}),h.jsxs(uo,{value:"overview",className:"space-y-4",children:[h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=u.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&u.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(u.aggregatedTokens.totalTokens).toLocaleString(),u.aggregatedTokens.inputTokens!==void 0&&u.aggregatedTokens.outputTokens!==void 0&&h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.aggregatedTokens.inputTokens).toLocaleString(),"↓ ",Number(u.aggregatedTokens.outputTokens).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:ns(new Date(u.createdAt),{addSuffix:!0})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:ns(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),u.params&&Object.keys(u.params).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),v&&v.length>0&&S.length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",v.length," runs)"]}),h.jsx(ta,{width:"100%",height:180,children:h.jsxs(uw,{margin:{top:20,bottom:5},children:[h.jsx(fn,{data:S,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:O,value:P})=>`${O}: ${P}`,style:{fontSize:"10px"},children:S.map((O,P)=>h.jsx(yo,{fill:O.color},`cell-${P}`))}),h.jsx(Et,{contentStyle:{fontSize:"10px",backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px"}}),h.jsx(Lr,{wrapperStyle:{fontSize:"10px"}})]})})]})]})}),b?h.jsx(Ve,{className:"h-80 w-full"}):g&&Object.keys(g).length>0?h.jsx(The,{metrics:g,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):h.jsxs(ge,{children:[h.jsxs(Dr,{className:"pb-3",children:[h.jsx(Rr,{className:"text-sm",children:"Metrics"}),h.jsx(sn,{className:"text-xs",children:"No metrics data available"})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:v&&v.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),h.jsx(uo,{value:"runs",className:"space-y-4",children:h.jsx(ge,{children:h.jsxs(be,{className:"p-0",children:[h.jsxs("div",{className:"flex gap-2 mb-3 items-center px-4 pt-4",children:[h.jsxs("div",{className:"relative w-64",children:[h.jsx(Fu,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(rl,{placeholder:"Search runs...",value:a,onChange:O=>o(O.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(cw,{value:s,onChange:O=>l(O),options:khe,className:"w-40"})]}),p?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!d||d.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):x.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Gc,{children:[h.jsx(Yc,{children:h.jsxs(ai,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Created"})]})}),h.jsx(Xc,{children:x.map(O=>h.jsxs(ai,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(eo,{to:`/runs/${O.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:O.id})}),h.jsx(Dt,{className:"py-3",children:h.jsx(cr,{variant:HE[O.status],children:O.status})}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground",children:ns(new Date(O.createdAt),{addSuffix:!0})})]},O.id))})]})}),!p&&x&&x.length>0&&h.jsx(fw,{currentPage:n,totalPages:y,pageSize:Fv,totalItems:m,onPageChange:i,itemName:"runs"})]})})})]})]})}function Che({experiments:e}){const t=j.useMemo(()=>{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Parameter Comparison"}),h.jsx(sn,{children:"Side-by-side comparison of experiment parameters"})]}),h.jsx(be,{children:t.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):h.jsxs(Gc,{children:[h.jsx(Yc,{children:h.jsxs(ai,{children:[h.jsx(It,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>h.jsx(It,{className:"font-semibold",children:r.name},r.id))]})}),h.jsx(Xc,{children:t.map(r=>h.jsxs(ai,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[h.jsx(Dt,{className:"font-medium",children:r.key}),r.values.map((n,i)=>h.jsx(Dt,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const KE=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function $he({experimentIds:e}){const t=e.map(a=>vM(a)),r=t.some(a=>a.isLoading),n=j.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,c])=>{c.forEach(f=>{const d=f.createdAt,p=`exp${s+1}_${u}`;a.has(d)||a.set(d,{timestamp:d,time:Yi(new Date(d),"HH:mm:ss")});const v=a.get(d);v[p]=f.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=j.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?h.jsxs(ge,{children:[h.jsx(Dr,{children:h.jsx(Rr,{children:"Metrics Overlay"})}),h.jsx(be,{children:h.jsx(Ve,{className:"h-96 w-full"})})]}):n.length===0?h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Metrics Overlay"}),h.jsx(sn,{children:"Combined metrics visualization across experiments"})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Metrics Overlay"}),h.jsx(sn,{children:"Combined metrics from all selected experiments"})]}),h.jsx(be,{children:h.jsx(ta,{width:"100%",height:400,children:h.jsxs(fm,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[h.jsx(Gs,{strokeDasharray:"3 3"}),h.jsx(ni,{dataKey:"time",tick:{fontSize:10},label:{value:"Time",position:"insideBottom",offset:-5,style:{fontSize:10}}}),h.jsx(ii,{tick:{fontSize:10},label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}}}),h.jsx(Et,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem",fontSize:"10px"}}),h.jsx(Lr,{wrapperStyle:{fontSize:"10px"}}),i.map((a,o)=>h.jsx(An,{type:"monotone",dataKey:a,stroke:KE[o%KE.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const Mhe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function Ihe(){var i;const[e]=$L(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=Q5(t);return n?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):!r||r.length<2?h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Experiment Comparison"}),h.jsx(sn,{children:"Select at least 2 experiments to compare"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),h.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),h.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsx(Rr,{className:"text-lg",children:a.name}),h.jsx(cr,{variant:Mhe[a.status],children:a.status})]}),a.description&&h.jsx(sn,{children:a.description})]}),h.jsx(be,{children:h.jsxs("dl",{className:"space-y-2 text-sm",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Params"}),h.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),h.jsx(Che,{experiments:r}),h.jsx($he,{experimentIds:t})]})}const Dhe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Rhe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Bv=10;function Lhe(){var g;const{selectedTeamId:e}=ll(),[t,r]=j.useState("ALL"),[n,i]=j.useState(""),[a,o]=j.useState(0),{data:s}=tx(e||""),{data:l,isLoading:u}=$k(e||"",{page:0,pageSize:1e3,enabled:!!e}),c=((g=l==null?void 0:l[0])==null?void 0:g.id)||"",{data:f,isLoading:d}=ag(c,{page:a,pageSize:Bv,enabled:!!c}),p=(s==null?void 0:s.totalRuns)||0,v=Math.ceil(p/Bv),m=j.useMemo(()=>{if(!f)return[];let b=[...f];if(n.trim()){const x=n.toLowerCase();b=b.filter(S=>{var w,O;return((w=S.id)==null?void 0:w.toLowerCase().includes(x))||((O=S.experimentId)==null?void 0:O.toLowerCase().includes(x))})}return t!=="ALL"&&(b=b.filter(x=>x.status===t)),b.sort((x,S)=>new Date(S.createdAt).getTime()-new Date(x.createdAt).getTime()),b},[f,t,n]),y=u||d;return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Runs"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx(Fu,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(rl,{placeholder:"Search runs...",value:n,onChange:b=>i(b.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(cw,{value:t,onChange:b=>r(b),options:Rhe,className:"w-40"})]})]}),h.jsx(ge,{className:"border-0 shadow-sm",children:h.jsxs(be,{className:"p-0",children:[y?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!m||m.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Gc,{children:[h.jsx(Yc,{children:h.jsxs(ai,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Experiment ID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Created"})]})}),h.jsx(Xc,{children:m.map(b=>h.jsxs(ai,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(eo,{to:`/runs/${b.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.id})}),h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(eo,{to:`/experiments/${b.experimentId}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.experimentId})}),h.jsx(Dt,{className:"py-3",children:h.jsx(cr,{variant:Dhe[b.status],children:b.status})}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground",children:ns(new Date(b.createdAt),{addSuffix:!0})})]},b.id))})]})}),m&&m.length>0&&h.jsx(fw,{currentPage:a,totalPages:v,pageSize:Bv,totalItems:p,onPageChange:o,itemName:"runs"})]})})]})}async function Fhe(){try{return(await Ft(lr.listArtifactRepositories)).artifactRepos.map(t=>t.name)}catch(e){throw new Error(`Failed to list repositories: ${e instanceof Error?e.message:"Unknown error"}`)}}async function Bhe(e,t){try{return(await Ft(lr.listArtifactTags,{team_id:e,repo_name:t})).artifactTags.map(n=>n.name)}catch(r){throw new Error(`Failed to list tags for repository ${t}: ${r instanceof Error?r.message:"Unknown error"}`)}}async function zhe(e,t,r){try{return(await Ft(lr.getArtifactContent,{team_id:e,tag:t,repo_name:r})).artifactContent}catch(n){throw new Error(`Failed to get artifact content: ${n instanceof Error?n.message:"Unknown error"}`)}}function Uhe(){return Or({queryKey:["artifacts","repositories"],queryFn:Fhe,staleTime:30*60*1e3})}function Whe(e,t){return Or({queryKey:["artifacts","tags",e,t],queryFn:()=>Bhe(e,t),enabled:!!(e&&t),staleTime:10*60*1e3})}function yM(e,t,r,n=!0){return Or({queryKey:["artifacts","content",e,t,r],queryFn:()=>zhe(e,t,r),enabled:!!(n&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}const qE={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},VE=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:h.jsx(SF,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:h.jsx(HF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:h.jsx(Jb,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:h.jsx(BF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:h.jsx(n5,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:h.jsx(ng,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function Hhe({spans:e}){const[t,r]=j.useState(()=>new Set(e.filter(y=>!y.parentSpanId||y.parentSpanId==="").map(y=>y.spanId))),[n,i]=j.useState(null),a=()=>{const y=new Set(e.map(g=>g.spanId));r(y)},o=()=>{r(new Set)},s=j.useMemo(()=>{if(!e||e.length===0)return[];const y=new Map,g=[];e.forEach(S=>{y.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=y.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")g.push(w);else{const O=y.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):g.push(w)}});const b=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>b(w.children))},x=S=>{var _,T,I;S.children.forEach(M=>x(M));const w=parseInt((_=S.span.spanAttributes)==null?void 0:_["gen_ai.usage.input_tokens"])||0,O=parseInt((T=S.span.spanAttributes)==null?void 0:T["gen_ai.usage.output_tokens"])||0,P=parseInt((I=S.span.spanAttributes)==null?void 0:I["llm.usage.total_tokens"])||0,E=S.children.reduce((M,D)=>M+(D.inputTokens||0),0),A=S.children.reduce((M,D)=>M+(D.outputTokens||0),0),k=S.children.reduce((M,D)=>M+(D.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+A,S.totalTokens=P+k};return b(g),g.forEach(S=>x(S)),g},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:c}=j.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const y=e.map(w=>new Date(w.timestamp).getTime()),g=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),b=Math.min(...y),x=Math.max(...g),S=x-b;return{minTimestamp:b,maxTimestamp:x,totalDuration:S||1}},[e]),f=y=>{r(g=>{const b=new Set(g);return b.has(y)?b.delete(y):b.add(y),b})},d=y=>{const g=y/1e3,b=g/1e3,x=b/1e3;return x>=1?`${x.toFixed(2)}s`:b>=1?`${b.toFixed(2)}ms`:`${g.toFixed(2)}μs`},p=y=>{const{span:g}=y,b=new Date(g.timestamp).getTime(),x=b+g.duration/1e6,S=(b-l)/c*100,w=(x-b)/c*100,O=qE[g.statusCode]||qE.UNSET;return h.jsx("div",{className:`${O} absolute h-6 rounded flex items-center px-1.5 text-white text-[10px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${g.spanName} +Duration: ${d(g.duration)} +Status: ${g.statusCode} +Kind: ${g.spanKind}`,children:h.jsx("span",{className:"truncate",children:d(g.duration)})})},v=y=>{const{span:g,children:b,depth:x,totalTokens:S,inputTokens:w,outputTokens:O}=y,P=b.length>0,E=t.has(g.spanId),A=VE(g),k=P&&S&&S>0;return h.jsxs("div",{children:[h.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer h-10 ${(n==null?void 0:n.spanId)===g.spanId?"bg-accent":""}`,onClick:_=>{_.target.closest("button")||i(g)},children:[h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 h-full min-w-0",style:{width:"320px",paddingLeft:`${x*10+8}px`,paddingRight:"8px"},children:[x>0&&h.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(x-1)*10+8}px`}}),P?h.jsx("button",{onClick:()=>f(g.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?h.jsx(mp,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"}):h.jsx(Qb,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})}):h.jsx("div",{className:"w-[18px] flex-shrink-0"}),h.jsxs(cr,{variant:"outline",className:`${A.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px] font-medium flex-shrink-0`,children:[A.icon,h.jsx("span",{children:A.label})]}),h.jsx("span",{className:"text-[13px] font-medium truncate text-foreground",title:g.spanName,children:g.spanName})]}),h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:[h.jsx(ng,{className:"h-3 w-3 flex-shrink-0 text-muted-foreground"}),h.jsx("span",{className:"text-[11px] font-mono",children:d(g.duration)})]}),h.jsx("div",{className:"flex-shrink-0 flex items-center whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:S&&S>0?h.jsxs("div",{className:"flex flex-col justify-center",children:[h.jsxs("div",{className:"font-mono flex items-center text-[11px] leading-tight",children:[k&&h.jsx("span",{className:"inline-block align-middle mr-0.5 text-muted-foreground text-[10px]",children:"∑"}),h.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&h.jsxs("div",{className:"text-muted-foreground text-[9px] font-mono leading-tight mt-0.5",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):h.jsx("span",{className:"text-muted-foreground/40 text-[11px]",children:"—"})}),h.jsx("div",{className:"flex-1 relative h-full min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"8px"},children:p(y)})]}),P&&E&&h.jsx("div",{children:b.map(_=>v(_))})]},g.spanId)};if(!e||e.length===0)return h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=y=>{const g=VE(y),b=y.spanAttributes||{},x=b["gen_ai.request.model"]||b["gen_ai.response.model"],S=b["gen_ai.request.temperature"],w=b["gen_ai.request.max_tokens"],O=b["gen_ai.request.top_p"],P=[];let E=0;for(;b[`gen_ai.prompt.${E}.role`];)P.push({role:b[`gen_ai.prompt.${E}.role`],content:b[`gen_ai.prompt.${E}.content`]}),E++;const A=[];for(E=0;b[`gen_ai.completion.${E}.role`];)A.push({role:b[`gen_ai.completion.${E}.role`],content:b[`gen_ai.completion.${E}.content`],finishReason:b[`gen_ai.completion.${E}.finish_reason`]}),E++;return h.jsx(ge,{className:"mt-2 border-2",children:h.jsxs(be,{className:"p-3",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsxs(cr,{variant:"outline",className:`${g.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px]`,children:[g.icon,g.label]}),h.jsx("h4",{className:"font-semibold text-[13px]",children:y.spanName})]}),h.jsx(ur,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:h.jsx(Id,{className:"h-3 w-3"})})]}),x&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Model Configuration"}),h.jsxs("div",{className:"grid grid-cols-2 gap-1.5 text-[10px] border rounded-md p-2 bg-muted/30",children:[h.jsxs("div",{className:"col-span-2",children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:x})]}),S!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:S})]}),w&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:w})]}),O!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:O})]})]})]}),P.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Input"}),h.jsx("div",{className:"space-y-1.5",children:P.map((k,_)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:k.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:k.content})]},_))})]}),A.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Output"}),h.jsx("div",{className:"space-y-1.5",children:A.map((k,_)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:k.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:k.content})]},_))})]}),h.jsxs("details",{className:"mt-2",children:[h.jsxs("summary",{className:"text-[11px] font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-0.5 uppercase tracking-wide",children:["All Attributes (",Object.keys(b).length,")"]}),h.jsx("div",{className:"mt-1.5 text-[11px] space-y-0.5 bg-muted/30 rounded-md p-2 max-h-48 overflow-auto border",children:Object.entries(b).map(([k,_])=>h.jsxs("div",{className:"grid grid-cols-3 gap-2 py-0.5",children:[h.jsxs("span",{className:"text-muted-foreground truncate font-medium text-[10px]",title:k,children:[k,":"]}),h.jsx("span",{className:"col-span-2 font-mono break-all text-[10px] text-foreground",children:String(_)})]},k))})]})]})})};return h.jsx(ge,{className:"shadow-sm",children:h.jsxs(be,{className:"p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ng,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),h.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[d(c*1e6)," · ",e.length," span",e.length!==1?"s":""]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("button",{onClick:a,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Expand all"}),h.jsx("span",{className:"text-muted-foreground/30 text-xs",children:"|"}),h.jsx("button",{onClick:o,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Collapse all"})]})]}),h.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),h.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[h.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[10px] text-foreground uppercase tracking-wide h-8",children:[h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"320px",paddingLeft:"8px",paddingRight:"8px"},children:"Span Name"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:"Duration"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:"Tokens"}),h.jsx("div",{className:"flex-1 flex items-center h-full",style:{paddingLeft:"2px",paddingRight:"8px"},children:"Timeline"})]}),s.map(y=>v(y))]}),n&&h.jsx("div",{className:"mt-2",children:m(n)})]})})}function gM({open:e,onOpenChange:t,artifactContent:r,isLoading:n,error:i,title:a="Artifact Content",hideLineCount:o=!1,hideCloseButton:s=!1}){const[l,u]=j.useState(!1),[c,f]=j.useState("content"),d=()=>{r!=null&&r.content&&(navigator.clipboard.writeText(r.content),u(!0),setTimeout(()=>u(!1),2e3))},p=()=>{if(r){const b=new Blob([r.content],{type:r.contentType}),x=URL.createObjectURL(b),S=document.createElement("a");S.href=x,S.download=r.filename,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(x)}},v=()=>{if(!r)return"";const{content:b,filename:x,contentType:S}=r;if(S==="application/json"||x.endsWith(".json"))try{const w=JSON.parse(b);return JSON.stringify(w,null,2)}catch{return b}return b},m=()=>{var x;if(!r)return h.jsx(rs,{className:"h-3.5 w-3.5 text-purple-600"});const b=((x=a.split(" - ")[0])==null?void 0:x.toLowerCase())||"";return b.includes("execution")||b.includes("run")?h.jsx(gk,{className:"h-3.5 w-3.5 text-blue-600"}):b.includes("checkpoint")||b.includes("model")?h.jsx(Jb,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(rs,{className:"h-3.5 w-3.5 text-purple-600"})},y=j.useMemo(()=>{if(!(r!=null&&r.content))return null;const b=r.content,x=b.split(` +`).length,S=new TextEncoder().encode(b).length;let w;return S<1024?w=`${S} B`:S<1024*1024?w=`${(S/1024).toFixed(2)} KB`:w=`${(S/(1024*1024)).toFixed(2)} MB`,{lines:x,size:w,bytes:S}},[r==null?void 0:r.content]),g=()=>!r||!y?null:h.jsxs("div",{className:"p-3 space-y-3",children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("h3",{className:"text-xs font-semibold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"File Information"}),h.jsxs("div",{className:"border border-slate-200 dark:border-slate-700 rounded bg-white dark:bg-slate-800",children:[h.jsxs("div",{className:"flex justify-between items-center py-1.5 px-2 border-b border-slate-200 dark:border-slate-700",children:[h.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-medium text-xs",children:"Filename"}),h.jsx("code",{className:"font-mono text-slate-900 dark:text-slate-100 text-xs",children:r.filename})]}),h.jsxs("div",{className:"flex justify-between items-center py-1.5 px-2",children:[h.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-medium text-xs",children:"Content Type"}),h.jsx("code",{className:"font-mono text-slate-900 dark:text-slate-100 text-xs",children:r.contentType})]})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("h3",{className:"text-xs font-semibold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"Statistics"}),h.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[h.jsxs("div",{className:"p-2 rounded bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700",children:[h.jsx("div",{className:"text-xs font-medium text-slate-600 dark:text-slate-400 uppercase tracking-wide",children:"Lines"}),h.jsx("div",{className:"text-xs font-semibold tabular-nums text-slate-900 dark:text-slate-100",children:y.lines.toLocaleString()})]}),h.jsxs("div",{className:"p-2 rounded bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700",children:[h.jsx("div",{className:"text-xs font-medium text-slate-600 dark:text-slate-400 uppercase tracking-wide",children:"Size"}),h.jsx("div",{className:"text-xs font-semibold tabular-nums text-slate-900 dark:text-slate-100",children:y.size})]})]})]})]});return h.jsx(dM,{open:e,onOpenChange:t,children:h.jsxs(mw,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col gap-0 p-0",hideCloseButton:s,children:[h.jsx(vw,{className:"px-4 py-2.5 border-b bg-gradient-to-r from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800",children:h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[m(),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx(yw,{className:"text-sm font-semibold truncate text-slate-900 dark:text-slate-100",children:a}),h.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400 font-mono truncate mt-0.5",children:(r==null?void 0:r.filename)||"Loading..."})]}),y&&!o&&h.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:h.jsxs(cr,{variant:"secondary",className:"text-xs font-medium px-2 py-0.5",children:[y.lines," lines"]})})]}),r&&h.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[h.jsx(ur,{variant:"outline",size:"sm",onClick:d,className:"h-7 px-2.5 text-xs font-medium",children:l?h.jsxs(h.Fragment,{children:[h.jsx(vk,{className:"h-3 w-3 mr-1"}),"Copied"]}):h.jsxs(h.Fragment,{children:[h.jsx(yk,{className:"h-3 w-3 mr-1"}),"Copy"]})}),h.jsxs(ur,{variant:"outline",size:"sm",onClick:p,className:"h-7 px-2.5 text-xs font-medium",children:[h.jsx(IF,{className:"h-3 w-3 mr-1"}),"Download"]})]})]})}),h.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",children:n&&!r?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading artifact..."})}):i?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-sm font-medium text-destructive",children:"Failed to load artifact"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i.message})]})}):h.jsxs(mm,{value:c,onValueChange:f,className:"flex-1 min-h-0 flex flex-col",children:[h.jsx("div",{className:"px-4 py-2 border-b bg-muted/30 flex-shrink-0",children:h.jsxs(vm,{className:"h-8 bg-background/60",children:[h.jsxs(lo,{value:"content",className:"text-xs font-medium h-6 px-3 data-[state=active]:bg-background",children:[h.jsx(Zb,{className:"h-3 w-3 mr-1.5"}),"Content"]}),h.jsxs(lo,{value:"metadata",className:"text-xs font-medium h-6 px-3 data-[state=active]:bg-background",children:[h.jsx(qF,{className:"h-3 w-3 mr-1.5"}),"Metadata"]})]})}),h.jsx(uo,{value:"content",className:"flex-1 min-h-0 overflow-y-auto m-0 bg-slate-950 data-[state=active]:block data-[state=inactive]:hidden",children:h.jsx("pre",{className:"text-xs p-4 text-slate-50 leading-relaxed font-mono",children:h.jsx("code",{children:v()})})}),h.jsx(uo,{value:"metadata",className:"flex-1 min-h-0 overflow-y-auto m-0 bg-slate-50 dark:bg-slate-900 data-[state=active]:block data-[state=inactive]:hidden",children:g()})]})})]})})}const Khe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function qhe(){var S,w;const{id:e}=RT(),{data:t,isLoading:r,error:n}=Mk(e),[i,a]=j.useState(!1),[o,s]=j.useState("overview"),l=(t==null?void 0:t.metrics)||[],u=(t==null?void 0:t.spans)||[],c=r,f=r,d=n,p=(S=t==null?void 0:t.meta)==null?void 0:S.execution_result,v=(p==null?void 0:p.path)&&(p==null?void 0:p.file_name);let m="";if(v){let O=p.path;if(O.includes(":")&&(O=O.split(":")[1]),O.includes("/")){const P=O.split("/");O=P[P.length-1],O.includes(":")&&(O=O.split(":")[1])}m=O}const{data:y,isLoading:g,error:b}=yM((t==null?void 0:t.teamId)||"",m,"execution",i&&v),x=()=>{!v||!t||a(!0)};return b&&i&&console.error("Failed to load artifact:",b),r?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):n||!t?h.jsxs(ge,{children:[h.jsxs(Dr,{children:[h.jsx(Rr,{children:"Error"}),h.jsx(sn,{children:"Failed to load run"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),h.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),h.jsx(cr,{variant:Khe[t.status],children:t.status})]}),h.jsxs(mm,{value:o,onValueChange:s,children:[h.jsxs(vm,{children:[h.jsx(lo,{value:"overview",children:"Overview"}),h.jsx(lo,{value:"traces",children:"Traces"})]}),h.jsxs(uo,{value:"overview",className:"space-y-4",children:[h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[v&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:h.jsxs("button",{onClick:x,disabled:g,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[h.jsx(Zb,{className:"h-3.5 w-3.5"}),p.file_name]})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=t.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&t.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(t.aggregatedTokens.totalTokens).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.aggregatedTokens.inputTokens||0).toLocaleString(),"↓ ",Number(t.aggregatedTokens.outputTokens||0).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:t.duration!==void 0&&t.duration>0?`${t.duration.toFixed(2)}s`:h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:ns(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(O=>O!=="execution_result").length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([O])=>O!=="execution_result").map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]})]})}),h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),c?h.jsx(Ve,{className:"h-32 w-full"}):l.length===0?h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:l.map(O=>h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O.key}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:O.value})]},O.id))})]})})]}),h.jsx(uo,{value:"traces",children:f?h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx(Ve,{className:"h-64 w-full"})})}):d?h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",d.message]})})}):u&&u.length>0?h.jsx(Hhe,{spans:u}):h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),h.jsx(gM,{open:i,onOpenChange:a,artifactContent:y,isLoading:g,error:b,title:"Artifact Content",hideLineCount:!0,hideCloseButton:!0})]})}function Vhe(){const{selectedTeamId:e}=ll(),[t,r]=j.useState(""),[n,i]=j.useState(""),[a,o]=j.useState(""),[s,l]=j.useState(!1),[u,c]=j.useState(""),[f,d]=j.useState(1),p=100,{data:v,isLoading:m}=Uhe(),y=v==null?void 0:v.filter(M=>M.toLowerCase().includes(t.toLowerCase())&&(e?M.includes(e):!0)),g=n?n.split("/")[1]||n:"",{data:b,isLoading:x}=Whe(e||"",g),{data:S,isLoading:w,error:O}=yM(e||"",u,g,s&&!!u),P=M=>{c(M),l(!0)},E=M=>{const D=M.split("/");return D.length>1?D[1]:M},A=M=>{const D=E(M).toLowerCase();return D.includes("execution")||D.includes("run")?h.jsx(gk,{className:"h-3.5 w-3.5 text-blue-600"}):D.includes("checkpoint")||D.includes("model")?h.jsx(Jb,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(rs,{className:"h-3.5 w-3.5 text-purple-600"})},k=(b==null?void 0:b.filter(M=>M.toLowerCase().includes(a.toLowerCase())))||[],_=Math.ceil(k.length/p),T=(f-1)*p,I=k.slice(T,T+p);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse execution results and checkpoints across repositories"})]}),h.jsxs("div",{className:"grid grid-cols-12 gap-3",children:[h.jsx("div",{className:"col-span-12 md:col-span-4 lg:col-span-3",children:h.jsx(ge,{className:"h-[calc(100vh-12rem)]",children:h.jsxs(be,{className:"p-3 space-y-2 h-full flex flex-col",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"REPOSITORIES"}),h.jsx(cr,{variant:"secondary",className:"text-xs",children:(y==null?void 0:y.length)||0})]}),h.jsxs("div",{className:"relative",children:[h.jsx(Fu,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),h.jsx(rl,{placeholder:"Search repositories...",value:t,onChange:M=>r(M.target.value),className:"h-8 text-xs pl-7"})]}),h.jsx("div",{className:"space-y-1 flex-1 overflow-y-auto",children:m?[...Array(5)].map((M,D)=>h.jsx(Ve,{className:"h-10 w-full"},D)):!y||y.length===0?h.jsx("div",{className:"text-center py-6 text-xs text-muted-foreground",children:t?"No matches found":"No repositories"}):y.map(M=>h.jsxs("button",{type:"button",onClick:D=>{D.preventDefault(),D.stopPropagation(),i(M),o(""),d(1)},className:`w-full flex items-center gap-2 px-2 py-1.5 rounded text-left text-xs transition-colors ${n===M?"bg-accent font-medium":"hover:bg-accent/50"}`,children:[A(M),h.jsx("span",{className:"flex-1 truncate font-medium",children:E(M)})]},M))})]})})}),h.jsx("div",{className:"col-span-12 md:col-span-8 lg:col-span-9",children:h.jsx(ge,{className:"h-[calc(100vh-12rem)]",children:h.jsx(be,{className:"p-3 space-y-2 h-full flex flex-col",children:n?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[A(n),h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold",children:E(n)}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:[k.length," artifacts",_>1&&` • Page ${f} of ${_}`]})]})]}),_>1&&h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>d(M=>Math.max(1,M-1)),disabled:f===1,className:"h-7 px-2 text-xs",children:"Previous"}),h.jsx(ur,{variant:"outline",size:"sm",onClick:()=>d(M=>Math.min(_,M+1)),disabled:f===_,className:"h-7 px-2 text-xs",children:"Next"})]})]}),h.jsxs("div",{className:"relative",children:[h.jsx(Fu,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),h.jsx(rl,{placeholder:"Filter artifacts...",value:a,onChange:M=>{o(M.target.value),d(1)},className:"h-8 text-xs pl-7"})]}),h.jsx("div",{className:"flex-1 overflow-y-auto",children:x?h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-1.5",children:[...Array(12)].map((M,D)=>h.jsx(Ve,{className:"h-8 w-full"},D))}):k.length===0?h.jsxs("div",{className:"text-center py-8",children:[h.jsx(rs,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),h.jsx("p",{className:"text-xs font-medium",children:"No artifacts found"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a?"Try a different search term":"This repository has no artifacts"})]}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-1.5",children:I.map(M=>h.jsxs("button",{type:"button",onClick:D=>{D.preventDefault(),D.stopPropagation(),P(M)},className:"flex items-center gap-2 px-2 py-1.5 rounded border bg-card hover:bg-accent text-left transition-colors group text-xs",children:[h.jsx("code",{className:"font-mono flex-1 truncate",children:M}),h.jsx(Zb,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]},M))})})]}):h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx(rs,{className:"h-10 w-10 text-muted-foreground mx-auto mb-2"}),h.jsx("p",{className:"text-sm font-medium",children:"Select a repository"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose a repository from the left to view its artifacts"})]})})})})})]}),h.jsx(gM,{open:s,onOpenChange:l,artifactContent:S,isLoading:w,error:O,title:n?`${E(n)} - ${u}`:u,hideLineCount:!0,hideCloseButton:!0})]})}function Ghe(){const[e,t]=j.useState(null),[r,n]=j.useState(!0),[i,a]=j.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=ll(),l=lp();return j.useEffect(()=>{async function u(){try{const c=await RL(),f=localStorage.getItem("alphatrion_user_id");f&&f!==c&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",c);const d=await Ft(lr.getUser,{id:c});if(!d.user)throw new Error(`User with ID ${c} not found`);t(d.user);const p=await Ft(lr.listTeams,{userId:c});if(p.teams&&p.teams.length>0){const v=`alphatrion_selected_team_${c}`,m=localStorage.getItem(v);let y;m&&p.teams.find(b=>b.id===m)?y=m:y=p.teams[0].id,s(y,c)}}catch(c){console.error("Failed to initialize app:",c),a(c)}finally{n(!1)}}u()},[s,l]),r?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),h.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),h.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),h.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[h.jsx("li",{children:"• The user ID exists in the database"}),h.jsx("li",{children:"• The backend server is running"}),h.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?h.jsx("div",{className:"h-full",children:h.jsx(mF,{user:e,children:h.jsx(wL,{children:h.jsxs(qr,{path:"/",element:h.jsx(Z5,{}),children:[h.jsx(qr,{index:!0,element:h.jsx(Cfe,{})}),h.jsxs(qr,{path:"experiments",children:[h.jsx(qr,{index:!0,element:h.jsx(whe,{})}),h.jsx(qr,{path:":id",element:h.jsx(Nhe,{})}),h.jsx(qr,{path:"compare",element:h.jsx(Ihe,{})})]}),h.jsxs(qr,{path:"runs",children:[h.jsx(qr,{index:!0,element:h.jsx(Lhe,{})}),h.jsx(qr,{path:":id",element:h.jsx(qhe,{})})]}),h.jsx(qr,{path:"artifacts",element:h.jsx(Vhe,{})})]})})})}):null}zv.createRoot(document.getElementById("root")).render(h.jsx(N.StrictMode,{children:h.jsx(mR,{client:ML,children:h.jsx(TL,{children:h.jsx(IL,{children:h.jsx(Ghe,{})})})})}));export{Zc as c,Ee as g,zre as p,j as r}; diff --git a/dashboard/static/assets/index-CyIlOg_C.js b/dashboard/static/assets/index-CyIlOg_C.js deleted file mode 100644 index 1e85093e..00000000 --- a/dashboard/static/assets/index-CyIlOg_C.js +++ /dev/null @@ -1,601 +0,0 @@ -var uw=e=>{throw TypeError(e)};var cm=(e,t,r)=>t.has(e)||uw("Cannot "+r);var $=(e,t,r)=>(cm(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?uw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(cm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(cm(e,t,"access private method"),r);var Vc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return $(e,t,n)}});function iM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Gc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var KE={exports:{}},Fh={},qE={exports:{}},pe={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Oc=Symbol.for("react.element"),aM=Symbol.for("react.portal"),oM=Symbol.for("react.fragment"),sM=Symbol.for("react.strict_mode"),lM=Symbol.for("react.profiler"),uM=Symbol.for("react.provider"),cM=Symbol.for("react.context"),fM=Symbol.for("react.forward_ref"),dM=Symbol.for("react.suspense"),hM=Symbol.for("react.memo"),pM=Symbol.for("react.lazy"),cw=Symbol.iterator;function mM(e){return e===null||typeof e!="object"?null:(e=cw&&e[cw]||e["@@iterator"],typeof e=="function"?e:null)}var VE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GE=Object.assign,YE={};function Qs(e,t,r){this.props=e,this.context=t,this.refs=YE,this.updater=r||VE}Qs.prototype.isReactComponent={};Qs.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")};Qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XE(){}XE.prototype=Qs.prototype;function M0(e,t,r){this.props=e,this.context=t,this.refs=YE,this.updater=r||VE}var I0=M0.prototype=new XE;I0.constructor=M0;GE(I0,Qs.prototype);I0.isPureReactComponent=!0;var fw=Array.isArray,QE=Object.prototype.hasOwnProperty,D0={current:null},JE={key:!0,ref:!0,__self:!0,__source:!0};function ZE(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)QE.call(t,n)&&!JE.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=C[V];if(0>>1;Vi(we,W))Wei(Oe,we)?(C[V]=Oe,C[We]=W,V=We):(C[V]=we,C[re]=W,V=re);else if(Wei(Oe,W))C[V]=Oe,C[We]=W,V=We;else break e}}return F}function i(C,F){var W=C.sortIndex-F.sortIndex;return W!==0?W:C.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,y=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(C){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=C)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S(C){if(m=!1,x(C),!y)if(r(l)!==null)y=!0,L(w);else{var F=r(u);F!==null&&z(S,F.startTime-C)}}function w(C,F){y=!1,m&&(m=!1,v(E),E=-1),p=!0;var W=d;try{for(x(F),f=r(l);f!==null&&(!(f.expirationTime>F)||C&&!T());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var H=V(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(l)&&n(l),x(F)}else n(l);f=r(l)}if(f!==null)var Y=!0;else{var re=r(u);re!==null&&z(S,re.startTime-F),Y=!1}return Y}finally{f=null,d=W,p=!1}}var O=!1,P=null,E=-1,A=5,_=-1;function T(){return!(e.unstable_now()-_C||125V?(C.sortIndex=W,t(u,C),r(l)===null&&C===r(u)&&(m?(v(E),E=-1):m=!0,z(S,W-V))):(C.sortIndex=H,t(l,C),y||p||(y=!0,L(w))),C},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(C){var F=d;return function(){var W=d;d=F;try{return C.apply(this,arguments)}finally{d=W}}}})(iA);nA.exports=iA;var EM=nA.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var AM=j,gr=EM;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mv=Object.prototype.hasOwnProperty,_M=/^[: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]*$/,hw={},pw={};function TM(e){return Mv.call(pw,e)?!0:Mv.call(hw,e)?!1:_M.test(e)?pw[e]=!0:(hw[e]=!0,!1)}function kM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NM(e,t,r,n){if(t===null||typeof t>"u"||kM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Yt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Yt(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){Tt[e]=new Yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var F0=/[\-:]([a-z])/g;function B0(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(F0,B0);Tt[t]=new Yt(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(F0,B0);Tt[t]=new Yt(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(F0,B0);Tt[t]=new Yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function z0(e,t,r,n){var i=Tt.hasOwnProperty(t)?Tt[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{hm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ul(e):""}function CM(e){switch(e.tag){case 5:return Ul(e.type);case 16:return Ul("Lazy");case 13:return Ul("Suspense");case 19:return Ul("SuspenseList");case 0:case 2:case 15:return e=pm(e.type,!1),e;case 11:return e=pm(e.type.render,!1),e;case 1:return e=pm(e.type,!0),e;default:return""}}function Lv(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 _o:return"Fragment";case Ao:return"Portal";case Iv:return"Profiler";case U0:return"StrictMode";case Dv:return"Suspense";case Rv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sA:return(e.displayName||"Context")+".Consumer";case oA:return(e._context.displayName||"Context")+".Provider";case W0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H0:return t=e.displayName||null,t!==null?t:Lv(e.type)||"Memo";case mi:t=e._payload,e=e._init;try{return Lv(e(t))}catch{}}return null}function $M(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 Lv(t);case 8:return t===U0?"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 Vi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MM(e){var t=uA(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qc(e){e._valueTracker||(e._valueTracker=MM(e))}function cA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=uA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function td(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 Fv(e,t){var r=t.checked;return Xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function vw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function fA(e,t){t=t.checked,t!=null&&z0(e,"checked",t,!1)}function Bv(e,t){fA(e,t);var r=Vi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zv(e,t.type,r):t.hasOwnProperty("defaultValue")&&zv(e,t.type,Vi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function zv(e,t,r){(t!=="number"||td(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wl=Array.isArray;function Ho(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Jc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gl={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},IM=["Webkit","ms","Moz","O"];Object.keys(Gl).forEach(function(e){IM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gl[t]=Gl[e]})});function mA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Gl.hasOwnProperty(e)&&Gl[e]?(""+t).trim():t+"px"}function vA(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=mA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var DM=Xe({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 Hv(e,t){if(t){if(DM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Kv(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 qv=null;function K0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vv=null,Ko=null,qo=null;function xw(e){if(e=Ec(e)){if(typeof Vv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Hh(t),Vv(e.stateNode,e.type,t))}}function yA(e){Ko?qo?qo.push(e):qo=[e]:Ko=e}function gA(){if(Ko){var e=Ko,t=qo;if(qo=Ko=null,xw(e),t)for(e=0;e>>=0,e===0?32:31-(VM(e)/GM|0)|0}var Zc=64,ef=4194304;function Hl(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 ad(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Hl(s):(a&=o,a!==0&&(n=Hl(a)))}else o=r&~i,o!==0?n=Hl(o):a!==0&&(n=Hl(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Pc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-en(t),e[t]=r}function JM(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=Xl),Tw=" ",kw=!1;function LA(e,t){switch(e){case"keyup":return EI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var To=!1;function _I(e,t){switch(e){case"compositionend":return FA(t);case"keypress":return t.which!==32?null:(kw=!0,Tw);case"textInput":return e=t.data,e===Tw&&kw?null:e;default:return null}}function TI(e,t){if(To)return e==="compositionend"||!Z0&&LA(e,t)?(e=DA(),Ff=X0=Ti=null,To=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Mw(r)}}function WA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function HA(){for(var e=window,t=td();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=td(e.document)}return t}function eb(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 LI(e){var t=HA(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&WA(r.ownerDocument.documentElement,r)){if(n!==null&&eb(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Iw(r,a);var o=Iw(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ko=null,Zv=null,Jl=null,ey=!1;function Dw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ey||ko==null||ko!==td(n)||(n=ko,"selectionStart"in n&&eb(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Jl&&bu(Jl,n)||(Jl=n,n=ld(Zv,"onSelect"),0$o||(e.current=oy[$o],oy[$o]=null,$o--)}function De(e,t){$o++,oy[$o]=e.current,e.current=t}var Gi={},Dt=Ji(Gi),rr=Ji(!1),Ua=Gi;function ms(e,t){var r=e.type.contextTypes;if(!r)return Gi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function nr(e){return e=e.childContextTypes,e!=null}function cd(){ze(rr),ze(Dt)}function Ww(e,t,r){if(Dt.current!==Gi)throw Error(K(168));De(Dt,t),De(rr,r)}function ZA(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,$M(e)||"Unknown",i));return Xe({},r,n)}function fd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gi,Ua=Dt.current,De(Dt,e),De(rr,rr.current),!0}function Hw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=ZA(e,t,Ua),n.__reactInternalMemoizedMergedChildContext=e,ze(rr),ze(Dt),De(Dt,e)):ze(rr),De(rr,r)}var In=null,Kh=!1,_m=!1;function e_(e){In===null?In=[e]:In.push(e)}function XI(e){Kh=!0,e_(e)}function Zi(){if(!_m&&In!==null){_m=!0;var e=0,t=ke;try{var r=In;for(ke=1;e>=o,i-=o,Ln=1<<32-en(t)+i|r<E?(A=P,P=null):A=P.sibling;var _=d(v,P,x[E],S);if(_===null){P===null&&(P=A);break}e&&P&&_.alternate===null&&t(v,P),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_,P=A}if(E===x.length)return r(v,P),He&&fa(v,E),w;if(P===null){for(;EE?(A=P,P=null):A=P.sibling;var T=d(v,P,_.value,S);if(T===null){P===null&&(P=A);break}e&&P&&T.alternate===null&&t(v,P),b=a(T,b,E),O===null?w=T:O.sibling=T,O=T,P=A}if(_.done)return r(v,P),He&&fa(v,E),w;if(P===null){for(;!_.done;E++,_=x.next())_=f(v,_.value,S),_!==null&&(b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return He&&fa(v,E),w}for(P=n(v,P);!_.done;E++,_=x.next())_=p(P,v,E,_.value,S),_!==null&&(e&&_.alternate!==null&&P.delete(_.key===null?E:_.key),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return e&&P.forEach(function(k){return t(v,k)}),He&&fa(v,E),w}function g(v,b,x,S){if(typeof x=="object"&&x!==null&&x.type===_o&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Xc:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===_o){if(O.tag===7){r(v,O.sibling),b=i(O,x.props.children),b.return=v,v=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===mi&&Vw(w)===O.type){r(v,O.sibling),b=i(O,x.props),b.ref=jl(v,O,x),b.return=v,v=b;break e}r(v,O);break}else t(v,O);O=O.sibling}x.type===_o?(b=Ra(x.props.children,v.mode,S,x.key),b.return=v,v=b):(S=Vf(x.type,x.key,x.props,null,v.mode,S),S.ref=jl(v,b,x),S.return=v,v=S)}return o(v);case Ao:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(v,b.sibling),b=i(b,x.children||[]),b.return=v,v=b;break e}else{r(v,b);break}else t(v,b);b=b.sibling}b=Dm(x,v.mode,S),b.return=v,v=b}return o(v);case mi:return O=x._init,g(v,b,O(x._payload),S)}if(Wl(x))return y(v,b,x,S);if(xl(x))return m(v,b,x,S);lf(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(v,b.sibling),b=i(b,x),b.return=v,v=b):(r(v,b),b=Im(x,v.mode,S),b.return=v,v=b),o(v)):r(v,b)}return g}var ys=i_(!0),a_=i_(!1),pd=Ji(null),md=null,Do=null,ib=null;function ab(){ib=Do=md=null}function ob(e){var t=pd.current;ze(pd),e._currentValue=t}function uy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Go(e,t){md=e,ib=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(er=!0),e.firstContext=null)}function Rr(e){var t=e._currentValue;if(ib!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(md===null)throw Error(K(308));Do=e,md.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var ba=null;function sb(e){ba===null?ba=[e]:ba.push(e)}function o_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,sb(t)):(r.next=i.next,i.next=r),t.interleaved=r,Gn(e,n)}function Gn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var vi=!1;function lb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function s_(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 Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Gn(e,r)}return i=n.interleaved,i===null?(t.next=t,sb(n)):(t.next=i.next,i.next=t),n.interleaved=t,Gn(e,r)}function zf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,V0(e,r)}}function Gw(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function vd(e,t,r,n){var i=e.updateQueue;vi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var d=s.lane,p=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,m=s;switch(d=t,p=r,m.tag){case 1:if(y=m.payload,typeof y=="function"){f=y.call(p,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,d=typeof y=="function"?y.call(p,f,d):y,d==null)break e;f=Xe({},f,d);break e;case 2:vi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ka|=o,e.lanes=o,e.memoizedState=f}}function Yw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=km.transition;km.transition={};try{e(!1),t()}finally{ke=r,km.transition=n}}function P_(){return Lr().memoizedState}function eD(e,t,r){var n=Bi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j_(e))E_(t,r);else if(r=o_(e,t,r,n),r!==null){var i=Kt();tn(r,e,n,i),A_(r,t,n)}}function tD(e,t,r){var n=Bi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j_(e))E_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,nn(s,o)){var l=t.interleaved;l===null?(i.next=i,sb(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=o_(e,t,i,n),r!==null&&(i=Kt(),tn(r,e,n,i),A_(r,t,n))}}function j_(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function E_(e,t){Zl=gd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function A_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,V0(e,r)}}var bd={readContext:Rr,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},rD={readContext:Rr,useCallback:function(e,t){return pn().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:Qw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Wf(4194308,4,b_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Wf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wf(4,2,e,t)},useMemo:function(e,t){var r=pn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=eD.bind(null,Ye,e),[n.memoizedState,e]},useRef:function(e){var t=pn();return e={current:e},t.memoizedState=e},useState:Xw,useDebugValue:vb,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=Xw(!1),t=e[0];return e=ZI.bind(null,e[1]),pn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ye,i=pn();if(He){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),xt===null)throw Error(K(349));Ha&30||f_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Qw(h_.bind(null,n,a,e),[e]),n.flags|=2048,Au(9,d_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=pn(),t=xt.identifierPrefix;if(He){var r=Fn,n=Ln;r=(n&~(1<<32-en(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ju++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[gn]=t,e[Su]=n,R_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Kv(r,n),r){case"dialog":Le("cancel",e),Le("close",e),i=n;break;case"iframe":case"object":case"embed":Le("load",e),i=n;break;case"video":case"audio":for(i=0;ixs&&(t.flags|=128,n=!0,El(a,!1),t.lanes=4194304)}else{if(!n)if(e=yd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),El(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!He)return Nt(t),null}else 2*rt()-a.renderingStartTime>xs&&r!==1073741824&&(t.flags|=128,n=!0,El(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=rt(),t.sibling=null,r=qe.current,De(qe,n?r&1|2:r&1),t):(Nt(t),null);case 22:case 23:return Sb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?dr&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function cD(e,t){switch(rb(t),t.tag){case 1:return nr(t.type)&&cd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(),ze(rr),ze(Dt),fb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cb(t),null;case 13:if(ze(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(qe),null;case 4:return gs(),null;case 10:return ob(t.type._context),null;case 22:case 23:return Sb(),null;case 24:return null;default:return null}}var cf=!1,$t=!1,fD=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Ro(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ze(e,t,n)}else r.current=null}function gy(e,t,r){try{r()}catch(n){Ze(e,t,n)}}var l1=!1;function dD(e,t){if(ty=od,e=HA(),eb(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===i&&(s=o),d===a&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ry={focusedElem:e,selectionRange:r},od=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,g=y.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:qr(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){Ze(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return y=l1,l1=!1,y}function eu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&gy(t,r,a)}i=i.next}while(i!==n)}}function Gh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function by(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function B_(e){var t=e.alternate;t!==null&&(e.alternate=null,B_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gn],delete t[Su],delete t[ay],delete t[GI],delete t[YI])),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 z_(e){return e.tag===5||e.tag===3||e.tag===4}function u1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||z_(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 xy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ud));else if(n!==4&&(e=e.child,e!==null))for(xy(e,t,r),e=e.sibling;e!==null;)xy(e,t,r),e=e.sibling}function wy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(wy(e,t,r),e=e.sibling;e!==null;)wy(e,t,r),e=e.sibling}var Pt=null,Yr=!1;function ui(e,t,r){for(r=r.child;r!==null;)U_(e,t,r),r=r.sibling}function U_(e,t,r){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Bh,r)}catch{}switch(r.tag){case 5:$t||Ro(r,t);case 6:var n=Pt,i=Yr;Pt=null,ui(e,t,r),Pt=n,Yr=i,Pt!==null&&(Yr?(e=Pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pt.removeChild(r.stateNode));break;case 18:Pt!==null&&(Yr?(e=Pt,r=r.stateNode,e.nodeType===8?Am(e.parentNode,r):e.nodeType===1&&Am(e,r),yu(e)):Am(Pt,r.stateNode));break;case 4:n=Pt,i=Yr,Pt=r.stateNode.containerInfo,Yr=!0,ui(e,t,r),Pt=n,Yr=i;break;case 0:case 11:case 14:case 15:if(!$t&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&gy(r,t,o),i=i.next}while(i!==n)}ui(e,t,r);break;case 1:if(!$t&&(Ro(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ze(r,t,s)}ui(e,t,r);break;case 21:ui(e,t,r);break;case 22:r.mode&1?($t=(n=$t)||r.memoizedState!==null,ui(e,t,r),$t=n):ui(e,t,r);break;default:ui(e,t,r)}}function c1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new fD),t.forEach(function(n){var i=wD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Wr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=rt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*pD(n/1960))-n,10e?16:e,ki===null)var n=!1;else{if(e=ki,ki=null,Sd=0,xe&6)throw Error(K(331));var i=xe;for(xe|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lrt()-xb?Da(e,0):bb|=r),ir(e,t)}function X_(e,t){t===0&&(e.mode&1?(t=ef,ef<<=1,!(ef&130023424)&&(ef=4194304)):t=1);var r=Kt();e=Gn(e,t),e!==null&&(Pc(e,t,r),ir(e,r))}function xD(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),X_(e,r)}function wD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),X_(e,r)}var Q_;Q_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||rr.current)er=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return er=!1,lD(e,t,r);er=!!(e.flags&131072)}else er=!1,He&&t.flags&1048576&&t_(t,hd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Hf(e,t),e=t.pendingProps;var i=ms(t,Dt.current);Go(t,r),i=hb(null,t,n,e,i,r);var a=pb();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,nr(n)?(a=!0,fd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,lb(t),i.updater=Vh,t.stateNode=i,i._reactInternals=t,fy(t,n,e,r),t=py(null,t,n,!0,a,r)):(t.tag=0,He&&a&&tb(t),Ft(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Hf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=OD(n),e=qr(n,e),i){case 0:t=hy(null,t,n,e,r);break e;case 1:t=a1(null,t,n,e,r);break e;case 11:t=n1(null,t,n,e,r);break e;case 14:t=i1(null,t,n,qr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:qr(n,i),hy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:qr(n,i),a1(e,t,n,i,r);case 3:e:{if(M_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,s_(e,t),vd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=bs(Error(K(423)),t),t=o1(e,t,n,r,i);break e}else if(n!==i){i=bs(Error(K(424)),t),t=o1(e,t,n,r,i);break e}else for(mr=Ri(t.stateNode.containerInfo.firstChild),vr=t,He=!0,Jr=null,r=a_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(vs(),n===i){t=Yn(e,t,r);break e}Ft(e,t,n,r)}t=t.child}return t;case 5:return l_(t),e===null&&ly(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ny(n,i)?o=null:a!==null&&ny(n,a)&&(t.flags|=32),$_(e,t),Ft(e,t,o,r),t.child;case 6:return e===null&&ly(t),null;case 13:return I_(e,t,r);case 4:return ub(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ys(t,null,n,r):Ft(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:qr(n,i),n1(e,t,n,i,r);case 7:return Ft(e,t,t.pendingProps,r),t.child;case 8:return Ft(e,t,t.pendingProps.children,r),t.child;case 12:return Ft(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,De(pd,n._currentValue),n._currentValue=o,a!==null)if(nn(a.value,o)){if(a.children===i.children&&!rr.current){t=Yn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Wn(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),uy(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),uy(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ft(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Go(t,r),i=Rr(i),n=n(i),t.flags|=1,Ft(e,t,n,r),t.child;case 14:return n=t.type,i=qr(n,t.pendingProps),i=qr(n.type,i),i1(e,t,n,i,r);case 15:return N_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:qr(n,i),Hf(e,t),t.tag=1,nr(n)?(e=!0,fd(t)):e=!1,Go(t,r),__(t,n,i),fy(t,n,i,r),py(null,t,n,!0,e,r);case 19:return D_(e,t,r);case 22:return C_(e,t,r)}throw Error(K(156,t.tag))};function J_(e,t){return jA(e,t)}function SD(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(e,t,r,n){return new SD(e,t,r,n)}function Pb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OD(e){if(typeof e=="function")return Pb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W0)return 11;if(e===H0)return 14}return 2}function zi(e,t){var r=e.alternate;return r===null?(r=Nr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Vf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Pb(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case _o:return Ra(r.children,i,a,t);case U0:o=8,i|=8;break;case Iv:return e=Nr(12,r,t,i|2),e.elementType=Iv,e.lanes=a,e;case Dv:return e=Nr(13,r,t,i),e.elementType=Dv,e.lanes=a,e;case Rv:return e=Nr(19,r,t,i),e.elementType=Rv,e.lanes=a,e;case lA:return Xh(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oA:o=10;break e;case sA:o=9;break e;case W0:o=11;break e;case H0:o=14;break e;case mi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Nr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ra(e,t,r,n){return e=Nr(7,e,n,t),e.lanes=r,e}function Xh(e,t,r,n){return e=Nr(22,e,n,t),e.elementType=lA,e.lanes=r,e.stateNode={isHidden:!1},e}function Im(e,t,r){return e=Nr(6,e,null,t),e.lanes=r,e}function Dm(e,t,r){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PD(e,t,r,n,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=vm(0),this.expirationTimes=vm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jb(e,t,r,n,i,a,o,s,l){return e=new PD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},lb(a),e}function jD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rT)}catch(e){console.error(e)}}rT(),rA.exports=br;var Tb=rA.exports;const kD=Ee(Tb);var g1=Tb;$v.createRoot=g1.createRoot,$v.hydrateRoot=g1.hydrateRoot;var _c=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(){}},ND={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,$0,IE,CD=(IE=class{constructor(){ne(this,wi,ND);ne(this,$0,!1)}setTimeoutProvider(e){X(this,wi,e)}setTimeout(e,t){return $(this,wi).setTimeout(e,t)}clearTimeout(e){$(this,wi).clearTimeout(e)}setInterval(e,t){return $(this,wi).setInterval(e,t)}clearInterval(e){$(this,wi).clearInterval(e)}},wi=new WeakMap,$0=new WeakMap,IE),wa=new CD;function $D(e){setTimeout(e,0)}var Va=typeof window>"u"||"Deno"in globalThis;function Jt(){}function MD(e,t){return typeof e=="function"?e(t):e}function Ey(e){return typeof e=="number"&&e>=0&&e!==1/0}function nT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ui(e,t){return typeof e=="function"?e(t):e}function Ar(e,t){return typeof e=="function"?e(t):e}function b1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==kb(o,t.options))return!1}else if(!ku(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function x1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Tu(t.options.mutationKey)!==Tu(a))return!1}else if(!ku(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function kb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Tu)(e)}function Tu(e){return JSON.stringify(e,(t,r)=>_y(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ku(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ku(e[r],t[r])):!1}var ID=Object.prototype.hasOwnProperty;function iT(e,t){if(e===t)return e;const r=w1(e)&&w1(t);if(!r&&!(_y(e)&&_y(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{wa.setTimeout(t,e)})}function Ty(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?iT(e,t):t}function RD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function LD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Nb=Symbol();function aT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function FD(e,t){return typeof e=="function"?e(...t):!!e}var Aa,Si,rs,DE,BD=(DE=class extends _c{constructor(){super();ne(this,Aa);ne(this,Si);ne(this,rs);X(this,rs,t=>{if(!Va&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Si)||this.setEventListener($(this,rs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Si))==null||t.call(this),X(this,Si,void 0))}setEventListener(t){var r;X(this,rs,t),(r=$(this,Si))==null||r.call(this),X(this,Si,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Aa)!==t&&(X(this,Aa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Aa)=="boolean"?$(this,Aa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Aa=new WeakMap,Si=new WeakMap,rs=new WeakMap,DE),Cb=new BD;function ky(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var zD=$D;function UD(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=zD;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Et=UD(),ns,Oi,is,RE,WD=(RE=class extends _c{constructor(){super();ne(this,ns,!0);ne(this,Oi);ne(this,is);X(this,is,t=>{if(!Va&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Oi)||this.setEventListener($(this,is))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Oi))==null||t.call(this),X(this,Oi,void 0))}setEventListener(t){var r;X(this,is,t),(r=$(this,Oi))==null||r.call(this),X(this,Oi,t(this.setOnline.bind(this)))}setOnline(t){$(this,ns)!==t&&(X(this,ns,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,ns)}},ns=new WeakMap,Oi=new WeakMap,is=new WeakMap,RE),jd=new WD;function HD(e){return Math.min(1e3*2**e,3e4)}function oT(e){return(e??"online")==="online"?jd.isOnline():!0}var Ny=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sT(e){let t=!1,r=0,n;const i=ky(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const v=new Ny(m);d(v),(g=e.onCancel)==null||g.call(e,v)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>Cb.isFocused()&&(e.networkMode==="always"||jd.isOnline())&&e.canRun(),c=()=>oT(e.networkMode)&&e.canRun(),f=m=>{a()||(n==null||n(),i.resolve(m))},d=m=>{a()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var g;n=v=>{(a()||u())&&m(v)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),y=()=>{if(a())return;let m;const g=r===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var O;if(a())return;const b=e.retry??(Va?0:3),x=e.retryDelay??HD,S=typeof x=="function"?x(r,v):x,w=b===!0||typeof b=="number"&&ru()?void 0:p()).then(()=>{t?d(v):y()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?y():p().then(y),i)}}var _a,LE,lT=(LE=class{constructor(){ne(this,_a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ey(this.gcTime)&&X(this,_a,wa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Va?1/0:5*60*1e3))}clearGcTimeout(){$(this,_a)&&(wa.clearTimeout($(this,_a)),X(this,_a,void 0))}},_a=new WeakMap,LE),Ta,as,Er,ka,vt,gc,Na,Vr,Cn,FE,KD=(FE=class extends lT{constructor(t){super();ne(this,Vr);ne(this,Ta);ne(this,as);ne(this,Er);ne(this,ka);ne(this,vt);ne(this,gc);ne(this,Na);X(this,Na,!1),X(this,gc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,ka,t.client),X(this,Er,$(this,ka).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Ta,O1(this.options)),this.state=t.state??$(this,Ta),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,vt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,gc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=O1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,Ta,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Er).remove(this)}setData(t,r){const n=Ty(this.state.data,t,this.options);return me(this,Vr,Cn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){me(this,Vr,Cn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=$(this,vt))==null?void 0:n.promise;return(i=$(this,vt))==null||i.cancel(t),r?r.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Ta))}isActive(){return this.observers.some(t=>Ar(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ui(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!nT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Er).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,vt)&&($(this,Na)?$(this,vt).cancel({revert:!0}):$(this,vt).cancelRetry()),this.scheduleGc()),$(this,Er).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,Vr,Cn).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,c,f,d,p,y,m,g,v,b,x;if(this.state.fetchStatus!=="idle"&&((l=$(this,vt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,vt))return $(this,vt).continueRetry(),$(this,vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,Na,!0),n.signal)})},a=()=>{const S=aT(this.options,r),O=(()=>{const P={client:$(this,ka),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return X(this,Na,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,ka),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,as,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&me(this,Vr,Cn).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),X(this,vt,sT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof Ny&&S.revert&&this.setState({...$(this,as),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{me(this,Vr,Cn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{me(this,Vr,Cn).call(this,{type:"pause"})},onContinue:()=>{me(this,Vr,Cn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await $(this,vt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(d=$(this,Er).config).onSuccess)==null||p.call(d,S,this),(m=(y=$(this,Er).config).onSettled)==null||m.call(y,S,this.state.error,this),S}catch(S){if(S instanceof Ny){if(S.silent)return $(this,vt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw me(this,Vr,Cn).call(this,{type:"error",error:S}),(v=(g=$(this,Er).config).onError)==null||v.call(g,S,this),(x=(b=$(this,Er).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},Ta=new WeakMap,as=new WeakMap,Er=new WeakMap,ka=new WeakMap,vt=new WeakMap,gc=new WeakMap,Na=new WeakMap,Vr=new WeakSet,Cn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,as,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Et.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,Er).notify({query:this,type:"updated",action:t})})},FE);function uT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Qt,ve,bc,Rt,Ca,os,Dn,Pi,xc,ss,ls,$a,Ma,ji,us,je,ql,Cy,$y,My,Iy,Dy,Ry,Ly,cT,BE,qD=(BE=class extends _c{constructor(t,r){super();ne(this,je);ne(this,Qt);ne(this,ve);ne(this,bc);ne(this,Rt);ne(this,Ca);ne(this,os);ne(this,Dn);ne(this,Pi);ne(this,xc);ne(this,ss);ne(this,ls);ne(this,$a);ne(this,Ma);ne(this,ji);ne(this,us,new Set);this.options=r,X(this,Qt,t),X(this,Pi,null),X(this,Dn,ky()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,ve).addObserver(this),P1($(this,ve),this.options)?me(this,je,ql).call(this):this.updateResult(),me(this,je,Iy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fy($(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fy($(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,je,Dy).call(this),me(this,je,Ry).call(this),$(this,ve).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,ve);if(this.options=$(this,Qt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ar(this.options.enabled,$(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,je,Ly).call(this),$(this,ve).setOptions(this.options),r._defaulted&&!Ay(this.options,r)&&$(this,Qt).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,ve),observer:this});const i=this.hasListeners();i&&j1($(this,ve),n,this.options,r)&&me(this,je,ql).call(this),this.updateResult(),i&&($(this,ve)!==n||Ar(this.options.enabled,$(this,ve))!==Ar(r.enabled,$(this,ve))||Ui(this.options.staleTime,$(this,ve))!==Ui(r.staleTime,$(this,ve)))&&me(this,je,Cy).call(this);const a=me(this,je,$y).call(this);i&&($(this,ve)!==n||Ar(this.options.enabled,$(this,ve))!==Ar(r.enabled,$(this,ve))||a!==$(this,ji))&&me(this,je,My).call(this,a)}getOptimisticResult(t){const r=$(this,Qt).getQueryCache().build($(this,Qt),t),n=this.createResult(r,t);return GD(this,n)&&(X(this,Rt,n),X(this,os,this.options),X(this,Ca,$(this,ve).state)),n}getCurrentResult(){return $(this,Rt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Dn).status==="pending"&&$(this,Dn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,us).add(t)}getCurrentQuery(){return $(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,Qt).defaultQueryOptions(t),n=$(this,Qt).getQueryCache().build($(this,Qt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,je,ql).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Rt)))}createResult(t,r){var A;const n=$(this,ve),i=this.options,a=$(this,Rt),o=$(this,Ca),s=$(this,os),u=t!==n?t.state:$(this,bc),{state:c}=t;let f={...c},d=!1,p;if(r._optimisticResults){const _=this.hasListeners(),T=!_&&P1(t,r),k=_&&j1(t,n,r,i);(T||k)&&(f={...f,...uT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:g}=f;p=f.data;let v=!1;if(r.placeholderData!==void 0&&p===void 0&&g==="pending"){let _;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(_=a.data,v=!0):_=typeof r.placeholderData=="function"?r.placeholderData((A=$(this,ls))==null?void 0:A.state.data,$(this,ls)):r.placeholderData,_!==void 0&&(g="success",p=Ty(a==null?void 0:a.data,_,r),d=!0)}if(r.select&&p!==void 0&&!v)if(a&&p===(o==null?void 0:o.data)&&r.select===$(this,xc))p=$(this,ss);else try{X(this,xc,r.select),p=r.select(p),p=Ty(a==null?void 0:a.data,p,r),X(this,ss,p),X(this,Pi,null)}catch(_){X(this,Pi,_)}$(this,Pi)&&(y=$(this,Pi),p=$(this,ss),m=Date.now(),g="error");const b=f.fetchStatus==="fetching",x=g==="pending",S=g==="error",w=x&&b,O=p!==void 0,E={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&O,isStale:$b(t,r),refetch:this.refetch,promise:$(this,Dn),isEnabled:Ar(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=D=>{E.status==="error"?D.reject(E.error):E.data!==void 0&&D.resolve(E.data)},T=()=>{const D=X(this,Dn,E.promise=ky());_(D)},k=$(this,Dn);switch(k.status){case"pending":t.queryHash===n.queryHash&&_(k);break;case"fulfilled":(E.status==="error"||E.data!==k.value)&&T();break;case"rejected":(E.status!=="error"||E.error!==k.reason)&&T();break}}return E}updateResult(){const t=$(this,Rt),r=this.createResult($(this,ve),this.options);if(X(this,Ca,$(this,ve).state),X(this,os,this.options),$(this,Ca).data!==void 0&&X(this,ls,$(this,ve)),Ay(r,t))return;X(this,Rt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!$(this,us).size)return!0;const o=new Set(a??$(this,us));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Rt)).some(s=>{const l=s;return $(this,Rt)[l]!==t[l]&&o.has(l)})};me(this,je,cT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,je,Iy).call(this)}},Qt=new WeakMap,ve=new WeakMap,bc=new WeakMap,Rt=new WeakMap,Ca=new WeakMap,os=new WeakMap,Dn=new WeakMap,Pi=new WeakMap,xc=new WeakMap,ss=new WeakMap,ls=new WeakMap,$a=new WeakMap,Ma=new WeakMap,ji=new WeakMap,us=new WeakMap,je=new WeakSet,ql=function(t){me(this,je,Ly).call(this);let r=$(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Jt)),r},Cy=function(){me(this,je,Dy).call(this);const t=Ui(this.options.staleTime,$(this,ve));if(Va||$(this,Rt).isStale||!Ey(t))return;const n=nT($(this,Rt).dataUpdatedAt,t)+1;X(this,$a,wa.setTimeout(()=>{$(this,Rt).isStale||this.updateResult()},n))},$y=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,ve)):this.options.refetchInterval)??!1},My=function(t){me(this,je,Ry).call(this),X(this,ji,t),!(Va||Ar(this.options.enabled,$(this,ve))===!1||!Ey($(this,ji))||$(this,ji)===0)&&X(this,Ma,wa.setInterval(()=>{(this.options.refetchIntervalInBackground||Cb.isFocused())&&me(this,je,ql).call(this)},$(this,ji)))},Iy=function(){me(this,je,Cy).call(this),me(this,je,My).call(this,me(this,je,$y).call(this))},Dy=function(){$(this,$a)&&(wa.clearTimeout($(this,$a)),X(this,$a,void 0))},Ry=function(){$(this,Ma)&&(wa.clearInterval($(this,Ma)),X(this,Ma,void 0))},Ly=function(){const t=$(this,Qt).getQueryCache().build($(this,Qt),this.options);if(t===$(this,ve))return;const r=$(this,ve);X(this,ve,t),X(this,bc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},cT=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,Rt))}),$(this,Qt).getQueryCache().notify({query:$(this,ve),type:"observerResultsUpdated"})})},BE);function VD(e,t){return Ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function P1(e,t){return VD(e,t)||e.state.data!==void 0&&Fy(e,t,t.refetchOnMount)}function Fy(e,t,r){if(Ar(t.enabled,e)!==!1&&Ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&$b(e,t)}return!1}function j1(e,t,r,n){return(e!==t||Ar(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&$b(e,r)}function $b(e,t){return Ar(t.enabled,e)!==!1&&e.isStaleByTime(Ui(t.staleTime,e))}function GD(e,t){return!Ay(e.getCurrentResult(),t)}function E1(e){return{onFetch:(t,r)=>{var c,f,d,p,y;const n=t.options,i=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=aT(t.options,t.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const P=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(T),T})(),E=await v(P),{maxPages:A}=t.options,_=w?LD:RD;return{pages:_(x.pages,E,A),pageParams:_(x.pageParams,S,A)}};if(i&&a.length){const x=i==="backward",S=x?YD:A1,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:A1(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function A1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function YD(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var wc,mn,Lt,Ia,vn,hi,zE,XD=(zE=class extends lT{constructor(t){super();ne(this,vn);ne(this,wc);ne(this,mn);ne(this,Lt);ne(this,Ia);X(this,wc,t.client),this.mutationId=t.mutationId,X(this,Lt,t.mutationCache),X(this,mn,[]),this.state=t.state||QD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,mn).includes(t)||($(this,mn).push(t),this.clearGcTimeout(),$(this,Lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,mn,$(this,mn).filter(r=>r!==t)),this.scheduleGc(),$(this,Lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,mn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Lt).remove(this))}continue(){var t;return((t=$(this,Ia))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,c,f,d,p,y,m,g,v,b,x,S,w,O,P,E,A;const r=()=>{me(this,vn,hi).call(this,{type:"continue"})},n={client:$(this,wc),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,Ia,sT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(_,T)=>{me(this,vn,hi).call(this,{type:"failed",failureCount:_,error:T})},onPause:()=>{me(this,vn,hi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Lt).canRun(this)}));const i=this.state.status==="pending",a=!$(this,Ia).canStart();try{if(i)r();else{me(this,vn,hi).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=$(this,Lt).config).onMutate)==null?void 0:s.call(o,t,this,n));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));T!==this.state.context&&me(this,vn,hi).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const _=await $(this,Ia).start();return await((f=(c=$(this,Lt).config).onSuccess)==null?void 0:f.call(c,_,t,this.state.context,this,n)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,_,t,this.state.context,n)),await((m=(y=$(this,Lt).config).onSettled)==null?void 0:m.call(y,_,null,this.state.variables,this.state.context,this,n)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,_,null,t,this.state.context,n)),me(this,vn,hi).call(this,{type:"success",data:_}),_}catch(_){try{throw await((x=(b=$(this,Lt).config).onError)==null?void 0:x.call(b,_,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,_,t,this.state.context,n)),await((P=(O=$(this,Lt).config).onSettled)==null?void 0:P.call(O,void 0,_,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,_,t,this.state.context,n)),_}finally{me(this,vn,hi).call(this,{type:"error",error:_})}}finally{$(this,Lt).runNext(this)}}},wc=new WeakMap,mn=new WeakMap,Lt=new WeakMap,Ia=new WeakMap,vn=new WeakSet,hi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Et.batch(()=>{$(this,mn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Lt).notify({mutation:this,type:"updated",action:t})})},zE);function QD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rn,Gr,Sc,UE,JD=(UE=class extends _c{constructor(t={}){super();ne(this,Rn);ne(this,Gr);ne(this,Sc);this.config=t,X(this,Rn,new Set),X(this,Gr,new Map),X(this,Sc,0)}build(t,r,n){const i=new XD({client:t,mutationCache:this,mutationId:++Vc(this,Sc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Rn).add(t);const r=hf(t);if(typeof r=="string"){const n=$(this,Gr).get(r);n?n.push(t):$(this,Gr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Rn).delete(t)){const r=hf(t);if(typeof r=="string"){const n=$(this,Gr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,Gr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=hf(t);if(typeof r=="string"){const n=$(this,Gr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=hf(t);if(typeof r=="string"){const i=(n=$(this,Gr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{$(this,Rn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Rn).clear(),$(this,Gr).clear()})}getAll(){return Array.from($(this,Rn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>x1(r,n))}findAll(t={}){return this.getAll().filter(r=>x1(t,r))}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Et.batch(()=>Promise.all(t.map(r=>r.continue().catch(Jt))))}},Rn=new WeakMap,Gr=new WeakMap,Sc=new WeakMap,UE);function hf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yn,WE,ZD=(WE=class extends _c{constructor(t={}){super();ne(this,yn);this.config=t,X(this,yn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??kb(i,r);let o=this.get(a);return o||(o=new KD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,yn).has(t.queryHash)||($(this,yn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,yn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,yn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,yn).get(t)}getAll(){return[...$(this,yn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>b1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>b1(t,n)):r}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},yn=new WeakMap,WE),Je,Ei,Ai,cs,fs,_i,ds,hs,HE,eR=(HE=class{constructor(e={}){ne(this,Je);ne(this,Ei);ne(this,Ai);ne(this,cs);ne(this,fs);ne(this,_i);ne(this,ds);ne(this,hs);X(this,Je,e.queryCache||new ZD),X(this,Ei,e.mutationCache||new JD),X(this,Ai,e.defaultOptions||{}),X(this,cs,new Map),X(this,fs,new Map),X(this,_i,0)}mount(){Vc(this,_i)._++,$(this,_i)===1&&(X(this,ds,Cb.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Je).onFocus())})),X(this,hs,jd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Je).onOnline())})))}unmount(){var e,t;Vc(this,_i)._--,$(this,_i)===0&&((e=$(this,ds))==null||e.call(this),X(this,ds,void 0),(t=$(this,hs))==null||t.call(this),X(this,hs,void 0))}isFetching(e){return $(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ei).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Je).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,Je).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,Je).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,Je).get(n.queryHash),a=i==null?void 0:i.state.data,o=MD(t,a);if(o!==void 0)return $(this,Je).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Et.batch(()=>$(this,Je).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Je).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,Je);Et.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,Je);return Et.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Et.batch(()=>$(this,Je).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Et.batch(()=>($(this,Je).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Et.batch(()=>$(this,Je).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Jt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,Je).build(this,t);return r.isStaleByTime(Ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=E1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=E1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jd.isOnline()?$(this,Ei).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Je)}getMutationCache(){return $(this,Ei)}getDefaultOptions(){return $(this,Ai)}setDefaultOptions(e){X(this,Ai,e)}setQueryDefaults(e,t){$(this,cs).set(Tu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,cs).values()],r={};return t.forEach(n=>{ku(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,fs).set(Tu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,fs).values()],r={};return t.forEach(n=>{ku(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ai).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kb(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===Nb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ai).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Je).clear(),$(this,Ei).clear()}},Je=new WeakMap,Ei=new WeakMap,Ai=new WeakMap,cs=new WeakMap,fs=new WeakMap,_i=new WeakMap,ds=new WeakMap,hs=new WeakMap,HE),fT=j.createContext(void 0),dT=e=>{const t=j.useContext(fT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tR=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(fT.Provider,{value:e,children:t})),hT=j.createContext(!1),rR=()=>j.useContext(hT);hT.Provider;function nR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var iR=j.createContext(nR()),aR=()=>j.useContext(iR),oR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sR=e=>{j.useEffect(()=>{e.clearReset()},[e])},lR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||FD(r,[e.error,n])),uR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},cR=(e,t)=>e.isLoading&&e.isFetching&&!t,fR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function dR(e,t,r){var f,d,p,y,m;const n=rR(),i=aR(),a=dT(),o=a.defaultQueryOptions(e);(d=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",uR(o),oR(o,i),sR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=j.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(g=>{const v=c?l.subscribe(Et.batchCalls(g)):Jt;return l.updateResult(),v},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),j.useEffect(()=>{l.setOptions(o)},[o,l]),fR(o,u))throw _1(o,l,i);if(lR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,o,u),o.experimental_prefetchInRender&&!Va&&cR(u,n)){const g=s?_1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(Jt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function wr(e,t){return dR(e,qD)}/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Nu(){return Nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function pT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pR(){return Math.random().toString(36).substr(2,8)}function k1(e,t){return{usr:e.state,key:e.key,idx:t}}function By(e,t,r,n){return r===void 0&&(r=null),Nu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?el(t):t,{state:r,key:t&&t.key||n||pR()})}function Ed(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function el(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function mR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ni.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Nu({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Ni.Pop;let g=c(),v=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:v})}function d(g,v){s=Ni.Push;let b=By(m.location,g,v);u=c()+1;let x=k1(b,u),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function p(g,v){s=Ni.Replace;let b=By(m.location,g,v);u=c();let x=k1(b,u),S=m.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function y(g){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof g=="string"?g:Ed(g);return b=b.replace(/ $/,"%20"),at(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(T1,f),l=g,()=>{i.removeEventListener(T1,f),l=null}},createHref(g){return t(i,g)},createURL:y,encodeLocation(g){let v=y(g);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:p,go(g){return o.go(g)}};return m}var N1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(N1||(N1={}));function vR(e,t,r){return r===void 0&&(r="/"),yR(e,t,r)}function yR(e,t,r,n){let i=typeof t=="string"?el(t):t,a=Mb(i.pathname||"/",r);if(a==null)return null;let o=mT(e);gR(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(at(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wi([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),mT(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:jR(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of vT(a.path))i(a,o,l)}),t}function vT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=vT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function gR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ER(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const bR=/^:[\w-]+$/,xR=3,wR=2,SR=1,OR=10,PR=-2,C1=e=>e==="*";function jR(e,t){let r=e.split("/"),n=r.length;return r.some(C1)&&(n+=PR),t&&(n+=wR),r.filter(i=>!C1(i)).reduce((i,a)=>i+(bR.test(a)?xR:a===""?SR:OR),n)}function ER(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function AR(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:p}=c;if(d==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const y=s[f];return p&&!y?u[d]=void 0:u[d]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function TR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),pT(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function kR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pT(!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 Mb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function NR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?el(e):e;return{pathname:r?r.startsWith("/")?r:CR(r,t):t,search:IR(n),hash:DR(i)}}function CR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Rm(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $R(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function yT(e,t){let r=$R(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function gT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=el(e):(i=Nu({},e),at(!i.pathname||!i.pathname.includes("?"),Rm("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),Rm("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),Rm("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=NR(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Wi=e=>e.join("/").replace(/\/\/+/g,"/"),MR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),IR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,DR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function RR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const bT=["post","put","patch","delete"];new Set(bT);const LR=["get",...bT];new Set(LR);/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),j.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=gT(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Wi([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}const UR=j.createContext(null);function WR(e){let t=j.useContext(ni).outlet;return t&&j.createElement(UR.Provider,{value:e},t)}function ST(){let{matches:e}=j.useContext(ni),t=e[e.length-1];return t?t.params:{}}function OT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=j.useContext(oo),{matches:i}=j.useContext(ni),{pathname:a}=so(),o=JSON.stringify(yT(i,n.v7_relativeSplatPath));return j.useMemo(()=>gT(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function HR(e,t){return KR(e,t)}function KR(e,t,r,n){Tc()||at(!1);let{navigator:i}=j.useContext(oo),{matches:a}=j.useContext(ni),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=so(),c;if(t){var f;let g=typeof t=="string"?el(t):t;l==="/"||(f=g.pathname)!=null&&f.startsWith(l)||at(!1),c=g}else c=u;let d=c.pathname||"/",p=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=vR(e,{pathname:p}),m=XR(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Wi([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Wi([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&m?j.createElement(tp.Provider,{value:{location:Cu({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ni.Pop}},m):m}function qR(){let e=eL(),t=RR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:i},r):null,null)}const VR=j.createElement(qR,null);class GR extends j.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?j.createElement(ni.Provider,{value:this.props.routeContext},j.createElement(xT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YR(e){let{routeContext:t,match:r,children:n}=e,i=j.useContext(Ib);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),j.createElement(ni.Provider,{value:t},n)}function XR(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||at(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let p,y=!1,m=null,g=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||VR,l&&(u<0&&d===0?(rL("route-fallback"),y=!0,g=null):u===d&&(y=!0,g=f.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,d+1)),b=()=>{let x;return p?x=m:y?x=g:f.route.Component?x=j.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,j.createElement(YR,{match:f,routeContext:{outlet:c,matches:v,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?j.createElement(GR,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var PT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(PT||{}),jT=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}(jT||{});function QR(e){let t=j.useContext(Ib);return t||at(!1),t}function JR(e){let t=j.useContext(FR);return t||at(!1),t}function ZR(e){let t=j.useContext(ni);return t||at(!1),t}function ET(e){let t=ZR(),r=t.matches[t.matches.length-1];return r.route.id||at(!1),r.route.id}function eL(){var e;let t=j.useContext(xT),r=JR(),n=ET();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function tL(){let{router:e}=QR(PT.UseNavigateStable),t=ET(jT.UseNavigateStable),r=j.useRef(!1);return wT(()=>{r.current=!0}),j.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Cu({fromRouteId:t},a)))},[e,t])}const $1={};function rL(e,t,r){$1[e]||($1[e]=!0)}function nL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function iL(e){return WR(e.context)}function Kr(e){at(!1)}function aL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Ni.Pop,navigator:a,static:o=!1,future:s}=e;Tc()&&at(!1);let l=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:l,navigator:a,static:o,future:Cu({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=el(n));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:y="default"}=n,m=j.useMemo(()=>{let g=Mb(c,l);return g==null?null:{location:{pathname:g,search:f,hash:d,state:p,key:y},navigationType:i}},[l,c,f,d,p,y,i]);return m==null?null:j.createElement(oo.Provider,{value:u},j.createElement(tp.Provider,{children:r,value:m}))}function oL(e){let{children:t,location:r}=e;return HR(zy(t),r)}new Promise(()=>{});function zy(e,t){t===void 0&&(t=[]);let r=[];return j.Children.forEach(e,(n,i)=>{if(!j.isValidElement(n))return;let a=[...t,i];if(n.type===j.Fragment){r.push.apply(r,zy(n.props.children,a));return}n.type!==Kr&&at(!1),!n.props.index||!n.props.children||at(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=zy(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Uy(){return Uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function lL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uL(e,t){return e.button===0&&(!t||t==="_self")&&!lL(e)}function Wy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function cL(e,t){let r=Wy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const fL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],dL="6";try{window.__reactRouterVersion=dL}catch{}const hL="startTransition",M1=L0[hL];function pL(e){let{basename:t,children:r,future:n,window:i}=e,a=j.useRef();a.current==null&&(a.current=hR({window:i,v5Compat:!0}));let o=a.current,[s,l]=j.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=j.useCallback(f=>{u&&M1?M1(()=>l(f)):l(f)},[l,u]);return j.useLayoutEffect(()=>o.listen(c),[o,c]),j.useEffect(()=>nL(n),[n]),j.createElement(aL,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const mL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ga=j.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=sL(t,fL),{basename:p}=j.useContext(oo),y,m=!1;if(typeof u=="string"&&vL.test(u)&&(y=u,mL))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=Mb(S.pathname,p);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let g=BR(u,{relative:i}),v=yL(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function b(x){n&&n(x),x.defaultPrevented||v(x)}return j.createElement("a",Uy({},d,{href:y||g,onClick:m||a?n:b,ref:r,target:l}))});var I1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(I1||(I1={}));var D1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(D1||(D1={}));function yL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Db(),u=so(),c=OT(e,{relative:o});return j.useCallback(f=>{if(uL(f,r)){f.preventDefault();let d=n!==void 0?n:Ed(u)===Ed(c);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}function gL(e){let t=j.useRef(Wy(e)),r=j.useRef(!1),n=so(),i=j.useMemo(()=>cL(n.search,r.current?null:t.current),[n.search]),a=Db(),o=j.useCallback((s,l)=>{const u=Wy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const bL=new eR({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function Rb(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function AT(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const _T=j.createContext(void 0);function xL({children:e}){const[t,r]=j.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return h.jsx(_T.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function tl(){const e=j.useContext(_T);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function wL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function SL(){return(await wL()).userId}function TT(e,t){return function(){return e.apply(t,arguments)}}const{toString:OL}=Object.prototype,{getPrototypeOf:Lb}=Object,{iterator:rp,toStringTag:kT}=Symbol,np=(e=>t=>{const r=OL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ln=e=>(e=e.toLowerCase(),t=>np(t)===e),ip=e=>t=>typeof t===e,{isArray:rl}=Array,ws=ip("undefined");function kc(e){return e!==null&&!ws(e)&&e.constructor!==null&&!ws(e.constructor)&&ar(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const NT=ln("ArrayBuffer");function PL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&NT(e.buffer),t}const jL=ip("string"),ar=ip("function"),CT=ip("number"),Nc=e=>e!==null&&typeof e=="object",EL=e=>e===!0||e===!1,Gf=e=>{if(np(e)!=="object")return!1;const t=Lb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(kT in e)&&!(rp in e)},AL=e=>{if(!Nc(e)||kc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_L=ln("Date"),TL=ln("File"),kL=ln("Blob"),NL=ln("FileList"),CL=e=>Nc(e)&&ar(e.pipe),$L=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ar(e.append)&&((t=np(e))==="formdata"||t==="object"&&ar(e.toString)&&e.toString()==="[object FormData]"))},ML=ln("URLSearchParams"),[IL,DL,RL,LL]=["ReadableStream","Request","Response","Headers"].map(ln),FL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),rl(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MT=e=>!ws(e)&&e!==Sa;function Hy(){const{caseless:e,skipUndefined:t}=MT(this)&&this||{},r={},n=(i,a)=>{const o=e&&$T(r,a)||a;Gf(r[o])&&Gf(i)?r[o]=Hy(r[o],i):Gf(i)?r[o]=Hy({},i):rl(i)?r[o]=i.slice():(!t||!ws(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Cc(t,(i,a)=>{r&&ar(i)?e[a]=TT(i,r):e[a]=i},{allOwnKeys:n}),e),zL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),UL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},WL=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Lb(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},HL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},KL=e=>{if(!e)return null;if(rl(e))return e;let t=e.length;if(!CT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},qL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lb(Uint8Array)),VL=(e,t)=>{const n=(e&&e[rp]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},GL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},YL=ln("HTMLFormElement"),XL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),R1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),QL=ln("RegExp"),IT=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Cc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},JL=e=>{IT(e,(t,r)=>{if(ar(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ar(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ZL=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return rl(e)?n(e):n(String(e).split(t)),r},e3=()=>{},t3=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r3(e){return!!(e&&ar(e.append)&&e[kT]==="FormData"&&e[rp])}const n3=e=>{const t=new Array(10),r=(n,i)=>{if(Nc(n)){if(t.indexOf(n)>=0)return;if(kc(n))return n;if(!("toJSON"in n)){t[i]=n;const a=rl(n)?[]:{};return Cc(n,(o,s)=>{const l=r(o,i+1);!ws(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},i3=ln("AsyncFunction"),a3=e=>e&&(Nc(e)||ar(e))&&ar(e.then)&&ar(e.catch),DT=((e,t)=>e?setImmediate:t?((r,n)=>(Sa.addEventListener("message",({source:i,data:a})=>{i===Sa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Sa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ar(Sa.postMessage)),o3=typeof queueMicrotask<"u"?queueMicrotask.bind(Sa):typeof process<"u"&&process.nextTick||DT,s3=e=>e!=null&&ar(e[rp]),R={isArray:rl,isArrayBuffer:NT,isBuffer:kc,isFormData:$L,isArrayBufferView:PL,isString:jL,isNumber:CT,isBoolean:EL,isObject:Nc,isPlainObject:Gf,isEmptyObject:AL,isReadableStream:IL,isRequest:DL,isResponse:RL,isHeaders:LL,isUndefined:ws,isDate:_L,isFile:TL,isBlob:kL,isRegExp:QL,isFunction:ar,isStream:CL,isURLSearchParams:ML,isTypedArray:qL,isFileList:NL,forEach:Cc,merge:Hy,extend:BL,trim:FL,stripBOM:zL,inherits:UL,toFlatObject:WL,kindOf:np,kindOfTest:ln,endsWith:HL,toArray:KL,forEachEntry:VL,matchAll:GL,isHTMLForm:YL,hasOwnProperty:R1,hasOwnProp:R1,reduceDescriptors:IT,freezeMethods:JL,toObjectSet:ZL,toCamelCase:XL,noop:e3,toFiniteNumber:t3,findKey:$T,global:Sa,isContextDefined:MT,isSpecCompliantForm:r3,toJSONObject:n3,isAsyncFn:i3,isThenable:a3,setImmediate:DT,asap:o3,isIterable:s3};function ce(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(ce,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:R.toJSONObject(this.config),code:this.code,status:this.status}}});const RT=ce.prototype,LT={};["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=>{LT[e]={value:e}});Object.defineProperties(ce,LT);Object.defineProperty(RT,"isAxiosError",{value:!0});ce.from=(e,t,r,n,i,a)=>{const o=Object.create(RT);R.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const l3=null;function Ky(e){return R.isPlainObject(e)||R.isArray(e)}function FT(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function L1(e,t,r){return e?e.concat(t).map(function(i,a){return i=FT(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function u3(e){return R.isArray(e)&&!e.some(Ky)}const c3=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function ap(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!R.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(R.isBoolean(y))return y.toString();if(!l&&R.isBlob(y))throw new ce("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function c(y,m,g){let v=y;if(y&&!g&&typeof y=="object"){if(R.endsWith(m,"{}"))m=n?m:m.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&u3(y)||(R.isFileList(y)||R.endsWith(m,"[]"))&&(v=R.toArray(y)))return m=FT(m),v.forEach(function(x,S){!(R.isUndefined(x)||x===null)&&t.append(o===!0?L1([m],S,a):o===null?m:m+"[]",u(x))}),!1}return Ky(y)?!0:(t.append(L1(g,m,a),u(y)),!1)}const f=[],d=Object.assign(c3,{defaultVisitor:c,convertValue:u,isVisitable:Ky});function p(y,m){if(!R.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(y),R.forEach(y,function(v,b){(!(R.isUndefined(v)||v===null)&&i.call(t,v,R.isString(b)?b.trim():b,m,d))===!0&&p(v,m?m.concat(b):[b])}),f.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return p(e),t}function F1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Fb(e,t){this._pairs=[],e&&ap(e,this,t)}const BT=Fb.prototype;BT.append=function(t,r){this._pairs.push([t,r])};BT.toString=function(t){const r=t?function(n){return t.call(this,n,F1)}:F1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function f3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zT(e,t,r){if(!t)return e;const n=r&&r.encode||f3;R.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=R.isURLSearchParams(t)?t.toString():new Fb(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class B1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(n){n!==null&&t(n)})}}const UT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},d3=typeof URLSearchParams<"u"?URLSearchParams:Fb,h3=typeof FormData<"u"?FormData:null,p3=typeof Blob<"u"?Blob:null,m3={isBrowser:!0,classes:{URLSearchParams:d3,FormData:h3,Blob:p3},protocols:["http","https","file","blob","url","data"]},Bb=typeof window<"u"&&typeof document<"u",qy=typeof navigator=="object"&&navigator||void 0,v3=Bb&&(!qy||["ReactNative","NativeScript","NS"].indexOf(qy.product)<0),y3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",g3=Bb&&window.location.href||"http://localhost",b3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bb,hasStandardBrowserEnv:v3,hasStandardBrowserWebWorkerEnv:y3,navigator:qy,origin:g3},Symbol.toStringTag,{value:"Module"})),It={...b3,...m3};function x3(e,t){return ap(e,new It.classes.URLSearchParams,{visitor:function(r,n,i,a){return It.isNode&&R.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function w3(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function S3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&R.isArray(i[o])&&(i[o]=S3(i[o])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const r={};return R.forEachEntry(e,(n,i)=>{t(w3(n),i,r,0)}),r}return null}function O3(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const $c={transitional:UT,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=R.isObject(t);if(a&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return i?JSON.stringify(WT(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return x3(t,this.formSerializer).toString();if((s=R.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ap(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),O3(t)):t}],transformResponse:[function(t){const r=this.transitional||$c.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ce.from(s,ce.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:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{$c.headers[e]={}});const P3=R.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"]),j3=e=>{const t={};let r,n,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&P3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},z1=Symbol("internals");function _l(e){return e&&String(e).trim().toLowerCase()}function Yf(e){return e===!1||e==null?e:R.isArray(e)?e.map(Yf):String(e)}function E3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const A3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lm(e,t,r,n,i){if(R.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!R.isString(t)){if(R.isString(n))return t.indexOf(n)!==-1;if(R.isRegExp(n))return n.test(t)}}function _3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function T3(e,t){const r=R.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let or=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=_l(l);if(!c)throw new Error("header name must be a non-empty string");const f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Yf(s))}const o=(s,l)=>R.forEach(s,(u,c)=>a(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(R.isString(t)&&(t=t.trim())&&!A3(t))o(j3(t),r);else if(R.isObject(t)&&R.isIterable(t)){let s={},l,u;for(const c of t){if(!R.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?R.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=_l(t),t){const n=R.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return E3(i);if(R.isFunction(r))return r.call(this,i,n);if(R.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=_l(t),t){const n=R.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Lm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=_l(o),o){const s=R.findKey(n,o);s&&(!r||Lm(n,n[s],s,r))&&(delete n[s],i=!0)}}return R.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Lm(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return R.forEach(this,(i,a)=>{const o=R.findKey(n,a);if(o){r[o]=Yf(i),delete r[a];return}const s=t?_3(a):String(a).trim();s!==a&&delete r[a],r[s]=Yf(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return R.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&R.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[z1]=this[z1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=_l(o);n[s]||(T3(i,o),n[s]=!0)}return R.isArray(t)?t.forEach(a):a(t),this}};or.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(or.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});R.freezeMethods(or);function Fm(e,t){const r=this||$c,n=t||r,i=or.from(n.headers);let a=n.data;return R.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function HT(e){return!!(e&&e.__CANCEL__)}function nl(e,t,r){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,r),this.name="CanceledError"}R.inherits(nl,ce,{__CANCEL__:!0});function KT(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function k3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function N3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=c,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const Ad=(e,t,r=3)=>{let n=0;const i=N3(50,250);return C3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},U1=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},W1=e=>(...t)=>R.asap(()=>e(...t)),$3=It.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,It.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0,M3=It.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];R.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),R.isString(n)&&o.push("path="+n),R.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.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 I3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function D3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qT(e,t,r){let n=!I3(t);return e&&(n||r==!1)?D3(e,t):t}const H1=e=>e instanceof or?{...e}:e;function Ya(e,t){t=t||{};const r={};function n(u,c,f,d){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:d},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(u,c,f,d){if(R.isUndefined(c)){if(!R.isUndefined(u))return n(void 0,u,f,d)}else return n(u,c,f,d)}function a(u,c){if(!R.isUndefined(c))return n(void 0,c)}function o(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,f)=>i(H1(u),H1(c),f,!0)};return R.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);R.isUndefined(d)&&f!==s||(r[c]=d)}),r}const VT=e=>{const t=Ya({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=or.from(o),t.url=zT(qT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),R.isFormData(r)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(R.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(It.hasStandardBrowserEnv&&(n&&R.isFunction(n)&&(n=n(t)),n||n!==!1&&$3(t.url))){const l=i&&a&&M3.read(a);l&&o.set(i,l)}return t},R3=typeof XMLHttpRequest<"u",L3=R3&&function(e){return new Promise(function(r,n){const i=VT(e);let a=i.data;const o=or.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,p,y;function m(){p&&p(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function v(){if(!g)return;const x=or.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};KT(function(P){r(P),m()},function(P){n(P),m()},w),g=null}"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(v)},g.onabort=function(){g&&(n(new ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new ce(w,ce.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||UT;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new ce(S,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&R.forEach(o.toJSON(),function(S,w){g.setRequestHeader(w,S)}),R.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([d,y]=Ad(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([f,p]=Ad(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=x=>{g&&(n(!x||x.type?new nl(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=k3(i.url);if(b&&It.protocols.indexOf(b)===-1){n(new ce("Unsupported protocol "+b+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})},F3=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ce?c:new nl(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>R.asap(s),l}},B3=function*(e,t){let r=e.byteLength;if(r{const i=z3(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let f=c.byteLength;if(r){let d=a+=f;r(d)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},q1=64*1024,{isFunction:pf}=R,W3=(({Request:e,Response:t})=>({Request:e,Response:t}))(R.global),{ReadableStream:V1,TextEncoder:G1}=R.global,Y1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},H3=e=>{e=R.merge.call({skipUndefined:!0},W3,e);const{fetch:t,Request:r,Response:n}=e,i=t?pf(t):typeof fetch=="function",a=pf(r),o=pf(n);if(!i)return!1;const s=i&&pf(V1),l=i&&(typeof G1=="function"?(y=>m=>y.encode(m))(new G1):async y=>new Uint8Array(await new r(y).arrayBuffer())),u=a&&s&&Y1(()=>{let y=!1;const m=new r(It.origin,{body:new V1,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!m}),c=o&&s&&Y1(()=>R.isReadableStream(new n("").body)),f={stream:c&&(y=>y.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(m,g)=>{let v=m&&m[y];if(v)return v.call(m);throw new ce(`Response type '${y}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});const d=async y=>{if(y==null)return 0;if(R.isBlob(y))return y.size;if(R.isSpecCompliantForm(y))return(await new r(It.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(R.isArrayBufferView(y)||R.isArrayBuffer(y))return y.byteLength;if(R.isURLSearchParams(y)&&(y=y+""),R.isString(y))return(await l(y)).byteLength},p=async(y,m)=>{const g=R.toFiniteNumber(y.getContentLength());return g??d(m)};return async y=>{let{url:m,method:g,data:v,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:P,headers:E,withCredentials:A="same-origin",fetchOptions:_}=VT(y),T=t||fetch;P=P?(P+"").toLowerCase():"text";let k=F3([b,x&&x.toAbortSignal()],S),D=null;const M=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I;try{if(O&&u&&g!=="get"&&g!=="head"&&(I=await p(E,v))!==0){let V=new r(m,{method:"POST",body:v,duplex:"half"}),H;if(R.isFormData(v)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,re]=U1(I,Ad(W1(O)));v=K1(V.body,q1,Y,re)}}R.isString(A)||(A=A?"include":"omit");const L=a&&"credentials"in r.prototype,z={..._,signal:k,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:v,duplex:"half",credentials:L?A:void 0};D=a&&new r(m,z);let C=await(a?T(D,_):T(m,z));const F=c&&(P==="stream"||P==="response");if(c&&(w||F&&M)){const V={};["status","statusText","headers"].forEach(we=>{V[we]=C[we]});const H=R.toFiniteNumber(C.headers.get("content-length")),[Y,re]=w&&U1(H,Ad(W1(w),!0))||[];C=new n(K1(C.body,q1,Y,()=>{re&&re(),M&&M()}),V)}P=P||"text";let W=await f[R.findKey(f,P)||"text"](C,y);return!F&&M&&M(),await new Promise((V,H)=>{KT(V,H,{data:W,headers:or.from(C.headers),status:C.status,statusText:C.statusText,config:y,request:D})})}catch(L){throw M&&M(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,y,D),{cause:L.cause||L}):ce.from(L,L&&L.code,y,D)}}},K3=new Map,GT=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,c=K3;for(;s--;)l=a[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:H3(t)),c=u;return u};GT();const Vy={http:l3,xhr:L3,fetch:{get:GT}};R.forEach(Vy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const X1=e=>`- ${e}`,q3=e=>R.isFunction(e)||e===null||e===!1,YT={getAdapter:(e,t)=>{e=R.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : -`+o.map(X1).join(` -`):" "+X1(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Vy};function Bm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nl(null,e)}function Q1(e){return Bm(e),e.headers=or.from(e.headers),e.data=Fm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),YT.getAdapter(e.adapter||$c.adapter,e)(e).then(function(n){return Bm(e),n.data=Fm.call(e,e.transformResponse,n),n.headers=or.from(n.headers),n},function(n){return HT(n)||(Bm(e),n&&n.response&&(n.response.data=Fm.call(e,e.transformResponse,n.response),n.response.headers=or.from(n.response.headers))),Promise.reject(n)})}const XT="1.12.2",op={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{op[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const J1={};op.transitional=function(t,r,n){function i(a,o){return"[Axios v"+XT+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ce(i(o," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!J1[o]&&(J1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};op.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function V3(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ce("option "+a+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const Xf={assertOptions:V3,validators:op},hn=Xf.validators;let La=class{constructor(t){this.defaults=t||{},this.interceptors={request:new B1,response:new B1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ya(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Xf.assertOptions(n,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),i!=null&&(R.isFunction(i)?r.paramsSerializer={serialize:i}:Xf.assertOptions(i,{encode:hn.function,serialize:hn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xf.assertOptions(r,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&R.merge(a.common,a[r.method]);a&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),r.headers=or.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){const y=[Q1.bind(this),void 0];for(y.unshift(...s),y.push(...u),d=y.length,c=Promise.resolve(r);f{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new nl(a,o,s),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new QT(function(i){t=i}),cancel:t}}};function Y3(e){return function(r){return e.apply(null,r)}}function X3(e){return R.isObject(e)&&e.isAxiosError===!0}const Gy={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(Gy).forEach(([e,t])=>{Gy[t]=e});function JT(e){const t=new La(e),r=TT(La.prototype.request,t);return R.extend(r,La.prototype,t,{allOwnKeys:!0}),R.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return JT(Ya(e,i))},r}const tt=JT($c);tt.Axios=La;tt.CanceledError=nl;tt.CancelToken=G3;tt.isCancel=HT;tt.VERSION=XT;tt.toFormData=ap;tt.AxiosError=ce;tt.Cancel=tt.CanceledError;tt.all=function(t){return Promise.all(t)};tt.spread=Y3;tt.isAxiosError=X3;tt.mergeConfig=Ya;tt.AxiosHeaders=or;tt.formToJSON=e=>WT(R.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=YT.getAdapter;tt.HttpStatusCode=Gy;tt.default=tt;const{Axios:Ihe,AxiosError:Dhe,CanceledError:Rhe,isCancel:Lhe,CancelToken:Fhe,VERSION:Bhe,all:zhe,Cancel:Uhe,isAxiosError:Whe,spread:Hhe,toFormData:Khe,AxiosHeaders:qhe,HttpStatusCode:Vhe,formToJSON:Ghe,getAdapter:Yhe,mergeConfig:Xhe}=tt,Q3="/graphql";async function Vt(e,t){try{const r=await tt.post(Q3,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw tt.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}const sr={listTeams:` - query ListTeams($userId: ID!) { - teams(userId: $userId) { - id - name - description - meta - createdAt - updatedAt - } - } - `,getUser:` - query GetUser($id: ID!) { - user(id: $id) { - id - username - email - avatarUrl - meta - createdAt - updatedAt - } - } - `,getTeam:` - query GetTeam($id: ID!) { - team(id: $id) { - id - name - description - meta - createdAt - updatedAt - totalExperiments - totalRuns - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - } - } - `,getTeamWithExperiments:` - query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { - team(id: $id) { - id - name - expsByTimeframe(startTime: $startTime, endTime: $endTime) { - id - teamId - userId - name - status - createdAt - } - } - } - `,getTeamWithLabelKeys:` - query GetTeamWithLabelKeys($id: ID!) { - team(id: $id) { - id - labelKeys - } - } - `,listExperiments:` - query ListExperiments($teamId: ID!, $labelName: String, $labelValue: String, $page: Int, $pageSize: Int) { - experiments(teamId: $teamId, labelName: $labelName, labelValue: $labelValue, page: $page, pageSize: $pageSize) { - id - teamId - userId - name - description - kind - meta - params - labels { - name - value - } - duration - status - createdAt - updatedAt - } - } - `,getExperiment:` - query GetExperiment($id: ID!) { - experiment(id: $id) { - id - teamId - userId - name - description - kind - meta - params - labels { - name - value - } - duration - status - createdAt - updatedAt - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - metrics { - id - key - value - teamId - experimentId - runId - createdAt - } - } - } - `,listRuns:` - query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { - runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { - id - teamId - userId - experimentId - meta - duration - status - createdAt - } - } - `,getRun:` - query GetRun($id: ID!) { - run(id: $id) { - id - teamId - userId - experimentId - meta - duration - status - createdAt - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - metrics { - id - key - value - teamId - experimentId - runId - createdAt - } - spans { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - semanticKind - serviceName - duration - statusCode - statusMessage - teamId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - } - `,listArtifactRepositories:` - query ListArtifactRepositories { - artifactRepos { - name - } - } - `,listArtifactTags:` - query ListArtifactTags($team_id: ID!, $repo_name: String!) { - artifactTags(teamId: $team_id, repoName: $repo_name) { - name - } - } - `,getArtifactContent:` - query GetArtifactContent($team_id: ID!, $tag: String!, $repo_name: String!) { - artifactContent(teamId: $team_id, tag: $tag, repoName: $repo_name) { - filename - content - contentType - } - } - `,listTraces:` - query ListTraces($runId: ID!) { - traces(runId: $runId) { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - semanticKind - serviceName - duration - statusCode - statusMessage - teamId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - `,getDailyTokenUsage:` - query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { - dailyTokenUsage(teamId: $teamId, days: $days) { - date - totalTokens - inputTokens - outputTokens - } - } - `},ZT=j.createContext(null);function J3({user:e,children:t}){const[r,n]=j.useState(e),i=a=>{n(o=>({...o,...a}))};return h.jsx(ZT.Provider,{value:{user:r,updateUser:i},children:t})}function zb(){const e=j.useContext(ZT);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Z1=e=>{const t=eF(e);return t.charAt(0).toUpperCase()+t.slice(1)},ek=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),tF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var rF={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"};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nF=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>j.createElement("svg",{ref:l,...rF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ek("lucide",i),...!a&&!tF(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>j.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ue=(e,t)=>{const r=j.forwardRef(({className:n,...i},a)=>j.createElement(nF,{ref:a,iconNode:t,className:ek(`lucide-${Z3(Z1(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Z1(e),r};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iF=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],aF=Ue("bot",iF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],eS=Ue("building-2",oF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tk=Ue("check",sF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sp=Ue("chevron-down",lF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ub=Ue("chevron-right",uF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],fF=Ue("chevron-left",cF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Yy=Ue("clock",dF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hF=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],pF=Ue("coins",hF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mF=[["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"}]],rk=Ue("copy",mF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vF=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Wb=Ue("database",vF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yF=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],gF=Ue("download",yF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hb=Ue("eye",bF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],nk=Ue("file-text",xF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],ik=Ue("flask-conical",wF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],OF=Ue("git-branch",SF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],jF=Ue("github",PF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EF=[["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"}]],AF=Ue("globe",EF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _F=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],TF=Ue("info",_F);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kF=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],NF=Ue("layout-dashboard",kF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Xo=Ue("package",CF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $F=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],MF=Ue("play",$F);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$u=Ue("search",IF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DF=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],tS=Ue("user",DF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_d=Ue("x",RF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LF=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],FF=Ue("zap",LF);function ak(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),ok=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",rS=[],UF="arbitrary..",WF=e=>{const t=KF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return HF(o);const s=o.split(Td),l=s[0]===""&&s.length>1?1:0;return sk(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?BF(u,l):l:u||rS}return r[o]||rS}}},sk=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=sk(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Td):e.slice(t).join(Td),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?UF+n:void 0})(),KF=e=>{const{theme:t,classGroups:r}=e;return qF(r,t)},qF=(e,t)=>{const r=ok();for(const n in e){const i=e[n];Kb(i,r,n,t)}return r},Kb=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){GF(e,t,r);return}if(typeof e=="function"){YF(e,t,r,n);return}XF(e,t,r,n)},GF=(e,t,r)=>{const n=e===""?t:lk(t,e);n.classGroupId=r},YF=(e,t,r,n)=>{if(QF(e)){Kb(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(zF(r,e))},XF=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,JF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Xy="!",nS=":",ZF=[],iS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),e5=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const c=i.length;for(let m=0;ml?u-l:void 0;return iS(a,p,d,y)};if(t){const i=t+nS,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):iS(ZF,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},t5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},r5=e=>({cache:JF(e.cacheSize),parseClassName:e5(e),sortModifiers:t5(e),...WF(e)}),n5=/\s+/,i5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(n5);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:m}=r(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!m,v=n(g?y.substring(0,m):y);if(!v){if(!g){l=c+(l.length>0?" "+l:l);continue}if(v=n(y),!v){l=c+(l.length>0?" "+l:l);continue}g=!1}const b=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=p?b+Xy:b,S=x+v;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(v,g);for(let O=0;O0?" "+l:l)}return l},a5=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((c,f)=>f(c),e());return r=r5(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const c=i5(l,r);return i(l,c),c};return a=o,(...l)=>a(a5(...l))},s5=[],ut=e=>{const t=r=>r[e]||s5;return t.isThemeGetter=!0,t},ck=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,l5=/^\d+\/\d+$/,u5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c5=/\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$/,f5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,h5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,go=e=>l5.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),ci=e=>!!e&&Number.isInteger(Number(e)),zm=e=>e.endsWith("%")&&de(e.slice(0,-1)),kn=e=>u5.test(e),p5=()=>!0,m5=e=>c5.test(e)&&!f5.test(e),dk=()=>!1,v5=e=>d5.test(e),y5=e=>h5.test(e),g5=e=>!Z(e)&&!ee(e),b5=e=>il(e,mk,dk),Z=e=>ck.test(e),sa=e=>il(e,vk,m5),Um=e=>il(e,P5,de),aS=e=>il(e,hk,dk),x5=e=>il(e,pk,y5),mf=e=>il(e,yk,v5),ee=e=>fk.test(e),Tl=e=>al(e,vk),w5=e=>al(e,j5),oS=e=>al(e,hk),S5=e=>al(e,mk),O5=e=>al(e,pk),vf=e=>al(e,yk,!0),il=(e,t,r)=>{const n=ck.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},al=(e,t,r=!1)=>{const n=fk.exec(e);return n?n[1]?t(n[1]):r:!1},hk=e=>e==="position"||e==="percentage",pk=e=>e==="image"||e==="url",mk=e=>e==="length"||e==="size"||e==="bg-size",vk=e=>e==="length",P5=e=>e==="number",j5=e=>e==="family-name",yk=e=>e==="shadow",E5=()=>{const e=ut("color"),t=ut("font"),r=ut("text"),n=ut("font-weight"),i=ut("tracking"),a=ut("leading"),o=ut("breakpoint"),s=ut("container"),l=ut("spacing"),u=ut("radius"),c=ut("shadow"),f=ut("inset-shadow"),d=ut("text-shadow"),p=ut("drop-shadow"),y=ut("blur"),m=ut("perspective"),g=ut("aspect"),v=ut("ease"),b=ut("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],E=()=>[ee,Z,l],A=()=>[go,"full","auto",...E()],_=()=>[ci,"none","subgrid",ee,Z],T=()=>["auto",{span:["full",ci,ee,Z]},ci,ee,Z],k=()=>[ci,"auto",ee,Z],D=()=>["auto","min","max","fr",ee,Z],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...E()],z=()=>[go,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],C=()=>[e,ee,Z],F=()=>[...S(),oS,aS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",S5,b5,{size:[ee,Z]}],H=()=>[zm,Tl,sa],Y=()=>["","none","full",u,ee,Z],re=()=>["",de,Tl,sa],we=()=>["solid","dashed","dotted","double"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[de,zm,oS,aS],St=()=>["","none",y,ee,Z],G=()=>["none",de,ee,Z],se=()=>["none",de,ee,Z],le=()=>[de,ee,Z],U=()=>[go,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[kn],breakpoint:[kn],color:[p5],container:[kn],"drop-shadow":[kn],ease:["in","out","in-out"],font:[g5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[kn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[kn],shadow:[kn],spacing:["px",de],text:[kn],"text-shadow":[kn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",go,Z,ee,g]}],container:["container"],columns:[{columns:[de,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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"],sr:["sr-only","not-sr-only"],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:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[ci,"auto",ee,Z]}],basis:[{basis:[go,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,go,"auto","initial","none",Z]}],grow:[{grow:["",de,ee,Z]}],shrink:[{shrink:["",de,ee,Z]}],order:[{order:[ci,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Tl,sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,Um]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zm,Z]}],"font-family":[{font:[w5,Z,t]}],"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:[i,ee,Z]}],"line-clamp":[{"line-clamp":[de,"none",ee,Um]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",ee,sa]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[de,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ci,ee,Z],radial:["",ee,Z],conic:[ci,ee,Z]},O5,x5]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,ee,Z]}],"outline-w":[{outline:["",de,Tl,sa]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,vf,mf]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,vf,mf]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[de,sa]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",d,vf,mf]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[de,ee,Z]}],"mix-blend":[{"mix-blend":[...We(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":We()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:St()}],brightness:[{brightness:[de,ee,Z]}],contrast:[{contrast:[de,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",p,vf,mf]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",de,ee,Z]}],"hue-rotate":[{"hue-rotate":[de,ee,Z]}],invert:[{invert:["",de,ee,Z]}],saturate:[{saturate:[de,ee,Z]}],sepia:[{sepia:["",de,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[de,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[de,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",de,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[de,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[de,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",de,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",ee,Z]}],ease:[{ease:["linear","initial",v,ee,Z]}],delay:[{delay:[de,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ee,Z]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[de,Tl,sa,Um]}],stroke:[{stroke:["none",...C()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},A5=o5(E5);function fe(...e){return A5(ue(e))}const _5="/static/assets/logo-D6hHn9pX.png",T5=[{title:"Dashboard",href:"/",icon:NF},{title:"Experiments",href:"/experiments",icon:ik},{title:"Artifacts",href:"/artifacts",icon:Xo}];function k5(){const e=so(),t=zb(),[r,n]=j.useState(!1);return h.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[h.jsxs(Ga,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[h.jsx("img",{src:_5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),h.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),h.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:T5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/experiments"&&(o=o||e.pathname.startsWith("/runs")),h.jsxs(Ga,{to:i.href,className:fe("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),h.jsx(a,{className:fe("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),h.jsxs("div",{className:"relative p-3 mt-auto",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[h.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:h.jsx(tS,{className:"h-3.5 w-3.5"})})}),h.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[h.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:h.jsx(jF,{className:"h-3.5 w-3.5"})}),h.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),h.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):h.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:h.jsx(tS,{className:"h-6 w-6"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),h.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function N5(e=0,t=100){const r=zb();return wr({queryKey:["teams",r.id,e,t],queryFn:async()=>(await Vt(sr.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function qb(e){return wr({queryKey:["team",e],queryFn:async()=>(await Vt(sr.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const Fr=j.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return h.jsx("button",{className:fe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});Fr.displayName="Button";function Ve({className:e,...t}){return h.jsx("div",{className:fe("animate-pulse rounded-md bg-muted",e),...t})}function C5(){const e=Db(),{data:t,isLoading:r}=N5(),{selectedTeamId:n,setSelectedTeamId:i}=tl(),a=zb(),[o,s]=j.useState(!1),[l,u]=j.useState(null),c=(d,p)=>{p.stopPropagation(),navigator.clipboard.writeText(d),u(d),setTimeout(()=>u(null),2e3)};if(r)return h.jsx(Ve,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return h.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[h.jsx(eS,{className:"h-4 w-4"}),"No teams available"]});const f=t.find(d=>d.id===n);return h.jsxs("div",{className:"relative",children:[h.jsxs(Fr,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[h.jsx(eS,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs font-medium",children:(f==null?void 0:f.name)||"Select team"}),h.jsx(sp,{className:fe("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),h.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-64 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-1.5",children:t.map((d,p)=>{const y=d.id===n,m=l===d.id;return h.jsxs("button",{onClick:()=>{i(d.id,a.id),s(!1),e("/")},className:fe("flex w-full items-start justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",y?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[h.jsxs("div",{className:"flex-1 text-left min-w-0",children:[h.jsx("div",{className:"text-xs font-medium break-words",children:d.name||"Unnamed Team"}),h.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[h.jsx("span",{className:"text-[10px] font-mono text-muted-foreground truncate",children:d.id}),h.jsx("button",{onClick:g=>c(d.id,g),className:"flex-shrink-0 p-0.5 hover:bg-accent rounded transition-colors",title:m?"Copied!":"Copy Team ID",children:h.jsx(rk,{className:fe("h-3 w-3",m?"text-green-600":"text-muted-foreground")})})]})]}),y&&h.jsx(tk,{className:"h-3 w-3 flex-shrink-0 text-primary mt-0.5"})]},d.id)})})})]})]})}function gk(e,t){const{page:r=0,pageSize:n=100,labelName:i,labelValue:a,enabled:o=!0}=t||{};return wr({queryKey:["experiments",e,i,a,r,n],queryFn:async()=>(await Vt(sr.listExperiments,{teamId:e,labelName:i,labelValue:a,page:r,pageSize:n})).experiments,enabled:o&&!!e,refetchInterval:s=>{const l=s.state.data;if(!l)return!1;const u=l.map(c=>c.status);return Rb(u)}})}function lp(e,t){const{enabled:r=!0}=t||{};return wr({queryKey:["experiment",e],queryFn:async()=>(await Vt(sr.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?Rb([i.status]):!1}})}function $5(e){return wr({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await Vt(sr.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return Rb(n)}})}function Qy(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return wr({queryKey:["runs",e,r,n],queryFn:async()=>(await Vt(sr.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return AT(s)}})}function bk(e,t){const{enabled:r=!0}=t||{};return wr({queryKey:["run",e],queryFn:async()=>(await Vt(sr.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?AT([i.status]):!1}})}function Wm(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function M5(){const e=so(),t=e.pathname.split("/").filter(Boolean),r=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,n=t[0]==="runs"&&t[1]?t[1]:void 0,{data:i}=lp(r||"",{enabled:!!r}),{data:a}=bk(n||"",{enabled:!!n}),s=(()=>{const l=e.pathname.split("/").filter(Boolean);if(l.length===0)return[{label:"Home"}];const u=[{label:"Home",href:"/"}];return l[0]==="experiments"?r&&i?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Wm(i.id),href:l.length===2?void 0:`/experiments/${i.id}`})):u.push({label:"Experiments",href:void 0}):l[0]==="runs"?n&&a?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Wm(a.experimentId),href:`/experiments/${a.experimentId}`}),u.push({label:"Runs",href:`/experiments/${a.experimentId}`}),u.push({label:Wm(a.id),href:void 0})):u.push({label:"Runs",href:void 0}):l.forEach((c,f)=>{const d="/"+l.slice(0,f+1).join("/"),p=f===l.length-1,y=c.charAt(0).toUpperCase()+c.slice(1);u.push({label:y,href:p?void 0:d})}),u})();return h.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[h.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:s.map((l,u)=>{const c=u===s.length-1;return h.jsxs("div",{className:"flex items-center",children:[u>0&&h.jsx(Ub,{className:"mx-2 h-4 w-4 text-muted-foreground"}),l.href&&!c?h.jsx(Ga,{to:l.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.label}):h.jsx("span",{className:"text-foreground font-medium",children:l.label})]},u)})}),h.jsx(C5,{})]})}function I5(){return h.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(k5,{})}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(M5,{})}),h.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:h.jsx(iL,{})})]})]})}function kd(e){"@babel/helpers - typeof";return kd=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},kd(e)}function an(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ae(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Te(e){Ae(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||kd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function D5(e,t){Ae(2,arguments);var r=Te(e),n=an(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function R5(e,t){Ae(2,arguments);var r=Te(e),n=an(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function L5(e,t){Ae(2,arguments);var r=Te(e).getTime(),n=an(t);return new Date(r+n)}var F5={};function Mc(){return F5}function Jy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Zy(e){Ae(1,arguments);var t=Te(e);return t.setHours(0,0,0,0),t}function Qf(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function B5(e){return Ae(1,arguments),e instanceof Date||kd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function z5(e){if(Ae(1,arguments),!B5(e)&&typeof e!="number")return!1;var t=Te(e);return!isNaN(Number(t))}function U5(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function W5(e,t){return Ae(2,arguments),Te(e).getTime()-Te(t).getTime()}var H5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},K5="trunc";function q5(e){return H5[K5]}function V5(e){Ae(1,arguments);var t=Te(e);return t.setHours(23,59,59,999),t}function G5(e){Ae(1,arguments);var t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Y5(e){Ae(1,arguments);var t=Te(e);return V5(t).getTime()===G5(t).getTime()}function X5(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=Qf(r,n),a=Math.abs(U5(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=Qf(r,n)===-i;Y5(Te(e))&&a===1&&Qf(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function Q5(e,t,r){Ae(2,arguments);var n=W5(e,t)/1e3;return q5()(n)}function J5(e,t){Ae(2,arguments);var r=an(t);return L5(e,-r)}var Z5=864e5;function eB(e){Ae(1,arguments);var t=Te(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/Z5)+1}function Nd(e){Ae(1,arguments);var t=1,r=Te(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function tB(e){Ae(1,arguments);var t=xk(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Nd(r);return n}var rB=6048e5;function nB(e){Ae(1,arguments);var t=Te(e),r=Nd(t).getTime()-tB(t).getTime();return Math.round(r/rB)+1}function Cd(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Mc(),f=an((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Te(e),p=d.getUTCDay(),y=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,p),y.setUTCHours(0,0,0,0);var m=Cd(y,t),g=new Date(0);g.setUTCFullYear(f,0,p),g.setUTCHours(0,0,0,0);var v=Cd(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=v.getTime()?f:f-1}function iB(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Mc(),f=an((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=wk(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var y=Cd(p,t);return y}var aB=6048e5;function oB(e,t){Ae(1,arguments);var r=Te(e),n=Cd(r,t).getTime()-iB(r,t).getTime();return Math.round(n/aB)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){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:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},bo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sB={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return fi.y(t,r)},Y:function(t,r,n,i){var a=wk(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=xk(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return fi.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=oB(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=nB(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):fi.d(t,r)},D:function(t,r,n){var i=eB(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":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"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=bo.noon:i===0?a=bo.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=bo.evening:i>=12?a=bo.afternoon:i>=4?a=bo.morning:a=bo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return fi.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):fi.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):fi.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):fi.s(t,r)},S:function(t,r){return fi.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return lS(o);case"XXXX":case"XX":return ha(o);case"XXXXX":case"XXX":default:return ha(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return lS(o);case"xxxx":case"xx":return ha(o);case"xxxxx":case"xxx":default:return ha(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+sS(o,":");case"OOOO":default:return"GMT"+ha(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+sS(o,":");case"zzzz":default:return"GMT"+ha(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function sS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function lS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return ha(e,t)}function ha(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var uS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Sk=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},lB=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return uS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",uS(i,r)).replace("{{time}}",Sk(a,r))},uB={p:Sk,P:lB},cB=["D","DD"],fB=["YY","YYYY"];function dB(e){return cB.indexOf(e)!==-1}function hB(e){return fB.indexOf(e)!==-1}function cS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mB=function(t,r,n){var i,a=pB[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Hm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var vB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bB={date:Hm({formats:vB,defaultWidth:"full"}),time:Hm({formats:yB,defaultWidth:"full"}),dateTime:Hm({formats:gB,defaultWidth:"full"})},xB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wB=function(t,r,n,i){return xB[t]};function kl(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var SB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},OB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PB={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"]},jB={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"]},EB={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"}},AB={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"}},_B=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},TB={ordinalNumber:_B,era:kl({values:SB,defaultWidth:"wide"}),quarter:kl({values:OB,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:kl({values:PB,defaultWidth:"wide"}),day:kl({values:jB,defaultWidth:"wide"}),dayPeriod:kl({values:EB,defaultWidth:"wide",formattingValues:AB,defaultFormattingWidth:"wide"})};function Nl(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?NB(s,function(f){return f.test(o)}):kB(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function kB(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function NB(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var $B=/^(\d+)(th|st|nd|rd)?/i,MB=/\d+/i,IB={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},DB={any:[/^b/i,/^(a|c)/i]},RB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},LB={any:[/1/i,/2/i,/3/i,/4/i]},FB={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},BB={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]},zB={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},UB={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]},WB={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},HB={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}},KB={ordinalNumber:CB({matchPattern:$B,parsePattern:MB,valueCallback:function(t){return parseInt(t,10)}}),era:Nl({matchPatterns:IB,defaultMatchWidth:"wide",parsePatterns:DB,defaultParseWidth:"any"}),quarter:Nl({matchPatterns:RB,defaultMatchWidth:"wide",parsePatterns:LB,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Nl({matchPatterns:FB,defaultMatchWidth:"wide",parsePatterns:BB,defaultParseWidth:"any"}),day:Nl({matchPatterns:zB,defaultMatchWidth:"wide",parsePatterns:UB,defaultParseWidth:"any"}),dayPeriod:Nl({matchPatterns:WB,defaultMatchWidth:"any",parsePatterns:HB,defaultParseWidth:"any"})},Ok={code:"en-US",formatDistance:mB,formatLong:bB,formatRelative:wB,localize:TB,match:KB,options:{weekStartsOn:0,firstWeekContainsDate:1}},qB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,GB=/^'([^]*?)'?$/,YB=/''/g,XB=/[a-zA-Z]/;function Hi(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,y,m,g;Ae(2,arguments);var v=String(t),b=Mc(),x=(n=(i=void 0)!==null&&i!==void 0?i:b.locale)!==null&&n!==void 0?n:Ok,S=an((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(u=b.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=an((f=(d=(p=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&p!==void 0?p:b.weekStartsOn)!==null&&d!==void 0?d:(m=b.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Te(e);if(!z5(O))throw new RangeError("Invalid time value");var P=Jy(O),E=J5(O,P),A={firstWeekContainsDate:S,weekStartsOn:w,locale:x,_originalDate:O},_=v.match(VB).map(function(T){var k=T[0];if(k==="p"||k==="P"){var D=uB[k];return D(T,x.formatLong)}return T}).join("").match(qB).map(function(T){if(T==="''")return"'";var k=T[0];if(k==="'")return QB(T);var D=sB[k];if(D)return hB(T)&&cS(T,t,String(e)),dB(T)&&cS(T,t,String(e)),D(E,T,x.localize,A);if(k.match(XB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return T}).join("");return _}function QB(e){var t=e.match(GB);return t?t[1].replace(YB,"'"):e}function Pk(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function JB(e){return Pk({},e)}var fS=1440,ZB=2520,Km=43200,e4=86400;function t4(e,t,r){var n,i;Ae(2,arguments);var a=Mc(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:Ok;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Qf(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=Pk(JB(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=Te(t),c=Te(e)):(u=Te(e),c=Te(t));var f=Q5(c,u),d=(Jy(c)-Jy(u))/1e3,p=Math.round((f-d)/60),y;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p{const n=new Date,i=eg(n,3);return(await Vt(sr.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.expsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}function n4(e,t=30){return wr({queryKey:["dailyTokenUsage",e,t],queryFn:async()=>(await Vt(sr.getDailyTokenUsage,{teamId:e,days:t})).dailyTokenUsage,enabled:!!e,staleTime:5*60*1e3})}const i4=` - query GetModelDistributions($teamId: ID!) { - team(id: $teamId) { - id - modelDistributions { - model - count - } - } - } -`;function a4(e){return wr({queryKey:["model-distributions",e],queryFn:async()=>{var r;return e?((r=(await Vt(i4,{teamId:e})).team)==null?void 0:r.modelDistributions)||[]:[]},enabled:!!e,staleTime:5*60*1e3})}const ge=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ge.displayName="Card";const Mr=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("flex flex-col space-y-1.5 p-6",e),...t}));Mr.displayName="CardHeader";const Ir=j.forwardRef(({className:e,...t},r)=>h.jsx("h3",{ref:r,className:fe("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ir.displayName="CardTitle";const on=j.forwardRef(({className:e,...t},r)=>h.jsx("p",{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));on.displayName="CardDescription";const be=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("p-6 pt-0",e),...t}));be.displayName="CardContent";const o4=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("flex items-center p-6 pt-0",e),...t}));o4.displayName="CardFooter";var s4=Array.isArray,ur=s4,l4=typeof Gc=="object"&&Gc&&Gc.Object===Object&&Gc,jk=l4,u4=jk,c4=typeof self=="object"&&self&&self.Object===Object&&self,f4=u4||c4||Function("return this")(),_n=f4,d4=_n,h4=d4.Symbol,Ic=h4,dS=Ic,Ek=Object.prototype,p4=Ek.hasOwnProperty,m4=Ek.toString,Cl=dS?dS.toStringTag:void 0;function v4(e){var t=p4.call(e,Cl),r=e[Cl];try{e[Cl]=void 0;var n=!0}catch{}var i=m4.call(e);return n&&(t?e[Cl]=r:delete e[Cl]),i}var y4=v4,g4=Object.prototype,b4=g4.toString;function x4(e){return b4.call(e)}var w4=x4,hS=Ic,S4=y4,O4=w4,P4="[object Null]",j4="[object Undefined]",pS=hS?hS.toStringTag:void 0;function E4(e){return e==null?e===void 0?j4:P4:pS&&pS in Object(e)?S4(e):O4(e)}var ii=E4;function A4(e){return e!=null&&typeof e=="object"}var ai=A4,_4=ii,T4=ai,k4="[object Symbol]";function N4(e){return typeof e=="symbol"||T4(e)&&_4(e)==k4}var ol=N4,C4=ur,$4=ol,M4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I4=/^\w*$/;function D4(e,t){if(C4(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$4(e)?!0:I4.test(e)||!M4.test(e)||t!=null&&e in Object(t)}var Gb=D4;function R4(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ea=R4;const sl=Ee(ea);var L4=ii,F4=ea,B4="[object AsyncFunction]",z4="[object Function]",U4="[object GeneratorFunction]",W4="[object Proxy]";function H4(e){if(!F4(e))return!1;var t=L4(e);return t==z4||t==U4||t==B4||t==W4}var Yb=H4;const oe=Ee(Yb);var K4=_n,q4=K4["__core-js_shared__"],V4=q4,qm=V4,mS=function(){var e=/[^.]+$/.exec(qm&&qm.keys&&qm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function G4(e){return!!mS&&mS in e}var Y4=G4,X4=Function.prototype,Q4=X4.toString;function J4(e){if(e!=null){try{return Q4.call(e)}catch{}try{return e+""}catch{}}return""}var Ak=J4,Z4=Yb,ez=Y4,tz=ea,rz=Ak,nz=/[\\^$.*+?()[\]{}|]/g,iz=/^\[object .+?Constructor\]$/,az=Function.prototype,oz=Object.prototype,sz=az.toString,lz=oz.hasOwnProperty,uz=RegExp("^"+sz.call(lz).replace(nz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cz(e){if(!tz(e)||ez(e))return!1;var t=Z4(e)?uz:iz;return t.test(rz(e))}var fz=cz;function dz(e,t){return e==null?void 0:e[t]}var hz=dz,pz=fz,mz=hz;function vz(e,t){var r=mz(e,t);return pz(r)?r:void 0}var lo=vz,yz=lo,gz=yz(Object,"create"),up=gz,vS=up;function bz(){this.__data__=vS?vS(null):{},this.size=0}var xz=bz;function wz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Sz=wz,Oz=up,Pz="__lodash_hash_undefined__",jz=Object.prototype,Ez=jz.hasOwnProperty;function Az(e){var t=this.__data__;if(Oz){var r=t[e];return r===Pz?void 0:r}return Ez.call(t,e)?t[e]:void 0}var _z=Az,Tz=up,kz=Object.prototype,Nz=kz.hasOwnProperty;function Cz(e){var t=this.__data__;return Tz?t[e]!==void 0:Nz.call(t,e)}var $z=Cz,Mz=up,Iz="__lodash_hash_undefined__";function Dz(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Mz&&t===void 0?Iz:t,this}var Rz=Dz,Lz=xz,Fz=Sz,Bz=_z,zz=$z,Uz=Rz;function ll(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var aU=iU,oU=cp;function sU(e,t){var r=this.__data__,n=oU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var lU=sU,uU=Kz,cU=Zz,fU=rU,dU=aU,hU=lU;function ul(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Oa=function(t){return Xa(t)&&t.indexOf("%")===t.length-1},q=function(t){return $8(t)&&!Dc(t)},R8=function(t){return ae(t)},pt=function(t){return q(t)||Xa(t)},L8=0,uo=function(t){var r=++L8;return"".concat(t||"").concat(r)},Wt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!Xa(t))return n;var a;if(Oa(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Dc(a)&&(a=n),i&&a>r&&(a=r),a},xi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},F8=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function V8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rg(e){"@babel/helpers - typeof";return rg=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},rg(e)}var OS={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"},Hn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},PS=null,Gm=null,ax=function e(t){if(t===PS&&Array.isArray(Gm))return Gm;var r=[];return j.Children.forEach(t,function(n){ae(n)||(_8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Gm=r,PS=t,r};function qt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Hn(i)}):n=[Hn(t)],ax(e).forEach(function(i){var a=yr(i,"type.displayName")||yr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function hr(e,t){var r=qt(e,t);return r&&r[0]}var jS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},G8=["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"],Y8=function(t){return t&&t.type&&Xa(t.type)&&G8.indexOf(t.type)>=0},X8=function(t){return t&&rg(t)==="object"&&"clipDot"in t},Q8=function(t,r,n,i){var a,o=(a=Vm==null?void 0:Vm[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||W8.includes(r))||n&&ix.includes(r)},te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!sl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Q8((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},ng=function e(t,r){if(t===r)return!0;var n=j.Children.count(t);if(n!==j.Children.count(r))return!1;if(n===0)return!0;if(n===1)return ES(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ag(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=t6(e,e6),c=i||{width:r,height:n,x:0,y:0},f=ue("recharts-surface",a);return N.createElement("svg",ig({},te(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),N.createElement("title",null,s),N.createElement("desc",null,l),t)}var n6=["children","className"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var he=N.forwardRef(function(e,t){var r=e.children,n=e.className,i=i6(e,n6),a=ue("recharts-layer",n);return N.createElement("g",og({className:a},te(i,!0),{ref:t}),r)}),rn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:l6(e,t,r)}var c6=u6,f6="\\ud800-\\udfff",d6="\\u0300-\\u036f",h6="\\ufe20-\\ufe2f",p6="\\u20d0-\\u20ff",m6=d6+h6+p6,v6="\\ufe0e\\ufe0f",y6="\\u200d",g6=RegExp("["+y6+f6+m6+v6+"]");function b6(e){return g6.test(e)}var Rk=b6;function x6(e){return e.split("")}var w6=x6,Lk="\\ud800-\\udfff",S6="\\u0300-\\u036f",O6="\\ufe20-\\ufe2f",P6="\\u20d0-\\u20ff",j6=S6+O6+P6,E6="\\ufe0e\\ufe0f",A6="["+Lk+"]",sg="["+j6+"]",lg="\\ud83c[\\udffb-\\udfff]",_6="(?:"+sg+"|"+lg+")",Fk="[^"+Lk+"]",Bk="(?:\\ud83c[\\udde6-\\uddff]){2}",zk="[\\ud800-\\udbff][\\udc00-\\udfff]",T6="\\u200d",Uk=_6+"?",Wk="["+E6+"]?",k6="(?:"+T6+"(?:"+[Fk,Bk,zk].join("|")+")"+Wk+Uk+")*",N6=Wk+Uk+k6,C6="(?:"+[Fk+sg+"?",sg,Bk,zk,A6].join("|")+")",$6=RegExp(lg+"(?="+lg+")|"+C6+N6,"g");function M6(e){return e.match($6)||[]}var I6=M6,D6=w6,R6=Rk,L6=I6;function F6(e){return R6(e)?L6(e):D6(e)}var B6=F6,z6=c6,U6=Rk,W6=B6,H6=Nk;function K6(e){return function(t){t=H6(t);var r=U6(t)?W6(t):void 0,n=r?r[0]:t.charAt(0),i=r?z6(r,1).join(""):t.slice(1);return n[e]()+i}}var q6=K6,V6=q6,G6=V6("toUpperCase"),Y6=G6;const Pp=Ee(Y6);function Ie(e){return function(){return e}}const Hk=Math.cos,Id=Math.sin,un=Math.sqrt,Dd=Math.PI,jp=2*Dd,ug=Math.PI,cg=2*ug,pa=1e-6,X6=cg-pa;function Kk(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Kk;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;ipa)if(!(Math.abs(f*l-u*c)>pa)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,y=i-s,m=l*l+u*u,g=p*p+y*y,v=Math.sqrt(m),b=Math.sqrt(d),x=a*Math.tan((ug-Math.acos((m+d-g)/(2*v*b)))/2),S=x/b,w=x/v;Math.abs(S-1)>pa&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>c*y)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>pa||Math.abs(this._y1-c)>pa)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%cg+cg),d>X6?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>pa&&this._append`A${n},${n},0,${+(d>=ug)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ox(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new J6(t)}function sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qk(e){this._context=e}qk.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 Ep(e){return new qk(e)}function Vk(e){return e[0]}function Gk(e){return e[1]}function Yk(e,t){var r=Ie(!0),n=null,i=Ep,a=null,o=ox(s);e=typeof e=="function"?e:e===void 0?Vk:Ie(e),t=typeof t=="function"?t:t===void 0?Gk:Ie(t);function s(l){var u,c=(l=sx(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=c;++u)!(u=p;--y)s.point(x[y],S[y]);s.lineEnd(),s.areaEnd()}v&&(x[d]=+e(g,d,f),S[d]=+t(g,d,f),s.point(n?+n(g,d,f):x[d],r?+r(g,d,f):S[d]))}if(b)return s=null,b+""||null}function c(){return Yk().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class Xk{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Z6(e){return new Xk(e,!0)}function eW(e){return new Xk(e,!1)}const lx={draw(e,t){const r=un(t/Dd);e.moveTo(r,0),e.arc(0,0,r,0,jp)}},tW={draw(e,t){const r=un(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Qk=un(1/3),rW=Qk*2,nW={draw(e,t){const r=un(t/rW),n=r*Qk;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},iW={draw(e,t){const r=un(t),n=-r/2;e.rect(n,n,r,r)}},aW=.8908130915292852,Jk=Id(Dd/10)/Id(7*Dd/10),oW=Id(jp/10)*Jk,sW=-Hk(jp/10)*Jk,lW={draw(e,t){const r=un(t*aW),n=oW*r,i=sW*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=jp*a/5,s=Hk(o),l=Id(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Ym=un(3),uW={draw(e,t){const r=-un(t/(Ym*3));e.moveTo(0,r*2),e.lineTo(-Ym*r,-r),e.lineTo(Ym*r,-r),e.closePath()}},Sr=-.5,Or=un(3)/2,fg=1/un(12),cW=(fg/2+1)*3,fW={draw(e,t){const r=un(t/cW),n=r/2,i=r*fg,a=n,o=r*fg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Sr*n-Or*i,Or*n+Sr*i),e.lineTo(Sr*a-Or*o,Or*a+Sr*o),e.lineTo(Sr*s-Or*l,Or*s+Sr*l),e.lineTo(Sr*n+Or*i,Sr*i-Or*n),e.lineTo(Sr*a+Or*o,Sr*o-Or*a),e.lineTo(Sr*s+Or*l,Sr*l-Or*s),e.closePath()}};function dW(e,t){let r=null,n=ox(i);e=typeof e=="function"?e:Ie(e||lx),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Rd(){}function Ld(e,t,r){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+r)/6)}function Zk(e){this._context=e}Zk.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:Ld(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:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hW(e){return new Zk(e)}function eN(e){this._context=e}eN.prototype={areaStart:Rd,areaEnd:Rd,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:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pW(e){return new eN(e)}function tN(e){this._context=e}tN.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mW(e){return new tN(e)}function rN(e){this._context=e}rN.prototype={areaStart:Rd,areaEnd:Rd,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 vW(e){return new rN(e)}function _S(e){return e<0?-1:1}function TS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(_S(a)+_S(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function kS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Xm(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Fd(e){this._context=e}Fd.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:Xm(this,this._t0,kS(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 r=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,Xm(this,kS(this,r=TS(this,e,t)),r);break;default:Xm(this,this._t0,r=TS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function nN(e){this._context=new iN(e)}(nN.prototype=Object.create(Fd.prototype)).point=function(e,t){Fd.prototype.point.call(this,t,e)};function iN(e){this._context=e}iN.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function yW(e){return new Fd(e)}function gW(e){return new nN(e)}function aN(e){this._context=e}aN.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=NS(e),i=NS(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function xW(e){return new Ap(e,.5)}function wW(e){return new Ap(e,0)}function SW(e){return new Ap(e,1)}function Ss(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function OW(e,t){return e[t]}function PW(e){const t=[];return t.key=e,t}function jW(){var e=Ie([]),t=dg,r=Ss,n=OW;function i(a){var o=Array.from(e.apply(this,arguments),PW),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var oN={symbolCircle:lx,symbolCross:tW,symbolDiamond:nW,symbolSquare:iW,symbolStar:lW,symbolTriangle:uW,symbolWye:fW},IW=Math.PI/180,DW=function(t){var r="symbol".concat(Pp(t));return oN[r]||lx},RW=function(t,r,n){if(r==="area")return t;switch(n){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*IW;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}},LW=function(t,r){oN["symbol".concat(Pp(t))]=r},_p=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=$W(t,TW),u=$S($S({},l),{},{type:n,size:a,sizeType:s}),c=function(){var g=DW(n),v=dW().type(g).size(RW(a,s,n));return v()},f=u.className,d=u.cx,p=u.cy,y=te(u,!0);return d===+d&&p===+p&&a===+a?N.createElement("path",hg({},y,{className:ue("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:c()})):null};_p.registerSymbol=LW;function Os(e){"@babel/helpers - typeof";return Os=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},Os(e)}function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?u:p.color;return N.createElement("li",pg({className:g,style:f,key:"legend-item-".concat(y)},Yi(n.props,p,y)),N.createElement(ag,{width:o,height:o,viewBox:c,style:d},n.renderIcon(p)),N.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(v,p,y):v))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return N.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(j.PureComponent);Iu(ux,"displayName","Legend");Iu(ux,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var GW=fp;function YW(){this.__data__=new GW,this.size=0}var XW=YW;function QW(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var JW=QW;function ZW(e){return this.__data__.get(e)}var e7=ZW;function t7(e){return this.__data__.has(e)}var r7=t7,n7=fp,i7=Qb,a7=Jb,o7=200;function s7(e,t){var r=this.__data__;if(r instanceof n7){var n=r.__data__;if(!i7||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&T7?new j7:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=$H}var hx=MH,IH=ii,DH=hx,RH=ai,LH="[object Arguments]",FH="[object Array]",BH="[object Boolean]",zH="[object Date]",UH="[object Error]",WH="[object Function]",HH="[object Map]",KH="[object Number]",qH="[object Object]",VH="[object RegExp]",GH="[object Set]",YH="[object String]",XH="[object WeakMap]",QH="[object ArrayBuffer]",JH="[object DataView]",ZH="[object Float32Array]",e9="[object Float64Array]",t9="[object Int8Array]",r9="[object Int16Array]",n9="[object Int32Array]",i9="[object Uint8Array]",a9="[object Uint8ClampedArray]",o9="[object Uint16Array]",s9="[object Uint32Array]",Fe={};Fe[ZH]=Fe[e9]=Fe[t9]=Fe[r9]=Fe[n9]=Fe[i9]=Fe[a9]=Fe[o9]=Fe[s9]=!0;Fe[LH]=Fe[FH]=Fe[QH]=Fe[BH]=Fe[JH]=Fe[zH]=Fe[UH]=Fe[WH]=Fe[HH]=Fe[KH]=Fe[qH]=Fe[VH]=Fe[GH]=Fe[YH]=Fe[XH]=!1;function l9(e){return RH(e)&&DH(e.length)&&!!Fe[IH(e)]}var u9=l9;function c9(e){return function(t){return e(t)}}var yN=c9,Wd={exports:{}};Wd.exports;(function(e,t){var r=jk,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Wd,Wd.exports);var f9=Wd.exports,d9=u9,h9=yN,BS=f9,zS=BS&&BS.isTypedArray,p9=zS?h9(zS):d9,gN=p9,m9=gH,v9=fx,y9=ur,g9=vN,b9=dx,x9=gN,w9=Object.prototype,S9=w9.hasOwnProperty;function O9(e,t){var r=y9(e),n=!r&&v9(e),i=!r&&!n&&g9(e),a=!r&&!n&&!i&&x9(e),o=r||n||i||a,s=o?m9(e.length,String):[],l=s.length;for(var u in e)(t||S9.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||b9(u,l)))&&s.push(u);return s}var P9=O9,j9=Object.prototype;function E9(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||j9;return e===r}var A9=E9;function _9(e,t){return function(r){return e(t(r))}}var bN=_9,T9=bN,k9=T9(Object.keys,Object),N9=k9,C9=A9,$9=N9,M9=Object.prototype,I9=M9.hasOwnProperty;function D9(e){if(!C9(e))return $9(e);var t=[];for(var r in Object(e))I9.call(e,r)&&r!="constructor"&&t.push(r);return t}var R9=D9,L9=Yb,F9=hx;function B9(e){return e!=null&&F9(e.length)&&!L9(e)}var Rc=B9,z9=P9,U9=R9,W9=Rc;function H9(e){return W9(e)?z9(e):U9(e)}var Tp=H9,K9=oH,q9=vH,V9=Tp;function G9(e){return K9(e,V9,q9)}var Y9=G9,US=Y9,X9=1,Q9=Object.prototype,J9=Q9.hasOwnProperty;function Z9(e,t,r,n,i,a){var o=r&X9,s=US(e),l=s.length,u=US(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:J9.call(t,d)))return!1}var p=a.get(e),y=a.get(t);if(p&&y)return p==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++f-1}var Qq=Xq;function Jq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=hV){var u=t?null:fV(e);if(u)return dV(u);o=!1,i=cV,l=new sV}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kV(e){return e.value}function NV(e,t){if(N.isValidElement(e))return N.cloneElement(e,t);if(typeof e=="function")return N.createElement(e,t);t.ref;var r=_V(t,xV);return N.createElement(ux,r)}var iO=1,Dr=function(e){function t(){var r;wV(this,t);for(var n=arguments.length,i=new Array(n),a=0;aiO||Math.abs(i.height-this.lastBoundingBox.height)>iO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Nn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();d={top:((c||0)-y.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Nn(Nn({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=Nn(Nn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return N.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},NV(a,Nn(Nn({},this.props),{},{payload:EN(c,u,kV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Nn(Nn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(j.PureComponent);kp(Dr,"displayName","Legend");kp(Dr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var aO=Ic,CV=fx,$V=ur,oO=aO?aO.isConcatSpreadable:void 0;function MV(e){return $V(e)||CV(e)||!!(oO&&e&&e[oO])}var IV=MV,DV=pN,RV=IV;function TN(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=RV),i||(i=[]);++a0&&r(s)?t>1?TN(s,t-1,r,n,i):DV(i,s):n||(i[i.length]=s)}return i}var kN=TN;function LV(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var FV=LV,BV=FV,zV=BV(),UV=zV,WV=UV,HV=Tp;function KV(e,t){return e&&WV(e,t,HV)}var NN=KV,qV=Rc;function VV(e,t){return function(r,n){if(r==null)return r;if(!qV(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var sG=oG,ev=ex,lG=tx,uG=Tn,cG=CN,fG=rG,dG=yN,hG=sG,pG=hl,mG=ur;function vG(e,t,r){t.length?t=ev(t,function(a){return mG(a)?function(o){return lG(o,a.length===1?a[0]:a)}:a}):t=[pG];var n=-1;t=ev(t,dG(uG));var i=cG(e,function(a,o,s){var l=ev(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return fG(i,function(a,o){return hG(a,o,r)})}var yG=vG;function gG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var bG=gG,xG=bG,lO=Math.max;function wG(e,t,r){return t=lO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=lO(n.length-t,0),o=Array(a);++i0){if(++t>=NG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var IG=MG,DG=kG,RG=IG,LG=RG(DG),FG=LG,BG=hl,zG=SG,UG=FG;function WG(e,t){return UG(zG(e,t,BG),e+"")}var HG=WG,KG=Xb,qG=Rc,VG=dx,GG=ea;function YG(e,t,r){if(!GG(r))return!1;var n=typeof t;return(n=="number"?qG(r)&&VG(t,r.length):n=="string"&&t in r)?KG(r[t],e):!1}var Np=YG,XG=kN,QG=yG,JG=HG,cO=Np,ZG=JG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&cO(e,t[0],t[1])?t=[]:r>2&&cO(t[0],t[1],t[2])&&(t=[t[0]]),QG(e,XG(t,1),[])}),eY=ZG;const vx=Ee(eY);function Du(e){"@babel/helpers - typeof";return Du=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},Du(e)}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat($l,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat($l,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(c,l[n]):Math.max(f,l[n])}function mY(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function vY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=hO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=hO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=mY({translateX:c,translateY:f,useTranslate3d:s})):u=hY,{cssProperties:u,cssClasses:pY({translateX:c,translateY:f,coordinate:r})}}function js(e){"@babel/helpers - typeof";return js=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},js(e)}function pO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mO(e){for(var t=1;tvO||Math.abs(n.height-this.state.lastBoundingBox.height)>vO)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.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 n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,p=i.offset,y=i.position,m=i.reverseDirection,g=i.useTranslate3d,v=i.viewBox,b=i.wrapperStyle,x=vY({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:y,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:v}),S=x.cssClasses,w=x.cssProperties,O=mO(mO({transition:d&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return N.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(j.PureComponent),EY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ta={isSsr:EY()};function Es(e){"@babel/helpers - typeof";return Es=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},Es(e)}function yO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gO(e){for(var t=1;t0;return N.createElement(jY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:c,hasPayload:O,offset:p,position:g,reverseDirection:v,useTranslate3d:b,viewBox:x,wrapperStyle:S},DY(u,gO(gO({},this.props),{},{payload:w})))}}])}(j.PureComponent);yx(jt,"displayName","Tooltip");yx(jt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ta.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 RY=_n,LY=function(){return RY.Date.now()},FY=LY,BY=/\s/;function zY(e){for(var t=e.length;t--&&BY.test(e.charAt(t)););return t}var UY=zY,WY=UY,HY=/^\s+/;function KY(e){return e&&e.slice(0,WY(e)+1).replace(HY,"")}var qY=KY,VY=qY,bO=ea,GY=ol,xO=NaN,YY=/^[-+]0x[0-9a-f]+$/i,XY=/^0b[01]+$/i,QY=/^0o[0-7]+$/i,JY=parseInt;function ZY(e){if(typeof e=="number")return e;if(GY(e))return xO;if(bO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=VY(e);var r=XY.test(e);return r||QY.test(e)?JY(e.slice(2),r?2:8):YY.test(e)?xO:+e}var LN=ZY,eX=ea,rv=FY,wO=LN,tX="Expected a function",rX=Math.max,nX=Math.min;function iX(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(tX);t=wO(t)||0,eX(r)&&(c=!!r.leading,f="maxWait"in r,a=f?rX(wO(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(O){var P=n,E=i;return n=i=void 0,u=O,o=e.apply(E,P),o}function y(O){return u=O,s=setTimeout(v,t),c?p(O):o}function m(O){var P=O-l,E=O-u,A=t-P;return f?nX(A,a-E):A}function g(O){var P=O-l,E=O-u;return l===void 0||P>=t||P<0||f&&E>=a}function v(){var O=rv();if(g(O))return b(O);s=setTimeout(v,m(O))}function b(O){return s=void 0,d&&n?p(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(rv())}function w(){var O=rv(),P=g(O);if(n=arguments,i=this,l=O,P){if(s===void 0)return y(l);if(f)return clearTimeout(s),s=setTimeout(v,t),p(l)}return s===void 0&&(s=setTimeout(v,t)),o}return w.cancel=x,w.flush=S,w}var aX=iX,oX=aX,sX=ea,lX="Expected a function";function uX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(lX);return sX(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),oX(e,t,{leading:n,maxWait:t,trailing:i})}var cX=uX;const FN=Ee(cX);function Lu(e){"@babel/helpers - typeof";return Lu=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},Lu(e)}function SO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(D=FN(D,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(D),I=w.current.getBoundingClientRect(),L=I.width,z=I.height;return T(L,z),M.observe(w.current),function(){M.disconnect()}},[T,m]);var k=j.useMemo(function(){var D=A.containerWidth,M=A.containerHeight;if(D<0||M<0)return null;rn(Oa(o)||Oa(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),rn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Oa(o)?D:o,L=Oa(l)?M:l;r&&r>0&&(I?L=I/r:L&&(I=L*r),d&&L>d&&(L=d)),rn(I>0||L>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.`,I,L,o,l,c,f,r);var z=!Array.isArray(p)&&Hn(p.type).endsWith("Chart");return N.Children.map(p,function(C){return N.isValidElement(C)?j.cloneElement(C,xf({width:I,height:L},z?{style:xf({height:"100%",width:"100%",maxHeight:L,maxWidth:I},C.props.style)}:{})):C})},[r,p,l,d,f,c,A,o]);return N.createElement("div",{id:g?"".concat(g):void 0,className:ue("recharts-responsive-container",v),style:xf(xf({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:w},k)}),co=function(t){return null};co.displayName="Cell";function Fu(e){"@babel/helpers - typeof";return Fu=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},Fu(e)}function PO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ta.isSsr)return{width:0,height:0};var n=PX(r),i=JSON.stringify({text:t,copyStyle:n});if(xo.widthCache[i])return xo.widthCache[i];try{var a=document.getElementById(jO);a||(a=document.createElement("span"),a.setAttribute("id",jO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Eg(Eg({},OX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return xo.widthCache[i]=l,++xo.cacheCount>SX&&(xo.cacheCount=0,xo.widthCache={}),l}catch{return{width:0,height:0}}},jX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Bu(e){"@babel/helpers - typeof";return Bu=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},Bu(e)}function Vd(e,t){return TX(e)||_X(e,t)||AX(e,t)||EX()}function EX(){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 AX(e,t){if(e){if(typeof e=="string")return EO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EO(e,t)}}function EO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function CO(e,t){return VX(e)||qX(e,t)||KX(e,t)||HX()}function HX(){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 KX(e,t){if(e){if(typeof e=="string")return $O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $O(e,t)}}function $O(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(L,z){var C=z.word,F=z.width,W=L[L.length-1];if(W&&(i==null||a||W.width+F+nz.width?L:z})};if(!c)return p;for(var m="…",g=function(I){var L=f.slice(0,I),z=WN({breakAll:u,style:l,children:L+m}).wordsWithComputedWidth,C=d(z),F=C.length>o||y(C).width>Number(i);return[F,C]},v=0,b=f.length-1,x=0,S;v<=b&&x<=f.length-1;){var w=Math.floor((v+b)/2),O=w-1,P=g(O),E=CO(P,2),A=E[0],_=E[1],T=g(w),k=CO(T,1),D=k[0];if(!A&&!D&&(v=w+1),A&&D&&(b=w-1),!A&&D){S=_;break}x++}return S||p},MO=function(t){var r=ae(t)?[]:t.toString().split(UN);return[{words:r}]},YX=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ta.isSsr){var l,u,c=WN({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return MO(i);return GX({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return MO(i)},IO="#808080",Qa=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,p=d===void 0?"start":d,y=t.verticalAnchor,m=y===void 0?"end":y,g=t.fill,v=g===void 0?IO:g,b=NO(t,zX),x=j.useMemo(function(){return YX({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,P=b.className,E=b.breakAll,A=NO(b,UX);if(!pt(n)||!pt(a))return null;var _=n+(q(S)?S:0),T=a+(q(w)?w:0),k;switch(m){case"start":k=nv("calc(".concat(u,")"));break;case"middle":k=nv("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:k=nv("calc(".concat(x.length-1," * -").concat(s,")"));break}var D=[];if(f){var M=x[0].width,I=b.width;D.push("scale(".concat((q(I)?I/M:1)/M,")"))}return O&&D.push("rotate(".concat(O,", ").concat(_,", ").concat(T,")")),D.length&&(A.transform=D.join(" ")),N.createElement("text",Ag({},te(A,!0),{x:_,y:T,className:ue("recharts-text",P),textAnchor:p,fill:v.includes("url")?IO:v}),x.map(function(L,z){var C=L.words.join(E?"":" ");return N.createElement("tspan",{x:_,dy:z===0?k:s,key:"".concat(C,"-").concat(z)},C)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function XX(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function gx(e){let t,r,n;e.length!==2?(t=Ki,r=(s,l)=>Ki(e(s),l),n=(s,l)=>e(s)-l):(t=e===Ki||e===XX?e:QX,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function QX(){return 0}function HN(e){return e===null?NaN:+e}function*JX(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ZX=gx(Ki),Lc=ZX.right;gx(HN).center;class DO extends Map{constructor(t,r=rQ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(RO(this,t))}has(t){return super.has(RO(this,t))}set(t,r){return super.set(eQ(this,t),r)}delete(t){return super.delete(tQ(this,t))}}function RO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function eQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function tQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function rQ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function nQ(e=Ki){if(e===Ki)return KN;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function KN(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const iQ=Math.sqrt(50),aQ=Math.sqrt(10),oQ=Math.sqrt(2);function Gd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=iQ?10:a>=aQ?5:a>=oQ?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function FO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function qN(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?KN:nQ(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+d)),y=Math.min(n,Math.floor(t+(l-u)*f/l+d));qN(e,t,p,y,i)}const a=e[t];let o=r,s=n;for(Ml(e,r,t),i(e[n],a)>0&&Ml(e,r,n);o0;)--s}i(e[r],a)===0?Ml(e,r,s):(++s,Ml(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Ml(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function sQ(e,t,r){if(e=Float64Array.from(JX(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return FO(e);if(t>=1)return LO(e);var n,i=(n-1)*t,a=Math.floor(i),o=LO(qN(e,a).subarray(0,a+1)),s=FO(e.subarray(a+1));return o+(s-o)*(i-a)}}function lQ(e,t,r=HN){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function uQ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Sf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Sf(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=fQ.exec(e))?new tr(t[1],t[2],t[3],1):(t=dQ.exec(e))?new tr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hQ.exec(e))?Sf(t[1],t[2],t[3],t[4]):(t=pQ.exec(e))?Sf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mQ.exec(e))?qO(t[1],t[2]/100,t[3]/100,1):(t=vQ.exec(e))?qO(t[1],t[2]/100,t[3]/100,t[4]):BO.hasOwnProperty(e)?WO(BO[e]):e==="transparent"?new tr(NaN,NaN,NaN,0):null}function WO(e){return new tr(e>>16&255,e>>8&255,e&255,1)}function Sf(e,t,r,n){return n<=0&&(e=t=r=NaN),new tr(e,t,r,n)}function bQ(e){return e instanceof Fc||(e=Hu(e)),e?(e=e.rgb(),new tr(e.r,e.g,e.b,e.opacity)):new tr}function Cg(e,t,r,n){return arguments.length===1?bQ(e):new tr(e,t,r,n??1)}function tr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}xx(tr,Cg,GN(Fc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uu:Math.pow(Uu,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tr(Fa(this.r),Fa(this.g),Fa(this.b),Xd(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:HO,formatHex:HO,formatHex8:xQ,formatRgb:KO,toString:KO}));function HO(){return`#${Pa(this.r)}${Pa(this.g)}${Pa(this.b)}`}function xQ(){return`#${Pa(this.r)}${Pa(this.g)}${Pa(this.b)}${Pa((isNaN(this.opacity)?1:this.opacity)*255)}`}function KO(){const e=Xd(this.opacity);return`${e===1?"rgb(":"rgba("}${Fa(this.r)}, ${Fa(this.g)}, ${Fa(this.b)}${e===1?")":`, ${e})`}`}function Xd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pa(e){return e=Fa(e),(e<16?"0":"")+e.toString(16)}function qO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zr(e,t,r,n)}function YN(e){if(e instanceof Zr)return new Zr(e.h,e.s,e.l,e.opacity);if(e instanceof Fc||(e=Hu(e)),!e)return new Zr;if(e instanceof Zr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Zr(o,s,l,e.opacity)}function wQ(e,t,r,n){return arguments.length===1?YN(e):new Zr(e,t,r,n??1)}function Zr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}xx(Zr,wQ,GN(Fc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new Zr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uu:Math.pow(Uu,e),new Zr(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new tr(iv(e>=240?e-240:e+120,i,n),iv(e,i,n),iv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zr(VO(this.h),Of(this.s),Of(this.l),Xd(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=Xd(this.opacity);return`${e===1?"hsl(":"hsla("}${VO(this.h)}, ${Of(this.s)*100}%, ${Of(this.l)*100}%${e===1?")":`, ${e})`}`}}));function VO(e){return e=(e||0)%360,e<0?e+360:e}function Of(e){return Math.max(0,Math.min(1,e||0))}function iv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const wx=e=>()=>e;function SQ(e,t){return function(r){return e+r*t}}function OQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function PQ(e){return(e=+e)==1?XN:function(t,r){return r-t?OQ(t,r,e):wx(isNaN(t)?r:t)}}function XN(e,t){var r=t-e;return r?SQ(e,r):wx(isNaN(e)?t:e)}const GO=function e(t){var r=PQ(t);function n(i,a){var o=r((i=Cg(i)).r,(a=Cg(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=XN(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function jQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Qd(n,i)})),r=av.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function DQ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?RQ:DQ,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((u||(u=s(t,e.map(n),Qd)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Jd),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=Sx,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Ht,c()):o!==Ht},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,c()}}function Ox(){return Cp()(Ht,Ht)}function LQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zd(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function As(e){return e=Zd(Math.abs(e)),e?e[1]:NaN}function FQ(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function BQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var zQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ku(e){if(!(t=zQ.exec(e)))throw new Error("invalid format: "+e);var t;return new Px({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]})}Ku.prototype=Px.prototype;function Px(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+""}Px.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 UQ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var QN;function WQ(e,t){var r=Zd(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(QN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Zd(e,Math.max(0,t+a-1))[0]}function XO(e,t){var r=Zd(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const QO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LQ,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)=>XO(e*100,t),r:XO,s:WQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function JO(e){return e}var ZO=Array.prototype.map,eP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function HQ(e){var t=e.grouping===void 0||e.thousands===void 0?JO:FQ(ZO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?JO:BQ(ZO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ku(f);var d=f.fill,p=f.align,y=f.sign,m=f.symbol,g=f.zero,v=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):QO[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||d==="0"&&p==="=")&&(g=!0,d="0",p="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=m==="$"?n:/[%p]/.test(w)?o:"",E=QO[w],A=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function _(T){var k=O,D=P,M,I,L;if(w==="c")D=E(T)+D,T="";else{T=+T;var z=T<0||1/T<0;if(T=isNaN(T)?l:E(Math.abs(T),x),S&&(T=UQ(T)),z&&+T==0&&y!=="+"&&(z=!1),k=(z?y==="("?y:s:y==="-"||y==="("?"":y)+k,D=(w==="s"?eP[8+QN/3]:"")+D+(z&&y==="("?")":""),A){for(M=-1,I=T.length;++ML||L>57){D=(L===46?i+T.slice(M+1):T.slice(M))+D,T=T.slice(0,M);break}}}b&&!g&&(T=t(T,1/0));var C=k.length+T.length+D.length,F=C>1)+k+T+D+F.slice(C);break;default:T=F+k+T+D;break}return a(T)}return _.toString=function(){return f+""},_}function c(f,d){var p=u((f=Ku(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(As(d)/3)))*3,m=Math.pow(10,-y),g=eP[8+y/3];return function(v){return p(m*v)+g}}return{format:u,formatPrefix:c}}var Pf,jx,JN;KQ({thousands:",",grouping:[3],currency:["$",""]});function KQ(e){return Pf=HQ(e),jx=Pf.format,JN=Pf.formatPrefix,Pf}function qQ(e){return Math.max(0,-As(Math.abs(e)))}function VQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(As(t)/3)))*3-As(Math.abs(e)))}function GQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,As(t)-As(e))+1}function ZN(e,t,r,n){var i=kg(e,t,r),a;switch(n=Ku(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=VQ(i,o))&&(n.precision=a),JN(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=GQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=qQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return jx(n)}function ra(e){var t=e.domain;return e.ticks=function(r){var n=t();return _g(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return ZN(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=Tg(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function eh(){var e=Ox();return e.copy=function(){return Bc(e,eh())},Ur.apply(e,arguments),ra(e)}function eC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return eC(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],ra(r)}function tC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function ZQ(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 nP(e){return(t,r)=>-e(-t,r)}function Ex(e){const t=e(tP,rP),r=t.domain;let n=10,i,a;function o(){return i=ZQ(n),a=JQ(n),r()[0]<0?(i=nP(i),a=nP(a),e(YQ,XQ)):e(tP,rP),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=p;++d)for(y=1;yc)break;v.push(m)}}else for(;d<=p;++d)for(y=n-1;y>=1;--y)if(m=d>0?y/a(-d):y*a(d),!(mc)break;v.push(m)}v.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ku(l)).precision==null&&(l.trim=!0),l=jx(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(tC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function rC(){const e=Ex(Cp()).domain([1,10]);return e.copy=()=>Bc(e,rC()).base(e.base()),Ur.apply(e,arguments),e}function iP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ax(e){var t=1,r=e(iP(t),aP(t));return r.constant=function(n){return arguments.length?e(iP(t=+n),aP(t)):t},ra(r)}function nC(){var e=Ax(Cp());return e.copy=function(){return Bc(e,nC()).constant(e.constant())},Ur.apply(e,arguments)}function oP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function eJ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function tJ(e){return e<0?-e*e:e*e}function _x(e){var t=e(Ht,Ht),r=1;function n(){return r===1?e(Ht,Ht):r===.5?e(eJ,tJ):e(oP(r),oP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ra(t)}function Tx(){var e=_x(Cp());return e.copy=function(){return Bc(e,Tx()).exponent(e.exponent())},Ur.apply(e,arguments),e}function rJ(){return Tx.apply(null,arguments).exponent(.5)}function sP(e){return Math.sign(e)*e*e}function nJ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iC(){var e=Ox(),t=[0,1],r=!1,n;function i(a){var o=nJ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(sP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(sP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return iC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Ur.apply(i,arguments),ra(i)}function aC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return oC().domain([e,t]).range(i).unknown(a)},Ur.apply(ra(o),arguments)}function sC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Lc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return sC().domain(e).range(t).unknown(r)},Ur.apply(i,arguments)}const ov=new Date,sv=new Date;function mt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(umt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(ov.setTime(+a),sv.setTime(+o),e(ov),e(sv),Math.floor(r(ov,sv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const th=mt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);th.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?mt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):th);th.range;const Bn=1e3,Cr=Bn*60,zn=Cr*60,Xn=zn*24,kx=Xn*7,lP=Xn*30,lv=Xn*365,ja=mt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bn)},(e,t)=>(t-e)/Bn,e=>e.getUTCSeconds());ja.range;const Nx=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bn)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getMinutes());Nx.range;const Cx=mt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCMinutes());Cx.range;const $x=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bn-e.getMinutes()*Cr)},(e,t)=>{e.setTime(+e+t*zn)},(e,t)=>(t-e)/zn,e=>e.getHours());$x.range;const Mx=mt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zn)},(e,t)=>(t-e)/zn,e=>e.getUTCHours());Mx.range;const zc=mt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Cr)/Xn,e=>e.getDate()-1);zc.range;const $p=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>e.getUTCDate()-1);$p.range;const lC=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>Math.floor(e/Xn));lC.range;function fo(e){return mt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Cr)/kx)}const Mp=fo(0),rh=fo(1),iJ=fo(2),aJ=fo(3),_s=fo(4),oJ=fo(5),sJ=fo(6);Mp.range;rh.range;iJ.range;aJ.range;_s.range;oJ.range;sJ.range;function ho(e){return mt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/kx)}const Ip=ho(0),nh=ho(1),lJ=ho(2),uJ=ho(3),Ts=ho(4),cJ=ho(5),fJ=ho(6);Ip.range;nh.range;lJ.range;uJ.range;Ts.range;cJ.range;fJ.range;const Ix=mt(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());Ix.range;const Dx=mt(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());Dx.range;const Qn=mt(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());Qn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Qn.range;const Jn=mt(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());Jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Jn.range;function uC(e,t,r,n,i,a){const o=[[ja,1,Bn],[ja,5,5*Bn],[ja,15,15*Bn],[ja,30,30*Bn],[a,1,Cr],[a,5,5*Cr],[a,15,15*Cr],[a,30,30*Cr],[i,1,zn],[i,3,3*zn],[i,6,6*zn],[i,12,12*zn],[n,1,Xn],[n,2,2*Xn],[r,1,kx],[t,1,lP],[t,3,3*lP],[e,1,lv]];function s(u,c,f){const d=cg).right(o,d);if(p===o.length)return e.every(kg(u/lv,c/lv,f));if(p===0)return th.every(Math.max(kg(u,c,f),1));const[y,m]=o[d/o[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ye=cv(Il(U.y,0,1)),st=ye.getUTCDay(),ye=st>4||st===0?nh.ceil(ye):nh(ye),ye=$p.offset(ye,(U.V-1)*7),U.y=ye.getUTCFullYear(),U.m=ye.getUTCMonth(),U.d=ye.getUTCDate()+(U.w+6)%7):(ye=uv(Il(U.y,0,1)),st=ye.getDay(),ye=st>4||st===0?rh.ceil(ye):rh(ye),ye=zc.offset(ye,(U.V-1)*7),U.y=ye.getFullYear(),U.m=ye.getMonth(),U.d=ye.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),st="Z"in U?cv(Il(U.y,0,1)).getUTCDay():uv(Il(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(st+5)%7:U.w+U.U*7-(st+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,cv(U)):uv(U)}}function E(G,se,le,U){for(var Qe=0,ye=se.length,st=le.length,lt,Xt;Qe=st)return-1;if(lt=se.charCodeAt(Qe++),lt===37){if(lt=se.charAt(Qe++),Xt=w[lt in uP?se.charAt(Qe++):lt],!Xt||(U=Xt(G,le,U))<0)return-1}else if(lt!=le.charCodeAt(U++))return-1}return U}function A(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=p.exec(se.slice(le));return U?(G.w=y.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=f.exec(se.slice(le));return U?(G.w=d.get(U[0].toLowerCase()),le+U[0].length):-1}function k(G,se,le){var U=v.exec(se.slice(le));return U?(G.m=b.get(U[0].toLowerCase()),le+U[0].length):-1}function D(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=g.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){return E(G,t,se,le)}function I(G,se,le){return E(G,r,se,le)}function L(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function C(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function re(G){return a[G.getUTCDay()]}function we(G){return l[G.getUTCMonth()]}function We(G){return s[G.getUTCMonth()]}function Oe(G){return i[+(G.getUTCHours()>=12)]}function St(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=P(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=P(G+="",!0);return se.toString=function(){return G},se}}}var uP={"-":"",_:" ",0:"0"},wt=/^\s*\d+/,yJ=/^%/,gJ=/[\\^$*+?|[\]().{}]/g;function Se(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function xJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function wJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function SJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function OJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function PJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function cP(e,t,r){var n=wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function fP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function jJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function EJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function AJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function dP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function _J(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function TJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function kJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function NJ(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function CJ(e,t,r){var n=wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function $J(e,t,r){var n=yJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function MJ(e,t,r){var n=wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function IJ(e,t,r){var n=wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function pP(e,t){return Se(e.getDate(),t,2)}function DJ(e,t){return Se(e.getHours(),t,2)}function RJ(e,t){return Se(e.getHours()%12||12,t,2)}function LJ(e,t){return Se(1+zc.count(Qn(e),e),t,3)}function cC(e,t){return Se(e.getMilliseconds(),t,3)}function FJ(e,t){return cC(e,t)+"000"}function BJ(e,t){return Se(e.getMonth()+1,t,2)}function zJ(e,t){return Se(e.getMinutes(),t,2)}function UJ(e,t){return Se(e.getSeconds(),t,2)}function WJ(e){var t=e.getDay();return t===0?7:t}function HJ(e,t){return Se(Mp.count(Qn(e)-1,e),t,2)}function fC(e){var t=e.getDay();return t>=4||t===0?_s(e):_s.ceil(e)}function KJ(e,t){return e=fC(e),Se(_s.count(Qn(e),e)+(Qn(e).getDay()===4),t,2)}function qJ(e){return e.getDay()}function VJ(e,t){return Se(rh.count(Qn(e)-1,e),t,2)}function GJ(e,t){return Se(e.getFullYear()%100,t,2)}function YJ(e,t){return e=fC(e),Se(e.getFullYear()%100,t,2)}function XJ(e,t){return Se(e.getFullYear()%1e4,t,4)}function QJ(e,t){var r=e.getDay();return e=r>=4||r===0?_s(e):_s.ceil(e),Se(e.getFullYear()%1e4,t,4)}function JJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Se(t/60|0,"0",2)+Se(t%60,"0",2)}function mP(e,t){return Se(e.getUTCDate(),t,2)}function ZJ(e,t){return Se(e.getUTCHours(),t,2)}function eZ(e,t){return Se(e.getUTCHours()%12||12,t,2)}function tZ(e,t){return Se(1+$p.count(Jn(e),e),t,3)}function dC(e,t){return Se(e.getUTCMilliseconds(),t,3)}function rZ(e,t){return dC(e,t)+"000"}function nZ(e,t){return Se(e.getUTCMonth()+1,t,2)}function iZ(e,t){return Se(e.getUTCMinutes(),t,2)}function aZ(e,t){return Se(e.getUTCSeconds(),t,2)}function oZ(e){var t=e.getUTCDay();return t===0?7:t}function sZ(e,t){return Se(Ip.count(Jn(e)-1,e),t,2)}function hC(e){var t=e.getUTCDay();return t>=4||t===0?Ts(e):Ts.ceil(e)}function lZ(e,t){return e=hC(e),Se(Ts.count(Jn(e),e)+(Jn(e).getUTCDay()===4),t,2)}function uZ(e){return e.getUTCDay()}function cZ(e,t){return Se(nh.count(Jn(e)-1,e),t,2)}function fZ(e,t){return Se(e.getUTCFullYear()%100,t,2)}function dZ(e,t){return e=hC(e),Se(e.getUTCFullYear()%100,t,2)}function hZ(e,t){return Se(e.getUTCFullYear()%1e4,t,4)}function pZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ts(e):Ts.ceil(e),Se(e.getUTCFullYear()%1e4,t,4)}function mZ(){return"+0000"}function vP(){return"%"}function yP(e){return+e}function gP(e){return Math.floor(+e/1e3)}var wo,pC,mC;vZ({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 vZ(e){return wo=vJ(e),pC=wo.format,wo.parse,mC=wo.utcFormat,wo.utcParse,wo}function yZ(e){return new Date(e)}function gZ(e){return e instanceof Date?+e:+new Date(+e)}function Rx(e,t,r,n,i,a,o,s,l,u){var c=Ox(),f=c.invert,d=c.domain,p=u(".%L"),y=u(":%S"),m=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>sQ(e,a/n))},r.copy=function(){return bC(t).domain(e)},oi.apply(r,arguments)}function Rp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Ht,c,f=!1,d;function p(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-a)*(n*mt}var OC=jZ,EZ=Lp,AZ=OC,_Z=hl;function TZ(e){return e&&e.length?EZ(e,_Z,AZ):void 0}var kZ=TZ;const Fp=Ee(kZ);function NZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Be;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Kn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return $e(Kn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ot(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(pr))throw Error(Br+"NaN");if(r.s<1)throw Error(Br+(r.s?"NaN":"-Infinity"));return r.eq(pr)?new n(0):(Ke=!1,t=Kn(qu(r,a),qu(e,a),a),Ke=!0,$e(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_C(t,e):EC(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Br+"NaN");return r.s?(Ke=!1,t=Kn(r,e,0,1).times(e),Ke=!0,r.minus(t)):$e(new n(r),i)};J.naturalExponential=J.exp=function(){return AC(this)};J.naturalLogarithm=J.ln=function(){return qu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EC(t,e):_C(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ba+e);if(t=ot(i)+1,n=i.d.length-1,r=n*Be+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Br+"NaN")}for(e=ot(s),Ke=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=xn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=yl((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),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Kn(s,a,o+2)).times(.5),xn(a.d).slice(0,o)===(t=xn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ke=!0,$e(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,d=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=p.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*d[i-n-1]+t,a[i--]=s%yt|0,t=s/yt|0;a[i]=(a[i]+t)%yt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ke?$e(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(An(e,0,vl),t===void 0?t=n.rounding:An(t,0,8),$e(r,e+ot(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ja(n,!0):(An(e,0,vl),t===void 0?t=i.rounding:An(t,0,8),n=$e(new i(n),e+1,t),r=Ja(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ja(i):(An(e,0,vl),t===void 0?t=a.rounding:An(t,0,8),n=$e(new a(i),e+ot(i)+1,t),r=Ja(n.abs(),!1,e+ot(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ot(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(pr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Br+"Infinity");return s}if(s.eq(pr))return s;if(n=l.precision,e.eq(pr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=jC){for(i=new l(pr),t=Math.ceil(n/Be+4),Ke=!1;r%2&&(i=i.times(s),wP(i.d,t)),r=yl(r/2),r!==0;)s=s.times(s),wP(s.d,t);return Ke=!0,e.s<0?new l(pr).div(i):$e(i,n)}}else if(a<0)throw Error(Br+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ke=!1,i=e.times(qu(s,n+u)),Ke=!0,i=AC(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ot(i),n=Ja(i,r<=a.toExpNeg||r>=a.toExpPos)):(An(e,1,vl),t===void 0?t=a.rounding:An(t,0,8),i=$e(new a(i),e,t),r=ot(i),n=Ja(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(An(e,1,vl),t===void 0?t=n.rounding:An(t,0,8)),$e(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ot(e),r=e.constructor;return Ja(e,t<=r.toExpNeg||t>=r.toExpPos)};function EC(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Ke?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/Be),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/yt|0,l[a]%=yt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ke?$e(t,f):t}function An(e,t,r){if(e!==~~e||er)throw Error(Ba+e)}function xn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,d,p,y,m,g,v,b,x,S,w,O,P,E,A=n.constructor,_=n.s==i.s?1:-1,T=n.d,k=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(Br+"Division by zero");for(l=n.e-i.e,P=k.length,w=T.length,p=new A(_),y=p.d=[],u=0;k[u]==(T[u]||0);)++u;if(k[u]>(T[u]||0)&&--l,a==null?b=a=A.precision:o?b=a+(ot(n)-ot(i))+1:b=a,b<0)return new A(0);if(b=b/Be+2|0,u=0,P==1)for(c=0,k=k[0],b++;(u1&&(k=e(k,c),T=e(T,c),P=k.length,w=T.length),S=P,m=T.slice(0,P),g=m.length;g=yt/2&&++O;do c=0,s=t(k,m,P,g),s<0?(v=m[0],P!=g&&(v=v*yt+(m[1]||0)),c=v/O|0,c>1?(c>=yt&&(c=yt-1),f=e(k,c),d=f.length,g=m.length,s=t(f,m,d,g),s==1&&(c--,r(f,P16)throw Error(Bx+ot(e));if(!e.s)return new c(pr);for(Ke=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(va(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(pr),c.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(Kn(i,r,s)),xn(o.d).slice(0,s)===xn(a.d).slice(0,s)){for(;u--;)a=$e(a.times(a),s);return c.precision=f,t==null?(Ke=!0,$e(a,f)):a}a=o}}function ot(e){for(var t=e.e*Be,r=e.d[0];r>=10;r/=10)t++;return t}function fv(e,t,r){if(t>e.LN10.sd())throw Ke=!0,r&&(e.precision=r),Error(Br+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function yi(e){for(var t="";e--;)t+="0";return t}function qu(e,t){var r,n,i,a,o,s,l,u,c,f=1,d=10,p=e,y=p.d,m=p.constructor,g=m.precision;if(p.s<1)throw Error(Br+(p.s?"NaN":"-Infinity"));if(p.eq(pr))return new m(0);if(t==null?(Ke=!1,u=g):u=t,p.eq(10))return t==null&&(Ke=!0),fv(m,u);if(u+=d,m.precision=u,r=xn(y),n=r.charAt(0),a=ot(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=xn(p.d),n=r.charAt(0),f++;a=ot(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=fv(m,u+2,g).times(a+""),p=qu(new m(n+"."+r.slice(1)),u-d).plus(l),m.precision=g,t==null?(Ke=!0,$e(p,g)):p;for(s=o=p=Kn(p.minus(pr),p.plus(pr),u),c=$e(p.times(p),u),i=3;;){if(o=$e(o.times(c),u),l=s.plus(Kn(o,new m(i),u)),xn(l.d).slice(0,u)===xn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(fv(m,u+2,g).times(a+""))),s=Kn(s,new m(f),u),m.precision=g,t==null?(Ke=!0,$e(s,g)):s;s=l,i+=2}}function xP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=yl(r/Be),e.d=[],n=(r+1)%Be,r<0&&(n+=Be),nih||e.e<-ih))throw Error(Bx+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Be,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Be),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=Be,i=n-Be+o}if(r!==void 0&&(a=va(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/va(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ot(e),f.length=1,t=t-a-1,f[0]=va(10,(Be-t%Be)%Be),e.e=yl(-t/Be)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=va(10,Be-n),f[c]=i>0?(u/va(10,o-i)%va(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==yt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=yt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ke&&(e.e>ih||e.e<-ih))throw Error(Bx+ot(e));return e}function _C(e,t){var r,n,i,a,o,s,l,u,c,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ke?$e(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(p/Be),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+yi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+yi(-i-1)+a,r&&(n=r-o)>0&&(a+=yi(n))):i>=o?(a+=yi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+yi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=yi(n))),e.s<0?"-"+a:a}function wP(e,t){if(e.length>t)return e.length=t,!0}function TC(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ba+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return xP(o,a.toString())}else if(typeof a!="string")throw Error(Ba+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,JZ.test(a))xP(o,a);else throw Error(Ba+a)}if(i.prototype=J,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=TC,i.config=i.set=ZZ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ba+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ba+r+": "+n);return this}var zx=TC(QZ);pr=new zx(1);const Ce=zx;function eee(e){return iee(e)||nee(e)||ree(e)||tee()}function tee(){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 ree(e,t){if(e){if(typeof e=="string")return Ig(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ig(e,t)}}function nee(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function iee(e){if(Array.isArray(e))return Ig(e)}function Ig(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,SP(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function bee(e){if(Array.isArray(e))return e}function MC(e){var t=Vu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function IC(e,t,r){if(e.lte(0))return new Ce(0);var n=Up.getDigitCount(e.toNumber()),i=new Ce(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ce(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ce(Math.ceil(l))}function xee(e,t,r){var n=1,i=new Ce(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ce(10).pow(Up.getDigitCount(e)-1),i=new Ce(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ce(Math.floor(e)))}else e===0?i=new Ce(Math.floor((t-1)/2)):r||(i=new Ce(Math.floor(e)));var o=Math.floor((t-1)/2),s=lee(see(function(l){return i.add(new Ce(l-o).mul(n)).toNumber()}),Dg);return s(0,t)}function DC(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=IC(new Ce(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ce(0):(o=new Ce(e).add(t).div(2),o=o.sub(new Ce(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ce(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?DC(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ce(s).mul(a)),tickMax:o.add(new Ce(l).mul(a))})}function wee(e){var t=Vu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=MC([r,n]),l=Vu(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Lg(Dg(0,i-1).map(function(){return 1/0}))):[].concat(Lg(Dg(0,i-1).map(function(){return-1/0})),[c]);return r>n?Rg(f):f}if(u===c)return xee(u,i,a);var d=DC(u,c,o,a),p=d.step,y=d.tickMin,m=d.tickMax,g=Up.rangeStep(y,m.add(new Ce(.1).mul(p)),p);return r>n?Rg(g):g}function See(e,t){var r=Vu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=MC([n,i]),s=Vu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=IC(new Ce(u).sub(l).div(c-1),a,0),d=[].concat(Lg(Up.rangeStep(new Ce(l),new Ce(u).sub(new Ce(.99).mul(f)),f)),[u]);return n>i?Rg(d):d}var Oee=CC(wee),Pee=CC(See),jee="Invariant failed";function Za(e,t){throw new Error(jee)}var Eee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ks(e){"@babel/helpers - typeof";return ks=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},ks(e)}function ah(){return ah=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,d=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Ut(f-c)!==Ut(d-f)){var y=[];if(Ut(d-f)===Ut(l[1]-l[0])){p=d;var m=f+l[1]-l[0];y[0]=Math.min(m,(m+c)/2),y[1]=Math.max(m,(m+c)/2)}else{p=c;var g=d+l[1]-l[0];y[0]=Math.min(f,(g+f)/2),y[1]=Math.max(f,(g+f)/2)}var v=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>v[0]&&t<=v[1]||t>=y[0]&&t<=y[1]){o=i[u].index;break}}else{var b=Math.min(c,d),x=Math.max(c,d);if(t>(b+f)/2&&t<=(x+f)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Ux=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},Jee=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(v&&v.length){var b=v[0].type.defaultProps,x=b!==void 0?et(et({},b),v[0].props):v[0].props,S=x.barSize,w=x[g];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:v[0],stackList:v.slice(1),barSize:ae(O)?void 0:Wt(O,n,0)})}}return o},Zee=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Wt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/l,y=o.reduce(function(S,w){return S+w.barSize||0},0);y+=(l-1)*u,y>=i&&(y-=(l-1)*u,u=0),y>=i&&p>0&&(d=!0,p*=.9,y=l*p);var m=(i-y)/2>>0,g={offset:m-u,size:0};c=o.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:d?p:w.barSize}},P=[].concat(jP(S),[O]);return g=P[P.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:g})}),P},f)}else{var v=Wt(n,i,0,!0);i-2*v-(l-1)*u<=0&&(u=0);var b=(i-2*v-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;c=o.reduce(function(S,w,O){var P=[].concat(jP(S),[{item:w.item,position:{offset:v+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},f)}return c},ete=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=BC({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,d=c.height,p=u.align,y=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&y==="middle")&&p!=="center"&&q(t[p]))return et(et({},t),{},es({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&y!=="middle"&&q(t[y]))return et(et({},t),{},es({},y,t[y]+(d||0)))}return t},tte=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zC=function(t,r,n,i,a){var o=r.props.children,s=qt(o,gl).filter(function(u){return tte(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ge(c,n);if(ae(f))return u;var d=Array.isArray(f)?[Bp(f),Fp(f)]:[f,f],p=l.reduce(function(y,m){var g=Ge(c,m,0),v=d[0]-Math.abs(Array.isArray(g)?g[0]:g),b=d[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(v,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},rte=function(t,r,n,i,a){var o=r.map(function(s){return zC(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},UC=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&zC(t,l,u,i)||au(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?Ut(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+u,value:f,offset:u}});return c.filter(function(f){return!Dc(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:i(f)+u,value:f,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,d){return{coordinate:i(f)+u,value:a?a[f]:f,index:d,offset:u}})},dv=new WeakMap,jf=function(t,r){if(typeof r!="function")return t;dv.has(t)||dv.set(t,new WeakMap);var n=dv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},KC=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:zu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:eh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:iu(),realScaleType:"point"}:a==="category"?{scale:zu(),realScaleType:"band"}:{scale:eh(),realScaleType:"linear"};if(Xa(i)){var l="scale".concat(Pp(i));return{scale:(bP[l]||iu)(),realScaleType:bP[l]?l:"point"}}return oe(i)?{scale:i}:{scale:iu(),realScaleType:"point"}},AP=1e-4,qC=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-AP,o=Math.max(i[0],i[1])+AP,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},nte=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},ote=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},ste={sign:ate,expand:EW,none:Ss,silhouette:AW,wiggle:_W,positive:ote},lte=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=ste[n],o=jW().keys(i).value(function(s,l){return+Ge(s,l,0)}).order(dg).offset(a);return o(t)},ute=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var p,y=(p=d.type)!==null&&p!==void 0&&p.defaultProps?et(et({},d.type.defaultProps),d.props):d.props,m=y.stackId,g=y.hide;if(g)return f;var v=y[n],b=f[v]||{hasStack:!1,stackGroups:{}};if(pt(m)){var x=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[uo("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return et(et({},f),{},es({},v,b))},l),c={};return Object.keys(u).reduce(function(f,d){var p=u[d];if(p.hasStack){var y={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,g){var v=p.stackGroups[g];return et(et({},m),{},es({},g,{numericAxisId:n,cateAxisId:i,items:v.items,stackedData:lte(t,v.items,a)}))},y)}return et(et({},f),{},es({},d,p))},c)},VC=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=Oee(u,a,s);return t.domain([Bp(c),Fp(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),d=Pee(f,a,s);return{niceTicks:d}}return null};function sh(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=$d(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Ge(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var _P=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Ge(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},cte=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},fte=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(pt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},dte=function(t){return t.reduce(function(r,n){return[Bp(n.concat([r[0]]).filter(q)),Fp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},GC=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=dte(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},TP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ug=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(TP.test(t[0])){var a=+TP.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(kP.test(t[1])){var o=+kP.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},lh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=vx(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},wte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=Wt(t.cx,o,o/2),f=Wt(t.cy,s,s/2),d=QC(o,s,n),p=Wt(t.innerRadius,d,0),y=Wt(t.outerRadius,d,d*.8),m=Object.keys(r);return m.reduce(function(g,v){var b=r[v],x=b.domain,S=b.reversed,w;if(ae(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[p,y]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,P=mte(O,2);l=P[0],u=P[1]}var E=KC(b,a),A=E.realScaleType,_=E.scale;_.domain(x).range(w),qC(_);var T=VC(_,Mn(Mn({},b),{},{realScaleType:A})),k=Mn(Mn(Mn({},b),T),{},{range:w,radius:y,realScaleType:A,scale:_,cx:c,cy:f,innerRadius:p,outerRadius:y,startAngle:l,endAngle:u});return Mn(Mn({},g),{},XC({},v,k))},{})},Ste=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},Ote=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Ste({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:xte(u),angleInRadian:u}},Pte=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},jte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},MP=function(t,r){var n=t.x,i=t.y,a=Ote({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=Pte(r),f=c.startAngle,d=c.endAngle,p=s,y;if(f<=d){for(;p>d;)p-=360;for(;p=f&&p<=d}else{for(;p>f;)p-=360;for(;p=d&&p<=f}return y?Mn(Mn({},r),{},{radius:o,angle:jte(p,r)}):null},JC=function(t){return!j.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function Qu(e){"@babel/helpers - typeof";return Qu=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},Qu(e)}var Ete=["offset"];function Ate(e){return Nte(e)||kte(e)||Tte(e)||_te()}function _te(){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 Tte(e,t){if(e){if(typeof e=="string")return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}}function kte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nte(e){if(Array.isArray(e))return Wg(e)}function Wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $te(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=p+b*o,S=m):i==="insideEnd"?(x=y-b*o,S=!m):i==="end"&&(x=y+b*o,S=m),S=v<=0?S:!S;var w=Re(u,c,g,x),O=Re(u,c,g,x+(S?1:-1)*359),P="M".concat(w.x,",").concat(w.y,` - A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`, - `).concat(O.x,",").concat(O.y),E=ae(t.id)?uo("recharts-radial-line-"):t.id;return N.createElement("text",Ju({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),N.createElement("defs",null,N.createElement("path",{id:E,d:P})),N.createElement("textPath",{xlinkHref:"#".concat(E)},r))},Bte=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,d=(c+f)/2;if(i==="outside"){var p=Re(o,s,u+n,d),y=p.x,m=p.y;return{x:y,y:m,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,v=Re(o,s,g,d),b=v.x,x=v.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},zte=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*i,p=f>0?"end":"start",y=f>0?"start":"end",m=u>=0?1:-1,g=m*i,v=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return ft(ft({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:y};return ft(ft({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+c/2,textAnchor:v,verticalAnchor:"middle"};return ft(ft({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if(a==="right"){var O={x:s+u+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return ft(ft({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var P=n?{width:u,height:c}:{};return a==="insideLeft"?ft({x:s+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},P):a==="insideRight"?ft({x:s+u-g,y:l+c/2,textAnchor:v,verticalAnchor:"middle"},P):a==="insideTop"?ft({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:y},P):a==="insideBottom"?ft({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:p},P):a==="insideTopLeft"?ft({x:s+g,y:l+d,textAnchor:b,verticalAnchor:y},P):a==="insideTopRight"?ft({x:s+u-g,y:l+d,textAnchor:v,verticalAnchor:y},P):a==="insideBottomLeft"?ft({x:s+g,y:l+c-d,textAnchor:b,verticalAnchor:p},P):a==="insideBottomRight"?ft({x:s+u-g,y:l+c-d,textAnchor:v,verticalAnchor:p},P):sl(a)&&(q(a.x)||Oa(a.x))&&(q(a.y)||Oa(a.y))?ft({x:s+Wt(a.x,u),y:l+Wt(a.y,c),textAnchor:"end",verticalAnchor:"end"},P):ft({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Ute=function(t){return"cx"in t&&q(t.cx)};function bt(e){var t=e.offset,r=t===void 0?5:t,n=Cte(e,Ete),i=ft({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,d=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!j.isValidElement(u)&&!oe(u))return null;if(j.isValidElement(u))return j.cloneElement(u,i);var p;if(oe(u)){if(p=j.createElement(u,i),j.isValidElement(p))return p}else p=Rte(i);var y=Ute(a),m=te(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Fte(i,p,m);var g=y?Bte(i):zte(i);return N.createElement(Qa,Ju({className:ue("recharts-label",f)},m,g,{breakAll:d}),p)}bt.displayName="Label";var ZC=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,p=t.top,y=t.left,m=t.width,g=t.height,v=t.clockWise,b=t.labelViewBox;if(b)return b;if(q(m)&&q(g)){if(q(f)&&q(d))return{x:f,y:d,width:m,height:g};if(q(p)&&q(y))return{x:p,y,width:m,height:g}}return q(f)&&q(d)?{x:f,y:d,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:v}:t.viewBox?t.viewBox:{}},Wte=function(t,r){return t?t===!0?N.createElement(bt,{key:"label-implicit",viewBox:r}):pt(t)?N.createElement(bt,{key:"label-implicit",viewBox:r,value:t}):j.isValidElement(t)?t.type===bt?j.cloneElement(t,{key:"label-implicit",viewBox:r}):N.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):oe(t)?N.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):sl(t)?N.createElement(bt,Ju({viewBox:r},t,{key:"label-implicit"})):null:null},Hte=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=ZC(t),o=qt(i,bt).map(function(l,u){return j.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Wte(t.label,r||a);return[s].concat(Ate(o))};bt.parseViewBox=ZC;bt.renderCallByParent=Hte;function Kte(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var qte=Kte;const Vte=Ee(qte);function Zu(e){"@babel/helpers - typeof";return Zu=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},Zu(e)}var Gte=["valueAccessor"],Yte=["data","dataKey","clockWise","id","textBreakAll"];function Xte(e){return ere(e)||Zte(e)||Jte(e)||Qte()}function Qte(){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 Jte(e,t){if(e){if(typeof e=="string")return Hg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hg(e,t)}}function Zte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ere(e){if(Array.isArray(e))return Hg(e)}function Hg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ire(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var are=function(t){return Array.isArray(t.value)?Vte(t.value):t.value};function Pn(e){var t=e.valueAccessor,r=t===void 0?are:t,n=LP(e,Gte),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=LP(n,Yte);return!i||!i.length?null:N.createElement(he,{className:"recharts-label-list"},i.map(function(c,f){var d=ae(a)?r(c,f):Ge(c&&c.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(f)};return N.createElement(bt,ch({},te(c,!0),u,p,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:bt.parseViewBox(ae(o)?c:RP(RP({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Pn.displayName="LabelList";function ore(e,t){return e?e===!0?N.createElement(Pn,{key:"labelList-implicit",data:t}):N.isValidElement(e)||oe(e)?N.createElement(Pn,{key:"labelList-implicit",data:t,content:e}):sl(e)?N.createElement(Pn,ch({data:t},e,{key:"labelList-implicit"})):null:null}function sre(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=qt(n,Pn).map(function(o,s){return j.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=ore(e.label,t);return[a].concat(Xte(i))}Pn.renderCallByParent=sre;function ec(e){"@babel/helpers - typeof";return ec=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},ec(e)}function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, - `).concat(f.x,",").concat(f.y,` - `);if(i>0){var p=Re(r,n,i,o),y=Re(r,n,i,u);d+="L ".concat(y.x,",").concat(y.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},dre=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ut(c-u),d=Ef({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=d.circleTangency,y=d.lineTangency,m=d.theta,g=Ef({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),v=g.circleTangency,b=g.lineTangency,x=g.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-x;if(S<0)return s?"M ".concat(y.x,",").concat(y.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):e$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var w="M ".concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(v.x,",").concat(v.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` - `);if(i>0){var O=Ef({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=O.circleTangency,E=O.lineTangency,A=O.theta,_=Ef({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=_.circleTangency,k=_.lineTangency,D=_.theta,M=l?Math.abs(u-c):Math.abs(u-c)-A-D;if(M<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(k.x,",").concat(k.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,` - A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(P.x,",").concat(P.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},hre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},t$=function(t){var r=BP(BP({},hre),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o0&&Math.abs(c-f)<360?g=dre({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):g=e$({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),N.createElement("path",Kg({},te(r,!0),{className:p,d:g,role:"img"}))};function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;tEre.call(e,t));function po(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Tre="__v",kre="__o",Nre="_owner",{getOwnPropertyDescriptor:KP,keys:qP}=Object;function Cre(e,t){return e.byteLength===t.byteLength&&fh(new Uint8Array(e),new Uint8Array(t))}function $re(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Mre(e,t){return e.byteLength===t.byteLength&&fh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ire(e,t){return po(e.getTime(),t.getTime())}function Dre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Rre(e,t){return e===t}function VP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const d=o.value,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const Lre=po;function Fre(e,t,r){const n=qP(e);let i=n.length;if(qP(t).length!==i)return!1;for(;i-- >0;)if(!a$(e,t,r,n[i]))return!1;return!0}function Bl(e,t,r){const n=HP(e);let i=n.length;if(HP(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!a$(e,t,r,a)||(o=KP(e,a),s=KP(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Bre(e,t){return po(e.valueOf(),t.valueOf())}function zre(e,t){return e.source===t.source&&e.flags===t.flags}function GP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function fh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Ure(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function a$(e,t,r,n){return(n===Nre||n===kre||n===Tre)&&(e.$$typeof||t.$$typeof)?!0:_re(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const Wre="[object ArrayBuffer]",Hre="[object Arguments]",Kre="[object Boolean]",qre="[object DataView]",Vre="[object Date]",Gre="[object Error]",Yre="[object Map]",Xre="[object Number]",Qre="[object Object]",Jre="[object RegExp]",Zre="[object Set]",ene="[object String]",tne={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},rne="[object URL]",nne=Object.prototype.toString;function ine({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:y}){return function(g,v,b){if(g===v)return!0;if(g==null||v==null)return!1;const x=typeof g;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?s(g,v,b):x==="function"?a(g,v,b):!1;const S=g.constructor;if(S!==v.constructor)return!1;if(S===Object)return l(g,v,b);if(Array.isArray(g))return t(g,v,b);if(S===Date)return n(g,v,b);if(S===RegExp)return c(g,v,b);if(S===Map)return o(g,v,b);if(S===Set)return f(g,v,b);const w=nne.call(g);if(w===Vre)return n(g,v,b);if(w===Jre)return c(g,v,b);if(w===Yre)return o(g,v,b);if(w===Zre)return f(g,v,b);if(w===Qre)return typeof g.then!="function"&&typeof v.then!="function"&&l(g,v,b);if(w===rne)return p(g,v,b);if(w===Gre)return i(g,v,b);if(w===Hre)return l(g,v,b);if(tne[w])return d(g,v,b);if(w===Wre)return e(g,v,b);if(w===qre)return r(g,v,b);if(w===Kre||w===Xre||w===ene)return u(g,v,b);if(y){let O=y[w];if(!O){const P=Are(g);P&&(O=y[P])}if(O)return O(g,v,b)}return!1}}function ane({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Cre,areArraysEqual:r?Bl:$re,areDataViewsEqual:Mre,areDatesEqual:Ire,areErrorsEqual:Dre,areFunctionsEqual:Rre,areMapsEqual:r?hv(VP,Bl):VP,areNumbersEqual:Lre,areObjectsEqual:r?Bl:Fre,arePrimitiveWrappersEqual:Bre,areRegExpsEqual:zre,areSetsEqual:r?hv(GP,Bl):GP,areTypedArraysEqual:r?hv(fh,Bl):fh,areUrlsEqual:Ure,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=_f(n.areArraysEqual),a=_f(n.areMapsEqual),o=_f(n.areObjectsEqual),s=_f(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function one(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function sne({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const lne=ia();ia({strict:!0});ia({circular:!0});ia({circular:!0,strict:!0});ia({createInternalComparator:()=>po});ia({strict:!0,createInternalComparator:()=>po});ia({circular:!0,createInternalComparator:()=>po});ia({circular:!0,createInternalComparator:()=>po,strict:!0});function ia(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=ane(e),o=ine(a),s=r?r(o):one(o);return sne({circular:t,comparator:o,createState:n,equals:s,strict:i})}function une(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function YP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):une(i)};requestAnimationFrame(n)}function Vg(e){"@babel/helpers - typeof";return Vg=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},Vg(e)}function cne(e){return pne(e)||hne(e)||dne(e)||fne()}function fne(){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 dne(e,t){if(e){if(typeof e=="string")return XP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XP(e,t)}}function XP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:v<0?0:v},m=function(v){for(var b=v>1?1:v,x=b,S=0;S<8;++S){var w=f(x)-b,O=p(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var p=-(c-f)*n,y=d*a,m=d+(p-y)*s/1e3,g=d*s/1e3+c;return Math.abs(g-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kne(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function pv(e){return Yne(e)||Gne(e)||Vne(e)||qne()}function qne(){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 Vne(e,t){if(e){if(typeof e=="string")return Jg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jg(e,t)}}function Gne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yne(e){if(Array.isArray(e))return Jg(e)}function Jg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"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 ph(e){return ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ph(e)}var sn=function(e){eie(r,e);var t=tie(r);function r(n,i){var a;Xne(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(t0(a)),a.changeStyle=a.changeStyle.bind(t0(a)),!s||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:c}),e0(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof d=="function")return a.state={style:u},e0(a);a.state={style:l?Vl({},l,u):u}}else a.state={style:{}};return a}return Jne(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,d=this.state.style;if(s){if(!o){var p={style:l?Vl({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(p);return}if(!(lne(i.to,c)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=y||u?f:i.to;if(this.state&&d){var g={style:l?Vl({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(g)}this.runAnimation(Hr(Hr({},this.props),{},{from:m,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 a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,d=i.onAnimationStart,p=Une(o,s,Nne(u),l,this.changeStyle),y=function(){a.stopJSAnimation=p()};this.manager.start([d,c,y,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,p=function(m,g,v){if(v===0)return m;var b=g.duration,x=g.easing,S=x===void 0?"ease":x,w=g.style,O=g.properties,P=g.onAnimationEnd,E=v>0?o[v-1]:g,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(pv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:b,easing:S}),b]);var _=ZP(A,b,S),T=Hr(Hr(Hr({},E.style),w),{},{transition:_});return[].concat(pv(m),[T,b,P]).filter(bne)};return this.manager.start([l].concat(pv(o.reduce(p,[c,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=mne());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,d=i.steps,p=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var m=s?Vl({},s,l):l,g=ZP(Object.keys(m),o,u);y.start([c,a,Hr(Hr({},m),{},{transition:g}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=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 l=Hne(i,Wne),u=j.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(p){var y=p.props,m=y.style,g=m===void 0?{}:m,v=y.className,b=j.cloneElement(p,Hr(Hr({},l),{},{style:Hr(Hr({},g),c),className:v}));return b};return u===1?f(j.Children.only(a)):N.createElement("div",null,j.Children.map(a,function(d){return f(d)}))}}]),r}(j.PureComponent);sn.displayName="Animate";sn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};sn.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function ac(e){"@babel/helpers - typeof";return ac=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},ac(e)}function mh(){return mh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],d=0,p=4;do?o:a[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, - `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, - `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, - `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);c="M ".concat(t,",").concat(r+s*y,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+l*y,",").concat(r,` - L `).concat(t+n-l*y,",").concat(r,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*y,` - L `).concat(t+n,",").concat(r+i-s*y,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n-l*y,",").concat(r+i,` - L `).concat(t+l*y,",").concat(r+i,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*y," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},fie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=d}return!1},die={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Wx=function(t){var r=sj(sj({},die),t),n=j.useRef(),i=j.useState(-1),a=nie(i,2),o=a[0],s=a[1];j.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,p=r.className,y=r.animationEasing,m=r.animationDuration,g=r.animationBegin,v=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=ue("recharts-rectangle",p);return b?N.createElement(sn,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:y,isActive:b},function(S){var w=S.width,O=S.height,P=S.x,E=S.y;return N.createElement(sn,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:v,easing:y},N.createElement("path",mh({},te(r,!0),{className:x,d:lj(P,E,w,O,d),ref:n})))}):N.createElement("path",mh({},te(r,!0),{className:x,d:lj(l,u,c,f,d)}))},hie=["points","className","baseLinePoints","connectNulls"];function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uj(e){return bie(e)||gie(e)||yie(e)||vie()}function vie(){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 yie(e,t){if(e){if(typeof e=="string")return r0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r0(e,t)}}function gie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bie(e){if(Array.isArray(e))return r0(e)}function r0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){cj(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),cj(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},su=function(t,r){var n=xie(t);r&&(n=[n.reduce(function(a,o){return[].concat(uj(a),uj(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},wie=function(t,r,n){var i=su(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(su(r.reverse(),n).slice(1))},Sie=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=pie(t,hie);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=wie(r,i,a);return N.createElement("g",{className:s},N.createElement("path",Bo({},te(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?N.createElement("path",Bo({},te(o,!0),{fill:"none",d:su(r,a)})):null,l?N.createElement("path",Bo({},te(o,!0),{fill:"none",d:su(i,a)})):null)}var c=su(r,a);return N.createElement("path",Bo({},te(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var kie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Nie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,p=d===void 0?0:d,y=t.className,m=_ie(t,Oie),g=Pie({x:n,y:a,top:s,left:u,width:f,height:p},m);return!q(n)||!q(a)||!q(f)||!q(p)||!q(s)||!q(u)?null:N.createElement("path",i0({},te(g,!0),{className:ue("recharts-cross",y),d:kie(n,a,f,p,s,u)}))},Cie=Lp,$ie=OC,Mie=Tn;function Iie(e,t){return e&&e.length?Cie(e,Mie(t),$ie):void 0}var Die=Iie;const Rie=Ee(Die);var Lie=Lp,Fie=Tn,Bie=PC;function zie(e,t){return e&&e.length?Lie(e,Fie(t),Bie):void 0}var Uie=zie;const Wie=Ee(Uie);var Hie=["cx","cy","angle","ticks","axisLine"],Kie=["ticks","tick","angle","tickFormatter","stroke"];function Cs(e){"@babel/helpers - typeof";return Cs=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},Cs(e)}function lu(){return lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pj(e,t){for(var r=0;ryj?o=i==="outer"?"start":"end":a<-yj?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ca(ca({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return N.createElement(Wp,ya({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return Re(i,a,o,d.coordinate)});return N.createElement(Sie,ya({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=te(this.props,!1),f=te(o,!1),d=ca(ca({},c),{},{fill:"none"},te(s,!1)),p=a.map(function(y,m){var g=n.getTickLineCoord(y),v=n.getTickTextAnchor(y),b=ca(ca(ca({textAnchor:v},c),{},{stroke:"none",fill:u},f),{},{index:m,payload:y,x:g.x2,y:g.y2});return N.createElement(he,ya({className:ue("recharts-polar-angle-axis-tick",JC(o)),key:"tick-".concat(y.coordinate)},Yi(n.props,y,m)),s&&N.createElement("line",ya({className:"recharts-polar-angle-axis-tick-line"},d,g)),o&&t.renderTickItem(o,b,l?l(y.value,m):y.value))});return N.createElement(he,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:N.createElement(he,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return N.isValidElement(n)?o=N.cloneElement(n,i):oe(n)?o=n(i):o=N.createElement(Qa,ya({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(j.PureComponent);qp(Vp,"displayName","PolarAngleAxis");qp(Vp,"axisType","angleAxis");qp(Vp,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var lae=bN,uae=lae(Object.getPrototypeOf,Object),cae=uae,fae=ii,dae=cae,hae=ai,pae="[object Object]",mae=Function.prototype,vae=Object.prototype,v$=mae.toString,yae=vae.hasOwnProperty,gae=v$.call(Object);function bae(e){if(!hae(e)||fae(e)!=pae)return!1;var t=dae(e);if(t===null)return!0;var r=yae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&v$.call(r)==gae}var xae=bae;const wae=Ee(xae);var Sae=ii,Oae=ai,Pae="[object Boolean]";function jae(e){return e===!0||e===!1||Oae(e)&&Sae(e)==Pae}var Eae=jae;const Aae=Ee(Eae);function sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:m,animationEasing:y,isActive:v},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,P=x.x,E=x.y;return N.createElement(sn,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:y},N.createElement("path",gh({},te(r,!0),{className:b,d:wj(P,E,S,w,O),ref:n})))}):N.createElement("g",null,N.createElement("path",gh({},te(r,!0),{className:b,d:wj(l,u,c,f,d)})))},Lae=["option","shapeType","propTransformer","activeClassName","isActive"];function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function Fae(e,t){if(e==null)return{};var r=Bae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t0?yr(x,"paddingAngle",0):0;if(w){var P=At(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Me(Me({},x),{},{startAngle:b+O,endAngle:b+P(m)+O});g.push(E),b=E.endAngle}else{var A=x.endAngle,_=x.startAngle,T=At(0,A-_),k=T(m),D=Me(Me({},x),{},{startAngle:b+O,endAngle:b+k+O});g.push(D),b=D.endAngle}}),N.createElement(he,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!ml(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,p=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(c)||!q(f)||!q(d))return null;var m=ue("recharts-pie",s);return N.createElement(he,{tabIndex:this.props.rootTabIndex,className:m,ref:function(v){n.pieRef=v}},this.renderSectors(),l&&this.renderLabels(o),bt.renderCallByParent(this.props,null,!1),(!p||y)&&Pn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=g-b*p-x,w=i.reduce(function(E,A){var _=Ge(A,v,0);return E+(q(_)?_:0)},0),O;if(w>0){var P;O=i.map(function(E,A){var _=Ge(E,v,0),T=Ge(E,c,A),k=(q(_)?_:0)/w,D;A?D=P.endAngle+Ut(m)*l*(_!==0?1:0):D=o;var M=D+Ut(m)*((_!==0?p:0)+k*S),I=(D+M)/2,L=(y.innerRadius+y.outerRadius)/2,z=[{name:T,value:_,payload:E,dataKey:v,type:d}],C=Re(y.cx,y.cy,L,I);return P=Me(Me(Me({percent:k,cornerRadius:a,name:T,tooltipPayload:z,midAngle:I,middleRadius:L,tooltipPosition:C},E),y),{},{value:Ge(E,v),startAngle:D,endAngle:M,payload:E,paddingAngle:Ut(m)*l}),P})}return Me(Me({},y),{},{sectors:O,data:i})});var soe=Math.ceil,loe=Math.max;function uoe(e,t,r,n){for(var i=-1,a=loe(soe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var coe=uoe,foe=LN,Ej=1/0,doe=17976931348623157e292;function hoe(e){if(!e)return e===0?e:0;if(e=foe(e),e===Ej||e===-Ej){var t=e<0?-1:1;return t*doe}return e===e?e:0}var b$=hoe,poe=coe,moe=Np,mv=b$;function voe(e){return function(t,r,n){return n&&typeof n!="number"&&moe(t,r,n)&&(r=n=void 0),t=mv(t),r===void 0?(r=t,t=0):r=mv(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),fr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),fr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),fr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),fr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),fr(n,"handleSlideDragStart",function(i){var a=Nj(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return koe(t,e),Eoe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,f),y=t.getIndexInRange(o,d);return{startIndex:p-p%l,endIndex:y===c?c:y-y%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Ge(a[n],s,n);return oe(o)?o(l,n):l}},{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(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,p=l.endIndex,y=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==d||g.endIndex!==p)&&y&&y(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Nj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,p=c.travellerWidth,y=c.onChange,m=c.gap,g=c.data,v={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-p-u):b<0&&(b=Math.max(b,f-u)),v[o]=u+b;var x=this.getIndex(v),S=x.startIndex,w=x.endIndex,O=function(){var E=g.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(fr(fr({},o,u+b),"brushMoveStartX",n.pageX),function(){y&&O()&&y(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var p=s[d];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(fr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return N.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=j.Children.only(u);return f?N.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,p=l.ariaLabel,y=l.data,m=l.startIndex,g=l.endIndex,v=Math.max(n,this.props.x),b=vv(vv({},te(this.props,!1)),{},{x:v,y:u,width:c,height:f}),x=p||"Min value: ".concat((a=y[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[g])===null||o===void 0?void 0:o.name);return N.createElement(he,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return N.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,p=5,y={pointerEvents:"none",fill:u};return N.createElement(he,{className:"recharts-brush-texts"},N.createElement(Qa,Oh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+s/2},y),this.getTextOfTick(i)),N.createElement(Qa,Oh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+p,y:o+s/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,p=d.startX,y=d.endX,m=d.isTextActive,g=d.isSlideMoving,v=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(c)||u<=0||c<=0)return null;var x=ue("recharts-brush",a),S=N.Children.count(o)===1,w=Poe("userSelect","none");return N.createElement(he,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,y),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(y,"endX"),(m||g||v||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return N.createElement(N.Fragment,null,N.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),N.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),N.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return N.isValidElement(n)?a=N.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return vv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Coe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(j.PureComponent);fr(Ds,"displayName","Brush");fr(Ds,"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 $oe=mx;function Moe(e,t){var r;return $oe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Ioe=Moe,Doe=fN,Roe=Tn,Loe=Ioe,Foe=ur,Boe=Np;function zoe(e,t,r){var n=Foe(e)?Doe:Loe;return r&&Boe(e,t,r)&&(t=void 0),n(e,Roe(t))}var Uoe=zoe;const Woe=Ee(Uoe);var jn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Cj=$N;function Hoe(e,t,r){t=="__proto__"&&Cj?Cj(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Koe=Hoe,qoe=Koe,Voe=NN,Goe=Tn;function Yoe(e,t){var r={};return t=Goe(t),Voe(e,function(n,i,a){qoe(r,i,t(n,i,a))}),r}var Xoe=Yoe;const Qoe=Ee(Xoe);function Joe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vse(e,t){var r=e.x,n=e.y,i=pse(e,cse),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),d=parseInt(f,10);return zl(zl(zl(zl(zl({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Mj(e){return N.createElement(xh,u0({shapeType:"rectangle",propTransformer:vse,activeClassName:"recharts-active-bar"},e))}var yse=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||R8(n);return a?t(n,i):(a||Za(),r)}},gse=["value","background"],P$;function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function bse(e,t){if(e==null)return{};var r=xse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(M)0&&(D=Math.min((re||0)-(M[we-1]||0),D))}),Number.isFinite(D)){var I=D/k,L=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(P=I*L/2),m.padding==="no-gap"){var z=Wt(t.barCategoryGap,I*L),C=I*L/2;P=C-z-(C-z)/L*z}}}i==="xAxis"?E=[n.left+(x.left||0)+(P||0),n.left+n.width-(x.right||0)-(P||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(P||0),n.top+n.height-(x.bottom||0)-(P||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=KC(m,a,d),W=F.scale,V=F.realScaleType;W.domain(v).range(E),qC(W);var H=VC(W,Xr(Xr({},m),{},{realScaleType:V}));i==="xAxis"?(T=g==="top"&&!S||g==="bottom"&&S,A=n.left,_=f[O]-T*m.height):i==="yAxis"&&(T=g==="left"&&!S||g==="right"&&S,A=f[O]-T*m.width,_=n.top);var Y=Xr(Xr(Xr({},m),H),{},{realScaleType:V,x:A,y:_,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=lh(Y,H),!m.hide&&i==="xAxis"?f[O]+=(T?-1:1)*Y.height:m.hide||(f[O]+=(T?-1:1)*Y.width),Xr(Xr({},p),{},Xp({},y,Y))},{})},T$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Nse=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return T$({x:r,y:n},{x:i,y:a})},k$=function(){function e(t){_se(this,e),this.scale=t}return Tse(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Xp(k$,"EPS",1e-4);var Hx=function(t){var r=Object.keys(t).reduce(function(n,i){return Xr(Xr({},n),{},Xp({},i,k$.create(t[i])))},{});return Xr(Xr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Qoe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return O$(i,function(a,o){return r[o].isInRange(a)})}})};function Cse(e){return(e%180+180)%180}var $se=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Cse(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Lse=Rse,Fse=b$;function Bse(e){var t=Fse(e),r=t%1;return t===t?r?t-r:t:0}var zse=Bse,Use=jN,Wse=Tn,Hse=zse,Kse=Math.max;function qse(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Hse(r);return i<0&&(i=Kse(n+i,0)),Use(e,Wse(t),i)}var Vse=qse,Gse=Lse,Yse=Vse,Xse=Gse(Yse),Qse=Xse;const Jse=Ee(Qse);var Zse=WU(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("")}),Kx=j.createContext(void 0),qx=j.createContext(void 0),N$=j.createContext(void 0),C$=j.createContext({}),$$=j.createContext(void 0),M$=j.createContext(0),I$=j.createContext(0),Fj=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=Zse(a);return N.createElement(Kx.Provider,{value:n},N.createElement(qx.Provider,{value:i},N.createElement(C$.Provider,{value:a},N.createElement(N$.Provider,{value:c},N.createElement($$.Provider,{value:o},N.createElement(M$.Provider,{value:u},N.createElement(I$.Provider,{value:l},s)))))))},ele=function(){return j.useContext($$)},D$=function(t){var r=j.useContext(Kx);r==null&&Za();var n=r[t];return n==null&&Za(),n},tle=function(){var t=j.useContext(Kx);return xi(t)},rle=function(){var t=j.useContext(qx),r=Jse(t,function(n){return O$(n.domain,Number.isFinite)});return r||xi(t)},R$=function(t){var r=j.useContext(qx);r==null&&Za();var n=r[t];return n==null&&Za(),n},nle=function(){var t=j.useContext(N$);return t},ile=function(){return j.useContext(C$)},Vx=function(){return j.useContext(I$)},Gx=function(){return j.useContext(M$)};function Ls(e){"@babel/helpers - typeof";return Ls=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},Ls(e)}function ale(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ole(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function zle(e,t){return H$(e,t+1)}function Ule(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var y=n==null?void 0:n[l];if(y===void 0)return{v:H$(n,u)};var m=l,g,v=function(){return g===void 0&&(g=r(y,m)),g},b=y.coordinate,x=l===0||kh(e,b,v,c,s);x||(l=0,c=o,u+=1),x&&(c=b+e*(v()/2+i),l+=u)},d;u<=a.length;)if(d=f(),d)return d.v;return[]}function hc(e){"@babel/helpers - typeof";return hc=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},hc(e)}function Vj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t0?p.coordinate-g*e:p.coordinate})}else a[d]=p=Ct(Ct({},p),{},{tickCoord:p.coordinate});var v=kh(e,p.tickCoord,m,s,l);v&&(l=p.tickCoord-e*(m()/2+i),a[d]=Ct(Ct({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function Vle(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=Ct(Ct({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var p=kh(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Ct(Ct({},c),{},{isShow:!0}))}for(var y=a?s-1:s,m=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Ct(Ct({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Ct(Ct({},x),{},{tickCoord:x.coordinate});var P=kh(e,x.tickCoord,w,l,u);P&&(l=x.tickCoord+e*(w()/2+i),o[b]=Ct(Ct({},x),{},{isShow:!0}))},g=0;g=2?Ut(i[1].coordinate-i[0].coordinate):1,v=Ble(a,g,p);return l==="equidistantPreserveStart"?Ule(g,v,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=Vle(g,v,m,i,o,l==="preserveStartEnd"):d=qle(g,v,m,i,o),d.filter(function(b){return b.isShow}))}var Gle=["viewBox"],Yle=["viewBox"],Xle=["ticks"];function zs(e){"@babel/helpers - typeof";return zs=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},zs(e)}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Jle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yj(e,t){for(var r=0;r0?l(this.props):l(p)),o<=0||s<=0||!y||!y.length?null:N.createElement(he,{className:ue("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),bt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ue(i.className,"recharts-cartesian-axis-tick-value");return N.isValidElement(n)?o=N.cloneElement(n,ct(ct({},i),{},{className:s})):oe(n)?o=n(ct(ct({},i),{},{className:s})):o=N.createElement(Qa,Uo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(j.Component);Jx(bl,"displayName","CartesianAxis");Jx(bl,"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 aue=["x1","y1","x2","y2","key"],oue=["offset"];function eo(e){"@babel/helpers - typeof";return eo=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},eo(e)}function Xj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var fue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return N.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function V$(e,t){var r;if(N.isValidElement(e))r=N.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=Qj(t,aue),u=te(l,!1);u.offset;var c=Qj(u,oue);r=N.createElement("line",Ea({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function due(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return V$(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function hue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return V$(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function pue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var y=!c[p+1],m=y?i+o-d:c[p+1]-d;if(m<=0)return null;var g=p%t.length;return N.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function mue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var y=!c[p+1],m=y?a+s-d:c[p+1]-d;if(m<=0)return null;var g=p%n.length;return N.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:m,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var vue=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return HC(Qx(Mt(Mt(Mt({},bl.defaultProps),n),{},{ticks:Un(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},yue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return HC(Qx(Mt(Mt(Mt({},bl.defaultProps),n),{},{ticks:Un(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},So={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Us(e){var t,r,n,i,a,o,s=Vx(),l=Gx(),u=ile(),c=Mt(Mt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:So.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:So.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:So.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:So.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:So.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:So.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),f=c.x,d=c.y,p=c.width,y=c.height,m=c.syncWithTicks,g=c.horizontalValues,v=c.verticalValues,b=tle(),x=rle();if(!q(p)||p<=0||!q(y)||y<=0||!q(f)||f!==+f||!q(d)||d!==+d)return null;var S=c.verticalCoordinatesGenerator||vue,w=c.horizontalCoordinatesGenerator||yue,O=c.horizontalPoints,P=c.verticalPoints;if((!O||!O.length)&&oe(w)){var E=g&&g.length,A=w({yAxis:x?Mt(Mt({},x),{},{ticks:E?g:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);rn(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(eo(A),"]")),Array.isArray(A)&&(O=A)}if((!P||!P.length)&&oe(S)){var _=v&&v.length,T=S({xAxis:b?Mt(Mt({},b),{},{ticks:_?v:b.ticks}):void 0,width:s,height:l,offset:u},_?!0:m);rn(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(eo(T),"]")),Array.isArray(T)&&(P=T)}return N.createElement("g",{className:"recharts-cartesian-grid"},N.createElement(fue,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),N.createElement(due,Ea({},c,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),N.createElement(hue,Ea({},c,{offset:u,verticalPoints:P,xAxis:b,yAxis:x})),N.createElement(pue,Ea({},c,{horizontalPoints:O})),N.createElement(mue,Ea({},c,{verticalPoints:P})))}Us.displayName="CartesianGrid";var gue=["type","layout","connectNulls","ref"],bue=["key"];function Ws(e){"@babel/helpers - typeof";return Ws=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},Ws(e)}function Jj(e,t){if(e==null)return{};var r=xue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uu(){return uu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){p=[].concat(Oo(l.slice(0,y)),[f-m]);break}var g=p.length%2===0?[0,d]:[d];return[].concat(Oo(t.repeat(l,c)),Oo(p),g).map(function(v){return"".concat(v,"px")}).join(", ")}),Qr(r,"id",uo("recharts-line-")),Qr(r,"pathRef",function(o){r.mainCurve=o}),Qr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Qr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return kue(t,e),Eue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=qt(c,gl);if(!f)return null;var d=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:Ge(m.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return N.createElement(he,p,f.map(function(y){return N.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=te(this.props,!1),d=te(l,!0),p=u.map(function(m,g){var v=cr(cr(cr({key:"dot-".concat(g),r:3},f),d),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,v)}),y={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return N.createElement(he,uu({className:"recharts-line-dots",key:"dots"},y),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=Jj(s,gue),d=cr(cr(cr({},te(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return N.createElement(rc,uu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,p=o.animationId,y=o.animateNewValues,m=o.width,g=o.height,v=this.state,b=v.prevPoints,x=v.totalLength;return N.createElement(sn,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(b){var O=b.length/s.length,P=s.map(function(k,D){var M=Math.floor(D*O);if(b[M]){var I=b[M],L=At(I.x,k.x),z=At(I.y,k.y);return cr(cr({},k),{},{x:L(w),y:z(w)})}if(y){var C=At(m*2,k.x),F=At(g/2,k.y);return cr(cr({},k),{},{x:C(w),y:F(w)})}return cr(cr({},k),{},{x:k.x,y:k.y})});return a.renderCurveStatically(P,n,i)}var E=At(0,x),A=E(w),_;if(l){var T="".concat(l).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});_=a.getStrokeDasharray(A,x,T)}else _=a.generateSimpleStrokeDasharray(x,A);return a.renderCurveStatically(s,n,i,{strokeDasharray:_})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!ml(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,d=i.left,p=i.width,y=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var v=this.state.isAnimationFinished,b=s.length===1,x=ue("recharts-line",l),S=u&&u.allowDataOverflow,w=c&&c.allowDataOverflow,O=S||w,P=ae(g)?this.id:g,E=(n=te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=E.r,_=A===void 0?3:A,T=E.strokeWidth,k=T===void 0?2:T,D=X8(o)?o:{},M=D.clipDot,I=M===void 0?!0:M,L=_*2+k;return N.createElement(he,{className:x},S||w?N.createElement("defs",null,N.createElement("clipPath",{id:"clipPath-".concat(P)},N.createElement("rect",{x:S?d:d-p/2,y:w?f:f-y/2,width:S?p:p*2,height:w?y:y*2})),!I&&N.createElement("clipPath",{id:"clipPath-dots-".concat(P)},N.createElement("rect",{x:d-L/2,y:f-L/2,width:p+L,height:y+L}))):null,!b&&this.renderCurve(O,P),this.renderErrorBar(O,P),(b||o)&&this.renderDots(O,I,P),(!m||v)&&Pn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Oo(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wue(e){var t=e.option,r=e.isActive,n=zue(e,Bue);return typeof t=="string"?j.createElement(xh,cu({option:j.createElement(_p,cu({type:t},n)),isActive:r,shapeType:"symbols"},n)):j.createElement(xh,cu({option:t,isActive:r,shapeType:"symbols"},n))}function Ks(e){"@babel/helpers - typeof";return Ks=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},Ks(e)}function fu(){return fu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bce(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function p2(e){return e==="number"?[0,"auto"]:void 0}var k0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=rm(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;d=$d(p,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(Ys(l),[YC(u,d)]):l},[])},lE=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Jce(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=Qee(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=k0(t,r,c,f),p=Zce(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:p}}return null},efe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,p=WC(c,a);return n.reduce(function(y,m){var g,v=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,b=v.type,x=v.dataKey,S=v.allowDataOverflow,w=v.allowDuplicatedCategory,O=v.scale,P=v.ticks,E=v.includeHidden,A=v[o];if(y[A])return y;var _=rm(t.data,{graphicalItems:i.filter(function(H){var Y,re=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return re===A}),dataStartIndex:l,dataEndIndex:u}),T=_.length,k,D,M;Ece(v.domain,S,b)&&(k=Ug(v.domain,null,S),p&&(b==="number"||O!=="auto")&&(M=au(_,x,"category")));var I=p2(b);if(!k||k.length===0){var L,z=(L=v.domain)!==null&&L!==void 0?L:I;if(x){if(k=au(_,x,b),b==="category"&&p){var C=F8(k);w&&C?(D=k,k=Sh(0,T)):w||(k=NP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(Ys(H),[Y])},[]))}else if(b==="category")w?k=k.filter(function(H){return H!==""&&!ae(H)}):k=NP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(Ys(H),[Y])},[]);else if(b==="number"){var F=rte(_,i.filter(function(H){var Y,re,we=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],We="hide"in H.props?H.props.hide:(re=H.type.defaultProps)===null||re===void 0?void 0:re.hide;return we===A&&(E||!We)}),x,a,c);F&&(k=F)}p&&(b==="number"||O!=="auto")&&(M=au(_,x,"category"))}else p?k=Sh(0,T):s&&s[A]&&s[A].hasStack&&b==="number"?k=d==="expand"?[0,1]:GC(s[A].stackGroups,l,u):k=UC(_,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],re="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===A&&(E||!re)}),b,c,!0);if(b==="number")k=A0(f,k,A,a,P),z&&(k=Ug(z,k,S));else if(b==="category"&&z){var W=z,V=k.every(function(H){return W.indexOf(H)>=0});V&&(k=W)}}return B(B({},y),{},ie({},A,B(B({},v),{},{axisType:a,domain:k,categoricalDomain:M,duplicateDomain:D,originalDomain:(g=v.domain)!==null&&g!==void 0?g:I,isCategorical:p,layout:c})))},{})},tfe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=rm(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,y=WC(c,a),m=-1;return n.reduce(function(g,v){var b=v.type.defaultProps!==void 0?B(B({},v.type.defaultProps),v.props):v.props,x=b[o],S=p2("number");if(!g[x]){m++;var w;return y?w=Sh(0,p):s&&s[x]&&s[x].hasStack?(w=GC(s[x].stackGroups,l,u),w=A0(f,w,x,a)):(w=Ug(S,UC(d,n.filter(function(O){var P,E,A=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],_="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return A===x&&!_}),"number",c),i.defaultProps.allowDataOverflow),w=A0(f,w,x,a)),B(B({},g),{},ie({},x,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:yr(Xce,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:y,layout:c})))}return g},{})},rfe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),d=qt(c,a),p={};return d&&d.length?p=efe(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=tfe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},nfe=function(t){var r=xi(t),n=Un(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:vx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:lh(r,n)}},uE=function(t){var r=t.children,n=t.defaultShowTooltip,i=hr(r,Ds),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},ife=function(t){return!t||!t.length?!1:t.some(function(r){var n=Hn(r&&r.type);return n&&n.indexOf("Bar")>=0})},cE=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"}},afe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},p=hr(f,Ds),y=hr(f,Dr),m=Object.keys(l).reduce(function(w,O){var P=l[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,w[E]+P.width)):w},{left:d.left||0,right:d.right||0}),g=Object.keys(o).reduce(function(w,O){var P=o[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,yr(w,"".concat(E))+P.height)):w},{top:d.top||0,bottom:d.bottom||0}),v=B(B({},g),m),b=v.bottom;p&&(v.bottom+=p.props.height||Ds.defaultProps.height),y&&r&&(v=ete(v,i,n,r));var x=u-v.left-v.right,S=c-v.top-v.bottom;return B(B({brushBottom:b},v),{},{width:Math.max(x,0),height:Math.max(S,0)})},ofe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Zx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(v,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,P=b.dataStartIndex,E=b.dataEndIndex,A=v.barSize,_=v.layout,T=v.barGap,k=v.barCategoryGap,D=v.maxBarSize,M=cE(_),I=M.numericAxisName,L=M.cateAxisName,z=ife(x),C=[];return x.forEach(function(F,W){var V=rm(v.data,{graphicalItems:[F],dataStartIndex:P,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,re=H.maxBarSize,we=H["".concat(I,"Id")],We=H["".concat(L,"Id")],Oe={},St=l.reduce(function(aa,oa){var um=b["".concat(oa.axisType,"Map")],sw=H["".concat(oa.axisType,"Id")];um&&um[sw]||oa.axisType==="zAxis"||Za();var lw=um[sw];return B(B({},aa),{},ie(ie({},oa.axisType,lw),"".concat(oa.axisType,"Ticks"),Un(lw)))},Oe),G=St[L],se=St["".concat(L,"Ticks")],le=S&&S[we]&&S[we].hasStack&&fte(F,S[we].stackGroups),U=Hn(F.type).indexOf("Bar")>=0,Qe=lh(G,se),ye=[],st=z&&Jee({barSize:A,stackGroups:S,totalSize:ofe(St,L)});if(U){var lt,Xt,li=ae(re)?D:re,vo=(lt=(Xt=lh(G,se,!0))!==null&&Xt!==void 0?Xt:li)!==null&<!==void 0?lt:0;ye=Zee({barGap:T,barCategoryGap:k,bandSize:vo!==Qe?vo:Qe,sizeList:st[We],maxBarSize:li}),vo!==Qe&&(ye=ye.map(function(aa){return B(B({},aa),{},{position:B(B({},aa.position),{},{offset:aa.position.offset-vo/2})})}))}var qc=F&&F.type&&F.type.getComposedData;qc&&C.push({props:B(B({},qc(B(B({},St),{},{displayedData:V,props:v,dataKey:Y,item:F,bandSize:Qe,barPosition:ye,offset:w,stackedData:le,layout:_,dataStartIndex:P,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},I,St[I]),L,St[L]),"animationId",O)),childIndex:Z8(F,v.children),item:F})}),C},p=function(v,b){var x=v.props,S=v.dataStartIndex,w=v.dataEndIndex,O=v.updateId;if(!jS({props:x}))return null;var P=x.children,E=x.layout,A=x.stackOffset,_=x.data,T=x.reverseStackOrder,k=cE(E),D=k.numericAxisName,M=k.cateAxisName,I=qt(P,n),L=ute(_,I,"".concat(D,"Id"),"".concat(M,"Id"),A,T),z=l.reduce(function(H,Y){var re="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},re,rfe(x,B(B({},Y),{},{graphicalItems:I,stackGroups:Y.axisType===D&&L,dataStartIndex:S,dataEndIndex:w}))))},{}),C=afe(B(B({},z),{},{props:x,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(H){z[H]=c(x,z[H],C,H.replace("Map",""),r)});var F=z["".concat(M,"Map")],W=nfe(F),V=d(x,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:L,offset:C}));return B(B({formattedGraphicalItems:V,graphicalItems:I,offset:C,stackGroups:L},W),z)},y=function(g){function v(b){var x,S,w;return Fce(this,v),w=Uce(this,v,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new jce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var P=w.state,E=P.dataStartIndex,A=P.dataEndIndex,_=P.updateId;w.setState(B({legendBBox:O},p({props:w.props,dataStartIndex:E,dataEndIndex:A,updateId:_},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,P,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(P)}}),ie(w,"handleBrushChange",function(O){var P=O.startIndex,E=O.endIndex;if(P!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return B({dataStartIndex:P,dataEndIndex:E},p({props:w.props,dataStartIndex:P,dataEndIndex:E,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseEnter;oe(A)&&A(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var P=w.getMouseInfo(O),E=P?B(B({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseMove;oe(A)&&A(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var E=w.props.onMouseLeave;oe(E)&&E(P,O)}),ie(w,"handleOuterEvent",function(O){var P=J8(O),E=yr(w.props,"".concat(P));if(P&&oe(E)){var A,_;/.*touch.*/i.test(P)?_=w.getMouseInfo(O.changedTouches[0]):_=w.getMouseInfo(O),E((A=_)!==null&&A!==void 0?A:{},O)}}),ie(w,"handleClick",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onClick;oe(A)&&A(E,O)}}),ie(w,"handleMouseDown",function(O){var P=w.props.onMouseDown;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleMouseUp",function(O){var P=w.props.onMouseUp;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var P=w.props.onDoubleClick;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleContextMenu",function(O){var P=w.props.onContextMenu;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&gv.emit(bv,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var P=w.props,E=P.layout,A=P.syncMethod,_=w.state.updateId,T=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:T,dataEndIndex:k},p({props:w.props,dataStartIndex:T,dataEndIndex:k,updateId:_},w.state)));else if(O.activeTooltipIndex!==void 0){var D=O.chartX,M=O.chartY,I=O.activeTooltipIndex,L=w.state,z=L.offset,C=L.tooltipTicks;if(!z)return;if(typeof A=="function")I=A(C,O);else if(A==="value"){I=-1;for(var F=0;F=0){var le,U;if(D.dataKey&&!D.allowDuplicatedCategory){var Qe=typeof D.dataKey=="function"?se:"payload.".concat(D.dataKey.toString());le=$d(F,Qe,I),U=W&&V&&$d(V,Qe,I)}else le=F==null?void 0:F[M],U=W&&V&&V[M];if(We||we){var ye=O.props.activeIndex!==void 0?O.props.activeIndex:M;return[j.cloneElement(O,B(B(B({},A.props),St),{},{activeIndex:ye})),null,null]}if(!ae(le))return[G].concat(Ys(w.renderActivePoints({item:A,activePoint:le,basePoint:U,childIndex:M,isRange:W})))}else{var st,lt=(st=w.getItemByXY(w.state.activeCoordinate))!==null&&st!==void 0?st:{graphicalItem:G},Xt=lt.graphicalItem,li=Xt.item,vo=li===void 0?O:li,qc=Xt.childIndex,aa=B(B(B({},A.props),St),{},{activeIndex:qc});return[j.cloneElement(vo,aa),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,P,E){return j.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:kf,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:kf},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:kf},YAxis:{handler:kf},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:uo("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=FN(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Kce(v,g),zce(v,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,P=x.layout,E=hr(S,jt);if(E){var A=E.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var _=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,T=k0(this.state,w,A,_),k=this.state.tooltipTicks[A].coordinate,D=(this.state.offset.top+O)/2,M=P==="horizontal",I=M?{x:k,y:D}:{y:k,x:D},L=this.state.formattedGraphicalItems.find(function(C){var F=C.item;return F.type.name==="Scatter"});L&&(I=B(B({},I),L.props.points[A].tooltipPosition),T=L.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:_,activePayload:T,activeCoordinate:I};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){ng([hr(x.children,jt)],[hr(this.props.children,jt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=hr(this.props.children,jt);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=jX(w),P={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},E=w.width/S.offsetWidth||1,A=this.inRange(P.chartX,P.chartY,E);if(!A)return null;var _=this.state,T=_.xAxisMap,k=_.yAxisMap,D=this.getTooltipEventType(),M=lE(this.state,this.props.data,this.props.layout,A);if(D!=="axis"&&T&&k){var I=xi(T).scale,L=xi(k).scale,z=I&&I.invert?I.invert(P.chartX):null,C=L&&L.invert?L.invert(P.chartY):null;return B(B({},P),{},{xValue:z,yValue:C},M)}return M?B(B({},P),M):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=x/w,E=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,_=P>=A.left&&P<=A.left+A.width&&E>=A.top&&E<=A.top+A.height;return _?{x:P,y:E}:null}var T=this.state,k=T.angleAxisMap,D=T.radiusAxisMap;if(k&&D){var M=xi(k);return MP({x:P,y:E},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=hr(x,jt),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={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 P=Md(this.props,this.handleOuterEvent);return B(B({},P),O)}},{key:"addListener",value:function(){gv.on(bv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){gv.removeListener(bv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,P=0,E=O.length;P{const i=lfe.find(s=>s.value===t);if(!i)return[];const a=new Date,o=new Map;for(let s=0;s{const l=new Date(s.createdAt),u=Hi(Zy(l),"yyyy-MM-dd"),c=o.get(u)||0;o.set(u,c+1)}),Array.from(o.entries()).map(([s,l])=>({date:s,experiments:l,displayDate:Hi(new Date(s),"MMM dd")})).sort((s,l)=>s.date.localeCompare(l.date))},[e,t]),n=j.useMemo(()=>e.length,[e]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n]})]}),h.jsx(Xi,{width:"100%",height:240,children:h.jsxs(nm,{data:r,margin:{left:10,right:15,top:10,bottom:5},children:[h.jsx(Us,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:50}),h.jsx(ei,{tick:{fontSize:10},width:50,label:{value:"Count",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(jt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:i,payload:a,label:o})=>{if(!i||!a||!a.length)return null;const s=a[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:o}),h.jsx("div",{className:"space-y-0.5 text-[10px]",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"}),h.jsx("span",{className:"text-muted-foreground",children:"Launched:"}),h.jsx("span",{className:"font-medium ml-auto",children:s.experiments})]})})]})}}),h.jsx(Dr,{wrapperStyle:{fontSize:"11px",paddingTop:"2px"},iconType:"circle",iconSize:8,verticalAlign:"bottom",height:25}),h.jsx(En,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Launched"})]})})]})}const fE={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function cfe({experiments:e}){const t=j.useMemo(()=>{const n=new Map;return e.forEach(i=>{const a=i.status,o=n.get(a)||0;n.set(a,o+1)}),Array.from(n.entries()).map(([i,a])=>({name:i,value:a,color:fE[i]||fE.UNKNOWN})).sort((i,a)=>a.value-i.value)},[e]);if(t.length===0)return h.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"});const r=t.reduce((n,i)=>n+i.value,0);return h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),h.jsx(Xi,{width:"100%",height:240,children:h.jsxs(ew,{children:[h.jsx(cn,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:75,labelLine:!1,label:n=>`${(n.value/r*100).toFixed(1)}%`,style:{fontSize:"11px"},children:t.map((n,i)=>h.jsx(co,{fill:n.color},`cell-${i}`))}),h.jsx(jt,{formatter:n=>[n,"Count"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),h.jsx(Dr,{wrapperStyle:{fontSize:"11px"}})]})})]})}const ffe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function dfe({data:e,timeRange:t}){const r=j.useMemo(()=>{const o=ffe.find(u=>u.value===t);if(!o)return[];const s=new Date,l=new Map;for(let u=0;u{const c=Hi(new Date(u.date),"yyyy-MM-dd");l.has(c)&&l.set(c,{totalTokens:u.totalTokens,inputTokens:u.inputTokens,outputTokens:u.outputTokens})}),Array.from(l.entries()).map(([u,c])=>({date:u,displayDate:Hi(new Date(u),"MMM dd"),totalTokens:c.totalTokens,inputTokens:c.inputTokens,outputTokens:c.outputTokens})).sort((u,c)=>u.date.localeCompare(c.date))},[e,t]),n=j.useMemo(()=>r.reduce((o,s)=>o+s.totalTokens,0),[r]),i=j.useMemo(()=>r.reduce((o,s)=>o+s.inputTokens,0),[r]),a=j.useMemo(()=>r.reduce((o,s)=>o+s.outputTokens,0),[r]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Token Usage"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n.toLocaleString()," (",i.toLocaleString(),"↓ ",a.toLocaleString(),"↑)"]})]}),h.jsx(Xi,{width:"100%",height:240,children:h.jsxs(nm,{data:r,margin:{left:10,right:15,top:10,bottom:5},children:[h.jsx(Us,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:50}),h.jsx(ei,{tick:{fontSize:10},width:50,tickFormatter:o=>o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:o.toString(),label:{value:"Tokens",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(jt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:o,payload:s,label:l})=>{if(!o||!s||!s.length)return null;const u=s[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:l}),h.jsxs("div",{className:"space-y-0.5 text-[10px]",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Total:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.totalTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Input:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.inputTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Output:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.outputTokens.toLocaleString()})]})]})]})}}),h.jsx(Dr,{wrapperStyle:{fontSize:"11px",paddingTop:"2px"},iconType:"circle",iconSize:8,verticalAlign:"bottom",height:25}),h.jsx(En,{type:"monotone",dataKey:"totalTokens",stroke:"#3b82f6",strokeWidth:2,dot:{fill:"#3b82f6",r:3},activeDot:{r:5},name:"Total"}),h.jsx(En,{type:"monotone",dataKey:"inputTokens",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:3},activeDot:{r:5},name:"Input"}),h.jsx(En,{type:"monotone",dataKey:"outputTokens",stroke:"#f59e0b",strokeWidth:2,dot:{fill:"#f59e0b",r:3},activeDot:{r:5},name:"Output"})]})})]})}const dE=["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#06b6d4","#84cc16","#f97316","#6366f1"];function hfe({data:e}){if(!e||e.length===0)return h.jsx("div",{className:"flex items-center justify-center h-80 text-sm text-muted-foreground",children:"No model data available"});const t=e.reduce((n,i)=>n+i.count,0),r=e.map(n=>({name:n.model,value:n.count}));return h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Model Distribution"}),h.jsx(Xi,{width:"100%",height:240,children:h.jsxs(ew,{children:[h.jsx(cn,{data:r,cx:"50%",cy:"50%",labelLine:!1,label:n=>`${(n.value/t*100).toFixed(1)}%`,outerRadius:75,dataKey:"value",style:{fontSize:"11px"},children:r.map((n,i)=>h.jsx(co,{fill:dE[i%dE.length]},`cell-${i}`))}),h.jsx(jt,{formatter:n=>[n,"Count"],contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),h.jsx(Dr,{wrapperStyle:{fontSize:"11px"}})]})})]})}const hE=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function pfe(){var p,y,m,g;const{selectedTeamId:e}=tl(),[t,r]=j.useState("7days"),{data:n,isLoading:i}=qb(e||""),{data:a,isLoading:o}=r4(e||"",{enabled:!!e}),s=((p=hE.find(v=>v.value===t))==null?void 0:p.days)||30,{data:l,isLoading:u}=n4(e||"",s),{data:c,isLoading:f}=a4(e||""),d=j.useMemo(()=>{if(!a)return[];const v=new Date,b=t==="7days"?Vb(v,7):t==="1month"?eg(v,1):eg(v,3);return a.filter(x=>{const S=new Date(x.createdAt);return S>=b&&S<=v})},[a,t]);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Overview of your team's experiments and activity"})]}),h.jsx("div",{children:h.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(Ve,{className:"h-14 w-full"}),h.jsx(Ve,{className:"h-14 w-full"}),h.jsx(Ve,{className:"h-14 w-full"})]}):h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),h.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:h.jsx(ik,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),h.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:h.jsx(MF,{className:"h-3.5 w-3.5 text-green-600"})})]})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"TOKENS"}),h.jsxs("p",{className:"text-lg font-bold tabular-nums text-foreground",children:[(((y=n==null?void 0:n.aggregatedTokens)==null?void 0:y.totalTokens)||0).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1 font-normal",children:["(",(((m=n==null?void 0:n.aggregatedTokens)==null?void 0:m.inputTokens)||0).toLocaleString(),"↓ ",(((g=n==null?void 0:n.aggregatedTokens)==null?void 0:g.outputTokens)||0).toLocaleString(),"↑)"]})]})]}),h.jsx("div",{className:"p-1.5 bg-orange-100 rounded-lg",children:h.jsx(pF,{className:"h-3.5 w-3.5 text-orange-600"})})]})})})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),h.jsx("div",{className:"flex gap-1",children:hE.map(v=>h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>r(v.value),className:`h-8 px-2.5 text-xs transition-colors ${t===v.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:v.label},v.value))})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:o?h.jsx(Ve,{className:"h-72 w-full"}):d&&d.length>0?h.jsx(cfe,{experiments:d}):h.jsx("div",{className:"flex h-72 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:o?h.jsx(Ve,{className:"h-72 w-full"}):d&&d.length>0?h.jsx(ufe,{experiments:d,timeRange:t}):h.jsx("div",{className:"flex h-72 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:f?h.jsx(Ve,{className:"h-72 w-full"}):c&&c.length>0?h.jsx(hfe,{data:c}):h.jsx("div",{className:"flex items-center justify-center h-72 text-sm text-muted-foreground",children:"No model distribution data available"})})}),h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:u?h.jsx(Ve,{className:"h-72 w-full"}):l?h.jsx(dfe,{data:l,timeRange:t}):h.jsx("div",{className:"flex items-center justify-center h-72 text-sm text-muted-foreground",children:"No token usage data available for this time range"})})})]})]})]})}const Wc=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:r,className:fe("w-full caption-bottom text-sm",e),...t})}));Wc.displayName="Table";const Hc=j.forwardRef(({className:e,...t},r)=>h.jsx("thead",{ref:r,className:fe("[&_tr]:border-b",e),...t}));Hc.displayName="TableHeader";const Kc=j.forwardRef(({className:e,...t},r)=>h.jsx("tbody",{ref:r,className:fe("[&_tr:last-child]:border-0",e),...t}));Kc.displayName="TableBody";const mfe=j.forwardRef(({className:e,...t},r)=>h.jsx("tfoot",{ref:r,className:fe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));mfe.displayName="TableFooter";const ti=j.forwardRef(({className:e,...t},r)=>h.jsx("tr",{ref:r,className:fe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ti.displayName="TableRow";const Bt=j.forwardRef(({className:e,...t},r)=>h.jsx("th",{ref:r,className:fe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Bt.displayName="TableHead";const zt=j.forwardRef(({className:e,...t},r)=>h.jsx("td",{ref:r,className:fe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));zt.displayName="TableCell";const vfe=j.forwardRef(({className:e,...t},r)=>h.jsx("caption",{ref:r,className:fe("mt-4 text-sm text-muted-foreground",e),...t}));vfe.displayName="TableCaption";function lr({className:e,variant:t="default",...r}){const n={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-slate-100 text-slate-700 border-slate-200",destructive:"bg-red-50 text-red-700 border-red-200",outline:"text-foreground",success:"bg-emerald-50 text-emerald-700 border-emerald-200",warning:"bg-amber-50 text-amber-700 border-amber-200",unknown:"bg-purple-50 text-purple-700 border-purple-200",info:"bg-blue-50 text-blue-700 border-blue-200"};return h.jsx("div",{className:fe("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors",n[t],e),...r})}const Xs=j.forwardRef(({className:e,type:t,...r},n)=>h.jsx("input",{type:t,className:fe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));Xs.displayName="Input";function tw({value:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=j.useState(!1),s=j.useRef(null),l=r.find(u=>u.value===e);return j.useEffect(()=>{const u=c=>{s.current&&!s.current.contains(c.target)&&o(!1)};return a&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[a]),h.jsxs("div",{ref:s,className:fe("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-[13px] font-medium text-foreground","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("span",{children:(l==null?void 0:l.label)||i||"Select..."}),h.jsx(sp,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-60 overflow-auto p-1",children:r.map(u=>h.jsx("button",{type:"button",onClick:()=>{t(u.value),o(!1)},className:fe("w-full rounded-sm px-2 py-1.5 text-[13px] text-left cursor-pointer transition-colors","hover:bg-accent hover:text-accent-foreground",e===u.value&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value))})})]})}function yfe({values:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=j.useState(!1),s=j.useRef(null),l=r.filter(p=>e.includes(p.value)),u=j.useMemo(()=>{const p={};return r.forEach(y=>{const m=y.group||"Other";p[m]||(p[m]=[]),p[m].push(y)}),p},[r]);j.useEffect(()=>{const p=y=>{s.current&&!s.current.contains(y.target)&&o(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const c=p=>{e.includes(p)?t(e.filter(y=>y!==p)):t([...e,p])},f=(p,y)=>{y.stopPropagation(),t(e.filter(m=>m!==p))},d=p=>{p.stopPropagation(),t([])};return h.jsxs("div",{ref:s,className:fe("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex min-h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-1.5 text-[13px]","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:l.length===0?h.jsx("span",{className:"text-muted-foreground font-medium",children:i||"Select labels..."}):l.map(p=>{const y=p.value.endsWith(":*")?p.label:`${p.group}:${p.label}`;return h.jsxs(lr,{variant:"outline",className:"text-[11px] px-1.5 py-0 font-normal",children:[y,h.jsx(_d,{className:"ml-1 h-3 w-3 cursor-pointer hover:text-destructive",onClick:m=>f(p.value,m)})]},p.value)})}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[l.length>0&&h.jsx(_d,{className:"h-3.5 w-3.5 opacity-50 hover:opacity-100 cursor-pointer",onClick:d}),h.jsx(sp,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-80 overflow-auto p-1",children:Object.entries(u).map(([p,y])=>h.jsxs("div",{children:[h.jsx("div",{className:"px-2 py-1.5 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:p}),y.map(m=>h.jsxs("button",{type:"button",onClick:()=>c(m.value),className:fe("w-full rounded-sm px-2 py-1.5 pl-6 text-[13px] text-left cursor-pointer transition-colors flex items-center gap-2","hover:bg-accent hover:text-accent-foreground"),children:[h.jsx("input",{type:"checkbox",checked:e.includes(m.value),onChange:()=>{},className:"h-3.5 w-3.5 rounded border-gray-300"}),h.jsx("span",{className:fe(e.includes(m.value)&&"font-medium"),children:m.label})]},m.value))]},p))})})]})}function rw({currentPage:e,totalPages:t,pageSize:r,totalItems:n,onPageChange:i,itemName:a="items"}){return n===0?null:h.jsx("div",{className:"flex items-center justify-end px-6 py-4 border-t",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>i(Math.max(0,e-1)),disabled:e===0,className:"h-8 w-8 p-0",children:h.jsx(fF,{className:"h-4 w-4"})}),h.jsxs("div",{className:"text-[13px] font-medium text-muted-foreground",children:[e+1," / ",t]}),h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>i(Math.min(t-1,e+1)),disabled:e>=t-1,className:"h-8 w-8 p-0",children:h.jsx(Ub,{className:"h-4 w-4"})})]})})}const gfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},bfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],wv=[{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-300"},{bg:"bg-green-100",text:"text-green-700",border:"border-green-300"},{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-300"},{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300"},{bg:"bg-pink-100",text:"text-pink-700",border:"border-pink-300"},{bg:"bg-cyan-100",text:"text-cyan-700",border:"border-cyan-300"},{bg:"bg-indigo-100",text:"text-indigo-700",border:"border-indigo-300"},{bg:"bg-teal-100",text:"text-teal-700",border:"border-teal-300"},{bg:"bg-amber-100",text:"text-amber-700",border:"border-amber-300"},{bg:"bg-rose-100",text:"text-rose-700",border:"border-rose-300"},{bg:"bg-violet-100",text:"text-violet-700",border:"border-violet-300"},{bg:"bg-lime-100",text:"text-lime-700",border:"border-lime-300"},{bg:"bg-fuchsia-100",text:"text-fuchsia-700",border:"border-fuchsia-300"},{bg:"bg-emerald-100",text:"text-emerald-700",border:"border-emerald-300"},{bg:"bg-sky-100",text:"text-sky-700",border:"border-sky-300"},{bg:"bg-red-100",text:"text-red-700",border:"border-red-300"},{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300"},{bg:"bg-slate-100",text:"text-slate-700",border:"border-slate-300"},{bg:"bg-zinc-100",text:"text-zinc-700",border:"border-zinc-300"},{bg:"bg-stone-100",text:"text-stone-700",border:"border-stone-300"}],Sv=10;function xfe(){const{selectedTeamId:e}=tl(),[t,r]=j.useState("ALL"),[n,i]=j.useState([]),[a,o]=j.useState(""),[s,l]=j.useState(0),{data:u}=qb(e||""),{data:c,isLoading:f}=gk(e||"",{page:s,pageSize:Sv,enabled:!!e}),d=(u==null?void 0:u.totalExperiments)||0,p=Math.ceil(d/Sv),y=j.useMemo(()=>{if(!c||c.length===0)return new Map;const v=new Set;c.forEach(S=>{var w;(w=S.labels)==null||w.forEach(O=>{v.add(O.name)})});const b=Array.from(v).sort(),x=new Map;return b.forEach((S,w)=>{x.set(S,wv[w%wv.length])}),x},[c]),m=j.useMemo(()=>{if(!c||c.length===0)return[];const v=new Map;c.forEach(x=>{var S;(S=x.labels)==null||S.forEach(w=>{v.has(w.name)||v.set(w.name,new Set),v.get(w.name).add(w.value)})});const b=[];return Array.from(v.entries()).sort(([x],[S])=>x.localeCompare(S)).forEach(([x,S])=>{b.push({value:`${x}:*`,label:`(Any ${x})`,group:x}),Array.from(S).sort().forEach(w=>{b.push({value:`${x}:${w}`,label:w,group:x})})}),b},[c]),g=j.useMemo(()=>{if(!c)return[];let v=[...c];if(a.trim()){const b=a.toLowerCase();v=v.filter(x=>{var S,w,O,P;return((S=x.name)==null?void 0:S.toLowerCase().includes(b))||((w=x.description)==null?void 0:w.toLowerCase().includes(b))||((O=x.id)==null?void 0:O.toLowerCase().includes(b))||((P=x.labels)==null?void 0:P.some(E=>E.name.toLowerCase().includes(b)||E.value.toLowerCase().includes(b)))})}return t!=="ALL"&&(v=v.filter(b=>b.status===t)),n.length>0&&(v=v.filter(b=>n.every(x=>{var O,P;const[S,w]=x.split(":",2);return w==="*"?(O=b.labels)==null?void 0:O.some(E=>E.name===S):(P=b.labels)==null?void 0:P.some(E=>E.name===S&&E.value===w)}))),v.sort((b,x)=>new Date(x.createdAt).getTime()-new Date(b.createdAt).getTime()),v},[c,t,n,a]);return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx($u,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(Xs,{placeholder:"Search experiments...",value:a,onChange:v=>o(v.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(yfe,{values:n,onChange:v=>i(v),options:m,className:"w-64",placeholder:"Filter by labels..."}),h.jsx(tw,{value:t,onChange:v=>r(v),options:bfe,className:"w-40"})]})]}),h.jsx(ge,{className:"border-0 shadow-sm",children:h.jsxs(be,{className:"p-0",children:[f?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!g||g.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:a.trim()||t!=="ALL"||n.length>0?"No experiments match your filters":"No experiments found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Wc,{children:[h.jsx(Hc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Name"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Labels"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Kc,{children:g.map((v,b)=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(zt,{className:"py-3 text-sm font-mono",children:h.jsx(Ga,{to:`/experiments/${v.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:v.id})}),h.jsx(zt,{className:"py-3 text-sm font-medium text-foreground",children:v.name}),h.jsx(zt,{className:"py-3 text-sm",children:v.labels&&v.labels.length>0?h.jsx("div",{className:"flex gap-1 flex-wrap",children:v.labels.map((x,S)=>{const w=y.get(x.name)||wv[0];return h.jsxs(lr,{variant:"outline",className:`text-xs px-2 py-0.5 font-normal ${w.bg} ${w.text} ${w.border}`,children:[x.name,": ",x.value]},S)})}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(zt,{className:"py-3",children:h.jsx(lr,{variant:gfe[v.status],children:v.status})}),h.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Qo(new Date(v.createdAt),{addSuffix:!0})})]},v.id))})]})}),g&&g.length>0&&h.jsx(rw,{currentPage:s,totalPages:p,pageSize:Sv,totalItems:d,onPageChange:l,itemName:"experiments"})]})})]})}function m2(e){const{data:t,...r}=lp(e),n=j.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const wfe="modulepreload",Sfe=function(e){return"/static/"+e},pE={},Ofe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=Sfe(l),l in pE)return;pE[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":wfe,u||(f.as="script"),f.crossOrigin="",f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),u)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function Pfe(e){const{data:t,...r}=lp(e),{runMetrics:n,availableMetrics:i}=j.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((c,f)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()).forEach(c=>{!c.key||c.value===null||(s.add(c.key),o.has(c.runId)||o.set(c.runId,new Map),o.get(c.runId).set(c.key,c.value))});const u=[];return o.forEach((c,f)=>{const d={};c.forEach((p,y)=>{d[y]=p}),u.push({runId:f,metrics:d})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function jfe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;aOfe(()=>import("./react-plotly-Bzb9-pG0.js").then(e=>e.r),[])),di=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],mE="#10b981",vE="#9ca3af",yE="#f59e0b";function _fe({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=j.useState(i[0]||""),[s,l]=j.useState("timeline"),[u,c]=j.useState([]),{runMetrics:f,availableMetrics:d}=Pfe(t),p=j.useMemo(()=>{const P=[];return Object.values(e).forEach(E=>{P.push(...E)}),P.length===0?null:P[0].runId},[e]),y=j.useMemo(()=>u.length===0?f:f.filter(P=>u.every(E=>P.metrics[E.key]!==void 0)),[f,u]),m=j.useMemo(()=>u.length<2||y.length<2?new Set:Efe(y,u),[y,u]),g=j.useMemo(()=>{var E;if(i.length===0||!a)return[];const P=[];return e[a]&&e[a].forEach((A,_)=>{A.value!==null&&P.push({timestamp:new Date(A.createdAt).getTime(),index:_,time:Hi(new Date(A.createdAt),"MMM dd HH:mm:ss"),value:A.value,runId:A.runId})}),P.sort((A,_)=>A.timestamp-_.timestamp),P.forEach((A,_)=>{A.index=_}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",P.length),console.log("[MetricsChart] All data points:",P),P},[e,i,a]),v=j.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const P=u[0],E=u[1],A=u.length>=3?u[2]:void 0,_=y.map(k=>({runId:k.runId,x:k.metrics[P.key],y:k.metrics[E.key],z:A?k.metrics[A.key]:void 0,isParetoOptimal:m.has(k.runId),metrics:k.metrics})),T=_.filter(k=>k.isParetoOptimal).sort((k,D)=>k.x-D.x);return{all:_,paretoLine:T}},[y,u,m]),b=j.useMemo(()=>{if(u.length!==3||v.all.length===0)return null;const P=[...v.paretoLine].sort((k,D)=>k.x!==D.x?k.x-D.x:k.y!==D.y?k.y-D.y:(k.z||0)-(D.z||0)),E=v.all.find(k=>k.runId===p),A=P.filter(k=>k.runId!==p),_=v.all.filter(k=>!k.isParetoOptimal&&k.runId!==p),T=[{x:_.map(k=>k.x),y:_.map(k=>k.y),z:_.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:vE,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:_.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:A.map(k=>k.x),y:A.map(k=>k.y),z:A.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:mE,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:A.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&T.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:yE,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),T},[v,u,p]),x=P=>{o(P)},S=P=>{u.length>=3||u.some(E=>E.key===P)||c([...u,{key:P,direction:"maximize"}])},w=P=>{c(u.filter(E=>E.key!==P))},O=P=>{c(u.map(E=>E.key===P?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?h.jsxs(ge,{children:[h.jsxs(Mr,{className:"pb-3",children:[h.jsx(Ir,{className:"text-sm",children:r}),n&&h.jsx(on,{className:"text-xs",children:n})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):h.jsxs(ge,{children:[h.jsxs(Mr,{className:"pb-3",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx(Ir,{className:"text-sm",children:r}),n&&h.jsx(on,{className:"text-xs",children:n})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>l("timeline"),className:`h-7 px-3 text-xs transition-colors ${s==="timeline"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Timeline"}),h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>l("pareto"),className:`h-7 px-3 text-xs transition-colors ${s==="pareto"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Pareto"})]})]}),s==="timeline"?h.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((P,E)=>h.jsx(lr,{variant:a===P?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===P?di[E%di.length]:void 0},onClick:()=>x(P),children:P},P))}):h.jsxs("div",{className:"space-y-2 pt-3",children:[h.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map((P,E)=>{const A=u.find(T=>T.key===P),_=(A==null?void 0:A.direction)==="maximize";return h.jsxs(lr,{variant:A?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:A?di[E%di.length]:void 0,borderColor:A?di[E%di.length]:void 0},onClick:()=>{A?O(P):u.length<3&&S(P)},onContextMenu:T=>{T.preventDefault(),A&&w(P)},children:[P,A&&h.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:_?"↑":"↓"})]},P)})}),u.length>0&&h.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),h.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?h.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?h.jsx("span",{children:"Select at least 2 metrics for analysis"}):h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsxs("span",{children:["Runs: ",y.length]}),m.size>0&&h.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),h.jsx(be,{className:"pt-0",children:s==="timeline"?a?h.jsx(Xi,{width:"100%",height:280,children:h.jsxs(nm,{data:g,margin:{top:5,right:20,left:10,bottom:5},onClick:P=>{if(P&&P.activePayload&&P.activePayload[0]){const E=P.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[h.jsx(Us,{strokeDasharray:"3 3"}),h.jsx(Zn,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:10}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:10}}),h.jsx(ei,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}},tick:{fontSize:10}}),h.jsx(jt,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:P,payload:E})=>{if(!P||!E||E.length===0)return null;const A=E[0].payload;return A.runId?h.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[h.jsxs("div",{style:{fontWeight:600,fontSize:"10px"},children:["Run: ",A.runId]}),h.jsxs("div",{style:{fontSize:"10px"},children:[a,": ",typeof A.value=="number"?A.value.toFixed(4):A.value]})]}):null}}),h.jsx(En,{type:"monotone",dataKey:"value",name:a,stroke:di[i.indexOf(a)%di.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):v.all.length===0?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?h.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[h.jsx("style",{children:` - #pareto-3d-plot .nsewdrag { - cursor: default !important; - } - #pareto-3d-plot .nsewdrag.cursor-crosshair { - cursor: default !important; - } - `}),h.jsx(j.Suspense,{fallback:h.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),h.jsx("div",{children:"Loading 3D visualization..."})]})}),children:h.jsx(Afe,{divId:"pareto-3d-plot",data:b,onInitialized:(P,E)=>{E.on("plotly_click",A=>{var _;if(A&&A.points&&A.points[0]){const k=(_=A.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},onUpdate:(P,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",A=>{var _;if(A&&A.points&&A.points[0]){const k=(_=A.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):h.jsx(Xi,{width:"100%",height:400,children:h.jsxs(sfe,{margin:{top:20,right:20,bottom:60,left:60},children:[h.jsx(Us,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),h.jsx(Zn,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(ei,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(jt,{cursor:{strokeDasharray:"3 3"},content:({active:P,payload:E})=>{var M,I;if(!P||!E||!E[0])return null;const A=E[0].payload,_=A.runId===p,T=A.isParetoOptimal,k=_?"#fef3c7":T?"#f0fdf4":"#fafafa",D=_?"#fcd34d":T?"#86efac":"#d1d5db";return h.jsxs("div",{style:{backgroundColor:k,border:`1px solid ${D}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"10px"},children:[h.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",A.runId,_?" (StartPoint)":""]}),h.jsxs("div",{children:[u[0].key,": ",(M=A.x)==null?void 0:M.toFixed(4)]}),h.jsxs("div",{children:[u[1].key,": ",(I=A.y)==null?void 0:I.toFixed(4)]})]})}}),h.jsx(za,{name:"Dominated",data:v.all.filter(P=>!P.isParetoOptimal&&P.runId!==p),fill:vE,fillOpacity:.4,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),h.jsx(za,{name:"Pareto",data:v.all.filter(P=>P.isParetoOptimal&&P.runId!==p),fill:mE,fillOpacity:.95,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),p&&h.jsx(za,{name:"Start",data:v.all.filter(P=>P.runId===p),fill:yE,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")})]})})})]})}const nw=j.createContext(void 0),im=j.forwardRef(({className:e,value:t,onValueChange:r,...n},i)=>h.jsx(nw.Provider,{value:{value:t,onValueChange:r},children:h.jsx("div",{ref:i,className:fe("w-full",e),...n})}));im.displayName="Tabs";const am=j.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));am.displayName="TabsList";const to=j.forwardRef(({className:e,value:t,...r},n)=>{const i=j.useContext(nw);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return h.jsx("button",{ref:n,className:fe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});to.displayName="TabsTrigger";const ro=j.forwardRef(({className:e,value:t,...r},n)=>{const i=j.useContext(nw);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:h.jsx("div",{ref:n,className:fe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});ro.displayName="TabsContent";const gE={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Tfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Ov=10;function kfe(){var w;const{id:e}=ST(),[t,r]=j.useState("overview"),[n,i]=j.useState(0),[a,o]=j.useState(""),[s,l]=j.useState("ALL"),{data:u,isLoading:c,error:f}=lp(e),{data:d,isLoading:p}=Qy(e,{page:n,pageSize:Ov}),{data:y}=Qy(e,{page:0,pageSize:1e3}),m=(y==null?void 0:y.length)||0,g=Math.ceil(m/Ov),{data:v,isLoading:b}=m2(e),x=j.useMemo(()=>{if(!d)return[];let O=[...d];if(a.trim()){const P=a.toLowerCase();O=O.filter(E=>{var A;return(A=E.id)==null?void 0:A.toLowerCase().includes(P)})}return s!=="ALL"&&(O=O.filter(P=>P.status===s)),O.sort((P,E)=>new Date(E.createdAt).getTime()-new Date(P.createdAt).getTime()),O},[d,a,s]),S=j.useMemo(()=>!y||y.length===0?[]:[{name:"COMPLETED",value:y.filter(P=>P.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:y.filter(P=>P.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:y.filter(P=>P.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:y.filter(P=>P.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:y.filter(P=>P.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:y.filter(P=>P.status==="UNKNOWN").length,color:"#a78bfa"}].filter(P=>P.value>0),[y]);return c?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):f||!u?h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Error"}),h.jsx(on,{children:"Failed to load experiment"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Experiment not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),h.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),h.jsx(lr,{variant:gE[u.status],children:u.status})]}),h.jsxs(im,{value:t,onValueChange:r,children:[h.jsxs(am,{children:[h.jsx(to,{value:"overview",children:"Overview"}),h.jsx(to,{value:"runs",children:"Runs"})]}),h.jsxs(ro,{value:"overview",className:"space-y-4",children:[h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=u.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&u.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(u.aggregatedTokens.totalTokens).toLocaleString(),u.aggregatedTokens.inputTokens!==void 0&&u.aggregatedTokens.outputTokens!==void 0&&h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.aggregatedTokens.inputTokens).toLocaleString(),"↓ ",Number(u.aggregatedTokens.outputTokens).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Qo(new Date(u.createdAt),{addSuffix:!0})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Qo(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),u.params&&Object.keys(u.params).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),y&&y.length>0&&S.length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",y.length," runs)"]}),h.jsx(Xi,{width:"100%",height:180,children:h.jsxs(ew,{margin:{top:20,bottom:5},children:[h.jsx(cn,{data:S,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:O,value:P})=>`${O}: ${P}`,style:{fontSize:"10px"},children:S.map((O,P)=>h.jsx(co,{fill:O.color},`cell-${P}`))}),h.jsx(jt,{contentStyle:{fontSize:"10px",backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px"}}),h.jsx(Dr,{wrapperStyle:{fontSize:"10px"}})]})})]})]})}),b?h.jsx(Ve,{className:"h-80 w-full"}):v&&Object.keys(v).length>0?h.jsx(_fe,{metrics:v,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):h.jsxs(ge,{children:[h.jsxs(Mr,{className:"pb-3",children:[h.jsx(Ir,{className:"text-sm",children:"Metrics"}),h.jsx(on,{className:"text-xs",children:"No metrics data available"})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:y&&y.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),h.jsx(ro,{value:"runs",className:"space-y-4",children:h.jsx(ge,{children:h.jsxs(be,{className:"p-0",children:[h.jsxs("div",{className:"flex gap-2 mb-3 items-center px-4 pt-4",children:[h.jsxs("div",{className:"relative w-64",children:[h.jsx($u,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(Xs,{placeholder:"Search runs...",value:a,onChange:O=>o(O.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(tw,{value:s,onChange:O=>l(O),options:Tfe,className:"w-40"})]}),p?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!d||d.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):x.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Wc,{children:[h.jsx(Hc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Kc,{children:x.map(O=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(zt,{className:"py-3 text-sm font-mono",children:h.jsx(Ga,{to:`/runs/${O.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:O.id})}),h.jsx(zt,{className:"py-3",children:h.jsx(lr,{variant:gE[O.status],children:O.status})}),h.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Qo(new Date(O.createdAt),{addSuffix:!0})})]},O.id))})]})}),!p&&x&&x.length>0&&h.jsx(rw,{currentPage:n,totalPages:g,pageSize:Ov,totalItems:m,onPageChange:i,itemName:"runs"})]})})})]})]})}function Nfe({experiments:e}){const t=j.useMemo(()=>{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Parameter Comparison"}),h.jsx(on,{children:"Side-by-side comparison of experiment parameters"})]}),h.jsx(be,{children:t.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):h.jsxs(Wc,{children:[h.jsx(Hc,{children:h.jsxs(ti,{children:[h.jsx(Bt,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>h.jsx(Bt,{className:"font-semibold",children:r.name},r.id))]})}),h.jsx(Kc,{children:t.map(r=>h.jsxs(ti,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[h.jsx(zt,{className:"font-medium",children:r.key}),r.values.map((n,i)=>h.jsx(zt,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const bE=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function Cfe({experimentIds:e}){const t=e.map(a=>m2(a)),r=t.some(a=>a.isLoading),n=j.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,c])=>{c.forEach(f=>{const d=f.createdAt,p=`exp${s+1}_${u}`;a.has(d)||a.set(d,{timestamp:d,time:Hi(new Date(d),"HH:mm:ss")});const y=a.get(d);y[p]=f.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=j.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?h.jsxs(ge,{children:[h.jsx(Mr,{children:h.jsx(Ir,{children:"Metrics Overlay"})}),h.jsx(be,{children:h.jsx(Ve,{className:"h-96 w-full"})})]}):n.length===0?h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Metrics Overlay"}),h.jsx(on,{children:"Combined metrics visualization across experiments"})]}),h.jsx(be,{children:h.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Metrics Overlay"}),h.jsx(on,{children:"Combined metrics from all selected experiments"})]}),h.jsx(be,{children:h.jsx(Xi,{width:"100%",height:400,children:h.jsxs(nm,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[h.jsx(Us,{strokeDasharray:"3 3"}),h.jsx(Zn,{dataKey:"time",tick:{fontSize:10},label:{value:"Time",position:"insideBottom",offset:-5,style:{fontSize:10}}}),h.jsx(ei,{tick:{fontSize:10},label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}}}),h.jsx(jt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem",fontSize:"10px"}}),h.jsx(Dr,{wrapperStyle:{fontSize:"10px"}}),i.map((a,o)=>h.jsx(En,{type:"monotone",dataKey:a,stroke:bE[o%bE.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const $fe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function Mfe(){var i;const[e]=gL(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=$5(t);return n?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):!r||r.length<2?h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Experiment Comparison"}),h.jsx(on,{children:"Select at least 2 experiments to compare"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),h.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),h.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsx(Ir,{className:"text-lg",children:a.name}),h.jsx(lr,{variant:$fe[a.status],children:a.status})]}),a.description&&h.jsx(on,{children:a.description})]}),h.jsx(be,{children:h.jsxs("dl",{className:"space-y-2 text-sm",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Params"}),h.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),h.jsx(Nfe,{experiments:r}),h.jsx(Cfe,{experimentIds:t})]})}const Ife={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Dfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Pv=10;function Rfe(){var v;const{selectedTeamId:e}=tl(),[t,r]=j.useState("ALL"),[n,i]=j.useState(""),[a,o]=j.useState(0),{data:s}=qb(e||""),{data:l,isLoading:u}=gk(e||"",{page:0,pageSize:1e3,enabled:!!e}),c=((v=l==null?void 0:l[0])==null?void 0:v.id)||"",{data:f,isLoading:d}=Qy(c,{page:a,pageSize:Pv,enabled:!!c}),p=(s==null?void 0:s.totalRuns)||0,y=Math.ceil(p/Pv),m=j.useMemo(()=>{if(!f)return[];let b=[...f];if(n.trim()){const x=n.toLowerCase();b=b.filter(S=>{var w,O;return((w=S.id)==null?void 0:w.toLowerCase().includes(x))||((O=S.experimentId)==null?void 0:O.toLowerCase().includes(x))})}return t!=="ALL"&&(b=b.filter(x=>x.status===t)),b.sort((x,S)=>new Date(S.createdAt).getTime()-new Date(x.createdAt).getTime()),b},[f,t,n]),g=u||d;return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Runs"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx($u,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(Xs,{placeholder:"Search runs...",value:n,onChange:b=>i(b.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(tw,{value:t,onChange:b=>r(b),options:Dfe,className:"w-40"})]})]}),h.jsx(ge,{className:"border-0 shadow-sm",children:h.jsxs(be,{className:"p-0",children:[g?h.jsx("div",{className:"p-8",children:h.jsx(Ve,{className:"h-24 w-full"})}):!m||m.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Wc,{children:[h.jsx(Hc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Experiment ID"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Kc,{children:m.map(b=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(zt,{className:"py-3 text-sm font-mono",children:h.jsx(Ga,{to:`/runs/${b.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.id})}),h.jsx(zt,{className:"py-3 text-sm font-mono",children:h.jsx(Ga,{to:`/experiments/${b.experimentId}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.experimentId})}),h.jsx(zt,{className:"py-3",children:h.jsx(lr,{variant:Ife[b.status],children:b.status})}),h.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Qo(new Date(b.createdAt),{addSuffix:!0})})]},b.id))})]})}),m&&m.length>0&&h.jsx(rw,{currentPage:a,totalPages:y,pageSize:Pv,totalItems:p,onPageChange:o,itemName:"runs"})]})})]})}async function Lfe(){try{return(await Vt(sr.listArtifactRepositories)).artifactRepos.map(t=>t.name)}catch(e){throw new Error(`Failed to list repositories: ${e instanceof Error?e.message:"Unknown error"}`)}}async function Ffe(e,t){try{return(await Vt(sr.listArtifactTags,{team_id:e,repo_name:t})).artifactTags.map(n=>n.name)}catch(r){throw new Error(`Failed to list tags for repository ${t}: ${r instanceof Error?r.message:"Unknown error"}`)}}async function Bfe(e,t,r){try{return(await Vt(sr.getArtifactContent,{team_id:e,tag:t,repo_name:r})).artifactContent}catch(n){throw new Error(`Failed to get artifact content: ${n instanceof Error?n.message:"Unknown error"}`)}}function zfe(){return wr({queryKey:["artifacts","repositories"],queryFn:Lfe,staleTime:30*60*1e3})}function Ufe(e,t){return wr({queryKey:["artifacts","tags",e,t],queryFn:()=>Ffe(e,t),enabled:!!(e&&t),staleTime:10*60*1e3})}function v2(e,t,r,n=!0){return wr({queryKey:["artifacts","content",e,t,r],queryFn:()=>Bfe(e,t,r),enabled:!!(n&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}const xE={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},wE=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:h.jsx(aF,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:h.jsx(AF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:h.jsx(Wb,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:h.jsx(OF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:h.jsx(FF,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:h.jsx(Yy,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function Wfe({spans:e}){const[t,r]=j.useState(()=>new Set(e.filter(g=>!g.parentSpanId||g.parentSpanId==="").map(g=>g.spanId))),[n,i]=j.useState(null),a=()=>{const g=new Set(e.map(v=>v.spanId));r(g)},o=()=>{r(new Set)},s=j.useMemo(()=>{if(!e||e.length===0)return[];const g=new Map,v=[];e.forEach(S=>{g.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=g.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")v.push(w);else{const O=g.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):v.push(w)}});const b=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>b(w.children))},x=S=>{var T,k,D;S.children.forEach(M=>x(M));const w=parseInt((T=S.span.spanAttributes)==null?void 0:T["gen_ai.usage.input_tokens"])||0,O=parseInt((k=S.span.spanAttributes)==null?void 0:k["gen_ai.usage.output_tokens"])||0,P=parseInt((D=S.span.spanAttributes)==null?void 0:D["llm.usage.total_tokens"])||0,E=S.children.reduce((M,I)=>M+(I.inputTokens||0),0),A=S.children.reduce((M,I)=>M+(I.outputTokens||0),0),_=S.children.reduce((M,I)=>M+(I.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+A,S.totalTokens=P+_};return b(v),v.forEach(S=>x(S)),v},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:c}=j.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const g=e.map(w=>new Date(w.timestamp).getTime()),v=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),b=Math.min(...g),x=Math.max(...v),S=x-b;return{minTimestamp:b,maxTimestamp:x,totalDuration:S||1}},[e]),f=g=>{r(v=>{const b=new Set(v);return b.has(g)?b.delete(g):b.add(g),b})},d=g=>{const v=g/1e3,b=v/1e3,x=b/1e3;return x>=1?`${x.toFixed(2)}s`:b>=1?`${b.toFixed(2)}ms`:`${v.toFixed(2)}μs`},p=g=>{const{span:v}=g,b=new Date(v.timestamp).getTime(),x=b+v.duration/1e6,S=(b-l)/c*100,w=(x-b)/c*100,O=xE[v.statusCode]||xE.UNSET;return h.jsx("div",{className:`${O} absolute h-6 rounded flex items-center px-1.5 text-white text-[10px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${v.spanName} -Duration: ${d(v.duration)} -Status: ${v.statusCode} -Kind: ${v.spanKind}`,children:h.jsx("span",{className:"truncate",children:d(v.duration)})})},y=g=>{const{span:v,children:b,depth:x,totalTokens:S,inputTokens:w,outputTokens:O}=g,P=b.length>0,E=t.has(v.spanId),A=wE(v),_=P&&S&&S>0;return h.jsxs("div",{children:[h.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer h-10 ${(n==null?void 0:n.spanId)===v.spanId?"bg-accent":""}`,onClick:T=>{T.target.closest("button")||i(v)},children:[h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 h-full min-w-0",style:{width:"320px",paddingLeft:`${x*10+8}px`,paddingRight:"8px"},children:[x>0&&h.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(x-1)*10+8}px`}}),P?h.jsx("button",{onClick:()=>f(v.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?h.jsx(sp,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"}):h.jsx(Ub,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})}):h.jsx("div",{className:"w-[18px] flex-shrink-0"}),h.jsxs(lr,{variant:"outline",className:`${A.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px] font-medium flex-shrink-0`,children:[A.icon,h.jsx("span",{children:A.label})]}),h.jsx("span",{className:"text-[13px] font-medium truncate text-foreground",title:v.spanName,children:v.spanName})]}),h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:[h.jsx(Yy,{className:"h-3 w-3 flex-shrink-0 text-muted-foreground"}),h.jsx("span",{className:"text-[11px] font-mono",children:d(v.duration)})]}),h.jsx("div",{className:"flex-shrink-0 flex items-center whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:S&&S>0?h.jsxs("div",{className:"flex flex-col justify-center",children:[h.jsxs("div",{className:"font-mono flex items-center text-[11px] leading-tight",children:[_&&h.jsx("span",{className:"inline-block align-middle mr-0.5 text-muted-foreground text-[10px]",children:"∑"}),h.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&h.jsxs("div",{className:"text-muted-foreground text-[9px] font-mono leading-tight mt-0.5",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):h.jsx("span",{className:"text-muted-foreground/40 text-[11px]",children:"—"})}),h.jsx("div",{className:"flex-1 relative h-full min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"8px"},children:p(g)})]}),P&&E&&h.jsx("div",{children:b.map(T=>y(T))})]},v.spanId)};if(!e||e.length===0)return h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=g=>{const v=wE(g),b=g.spanAttributes||{},x=b["gen_ai.request.model"]||b["gen_ai.response.model"],S=b["gen_ai.request.temperature"],w=b["gen_ai.request.max_tokens"],O=b["gen_ai.request.top_p"],P=[];let E=0;for(;b[`gen_ai.prompt.${E}.role`];)P.push({role:b[`gen_ai.prompt.${E}.role`],content:b[`gen_ai.prompt.${E}.content`]}),E++;const A=[];for(E=0;b[`gen_ai.completion.${E}.role`];)A.push({role:b[`gen_ai.completion.${E}.role`],content:b[`gen_ai.completion.${E}.content`],finishReason:b[`gen_ai.completion.${E}.finish_reason`]}),E++;return h.jsx(ge,{className:"mt-2 border-2",children:h.jsxs(be,{className:"p-3",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsxs(lr,{variant:"outline",className:`${v.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px]`,children:[v.icon,v.label]}),h.jsx("h4",{className:"font-semibold text-[13px]",children:g.spanName})]}),h.jsx(Fr,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:h.jsx(_d,{className:"h-3 w-3"})})]}),x&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Model Configuration"}),h.jsxs("div",{className:"grid grid-cols-2 gap-1.5 text-[10px] border rounded-md p-2 bg-muted/30",children:[h.jsxs("div",{className:"col-span-2",children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:x})]}),S!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:S})]}),w&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:w})]}),O!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:O})]})]})]}),P.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Input"}),h.jsx("div",{className:"space-y-1.5",children:P.map((_,T)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),A.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Output"}),h.jsx("div",{className:"space-y-1.5",children:A.map((_,T)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),h.jsxs("details",{className:"mt-2",children:[h.jsxs("summary",{className:"text-[11px] font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-0.5 uppercase tracking-wide",children:["All Attributes (",Object.keys(b).length,")"]}),h.jsx("div",{className:"mt-1.5 text-[11px] space-y-0.5 bg-muted/30 rounded-md p-2 max-h-48 overflow-auto border",children:Object.entries(b).map(([_,T])=>h.jsxs("div",{className:"grid grid-cols-3 gap-2 py-0.5",children:[h.jsxs("span",{className:"text-muted-foreground truncate font-medium text-[10px]",title:_,children:[_,":"]}),h.jsx("span",{className:"col-span-2 font-mono break-all text-[10px] text-foreground",children:String(T)})]},_))})]})]})})};return h.jsx(ge,{className:"shadow-sm",children:h.jsxs(be,{className:"p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Yy,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),h.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[d(c*1e6)," · ",e.length," span",e.length!==1?"s":""]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("button",{onClick:a,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Expand all"}),h.jsx("span",{className:"text-muted-foreground/30 text-xs",children:"|"}),h.jsx("button",{onClick:o,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Collapse all"})]})]}),h.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),h.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[h.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[10px] text-foreground uppercase tracking-wide h-8",children:[h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"320px",paddingLeft:"8px",paddingRight:"8px"},children:"Span Name"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:"Duration"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:"Tokens"}),h.jsx("div",{className:"flex-1 flex items-center h-full",style:{paddingLeft:"2px",paddingRight:"8px"},children:"Timeline"})]}),s.map(g=>y(g))]}),n&&h.jsx("div",{className:"mt-2",children:m(n)})]})})}function qi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function SE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function y2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=SE(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=j.useMemo(()=>s,Object.values(s));return h.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=j.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Kfe(e,t=[]){let r=[];function n(a,o){const s=j.createContext(o),l=r.length;r=[...r,o];const u=f=>{var v;const{scope:d,children:p,...y}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[l])||s,g=j.useMemo(()=>y,Object.values(y));return h.jsx(m.Provider,{value:g,children:p})};u.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,y=j.useContext(p);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>j.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,qfe(i,...t)]}function qfe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var vc=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},Vfe=L0[" useId ".trim().toString()]||(()=>{}),Gfe=0;function jv(e){const[t,r]=j.useState(Vfe());return vc(()=>{r(n=>n??String(Gfe++))},[e]),e||(t?`radix-${t}`:"")}var Yfe=L0[" useInsertionEffect ".trim().toString()]||vc;function Xfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Qfe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const c=j.useRef(e!==void 0);j.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=j.useCallback(c=>{var f;if(s){const d=Jfe(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else a(c)},[s,e,a,o]);return[l,u]}function Qfe({defaultProp:e,onChange:t}){const[r,n]=j.useState(e),i=j.useRef(r),a=j.useRef(t);return Yfe(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Jfe(e){return typeof e=="function"}function g2(e){const t=Zfe(e),r=j.forwardRef((n,i)=>{const{children:a,...o}=n,s=j.Children.toArray(a),l=s.find(tde);if(l){const u=l.props.children,c=s.map(f=>f===l?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return h.jsx(t,{...o,ref:i,children:j.isValidElement(u)?j.cloneElement(u,void 0,c):null})}return h.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Zfe(e){const t=j.forwardRef((r,n)=>{const{children:i,...a}=r;if(j.isValidElement(i)){const o=nde(i),s=rde(a,i.props);return i.type!==j.Fragment&&(s.ref=n?y2(n,o):o),j.cloneElement(i,s)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ede=Symbol("radix.slottable");function tde(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ede}function rde(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function nde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ide=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],si=ide.reduce((e,t)=>{const r=g2(`Primitive.${t}`),n=j.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ade(e,t){e&&Tb.flushSync(()=>e.dispatchEvent(t))}function yc(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ode(e,t=globalThis==null?void 0:globalThis.document){const r=yc(e);j.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var sde="DismissableLayer",N0="dismissableLayer.update",lde="dismissableLayer.pointerDownOutside",ude="dismissableLayer.focusOutside",OE,b2=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),x2=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=j.useContext(b2),[c,f]=j.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=j.useState({}),y=mo(t,P=>f(P)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),b=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,w=dde(P=>{const E=P.target,A=[...u.branches].some(_=>_.contains(E));!S||A||(i==null||i(P),o==null||o(P),P.defaultPrevented||s==null||s())},d),O=hde(P=>{const E=P.target;[...u.branches].some(_=>_.contains(E))||(a==null||a(P),o==null||o(P),P.defaultPrevented||s==null||s())},d);return ode(P=>{b===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),j.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(OE=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),PE(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=OE)}},[c,d,r,u]),j.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),PE())},[c,u]),j.useEffect(()=>{const P=()=>p({});return document.addEventListener(N0,P),()=>document.removeEventListener(N0,P)},[]),h.jsx(si.div,{...l,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:qi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:qi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:qi(e.onPointerDownCapture,w.onPointerDownCapture)})});x2.displayName=sde;var cde="DismissableLayerBranch",fde=j.forwardRef((e,t)=>{const r=j.useContext(b2),n=j.useRef(null),i=mo(t,n);return j.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),h.jsx(si.div,{...e,ref:i})});fde.displayName=cde;function dde(e,t=globalThis==null?void 0:globalThis.document){const r=yc(e),n=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){w2(lde,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function hde(e,t=globalThis==null?void 0:globalThis.document){const r=yc(e),n=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!n.current&&w2(ude,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function PE(){const e=new CustomEvent(N0);document.dispatchEvent(e)}function w2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ade(i,a):i.dispatchEvent(a)}var Ev="focusScope.autoFocusOnMount",Av="focusScope.autoFocusOnUnmount",jE={bubbles:!1,cancelable:!0},pde="FocusScope",S2=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=j.useState(null),u=yc(i),c=yc(a),f=j.useRef(null),d=mo(t,m=>l(m)),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(n){let m=function(x){if(p.paused||!s)return;const S=x.target;s.contains(S)?f.current=S:pi(f.current,{select:!0})},g=function(x){if(p.paused||!s)return;const S=x.relatedTarget;S!==null&&(s.contains(S)||pi(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&pi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,s,p.paused]),j.useEffect(()=>{if(s){AE.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(Ev,jE);s.addEventListener(Ev,u),s.dispatchEvent(v),v.defaultPrevented||(mde(xde(O2(s)),{select:!0}),document.activeElement===m&&pi(s))}return()=>{s.removeEventListener(Ev,u),setTimeout(()=>{const v=new CustomEvent(Av,jE);s.addEventListener(Av,c),s.dispatchEvent(v),v.defaultPrevented||pi(m??document.body,{select:!0}),s.removeEventListener(Av,c),AE.remove(p)},0)}}},[s,u,c,p]);const y=j.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){const b=m.currentTarget,[x,S]=vde(b);x&&S?!m.shiftKey&&v===S?(m.preventDefault(),r&&pi(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),r&&pi(S,{select:!0})):v===b&&m.preventDefault()}},[r,n,p.paused]);return h.jsx(si.div,{tabIndex:-1,...o,ref:d,onKeyDown:y})});S2.displayName=pde;function mde(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pi(n,{select:t}),document.activeElement!==r)return}function vde(e){const t=O2(e),r=EE(t,e),n=EE(t.reverse(),e);return[r,n]}function O2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function EE(e,t){for(const r of e)if(!yde(r,{upTo:t}))return r}function yde(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 gde(e){return e instanceof HTMLInputElement&&"select"in e}function pi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&gde(e)&&t&&e.select()}}var AE=bde();function bde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=_E(e,t),e.unshift(t)},remove(t){var r;e=_E(e,t),(r=e[0])==null||r.resume()}}}function _E(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function xde(e){return e.filter(t=>t.tagName!=="A")}var wde="Portal",P2=j.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=j.useState(!1);vc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?kD.createPortal(h.jsx(si.div,{...n,ref:t}),o):null});P2.displayName=wde;function Sde(e,t){return j.useReducer((r,n)=>t[r][n]??r,e)}var om=e=>{const{present:t,children:r}=e,n=Ode(t),i=typeof r=="function"?r({present:n.isPresent}):j.Children.only(r),a=mo(n.ref,Pde(i));return typeof r=="function"||n.isPresent?j.cloneElement(i,{ref:a}):null};om.displayName="Presence";function Ode(e){const[t,r]=j.useState(),n=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[s,l]=Sde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const u=Nf(n.current);a.current=s==="mounted"?u:"none"},[s]),vc(()=>{const u=n.current,c=i.current;if(c!==e){const d=a.current,p=Nf(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),vc(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=p=>{const m=Nf(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=p=>{p.target===t&&(a.current=Nf(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:j.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Nf(e){return(e==null?void 0:e.animationName)||"none"}function Pde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _v=0;function jde(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??TE()),document.body.insertAdjacentElement("beforeend",e[1]??TE()),_v++,()=>{_v===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_v--}},[])}function TE(){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 bn=function(){return bn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Ude;var t=Wde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Kde=_2(),ts="data-scroll-locked",qde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(Ade,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body[`).concat(ts,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Zf,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(ed,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(Zf," .").concat(Zf,` { - right: 0 `).concat(n,`; - } - - .`).concat(ed," .").concat(ed,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(ts,`] { - `).concat(_de,": ").concat(s,`px; - } -`)},NE=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},Vde=function(){j.useEffect(function(){return document.body.setAttribute(ts,(NE()+1).toString()),function(){var e=NE()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},Gde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Vde();var a=j.useMemo(function(){return Hde(i)},[i]);return j.createElement(Kde,{styles:qde(a,!t,i,r?"":"!important")})},C0=!1;if(typeof window<"u")try{var Cf=Object.defineProperty({},"passive",{get:function(){return C0=!0,!0}});window.addEventListener("test",Cf,Cf),window.removeEventListener("test",Cf,Cf)}catch{C0=!1}var Po=C0?{passive:!1}:!1,Yde=function(e){return e.tagName==="TEXTAREA"},T2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yde(e)&&r[t]==="visible")},Xde=function(e){return T2(e,"overflowY")},Qde=function(e){return T2(e,"overflowX")},CE=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=k2(e,n);if(i){var a=N2(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Jde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Zde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},k2=function(e,t){return e==="v"?Xde(t):Qde(t)},N2=function(e,t){return e==="v"?Jde(t):Zde(t)},ehe=function(e,t){return e==="h"&&t==="rtl"?-1:1},the=function(e,t,r,n,i){var a=ehe(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,d=0;do{if(!s)break;var p=N2(e,s),y=p[0],m=p[1],g=p[2],v=m-g-a*y;(y||v)&&k2(e,s)&&(f+=v,d+=y);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(d)<1)&&(u=!0),u},$f=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$E=function(e){return[e.deltaX,e.deltaY]},ME=function(e){return e&&"current"in e?e.current:e},rhe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nhe=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},ihe=0,jo=[];function ahe(e){var t=j.useRef([]),r=j.useRef([0,0]),n=j.useRef(),i=j.useState(ihe++)[0],a=j.useState(_2)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Ede([e.lockRef.current],(e.shards||[]).map(ME),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=$f(m),b=r.current,x="deltaX"in m?m.deltaX:b[0]-v[0],S="deltaY"in m?m.deltaY:b[1]-v[1],w,O=m.target,P=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&P==="h"&&O.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,_=A?A===O||A.contains(O):!1;if(_)return!1;var T=CE(P,O);if(!T)return!0;if(T?w=P:(w=P==="v"?"h":"v",T=CE(P,O)),!T)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=w),!w)return!0;var k=n.current||w;return the(k,g,m,k==="h"?x:S)},[]),l=j.useCallback(function(m){var g=m;if(!(!jo.length||jo[jo.length-1]!==a)){var v="deltaY"in g?$E(g):$f(g),b=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&rhe(w.delta,v)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(ME).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=x.length>0?s(g,x[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=j.useCallback(function(m,g,v,b){var x={name:m,delta:g,target:v,should:b,shadowParent:ohe(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=j.useCallback(function(m){r.current=$f(m),n.current=void 0},[]),f=j.useCallback(function(m){u(m.type,$E(m),m.target,s(m,e.lockRef.current))},[]),d=j.useCallback(function(m){u(m.type,$f(m),m.target,s(m,e.lockRef.current))},[]);j.useEffect(function(){return jo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Po),document.addEventListener("touchmove",l,Po),document.addEventListener("touchstart",c,Po),function(){jo=jo.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Po),document.removeEventListener("touchmove",l,Po),document.removeEventListener("touchstart",c,Po)}},[]);var p=e.removeScrollBar,y=e.inert;return j.createElement(j.Fragment,null,y?j.createElement(a,{styles:nhe(i)}):null,p?j.createElement(Gde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ohe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const she=Ide(A2,ahe);var C2=j.forwardRef(function(e,t){return j.createElement(sm,bn({},e,{ref:t,sideCar:she}))});C2.classNames=sm.classNames;var lhe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Eo=new WeakMap,Mf=new WeakMap,If={},Cv=0,$2=function(e){return e&&(e.host||$2(e.parentNode))},uhe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=$2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},che=function(e,t,r,n){var i=uhe(t,Array.isArray(e)?e:[e]);If[r]||(If[r]=new WeakMap);var a=If[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var p=d.getAttribute(n),y=p!==null&&p!=="false",m=(Eo.get(d)||0)+1,g=(a.get(d)||0)+1;Eo.set(d,m),a.set(d,g),o.push(d),m===1&&y&&Mf.set(d,!0),g===1&&d.setAttribute(r,"true"),y||d.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",d,v)}})};return c(t),s.clear(),Cv++,function(){o.forEach(function(f){var d=Eo.get(f)-1,p=a.get(f)-1;Eo.set(f,d),a.set(f,p),d||(Mf.has(f)||f.removeAttribute(n),Mf.delete(f)),p||f.removeAttribute(r)}),Cv--,Cv||(Eo=new WeakMap,Eo=new WeakMap,Mf=new WeakMap,If={})}},fhe=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=lhe(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),che(n,i,r,"aria-hidden")):function(){return null}},lm="Dialog",[M2]=Kfe(lm),[dhe,fn]=M2(lm),I2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),l=j.useRef(null),[u,c]=Xfe({prop:n,defaultProp:i??!1,onChange:a,caller:lm});return h.jsx(dhe,{scope:t,triggerRef:s,contentRef:l,contentId:jv(),titleId:jv(),descriptionId:jv(),open:u,onOpenChange:c,onOpenToggle:j.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};I2.displayName=lm;var D2="DialogTrigger",hhe=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=fn(D2,r),a=mo(t,i.triggerRef);return h.jsx(si.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ow(i.open),...n,ref:a,onClick:qi(e.onClick,i.onOpenToggle)})});hhe.displayName=D2;var iw="DialogPortal",[phe,R2]=M2(iw,{forceMount:void 0}),L2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=fn(iw,t);return h.jsx(phe,{scope:t,forceMount:r,children:j.Children.map(n,o=>h.jsx(om,{present:r||a.open,children:h.jsx(P2,{asChild:!0,container:i,children:o})}))})};L2.displayName=iw;var Lh="DialogOverlay",F2=j.forwardRef((e,t)=>{const r=R2(Lh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=fn(Lh,e.__scopeDialog);return a.modal?h.jsx(om,{present:n||a.open,children:h.jsx(vhe,{...i,ref:t})}):null});F2.displayName=Lh;var mhe=g2("DialogOverlay.RemoveScroll"),vhe=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=fn(Lh,r);return h.jsx(C2,{as:mhe,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(si.div,{"data-state":ow(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),no="DialogContent",B2=j.forwardRef((e,t)=>{const r=R2(no,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=fn(no,e.__scopeDialog);return h.jsx(om,{present:n||a.open,children:a.modal?h.jsx(yhe,{...i,ref:t}):h.jsx(ghe,{...i,ref:t})})});B2.displayName=no;var yhe=j.forwardRef((e,t)=>{const r=fn(no,e.__scopeDialog),n=j.useRef(null),i=mo(t,r.contentRef,n);return j.useEffect(()=>{const a=n.current;if(a)return fhe(a)},[]),h.jsx(z2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:qi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:qi(e.onFocusOutside,a=>a.preventDefault())})}),ghe=j.forwardRef((e,t)=>{const r=fn(no,e.__scopeDialog),n=j.useRef(!1),i=j.useRef(!1);return h.jsx(z2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),z2=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fn(no,r),l=j.useRef(null),u=mo(t,l);return jde(),h.jsxs(h.Fragment,{children:[h.jsx(S2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:h.jsx(x2,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ow(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(bhe,{titleId:s.titleId}),h.jsx(whe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),aw="DialogTitle",U2=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=fn(aw,r);return h.jsx(si.h2,{id:i.titleId,...n,ref:t})});U2.displayName=aw;var W2="DialogDescription",H2=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=fn(W2,r);return h.jsx(si.p,{id:i.descriptionId,...n,ref:t})});H2.displayName=W2;var K2="DialogClose",q2=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=fn(K2,r);return h.jsx(si.button,{type:"button",...n,ref:t,onClick:qi(e.onClick,()=>i.onOpenChange(!1))})});q2.displayName=K2;function ow(e){return e?"open":"closed"}var V2="DialogTitleWarning",[Qhe,G2]=Hfe(V2,{contentName:no,titleName:aw,docsSlug:"dialog"}),bhe=({titleId:e})=>{const t=G2(V2),r=`\`${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 j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},xhe="DialogDescriptionWarning",whe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G2(xhe).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},She=I2,Ohe=L2,Y2=F2,X2=B2,Q2=U2,J2=H2,Phe=q2;const jhe=She,Ehe=Ohe,Z2=j.forwardRef(({className:e,...t},r)=>h.jsx(Y2,{ref:r,className:fe("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",e),...t}));Z2.displayName=Y2.displayName;const eM=j.forwardRef(({className:e,children:t,hideCloseButton:r=!1,...n},i)=>h.jsxs(Ehe,{children:[h.jsx(Z2,{}),h.jsxs(X2,{ref:i,className:fe("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",e),...n,children:[t,!r&&h.jsxs(Phe,{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:[h.jsx(_d,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));eM.displayName=X2.displayName;const tM=({className:e,...t})=>h.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tM.displayName="DialogHeader";const rM=j.forwardRef(({className:e,...t},r)=>h.jsx(Q2,{ref:r,className:fe("text-lg font-semibold leading-none tracking-tight",e),...t}));rM.displayName=Q2.displayName;const Ahe=j.forwardRef(({className:e,...t},r)=>h.jsx(J2,{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));Ahe.displayName=J2.displayName;function nM({open:e,onOpenChange:t,artifactContent:r,isLoading:n,error:i,title:a="Artifact Content",hideLineCount:o=!1,hideCloseButton:s=!1}){const[l,u]=j.useState(!1),[c,f]=j.useState("content"),d=()=>{r!=null&&r.content&&(navigator.clipboard.writeText(r.content),u(!0),setTimeout(()=>u(!1),2e3))},p=()=>{if(r){const b=new Blob([r.content],{type:r.contentType}),x=URL.createObjectURL(b),S=document.createElement("a");S.href=x,S.download=r.filename,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(x)}},y=()=>{if(!r)return"";const{content:b,filename:x,contentType:S}=r;if(S==="application/json"||x.endsWith(".json"))try{const w=JSON.parse(b);return JSON.stringify(w,null,2)}catch{return b}return b},m=()=>{var x;if(!r)return h.jsx(Xo,{className:"h-3.5 w-3.5 text-purple-600"});const b=((x=a.split(" - ")[0])==null?void 0:x.toLowerCase())||"";return b.includes("execution")||b.includes("run")?h.jsx(nk,{className:"h-3.5 w-3.5 text-blue-600"}):b.includes("checkpoint")||b.includes("model")?h.jsx(Wb,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(Xo,{className:"h-3.5 w-3.5 text-purple-600"})},g=j.useMemo(()=>{if(!(r!=null&&r.content))return null;const b=r.content,x=b.split(` -`).length,S=new TextEncoder().encode(b).length;let w;return S<1024?w=`${S} B`:S<1024*1024?w=`${(S/1024).toFixed(2)} KB`:w=`${(S/(1024*1024)).toFixed(2)} MB`,{lines:x,size:w,bytes:S}},[r==null?void 0:r.content]),v=()=>!r||!g?null:h.jsxs("div",{className:"p-3 space-y-3",children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("h3",{className:"text-xs font-semibold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"File Information"}),h.jsxs("div",{className:"border border-slate-200 dark:border-slate-700 rounded bg-white dark:bg-slate-800",children:[h.jsxs("div",{className:"flex justify-between items-center py-1.5 px-2 border-b border-slate-200 dark:border-slate-700",children:[h.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-medium text-xs",children:"Filename"}),h.jsx("code",{className:"font-mono text-slate-900 dark:text-slate-100 text-xs",children:r.filename})]}),h.jsxs("div",{className:"flex justify-between items-center py-1.5 px-2",children:[h.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-medium text-xs",children:"Content Type"}),h.jsx("code",{className:"font-mono text-slate-900 dark:text-slate-100 text-xs",children:r.contentType})]})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("h3",{className:"text-xs font-semibold text-slate-900 dark:text-slate-100 uppercase tracking-wide",children:"Statistics"}),h.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[h.jsxs("div",{className:"p-2 rounded bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700",children:[h.jsx("div",{className:"text-xs font-medium text-slate-600 dark:text-slate-400 uppercase tracking-wide",children:"Lines"}),h.jsx("div",{className:"text-xs font-semibold tabular-nums text-slate-900 dark:text-slate-100",children:g.lines.toLocaleString()})]}),h.jsxs("div",{className:"p-2 rounded bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700",children:[h.jsx("div",{className:"text-xs font-medium text-slate-600 dark:text-slate-400 uppercase tracking-wide",children:"Size"}),h.jsx("div",{className:"text-xs font-semibold tabular-nums text-slate-900 dark:text-slate-100",children:g.size})]})]})]})]});return h.jsx(jhe,{open:e,onOpenChange:t,children:h.jsxs(eM,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col gap-0 p-0",hideCloseButton:s,children:[h.jsx(tM,{className:"px-4 py-2.5 border-b bg-gradient-to-r from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800",children:h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[m(),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx(rM,{className:"text-sm font-semibold truncate text-slate-900 dark:text-slate-100",children:a}),h.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400 font-mono truncate mt-0.5",children:(r==null?void 0:r.filename)||"Loading..."})]}),g&&!o&&h.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:h.jsxs(lr,{variant:"secondary",className:"text-xs font-medium px-2 py-0.5",children:[g.lines," lines"]})})]}),r&&h.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[h.jsx(Fr,{variant:"outline",size:"sm",onClick:d,className:"h-7 px-2.5 text-xs font-medium",children:l?h.jsxs(h.Fragment,{children:[h.jsx(tk,{className:"h-3 w-3 mr-1"}),"Copied"]}):h.jsxs(h.Fragment,{children:[h.jsx(rk,{className:"h-3 w-3 mr-1"}),"Copy"]})}),h.jsxs(Fr,{variant:"outline",size:"sm",onClick:p,className:"h-7 px-2.5 text-xs font-medium",children:[h.jsx(gF,{className:"h-3 w-3 mr-1"}),"Download"]})]})]})}),h.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",children:n&&!r?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading artifact..."})}):i?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-sm font-medium text-destructive",children:"Failed to load artifact"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i.message})]})}):h.jsxs(im,{value:c,onValueChange:f,className:"flex-1 min-h-0 flex flex-col",children:[h.jsx("div",{className:"px-4 py-2 border-b bg-muted/30 flex-shrink-0",children:h.jsxs(am,{className:"h-8 bg-background/60",children:[h.jsxs(to,{value:"content",className:"text-xs font-medium h-6 px-3 data-[state=active]:bg-background",children:[h.jsx(Hb,{className:"h-3 w-3 mr-1.5"}),"Content"]}),h.jsxs(to,{value:"metadata",className:"text-xs font-medium h-6 px-3 data-[state=active]:bg-background",children:[h.jsx(TF,{className:"h-3 w-3 mr-1.5"}),"Metadata"]})]})}),h.jsx(ro,{value:"content",className:"flex-1 min-h-0 overflow-y-auto m-0 bg-slate-950 data-[state=active]:block data-[state=inactive]:hidden",children:h.jsx("pre",{className:"text-xs p-4 text-slate-50 leading-relaxed font-mono",children:h.jsx("code",{children:y()})})}),h.jsx(ro,{value:"metadata",className:"flex-1 min-h-0 overflow-y-auto m-0 bg-slate-50 dark:bg-slate-900 data-[state=active]:block data-[state=inactive]:hidden",children:v()})]})})]})})}const _he={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function The(){var S,w;const{id:e}=ST(),{data:t,isLoading:r,error:n}=bk(e),[i,a]=j.useState(!1),[o,s]=j.useState("overview"),l=(t==null?void 0:t.metrics)||[],u=(t==null?void 0:t.spans)||[],c=r,f=r,d=n,p=(S=t==null?void 0:t.meta)==null?void 0:S.execution_result,y=(p==null?void 0:p.path)&&(p==null?void 0:p.file_name);let m="";if(y){let O=p.path;if(O.includes(":")&&(O=O.split(":")[1]),O.includes("/")){const P=O.split("/");O=P[P.length-1],O.includes(":")&&(O=O.split(":")[1])}m=O}const{data:g,isLoading:v,error:b}=v2((t==null?void 0:t.teamId)||"",m,"execution",i&&y),x=()=>{!y||!t||a(!0)};return b&&i&&console.error("Failed to load artifact:",b),r?h.jsxs("div",{className:"space-y-4",children:[h.jsx(Ve,{className:"h-12 w-64"}),h.jsx(Ve,{className:"h-96 w-full"})]}):n||!t?h.jsxs(ge,{children:[h.jsxs(Mr,{children:[h.jsx(Ir,{children:"Error"}),h.jsx(on,{children:"Failed to load run"})]}),h.jsx(be,{children:h.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),h.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),h.jsx(lr,{variant:_he[t.status],children:t.status})]}),h.jsxs(im,{value:o,onValueChange:s,children:[h.jsxs(am,{children:[h.jsx(to,{value:"overview",children:"Overview"}),h.jsx(to,{value:"traces",children:"Traces"})]}),h.jsxs(ro,{value:"overview",className:"space-y-4",children:[h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[y&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:h.jsxs("button",{onClick:x,disabled:v,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[h.jsx(Hb,{className:"h-3.5 w-3.5"}),p.file_name]})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=t.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&t.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(t.aggregatedTokens.totalTokens).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.aggregatedTokens.inputTokens||0).toLocaleString(),"↓ ",Number(t.aggregatedTokens.outputTokens||0).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:t.duration!==void 0&&t.duration>0?`${t.duration.toFixed(2)}s`:h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Qo(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(O=>O!=="execution_result").length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([O])=>O!=="execution_result").map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]})]})}),h.jsx(ge,{children:h.jsxs(be,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),c?h.jsx(Ve,{className:"h-32 w-full"}):l.length===0?h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:l.map(O=>h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O.key}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:O.value})]},O.id))})]})})]}),h.jsx(ro,{value:"traces",children:f?h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx(Ve,{className:"h-64 w-full"})})}):d?h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",d.message]})})}):u&&u.length>0?h.jsx(Wfe,{spans:u}):h.jsx(ge,{children:h.jsx(be,{className:"p-4",children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),h.jsx(nM,{open:i,onOpenChange:a,artifactContent:g,isLoading:v,error:b,title:"Artifact Content",hideLineCount:!0,hideCloseButton:!0})]})}function khe(){const{selectedTeamId:e}=tl(),[t,r]=j.useState(""),[n,i]=j.useState(""),[a,o]=j.useState(""),[s,l]=j.useState(!1),[u,c]=j.useState(""),[f,d]=j.useState(1),p=100,{data:y,isLoading:m}=zfe(),g=y==null?void 0:y.filter(M=>M.toLowerCase().includes(t.toLowerCase())&&(e?M.includes(e):!0)),v=n?n.split("/")[1]||n:"",{data:b,isLoading:x}=Ufe(e||"",v),{data:S,isLoading:w,error:O}=v2(e||"",u,v,s&&!!u),P=M=>{c(M),l(!0)},E=M=>{const I=M.split("/");return I.length>1?I[1]:M},A=M=>{const I=E(M).toLowerCase();return I.includes("execution")||I.includes("run")?h.jsx(nk,{className:"h-3.5 w-3.5 text-blue-600"}):I.includes("checkpoint")||I.includes("model")?h.jsx(Wb,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(Xo,{className:"h-3.5 w-3.5 text-purple-600"})},_=(b==null?void 0:b.filter(M=>M.toLowerCase().includes(a.toLowerCase())))||[],T=Math.ceil(_.length/p),k=(f-1)*p,D=_.slice(k,k+p);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse execution results and checkpoints across repositories"})]}),h.jsxs("div",{className:"grid grid-cols-12 gap-3",children:[h.jsx("div",{className:"col-span-12 md:col-span-4 lg:col-span-3",children:h.jsx(ge,{className:"h-[calc(100vh-12rem)]",children:h.jsxs(be,{className:"p-3 space-y-2 h-full flex flex-col",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"REPOSITORIES"}),h.jsx(lr,{variant:"secondary",className:"text-xs",children:(g==null?void 0:g.length)||0})]}),h.jsxs("div",{className:"relative",children:[h.jsx($u,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),h.jsx(Xs,{placeholder:"Search repositories...",value:t,onChange:M=>r(M.target.value),className:"h-8 text-xs pl-7"})]}),h.jsx("div",{className:"space-y-1 flex-1 overflow-y-auto",children:m?[...Array(5)].map((M,I)=>h.jsx(Ve,{className:"h-10 w-full"},I)):!g||g.length===0?h.jsx("div",{className:"text-center py-6 text-xs text-muted-foreground",children:t?"No matches found":"No repositories"}):g.map(M=>h.jsxs("button",{type:"button",onClick:I=>{I.preventDefault(),I.stopPropagation(),i(M),o(""),d(1)},className:`w-full flex items-center gap-2 px-2 py-1.5 rounded text-left text-xs transition-colors ${n===M?"bg-accent font-medium":"hover:bg-accent/50"}`,children:[A(M),h.jsx("span",{className:"flex-1 truncate font-medium",children:E(M)})]},M))})]})})}),h.jsx("div",{className:"col-span-12 md:col-span-8 lg:col-span-9",children:h.jsx(ge,{className:"h-[calc(100vh-12rem)]",children:h.jsx(be,{className:"p-3 space-y-2 h-full flex flex-col",children:n?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[A(n),h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-semibold",children:E(n)}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:[_.length," artifacts",T>1&&` • Page ${f} of ${T}`]})]})]}),T>1&&h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>d(M=>Math.max(1,M-1)),disabled:f===1,className:"h-7 px-2 text-xs",children:"Previous"}),h.jsx(Fr,{variant:"outline",size:"sm",onClick:()=>d(M=>Math.min(T,M+1)),disabled:f===T,className:"h-7 px-2 text-xs",children:"Next"})]})]}),h.jsxs("div",{className:"relative",children:[h.jsx($u,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),h.jsx(Xs,{placeholder:"Filter artifacts...",value:a,onChange:M=>{o(M.target.value),d(1)},className:"h-8 text-xs pl-7"})]}),h.jsx("div",{className:"flex-1 overflow-y-auto",children:x?h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-1.5",children:[...Array(9)].map((M,I)=>h.jsx(Ve,{className:"h-8 w-full"},I))}):_.length===0?h.jsxs("div",{className:"text-center py-8",children:[h.jsx(Xo,{className:"h-8 w-8 text-muted-foreground mx-auto mb-2"}),h.jsx("p",{className:"text-xs font-medium",children:"No artifacts found"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a?"Try a different search term":"This repository has no artifacts"})]}):h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-1.5",children:D.map(M=>h.jsxs("button",{type:"button",onClick:I=>{I.preventDefault(),I.stopPropagation(),P(M)},className:"flex items-center gap-2 px-2 py-1.5 rounded border bg-card hover:bg-accent text-left transition-colors group text-xs",children:[h.jsx("code",{className:"font-mono flex-1 truncate",children:M}),h.jsx(Hb,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]},M))})})]}):h.jsx("div",{className:"flex-1 flex items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx(Xo,{className:"h-10 w-10 text-muted-foreground mx-auto mb-2"}),h.jsx("p",{className:"text-sm font-medium",children:"Select a repository"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose a repository from the left to view its artifacts"})]})})})})})]}),h.jsx(nM,{open:s,onOpenChange:l,artifactContent:S,isLoading:w,error:O,title:n?`${E(n)} - ${u}`:u,hideLineCount:!0,hideCloseButton:!0})]})}function Nhe(){const[e,t]=j.useState(null),[r,n]=j.useState(!0),[i,a]=j.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=tl(),l=dT();return j.useEffect(()=>{async function u(){try{const c=await SL(),f=localStorage.getItem("alphatrion_user_id");f&&f!==c&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",c);const d=await Vt(sr.getUser,{id:c});if(!d.user)throw new Error(`User with ID ${c} not found`);t(d.user);const p=await Vt(sr.listTeams,{userId:c});if(p.teams&&p.teams.length>0){const y=`alphatrion_selected_team_${c}`,m=localStorage.getItem(y);let g;m&&p.teams.find(b=>b.id===m)?g=m:g=p.teams[0].id,s(g,c)}}catch(c){console.error("Failed to initialize app:",c),a(c)}finally{n(!1)}}u()},[s,l]),r?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),h.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),h.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),h.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[h.jsx("li",{children:"• The user ID exists in the database"}),h.jsx("li",{children:"• The backend server is running"}),h.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?h.jsx("div",{className:"h-full",children:h.jsx(J3,{user:e,children:h.jsx(oL,{children:h.jsxs(Kr,{path:"/",element:h.jsx(I5,{}),children:[h.jsx(Kr,{index:!0,element:h.jsx(pfe,{})}),h.jsxs(Kr,{path:"experiments",children:[h.jsx(Kr,{index:!0,element:h.jsx(xfe,{})}),h.jsx(Kr,{path:":id",element:h.jsx(kfe,{})}),h.jsx(Kr,{path:"compare",element:h.jsx(Mfe,{})})]}),h.jsxs(Kr,{path:"runs",children:[h.jsx(Kr,{index:!0,element:h.jsx(Rfe,{})}),h.jsx(Kr,{path:":id",element:h.jsx(The,{})})]}),h.jsx(Kr,{path:"artifacts",element:h.jsx(khe,{})})]})})})}):null}$v.createRoot(document.getElementById("root")).render(h.jsx(N.StrictMode,{children:h.jsx(tR,{client:bL,children:h.jsx(pL,{children:h.jsx(xL,{children:h.jsx(Nhe,{})})})})}));export{Gc as c,Ee as g,Ore as p,j as r}; diff --git a/dashboard/static/assets/index-DP6dJO_9.css b/dashboard/static/assets/index-DP6dJO_9.css deleted file mode 100644 index ecbac7ca..00000000 --- a/dashboard/static/assets/index-DP6dJO_9.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.m-0{margin:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[550px\]{height:550px}.h-\[calc\(100vh-12rem\)\]{height:calc(100vh - 12rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-80{max-height:20rem}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:0px}.min-h-9{min-height:2.25rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-fuchsia-300{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(165 180 252 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-lime-300{--tw-border-opacity: 1;border-color:rgb(190 242 100 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(249 168 212 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(216 180 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-stone-300{--tw-border-opacity: 1;border-color:rgb(214 211 209 / var(--tw-border-opacity, 1))}.border-teal-300{--tw-border-opacity: 1;border-color:rgb(94 234 212 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-300{--tw-border-opacity: 1;border-color:rgb(196 181 253 / var(--tw-border-opacity, 1))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-fuchsia-100{--tw-bg-opacity: 1;background-color:rgb(250 232 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-stone-100{--tw-bg-opacity: 1;background-color:rgb(245 245 244 / var(--tw-bg-opacity, 1))}.bg-teal-100{--tw-bg-opacity: 1;background-color:rgb(204 251 241 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 250 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-fuchsia-700{--tw-text-opacity: 1;color:rgb(162 28 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity, 1))}.text-teal-700{--tw-text-opacity: 1;color:rgb(15 118 110 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.data-\[state\=active\]\:block[data-state=active]{display:block}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:from-slate-900:is(.dark *){--tw-gradient-from: #0f172a var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-slate-800:is(.dark *){--tw-gradient-to: #1e293b var(--tw-gradient-to-position)}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-8{grid-column:span 8 / span 8}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-9{grid-column:span 9 / span 9}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/index-w66dPa7K.css b/dashboard/static/assets/index-w66dPa7K.css new file mode 100644 index 00000000..3ad38e5e --- /dev/null +++ b/dashboard/static/assets/index-w66dPa7K.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.m-0{margin:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[550px\]{height:550px}.h-\[calc\(100vh-12rem\)\]{height:calc(100vh - 12rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-80{max-height:20rem}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:0px}.min-h-9{min-height:2.25rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-current{border-color:currentColor}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-fuchsia-300{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(165 180 252 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-lime-300{--tw-border-opacity: 1;border-color:rgb(190 242 100 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(249 168 212 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(216 180 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-stone-300{--tw-border-opacity: 1;border-color:rgb(214 211 209 / var(--tw-border-opacity, 1))}.border-teal-300{--tw-border-opacity: 1;border-color:rgb(94 234 212 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-300{--tw-border-opacity: 1;border-color:rgb(196 181 253 / var(--tw-border-opacity, 1))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.border-r-transparent{border-right-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-fuchsia-100{--tw-bg-opacity: 1;background-color:rgb(250 232 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-stone-100{--tw-bg-opacity: 1;background-color:rgb(245 245 244 / var(--tw-bg-opacity, 1))}.bg-teal-100{--tw-bg-opacity: 1;background-color:rgb(204 251 241 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 250 252 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-fuchsia-700{--tw-text-opacity: 1;color:rgb(162 28 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity, 1))}.text-teal-700{--tw-text-opacity: 1;color:rgb(15 118 110 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}.checked\:border-primary:checked{border-color:hsl(var(--primary))}.checked\:bg-primary:checked{background-color:hsl(var(--primary))}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.data-\[state\=active\]\:block[data-state=active]{display:block}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:from-slate-900:is(.dark *){--tw-gradient-from: #0f172a var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-slate-800:is(.dark *){--tw-gradient-to: #1e293b var(--tw-gradient-to-position)}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:max-w-\[440px\]{max-width:440px}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2{gap:.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-8{grid-column:span 8 / span 8}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-9{grid-column:span 9 / span 9}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/react-plotly-Bzb9-pG0.js b/dashboard/static/assets/react-plotly-DmGF6ToQ.js similarity index 99% rename from dashboard/static/assets/react-plotly-Bzb9-pG0.js rename to dashboard/static/assets/react-plotly-DmGF6ToQ.js index e5026ae6..aca98260 100644 --- a/dashboard/static/assets/react-plotly-Bzb9-pG0.js +++ b/dashboard/static/assets/react-plotly-DmGF6ToQ.js @@ -1,4 +1,4 @@ -import{r as FD,p as OD,c as BD,g as ND}from"./index-CyIlOg_C.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"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 gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` +import{r as FD,p as OD,c as BD,g as ND}from"./index-BT9mQZGg.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"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 gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` ]`),vt=de.charCodeAt(0);function mt(Ir,Lr,Zr){arguments.length<3&&(Zr=Lr,Lr=null);var ia=xr(Ir,Pe,Lr==null?Tt:qt(Lr),Zr);return ia.row=function(la){return arguments.length?ia.response((Lr=la)==null?Tt:qt(la)):Lr},ia}function Tt(Ir){return mt.parse(Ir.responseText)}function qt(Ir){return function(Lr){return mt.parse(Lr.responseText,Ir)}}mt.parse=function(Ir,Lr){var Zr;return mt.parseRows(Ir,function(ia,la){if(Zr)return Zr(ia,la-1);var an=function(da){for(var La={},Oa=ia.length,Qa=0;Qa=an)return ia;if(Qa)return Qa=!1,Zr;var Ln=da;if(Ir.charCodeAt(Ln)===34){for(var oi=Ln;oi++24?(isFinite(Pe)&&(clearTimeout(ha),ha=setTimeout(Xn,Pe)),Wr=0):(Wr=1,Un(Xn))}h.timer.flush=function(){ni(),di()};function ni(){for(var de=Date.now(),Pe=xa;Pe;)de>=Pe.t&&Pe.c(de-Pe.t)&&(Pe.c=null),Pe=Pe.n;return de}function di(){for(var de,Pe=xa,Ke=1/0;Pe;)Pe.c?(Pe.t=0;--Vt)da.push(mt[Ir[Zr[Vt]][2]]);for(Vt=+la;Vt1&&xt(de[Ke[vt-2]],de[Ke[vt-1]],de[mt])<=0;)--vt;Ke[vt++]=mt}return Ke.slice(0,vt)}function to(de,Pe){return de[0]-Pe[0]||de[1]-Pe[1]}h.geom.polygon=function(de){return V(de,Gi),de};var Gi=h.geom.polygon.prototype=[];Gi.area=function(){for(var de=-1,Pe=this.length,Ke,vt=this[Pe-1],mt=0;++deWe)Vt=Vt.L;else if(qt=Pe-hi(Vt,Ke),qt>We){if(!Vt.R){vt=Vt;break}Vt=Vt.R}else{Tt>-We?(vt=Vt.P,mt=Vt):qt>-We?(vt=Vt,mt=Vt.N):vt=mt=Vt;break}var or=rs(de);if(Bo.insert(vt,or),!(!vt&&!mt)){if(vt===mt){as(vt),mt=rs(vt.site),Bo.insert(or,mt),or.edge=mt.edge=Rs(vt.site,or.site),qo(vt),qo(mt);return}if(!mt){or.edge=Rs(vt.site,or.site);return}as(vt),as(mt);var Ir=vt.site,Lr=Ir.x,Zr=Ir.y,ia=de.x-Lr,la=de.y-Zr,an=mt.site,da=an.x-Lr,La=an.y-Zr,Oa=2*(ia*La-la*da),Qa=ia*ia+la*la,on=da*da+La*La,Fa={x:(La*Qa-la*on)/Oa+Lr,y:(ia*on-da*Qa)/Oa+Zr};Ii(mt.edge,Ir,an,Fa),or.edge=Rs(Ir,de,null,Fa),mt.edge=Rs(de,an,null,Fa),qo(vt),qo(mt)}}function Fn(de,Pe){var Ke=de.site,vt=Ke.x,mt=Ke.y,Tt=mt-Pe;if(!Tt)return vt;var qt=de.P;if(!qt)return-1/0;Ke=qt.site;var Vt=Ke.x,or=Ke.y,Ir=or-Pe;if(!Ir)return Vt;var Lr=Vt-vt,Zr=1/Tt-1/Ir,ia=Lr/Ir;return Zr?(-ia+Math.sqrt(ia*ia-2*Zr*(Lr*Lr/(-2*Ir)-or+Ir/2+mt-Tt/2)))/Zr+vt:(vt+Vt)/2}function hi(de,Pe){var Ke=de.N;if(Ke)return Fn(Ke,Pe);var vt=de.site;return vt.y===Pe?vt.x:1/0}function _s(de){this.site=de,this.edges=[]}_s.prototype.prepare=function(){for(var de=this.edges,Pe=de.length,Ke;Pe--;)Ke=de[Pe].edge,(!Ke.b||!Ke.a)&&de.splice(Pe,1);return de.sort(Fi),de.length};function Po(de){for(var Pe=de[0][0],Ke=de[1][0],vt=de[0][1],mt=de[1][1],Tt,qt,Vt,or,Ir=Vo,Lr=Ir.length,Zr,ia,la,an,da,La;Lr--;)if(Zr=Ir[Lr],!(!Zr||!Zr.prepare()))for(la=Zr.edges,an=la.length,ia=0;iaWe||l(or-qt)>We)&&(la.splice(ia,0,new Xs(Ds(Zr.site,La,l(Vt-Pe)We?{x:Pe,y:l(Tt-Pe)We?{x:l(qt-mt)We?{x:Ke,y:l(Tt-Ke)We?{x:l(qt-vt)=-Ae)){var ia=or*or+Ir*Ir,la=Lr*Lr+La*La,an=(La*ia-Ir*la)/Zr,da=(or*la-Lr*ia)/Zr,La=da+Vt,Oa=_i.pop()||new Ts;Oa.arc=de,Oa.site=mt,Oa.x=an+qt,Oa.y=La+Math.sqrt(an*an+da*da),Oa.cy=La,de.circle=Oa;for(var Qa=null,on=Zi._;on;)if(Oa.y0)){if(da/=la,la<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=Ke-Vt,!(!la&&da<0)){if(da/=la,la<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(la>0){if(da0)){if(da/=an,an<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=vt-or,!(!an&&da<0)){if(da/=an,an<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(an>0){if(da0&&(mt.a={x:Vt+Zr*la,y:or+Zr*an}),ia<1&&(mt.b={x:Vt+ia*la,y:or+ia*an}),mt}}}}}}function ci(de){for(var Pe=ji,Ke=al(de[0][0],de[0][1],de[1][0],de[1][1]),vt=Pe.length,mt;vt--;)mt=Pe[vt],(!mo(mt,de)||!Ke(mt)||l(mt.a.x-mt.b.x)=Tt)return;if(Lr>ia){if(!vt)vt={x:an,y:qt};else if(vt.y>=Vt)return;Ke={x:an,y:Vt}}else{if(!vt)vt={x:an,y:Vt};else if(vt.y1)if(Lr>ia){if(!vt)vt={x:(qt-Oa)/La,y:qt};else if(vt.y>=Vt)return;Ke={x:(Vt-Oa)/La,y:Vt}}else{if(!vt)vt={x:(Vt-Oa)/La,y:Vt};else if(vt.y=Tt)return;Ke={x:Tt,y:La*Tt+Oa}}else{if(!vt)vt={x:Tt,y:La*Tt+Oa};else if(vt.x=Lr&&Oa.x<=ia&&Oa.y>=Zr&&Oa.y<=la?[[Lr,la],[ia,la],[ia,Zr],[Lr,Zr]]:[];Qa.point=or[da]}),Ir}function Vt(or){return or.map(function(Ir,Lr){return{x:Math.round(vt(Ir,Lr)/We)*We,y:Math.round(mt(Ir,Lr)/We)*We,i:Lr}})}return qt.links=function(or){return wl(Vt(or)).edges.filter(function(Ir){return Ir.l&&Ir.r}).map(function(Ir){return{source:or[Ir.l.i],target:or[Ir.r.i]}})},qt.triangles=function(or){var Ir=[];return wl(Vt(or)).cells.forEach(function(Lr,Zr){for(var ia=Lr.site,la=Lr.edges.sort(Fi),an=-1,da=la.length,La,Oa=la[da-1].edge,Qa=Oa.l===ia?Oa.r:Oa.l;++anon&&(on=Lr.x),Lr.y>Fa&&(Fa=Lr.y),la.push(Lr.x),an.push(Lr.y);else for(da=0;daon&&(on=Ln),oi>Fa&&(Fa=oi),la.push(Ln),an.push(oi)}var Kn=on-Oa,ai=Fa-Qa;Kn>ai?Fa=Qa+Kn:on=Oa+ai;function Ti(Pi,oo,$o,hl,js,pi,ko,Xo){if(!(isNaN($o)||isNaN(hl)))if(Pi.leaf){var Os=Pi.x,Ms=Pi.y;if(Os!=null)if(l(Os-$o)+l(Ms-hl)<.01)ki(Pi,oo,$o,hl,js,pi,ko,Xo);else{var Zl=Pi.point;Pi.x=Pi.y=Pi.point=null,ki(Pi,Zl,Os,Ms,js,pi,ko,Xo),ki(Pi,oo,$o,hl,js,pi,ko,Xo)}else Pi.x=$o,Pi.y=hl,Pi.point=oo}else ki(Pi,oo,$o,hl,js,pi,ko,Xo)}function ki(Pi,oo,$o,hl,js,pi,ko,Xo){var Os=(js+ko)*.5,Ms=(pi+Xo)*.5,Zl=$o>=Os,gs=hl>=Ms,Bs=gs<<1|Zl;Pi.leaf=!1,Pi=Pi.nodes[Bs]||(Pi.nodes[Bs]=ds()),Zl?js=Os:ko=Os,gs?pi=Ms:Xo=Ms,Ti(Pi,oo,$o,hl,js,pi,ko,Xo)}var Go=ds();if(Go.add=function(Pi){Ti(Go,Pi,+Zr(Pi,++da),+ia(Pi,da),Oa,Qa,on,Fa)},Go.visit=function(Pi){Jl(Pi,Go,Oa,Qa,on,Fa)},Go.find=function(Pi){return Nc(Go,Pi[0],Pi[1],Oa,Qa,on,Fa)},da=-1,Pe==null){for(;++daTt||ia>qt||la=Ln,ai=Ke>=oi,Ti=ai<<1|Kn,ki=Ti+4;TiKe&&(Tt=Pe.slice(Ke,Tt),Vt[qt]?Vt[qt]+=Tt:Vt[++qt]=Tt),(vt=vt[0])===(mt=mt[0])?Vt[qt]?Vt[qt]+=mt:Vt[++qt]=mt:(Vt[++qt]=null,or.push({i:qt,x:Rl(vt,mt)})),Ke=Al.lastIndex;return Ke=0&&!(vt=h.interpolators[Ke](de,Pe)););return vt}h.interpolators=[function(de,Pe){var Ke=typeof Pe;return(Ke==="string"?Fr.has(Pe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Pe)?Il:gu:Pe instanceof Ra?Il:Array.isArray(Pe)?As:Ke==="object"&&isNaN(Pe)?Tl:Rl)(de,Pe)}],h.interpolateArray=As;function As(de,Pe){var Ke=[],vt=[],mt=de.length,Tt=Pe.length,qt=Math.min(de.length,Pe.length),Vt;for(Vt=0;Vt=0?de.slice(0,Pe):de,vt=Pe>=0?de.slice(Pe+1):"in";return Ke=Hl.get(Ke)||Uu,vt=Yu.get(vt)||F,Zs(vt(Ke.apply(null,b.call(arguments,1))))};function Zs(de){return function(Pe){return Pe<=0?0:Pe>=1?1:de(Pe)}}function df(de){return function(Pe){return 1-de(1-Pe)}}function zo(de){return function(Pe){return .5*(Pe<.5?de(2*Pe):2-de(2-2*Pe))}}function Ef(de){return de*de}function ls(de){return de*de*de}function zi(de){if(de<=0)return 0;if(de>=1)return 1;var Pe=de*de,Ke=Pe*de;return 4*(de<.5?Ke:3*(de-Pe)+Ke-.75)}function uc(de){return function(Pe){return Math.pow(Pe,de)}}function yu(de){return 1-Math.cos(de*Ue)}function dl(de){return Math.pow(2,10*(de-1))}function Uc(de){return 1-Math.sqrt(1-de*de)}function Ku(de,Pe){var Ke;return arguments.length<2&&(Pe=.45),arguments.length?Ke=Pe/pe*Math.asin(1/de):(de=1,Ke=Pe/4),function(vt){return 1+de*Math.pow(2,-10*vt)*Math.sin((vt-Ke)*pe/Pe)}}function _c(de){return de||(de=1.70158),function(Pe){return Pe*Pe*((de+1)*Pe-de)}}function Sl(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}h.interpolateHcl=lf;function lf(de,Pe){de=h.hcl(de),Pe=h.hcl(Pe);var Ke=de.h,vt=de.c,mt=de.l,Tt=Pe.h-Ke,qt=Pe.c-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.c:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return Zt(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateHsl=Wc;function Wc(de,Pe){de=h.hsl(de),Pe=h.hsl(Pe);var Ke=de.h,vt=de.s,mt=de.l,Tt=Pe.h-Ke,qt=Pe.s-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.s:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return mn(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateLab=xc;function xc(de,Pe){de=h.lab(de),Pe=h.lab(Pe);var Ke=de.l,vt=de.a,mt=de.b,Tt=Pe.l-Ke,qt=Pe.a-vt,Vt=Pe.b-mt;return function(or){return Ha(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateRound=$u;function $u(de,Pe){return Pe-=de,function(Ke){return Math.round(de+Pe*Ke)}}h.transform=function(de){var Pe=E.createElementNS(h.ns.prefix.svg,"g");return(h.transform=function(Ke){if(Ke!=null){Pe.setAttribute("transform",Ke);var vt=Pe.transform.baseVal.consolidate()}return new jc(vt?vt.matrix:ju)})(de)};function jc(de){var Pe=[de.a,de.b],Ke=[de.c,de.d],vt=_u(Pe),mt=Vc(Pe,Ke),Tt=_u(Xc(Ke,Pe,-mt))||0;Pe[0]*Ke[1]180?Pe+=360:Pe-de>180&&(de+=360),vt.push({i:Ke.push(Cu(Ke)+"rotate(",null,")")-2,x:Rl(de,Pe)})):Pe&&Ke.push(Cu(Ke)+"rotate("+Pe+")")}function qc(de,Pe,Ke,vt){de!==Pe?vt.push({i:Ke.push(Cu(Ke)+"skewX(",null,")")-2,x:Rl(de,Pe)}):Pe&&Ke.push(Cu(Ke)+"skewX("+Pe+")")}function Cs(de,Pe,Ke,vt){if(de[0]!==Pe[0]||de[1]!==Pe[1]){var mt=Ke.push(Cu(Ke)+"scale(",null,",",null,")");vt.push({i:mt-4,x:Rl(de[0],Pe[0])},{i:mt-2,x:Rl(de[1],Pe[1])})}else(Pe[0]!==1||Pe[1]!==1)&&Ke.push(Cu(Ke)+"scale("+Pe+")")}function kc(de,Pe){var Ke=[],vt=[];return de=h.transform(de),Pe=h.transform(Pe),Ml(de.translate,Pe.translate,Ke,vt),ic(de.rotate,Pe.rotate,Ke,vt),qc(de.skew,Pe.skew,Ke,vt),Cs(de.scale,Pe.scale,Ke,vt),de=Pe=null,function(mt){for(var Tt=-1,qt=vt.length,Vt;++Tt0?Tt=Fa:(Ke.c=null,Ke.t=NaN,Ke=null,Pe.end({type:"end",alpha:Tt=0})):Fa>0&&(Pe.start({type:"start",alpha:Tt=Fa}),Ke=en(de.tick)),de):Tt},de.start=function(){var Fa,Ln=la.length,oi=an.length,Kn=vt[0],ai=vt[1],Ti,ki;for(Fa=0;Fa=0;)Tt.push(Lr=Ir[or]),Lr.parent=Vt,Lr.depth=Vt.depth+1;Ke&&(Vt.value=0),Vt.children=Ir}else Ke&&(Vt.value=+Ke.call(vt,Vt,Vt.depth)||0),delete Vt.children;return Lu(mt,function(Zr){var ia,la;de&&(ia=Zr.children)&&ia.sort(de),Ke&&(la=Zr.parent)&&(la.value+=Zr.value)}),qt}return vt.sort=function(mt){return arguments.length?(de=mt,vt):de},vt.children=function(mt){return arguments.length?(Pe=mt,vt):Pe},vt.value=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt.revalue=function(mt){return Ke&&(cc(mt,function(Tt){Tt.children&&(Tt.value=0)}),Lu(mt,function(Tt){var qt;Tt.children||(Tt.value=+Ke.call(vt,Tt,Tt.depth)||0),(qt=Tt.parent)&&(qt.value+=Tt.value)})),mt},vt};function Ys(de,Pe){return h.rebind(de,Pe,"sort","children","value"),de.nodes=de,de.links=Df,de}function cc(de,Pe){for(var Ke=[de];(de=Ke.pop())!=null;)if(Pe(de),(mt=de.children)&&(vt=mt.length))for(var vt,mt;--vt>=0;)Ke.push(mt[vt])}function Lu(de,Pe){for(var Ke=[de],vt=[];(de=Ke.pop())!=null;)if(vt.push(de),(qt=de.children)&&(Tt=qt.length))for(var mt=-1,Tt,qt;++mtmt&&(mt=Vt),vt.push(Vt)}for(qt=0;qtvt&&(Ke=Pe,vt=mt);return Ke}function ru(de){return de.reduce(xu,0)}function xu(de,Pe){return de+Pe[1]}h.layout.histogram=function(){var de=!0,Pe=Number,Ke=wc,vt=Gc;function mt(Tt,ia){for(var Vt=[],or=Tt.map(Pe,this),Ir=Ke.call(this,or,ia),Lr=vt.call(this,Ir,or,ia),Zr,ia=-1,la=or.length,an=Lr.length-1,da=de?1:1/la,La;++ia0)for(ia=-1;++ia=Ir[0]&&La<=Ir[1]&&(Zr=Vt[h.bisect(Lr,La,1,an)-1],Zr.y+=da,Zr.push(Tt[ia]));return Vt}return mt.value=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.range=function(Tt){return arguments.length?(Ke=pt(Tt),mt):Ke},mt.bins=function(Tt){return arguments.length?(vt=typeof Tt=="number"?function(qt){return Ws(qt,Tt)}:pt(Tt),mt):vt},mt.frequency=function(Tt){return arguments.length?(de=!!Tt,mt):de},mt};function Gc(de,Pe){return Ws(de,Math.ceil(Math.log(Pe.length)/Math.LN2+1))}function Ws(de,Pe){for(var Ke=-1,vt=+de[0],mt=(de[1]-vt)/Pe,Tt=[];++Ke<=Pe;)Tt[Ke]=mt*Ke+vt;return Tt}function wc(de){return[h.min(de),h.max(de)]}h.layout.pack=function(){var de=h.layout.hierarchy().sort(ec),Pe=0,Ke=[1,1],vt;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir=Ke[0],Lr=Ke[1],Zr=vt==null?Math.sqrt:typeof vt=="function"?vt:function(){return vt};if(or.x=or.y=0,Lu(or,function(la){la.r=+Zr(la.value)}),Lu(or,Ac),Pe){var ia=Pe*(vt?1:Math.max(2*or.r/Ir,2*or.r/Lr))/2;Lu(or,function(la){la.r+=ia}),Lu(or,Ac),Lu(or,function(la){la.r-=ia})}return Jc(or,Ir/2,Lr/2,vt?1:1/Math.max(2*or.r/Ir,2*or.r/Lr)),Vt}return mt.size=function(Tt){return arguments.length?(Ke=Tt,mt):Ke},mt.radius=function(Tt){return arguments.length?(vt=Tt==null||typeof Tt=="function"?Tt:+Tt,mt):vt},mt.padding=function(Tt){return arguments.length?(Pe=+Tt,mt):Pe},Ys(mt,de)};function ec(de,Pe){return de.value-Pe.value}function fu(de,Pe){var Ke=de._pack_next;de._pack_next=Pe,Pe._pack_prev=de,Pe._pack_next=Ke,Ke._pack_prev=Pe}function Tc(de,Pe){de._pack_next=Pe,Pe._pack_prev=de}function Pu(de,Pe){var Ke=Pe.x-de.x,vt=Pe.y-de.y,mt=de.r+Pe.r;return .999*mt*mt>Ke*Ke+vt*vt}function Ac(de){if(!(Pe=de.children)||!(ia=Pe.length))return;var Pe,Ke=1/0,vt=-1/0,mt=1/0,Tt=-1/0,qt,Vt,or,Ir,Lr,Zr,ia;function la(Fa){Ke=Math.min(Fa.x-Fa.r,Ke),vt=Math.max(Fa.x+Fa.r,vt),mt=Math.min(Fa.y-Fa.r,mt),Tt=Math.max(Fa.y+Fa.r,Tt)}if(Pe.forEach(gf),qt=Pe[0],qt.x=-qt.r,qt.y=0,la(qt),ia>1&&(Vt=Pe[1],Vt.x=Vt.r,Vt.y=0,la(Vt),ia>2))for(or=Pe[2],hu(qt,Vt,or),la(or),fu(qt,or),qt._pack_prev=or,fu(or,Vt),Vt=qt._pack_next,Ir=3;IrLa.x&&(La=Ln),Ln.depth>Oa.depth&&(Oa=Ln)});var Qa=Pe(da,La)/2-da.x,on=Ke[0]/(La.x+Pe(La,da)/2+Qa),Fa=Ke[1]/(Oa.depth||1);cc(la,function(Ln){Ln.x=(Ln.x+Qa)*on,Ln.y=Ln.depth*Fa})}return ia}function Tt(Lr){for(var Zr={A:null,children:[Lr]},ia=[Zr],la;(la=ia.pop())!=null;)for(var an=la.children,da,La=0,Oa=an.length;La0&&(Wl(tc(da,Lr,ia),Lr,Ln),Oa+=Ln,Qa+=Ln),on+=da.m,Oa+=la.m,Fa+=La.m,Qa+=an.m;da&&!nl(an)&&(an.t=da,an.m+=on-Qa),la&&!Iu(La)&&(La.t=la,La.m+=Oa-Fa,ia=Lr)}return ia}function Ir(Lr){Lr.x*=Ke[0],Lr.y=Lr.depth*Ke[1]}return mt.separation=function(Lr){return arguments.length?(Pe=Lr,mt):Pe},mt.size=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?Ir:null,mt):vt?null:Ke},mt.nodeSize=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?null:Ir,mt):vt?Ke:null},Ys(mt,de)};function qu(de,Pe){return de.parent==Pe.parent?1:2}function Iu(de){var Pe=de.children;return Pe.length?Pe[0]:de.t}function nl(de){var Pe=de.children,Ke;return(Ke=Pe.length)?Pe[Ke-1]:de.t}function Wl(de,Pe,Ke){var vt=Ke/(Pe.i-de.i);Pe.c-=vt,Pe.s+=Ke,de.c+=vt,Pe.z+=Ke,Pe.m+=Ke}function Js(de){for(var Pe=0,Ke=0,vt=de.children,mt=vt.length,Tt;--mt>=0;)Tt=vt[mt],Tt.z+=Pe,Tt.m+=Pe,Pe+=Tt.s+(Ke+=Tt.c)}function tc(de,Pe,Ke){return de.a.parent===Pe.parent?de.a:Ke}h.layout.cluster=function(){var de=h.layout.hierarchy().sort(null).value(null),Pe=qu,Ke=[1,1],vt=!1;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir,Lr=0;Lu(or,function(da){var La=da.children;La&&La.length?(da.x=Hc(La),da.y=Ru(La)):(da.x=Ir?Lr+=Pe(da,Ir):0,da.y=0,Ir=da)});var Zr=Jt(or),ia=yr(or),la=Zr.x-Pe(Zr,ia)/2,an=ia.x+Pe(ia,Zr)/2;return Lu(or,vt?function(da){da.x=(da.x-or.x)*Ke[0],da.y=(or.y-da.y)*Ke[1]}:function(da){da.x=(da.x-la)/(an-la)*Ke[0],da.y=(1-(or.y?da.y/or.y:1))*Ke[1]}),Vt}return mt.separation=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.size=function(Tt){return arguments.length?(vt=(Ke=Tt)==null,mt):vt?null:Ke},mt.nodeSize=function(Tt){return arguments.length?(vt=(Ke=Tt)!=null,mt):vt?Ke:null},Ys(mt,de)};function Ru(de){return 1+h.max(de,function(Pe){return Pe.y})}function Hc(de){return de.reduce(function(Pe,Ke){return Pe+Ke.x},0)/de.length}function Jt(de){var Pe=de.children;return Pe&&Pe.length?Jt(Pe[0]):de}function yr(de){var Pe=de.children,Ke;return Pe&&(Ke=Pe.length)?yr(Pe[Ke-1]):de}h.layout.treemap=function(){var de=h.layout.hierarchy(),Pe=Math.round,Ke=[1,1],vt=null,mt=Kr,Tt=!1,qt,Vt="squarify",or=.5*(1+Math.sqrt(5));function Ir(da,La){for(var Oa=-1,Qa=da.length,on,Fa;++Oa0;)Qa.push(Fa=on[ai-1]),Qa.area+=Fa.area,Vt!=="squarify"||(oi=ia(Qa,Kn))<=Ln?(on.pop(),Ln=oi):(Qa.area-=Qa.pop().area,la(Qa,Kn,Oa,!1),Kn=Math.min(Oa.dx,Oa.dy),Qa.length=Qa.area=0,Ln=1/0);Qa.length&&(la(Qa,Kn,Oa,!0),Qa.length=Qa.area=0),La.forEach(Lr)}}function Zr(da){var La=da.children;if(La&&La.length){var Oa=mt(da),Qa=La.slice(),on,Fa=[];for(Ir(Qa,Oa.dx*Oa.dy/da.value),Fa.area=0;on=Qa.pop();)Fa.push(on),Fa.area+=on.area,on.z!=null&&(la(Fa,on.z?Oa.dx:Oa.dy,Oa,!Qa.length),Fa.length=Fa.area=0);La.forEach(Zr)}}function ia(da,La){for(var Oa=da.area,Qa,on=0,Fa=1/0,Ln=-1,oi=da.length;++Lnon&&(on=Qa));return Oa*=Oa,La*=La,Oa?Math.max(La*on*or/Oa,Oa/(La*Fa*or)):1/0}function la(da,La,Oa,Qa){var on=-1,Fa=da.length,Ln=Oa.x,oi=Oa.y,Kn=La?Pe(da.area/La):0,ai;if(La==Oa.dx){for((Qa||Kn>Oa.dy)&&(Kn=Oa.dy);++onOa.dx)&&(Kn=Oa.dx);++on1);return de+Pe*vt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var de=h.random.normal.apply(h,arguments);return function(){return Math.exp(de())}},bates:function(de){var Pe=h.random.irwinHall(de);return function(){return Pe()/de}},irwinHall:function(de){return function(){for(var Pe=0,Ke=0;Ke2?gn:Ya,Ir=vt?Zc:pf;return mt=or(de,Pe,Ir,Ke),Tt=or(Pe,de,Ir,No),Vt}function Vt(or){return mt(or)}return Vt.invert=function(or){return Tt(or)},Vt.domain=function(or){return arguments.length?(de=or.map(Number),qt()):de},Vt.range=function(or){return arguments.length?(Pe=or,qt()):Pe},Vt.rangeRound=function(or){return Vt.range(or).interpolate($u)},Vt.clamp=function(or){return arguments.length?(vt=or,qt()):vt},Vt.interpolate=function(or){return arguments.length?(Ke=or,qt()):Ke},Vt.ticks=function(or){return Ui(de,or)},Vt.tickFormat=function(or,Ir){return d3_scale_linearTickFormat(de,or,Ir)},Vt.nice=function(or){return vn(de,or),qt()},Vt.copy=function(){return qn(de,Pe,Ke,vt)},qt()}function Sn(de,Pe){return h.rebind(de,Pe,"range","rangeRound","interpolate","clamp")}function vn(de,Pe){return En(de,Rn(ii(de,Pe)[2])),En(de,Rn(ii(de,Pe)[2])),de}function ii(de,Pe){Pe==null&&(Pe=10);var Ke=pa(de),vt=Ke[1]-Ke[0],mt=Math.pow(10,Math.floor(Math.log(vt/Pe)/Math.LN10)),Tt=Pe/vt*mt;return Tt<=.15?mt*=10:Tt<=.35?mt*=5:Tt<=.75&&(mt*=2),Ke[0]=Math.ceil(Ke[0]/mt)*mt,Ke[1]=Math.floor(Ke[1]/mt)*mt+mt*.5,Ke[2]=mt,Ke}function Ui(de,Pe){return h.range.apply(h,ii(de,Pe))}h.scale.log=function(){return Di(h.scale.linear().domain([0,1]),10,!0,[1,10])};function Di(de,Pe,Ke,vt){function mt(Vt){return(Ke?Math.log(Vt<0?0:Vt):-Math.log(Vt>0?0:-Vt))/Math.log(Pe)}function Tt(Vt){return Ke?Math.pow(Pe,Vt):-Math.pow(Pe,-Vt)}function qt(Vt){return de(mt(Vt))}return qt.invert=function(Vt){return Tt(de.invert(Vt))},qt.domain=function(Vt){return arguments.length?(Ke=Vt[0]>=0,de.domain((vt=Vt.map(Number)).map(mt)),qt):vt},qt.base=function(Vt){return arguments.length?(Pe=+Vt,de.domain(vt.map(mt)),qt):Pe},qt.nice=function(){var Vt=En(vt.map(mt),Ke?Math:Hi);return de.domain(Vt),vt=Vt.map(Tt),qt},qt.ticks=function(){var Vt=pa(vt),or=[],Ir=Vt[0],Lr=Vt[1],Zr=Math.floor(mt(Ir)),ia=Math.ceil(mt(Lr)),la=Pe%1?2:Pe;if(isFinite(ia-Zr)){if(Ke){for(;Zr0;an--)or.push(Tt(Zr)*an);for(Zr=0;or[Zr]Lr;ia--);or=or.slice(Zr,ia)}return or},qt.copy=function(){return Di(de.copy(),Pe,Ke,vt)},Sn(qt,de)}var Hi={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};h.scale.pow=function(){return Vi(h.scale.linear(),1,[0,1])};function Vi(de,Pe,Ke){var vt=si(Pe),mt=si(1/Pe);function Tt(qt){return de(vt(qt))}return Tt.invert=function(qt){return mt(de.invert(qt))},Tt.domain=function(qt){return arguments.length?(de.domain((Ke=qt.map(Number)).map(vt)),Tt):Ke},Tt.ticks=function(qt){return Ui(Ke,qt)},Tt.tickFormat=function(qt,Vt){return d3_scale_linearTickFormat(Ke,qt,Vt)},Tt.nice=function(qt){return Tt.domain(vn(Ke,qt))},Tt.exponent=function(qt){return arguments.length?(vt=si(Pe=qt),mt=si(1/Pe),de.domain(Ke.map(vt)),Tt):Pe},Tt.copy=function(){return Vi(de.copy(),Pe,Ke)},Sn(Tt,de)}function si(de){return function(Pe){return Pe<0?-Math.pow(-Pe,de):Math.pow(Pe,de)}}h.scale.sqrt=function(){return h.scale.pow().exponent(.5)},h.scale.ordinal=function(){return Zn([],{t:"range",a:[[]]})};function Zn(de,Pe){var Ke,vt,mt;function Tt(Vt){return vt[((Ke.get(Vt)||(Pe.t==="range"?Ke.set(Vt,de.push(Vt)):NaN))-1)%vt.length]}function qt(Vt,or){return h.range(de.length).map(function(Ir){return Vt+or*Ir})}return Tt.domain=function(Vt){if(!arguments.length)return de;de=[],Ke=new A;for(var or=-1,Ir=Vt.length,Lr;++or0?Ke[Tt-1]:de[0],Ttia?0:1;if(Lr=Te)return or(Lr,an)+(Ir?or(Ir,1-an):"")+"Z";var da,La,Oa,Qa,on=0,Fa=0,Ln,oi,Kn,ai,Ti,ki,Go,Pi,oo=[];if((Qa=(+qt.apply(this,arguments)||0)/2)&&(Oa=vt===Ps?Math.sqrt(Ir*Ir+Lr*Lr):+vt.apply(this,arguments),an||(Fa*=-1),Lr&&(Fa=Mt(Oa/Lr*Math.sin(Qa))),Ir&&(on=Mt(Oa/Ir*Math.sin(Qa)))),Lr){Ln=Lr*Math.cos(Zr+Fa),oi=Lr*Math.sin(Zr+Fa),Kn=Lr*Math.cos(ia-Fa),ai=Lr*Math.sin(ia-Fa);var $o=Math.abs(ia-Zr-2*Fa)<=ge?0:1;if(Fa&&ql(Ln,oi,Kn,ai)===an^$o){var hl=(Zr+ia)/2;Ln=Lr*Math.cos(hl),oi=Lr*Math.sin(hl),Kn=ai=null}}else Ln=oi=0;if(Ir){Ti=Ir*Math.cos(ia-on),ki=Ir*Math.sin(ia-on),Go=Ir*Math.cos(Zr+on),Pi=Ir*Math.sin(Zr+on);var js=Math.abs(Zr-ia+2*on)<=ge?0:1;if(on&&ql(Ti,ki,Go,Pi)===1-an^js){var pi=(Zr+ia)/2;Ti=Ir*Math.cos(pi),ki=Ir*Math.sin(pi),Go=Pi=null}}else Ti=ki=0;if(la>We&&(da=Math.min(Math.abs(Lr-Ir)/2,+Ke.apply(this,arguments)))>.001){La=Ir0?0:1}function Xl(de,Pe,Ke,vt,mt){var Tt=de[0]-Pe[0],qt=de[1]-Pe[1],Vt=(mt?vt:-vt)/Math.sqrt(Tt*Tt+qt*qt),or=Vt*qt,Ir=-Vt*Tt,Lr=de[0]+or,Zr=de[1]+Ir,ia=Pe[0]+or,la=Pe[1]+Ir,an=(Lr+ia)/2,da=(Zr+la)/2,La=ia-Lr,Oa=la-Zr,Qa=La*La+Oa*Oa,on=Ke-vt,Fa=Lr*la-ia*Zr,Ln=(Oa<0?-1:1)*Math.sqrt(Math.max(0,on*on*Qa-Fa*Fa)),oi=(Fa*Oa-La*Ln)/Qa,Kn=(-Fa*La-Oa*Ln)/Qa,ai=(Fa*Oa+La*Ln)/Qa,Ti=(-Fa*La+Oa*Ln)/Qa,ki=oi-an,Go=Kn-da,Pi=ai-an,oo=Ti-da;return ki*ki+Go*Go>Pi*Pi+oo*oo&&(oi=ai,Kn=Ti),[[oi-or,Kn-Ir],[oi*Ke/on,Kn*Ke/on]]}function oc(){return!0}function Gl(de){var Pe=vi,Ke=Ei,vt=oc,mt=ll,Tt=mt.key,qt=.7;function Vt(or){var Ir=[],Lr=[],Zr=-1,ia=or.length,la,an=pt(Pe),da=pt(Ke);function La(){Ir.push("M",mt(de(Lr),qt))}for(;++Zr1?de.join("L"):de+"Z"}function Hu(de){return de.join("L")+"Z"}function Wi(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1&&mt.push("H",vt[0]),mt.join("")}function no(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1){Vt=Pe[1],Tt=de[or],or++,vt+="C"+(mt[0]+qt[0])+","+(mt[1]+qt[1])+","+(Tt[0]-Vt[0])+","+(Tt[1]-Vt[1])+","+Tt[0]+","+Tt[1];for(var Ir=2;Ir9&&(Tt=Ke*3/Math.sqrt(Tt),qt[Vt]=Tt*vt,qt[Vt+1]=Tt*mt));for(Vt=-1;++Vt<=or;)Tt=(de[Math.min(or,Vt+1)][0]-de[Math.max(0,Vt-1)][0])/(6*(1+qt[Vt]*qt[Vt])),Pe.push([Tt||0,qt[Vt]*Tt||0]);return Pe}function Ye(de){return de.length<3?ll(de):de[0]+P(de,Ve(de))}h.svg.line.radial=function(){var de=Gl(it);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function it(de){for(var Pe,Ke=-1,vt=de.length,mt,Tt;++Kege)+",1 "+Zr}function Ir(Lr,Zr,ia,la){return"Q 0,0 "+la}return Tt.radius=function(Lr){return arguments.length?(Ke=pt(Lr),Tt):Ke},Tt.source=function(Lr){return arguments.length?(de=pt(Lr),Tt):de},Tt.target=function(Lr){return arguments.length?(Pe=pt(Lr),Tt):Pe},Tt.startAngle=function(Lr){return arguments.length?(vt=pt(Lr),Tt):vt},Tt.endAngle=function(Lr){return arguments.length?(mt=pt(Lr),Tt):mt},Tt};function Lt(de){return de.radius}h.svg.diagonal=function(){var de=St,Pe=yt,Ke=nr;function vt(mt,Tt){var qt=de.call(this,mt,Tt),Vt=Pe.call(this,mt,Tt),or=(qt.y+Vt.y)/2,Ir=[qt,{x:qt.x,y:or},{x:Vt.x,y:or},Vt];return Ir=Ir.map(Ke),"M"+Ir[0]+"C"+Ir[1]+" "+Ir[2]+" "+Ir[3]}return vt.source=function(mt){return arguments.length?(de=pt(mt),vt):de},vt.target=function(mt){return arguments.length?(Pe=pt(mt),vt):Pe},vt.projection=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt};function nr(de){return[de.x,de.y]}h.svg.diagonal.radial=function(){var de=h.svg.diagonal(),Pe=nr,Ke=de.projection;return de.projection=function(vt){return arguments.length?Ke(cr(Pe=vt)):Pe},de};function cr(de){return function(){var Pe=de.apply(this,arguments),Ke=Pe[0],vt=Pe[1]-Ue;return[Ke*Math.cos(vt),Ke*Math.sin(vt)]}}h.svg.symbol=function(){var de=Pr,Pe=gr;function Ke(vt,mt){return(oa.get(de.call(this,vt,mt))||Vr)(Pe.call(this,vt,mt))}return Ke.type=function(vt){return arguments.length?(de=pt(vt),Ke):de},Ke.size=function(vt){return arguments.length?(Pe=pt(vt),Ke):Pe},Ke};function gr(){return 64}function Pr(){return"circle"}function Vr(de){var Pe=Math.sqrt(de/ge);return"M0,"+Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+-Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+Pe+"Z"}var oa=h.map({circle:Vr,cross:function(de){var Pe=Math.sqrt(de/5)/2;return"M"+-3*Pe+","+-Pe+"H"+-Pe+"V"+-3*Pe+"H"+Pe+"V"+-Pe+"H"+3*Pe+"V"+Pe+"H"+Pe+"V"+3*Pe+"H"+-Pe+"V"+Pe+"H"+-3*Pe+"Z"},diamond:function(de){var Pe=Math.sqrt(de/(2*Aa)),Ke=Pe*Aa;return"M0,"+-Pe+"L"+Ke+",0 0,"+Pe+" "+-Ke+",0Z"},square:function(de){var Pe=Math.sqrt(de)/2;return"M"+-Pe+","+-Pe+"L"+Pe+","+-Pe+" "+Pe+","+Pe+" "+-Pe+","+Pe+"Z"},"triangle-down":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+Ke+"L"+Pe+","+-Ke+" "+-Pe+","+-Ke+"Z"},"triangle-up":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+-Ke+"L"+Pe+","+Ke+" "+-Pe+","+Ke+"Z"}});h.svg.symbolTypes=oa.keys();var ca=Math.sqrt(3),Aa=Math.tan(30*Xe);Q.transition=function(de){for(var Pe=Si||++li,Ke=Wo(de),vt=[],mt,Tt,qt=yi||{time:Date.now(),ease:zi,delay:0,duration:250},Vt=-1,or=this.length;++Vt0;)Zr[--Qa].call(de,Oa);if(La>=1)return qt.event&&qt.event.end.call(de,de.__data__,Pe),--Tt.count?delete Tt[vt]:delete de[Ke],1}qt||(Vt=mt.time,or=en(ia,0,Vt),qt=Tt[vt]={tween:new A,time:Vt,timer:or,delay:mt.delay,duration:mt.duration,ease:mt.ease,index:Pe},mt=null,++Tt.count)}h.svg.axis=function(){var de=h.scale.linear(),Pe=Jo,Ke=6,vt=6,mt=3,Tt=[10],qt=null,Vt;function or(Ir){Ir.each(function(){var Lr=h.select(this),Zr=this.__chart__||de,ia=this.__chart__=de.copy(),la=qt??(ia.ticks?ia.ticks.apply(ia,Tt):ia.domain()),an=Vt??(ia.tickFormat?ia.tickFormat.apply(ia,Tt):F),da=Lr.selectAll(".tick").data(la,ia),La=da.enter().insert("g",".domain").attr("class","tick").style("opacity",We),Oa=h.transition(da.exit()).style("opacity",We).remove(),Qa=h.transition(da.order()).style("opacity",1),on=Math.max(Ke,0)+mt,Fa,Ln=Ja(ia),oi=Lr.selectAll(".domain").data([0]),Kn=(oi.enter().append("path").attr("class","domain"),h.transition(oi));La.append("line"),La.append("text");var ai=La.select("line"),Ti=Qa.select("line"),ki=da.select("text").text(an),Go=La.select("text"),Pi=Qa.select("text"),oo=Pe==="top"||Pe==="left"?-1:1,$o,hl,js,pi;if(Pe==="bottom"||Pe==="top"?(Fa=Gs,$o="x",js="y",hl="x2",pi="y2",ki.attr("dy",oo<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Ln[0]+","+oo*vt+"V0H"+Ln[1]+"V"+oo*vt)):(Fa=Mo,$o="y",js="x",hl="y2",pi="x2",ki.attr("dy",".32em").style("text-anchor",oo<0?"end":"start"),Kn.attr("d","M"+oo*vt+","+Ln[0]+"H0V"+Ln[1]+"H"+oo*vt)),ai.attr(pi,oo*Ke),Go.attr(js,oo*on),Ti.attr(hl,0).attr(pi,oo*Ke),Pi.attr($o,0).attr(js,oo*on),ia.rangeBand){var ko=ia,Xo=ko.rangeBand()/2;Zr=ia=function(Os){return ko(Os)+Xo}}else Zr.rangeBand?Zr=ia:Oa.call(Fa,ia,Zr);La.call(Fa,Zr,ia),Qa.call(Fa,ia,ia)})}return or.scale=function(Ir){return arguments.length?(de=Ir,or):de},or.orient=function(Ir){return arguments.length?(Pe=Ir in Qs?Ir+"":Jo,or):Pe},or.ticks=function(){return arguments.length?(Tt=S(arguments),or):Tt},or.tickValues=function(Ir){return arguments.length?(qt=Ir,or):qt},or.tickFormat=function(Ir){return arguments.length?(Vt=Ir,or):Vt},or.tickSize=function(Ir){var Lr=arguments.length;return Lr?(Ke=+Ir,vt=+arguments[Lr-1],or):Ke},or.innerTickSize=function(Ir){return arguments.length?(Ke=+Ir,or):Ke},or.outerTickSize=function(Ir){return arguments.length?(vt=+Ir,or):vt},or.tickPadding=function(Ir){return arguments.length?(mt=+Ir,or):mt},or.tickSubdivide=function(){return arguments.length&&or},or};var Jo="bottom",Qs={top:1,right:1,bottom:1,left:1};function Gs(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate("+(isFinite(mt)?mt:Ke(vt))+",0)"})}function Mo(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate(0,"+(isFinite(mt)?mt:Ke(vt))+")"})}h.svg.brush=function(){var de=oe(Lr,"brushstart","brush","brushend"),Pe=null,Ke=null,vt=[0,0],mt=[0,0],Tt,qt,Vt=!0,or=!0,Ir=fl[0];function Lr(da){da.each(function(){var La=h.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",an).on("touchstart.brush",an),Oa=La.selectAll(".background").data([0]);Oa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),La.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Qa=La.selectAll(".resize").data(Ir,F);Qa.exit().remove(),Qa.enter().append("g").attr("class",function(oi){return"resize "+oi}).style("cursor",function(oi){return Eo[oi]}).append("rect").attr("x",function(oi){return/[ew]$/.test(oi)?-3:null}).attr("y",function(oi){return/^[ns]/.test(oi)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Qa.style("display",Lr.empty()?"none":null);var on=h.transition(La),Fa=h.transition(Oa),Ln;Pe&&(Ln=Ja(Pe),Fa.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),ia(on)),Ke&&(Ln=Ja(Ke),Fa.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),la(on)),Zr(on)})}Lr.event=function(da){da.each(function(){var La=de.of(this,arguments),Oa={x:vt,y:mt,i:Tt,j:qt},Qa=this.__chart__||Oa;this.__chart__=Oa,Si?h.select(this).transition().each("start.brush",function(){Tt=Qa.i,qt=Qa.j,vt=Qa.x,mt=Qa.y,La({type:"brushstart"})}).tween("brush:brush",function(){var on=As(vt,Oa.x),Fa=As(mt,Oa.y);return Tt=qt=null,function(Ln){vt=Oa.x=on(Ln),mt=Oa.y=Fa(Ln),La({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Oa.i,qt=Oa.j,La({type:"brush",mode:"resize"}),La({type:"brushend"})}):(La({type:"brushstart"}),La({type:"brush",mode:"resize"}),La({type:"brushend"}))})};function Zr(da){da.selectAll(".resize").attr("transform",function(La){return"translate("+vt[+/e$/.test(La)]+","+mt[+/^s/.test(La)]+")"})}function ia(da){da.select(".extent").attr("x",vt[0]),da.selectAll(".extent,.n>rect,.s>rect").attr("width",vt[1]-vt[0])}function la(da){da.select(".extent").attr("y",mt[0]),da.selectAll(".extent,.e>rect,.w>rect").attr("height",mt[1]-mt[0])}function an(){var da=this,La=h.select(h.event.target),Oa=de.of(da,arguments),Qa=h.select(da),on=La.datum(),Fa=!/^(n|s)$/.test(on)&&Pe,Ln=!/^(e|w)$/.test(on)&&Ke,oi=La.classed("extent"),Kn=hr(da),ai,Ti=h.mouse(da),ki,Go=h.select(t(da)).on("keydown.brush",$o).on("keyup.brush",hl);if(h.event.changedTouches?Go.on("touchmove.brush",js).on("touchend.brush",ko):Go.on("mousemove.brush",js).on("mouseup.brush",ko),Qa.interrupt().selectAll("*").interrupt(),oi)Ti[0]=vt[0]-Ti[0],Ti[1]=mt[0]-Ti[1];else if(on){var Pi=+/w$/.test(on),oo=+/^n/.test(on);ki=[vt[1-Pi]-Ti[0],mt[1-oo]-Ti[1]],Ti[0]=vt[Pi],Ti[1]=mt[oo]}else h.event.altKey&&(ai=Ti.slice());Qa.style("pointer-events","none").selectAll(".resize").style("display",null),h.select("body").style("cursor",La.style("cursor")),Oa({type:"brushstart"}),js();function $o(){h.event.keyCode==32&&(oi||(ai=null,Ti[0]-=vt[1],Ti[1]-=mt[1],oi=2),ee())}function hl(){h.event.keyCode==32&&oi==2&&(Ti[0]+=vt[1],Ti[1]+=mt[1],oi=0,ee())}function js(){var Xo=h.mouse(da),Os=!1;ki&&(Xo[0]+=ki[0],Xo[1]+=ki[1]),oi||(h.event.altKey?(ai||(ai=[(vt[0]+vt[1])/2,(mt[0]+mt[1])/2]),Ti[0]=vt[+(Xo[0]0))return Wt;do Wt.push(dr=new Date(+Et)),De(Et,jt),he(Et);while(dr=Ct)for(;he(Ct),!Et(Ct);)Ct.setTime(Ct-1)},function(Ct,jt){if(Ct>=Ct)if(jt<0)for(;++jt<=0;)for(;De(Ct,-1),!Et(Ct););else for(;--jt>=0;)for(;De(Ct,1),!Et(Ct););})},tt&&($e.count=function(Et,Ct){return b.setTime(+Et),S.setTime(+Ct),he(b),he(S),Math.floor(tt(b,S))},$e.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?$e.filter(nt?function(Ct){return nt(Ct)%Et===0}:function(Ct){return $e.count(0,Ct)%Et===0}):$e}),$e}var e=E(function(){},function(he,De){he.setTime(+he+De)},function(he,De){return De-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(De){De.setTime(Math.floor(De/he)*he)},function(De,tt){De.setTime(+De+tt*he)},function(De,tt){return(tt-De)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,De){he.setTime(+he+De*r)},function(he,De){return(De-he)/r},function(he){return he.getUTCSeconds()}),f=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getMinutes()}),p=c.range,d=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getHours()}),T=d.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,De){he.setDate(he.getDate()+De)},function(he,De){return(De-he-(De.getTimezoneOffset()-he.getTimezoneOffset())*o)/i},function(he){return he.getDate()-1}),g=l.range;function x(he){return E(function(De){De.setDate(De.getDate()-(De.getDay()+7-he)%7),De.setHours(0,0,0,0)},function(De,tt){De.setDate(De.getDate()+tt*7)},function(De,tt){return(tt-De-(tt.getTimezoneOffset()-De.getTimezoneOffset())*o)/n})}var A=x(0),M=x(1),_=x(2),w=x(3),m=x(4),u=x(5),v=x(6),y=A.range,R=M.range,L=_.range,z=w.range,F=m.range,B=u.range,O=v.range,I=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,De){he.setMonth(he.getMonth()+De)},function(he,De){return De.getMonth()-he.getMonth()+(De.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),N=I.range,U=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,De){he.setFullYear(he.getFullYear()+De)},function(he,De){return De.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});U.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setFullYear(Math.floor(De.getFullYear()/he)*he),De.setMonth(0,1),De.setHours(0,0,0,0)},function(De,tt){De.setFullYear(De.getFullYear()+tt*he)})};var X=U.range,ee=E(function(he){he.setUTCSeconds(0,0)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getUTCMinutes()}),ue=ee.range,oe=E(function(he){he.setUTCMinutes(0,0,0)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getUTCHours()}),le=oe.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCDate(he.getUTCDate()+De)},function(he,De){return(De-he)/i},function(he){return he.getUTCDate()-1}),J=V.range;function te(he){return E(function(De){De.setUTCDate(De.getUTCDate()-(De.getUTCDay()+7-he)%7),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCDate(De.getUTCDate()+tt*7)},function(De,tt){return(tt-De)/n})}var Z=te(0),se=te(1),Q=te(2),q=te(3),re=te(4),ae=te(5),fe=te(6),be=Z.range,Me=se.range,Ie=Q.range,Le=q.range,je=re.range,et=ae.range,rt=fe.range,Je=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCMonth(he.getUTCMonth()+De)},function(he,De){return De.getUTCMonth()-he.getUTCMonth()+(De.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),Ze=Je.range,Ee=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCFullYear(he.getUTCFullYear()+De)},function(he,De){return De.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Ee.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setUTCFullYear(Math.floor(De.getUTCFullYear()/he)*he),De.setUTCMonth(0,1),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCFullYear(De.getUTCFullYear()+tt*he)})};var xe=Ee.range;h.timeDay=l,h.timeDays=g,h.timeFriday=u,h.timeFridays=B,h.timeHour=d,h.timeHours=T,h.timeInterval=E,h.timeMillisecond=e,h.timeMilliseconds=t,h.timeMinute=c,h.timeMinutes=p,h.timeMonday=M,h.timeMondays=R,h.timeMonth=I,h.timeMonths=N,h.timeSaturday=v,h.timeSaturdays=O,h.timeSecond=s,h.timeSeconds=f,h.timeSunday=A,h.timeSundays=y,h.timeThursday=m,h.timeThursdays=F,h.timeTuesday=_,h.timeTuesdays=L,h.timeWednesday=w,h.timeWednesdays=z,h.timeWeek=A,h.timeWeeks=y,h.timeYear=U,h.timeYears=X,h.utcDay=V,h.utcDays=J,h.utcFriday=ae,h.utcFridays=et,h.utcHour=oe,h.utcHours=le,h.utcMillisecond=e,h.utcMilliseconds=t,h.utcMinute=ee,h.utcMinutes=ue,h.utcMonday=se,h.utcMondays=Me,h.utcMonth=Je,h.utcMonths=Ze,h.utcSaturday=fe,h.utcSaturdays=rt,h.utcSecond=s,h.utcSeconds=f,h.utcSunday=Z,h.utcSundays=be,h.utcThursday=re,h.utcThursdays=je,h.utcTuesday=Q,h.utcTuesdays=Ie,h.utcWednesday=q,h.utcWednesdays=Le,h.utcWeek=Z,h.utcWeeks=be,h.utcYear=Ee,h.utcYears=xe,Object.defineProperty(h,"__esModule",{value:!0})})}}),bo=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,nc()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return We.setFullYear(Fe.y),We}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function E(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return We.setUTCFullYear(Fe.y),We}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,We,Ae){return{y:Fe,m:We,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var We=Fe.dateTime,Ae=Fe.date,ge=Fe.time,pe=Fe.periods,Te=Fe.days,Ue=Fe.shortDays,Xe=Fe.months,bt=Fe.shortMonths,xt=f(pe),Mt=c(pe),Nt=f(Te),sr=c(Te),ar=f(Ue),tr=c(Ue),Tr=f(Xe),sa=c(Xe),Ea=f(bt),ba=c(bt),Ia={a:Ha,A:Va,b:Za,B:rn,c:null,d:I,e:I,f:ue,H:N,I:U,j:X,L:ee,m:oe,M:le,p:wa,q:Bn,Q:Ct,s:jt,S:V,u:J,U:te,V:Z,w:se,W:Q,x:null,X:null,y:q,Y:re,Z:ae,"%":Et},Ra={a:Hn,A:At,b:ft,B:pr,c:null,d:fe,e:fe,f:je,H:be,I:Me,j:Ie,L:Le,m:et,M:rt,p:Sr,q:Er,Q:Ct,s:jt,S:Je,u:Ze,U:Ee,V:xe,w:he,W:De,x:null,X:null,y:tt,Y:nt,Z:$e,"%":Et},ya={a:Zt,A:$t,b:Cr,B:qr,c:Jr,d:m,e:m,f:z,H:v,I:v,j:u,L,m:w,M:y,p:It,q:_,Q:B,s:O,S:R,u:d,U:T,V:l,w:p,W:g,x:aa,X:Ca,y:A,Y:x,Z:M,"%":F};Ia.x=tn(Ae,Ia),Ia.X=tn(ge,Ia),Ia.c=tn(We,Ia),Ra.x=tn(Ae,Ra),Ra.X=tn(ge,Ra),Ra.c=tn(We,Ra);function tn(_r,Mr){return function(Gr){var Fr=[],pt=-1,Kt=0,xr=_r.length,Hr,fa,xa;for(Gr instanceof Date||(Gr=new Date(+Gr));++pt53)return null;"w"in Fr||(Fr.w=1),"Z"in Fr?(Kt=E(e(Fr.y,0,1)),xr=Kt.getUTCDay(),Kt=xr>4||xr===0?b.utcMonday.ceil(Kt):b.utcMonday(Kt),Kt=b.utcDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getUTCFullYear(),Fr.m=Kt.getUTCMonth(),Fr.d=Kt.getUTCDate()+(Fr.w+6)%7):(Kt=S(e(Fr.y,0,1)),xr=Kt.getDay(),Kt=xr>4||xr===0?b.timeMonday.ceil(Kt):b.timeMonday(Kt),Kt=b.timeDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getFullYear(),Fr.m=Kt.getMonth(),Fr.d=Kt.getDate()+(Fr.w+6)%7)}else("W"in Fr||"U"in Fr)&&("w"in Fr||(Fr.w="u"in Fr?Fr.u%7:"W"in Fr?1:0),xr="Z"in Fr?E(e(Fr.y,0,1)).getUTCDay():S(e(Fr.y,0,1)).getDay(),Fr.m=0,Fr.d="W"in Fr?(Fr.w+6)%7+Fr.W*7-(xr+5)%7:Fr.w+Fr.U*7-(xr+6)%7);return"Z"in Fr?(Fr.H+=Fr.Z/100|0,Fr.M+=Fr.Z%100,E(Fr)):S(Fr)}}function Yt(_r,Mr,Gr,Fr){for(var pt=0,Kt=Mr.length,xr=Gr.length,Hr,fa;pt=xr)return-1;if(Hr=Mr.charCodeAt(pt++),Hr===37){if(Hr=Mr.charAt(pt++),fa=ya[Hr in r?Mr.charAt(pt++):Hr],!fa||(Fr=fa(_r,Gr,Fr))<0)return-1}else if(Hr!=Gr.charCodeAt(Fr++))return-1}return Fr}function It(_r,Mr,Gr){var Fr=xt.exec(Mr.slice(Gr));return Fr?(_r.p=Mt[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Zt(_r,Mr,Gr){var Fr=ar.exec(Mr.slice(Gr));return Fr?(_r.w=tr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function $t(_r,Mr,Gr){var Fr=Nt.exec(Mr.slice(Gr));return Fr?(_r.w=sr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Cr(_r,Mr,Gr){var Fr=Ea.exec(Mr.slice(Gr));return Fr?(_r.m=ba[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function qr(_r,Mr,Gr){var Fr=Tr.exec(Mr.slice(Gr));return Fr?(_r.m=sa[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Jr(_r,Mr,Gr){return Yt(_r,We,Mr,Gr)}function aa(_r,Mr,Gr){return Yt(_r,Ae,Mr,Gr)}function Ca(_r,Mr,Gr){return Yt(_r,ge,Mr,Gr)}function Ha(_r){return Ue[_r.getDay()]}function Va(_r){return Te[_r.getDay()]}function Za(_r){return bt[_r.getMonth()]}function rn(_r){return Xe[_r.getMonth()]}function wa(_r){return pe[+(_r.getHours()>=12)]}function Bn(_r){return 1+~~(_r.getMonth()/3)}function Hn(_r){return Ue[_r.getUTCDay()]}function At(_r){return Te[_r.getUTCDay()]}function ft(_r){return bt[_r.getUTCMonth()]}function pr(_r){return Xe[_r.getUTCMonth()]}function Sr(_r){return pe[+(_r.getUTCHours()>=12)]}function Er(_r){return 1+~~(_r.getUTCMonth()/3)}return{format:function(_r){var Mr=tn(_r+="",Ia);return Mr.toString=function(){return _r},Mr},parse:function(_r){var Mr=mn(_r+="",!1);return Mr.toString=function(){return _r},Mr},utcFormat:function(_r){var Mr=tn(_r+="",Ra);return Mr.toString=function(){return _r},Mr},utcParse:function(_r){var Mr=mn(_r+="",!0);return Mr.toString=function(){return _r},Mr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,We,Ae){var ge=Fe<0?"-":"",pe=(ge?-Fe:Fe)+"",Te=pe.length;return ge+(Te68?1900:2e3),Ae+ge[0].length):-1}function M(Fe,We,Ae){var ge=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(We.slice(Ae,Ae+6));return ge?(Fe.Z=ge[1]?0:-(ge[2]+(ge[3]||"00")),Ae+ge[0].length):-1}function _(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+1));return ge?(Fe.q=ge[0]*3-3,Ae+ge[0].length):-1}function w(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.m=ge[0]-1,Ae+ge[0].length):-1}function m(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.d=+ge[0],Ae+ge[0].length):-1}function u(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.m=0,Fe.d=+ge[0],Ae+ge[0].length):-1}function v(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.H=+ge[0],Ae+ge[0].length):-1}function y(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.M=+ge[0],Ae+ge[0].length):-1}function R(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.S=+ge[0],Ae+ge[0].length):-1}function L(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.L=+ge[0],Ae+ge[0].length):-1}function z(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+6));return ge?(Fe.L=Math.floor(ge[0]/1e3),Ae+ge[0].length):-1}function F(Fe,We,Ae){var ge=a.exec(We.slice(Ae,Ae+1));return ge?Ae+ge[0].length:-1}function B(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.Q=+ge[0],Ae+ge[0].length):-1}function O(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.s=+ge[0],Ae+ge[0].length):-1}function I(Fe,We){return n(Fe.getDate(),We,2)}function N(Fe,We){return n(Fe.getHours(),We,2)}function U(Fe,We){return n(Fe.getHours()%12||12,We,2)}function X(Fe,We){return n(1+b.timeDay.count(b.timeYear(Fe),Fe),We,3)}function ee(Fe,We){return n(Fe.getMilliseconds(),We,3)}function ue(Fe,We){return ee(Fe,We)+"000"}function oe(Fe,We){return n(Fe.getMonth()+1,We,2)}function le(Fe,We){return n(Fe.getMinutes(),We,2)}function V(Fe,We){return n(Fe.getSeconds(),We,2)}function J(Fe){var We=Fe.getDay();return We===0?7:We}function te(Fe,We){return n(b.timeSunday.count(b.timeYear(Fe)-1,Fe),We,2)}function Z(Fe,We){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?b.timeThursday(Fe):b.timeThursday.ceil(Fe),n(b.timeThursday.count(b.timeYear(Fe),Fe)+(b.timeYear(Fe).getDay()===4),We,2)}function se(Fe){return Fe.getDay()}function Q(Fe,We){return n(b.timeMonday.count(b.timeYear(Fe)-1,Fe),We,2)}function q(Fe,We){return n(Fe.getFullYear()%100,We,2)}function re(Fe,We){return n(Fe.getFullYear()%1e4,We,4)}function ae(Fe){var We=Fe.getTimezoneOffset();return(We>0?"-":(We*=-1,"+"))+n(We/60|0,"0",2)+n(We%60,"0",2)}function fe(Fe,We){return n(Fe.getUTCDate(),We,2)}function be(Fe,We){return n(Fe.getUTCHours(),We,2)}function Me(Fe,We){return n(Fe.getUTCHours()%12||12,We,2)}function Ie(Fe,We){return n(1+b.utcDay.count(b.utcYear(Fe),Fe),We,3)}function Le(Fe,We){return n(Fe.getUTCMilliseconds(),We,3)}function je(Fe,We){return Le(Fe,We)+"000"}function et(Fe,We){return n(Fe.getUTCMonth()+1,We,2)}function rt(Fe,We){return n(Fe.getUTCMinutes(),We,2)}function Je(Fe,We){return n(Fe.getUTCSeconds(),We,2)}function Ze(Fe){var We=Fe.getUTCDay();return We===0?7:We}function Ee(Fe,We){return n(b.utcSunday.count(b.utcYear(Fe)-1,Fe),We,2)}function xe(Fe,We){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?b.utcThursday(Fe):b.utcThursday.ceil(Fe),n(b.utcThursday.count(b.utcYear(Fe),Fe)+(b.utcYear(Fe).getUTCDay()===4),We,2)}function he(Fe){return Fe.getUTCDay()}function De(Fe,We){return n(b.utcMonday.count(b.utcYear(Fe)-1,Fe),We,2)}function tt(Fe,We){return n(Fe.getUTCFullYear()%100,We,2)}function nt(Fe,We){return n(Fe.getUTCFullYear()%1e4,We,4)}function $e(){return"+0000"}function Et(){return"%"}function Ct(Fe){return+Fe}function jt(Fe){return Math.floor(+Fe/1e3)}var Wt;dr({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 dr(Fe){return Wt=t(Fe),h.timeFormat=Wt.format,h.timeParse=Wt.parse,h.utcFormat=Wt.utcFormat,h.utcParse=Wt.utcParse,Wt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Dr(Fe){return Fe.toISOString()}var hr=Date.prototype.toISOString?Dr:h.utcFormat(vr);function Ar(Fe){var We=new Date(Fe);return isNaN(We)?null:We}var gt=+new Date("2000-01-01T00:00:00.000Z")?Ar:h.utcParse(vr);h.isoFormat=hr,h.isoParse=gt,h.timeFormatDefaultLocale=dr,h.timeFormatLocale=t,Object.defineProperty(h,"__esModule",{value:!0})})}}),Fc=He({"node_modules/d3-format/dist/d3-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function S(w,m){if((u=(w=m?w.toExponential(m-1):w.toExponential()).indexOf("e"))<0)return null;var u,v=w.slice(0,u);return[v.length>1?v[0]+v.slice(2):v,+w.slice(u+1)]}function E(w){return w=S(Math.abs(w)),w?w[1]:NaN}function e(w,m){return function(u,v){for(var y=u.length,R=[],L=0,z=w[0],F=0;y>0&&z>0&&(F+z+1>v&&(z=Math.max(1,v-F)),R.push(u.substring(y-=z,y+z)),!((F+=z+1)>v));)z=w[L=(L+1)%w.length];return R.reverse().join(m)}}function t(w){return function(m){return m.replace(/[0-9]/g,function(u){return w[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(w){if(!(m=r.exec(w)))throw new Error("invalid format: "+w);var m;return new a({fill:m[1],align:m[2],sign:m[3],symbol:m[4],zero:m[5],width:m[6],comma:m[7],precision:m[8]&&m[8].slice(1),trim:m[9],type:m[10]})}o.prototype=a.prototype;function a(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}a.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 i(w){e:for(var m=w.length,u=1,v=-1,y;u0&&(v=0);break}return v>0?w.slice(0,v)+w.slice(y+1):w}var n;function s(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1],R=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,L=v.length;return R===L?v:R>L?v+new Array(R-L+1).join("0"):R>0?v.slice(0,R)+"."+v.slice(R):"0."+new Array(1-R).join("0")+S(w,Math.max(0,m+R-1))[0]}function f(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+v:v.length>y+1?v.slice(0,y+1)+"."+v.slice(y+1):v+new Array(y-v.length+2).join("0")}var c={"%":function(w,m){return(w*100).toFixed(m)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:b,e:function(w,m){return w.toExponential(m)},f:function(w,m){return w.toFixed(m)},g:function(w,m){return w.toPrecision(m)},o:function(w){return Math.round(w).toString(8)},p:function(w,m){return f(w*100,m)},r:f,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function p(w){return w}var d=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l(w){var m=w.grouping===void 0||w.thousands===void 0?p:e(d.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",v=w.currency===void 0?"":w.currency[1]+"",y=w.decimal===void 0?".":w.decimal+"",R=w.numerals===void 0?p:t(d.call(w.numerals,String)),L=w.percent===void 0?"%":w.percent+"",z=w.minus===void 0?"-":w.minus+"",F=w.nan===void 0?"NaN":w.nan+"";function B(I){I=o(I);var N=I.fill,U=I.align,X=I.sign,ee=I.symbol,ue=I.zero,oe=I.width,le=I.comma,V=I.precision,J=I.trim,te=I.type;te==="n"?(le=!0,te="g"):c[te]||(V===void 0&&(V=12),J=!0,te="g"),(ue||N==="0"&&U==="=")&&(ue=!0,N="0",U="=");var Z=ee==="$"?u:ee==="#"&&/[boxX]/.test(te)?"0"+te.toLowerCase():"",se=ee==="$"?v:/[%p]/.test(te)?L:"",Q=c[te],q=/[defgprs%]/.test(te);V=V===void 0?6:/[gprs]/.test(te)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function re(ae){var fe=Z,be=se,Me,Ie,Le;if(te==="c")be=Q(ae)+be,ae="";else{ae=+ae;var je=ae<0||1/ae<0;if(ae=isNaN(ae)?F:Q(Math.abs(ae),V),J&&(ae=i(ae)),je&&+ae==0&&X!=="+"&&(je=!1),fe=(je?X==="("?X:z:X==="-"||X==="("?"":X)+fe,be=(te==="s"?T[8+n/3]:"")+be+(je&&X==="("?")":""),q){for(Me=-1,Ie=ae.length;++MeLe||Le>57){be=(Le===46?y+ae.slice(Me+1):ae.slice(Me))+be,ae=ae.slice(0,Me);break}}}le&&!ue&&(ae=m(ae,1/0));var et=fe.length+ae.length+be.length,rt=et>1)+fe+ae+be+rt.slice(et);break;default:ae=rt+fe+ae+be;break}return R(ae)}return re.toString=function(){return I+""},re}function O(I,N){var U=B((I=o(I),I.type="f",I)),X=Math.max(-8,Math.min(8,Math.floor(E(N)/3)))*3,ee=Math.pow(10,-X),ue=T[8+X/3];return function(oe){return U(ee*oe)+ue}}return{format:B,formatPrefix:O}}var g;x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function x(w){return g=l(w),h.format=g.format,h.formatPrefix=g.formatPrefix,g}function A(w){return Math.max(0,-E(Math.abs(w)))}function M(w,m){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(m)/3)))*3-E(Math.abs(w)))}function _(w,m){return w=Math.abs(w),m=Math.abs(m)-w,Math.max(0,E(m)-E(w))+1}h.FormatSpecifier=a,h.formatDefaultLocale=x,h.formatLocale=l,h.formatSpecifier=o,h.precisionFixed=A,h.precisionPrefix=M,h.precisionRound=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),Eh=He({"node_modules/is-string-blank/index.js"(Y,G){G.exports=function(h){for(var b=h.length,S,E=0;E13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),Bi=He({"node_modules/fast-isnumeric/index.js"(Y,G){var h=Eh();G.exports=function(b){var S=typeof b;if(S==="string"){var E=b;if(b=+b,b===0&&h(E))return!1}else if(S!=="number")return!1;return b-b<1}}}),Yo=He({"src/constants/numerical.js"(Y,G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),_p=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h["base64-arraybuffer"]={}))})(Y,function(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E>2],n+=b[(o[a]&3)<<4|o[a+1]>>4],n+=b[(o[a+1]&15)<<2|o[a+2]>>6],n+=b[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,f,c,p;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var d=new ArrayBuffer(o),T=new Uint8Array(d);for(i=0;i>4,T[n++]=(f&15)<<4|c>>2,T[n++]=(c&3)<<6|p&63;return d};h.decode=t,h.encode=e,Object.defineProperty(h,"__esModule",{value:!0})})}}),Kv=He({"src/lib/is_plain_object.js"(Y,G){G.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),lh=He({"src/lib/array.js"(Y){var G=_p().decode,h=Kv(),b=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Y.isTypedArray=e;function t(s){return b(s)||e(s)}Y.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Y.isArray1D=r,Y.ensureArray=function(s,f){return b(s)||(s=[]),s.length=f,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Y.isArrayBuffer=a,Y.decodeTypedArraySpec=function(s){var f=[],c=i(s),p=c.dtype,d=o[p];if(!d)throw new Error('Error in dtype: "'+p+'"');var T=d.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var g=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");g.reverse();var x=g.length,A,M,_=+g[0],w=T*_,m=0;if(x===1)f=new d(l);else if(x===2)for(A=+g[1],M=0;M2)return d[A]=d[A]|e,g.set(x,null);if(l){for(f=A;f0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return h(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),X5=He({"src/lib/relink_private.js"(Y,G){var h=lh().isArrayOrTypedArray,b=Kv();G.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(h(r)&&h(o)&&b(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iE/2?S-Math.round(S/E)*E:S}G.exports={mod:h,modHalf:b}}}),If=He({"node_modules/tinycolor2/tinycolor.js"(Y,G){(function(h){var b=/^\s+/,S=/\s+$/,E=0,e=h.round,t=h.min,r=h.max,o=h.random;function a(q,re){if(q=q||"",re=re||{},q instanceof a)return q;if(!(this instanceof a))return new a(q,re);var ae=i(q);this._originalInput=q,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=e(100*this._a)/100,this._format=re.format||ae.format,this._gradientType=re.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=ae.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),re,ae,fe,be,Me,Ie;return re=q.r/255,ae=q.g/255,fe=q.b/255,re<=.03928?be=re/12.92:be=h.pow((re+.055)/1.055,2.4),ae<=.03928?Me=ae/12.92:Me=h.pow((ae+.055)/1.055,2.4),fe<=.03928?Ie=fe/12.92:Ie=h.pow((fe+.055)/1.055,2.4),.2126*be+.7152*Me+.0722*Ie},setAlpha:function(q){return this._a=I(q),this._roundA=e(100*this._a)/100,this},toHsv:function(){var q=c(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=c(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.v*100);return this._a==1?"hsv("+re+", "+ae+"%, "+fe+"%)":"hsva("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var q=s(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=s(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.l*100);return this._a==1?"hsl("+re+", "+ae+"%, "+fe+"%)":"hsla("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(q){return d(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return T(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(N(this._r,255)*100)+"%",g:e(N(this._g,255)*100)+"%",b:e(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%)":"rgba("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var re="#"+l(this._r,this._g,this._b,this._a),ae=re,fe=this._gradientType?"GradientType = 1, ":"";if(q){var be=a(q);ae="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+re+",endColorstr="+ae+")"},toString:function(q){var re=!!q;q=q||this._format;var ae=!1,fe=this._a<1&&this._a>=0,be=!re&&fe&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return be?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(ae=this.toRgbString()),q==="prgb"&&(ae=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(ae=this.toHexString()),q==="hex3"&&(ae=this.toHexString(!0)),q==="hex4"&&(ae=this.toHex8String(!0)),q==="hex8"&&(ae=this.toHex8String()),q==="name"&&(ae=this.toName()),q==="hsl"&&(ae=this.toHslString()),q==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(q,re){var ae=q.apply(null,[this].concat([].slice.call(re)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(q,re){return q.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(q,re){if(typeof q=="object"){var ae={};for(var fe in q)q.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=q[fe]:ae[fe]=le(q[fe]));q=ae}return a(q,re)};function i(q){var re={r:0,g:0,b:0},ae=1,fe=null,be=null,Me=null,Ie=!1,Le=!1;return typeof q=="string"&&(q=se(q)),typeof q=="object"&&(Z(q.r)&&Z(q.g)&&Z(q.b)?(re=n(q.r,q.g,q.b),Ie=!0,Le=String(q.r).substr(-1)==="%"?"prgb":"rgb"):Z(q.h)&&Z(q.s)&&Z(q.v)?(fe=le(q.s),be=le(q.v),re=p(q.h,fe,be),Ie=!0,Le="hsv"):Z(q.h)&&Z(q.s)&&Z(q.l)&&(fe=le(q.s),Me=le(q.l),re=f(q.h,fe,Me),Ie=!0,Le="hsl"),q.hasOwnProperty("a")&&(ae=q.a)),ae=I(ae),{ok:Ie,format:q.format||Le,r:t(255,r(re.r,0)),g:t(255,r(re.g,0)),b:t(255,r(re.b,0)),a:ae}}function n(q,re,ae){return{r:N(q,255)*255,g:N(re,255)*255,b:N(ae,255)*255}}function s(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=(fe+be)/2;if(fe==be)Me=Ie=0;else{var je=fe-be;switch(Ie=Le>.5?je/(2-fe-be):je/(fe+be),fe){case q:Me=(re-ae)/je+(re1&&(Je-=1),Je<1/6?et+(rt-et)*6*Je:Je<1/2?rt:Je<2/3?et+(rt-et)*(2/3-Je)*6:et}if(re===0)fe=be=Me=ae;else{var Le=ae<.5?ae*(1+re):ae+re-ae*re,je=2*ae-Le;fe=Ie(je,Le,q+1/3),be=Ie(je,Le,q),Me=Ie(je,Le,q-1/3)}return{r:fe*255,g:be*255,b:Me*255}}function c(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=fe,je=fe-be;if(Ie=fe===0?0:je/fe,fe==be)Me=0;else{switch(fe){case q:Me=(re-ae)/je+(re>1)+720)%360;--re;)fe.h=(fe.h+be)%360,Me.push(a(fe));return Me}function z(q,re){re=re||6;for(var ae=a(q).toHsv(),fe=ae.h,be=ae.s,Me=ae.v,Ie=[],Le=1/re;re--;)Ie.push(a({h:fe,s:be,v:Me})),Me=(Me+Le)%1;return Ie}a.mix=function(q,re,ae){ae=ae===0?0:ae||50;var fe=a(q).toRgb(),be=a(re).toRgb(),Me=ae/100,Ie={r:(be.r-fe.r)*Me+fe.r,g:(be.g-fe.g)*Me+fe.g,b:(be.b-fe.b)*Me+fe.b,a:(be.a-fe.a)*Me+fe.a};return a(Ie)},a.readability=function(q,re){var ae=a(q),fe=a(re);return(h.max(ae.getLuminance(),fe.getLuminance())+.05)/(h.min(ae.getLuminance(),fe.getLuminance())+.05)},a.isReadable=function(q,re,ae){var fe=a.readability(q,re),be,Me;switch(Me=!1,be=Q(ae),be.level+be.size){case"AAsmall":case"AAAlarge":Me=fe>=4.5;break;case"AAlarge":Me=fe>=3;break;case"AAAsmall":Me=fe>=7;break}return Me},a.mostReadable=function(q,re,ae){var fe=null,be=0,Me,Ie,Le,je;ae=ae||{},Ie=ae.includeFallbackColors,Le=ae.level,je=ae.size;for(var et=0;etbe&&(be=Me,fe=a(re[et]));return a.isReadable(q,fe,{level:Le,size:je})||!Ie?fe:(ae.includeFallbackColors=!1,a.mostReadable(q,["#fff","#000"],ae))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=a.hexNames=O(F);function O(q){var re={};for(var ae in q)q.hasOwnProperty(ae)&&(re[q[ae]]=ae);return re}function I(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function N(q,re){ee(q)&&(q="100%");var ae=ue(q);return q=t(re,r(0,parseFloat(q))),ae&&(q=parseInt(q*re,10)/100),h.abs(q-re)<1e-6?1:q%re/parseFloat(re)}function U(q){return t(1,r(0,q))}function X(q){return parseInt(q,16)}function ee(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ue(q){return typeof q=="string"&&q.indexOf("%")!=-1}function oe(q){return q.length==1?"0"+q:""+q}function le(q){return q<=1&&(q=q*100+"%"),q}function V(q){return h.round(parseFloat(q)*255).toString(16)}function J(q){return X(q)/255}var te=function(){var q="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+re+")|(?:"+q+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",be="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Z(q){return!!te.CSS_UNIT.exec(q)}function se(q){q=q.replace(b,"").replace(S,"").toLowerCase();var re=!1;if(F[q])q=F[q],re=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=te.rgb.exec(q))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=te.rgba.exec(q))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=te.hsl.exec(q))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=te.hsla.exec(q))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=te.hsv.exec(q))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=te.hsva.exec(q))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=te.hex8.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),a:J(ae[4]),format:re?"name":"hex8"}:(ae=te.hex6.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),format:re?"name":"hex"}:(ae=te.hex4.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),a:J(ae[4]+""+ae[4]),format:re?"name":"hex8"}:(ae=te.hex3.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),format:re?"name":"hex"}:!1}function Q(q){var re,ae;return q=q||{level:"AA",size:"small"},re=(q.level||"AA").toUpperCase(),ae=(q.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:re,size:ae}}typeof G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Co=He({"src/lib/extend.js"(Y){var G=Kv(),h=Array.isArray;function b(E,e){var t,r;for(t=0;t=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=1)return a}var p=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+p+", "+s[3]+")":"rgb("+p+")"}}}),Id=He({"src/constants/interactions.js"(Y,G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),C0=He({"src/lib/regex.js"(Y){Y.counter=function(G,h,b,S){var E=(h||"")+(b?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),Z5=He({"src/lib/coerce.js"(Y){var G=Bi(),h=If(),b=Co().extendFlat,S=Pl(),E=xp(),e=Ri(),t=Id().DESELECTDIM,r=Gm(),o=C0().counter,a=E0().modHalf,i=lh().isArrayOrTypedArray,n=lh().isTypedArraySpec,s=lh().decodeTypedArraySpec;Y.valObjectMeta={data_array:{coerceFunction:function(c,p,d){p.set(i(c)?c:n(c)?s(c):d)}},enumerated:{coerceFunction:function(c,p,d,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?p.set(d):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var d=p.values,T=0;Tg===!0||g===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?p.set(c):p.set(d)}},number:{coerceFunction:function(c,p,d,T){n(c)&&(c=s(c)),!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},integer:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},string:{coerceFunction:function(c,p,d,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?p.set(d):p.set(String(c))}else T.noBlank&&!c?p.set(d):p.set(c)}},color:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),h(c).isValid()?p.set(c):p.set(d)}},colorlist:{coerceFunction:function(c,p,d){function T(l){return h(l).isValid()}!Array.isArray(c)||!c.length?p.set(d):c.every(T)?p.set(c):p.set(d)}},colorscale:{coerceFunction:function(c,p,d){p.set(E.get(c,d))}},angle:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),c==="auto"?p.set("auto"):G(c)?p.set(a(+c,360)):p.set(d)}},subplotid:{coerceFunction:function(c,p,d,T){var l=T.regex||o(d);const g=x=>typeof x=="string"&&l.test(x);g(c)||T.arrayOk&&i(c)&&c.length>0&&c.every(g)?p.set(c):p.set(d)},validateFunction:function(c,p){var d=p.dflt;return c===d?!0:typeof c!="string"?!1:!!o(d).test(c)}},flaglist:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(d);return}for(var l=c.split("+"),g=0;g/g),c=0;c1){var e=["LOG:"];for(E=0;E1){var t=[];for(E=0;E"),"long")}},S.warn=function(){var E;if(h.logging>0){var e=["WARN:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}},S.error=function(){var E;if(h.logging>0){var e=["ERROR:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}}}}),Xy=He({"src/lib/noop.js"(Y,G){G.exports=function(){}}}),nb=He({"src/lib/push_unique.js"(Y,G){G.exports=function(b,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;esh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>sh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Y.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),Yy=He({"src/components/shapes/label_texttemplate.js"(Y,G){function h(g,x){return x?x.d2l(g):g}function b(g,x){return x?x.l2d(g):g}function S(g){return g.x0}function E(g){return g.x1}function e(g){return g.y0}function t(g){return g.y1}function r(g){return g.x0shift||0}function o(g){return g.x1shift||0}function a(g){return g.y0shift||0}function i(g){return g.y1shift||0}function n(g,x){return h(g.x1,x)+o(g)-h(g.x0,x)-r(g)}function s(g,x,A){return h(g.y1,A)+i(g)-h(g.y0,A)-a(g)}function f(g,x){return Math.abs(n(g,x))}function c(g,x,A){return Math.abs(s(g,x,A))}function p(g,x,A){return g.type!=="line"?void 0:Math.sqrt(Math.pow(n(g,x),2)+Math.pow(s(g,x,A),2))}function d(g,x){return b((h(g.x1,x)+o(g)+h(g.x0,x)+r(g))/2,x)}function T(g,x,A){return b((h(g.y1,A)+i(g)+h(g.y0,A)+a(g))/2,A)}function l(g,x,A){return g.type!=="line"?void 0:s(g,x,A)/n(g,x)}G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:n,dy:s,width:f,height:c,length:p,xcenter:d,ycenter:T}}}),TA=He({"src/components/shapes/draw_newshape/attributes.js"(Y,G){var h=Nu().overrideAll,b=Pl(),S=Su(),E=jf().dash,e=Co().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=bl(),o=Yy();G.exports=h({newshape:{visible:e({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},b.legend,{}),legendgroup:e({},b.legendgroup,{}),legendgrouptitle:{text:e({},b.legendgrouptitle.text,{}),font:S({})},legendrank:e({},b.legendrank,{}),legendwidth:e({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),AA=He({"src/components/selections/draw_newselection/attributes.js"(Y,G){var h=jf().dash,b=Co().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},h,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ky=He({"src/plots/pad_attributes.js"(Y,G){G.exports=function(h){var b=h.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),L0=He({"src/plots/layout_attributes.js"(Y,G){var h=Su(),b=Xm(),S=hf(),E=TA(),e=AA(),t=Ky(),r=Co().extendFlat,o=h({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(t({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},b.transition,{editType:"none"})}}}),SA=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97")){var Y=document.createElement("style");Y.id="696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97",Y.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Y)}})()}}),Ni=He({"src/registry.js"(Y){var G=Rd(),h=Xy(),b=nb(),S=Kv(),E=Wm().addStyleRule,e=Co(),t=Pl(),r=L0(),o=e.extendFlat,a=e.extendDeepAll;Y.modules={},Y.allCategories={},Y.allTypes=[],Y.subplotsRegistry={},Y.componentsRegistry={},Y.layoutArrayContainers=[],Y.layoutArrayRegexes=[],Y.traceLayoutAttributes={},Y.localeRegistry={},Y.apiMethodRegistry={},Y.collectableSubplotTypes=null,Y.register=function(x){if(Y.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A=l&&F<=g?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var U=d(B),X=F.charAt(0);U&&(X==="G"||X==="g")&&(F=F.slice(1),B="");var ee=U&&B.slice(0,7)==="chinese",ue=F.match(ee?c:f);if(!ue)return e;var oe=ue[1],le=ue[3]||"1",V=Number(ue[5]||1),J=Number(ue[7]||0),te=Number(ue[9]||0),Z=Number(ue[11]||0);if(U){if(oe.length===2)return e;oe=Number(oe);var se;try{var Q=n.getComponentMethod("calendars","getCal")(B);if(ee){var q=le.charAt(le.length-1)==="i";le=parseInt(le,10),se=Q.newDate(oe,Q.toMonthIndex(oe,le,q),V)}else se=Q.newDate(oe,Number(le),V)}catch{return e}return se?(se.toJD()-i)*t+J*r+te*o+Z*a:e}oe.length===2?oe=(Number(oe)+2e3-p)%100+p:oe=Number(oe),le-=1;var re=new Date(Date.UTC(2e3,le,V,J,te));return re.setUTCFullYear(oe),re.getUTCMonth()!==le||re.getUTCDate()!==V?e:re.getTime()+Z*a},l=Y.MIN_MS=Y.dateTime2ms("-9999"),g=Y.MAX_MS=Y.dateTime2ms("9999-12-31 23:59:59.9999"),Y.isDateTime=function(F,B){return Y.dateTime2ms(F,B)!==e};function x(F,B){return String(F+Math.pow(10,B)).slice(1)}var A=90*t,M=3*r,_=5*o;Y.ms2DateTime=function(F,B,O){if(typeof F!="number"||!(F>=l&&F<=g))return e;B||(B=0);var I=Math.floor(S(F+.05,1)*10),N=Math.round(F-I/10),U,X,ee,ue,oe,le;if(d(O)){var V=Math.floor(N/t)+i,J=Math.floor(S(F,t));try{U=n.getComponentMethod("calendars","getCal")(O).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(N))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;X=B=l+t&&F<=g-t))return e;var B=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-B/10)),I=G("%Y-%m-%d")(O),N=O.getHours(),U=O.getMinutes(),X=O.getSeconds(),ee=O.getUTCMilliseconds()*10+B;return w(I,N,U,X,ee)};function w(F,B,O,I,N){if((B||O||I||N)&&(F+=" "+x(B,2)+":"+x(O,2),(I||N)&&(F+=":"+x(I,2),N))){for(var U=4;N%10===0;)U-=1,N/=10;F+="."+x(N,U)}return F}Y.cleanDate=function(F,B,O){if(F===e)return B;if(Y.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(d(O))return b.error("JS Dates and milliseconds are incompatible with world calendars",F),B;if(F=Y.ms2DateTimeLocal(+F),!F&&B!==void 0)return B}else if(!Y.isDateTime(F,O))return b.error("unrecognized date",F),B;return F};var m=/%\d?f/g,u=/%h/g,v={1:"1",2:"1",3:"2",4:"2"};function y(F,B,O,I){F=F.replace(m,function(U){var X=Math.min(+U.charAt(1)||6,6),ee=(B/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return ee});var N=new Date(Math.floor(B+.05));if(F=F.replace(u,function(){return v[O("%q")(N)]}),d(I))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,B,I)}catch{return"Invalid"}return O(F)(N)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,B){var O=S(F+.05,t),I=x(Math.floor(O/r),2)+":"+x(S(Math.floor(O/o),60),2);if(B!=="M"){h(B)||(B=0);var N=Math.min(S(F/a,60),R[B]),U=(100+N).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),I+=":"+U}return I}Y.formatDate=function(F,B,O,I,N,U){if(N=d(N)&&N,!B)if(O==="y")B=U.year;else if(O==="m")B=U.month;else if(O==="d")B=U.dayMonth+` diff --git a/dashboard/static/index.html b/dashboard/static/index.html index 190fa515..374c9650 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -6,8 +6,8 @@ AlphaTrion - - + + diff --git a/tests/integration/server/test_graphql_mutation.py b/tests/integration/server/test_graphql_mutation.py index 9272dbc4..cf5de05f 100644 --- a/tests/integration/server/test_graphql_mutation.py +++ b/tests/integration/server/test_graphql_mutation.py @@ -6,6 +6,7 @@ from alphatrion.server.graphql.schema import schema from alphatrion.storage import runtime +from alphatrion.storage.sql_models import Status def unique_username(base: str) -> str: @@ -502,3 +503,458 @@ def test_update_user(): assert response.errors is None assert response.data["updateUser"]["id"] == str(user_id) assert response.data["updateUser"]["meta"] == {"foo": "fuz", "newKey": "newValue"} + + +def test_delete_experiment(): + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and experiment + team_id = metadb.create_team(name="Experiment Team") + user_id = metadb.create_user( + username=unique_username("expuser"), + email=unique_email("expuser"), + team_id=team_id, + ) + experiment_id = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment to Delete" + ) + + # Verify experiment exists + experiment = metadb.get_experiment(experiment_id=experiment_id) + assert experiment is not None + assert experiment.name == "Experiment to Delete" + + # Delete experiment via mutation + mutation = f""" + mutation {{ + deleteExperiment(experimentId: "{experiment_id}") + }} + """ + response = schema.execute_sync( + mutation, + variable_values={}, + ) + assert response.errors is None + assert response.data["deleteExperiment"] is True + + # Verify experiment is marked as deleted in database + deleted_experiment = metadb.get_experiment(experiment_id=experiment_id) + assert deleted_experiment is None + + +def test_delete_experiments_batch(): + """Test deleting multiple experiments at once""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="Batch Delete Team") + user_id = metadb.create_user( + username=unique_username("batchuser"), + email=unique_email("batchuser"), + team_id=team_id, + ) + + # Create multiple experiments + exp_id_1 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment 1" + ) + exp_id_2 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment 2" + ) + exp_id_3 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment 3" + ) + + # Verify all experiments exist + assert metadb.get_experiment(experiment_id=exp_id_1) is not None + assert metadb.get_experiment(experiment_id=exp_id_2) is not None + assert metadb.get_experiment(experiment_id=exp_id_3) is not None + + # Delete multiple experiments via batch mutation + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id_1}", "{exp_id_2}", "{exp_id_3}"]) + }} + """ + response = schema.execute_sync( + mutation, + variable_values={}, + ) + assert response.errors is None + assert response.data["deleteExperiments"] == 3 + + # Verify all experiments are marked as deleted + assert metadb.get_experiment(experiment_id=exp_id_1) is None + assert metadb.get_experiment(experiment_id=exp_id_2) is None + assert metadb.get_experiment(experiment_id=exp_id_3) is None + + +def test_delete_experiments_partial(): + """Test deleting some valid and some invalid experiment IDs""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="Partial Delete Team") + user_id = metadb.create_user( + username=unique_username("partialuser"), + email=unique_email("partialuser"), + team_id=team_id, + ) + + # Create two experiments + exp_id_1 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Valid Experiment 1" + ) + exp_id_2 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Valid Experiment 2" + ) + + # Create a fake experiment ID + fake_exp_id = uuid.uuid4() + + # Delete experiments (including one that doesn't exist) + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id_1}", "{fake_exp_id}", "{exp_id_2}"]) + }} + """ + response = schema.execute_sync( + mutation, + variable_values={}, + ) + assert response.errors is None + # Should only delete the 2 valid experiments + assert response.data["deleteExperiments"] == 2 + + # Verify valid experiments are deleted, fake one was ignored + assert metadb.get_experiment(experiment_id=exp_id_1) is None + assert metadb.get_experiment(experiment_id=exp_id_2) is None + + +def test_delete_experiments_empty_list(): + """Test deleting with an empty list of experiment IDs""" + runtime.init() + + mutation = """ + mutation { + deleteExperiments(experimentIds: []) + } + """ + response = schema.execute_sync( + mutation, + variable_values={}, + ) + assert response.errors is None + assert response.data["deleteExperiments"] == 0 + + +def test_delete_experiments_already_deleted(): + """Test deleting experiments that are already deleted""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="Already Deleted Team") + user_id = metadb.create_user( + username=unique_username("deluser"), + email=unique_email("deluser"), + team_id=team_id, + ) + + # Create an experiment + exp_id = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment to Delete Twice" + ) + + # Delete it once + metadb.delete_experiment(experiment_id=exp_id) + assert metadb.get_experiment(experiment_id=exp_id) is None + + # Try to delete it again via batch mutation + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id}"]) + }} + """ + response = schema.execute_sync( + mutation, + variable_values={}, + ) + assert response.errors is None + # Should return 0 since the experiment is already deleted + assert response.data["deleteExperiments"] == 0 + + +def test_delete_experiment_deletes_runs(): + """Test that deleting an experiment also deletes its runs""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team, user, and experiment + team_id = metadb.create_team(name="Run Delete Team") + user_id = metadb.create_user( + username=unique_username("runuser"), + email=unique_email("runuser"), + team_id=team_id, + ) + experiment_id = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment with Runs" + ) + + # Create some runs for this experiment + run_id_1 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=experiment_id + ) + run_id_2 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=experiment_id + ) + + # Verify runs exist + run_1 = metadb.get_run(run_id=run_id_1) + run_2 = metadb.get_run(run_id=run_id_2) + assert run_1 is not None + assert run_2 is not None + + # Delete experiment via mutation + mutation = f""" + mutation {{ + deleteExperiment(experimentId: "{experiment_id}") + }} + """ + response = schema.execute_sync(mutation, variable_values={}) + assert response.errors is None + assert response.data["deleteExperiment"] is True + + # Verify experiment is deleted + deleted_experiment = metadb.get_experiment(experiment_id=experiment_id) + assert deleted_experiment is None + + # Verify runs are also deleted + deleted_run_1 = metadb.get_run(run_id=run_id_1) + deleted_run_2 = metadb.get_run(run_id=run_id_2) + assert deleted_run_1 is None + assert deleted_run_2 is None + + +def test_delete_experiments_batch_deletes_runs(): + """Test that batch deleting experiments also deletes their runs""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="Batch Run Delete Team") + user_id = metadb.create_user( + username=unique_username("batchrunuser"), + email=unique_email("batchrunuser"), + team_id=team_id, + ) + + # Create multiple experiments with runs + exp_id_1 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment 1 with Runs" + ) + run_1_1 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_1 + ) + run_1_2 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_1 + ) + + exp_id_2 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Experiment 2 with Runs" + ) + run_2_1 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_2 + ) + run_2_2 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_2 + ) + + # Verify all runs exist + assert metadb.get_run(run_id=run_1_1) is not None + assert metadb.get_run(run_id=run_1_2) is not None + assert metadb.get_run(run_id=run_2_1) is not None + assert metadb.get_run(run_id=run_2_2) is not None + + # Batch delete experiments + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id_1}", "{exp_id_2}"]) + }} + """ + response = schema.execute_sync(mutation, variable_values={}) + assert response.errors is None + assert response.data["deleteExperiments"] == 2 + + # Verify experiments are deleted + assert metadb.get_experiment(experiment_id=exp_id_1) is None + assert metadb.get_experiment(experiment_id=exp_id_2) is None + + # Verify all runs are also deleted + assert metadb.get_run(run_id=run_1_1) is None + assert metadb.get_run(run_id=run_1_2) is None + assert metadb.get_run(run_id=run_2_1) is None + assert metadb.get_run(run_id=run_2_2) is None + + +def test_delete_running_experiment_fails(): + """Test that deleting a running experiment raises an error""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team, user, and experiment + team_id = metadb.create_team(name="Running Experiment Team") + user_id = metadb.create_user( + username=unique_username("runninguser"), + email=unique_email("runninguser"), + team_id=team_id, + ) + experiment_id = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Running Experiment" + ) + + # Set experiment status to RUNNING + metadb.update_experiment(experiment_id=experiment_id, status=Status.RUNNING) + + # Verify experiment is running + exp = metadb.get_experiment(experiment_id=experiment_id) + assert exp is not None + assert exp.status == Status.RUNNING + + # Try to delete running experiment via mutation + mutation = f""" + mutation {{ + deleteExperiment(experimentId: "{experiment_id}") + }} + """ + response = schema.execute_sync(mutation, variable_values={}) + + # Should return an error + assert response.errors is not None + assert "Cannot delete a running experiment" in str(response.errors[0]) + + # Verify experiment still exists + exp = metadb.get_experiment(experiment_id=experiment_id) + assert exp is not None + assert exp.status == Status.RUNNING + + +def test_delete_experiments_skips_running(): + """Test that batch delete skips running experiments""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="Mixed Status Team") + user_id = metadb.create_user( + username=unique_username("mixeduser"), + email=unique_email("mixeduser"), + team_id=team_id, + ) + + # Create multiple experiments with different statuses + exp_id_1 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Completed Experiment" + ) + metadb.update_experiment(experiment_id=exp_id_1, status=Status.COMPLETED) + + exp_id_2 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Running Experiment" + ) + metadb.update_experiment(experiment_id=exp_id_2, status=Status.RUNNING) + + exp_id_3 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Failed Experiment" + ) + metadb.update_experiment(experiment_id=exp_id_3, status=Status.FAILED) + + # Create runs for all experiments + run_id_1 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_1 + ) + run_id_2 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_2 + ) + run_id_3 = metadb.create_run( + team_id=team_id, user_id=user_id, experiment_id=exp_id_3 + ) + + # Verify all experiments exist + assert metadb.get_experiment(experiment_id=exp_id_1) is not None + assert metadb.get_experiment(experiment_id=exp_id_2) is not None + assert metadb.get_experiment(experiment_id=exp_id_3) is not None + + # Try to batch delete all experiments + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id_1}", "{exp_id_2}", "{exp_id_3}"]) + }} + """ + response = schema.execute_sync(mutation, variable_values={}) + assert response.errors is None + # Should only delete 2 experiments (skipped the running one) + assert response.data["deleteExperiments"] == 2 + + # Verify running experiment still exists + exp_2 = metadb.get_experiment(experiment_id=exp_id_2) + assert exp_2 is not None + assert exp_2.status == Status.RUNNING + + # Verify non-running experiments are deleted + assert metadb.get_experiment(experiment_id=exp_id_1) is None + assert metadb.get_experiment(experiment_id=exp_id_3) is None + + # Verify runs of deleted experiments are also deleted + assert metadb.get_run(run_id=run_id_1) is None + assert metadb.get_run(run_id=run_id_3) is None + + # Verify run of running experiment still exists + run_2 = metadb.get_run(run_id=run_id_2) + assert run_2 is not None + + +def test_delete_experiments_all_running(): + """Test that batch delete returns 0 when all experiments are running""" + runtime.init() + metadb = runtime.storage_runtime().metadb + + # Create a team and user + team_id = metadb.create_team(name="All Running Team") + user_id = metadb.create_user( + username=unique_username("allrunninguser"), + email=unique_email("allrunninguser"), + team_id=team_id, + ) + + # Create multiple running experiments + exp_id_1 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Running Experiment 1" + ) + metadb.update_experiment(experiment_id=exp_id_1, status=Status.RUNNING) + + exp_id_2 = metadb.create_experiment( + team_id=team_id, user_id=user_id, name="Running Experiment 2" + ) + metadb.update_experiment(experiment_id=exp_id_2, status=Status.RUNNING) + + # Try to batch delete all running experiments + mutation = f""" + mutation {{ + deleteExperiments(experimentIds: ["{exp_id_1}", "{exp_id_2}"]) + }} + """ + response = schema.execute_sync(mutation, variable_values={}) + assert response.errors is None + # Should delete 0 experiments (all are running) + assert response.data["deleteExperiments"] == 0 + + # Verify all experiments still exist + exp_1 = metadb.get_experiment(experiment_id=exp_id_1) + exp_2 = metadb.get_experiment(experiment_id=exp_id_2) + assert exp_1 is not None + assert exp_2 is not None + assert exp_1.status == Status.RUNNING + assert exp_2.status == Status.RUNNING