@theoremjs/studio 0.3.4-next.526.g51bc66f → 0.3.4-next.528.g44c76f9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/page/assets/{Banner-DcgTcVVW.js → Banner-BhKnM-76.js} +2 -2
- package/page/assets/{ConsoleFrame-Dep1lvnm.js → ConsoleFrame-CnGU8SiE.js} +1 -1
- package/page/assets/{ContextMenu-NgzKbTao.js → ContextMenu-G2oYmfwG.js} +2 -2
- package/page/assets/{ToolResultCharts-CFvHRt5v.js → ToolResultCharts-DpaHoQFj.js} +1 -1
- package/page/assets/{TraceInspector-D92rKzc_.js → TraceInspector-Bo0PzFVf.js} +1 -1
- package/page/assets/{TraceOverview-m12m2XgM.js → TraceOverview-CM-sd2zM.js} +1 -1
- package/page/assets/{browser-engine-DL-WovTC.js → browser-engine-BJYQz5d_.js} +1 -1
- package/page/assets/{browser-transport-CmAIXFia.js → browser-transport-YKpXhacP.js} +3 -3
- package/page/assets/{export-agent-C8_6CZgy.js → export-agent-CtklkKZk.js} +1 -1
- package/page/assets/{guardrail-tester-Dk5L25mc.js → guardrail-tester-BXROlU1L.js} +1 -1
- package/page/assets/{index-B95kGH1Q.js → index-DbHspDC4.js} +6 -6
- package/page/assets/{studio-code-pane-CPyzXehM.js → studio-code-pane-Dt3MWPBE.js} +1 -1
- package/page/assets/{studio-console-BV4NlQY-.js → studio-console-4PMBDYuu.js} +1 -1
- package/page/assets/{studio-decision-BT6Ee-kK.js → studio-decision-BiN_FO02.js} +1 -1
- package/page/assets/{studio-embedding-DVduw2Un.js → studio-embedding-C7gIUtxM.js} +1 -1
- package/page/assets/{studio-host-console-CngXS38i.js → studio-host-console-DOBHkxDj.js} +2 -2
- package/page/assets/{studio-labels--uHJcIbG.js → studio-labels-Dh_rsQs7.js} +1 -1
- package/page/assets/{studio-live-DTHgPVFH.js → studio-live-xPsQmJyQ.js} +1 -1
- package/page/assets/{studio-map-CT0jsRMr.js → studio-map-Cc4_9fe9.js} +1 -1
- package/page/assets/{studio-trace-replay-DS9o-VrA.js → studio-trace-replay-D5JoQXyY.js} +1 -1
- package/page/assets/{use-one-call-DOzbF9kQ.js → use-one-call-ApIuuZX3.js} +1 -1
- package/page/index.html +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{c as r,u as i}from"./themeProps-3IqahpCr.js";import{t as a}from"./VStack-CkVMcNiK.js";import{n as o}from"./StackItem-CQviqAfM.js";import{t as s}from"./CodeBlock-Kjgv83A6.js";import{t as c}from"./Icon-ZfFwTt8n.js";import{r as l,t as u}from"./IconButton-CG5klqF1.js";import{d}from"./useTooltip-rxACYEAC.js";import{t as f}from"./Text-BsiAsowd.js";import{l as p,n as m}from"./labels-provider-Gus3heEH.js";import{n as h,t as g}from"./Card-Ghe4ozhC.js";import{t as _}from"./Tooltip-CTEuMRLe.js";import{i as v,o as y,s as b}from"./arrive-DvbqpeRS.js";import{k as x}from"./shaped-data-C4jsvipW.js";import{n as S}from"./trace-record-D9wgX8kq.js";import{O as C,f as w,j as T,jt as E,k as D}from"./index-B95kGH1Q.js";var O={agent:{label:`Agent`,doc:`Which agent ran, for which conversation, and how it ended.`},request:{label:`Request`,doc:`What theorem asked the provider for.`},response:{label:`Response`,doc:`What the provider said about its answer.`},messages:{label:`Messages`,doc:`What was read and written, stored by hash.`},usage:{label:`Usage`,doc:`Tokens and cost, as reported or estimated.`},tool:{label:`Tool`,doc:`The tool call, its arguments, and how it settled.`},http:{label:`HTTP`,doc:`One HTTP try: where it went and what came back.`},error:{label:`Error`,doc:`Why it failed.`},record:{label:`Record`,doc:`What this record kept and how it was taken.`},part:{label:`Part`,doc:`Facts about one message part.`},decision:{label:`Decision`,doc:`The state a decision read, the questions it answered, and its answers.`},evaluation:{label:`Evaluation`,doc:`How an eval graded this trace, and by which suite.`}},k={OK:{label:`OK`,doc:`Finished as intended.`},ERROR:{label:`Error`,doc:`Failed; the error kind says why.`},UNSET:{label:`Stopped`,doc:`Stopped on purpose (cancelled, waiting for approval, paused) or ended with no verdict.`}},A={resource:{label:`Host resource`,doc:`Attributes the host set for its process (observability.resource), e.g. service.name.`},metadata:{label:`Request metadata`,doc:`The metadata the host passed on the request, untouched.`},span:{label:`Span`,doc:`One timed step of the trace.`},type:{label:`Type`,doc:`What the span is: a turn, a model call, a tool call, an HTTP try.`},children:{label:`Spans`,doc:`The spans inside this one, in start order: model calls, tool calls, HTTP tries.`},traceId:{label:`Trace ID`,doc:`Shared by every span of one trace.`},spanId:{label:`Span ID`,doc:`This span's id.`},status:{label:`Status`,doc:`How the span ended.`},start:{label:`Started`,doc:`When the span started.`},duration:{label:`Duration`,doc:`From start to end, on the clock the record names.`},events:{label:`Events`,doc:`What happened during the span, in order.`},links:{label:`Links`,doc:`Earlier traces this span follows.`}},j={completed:{label:`Completed`,doc:`The model finished its answer.`},length:{label:`Hit output limit`,doc:`The model stopped at its output token limit.`},tool:{label:`Handed tool to host`,doc:`Stopped to hand a tool call back to the host. Deprecated: approval now stops as “Waiting for approval”.`},gate:{label:`Waiting for approval`,doc:`A tool call needs confirmation, permission, or sign-in before it runs; the host resumes it.`},filtered:{label:`Filtered`,doc:`A safety filter or the output guardrail held the answer back.`},provider_error:{label:`Provider error`,doc:`The provider reported an error.`},cancelled:{label:`Cancelled`,doc:`The user or host stopped it.`},step_limit:{label:`Ran out of steps`,doc:`The last model call the profile allows asked for tools, so the turn ended without an answer.`},stream_incomplete:{label:`Stream cut off`,doc:`The provider's stream ended before the answer was complete.`},interrupted:{label:`Interrupted`,doc:`The user spoke over a Live response.`},generation_complete:{label:`Generation complete`,doc:`Live: the model finished generating this response; the turn may still be open.`},go_away:{label:`Closed by provider`,doc:`Live: the provider warned the session would end, then closed it.`}},M={config:{label:`Setup`,doc:`The profile, tool, or schema is set up wrong.`},request:{label:`Host request`,doc:`The host called theorem wrongly.`},input:{label:`User input`,doc:`The user sent input the profile does not accept.`},action:{label:`Not allowed`,doc:`The user asked for something the profile does not allow.`},auth:{label:`Credentials`,doc:`A missing or rejected credential, or an account that cannot be billed.`},rate_limit:{label:`Rate limit`,doc:`Too many requests, or a quota used up.`},unsupported:{label:`Unsupported`,doc:`The model or route cannot serve this request.`},busy:{label:`Busy`,doc:`The provider is up but too busy for the call.`},unavailable:{label:`Unavailable`,doc:`The provider is down.`},bad_response:{label:`Unusable response`,doc:`The provider answered with something that cannot be used.`},network:{label:`Network`,doc:`The request never reached the provider.`},timeout:{label:`Timeout`,doc:`The model took longer than the host allowed.`},safety:{label:`Safety`,doc:`theorem or the provider held the reply back.`},blocked:{label:`Blocked`,doc:`A guardrail or host policy stopped one of the agent's steps.`},declined:{label:`Declined`,doc:`The user declined one of the agent's steps.`},failed:{label:`Failed`,doc:`One of the agent's steps ran and failed.`},cancelled:{label:`Cancelled`,doc:`The user or host stopped the turn.`},internal:{label:`Internal`,doc:`A theorem invariant broke.`}},N={...M,provider_error:j.provider_error,stream_incomplete:j.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},ee={ok:{label:`Succeeded`,doc:`The tool ran and returned a result.`},error:{label:`Failed`,doc:`The tool ran and failed, or could not run.`},denied:{label:`Denied`,doc:`A guardrail, a hook, or the user refused the call.`},gated:{label:`Waiting for approval`,doc:`The call needs confirmation, permission, or sign-in; it has not run.`},paused:{label:`Paused`,doc:`The call was handed back to the host to finish.`},cancelled:{label:`Cancelled`,doc:`The turn was stopped before the call settled.`}},te={local:{label:`Host code`,doc:`TypeScript the host registered, run in-process.`},builtin:{label:`Built-in`,doc:`A tool theorem ships.`},http:{label:`HTTP`,doc:`A remote HTTP endpoint.`},mcp:{label:`MCP`,doc:`A tool on an MCP server.`},delegated:{label:`Another agent`,doc:`A specialist agent the tool ran.`}},ne={auto:{label:`Automatic`,doc:`Runs without asking.`},session_consent:{label:`Ask once`,doc:`Asks once per session, then remembers the answer.`},always_confirm:{label:`Always ask`,doc:`Asks before every call.`}},re={resume:{label:`Resumes`,doc:`Picks up a call that stopped for approval.`},continue:{label:`Continues`,doc:`Continues an answer that stopped early.`},retry:{label:`Retries`,doc:`Runs a failed turn again.`},trial:{label:`Trial`,doc:`A graded trial of this eval run.`}},ie={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},ae={all:{label:`Every trial`,doc:`Passes only when every trial passed (pass^k).`},any:{label:`Any trial`,doc:`Passes when at least one trial passed (pass@k).`},at_least:{label:`At least n`,doc:`Passes when at least the stated number of trials passed.`}},oe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},se={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},ce={invoke_agent:{label:`Run agent`,doc:`One turn of an agent, or one Live session.`},chat:{label:`Chat`,doc:`A model call over a chat-completions API.`},generate_content:{label:`Generate content`,doc:`A model call over a Gemini API.`},execute_tool:{label:`Run tool`,doc:`A tool call theorem ran.`},decide:{label:`Decide`,doc:`One model decision: typed answers to questions over JSON state.`},embeddings:{label:`Embed`,doc:`One embedding call: a vector for each input.`}},le={text:{label:`Text`,doc:`The model answers in text.`},json:{label:`JSON`,doc:`The model answers with structured JSON.`},image:{label:`Image`,doc:`The model answers with an image.`},speech:{label:`Speech`,doc:`The model answers in audio.`}},ue={"gcp.gemini":{label:`Google Gemini`,doc:`Google's Gemini API.`},openrouter:{label:`OpenRouter`,doc:`The OpenRouter gateway.`},typesafe:{label:`TypeSafe`,doc:`TypeSafe's native decision API.`}},de={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},fe={input_transcription:{label:`What the provider heard`,doc:`The provider's transcript of the user's audio.`},output_transcription:{label:`Transcript of the reply`,doc:`The provider's transcript of the model's spoken answer.`}},pe={pre_turn:{label:`Before the turn`,doc:`Before the first model call.`},pre_tool:{label:`Before a tool`,doc:`Before a tool call runs.`},post_tool:{label:`After a tool`,doc:`After a tool call settles.`},before_end:{label:`Before the end`,doc:`Before the turn delivers its final answer.`},post_turn:{label:`After the turn`,doc:`After the turn has ended.`}},me={inject:{label:`Injected`,doc:`Added messages to the conversation.`},abort:{label:`Aborted`,doc:`Stopped the turn.`},deny:{label:`Denied`,doc:`Refused a tool call.`},confirm:{label:`Asked to confirm`,doc:`Required confirmation before a tool call.`},mutate:{label:`Changed`,doc:`Changed the tool call or its result.`},labelFailed:{label:`Labelled failed`,doc:`Showed the tool's failed label for a call that completed.`},waitFor:{label:`Waited`,doc:`Held a tool call until other calls in its step settled.`}},he={input:{label:`User input`,doc:`Text the user sent.`},history:{label:`History`,doc:`Earlier messages sent back to the model.`},system:{label:`System instructions`,doc:`The profile's or host's instructions.`},attachment:{label:`Attachment`,doc:`A file the user attached.`},tool_call:{label:`Tool call`,doc:`Arguments the model sent to a tool.`},tool_result:{label:`Tool result`,doc:`What a tool returned.`},output_delta:{label:`Streaming output`,doc:`The answer as it streamed.`},output_final:{label:`Final output`,doc:`The whole answer.`},thought:{label:`Thinking`,doc:`The model's thoughts as they streamed.`},network:{label:`Network`,doc:`A URL the agent was about to reach.`},live_inbound:{label:`Live inbound`,doc:`What arrived from a Live session.`},live_outbound:{label:`Live outbound`,doc:`What was sent into a Live session.`},trace:{label:`Trace`,doc:`Text being written to the trace.`}},ge={"detect.ids":{label:`IDs`,doc:`A US SSN, ITIN, or EIN number. The decision names the boundary it was crossing and what was done with it.`},"detect.financial":{label:`Financial`,doc:`An IBAN or card number. The decision names the boundary it was crossing and what was done with it.`},"detect.network":{label:`Network`,doc:`An IPv4 or IPv6 address. The decision names the boundary it was crossing and what was done with it.`},"detect.credentials":{label:`Credentials`,doc:`An API key, token, password assignment, or private key. The decision names the boundary it was crossing and what was done with it.`},"detect.injection":{label:`Injection`,doc:`Text that tries to override the agent's instructions, such as "ignore previous instructions". The decision names the boundary it was crossing and what was done with it.`},"detect.tool_instructions":{label:`Tool instructions`,doc:`A tool's text instructed the agent: it told it to set its instructions aside, such as "ignore your instructions", or beside an address it named a tool the model can call, gave an order such as "you must now…", or claimed to speak for the user, the system, or an admin. Each match says which in its signal. The decision names the boundary it was crossing and what was done with it.`},"detect.canary_leak":{label:`Canary leak`,doc:`The turn's canary, a secret marker planted in the instructions, so the model was repeating them. The decision names the boundary it was crossing and what was done with it.`},"detect.prompt_leak":{label:`Prompt leak`,doc:`12 or more words in a row of the private instructions. The decision names the boundary it was crossing and what was done with it.`},"detect.marker_leak":{label:`Marker leak`,doc:`The markers Theorem fences user data with, or the words of the canary note. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_images":{label:`Ungiven images`,doc:`An image whose address the model was not given, on a host the profile does not allow. Loading it could send data out. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_links":{label:`Ungiven links`,doc:`A link to an address the model was not given, on a host the profile does not allow. The decision names the boundary it was crossing and what was done with it.`},"detect.tool_leak":{label:`Tool leak`,doc:`The name of one of the profile's own tools, or of a tool's parameter written as a quoted key. The decision names the boundary it was crossing and what was done with it.`},"egress.provider-tool-leak":{label:`Instructions sent to a provider tool`,doc:`A provider's built-in tool, such as search, was sent the canary or the instructions. It ran before Theorem saw it, so the data had already left.`},"egress.unscannable":{label:`Reply could not be checked`,doc:`Structured output could not be turned into text to check, so it was treated as unsafe.`},"tool_call.tainted-turn":{label:`Change after remote content`,doc:`A tool that writes or deletes was called after the turn read remote content, which could have steered it.`},"tool_call.steered-turn":{label:`Change after a remote instruction`,doc:`A tool that writes or deletes was called after the turn read remote content that also looked like instructions to the agent.`},"tool_call.remote-destination":{label:`Destination from remote content`,doc:`A tool call's argument carried an address that only a remote tool's result named.`},"network.blocked":{label:`Address blocked`,doc:`A tool tried to reach a private, local, or disallowed address. The request was never made.`}},_e={input:{label:`Input check`,doc:`Checked what the user sent before the model read it.`},egress:{label:`Output check`,doc:`Checked the whole answer before it was released.`},tool_arguments:{label:`Argument check`,doc:`Checked what the model sent to a tool.`},taint:{label:`Remote-content gate`,doc:`Checked whether a tool that writes or deletes was called after the turn read remote content.`},destination:{label:`Destination check`,doc:`Checked whether the call sends to an address that only a remote tool's result named.`},tool_result:{label:`Result check`,doc:`Checked what a tool returned before the model read it.`},tool_failure:{label:`Error check`,doc:`Checked a tool's error message before the model read it.`},network:{label:`Address check`,doc:`Checked the address a tool was about to reach.`},network_request:{label:`Lookup and redirect check`,doc:`Checked, during a tool's request, where its address resolved and every redirect it followed; includes the lookup when the host resolves names.`},output_stream:{label:`Streaming check`,doc:`Checked the answer piece by piece as it streamed, before the host saw each piece.`},stream_canary:{label:`Streamed leak check`,doc:`Checked each streamed tool call and other non-text output for the system prompt's canary.`},tool_draft:{label:`Tool call preview check`,doc:`Checked a tool call piece by piece as the model wrote it, before the host saw each piece.`},live_input:{label:`Live input check`,doc:`Checked text the host sent into a live session.`},live_output:{label:`Live output check`,doc:`Checked what the model said in a live session, batch by batch, before the host heard it.`}},ve={trusted:{label:`Trusted`,doc:`The profile's own text, written at author time.`},assembled:{label:`Assembled`,doc:`Built by the host each turn; may carry user data.`},untrusted:{label:`Untrusted`,doc:`User input, tool results, attachments, or another agent.`}},ye={allow:{label:`Allowed`,doc:`Checked and let through unchanged.`},redact:{label:`Redacted`,doc:`The matched text was replaced.`},flag:{label:`Flagged`,doc:`Recorded; nothing was changed.`},block:{label:`Blocked`,doc:`The step was stopped.`}},be={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},xe={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},Se={confirmation:{label:`Confirmation`,doc:`The user must confirm this call.`},permission:{label:`Permission`,doc:`The user must allow this tool.`},auth:{label:`Sign-in`,doc:`The tool needs a credential the user must provide.`},page:{label:`Page`,doc:`The call waits for the page that answers this tool.`}},Ce={egress:{label:`Output guardrail`,doc:`The output guardrail sent the answer back to the model.`},validation:{label:`Invalid JSON`,doc:`The structured output did not match its schema.`}},we={before:{label:`Before the turn`,doc:`Compacts before the turn runs.`},after:{label:`After the turn`,doc:`Signals the host to compact after the turn.`}},Te={history:{label:`History`,doc:`Counts tokens across earlier turns.`},input:{label:`Whole input`,doc:`Counts the turn's whole input: instructions, history, and attachments.`}},Ee={compacted:{label:`Compacted`,doc:`A summary replaced the earlier messages.`},deferred:{label:`Kept whole`,doc:`The compactor failed and the history still fits, so it was kept and compaction runs again next turn.`},dropped:{label:`Dropped`,doc:`The compactor failed and the history no longer fits, so the earlier messages were dropped.`}},De={closing_soon:{label:`Closing soon`,doc:`The provider warned the session will end.`},ended:{label:`Ended`,doc:`The provider ended the session after warning it would.`},waiting_for_input:{label:`Waiting for input`,doc:`The model is waiting for the user.`},working:{label:`Working`,doc:`The model is thinking or waiting on a tool.`},idle:{label:`Idle`,doc:`The model finished everything it was doing.`},voice_activity:{label:`Voice activity`,doc:`The provider heard speech start or stop.`},session_resumption:{label:`Resumption update`,doc:`The provider said whether the session can be resumed.`},setup_complete:{label:`Setup complete`,doc:`The provider accepted the session setup.`},key_fallback:{label:`Switched to fallback key`,doc:`The key was refused for quota at setup; the session reopened on the profile's fallback key.`},closed:{label:`Socket closed`,doc:`The session socket closed.`}},Oe={host:{label:`Host`,doc:`The host closed the session.`},provider:{label:`Provider`,doc:`The provider closed the socket.`},theorem:{label:`theorem`,doc:`theorem closed the socket.`}},ke={io:{label:`Moves at I/O only`,doc:`Recorded in a Cloudflare Worker, whose clock only moves at I/O: time spent computing reads as zero.`}};function P(e,t,n,r,i){return i?{label:t,doc:r,format:n,group:e,options:i}:{label:t,doc:r,format:n,group:e}}function Ae(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var je={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},Me={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,ce),"gen_ai.agent.name":P(`agent`,`Agent`,`id`,`The profile that ran.`),"gen_ai.conversation.id":P(`agent`,`Conversation`,`id`,`The conversation id the host passed; absent when it passed none.`),"gen_ai.conversation.compacted":P(`agent`,`History compacted`,`boolean`,`Compaction summarized earlier messages in this turn.`),"theorem.stop.kind":P(`agent`,`Stop reason`,`text`,`Why it ended. Absent when it failed before any stop.`,j),"theorem.attempts":P(`agent`,`Attempts`,`number`,`Times the turn ran its model calls, counting a retry after a guardrail or invalid JSON.`),"theorem.steps":P(`agent`,`Model calls`,`number`,`Model calls made (Live: responses).`),"theorem.turn.time_to_first_text":P(`agent`,`Time to first visible text`,`seconds`,`From the start of the turn to the first reply text the host received, after every guardrail and held tail.`),"theorem.guardrail.stream_ms":P(`agent`,`Stream guardrail time`,`milliseconds`,"Time every check on this call's streamed output took, together; each check's own time is on its `theorem.guardrail` event."),"theorem.step":P(`agent`,`Step`,`number`,`Which model call of the turn this is, from 1.`),"theorem.attempt":P(`agent`,`Attempt`,`number`,`Which attempt of the turn made this call.`),"theorem.request.effort":P(`agent`,`Effort`,`text`,`The effort the host asked for.`),"theorem.request.model_select":P(`agent`,`Model asked for`,`id`,`The model the host asked for, by alias.`),"theorem.project.id":P(`agent`,`Project`,`id`,`The project id the host passed.`),"theorem.link.kind":P(`agent`,`Link`,`text`,`How this span follows an earlier trace.`,re),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,ue),open:!0},"gen_ai.request.model":P(`request`,`Model sent`,`id`,`The model id sent to the provider.`),"theorem.model.id":P(`request`,`Model alias`,`id`,`The profile's name for the model.`),"gen_ai.request.stream":P(`request`,`Streamed`,`boolean`,`The call streamed its answer. Absent means it did not.`),"gen_ai.request.temperature":P(`request`,`Temperature`,`number`,`As requested.`),"gen_ai.request.max_tokens":P(`request`,`Max output tokens`,`tokens`,`As requested.`),"gen_ai.request.reasoning.level":P(`request`,`Thinking level`,`text`,`As requested.`),"gen_ai.output.type":P(`request`,`Output type`,`text`,`What kind of answer was asked for.`,le),"theorem.key_slot":P(`request`,`API key`,`text`,`The vault key slot that finally answered, by the name the profile gave it.`),"theorem.request.builtins":P(`request`,`Provider tools`,`list`,`Tools the provider runs itself (search, maps, code), as requested.`),"theorem.request.store":P(`request`,`Stored by provider`,`boolean`,`Asked the provider to keep the response for a later continuation.`),"theorem.request.summaries":P(`request`,`Thought summaries`,`text`,`Asked for summaries of the model’s thinking.`),"theorem.request.structured":P(`request`,`Structured output`,`object`,`The JSON schema the answer must match.`),"theorem.request.session_id":P(`request`,`Session`,`id`,`The provider session this call ran in.`),"theorem.request.cache":Ae(`request`,`Cache`,`The prompt cache, as requested.`,{mode:P(`request`,`Mode`,`text`,`How the prompt cache is used.`),ttl:P(`request`,`Lifetime`,`text`,`How long a cache entry lives.`)}),"theorem.request.image":Ae(`request`,`Image settings`,`The image asked for.`,{mime_type:P(`request`,`Format`,`text`,`The image file type.`),aspect_ratio:P(`request`,`Aspect ratio`,`text`,`Width to height.`),resolution:P(`request`,`Resolution`,`text`,`How detailed the image is, such as 1K, 2K or 4K.`),include_text:P(`request`,`With text`,`boolean`,`Text may come back beside the image.`)}),"theorem.request.speech":Ae(`request`,`Speech settings`,`The audio asked for.`,{voice:P(`request`,`Voice`,`text`,`The voice.`),speed:P(`request`,`Speed`,`number`,`The speaking rate; 1 is the voice's own pace.`),format:P(`request`,`Format`,`text`,`The audio format.`)}),"theorem.request.live":Ae(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Ae(`request`,`Voice detection`,`How the provider hears speech start and stop.`,{activity_handling:P(`request`,`On speech`,`text`,`What the model does when the user starts speaking.`),start_sensitivity:P(`request`,`Start sensitivity`,`text`,`How readily speech counts as started.`),end_sensitivity:P(`request`,`End sensitivity`,`text`,`How readily speech counts as ended.`),prefix_padding_ms:P(`request`,`Lead-in`,`milliseconds`,`Speech needed before it counts as started.`),silence_duration_ms:P(`request`,`Silence to end`,`milliseconds`,`Silence needed before speech counts as ended.`)}),session_resumption:P(`request`,`Resumable`,`boolean`,`Asked for handles to resume the session later.`),context_compression:Ae(`request`,`Context compression`,`How the provider shrinks a long session.`,{mechanism:P(`request`,`Mechanism`,`text`,`How the context is shrunk.`),trigger_tokens:P(`request`,`Trigger`,`tokens`,`Context size that starts compression.`),target_tokens:P(`request`,`Keep`,`tokens`,`Context size kept after compressing.`)}),transcription:Ae(`request`,`Transcription`,`Which audio the provider transcribes.`,je),resumed:P(`request`,`Resumed`,`boolean`,`The session resumed an earlier one. The resumption handle is a credential and is never recorded.`)}),"theorem.input.sent_from":P(`request`,`Sent from message`,`number`,`Where in the input messages the request body starts; earlier ones the provider already held.`),"gen_ai.response.id":P(`response`,`Response ID`,`id`,`The provider's id for its answer.`),"gen_ai.response.model":P(`response`,`Model that answered`,`id`,`The model the provider says answered.`),"gen_ai.response.finish_reasons":P(`response`,`Provider finish reason`,`list`,`The provider's own reason for stopping. Absent when the call was stopped.`),"gen_ai.response.status":P(`response`,`Provider status`,`text`,`The provider's own status for the answer. Absent when the call was stopped.`),"gen_ai.response.time_to_first_chunk":P(`response`,`Time to first chunk`,`seconds`,`From the start of the successful HTTP try, or of a Live response, to its first chunk; a buffered body is its one chunk.`),"theorem.response.time_to_first_text":P(`response`,`Time to first text`,`seconds`,`From the start of the call to its first reply text, before guardrails; reasoning and tool calls do not count.`),"gen_ai.system_instructions":P(`messages`,`System instructions`,`parts`,`The instructions the model read.`),"gen_ai.tool.definitions":P(`messages`,`Tool definitions`,`content`,`The tools offered to the model, as sent.`),"gen_ai.input.messages":P(`messages`,`Input`,`messages`,`On a turn: the user's new input. On a model call: everything the model read.`),"gen_ai.output.messages":P(`messages`,`Output`,`messages`,`On a turn: what the host received. On a model call: what the model produced.`),"theorem.output.delivered":P(`messages`,`Delivered`,`messages`,`What the host received of this Live response.`),"theorem.error.public":P(`error`,`Error the user saw`,`content`,`The worded error the caller received.`),"gen_ai.usage.input_tokens":P(`usage`,`Input tokens`,`tokens`,`Tokens the model read.`),"gen_ai.usage.output_tokens":P(`usage`,`Output tokens`,`tokens`,`Tokens the model wrote.`),"gen_ai.usage.reasoning.output_tokens":P(`usage`,`Thinking tokens`,`tokens`,`Output tokens spent thinking.`),"gen_ai.usage.cache_read.input_tokens":P(`usage`,`Cached input tokens`,`tokens`,`Input tokens read from the prompt cache.`),"gen_ai.usage.cache_write.input_tokens":P(`usage`,`Cache write tokens`,`tokens`,`Input tokens written to the prompt cache.`),"theorem.usage.tool_use.input_tokens":P(`usage`,`Tool-use input tokens`,`tokens`,`Input tokens Google counts for tool use; already inside input tokens.`),"theorem.usage.grounding":Ae(`usage`,`Grounding`,`Grounding tool uses, per tool.`,{type:P(`usage`,`Tool`,`id`,`The provider's name for the tool.`),count:P(`usage`,`Uses`,`number`,`Times the tool ran.`),search_query_count:P(`usage`,`Searches`,`number`,`Search queries it ran.`)}),"theorem.usage.cost_usd":P(`usage`,`Cost`,`usd`,`As the provider reported it, or priced from Jev's fixed price for a decision. Absent when no call reported a cost.`),"theorem.usage.upstream_cost_usd":P(`usage`,`Upstream cost`,`usd`,`The upstream provider's cost, as a gateway reported it.`),"theorem.usage.cost_partial":P(`usage`,`Cost is partial`,`boolean`,`Only some calls reported a cost.`),"theorem.usage.estimated":P(`usage`,`Estimated`,`list`,`Sides whose token counts theorem estimated rather than the provider reporting them.`,de),"theorem.usage.unknown_media":Ae(`usage`,`Uncounted media`,`Media items no counting rule covered, so their tokens are missing from the estimate.`,{input:P(`usage`,`Input`,`number`,`Uncounted media the model read.`),output:P(`usage`,`Output`,`number`,`Uncounted media the model wrote.`)}),"gen_ai.tool.name":P(`tool`,`Tool`,`id`,`The tool called.`),"gen_ai.tool.call.id":P(`tool`,`Call ID`,`id`,`The call's id.`),"gen_ai.tool.type":P(`tool`,`Tool type`,`text`,`function for a registered tool.`),"gen_ai.tool.call.arguments":P(`tool`,`Arguments`,`content`,`The arguments exactly as the model sent them.`),"gen_ai.tool.call.result":P(`tool`,`Result`,`content`,`What the model reads back, after formatting and the tool-result guardrail.`),"theorem.tool.call.result.parts":P(`tool`,`Result media`,`parts`,`Media and other parts the result carried.`),"theorem.tool.data":P(`tool`,`Raw output`,`json`,`The tool's output before formatting.`),"theorem.tool.outcome":P(`tool`,`Outcome`,`text`,`How the call settled.`,ee),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,te),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ne),"theorem.tool.approved":P(`tool`,`Approved`,`boolean`,`The host resumed this call with approval.`),"theorem.tool.failure.code":P(`error`,`Failure code`,`id`,`The tool's code for the failure, e.g. malformed_arguments.`),"theorem.cutout.input.sha256":P(`tool`,`Input hash`,`id`,`The host's hash of what it sent to the cutout.`),"theorem.cutout.output.sha256":P(`tool`,`Output hash`,`id`,`The host's hash of what came back.`),"http.request.method":P(`http`,`Method`,`text`,`The HTTP method.`),"server.address":P(`http`,`Host`,`id`,`The server the try went to.`),"url.path":P(`http`,`Path`,`id`,`The URL path. The query is never recorded.`),"http.response.status_code":P(`http`,`Status code`,`number`,`The HTTP status returned.`),"http.request.resend_count":P(`http`,`Retry number`,`number`,`0 for the first try, then 1, 2, … for each retry.`),"theorem.retry.backoff_ms":P(`http`,`Wait before retry`,`milliseconds`,`How long theorem waited after the previous try.`),"error.type":{...P(`error`,`Error kind`,`text`,`Why it failed: an error kind, the failing stop, or on an HTTP try its status or exception name.`,N),open:!0},"exception.type":P(`error`,`Exception`,`id`,`The class or kind of what was thrown.`),"exception.message":P(`error`,`Message`,`content`,`The exception message, scrubbed.`),"exception.stacktrace":P(`error`,`Stack`,`content`,`Where it was thrown, scrubbed.`),"theorem.record.include":P(`record`,`Included`,`list`,`What this record kept. A field left out because it was off reads as not recorded, never as did not happen.`),"theorem.record.scrub":P(`record`,`Scrubbed`,`list`,`What was removed from stored text before it was hashed.`),"theorem.clock":P(`record`,`Clock`,`text`,`How the times in this record were taken.`,ke),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,fe),"theorem.interim":P(`part`,`Interim`,`boolean`,`An interim transcript, not the final one.`),"theorem.observed_end":P(`part`,`Seen at`,`time`,`When theorem saw this provider-run step whole.`),"theorem.partial":P(`part`,`Incomplete`,`boolean`,`The provider sent this step incomplete.`),"theorem.embedding.inputs":P(`request`,`Inputs`,`number`,`How many inputs the call embedded, one vector each.`),"theorem.embedding.task":P(`request`,`Task`,`text`,`Whether the inputs are queries or documents, as the request said.`,xe),"theorem.decision.contract":P(`decision`,`Contract`,`id`,`The host's decision contract the profile names.`),"theorem.decision.state":P(`decision`,`State`,`json`,`The JSON state the decision read.`),"theorem.decision.questions":P(`decision`,`Questions`,`json`,`Each question by id: its kind, instructions, and criteria.`),"theorem.decision.assets":P(`decision`,`Images`,`json`,`Each image by reference: its type and size. The image itself is never recorded.`),"theorem.decision.answers":P(`decision`,`Answers`,`json`,`Each answer by question id: the choice, score, number or box, its confidence, and probabilities.`),"gen_ai.evaluation.name":P(`evaluation`,`Grader`,`id`,`The grader that produced this result.`),"gen_ai.evaluation.score.value":P(`evaluation`,`Score`,`number`,`The score, 0–1 unless the grader says otherwise.`),"gen_ai.evaluation.score.label":P(`evaluation`,`Label`,`text`,`The grader's label for this trial, one of the labels it declares.`),"gen_ai.evaluation.explanation":P(`evaluation`,`Explanation`,`content`,`Why, in the grader's words.`),"theorem.evaluation.source":P(`evaluation`,`Graded by`,`text`,`Who produced this result.`,ie),"theorem.evaluation.suite":P(`evaluation`,`Suite`,`id`,`The eval suite that ran.`),"theorem.evaluation.case":P(`evaluation`,`Case`,`id`,`The case this trial ran. Absent when a production trace was graded without one.`),"theorem.evaluation.trial":P(`evaluation`,`Trial`,`number`,`Which trial of the case this is, from 0.`),"theorem.evaluation.grader.version":P(`evaluation`,`Grader version`,`id`,`The sha256 of the grader's rubric or code identity, so a reader can tell which rubric scored this.`),"theorem.evaluation.passed":P(`evaluation`,`Passed`,`boolean`,`The grader's yes or no. Absent when the result informs but does not decide.`),"theorem.eval.repeat":P(`evaluation`,`Trials per case`,`number`,`How many times each case ran.`),"theorem.eval.pass_rule":P(`evaluation`,`Pass rule`,`text`,`How the trials of a case become its verdict.`,ae),"theorem.eval.pass_at_least":P(`evaluation`,`Trials needed`,`number`,`Trials that must pass under the at-least rule.`),"theorem.eval.caseless":P(`evaluation`,`Caseless`,`boolean`,`Production traces were graded with no cases: only graders that need no expectation ran.`),"theorem.eval.stopped":P(`evaluation`,`Stopped early`,`text`,`Why the run stopped before its end.`,oe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},Ne=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Pe=/^http\.(request|response)\.header\.(.+)$/;function Fe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ie(e){let t=Me[e];if(t)return t;let n=Ne.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${Fe(e)} ${t} tokens`,`tokens`,`${Fe(t)} tokens that were ${e}, as the provider reported them.`)}let r=Pe.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${Fe(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var Le=Ae(`error`,`Hits`,`Each rule that matched.`,{rule:{...P(`error`,`Rule`,`id`,`The rule that matched: one of Theorem's own, or a host policy's, which names itself.`,ge),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,be),signal:P(`error`,`Signal`,`text`,"What made a `tool_instructions` match one, or how a host detector's `find` failed: `find_threw` or `find_result`."),start:P(`error`,`From`,`number`,`Where the match starts in the checked text.`),end:P(`error`,`To`,`number`,`Where the match ends in the checked text.`),match:P(`error`,`Match`,`text`,`The matched text, exact. Kept only when the profile records match previews.`),label:P(`error`,`Rule name`,`text`,`A host rule's own name for what it catches.`),doc:P(`error`,`Why it matters`,`text`,`A host rule's own account of why a match matters.`)}),Re={"theorem.stage":{label:`Hook`,doc:`A stage in the turn where host hooks could act.`,attributes:{stage:P(`agent`,`Stage`,`text`,`Where in the turn.`,pe),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,me),hook_ms:P(`agent`,`Hook time`,`milliseconds`,`Time the hooks took; absent when none ran.`),warnings:P(`error`,`Warnings`,`list`,`Warning codes the hooks raised.`)}},"theorem.guardrail":{label:`Guardrail`,doc:"A guardrail checked some text: what it did, or `allow` for a timed check that let the text through.",attributes:{check:P(`agent`,`Check`,`id`,`Which timed check ran.`,_e),duration_ms:P(`agent`,`Check time`,`milliseconds`,`Time the check took; a check on streamed output, its total over the call.`),runs:P(`agent`,`Runs`,`number`,`How many times a check on streamed output ran on the call.`),stage:P(`agent`,`Checked`,`text`,`Which text was checked.`,he),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,ve),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,ye),hits:Le,provenance:Ae(`agent`,`Came from`,`Where the checked text came from.`,{origin:P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,te),tool:P(`tool`,`Tool`,`id`,`The tool that produced it.`),depth:P(`tool`,`Hops`,`number`,`Tool calls between the user's turn and this text: 1 for a direct call, more through another agent.`)}),error:P(`error`,`Detail`,`content`,`The guardrail's internal reason.`),error_summary:P(`error`,`Failure`,`text`,`Which host detector failed, how, and its error id, in the kernel's words only. The host stream's reason ends with the same id.`)}},"theorem.attempt.retry":{label:`Retry`,doc:`The turn ran its model calls again.`,attributes:{attempt:P(`agent`,`Attempt`,`number`,`The attempt that starts.`),reason:P(`agent`,`Reason`,`text`,`Why it retried.`,Ce)}},"theorem.step.resume":{label:`Sent again`,doc:`A model call failed with no reply, and the turn sent it again.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was sent again.`),resume:P(`agent`,`Re-send`,`number`,`How many calls the turn has sent again so far.`),stop:P(`agent`,`Stop`,`text`,`How the failed call ended.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.compaction":{label:`Compaction`,doc:`theorem decided whether to summarize earlier messages.`,attributes:{timing:P(`agent`,`Timing`,`text`,`When compaction runs.`,we),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,Te),budget:P(`usage`,`Budget`,`tokens`,`The token budget the threshold is a share of.`),threshold:P(`usage`,`Threshold`,`number`,`The share of the budget that triggers it.`),trigger:P(`agent`,`Trigger`,`text`,`custom when the host decides instead.`),tokens_before:P(`usage`,`Tokens counted`,`tokens`,`What the meter read.`),unknown_media:P(`usage`,`Uncounted media`,`number`,`Media items the count could not cover.`),needed:P(`agent`,`Needed`,`boolean`,`The count crossed the threshold.`),outcome:P(`agent`,`Outcome`,`text`,`What happened to the earlier messages.`,Ee),messages_before:P(`messages`,`Messages before`,`number`,`History length before.`),messages_after:P(`messages`,`Messages after`,`number`,`History length after.`),dropped_media:P(`messages`,`Media left out`,`number`,`Media the compactor does not take, left out of what it read.`),failure_stop:P(`agent`,`Compactor stop`,`text`,`How the failed compactor stopped.`,j),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,M),failure_reason:P(`agent`,`Compactor reason`,`content`,`Why the compactor failed, in its own words.`),failure_empty:P(`agent`,`Empty summary`,`boolean`,`The compactor replied with nothing.`),failure_unreadable:P(`agent`,`Nothing to read`,`boolean`,`Everything to compact was media the compactor does not take, so it did not run.`),summary:P(`messages`,`Summary`,`content`,`The summary that replaced them.`)}},exception:{label:`Exception`,doc:`Something was thrown, or the provider reported an error.`,attributes:{}},"theorem.upstream.row":{label:`Provider data`,doc:`One row of data from the provider, at the time it arrived.`,attributes:{row:P(`response`,`Row`,`json`,`The row, scrubbed, with media and known text by hash.`)}},"theorem.wire.request":{label:`Request body`,doc:`The body sent to the provider.`,attributes:{body:P(`request`,`Body`,`json`,`The body, scrubbed, with media and known text by hash.`),body_kind:P(`request`,`Body type`,`text`,`What the body was, when it was not JSON.`)}},"theorem.grounding":{label:`Grounding`,doc:`Sources and citations the answer drew on.`,attributes:{provider:P(`response`,`Provider`,`id`,`Who supplied the evidence.`),sources:P(`response`,`Sources`,`json`,`The sources.`),search_html:P(`response`,`Search suggestions`,`content`,`Google's search widget.`),raw:P(`response`,`Raw`,`json`,`The provider's raw grounding payload.`)}},"theorem.gate":{label:`Approval needed`,doc:`The call stopped until the user answers.`,attributes:{kind:P(`tool`,`Needs`,`text`,`What the user must give.`,Se),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ne),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Ae(`tool`,`Sign-in`,`The credential asked for. The challenge state is a secret and is never recorded.`,{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),type:P(`tool`,`Type`,`text`,`The kind of credential.`),service:P(`tool`,`Service`,`text`,`The service the person signs in to.`),issuer:P(`tool`,`Issuer`,`id`,`Who issues it.`),resource:P(`tool`,`Resource`,`id`,`What it grants access to.`),required_scopes:P(`tool`,`Scopes`,`list`,`The scopes it must carry.`)})}},"theorem.auth.scope_refused":{label:`Access refused`,doc:`The service asked for access outside the scopes the tool declares, so no sign-in was offered.`,attributes:{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),requested:P(`tool`,`Asked for`,`list`,`The scopes the service asked for.`),declared:P(`tool`,`Declared`,`list`,`The scopes the tool declares.`)}},"theorem.tool.warning":{label:`Tool warning`,doc:`Something the tool flagged while it ran; the call went on.`,attributes:{code:P(`tool`,`Code`,`id`,`The warning, by name.`),message:P(`tool`,`Message`,`content`,`What the tool said.`),severity:P(`tool`,`Severity`,`text`,`How serious the tool says it is.`)}},"theorem.tool.cancel":{label:`Tool call cancelled`,doc:`The provider cancelled a tool call it had made.`,attributes:{}},"theorem.session":{label:`Session`,doc:`Something happened to the Live session.`,attributes:{kind:P(`agent`,`What happened`,`text`,`The session fact recorded.`,De),time_left_ms:P(`agent`,`Time left`,`milliseconds`,`How long the provider said the session had left.`),closed_after_ms:P(`agent`,`Closed after`,`milliseconds`,`How long after the warning the socket closed.`),cause:P(`agent`,`Cause`,`text`,`go_away when the provider had warned it would close.`),code:P(`http`,`Close code`,`number`,`The WebSocket close code.`),reason:P(`http`,`Close reason`,`text`,`The WebSocket close reason.`),initiator:P(`agent`,`Closed by`,`text`,`Who closed the socket.`,Oe),activity:P(`agent`,`Activity`,`text`,`The provider's voice activity signal.`),audio_offset:P(`agent`,`Audio offset`,`text`,`Where in the audio it was heard.`),resumable:P(`agent`,`Resumable`,`boolean`,`The session can be resumed now.`),handle_issued:P(`agent`,`Handle issued`,`boolean`,`The provider sent a resumption handle. The handle is a credential and is never recorded.`),key_slot:P(`request`,`From key`,`text`,`The key slot refused.`),to_key_slot:P(`request`,`To key`,`text`,`The profile's fallback key slot it reopened on.`),error:P(`error`,`Detail`,`text`,`The provider's refusal.`)}},"gen_ai.evaluation.result":{label:`Eval result`,doc:`One grader's reading of this trace. Its keys are span attributes of the evaluation group.`,attributes:{}},"theorem.eval.verdict":{label:`Verdict`,doc:`One case's pass or fail after its trials, by the suite's pass rule. Every case is here, zeros included.`,attributes:{case:P(`evaluation`,`Case`,`id`,`The case judged.`),kind:P(`evaluation`,`Kind`,`text`,`Anthropic's split of cases.`,se),difficulty:P(`evaluation`,`Difficulty`,`number`,`The case’s 1–5 difficulty, when the suite set one.`),passed:P(`evaluation`,`Passed`,`boolean`,`The pass rule was met.`),trials:P(`evaluation`,`Trials`,`number`,`Trials run.`),trials_passed:P(`evaluation`,`Passed trials`,`number`,`Trials every deciding grader passed.`),trials_errored:P(`evaluation`,`Errored trials`,`number`,`Trials a grader could not score; they count as failed.`),trials_ungraded:P(`evaluation`,`Ungraded trials`,`number`,`Trials no grader decided.`)}}};function ze(e){return Re[e]}function Be(e,t){return Re[e]?.attributes[t]??Ie(t)}var Ve={turn:{label:`Turn`,doc:`One exchange: the model calls and tool calls it took to answer.`},session:{label:`Live session`,doc:`A Live session, from setup to close.`},call:{label:`Model call`,doc:`One request to a model and its answer.`},response:{label:`Live response`,doc:`One spoken response in a Live session.`},tool:{label:`Tool call`,doc:`One tool call theorem ran, from its hooks to settlement.`},http:{label:`HTTP try`,doc:`One HTTP attempt of a model call.`},cutout:{label:`Cutout`,doc:`A side effect the host recorded after the turn.`},decision:{label:`Decision`,doc:`One typed decision over JSON state.`},evaluation:{label:`Evaluation`,doc:`An eval graded this trace, or a suite ran.`},host:{label:`Host span`,doc:`A step the host recorded itself.`}};function He(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Ue(e,t){let n={type:e,...Ve[e]};return t?{...n,subject:t}:n}function We(e){switch(He(e,`gen_ai.operation.name`)){case`invoke_agent`:return Ue(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,He(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:return Ue(`theorem.request.live`in e.attributes?`response`:`call`,He(e,`gen_ai.request.model`));case`execute_tool`:return Ue(`tool`,He(e,`gen_ai.tool.name`));case`decide`:return Ue(`decision`,He(e,`gen_ai.agent.name`));case`embeddings`:return Ue(`call`,He(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Ue(`http`,He(e,`url.path`)):e.name===`cutout`?Ue(`cutout`,He(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Ue(`evaluation`,He(e,`theorem.evaluation.suite`)):Ue(`host`,e.name)}var F=t(i()),Ge=d();function Ke(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ke(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ke(e))&&(r&&(r+=` `),r+=t);return r}var qe=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Je(e){return typeof e==`string`&&qe.includes(e)}var Ye=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Xe(e){return typeof e==`string`&&Ye.has(e)}function Ze(e){return typeof e==`string`&&e.startsWith(`data-`)}function Qe(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Xe(n)||Ze(n))&&(t[n]=e[n]);return t}function $e(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Qe(t)}return typeof e==`object`&&!Array.isArray(e)?Qe(e):null}function et(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Xe(n)||Ze(n)||Je(n))&&(t[n]=e[n]);return t}function tt(e){return e==null?null:(0,F.isValidElement)(e)?et(e.props):typeof e==`object`&&!Array.isArray(e)?et(e):null}var nt=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(null,arguments)}function it(e,t){if(e==null)return{};var n,r,i=at(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function at(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ot=(0,F.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=it(e,nt),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,rt({},et(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),st=[`children`,`className`];function ct(){return ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(null,arguments)}function lt(e,t){if(e==null)return{};var n,r,i=ut(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ut(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var dt=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=lt(e,st),a=I(`recharts-layer`,r);return F.createElement(`g`,ct({className:a},et(i),{ref:t}),n)});function ft(e){return e===`__proto__`}var pt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function mt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:pt.test(e);default:return!1}}function ht(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function gt(e){return typeof e==`symbol`||e instanceof Symbol}function _t(e){return e==null?``:vt(e)}function vt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(vt).join(`,`);if(gt(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function yt(e){if(Array.isArray(e))return e.map(ht);if(typeof e==`symbol`)return[e];e=_t(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function bt(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ft(t))return n;let r=e[t];return r===void 0?mt(t)&&!Object.hasOwn(e,t)?bt(e,yt(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=ht(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return xt(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ft(t))return n;let r=e[t];return r===void 0?n:r}}}function xt(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ft(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var St=4;function Ct(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:St),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function wt(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+Ct(i)+n},``)}var Tt=e=>e===0?0:e>0?1:-1,Et=e=>typeof e==`number`&&e!=+e,Dt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Et(e),Ot=e=>L(e)||typeof e==`string`,kt=0,At=e=>{var t=++kt;return`${e||``}${t}`},jt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(Dt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Et(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Mt=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Nt(e,t,n){return L(e)&&L(t)?Ct(e+n*(t-e)):t}function Pt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):bt(e,t))===n)}var R=e=>e==null,Ft=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function It(e){return e!=null}function Lt(){}function Rt(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zt(Object(n),!0).forEach(function(t){Vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vt(e,t,n){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=Ut(e,`string`);return typeof t==`symbol`?t:t+``}function Ut(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Rt(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Bt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Bt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Bt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Bt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Bt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Bt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Bt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Bt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Dt(n.x))&&(L(n.y)||Dt(n.y))?Bt({x:c+jt(n.x,g),y:l+jt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Bt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Gt=[`top`,`left`,`right`,`bottom`];function Kt(e){return e==null?!1:typeof e==`object`||Gt.includes(e)}var qt=(0,F.createContext)(null);function z(e){return function(){return e}}var Jt=Math.PI,Yt=2*Jt,Xt=1e-6,Zt=Yt-Xt;function Qt(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function $t(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Qt;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var en=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Qt:$t(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Xt){if(!(Math.abs(u*s-c*l)>Xt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Jt-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Xt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Xt||Math.abs(this._y1-l)>Xt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Yt+Yt),d>Zt?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Xt&&this._append`A${n},${n},0,${+(d>=Jt)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};en.prototype;function tn(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new en(t)}Array.prototype.slice;function nn(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function rn(e){this._context=e}rn.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)}}};function an(e){return new rn(e)}function on(e){return e[0]}function sn(e){return e[1]}function cn(e,t){var n=z(!0),r=null,i=an,a=null,o=tn(s);e=typeof e==`function`?e:e===void 0?on:z(e),t=typeof t==`function`?t:t===void 0?sn:z(t);function s(s){var c,l=(s=nn(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:z(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ln(e,t,n){var r=null,i=z(!0),a=null,o=an,s=null,c=tn(l);e=typeof e==`function`?e:e===void 0?on:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sn:z(+n);function l(l){var u,d,f,p=(l=nn(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return cn().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:z(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:z(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:z(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var un=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function dn(e){return new un(e,!0)}function fn(e){return new un(e,!1)}function pn(){}function mn(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function hn(e){this._context=e}hn.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:mn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gn(e){return new hn(e)}function _n(e){this._context=e}_n.prototype={areaStart:pn,areaEnd:pn,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)}},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:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vn(e){return new _n(e)}function yn(e){this._context=e}yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bn(e){return new yn(e)}function xn(e){this._context=e}xn.prototype={areaStart:pn,areaEnd:pn,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 Sn(e){return new xn(e)}function Cn(e){return e<0?-1:1}function wn(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Cn(a)+Cn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Tn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function En(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Dn(e){this._context=e}Dn.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:En(this,this._t0,Tn(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,En(this,Tn(this,n=wn(this,e,t)),n);break;default:En(this,this._t0,n=wn(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function On(e){this._context=new kn(e)}(On.prototype=Object.create(Dn.prototype)).point=function(e,t){Dn.prototype.point.call(this,t,e)};function kn(e){this._context=e}kn.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function An(e){return new Dn(e)}function jn(e){return new On(e)}function Mn(e){this._context=e}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Nn(e),i=Nn(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Nn(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Pn(e){return new Mn(e)}function Fn(e,t){this._context=e,this._t=t}Fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function In(e){return new Fn(e,.5)}function Ln(e){return new Fn(e,0)}function Rn(e){return new Fn(e,1)}function zn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Bn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Vn(e,t){return e[t]}function Hn(e){let t=[];return t.key=e,t}function Un(){var e=z([]),t=Bn,n=zn,r=Vn;function i(i){var a=Array.from(e.apply(this,arguments),Hn),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=nn(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:z(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:z(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Bn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??zn,i):n},i}function Wn(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}zn(e,t)}}function Gn(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}zn(e,t)}}function Kn(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,zn(e,t)}}var qn=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Jn=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Je(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Yn=(e,t,n)=>r=>(e(t,n,r),null),Xn=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Je(i)&&typeof a==`function`&&(r||={},r[i]=Yn(a,t,n))}),r};function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zn(Object(n),!0).forEach(function(t){$n(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $n(e,t,n){return(t=er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=tr(e,`string`);return typeof t==`symbol`?t:t+``}function tr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nr(e,t){var n=Qn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function rr(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ir(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function ar(e){return e}function or(e){return Number.isSafeInteger(e)&&e>=0}function sr(e){return e!=null&&typeof e!=`function`&&or(e.length)}function cr(e){return function(t){return bt(t,e)}}function lr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ur(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function fr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var pr=`[object RegExp]`,mr=`[object String]`,hr=`[object Number]`,gr=`[object Boolean]`,_r=`[object Arguments]`,vr=`[object Symbol]`,yr=`[object Date]`,br=`[object Map]`,xr=`[object Set]`,Sr=`[object Array]`,Cr=`[object Function]`,wr=`[object ArrayBuffer]`,Tr=`[object Object]`,Er=`[object Error]`,Dr=`[object DataView]`,Or=`[object Uint8Array]`,kr=`[object Uint8ClampedArray]`,Ar=`[object Uint16Array]`,jr=`[object Uint32Array]`,Mr=`[object BigUint64Array]`,Nr=`[object Int8Array]`,Pr=`[object Int16Array]`,Fr=`[object Int32Array]`,Ir=`[object BigInt64Array]`,Lr=`[object Float32Array]`,Rr=`[object Float64Array]`,zr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Br(e){return zr.Buffer!==void 0&&zr.Buffer.isBuffer(e)}function Vr(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(lr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Hr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Hr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Hr(a,void 0,n,r,i));return t}if(Br(e))return e.subarray();if(ur(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Hr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Ur(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof e==`object`&&Wr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Ur(t,e,n,r,i),t}return e}function Ur(e,t,n=e,r,i){let a=[...Object.keys(t),...dr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Hr(t[s],s,n,r,i))}}function Wr(e){switch(fr(e)){case _r:case Sr:case wr:case Dr:case gr:case yr:case Lr:case Rr:case Nr:case Pr:case Fr:case br:case hr:case Tr:case pr:case xr:case mr:case vr:case Or:case kr:case Ar:case jr:return!0;default:return!1}}function Gr(e){return Hr(e,void 0,e,new Map,void 0)}function Kr(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function qr(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Jr(e,t,n){return typeof n==`function`?Yr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Yr(t,r,e,s,!1):!!c},new Map,!0):Jr(e,t,()=>void 0)}function Yr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Xr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?Yr(e,{...t},n,r,i):Kr(e,t);default:return qr(e)&&i?typeof t!=`string`||t===``:Kr(e,t)}}function Xr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return Qr(e,t,n,r);if(t instanceof Map)return Zr(e,t,n,r);if(t instanceof Set)return $r(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)lr(e)&&(e=Object(e));else{let t=fr(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Zr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Qr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function $r(e,t,n,r){return t.size===0||e instanceof Set&&Qr([...e],[...t],n,r)}function ei(e,t){return Jr(e,t,()=>void 0)}function ti(e){return e=Gr(e),t=>ei(t,e)}function ni(e,t){return Vr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(fr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Ur(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case hr:case mr:case gr:{let t=new e.constructor(e?.valueOf());return Ur(t,e),t}case _r:{let t={};return Ur(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ri(e){return ni(e)}var ii=/^(?:0|[1-9]\d*)$/;function ai(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ii.test(e)}}function oi(e){return typeof e==`object`&&!!e&&fr(e)===`[object Arguments]`}function si(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&mt(t)&&!(t in Object(e))?yt(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=ht(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||oi(r))&&ai(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function ci(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=ht(e)}return t=ri(t),function(n){let r=bt(n,e);return r===void 0?si(n,e):t===void 0?r===void 0:ei(r,t)}}function li(e){if(e==null)return ar;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?ci(e[0],e[1]):ti(e);default:return cr(e)}}function ui(e){return e===0?0:e}function di(e,t=ar){return sr(e)?rr(Array.from(e),ir(li(t),1)).map(ui):[]}function fi(e,t,n){return t===!0?di(e,n):typeof t==`function`?di(e,t):e}var pi=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),mi=n(((e,t)=>{t.exports=pi()})),hi=n((e=>{var t=i(),n=mi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),gi=n(((e,t)=>{t.exports=hi()}))(),_i=(0,F.createContext)(null),vi=e=>e,B=()=>{var e=(0,F.useContext)(_i);return e?e.store.dispatch:vi},yi=()=>{},bi=()=>yi,xi=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(_i),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:yi,[t,e]);return(0,gi.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:bi,t?t.store.getState:yi,t?t.store.getState:yi,n,xi)}function Si(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Ci(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var wi=e=>Array.isArray(e)?e:[e];function Ti(e){let t=Array.isArray(e[0])?e[0]:e;return Ci(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Ei(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Di=class{constructor(e){this.value=e}deref(){return this.value}},Oi=typeof WeakRef>`u`?Di:WeakRef,ki=0,Ai=1;function ji(){return{s:ki,v:void 0,o:null,p:null}}function Mi(e){return e instanceof Oi?e.deref():e}function Ni(e,t={}){let n=ji(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=ji(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=ji(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Ai)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Mi(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Oi(c):c}return s.s=Ai,s.v=c,c}return o.clearCache=()=>{n=ji(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Pi(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Si(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ni,argsMemoizeOptions:u=[]}={...n,...a},d=wi(c),f=wi(u),p=Ti(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Ei(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var H=Pi(Ni);function Fi(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Ii(e,t,n){return qr(n)&&(typeof t==`number`&&sr(n)&&ai(t)&&t<n.length||typeof t==`string`&&t in n)?Kr(n[t],e):!1}function Li(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Ri=(e,t,n)=>{if(e!==t){let r=Li(e),i=Li(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bi=/^\w*$/;function Vi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||gt(e)?!0:typeof e==`string`&&(Bi.test(e)||!zi.test(e))||t!=null&&Object.hasOwn(t,e)}function Hi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=sr(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Vi(e)?e:{key:e,path:yt(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Ri(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Ui(e,...t){let n=t.length;return n>1&&Ii(e,t[0],t[1])?t=[]:n>2&&Ii(t[0],t[1],t[2])&&(t=[t[0]]),Hi(e,Fi(t),[`asc`])}var Wi=e=>e.legend.settings,Gi=e=>e.legend.size;H([e=>e.legend.payload,Wi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Ui(r,n):r});function Ki(e,t){return Zi(e)||Xi(e,t)||Ji(e,t)||qi()}function qi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{c as r,u as i}from"./themeProps-3IqahpCr.js";import{t as a}from"./VStack-CkVMcNiK.js";import{n as o}from"./StackItem-CQviqAfM.js";import{t as s}from"./CodeBlock-Kjgv83A6.js";import{t as c}from"./Icon-ZfFwTt8n.js";import{r as l,t as u}from"./IconButton-CG5klqF1.js";import{d}from"./useTooltip-rxACYEAC.js";import{t as f}from"./Text-BsiAsowd.js";import{l as p,n as m}from"./labels-provider-Gus3heEH.js";import{n as h,t as g}from"./Card-Ghe4ozhC.js";import{t as _}from"./Tooltip-CTEuMRLe.js";import{i as v,o as y,s as b}from"./arrive-DvbqpeRS.js";import{k as x}from"./shaped-data-C4jsvipW.js";import{n as S}from"./trace-record-D9wgX8kq.js";import{O as C,f as w,j as T,jt as E,k as D}from"./index-DbHspDC4.js";var O={agent:{label:`Agent`,doc:`Which agent ran, for which conversation, and how it ended.`},request:{label:`Request`,doc:`What theorem asked the provider for.`},response:{label:`Response`,doc:`What the provider said about its answer.`},messages:{label:`Messages`,doc:`What was read and written, stored by hash.`},usage:{label:`Usage`,doc:`Tokens and cost, as reported or estimated.`},tool:{label:`Tool`,doc:`The tool call, its arguments, and how it settled.`},http:{label:`HTTP`,doc:`One HTTP try: where it went and what came back.`},error:{label:`Error`,doc:`Why it failed.`},record:{label:`Record`,doc:`What this record kept and how it was taken.`},part:{label:`Part`,doc:`Facts about one message part.`},decision:{label:`Decision`,doc:`The state a decision read, the questions it answered, and its answers.`},evaluation:{label:`Evaluation`,doc:`How an eval graded this trace, and by which suite.`}},k={OK:{label:`OK`,doc:`Finished as intended.`},ERROR:{label:`Error`,doc:`Failed; the error kind says why.`},UNSET:{label:`Stopped`,doc:`Stopped on purpose (cancelled, waiting for approval, paused) or ended with no verdict.`}},A={resource:{label:`Host resource`,doc:`Attributes the host set for its process (observability.resource), e.g. service.name.`},metadata:{label:`Request metadata`,doc:`The metadata the host passed on the request, untouched.`},span:{label:`Span`,doc:`One timed step of the trace.`},type:{label:`Type`,doc:`What the span is: a turn, a model call, a tool call, an HTTP try.`},children:{label:`Spans`,doc:`The spans inside this one, in start order: model calls, tool calls, HTTP tries.`},traceId:{label:`Trace ID`,doc:`Shared by every span of one trace.`},spanId:{label:`Span ID`,doc:`This span's id.`},status:{label:`Status`,doc:`How the span ended.`},start:{label:`Started`,doc:`When the span started.`},duration:{label:`Duration`,doc:`From start to end, on the clock the record names.`},events:{label:`Events`,doc:`What happened during the span, in order.`},links:{label:`Links`,doc:`Earlier traces this span follows.`}},j={completed:{label:`Completed`,doc:`The model finished its answer.`},length:{label:`Hit output limit`,doc:`The model stopped at its output token limit.`},tool:{label:`Handed tool to host`,doc:`Stopped to hand a tool call back to the host. Deprecated: approval now stops as “Waiting for approval”.`},gate:{label:`Waiting for approval`,doc:`A tool call needs confirmation, permission, or sign-in before it runs; the host resumes it.`},filtered:{label:`Filtered`,doc:`A safety filter or the output guardrail held the answer back.`},provider_error:{label:`Provider error`,doc:`The provider reported an error.`},cancelled:{label:`Cancelled`,doc:`The user or host stopped it.`},step_limit:{label:`Ran out of steps`,doc:`The last model call the profile allows asked for tools, so the turn ended without an answer.`},stream_incomplete:{label:`Stream cut off`,doc:`The provider's stream ended before the answer was complete.`},interrupted:{label:`Interrupted`,doc:`The user spoke over a Live response.`},generation_complete:{label:`Generation complete`,doc:`Live: the model finished generating this response; the turn may still be open.`},go_away:{label:`Closed by provider`,doc:`Live: the provider warned the session would end, then closed it.`}},M={config:{label:`Setup`,doc:`The profile, tool, or schema is set up wrong.`},request:{label:`Host request`,doc:`The host called theorem wrongly.`},input:{label:`User input`,doc:`The user sent input the profile does not accept.`},action:{label:`Not allowed`,doc:`The user asked for something the profile does not allow.`},auth:{label:`Credentials`,doc:`A missing or rejected credential, or an account that cannot be billed.`},rate_limit:{label:`Rate limit`,doc:`Too many requests, or a quota used up.`},unsupported:{label:`Unsupported`,doc:`The model or route cannot serve this request.`},busy:{label:`Busy`,doc:`The provider is up but too busy for the call.`},unavailable:{label:`Unavailable`,doc:`The provider is down.`},bad_response:{label:`Unusable response`,doc:`The provider answered with something that cannot be used.`},network:{label:`Network`,doc:`The request never reached the provider.`},timeout:{label:`Timeout`,doc:`The model took longer than the host allowed.`},safety:{label:`Safety`,doc:`theorem or the provider held the reply back.`},blocked:{label:`Blocked`,doc:`A guardrail or host policy stopped one of the agent's steps.`},declined:{label:`Declined`,doc:`The user declined one of the agent's steps.`},failed:{label:`Failed`,doc:`One of the agent's steps ran and failed.`},cancelled:{label:`Cancelled`,doc:`The user or host stopped the turn.`},internal:{label:`Internal`,doc:`A theorem invariant broke.`}},N={...M,provider_error:j.provider_error,stream_incomplete:j.stream_incomplete,grader_error:{label:`Grader failed`,doc:`The grader threw instead of returning a result.`}},ee={ok:{label:`Succeeded`,doc:`The tool ran and returned a result.`},error:{label:`Failed`,doc:`The tool ran and failed, or could not run.`},denied:{label:`Denied`,doc:`A guardrail, a hook, or the user refused the call.`},gated:{label:`Waiting for approval`,doc:`The call needs confirmation, permission, or sign-in; it has not run.`},paused:{label:`Paused`,doc:`The call was handed back to the host to finish.`},cancelled:{label:`Cancelled`,doc:`The turn was stopped before the call settled.`}},te={local:{label:`Host code`,doc:`TypeScript the host registered, run in-process.`},builtin:{label:`Built-in`,doc:`A tool theorem ships.`},http:{label:`HTTP`,doc:`A remote HTTP endpoint.`},mcp:{label:`MCP`,doc:`A tool on an MCP server.`},delegated:{label:`Another agent`,doc:`A specialist agent the tool ran.`}},ne={auto:{label:`Automatic`,doc:`Runs without asking.`},session_consent:{label:`Ask once`,doc:`Asks once per session, then remembers the answer.`},always_confirm:{label:`Always ask`,doc:`Asks before every call.`}},re={resume:{label:`Resumes`,doc:`Picks up a call that stopped for approval.`},continue:{label:`Continues`,doc:`Continues an answer that stopped early.`},retry:{label:`Retries`,doc:`Runs a failed turn again.`},trial:{label:`Trial`,doc:`A graded trial of this eval run.`}},ie={code:{label:`Code`,doc:`A deterministic check over the trace.`},model:{label:`Model`,doc:`A judge profile read the transcript.`}},ae={all:{label:`Every trial`,doc:`Passes only when every trial passed (pass^k).`},any:{label:`Any trial`,doc:`Passes when at least one trial passed (pass@k).`},at_least:{label:`At least n`,doc:`Passes when at least the stated number of trials passed.`}},oe={budget:{label:`Cost ceiling`,doc:`The summed cost crossed the ceiling the host set.`}},se={capability:{label:`Capability`,doc:`Can the agent do this at all?`},regression:{label:`Regression`,doc:`Does the agent still do this?`}},ce={invoke_agent:{label:`Run agent`,doc:`One turn of an agent, or one Live session.`},chat:{label:`Chat`,doc:`A model call over a chat-completions API.`},generate_content:{label:`Generate content`,doc:`A model call over a Gemini API.`},execute_tool:{label:`Run tool`,doc:`A tool call theorem ran.`},decide:{label:`Decide`,doc:`One model decision: typed answers to questions over JSON state.`},embeddings:{label:`Embed`,doc:`One embedding call: a vector for each input.`}},le={text:{label:`Text`,doc:`The model answers in text.`},json:{label:`JSON`,doc:`The model answers with structured JSON.`},image:{label:`Image`,doc:`The model answers with an image.`},speech:{label:`Speech`,doc:`The model answers in audio.`}},ue={"gcp.gemini":{label:`Google Gemini`,doc:`Google's Gemini API.`},openrouter:{label:`OpenRouter`,doc:`The OpenRouter gateway.`},typesafe:{label:`TypeSafe`,doc:`TypeSafe's native decision API.`}},de={input:{label:`Input`,doc:`Tokens the model read.`},output:{label:`Output`,doc:`Tokens the model wrote.`}},fe={input_transcription:{label:`What the provider heard`,doc:`The provider's transcript of the user's audio.`},output_transcription:{label:`Transcript of the reply`,doc:`The provider's transcript of the model's spoken answer.`}},pe={pre_turn:{label:`Before the turn`,doc:`Before the first model call.`},pre_tool:{label:`Before a tool`,doc:`Before a tool call runs.`},post_tool:{label:`After a tool`,doc:`After a tool call settles.`},before_end:{label:`Before the end`,doc:`Before the turn delivers its final answer.`},post_turn:{label:`After the turn`,doc:`After the turn has ended.`}},me={inject:{label:`Injected`,doc:`Added messages to the conversation.`},abort:{label:`Aborted`,doc:`Stopped the turn.`},deny:{label:`Denied`,doc:`Refused a tool call.`},confirm:{label:`Asked to confirm`,doc:`Required confirmation before a tool call.`},mutate:{label:`Changed`,doc:`Changed the tool call or its result.`},labelFailed:{label:`Labelled failed`,doc:`Showed the tool's failed label for a call that completed.`},waitFor:{label:`Waited`,doc:`Held a tool call until other calls in its step settled.`}},he={input:{label:`User input`,doc:`Text the user sent.`},history:{label:`History`,doc:`Earlier messages sent back to the model.`},system:{label:`System instructions`,doc:`The profile's or host's instructions.`},attachment:{label:`Attachment`,doc:`A file the user attached.`},tool_call:{label:`Tool call`,doc:`Arguments the model sent to a tool.`},tool_result:{label:`Tool result`,doc:`What a tool returned.`},output_delta:{label:`Streaming output`,doc:`The answer as it streamed.`},output_final:{label:`Final output`,doc:`The whole answer.`},thought:{label:`Thinking`,doc:`The model's thoughts as they streamed.`},network:{label:`Network`,doc:`A URL the agent was about to reach.`},live_inbound:{label:`Live inbound`,doc:`What arrived from a Live session.`},live_outbound:{label:`Live outbound`,doc:`What was sent into a Live session.`},trace:{label:`Trace`,doc:`Text being written to the trace.`}},ge={"detect.ids":{label:`IDs`,doc:`A US SSN, ITIN, or EIN number. The decision names the boundary it was crossing and what was done with it.`},"detect.financial":{label:`Financial`,doc:`An IBAN or card number. The decision names the boundary it was crossing and what was done with it.`},"detect.network":{label:`Network`,doc:`An IPv4 or IPv6 address. The decision names the boundary it was crossing and what was done with it.`},"detect.credentials":{label:`Credentials`,doc:`An API key, token, password assignment, or private key. The decision names the boundary it was crossing and what was done with it.`},"detect.injection":{label:`Injection`,doc:`Text that tries to override the agent's instructions, such as "ignore previous instructions". The decision names the boundary it was crossing and what was done with it.`},"detect.tool_instructions":{label:`Tool instructions`,doc:`A tool's text instructed the agent: it told it to set its instructions aside, such as "ignore your instructions", or beside an address it named a tool the model can call, gave an order such as "you must now…", or claimed to speak for the user, the system, or an admin. Each match says which in its signal. The decision names the boundary it was crossing and what was done with it.`},"detect.canary_leak":{label:`Canary leak`,doc:`The turn's canary, a secret marker planted in the instructions, so the model was repeating them. The decision names the boundary it was crossing and what was done with it.`},"detect.prompt_leak":{label:`Prompt leak`,doc:`12 or more words in a row of the private instructions. The decision names the boundary it was crossing and what was done with it.`},"detect.marker_leak":{label:`Marker leak`,doc:`The markers Theorem fences user data with, or the words of the canary note. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_images":{label:`Ungiven images`,doc:`An image whose address the model was not given, on a host the profile does not allow. Loading it could send data out. The decision names the boundary it was crossing and what was done with it.`},"detect.ungiven_links":{label:`Ungiven links`,doc:`A link to an address the model was not given, on a host the profile does not allow. The decision names the boundary it was crossing and what was done with it.`},"detect.tool_leak":{label:`Tool leak`,doc:`The name of one of the profile's own tools, or of a tool's parameter written as a quoted key. The decision names the boundary it was crossing and what was done with it.`},"egress.provider-tool-leak":{label:`Instructions sent to a provider tool`,doc:`A provider's built-in tool, such as search, was sent the canary or the instructions. It ran before Theorem saw it, so the data had already left.`},"egress.unscannable":{label:`Reply could not be checked`,doc:`Structured output could not be turned into text to check, so it was treated as unsafe.`},"tool_call.tainted-turn":{label:`Change after remote content`,doc:`A tool that writes or deletes was called after the turn read remote content, which could have steered it.`},"tool_call.steered-turn":{label:`Change after a remote instruction`,doc:`A tool that writes or deletes was called after the turn read remote content that also looked like instructions to the agent.`},"tool_call.remote-destination":{label:`Destination from remote content`,doc:`A tool call's argument carried an address that only a remote tool's result named.`},"network.blocked":{label:`Address blocked`,doc:`A tool tried to reach a private, local, or disallowed address. The request was never made.`}},_e={input:{label:`Input check`,doc:`Checked what the user sent before the model read it.`},egress:{label:`Output check`,doc:`Checked the whole answer before it was released.`},tool_arguments:{label:`Argument check`,doc:`Checked what the model sent to a tool.`},taint:{label:`Remote-content gate`,doc:`Checked whether a tool that writes or deletes was called after the turn read remote content.`},destination:{label:`Destination check`,doc:`Checked whether the call sends to an address that only a remote tool's result named.`},tool_result:{label:`Result check`,doc:`Checked what a tool returned before the model read it.`},tool_failure:{label:`Error check`,doc:`Checked a tool's error message before the model read it.`},network:{label:`Address check`,doc:`Checked the address a tool was about to reach.`},network_request:{label:`Lookup and redirect check`,doc:`Checked, during a tool's request, where its address resolved and every redirect it followed; includes the lookup when the host resolves names.`},output_stream:{label:`Streaming check`,doc:`Checked the answer piece by piece as it streamed, before the host saw each piece.`},stream_canary:{label:`Streamed leak check`,doc:`Checked each streamed tool call and other non-text output for the system prompt's canary.`},tool_draft:{label:`Tool call preview check`,doc:`Checked a tool call piece by piece as the model wrote it, before the host saw each piece.`},live_input:{label:`Live input check`,doc:`Checked text the host sent into a live session.`},live_output:{label:`Live output check`,doc:`Checked what the model said in a live session, batch by batch, before the host heard it.`}},ve={trusted:{label:`Trusted`,doc:`The profile's own text, written at author time.`},assembled:{label:`Assembled`,doc:`Built by the host each turn; may carry user data.`},untrusted:{label:`Untrusted`,doc:`User input, tool results, attachments, or another agent.`}},ye={allow:{label:`Allowed`,doc:`Checked and let through unchanged.`},redact:{label:`Redacted`,doc:`The matched text was replaced.`},flag:{label:`Flagged`,doc:`Recorded; nothing was changed.`},block:{label:`Blocked`,doc:`The step was stopped.`}},be={info:{label:`Info`,doc:`Noted only.`},low:{label:`Low`,doc:`Low risk.`},medium:{label:`Medium`,doc:`Medium risk.`},high:{label:`High`,doc:`High risk.`}},xe={query:{label:`Query`,doc:`The input is what a search looks for.`},document:{label:`Document`,doc:`The input is what a search looks through.`}},Se={confirmation:{label:`Confirmation`,doc:`The user must confirm this call.`},permission:{label:`Permission`,doc:`The user must allow this tool.`},auth:{label:`Sign-in`,doc:`The tool needs a credential the user must provide.`},page:{label:`Page`,doc:`The call waits for the page that answers this tool.`}},Ce={egress:{label:`Output guardrail`,doc:`The output guardrail sent the answer back to the model.`},validation:{label:`Invalid JSON`,doc:`The structured output did not match its schema.`}},we={before:{label:`Before the turn`,doc:`Compacts before the turn runs.`},after:{label:`After the turn`,doc:`Signals the host to compact after the turn.`}},Te={history:{label:`History`,doc:`Counts tokens across earlier turns.`},input:{label:`Whole input`,doc:`Counts the turn's whole input: instructions, history, and attachments.`}},Ee={compacted:{label:`Compacted`,doc:`A summary replaced the earlier messages.`},deferred:{label:`Kept whole`,doc:`The compactor failed and the history still fits, so it was kept and compaction runs again next turn.`},dropped:{label:`Dropped`,doc:`The compactor failed and the history no longer fits, so the earlier messages were dropped.`}},De={closing_soon:{label:`Closing soon`,doc:`The provider warned the session will end.`},ended:{label:`Ended`,doc:`The provider ended the session after warning it would.`},waiting_for_input:{label:`Waiting for input`,doc:`The model is waiting for the user.`},working:{label:`Working`,doc:`The model is thinking or waiting on a tool.`},idle:{label:`Idle`,doc:`The model finished everything it was doing.`},voice_activity:{label:`Voice activity`,doc:`The provider heard speech start or stop.`},session_resumption:{label:`Resumption update`,doc:`The provider said whether the session can be resumed.`},setup_complete:{label:`Setup complete`,doc:`The provider accepted the session setup.`},key_fallback:{label:`Switched to fallback key`,doc:`The key was refused for quota at setup; the session reopened on the profile's fallback key.`},closed:{label:`Socket closed`,doc:`The session socket closed.`}},Oe={host:{label:`Host`,doc:`The host closed the session.`},provider:{label:`Provider`,doc:`The provider closed the socket.`},theorem:{label:`theorem`,doc:`theorem closed the socket.`}},ke={io:{label:`Moves at I/O only`,doc:`Recorded in a Cloudflare Worker, whose clock only moves at I/O: time spent computing reads as zero.`}};function P(e,t,n,r,i){return i?{label:t,doc:r,format:n,group:e,options:i}:{label:t,doc:r,format:n,group:e}}function Ae(e,t,n,r){return{label:t,doc:n,format:`object`,group:e,fields:r}}var je={input:P(`request`,`Input`,`boolean`,`Transcribe the user's audio.`),output:P(`request`,`Output`,`boolean`,`Transcribe the model's audio.`)},Me={"gen_ai.operation.name":P(`agent`,`Operation`,`text`,`What this span did.`,ce),"gen_ai.agent.name":P(`agent`,`Agent`,`id`,`The profile that ran.`),"gen_ai.conversation.id":P(`agent`,`Conversation`,`id`,`The conversation id the host passed; absent when it passed none.`),"gen_ai.conversation.compacted":P(`agent`,`History compacted`,`boolean`,`Compaction summarized earlier messages in this turn.`),"theorem.stop.kind":P(`agent`,`Stop reason`,`text`,`Why it ended. Absent when it failed before any stop.`,j),"theorem.attempts":P(`agent`,`Attempts`,`number`,`Times the turn ran its model calls, counting a retry after a guardrail or invalid JSON.`),"theorem.steps":P(`agent`,`Model calls`,`number`,`Model calls made (Live: responses).`),"theorem.turn.time_to_first_text":P(`agent`,`Time to first visible text`,`seconds`,`From the start of the turn to the first reply text the host received, after every guardrail and held tail.`),"theorem.guardrail.stream_ms":P(`agent`,`Stream guardrail time`,`milliseconds`,"Time every check on this call's streamed output took, together; each check's own time is on its `theorem.guardrail` event."),"theorem.step":P(`agent`,`Step`,`number`,`Which model call of the turn this is, from 1.`),"theorem.attempt":P(`agent`,`Attempt`,`number`,`Which attempt of the turn made this call.`),"theorem.request.effort":P(`agent`,`Effort`,`text`,`The effort the host asked for.`),"theorem.request.model_select":P(`agent`,`Model asked for`,`id`,`The model the host asked for, by alias.`),"theorem.project.id":P(`agent`,`Project`,`id`,`The project id the host passed.`),"theorem.link.kind":P(`agent`,`Link`,`text`,`How this span follows an earlier trace.`,re),"gen_ai.provider.name":{...P(`request`,`Provider`,`id`,`Who served the call; a local server by its declared name. Absent when unknown.`,ue),open:!0},"gen_ai.request.model":P(`request`,`Model sent`,`id`,`The model id sent to the provider.`),"theorem.model.id":P(`request`,`Model alias`,`id`,`The profile's name for the model.`),"gen_ai.request.stream":P(`request`,`Streamed`,`boolean`,`The call streamed its answer. Absent means it did not.`),"gen_ai.request.temperature":P(`request`,`Temperature`,`number`,`As requested.`),"gen_ai.request.max_tokens":P(`request`,`Max output tokens`,`tokens`,`As requested.`),"gen_ai.request.reasoning.level":P(`request`,`Thinking level`,`text`,`As requested.`),"gen_ai.output.type":P(`request`,`Output type`,`text`,`What kind of answer was asked for.`,le),"theorem.key_slot":P(`request`,`API key`,`text`,`The vault key slot that finally answered, by the name the profile gave it.`),"theorem.request.builtins":P(`request`,`Provider tools`,`list`,`Tools the provider runs itself (search, maps, code), as requested.`),"theorem.request.store":P(`request`,`Stored by provider`,`boolean`,`Asked the provider to keep the response for a later continuation.`),"theorem.request.summaries":P(`request`,`Thought summaries`,`text`,`Asked for summaries of the model’s thinking.`),"theorem.request.structured":P(`request`,`Structured output`,`object`,`The JSON schema the answer must match.`),"theorem.request.session_id":P(`request`,`Session`,`id`,`The provider session this call ran in.`),"theorem.request.cache":Ae(`request`,`Cache`,`The prompt cache, as requested.`,{mode:P(`request`,`Mode`,`text`,`How the prompt cache is used.`),ttl:P(`request`,`Lifetime`,`text`,`How long a cache entry lives.`)}),"theorem.request.image":Ae(`request`,`Image settings`,`The image asked for.`,{mime_type:P(`request`,`Format`,`text`,`The image file type.`),aspect_ratio:P(`request`,`Aspect ratio`,`text`,`Width to height.`),resolution:P(`request`,`Resolution`,`text`,`How detailed the image is, such as 1K, 2K or 4K.`),include_text:P(`request`,`With text`,`boolean`,`Text may come back beside the image.`)}),"theorem.request.speech":Ae(`request`,`Speech settings`,`The audio asked for.`,{voice:P(`request`,`Voice`,`text`,`The voice.`),speed:P(`request`,`Speed`,`number`,`The speaking rate; 1 is the voice's own pace.`),format:P(`request`,`Format`,`text`,`The audio format.`)}),"theorem.request.live":Ae(`request`,`Live settings`,`The Live session setup, as sent.`,{voice:P(`request`,`Voice`,`text`,`The voice the model speaks in.`),vad:Ae(`request`,`Voice detection`,`How the provider hears speech start and stop.`,{activity_handling:P(`request`,`On speech`,`text`,`What the model does when the user starts speaking.`),start_sensitivity:P(`request`,`Start sensitivity`,`text`,`How readily speech counts as started.`),end_sensitivity:P(`request`,`End sensitivity`,`text`,`How readily speech counts as ended.`),prefix_padding_ms:P(`request`,`Lead-in`,`milliseconds`,`Speech needed before it counts as started.`),silence_duration_ms:P(`request`,`Silence to end`,`milliseconds`,`Silence needed before speech counts as ended.`)}),session_resumption:P(`request`,`Resumable`,`boolean`,`Asked for handles to resume the session later.`),context_compression:Ae(`request`,`Context compression`,`How the provider shrinks a long session.`,{mechanism:P(`request`,`Mechanism`,`text`,`How the context is shrunk.`),trigger_tokens:P(`request`,`Trigger`,`tokens`,`Context size that starts compression.`),target_tokens:P(`request`,`Keep`,`tokens`,`Context size kept after compressing.`)}),transcription:Ae(`request`,`Transcription`,`Which audio the provider transcribes.`,je),resumed:P(`request`,`Resumed`,`boolean`,`The session resumed an earlier one. The resumption handle is a credential and is never recorded.`)}),"theorem.input.sent_from":P(`request`,`Sent from message`,`number`,`Where in the input messages the request body starts; earlier ones the provider already held.`),"gen_ai.response.id":P(`response`,`Response ID`,`id`,`The provider's id for its answer.`),"gen_ai.response.model":P(`response`,`Model that answered`,`id`,`The model the provider says answered.`),"gen_ai.response.finish_reasons":P(`response`,`Provider finish reason`,`list`,`The provider's own reason for stopping. Absent when the call was stopped.`),"gen_ai.response.status":P(`response`,`Provider status`,`text`,`The provider's own status for the answer. Absent when the call was stopped.`),"gen_ai.response.time_to_first_chunk":P(`response`,`Time to first chunk`,`seconds`,`From the start of the successful HTTP try, or of a Live response, to its first chunk; a buffered body is its one chunk.`),"theorem.response.time_to_first_text":P(`response`,`Time to first text`,`seconds`,`From the start of the call to its first reply text, before guardrails; reasoning and tool calls do not count.`),"gen_ai.system_instructions":P(`messages`,`System instructions`,`parts`,`The instructions the model read.`),"gen_ai.tool.definitions":P(`messages`,`Tool definitions`,`content`,`The tools offered to the model, as sent.`),"gen_ai.input.messages":P(`messages`,`Input`,`messages`,`On a turn: the user's new input. On a model call: everything the model read.`),"gen_ai.output.messages":P(`messages`,`Output`,`messages`,`On a turn: what the host received. On a model call: what the model produced.`),"theorem.output.delivered":P(`messages`,`Delivered`,`messages`,`What the host received of this Live response.`),"theorem.error.public":P(`error`,`Error the user saw`,`content`,`The worded error the caller received.`),"gen_ai.usage.input_tokens":P(`usage`,`Input tokens`,`tokens`,`Tokens the model read.`),"gen_ai.usage.output_tokens":P(`usage`,`Output tokens`,`tokens`,`Tokens the model wrote.`),"gen_ai.usage.reasoning.output_tokens":P(`usage`,`Thinking tokens`,`tokens`,`Output tokens spent thinking.`),"gen_ai.usage.cache_read.input_tokens":P(`usage`,`Cached input tokens`,`tokens`,`Input tokens read from the prompt cache.`),"gen_ai.usage.cache_write.input_tokens":P(`usage`,`Cache write tokens`,`tokens`,`Input tokens written to the prompt cache.`),"theorem.usage.tool_use.input_tokens":P(`usage`,`Tool-use input tokens`,`tokens`,`Input tokens Google counts for tool use; already inside input tokens.`),"theorem.usage.grounding":Ae(`usage`,`Grounding`,`Grounding tool uses, per tool.`,{type:P(`usage`,`Tool`,`id`,`The provider's name for the tool.`),count:P(`usage`,`Uses`,`number`,`Times the tool ran.`),search_query_count:P(`usage`,`Searches`,`number`,`Search queries it ran.`)}),"theorem.usage.cost_usd":P(`usage`,`Cost`,`usd`,`As the provider reported it, or priced from Jev's fixed price for a decision. Absent when no call reported a cost.`),"theorem.usage.upstream_cost_usd":P(`usage`,`Upstream cost`,`usd`,`The upstream provider's cost, as a gateway reported it.`),"theorem.usage.cost_partial":P(`usage`,`Cost is partial`,`boolean`,`Only some calls reported a cost.`),"theorem.usage.estimated":P(`usage`,`Estimated`,`list`,`Sides whose token counts theorem estimated rather than the provider reporting them.`,de),"theorem.usage.unknown_media":Ae(`usage`,`Uncounted media`,`Media items no counting rule covered, so their tokens are missing from the estimate.`,{input:P(`usage`,`Input`,`number`,`Uncounted media the model read.`),output:P(`usage`,`Output`,`number`,`Uncounted media the model wrote.`)}),"gen_ai.tool.name":P(`tool`,`Tool`,`id`,`The tool called.`),"gen_ai.tool.call.id":P(`tool`,`Call ID`,`id`,`The call's id.`),"gen_ai.tool.type":P(`tool`,`Tool type`,`text`,`function for a registered tool.`),"gen_ai.tool.call.arguments":P(`tool`,`Arguments`,`content`,`The arguments exactly as the model sent them.`),"gen_ai.tool.call.result":P(`tool`,`Result`,`content`,`What the model reads back, after formatting and the tool-result guardrail.`),"theorem.tool.call.result.parts":P(`tool`,`Result media`,`parts`,`Media and other parts the result carried.`),"theorem.tool.data":P(`tool`,`Raw output`,`json`,`The tool's output before formatting.`),"theorem.tool.outcome":P(`tool`,`Outcome`,`text`,`How the call settled.`,ee),"theorem.tool.origin":P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,te),"theorem.tool.permission":P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ne),"theorem.tool.approved":P(`tool`,`Approved`,`boolean`,`The host resumed this call with approval.`),"theorem.tool.failure.code":P(`error`,`Failure code`,`id`,`The tool's code for the failure, e.g. malformed_arguments.`),"theorem.cutout.input.sha256":P(`tool`,`Input hash`,`id`,`The host's hash of what it sent to the cutout.`),"theorem.cutout.output.sha256":P(`tool`,`Output hash`,`id`,`The host's hash of what came back.`),"http.request.method":P(`http`,`Method`,`text`,`The HTTP method.`),"server.address":P(`http`,`Host`,`id`,`The server the try went to.`),"url.path":P(`http`,`Path`,`id`,`The URL path. The query is never recorded.`),"http.response.status_code":P(`http`,`Status code`,`number`,`The HTTP status returned.`),"http.request.resend_count":P(`http`,`Retry number`,`number`,`0 for the first try, then 1, 2, … for each retry.`),"theorem.retry.backoff_ms":P(`http`,`Wait before retry`,`milliseconds`,`How long theorem waited after the previous try.`),"error.type":{...P(`error`,`Error kind`,`text`,`Why it failed: an error kind, the failing stop, or on an HTTP try its status or exception name.`,N),open:!0},"exception.type":P(`error`,`Exception`,`id`,`The class or kind of what was thrown.`),"exception.message":P(`error`,`Message`,`content`,`The exception message, scrubbed.`),"exception.stacktrace":P(`error`,`Stack`,`content`,`Where it was thrown, scrubbed.`),"theorem.record.include":P(`record`,`Included`,`list`,`What this record kept. A field left out because it was off reads as not recorded, never as did not happen.`),"theorem.record.scrub":P(`record`,`Scrubbed`,`list`,`What was removed from stored text before it was hashed.`),"theorem.clock":P(`record`,`Clock`,`text`,`How the times in this record were taken.`,ke),"theorem.source":P(`part`,`Source`,`text`,`Where this text came from, when it is not the model’s own.`,fe),"theorem.interim":P(`part`,`Interim`,`boolean`,`An interim transcript, not the final one.`),"theorem.observed_end":P(`part`,`Seen at`,`time`,`When theorem saw this provider-run step whole.`),"theorem.partial":P(`part`,`Incomplete`,`boolean`,`The provider sent this step incomplete.`),"theorem.embedding.inputs":P(`request`,`Inputs`,`number`,`How many inputs the call embedded, one vector each.`),"theorem.embedding.task":P(`request`,`Task`,`text`,`Whether the inputs are queries or documents, as the request said.`,xe),"theorem.decision.contract":P(`decision`,`Contract`,`id`,`The host's decision contract the profile names.`),"theorem.decision.state":P(`decision`,`State`,`json`,`The JSON state the decision read.`),"theorem.decision.questions":P(`decision`,`Questions`,`json`,`Each question by id: its kind, instructions, and criteria.`),"theorem.decision.assets":P(`decision`,`Images`,`json`,`Each image by reference: its type and size. The image itself is never recorded.`),"theorem.decision.answers":P(`decision`,`Answers`,`json`,`Each answer by question id: the choice, score, number or box, its confidence, and probabilities.`),"gen_ai.evaluation.name":P(`evaluation`,`Grader`,`id`,`The grader that produced this result.`),"gen_ai.evaluation.score.value":P(`evaluation`,`Score`,`number`,`The score, 0–1 unless the grader says otherwise.`),"gen_ai.evaluation.score.label":P(`evaluation`,`Label`,`text`,`The grader's label for this trial, one of the labels it declares.`),"gen_ai.evaluation.explanation":P(`evaluation`,`Explanation`,`content`,`Why, in the grader's words.`),"theorem.evaluation.source":P(`evaluation`,`Graded by`,`text`,`Who produced this result.`,ie),"theorem.evaluation.suite":P(`evaluation`,`Suite`,`id`,`The eval suite that ran.`),"theorem.evaluation.case":P(`evaluation`,`Case`,`id`,`The case this trial ran. Absent when a production trace was graded without one.`),"theorem.evaluation.trial":P(`evaluation`,`Trial`,`number`,`Which trial of the case this is, from 0.`),"theorem.evaluation.grader.version":P(`evaluation`,`Grader version`,`id`,`The sha256 of the grader's rubric or code identity, so a reader can tell which rubric scored this.`),"theorem.evaluation.passed":P(`evaluation`,`Passed`,`boolean`,`The grader's yes or no. Absent when the result informs but does not decide.`),"theorem.eval.repeat":P(`evaluation`,`Trials per case`,`number`,`How many times each case ran.`),"theorem.eval.pass_rule":P(`evaluation`,`Pass rule`,`text`,`How the trials of a case become its verdict.`,ae),"theorem.eval.pass_at_least":P(`evaluation`,`Trials needed`,`number`,`Trials that must pass under the at-least rule.`),"theorem.eval.caseless":P(`evaluation`,`Caseless`,`boolean`,`Production traces were graded with no cases: only graders that need no expectation ran.`),"theorem.eval.stopped":P(`evaluation`,`Stopped early`,`text`,`Why the run stopped before its end.`,oe),"vcs.ref.head.revision":P(`evaluation`,`Commit`,`id`,`The commit under test.`)},Ne=/^(?:gen_ai|theorem)\.usage\.([a-z]+)\.(input|output)_tokens$/,Pe=/^http\.(request|response)\.header\.(.+)$/;function Fe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ie(e){let t=Me[e];if(t)return t;let n=Ne.exec(e);if(n){let[,e=``,t=``]=n;return P(`usage`,`${Fe(e)} ${t} tokens`,`tokens`,`${Fe(t)} tokens that were ${e}, as the provider reported them.`)}let r=Pe.exec(e);if(r){let[,e=``,t=``]=r;return P(`http`,`${Fe(e)} header ${t}`,`list`,`The ${e} header, as sent. A key, auth, cookie, secret, or token header is [redacted].`)}}var Le=Ae(`error`,`Hits`,`Each rule that matched.`,{rule:{...P(`error`,`Rule`,`id`,`The rule that matched: one of Theorem's own, or a host policy's, which names itself.`,ge),open:!0},severity:P(`error`,`Severity`,`text`,`How serious the rule says a match is.`,be),signal:P(`error`,`Signal`,`text`,"What made a `tool_instructions` match one, or how a host detector's `find` failed: `find_threw` or `find_result`."),start:P(`error`,`From`,`number`,`Where the match starts in the checked text.`),end:P(`error`,`To`,`number`,`Where the match ends in the checked text.`),match:P(`error`,`Match`,`text`,`The matched text, exact. Kept only when the profile records match previews.`),label:P(`error`,`Rule name`,`text`,`A host rule's own name for what it catches.`),doc:P(`error`,`Why it matters`,`text`,`A host rule's own account of why a match matters.`)}),Re={"theorem.stage":{label:`Hook`,doc:`A stage in the turn where host hooks could act.`,attributes:{stage:P(`agent`,`Stage`,`text`,`Where in the turn.`,pe),affordance:P(`agent`,`Applied`,`list`,`What the hooks did; empty when they did nothing.`,me),hook_ms:P(`agent`,`Hook time`,`milliseconds`,`Time the hooks took; absent when none ran.`),warnings:P(`error`,`Warnings`,`list`,`Warning codes the hooks raised.`)}},"theorem.guardrail":{label:`Guardrail`,doc:"A guardrail checked some text: what it did, or `allow` for a timed check that let the text through.",attributes:{check:P(`agent`,`Check`,`id`,`Which timed check ran.`,_e),duration_ms:P(`agent`,`Check time`,`milliseconds`,`Time the check took; a check on streamed output, its total over the call.`),runs:P(`agent`,`Runs`,`number`,`How many times a check on streamed output ran on the call.`),stage:P(`agent`,`Checked`,`text`,`Which text was checked.`,he),trust:P(`agent`,`Trust`,`text`,`How far that text is trusted.`,ve),action:P(`agent`,`Action`,`text`,`What the guardrail did.`,ye),hits:Le,provenance:Ae(`agent`,`Came from`,`Where the checked text came from.`,{origin:P(`tool`,`Origin`,`text`,`Where the tool runs, which sets how far its result is trusted.`,te),tool:P(`tool`,`Tool`,`id`,`The tool that produced it.`),depth:P(`tool`,`Hops`,`number`,`Tool calls between the user's turn and this text: 1 for a direct call, more through another agent.`)}),error:P(`error`,`Detail`,`content`,`The guardrail's internal reason.`),error_summary:P(`error`,`Failure`,`text`,`Which host detector failed, how, and its error id, in the kernel's words only. The host stream's reason ends with the same id.`)}},"theorem.attempt.retry":{label:`Retry`,doc:`The turn ran its model calls again.`,attributes:{attempt:P(`agent`,`Attempt`,`number`,`The attempt that starts.`),reason:P(`agent`,`Reason`,`text`,`Why it retried.`,Ce)}},"theorem.step.resume":{label:`Sent again`,doc:`A model call failed with no reply, and the turn sent it again.`,attributes:{step:P(`agent`,`Step`,`number`,`The step whose model call was sent again.`),resume:P(`agent`,`Re-send`,`number`,`How many calls the turn has sent again so far.`),stop:P(`agent`,`Stop`,`text`,`How the failed call ended.`),error:P(`error`,`Detail`,`content`,`The provider's internal reason.`)}},"theorem.compaction":{label:`Compaction`,doc:`theorem decided whether to summarize earlier messages.`,attributes:{timing:P(`agent`,`Timing`,`text`,`When compaction runs.`,we),meter:P(`agent`,`Counts`,`text`,`What the threshold counts.`,Te),budget:P(`usage`,`Budget`,`tokens`,`The token budget the threshold is a share of.`),threshold:P(`usage`,`Threshold`,`number`,`The share of the budget that triggers it.`),trigger:P(`agent`,`Trigger`,`text`,`custom when the host decides instead.`),tokens_before:P(`usage`,`Tokens counted`,`tokens`,`What the meter read.`),unknown_media:P(`usage`,`Uncounted media`,`number`,`Media items the count could not cover.`),needed:P(`agent`,`Needed`,`boolean`,`The count crossed the threshold.`),outcome:P(`agent`,`Outcome`,`text`,`What happened to the earlier messages.`,Ee),messages_before:P(`messages`,`Messages before`,`number`,`History length before.`),messages_after:P(`messages`,`Messages after`,`number`,`History length after.`),dropped_media:P(`messages`,`Media left out`,`number`,`Media the compactor does not take, left out of what it read.`),failure_stop:P(`agent`,`Compactor stop`,`text`,`How the failed compactor stopped.`,j),failure_error:P(`agent`,`Compactor error`,`text`,`The error the compactor failed with.`,M),failure_reason:P(`agent`,`Compactor reason`,`content`,`Why the compactor failed, in its own words.`),failure_empty:P(`agent`,`Empty summary`,`boolean`,`The compactor replied with nothing.`),failure_unreadable:P(`agent`,`Nothing to read`,`boolean`,`Everything to compact was media the compactor does not take, so it did not run.`),summary:P(`messages`,`Summary`,`content`,`The summary that replaced them.`)}},exception:{label:`Exception`,doc:`Something was thrown, or the provider reported an error.`,attributes:{}},"theorem.upstream.row":{label:`Provider data`,doc:`One row of data from the provider, at the time it arrived.`,attributes:{row:P(`response`,`Row`,`json`,`The row, scrubbed, with media and known text by hash.`)}},"theorem.wire.request":{label:`Request body`,doc:`The body sent to the provider.`,attributes:{body:P(`request`,`Body`,`json`,`The body, scrubbed, with media and known text by hash.`),body_kind:P(`request`,`Body type`,`text`,`What the body was, when it was not JSON.`)}},"theorem.grounding":{label:`Grounding`,doc:`Sources and citations the answer drew on.`,attributes:{provider:P(`response`,`Provider`,`id`,`Who supplied the evidence.`),sources:P(`response`,`Sources`,`json`,`The sources.`),search_html:P(`response`,`Search suggestions`,`content`,`Google's search widget.`),raw:P(`response`,`Raw`,`json`,`The provider's raw grounding payload.`)}},"theorem.gate":{label:`Approval needed`,doc:`The call stopped until the user answers.`,attributes:{kind:P(`tool`,`Needs`,`text`,`What the user must give.`,Se),permission:P(`tool`,`Permission`,`text`,`The tool's permission tier.`,ne),summary:P(`tool`,`Summary`,`content`,`What the user is asked to approve.`),auth:Ae(`tool`,`Sign-in`,`The credential asked for. The challenge state is a secret and is never recorded.`,{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),type:P(`tool`,`Type`,`text`,`The kind of credential.`),service:P(`tool`,`Service`,`text`,`The service the person signs in to.`),issuer:P(`tool`,`Issuer`,`id`,`Who issues it.`),resource:P(`tool`,`Resource`,`id`,`What it grants access to.`),required_scopes:P(`tool`,`Scopes`,`list`,`The scopes it must carry.`)})}},"theorem.auth.scope_refused":{label:`Access refused`,doc:`The service asked for access outside the scopes the tool declares, so no sign-in was offered.`,attributes:{slot:P(`tool`,`Credential`,`id`,`The credential slot the tool reads.`),requested:P(`tool`,`Asked for`,`list`,`The scopes the service asked for.`),declared:P(`tool`,`Declared`,`list`,`The scopes the tool declares.`)}},"theorem.tool.warning":{label:`Tool warning`,doc:`Something the tool flagged while it ran; the call went on.`,attributes:{code:P(`tool`,`Code`,`id`,`The warning, by name.`),message:P(`tool`,`Message`,`content`,`What the tool said.`),severity:P(`tool`,`Severity`,`text`,`How serious the tool says it is.`)}},"theorem.tool.cancel":{label:`Tool call cancelled`,doc:`The provider cancelled a tool call it had made.`,attributes:{}},"theorem.session":{label:`Session`,doc:`Something happened to the Live session.`,attributes:{kind:P(`agent`,`What happened`,`text`,`The session fact recorded.`,De),time_left_ms:P(`agent`,`Time left`,`milliseconds`,`How long the provider said the session had left.`),closed_after_ms:P(`agent`,`Closed after`,`milliseconds`,`How long after the warning the socket closed.`),cause:P(`agent`,`Cause`,`text`,`go_away when the provider had warned it would close.`),code:P(`http`,`Close code`,`number`,`The WebSocket close code.`),reason:P(`http`,`Close reason`,`text`,`The WebSocket close reason.`),initiator:P(`agent`,`Closed by`,`text`,`Who closed the socket.`,Oe),activity:P(`agent`,`Activity`,`text`,`The provider's voice activity signal.`),audio_offset:P(`agent`,`Audio offset`,`text`,`Where in the audio it was heard.`),resumable:P(`agent`,`Resumable`,`boolean`,`The session can be resumed now.`),handle_issued:P(`agent`,`Handle issued`,`boolean`,`The provider sent a resumption handle. The handle is a credential and is never recorded.`),key_slot:P(`request`,`From key`,`text`,`The key slot refused.`),to_key_slot:P(`request`,`To key`,`text`,`The profile's fallback key slot it reopened on.`),error:P(`error`,`Detail`,`text`,`The provider's refusal.`)}},"gen_ai.evaluation.result":{label:`Eval result`,doc:`One grader's reading of this trace. Its keys are span attributes of the evaluation group.`,attributes:{}},"theorem.eval.verdict":{label:`Verdict`,doc:`One case's pass or fail after its trials, by the suite's pass rule. Every case is here, zeros included.`,attributes:{case:P(`evaluation`,`Case`,`id`,`The case judged.`),kind:P(`evaluation`,`Kind`,`text`,`Anthropic's split of cases.`,se),difficulty:P(`evaluation`,`Difficulty`,`number`,`The case’s 1–5 difficulty, when the suite set one.`),passed:P(`evaluation`,`Passed`,`boolean`,`The pass rule was met.`),trials:P(`evaluation`,`Trials`,`number`,`Trials run.`),trials_passed:P(`evaluation`,`Passed trials`,`number`,`Trials every deciding grader passed.`),trials_errored:P(`evaluation`,`Errored trials`,`number`,`Trials a grader could not score; they count as failed.`),trials_ungraded:P(`evaluation`,`Ungraded trials`,`number`,`Trials no grader decided.`)}}};function ze(e){return Re[e]}function Be(e,t){return Re[e]?.attributes[t]??Ie(t)}var Ve={turn:{label:`Turn`,doc:`One exchange: the model calls and tool calls it took to answer.`},session:{label:`Live session`,doc:`A Live session, from setup to close.`},call:{label:`Model call`,doc:`One request to a model and its answer.`},response:{label:`Live response`,doc:`One spoken response in a Live session.`},tool:{label:`Tool call`,doc:`One tool call theorem ran, from its hooks to settlement.`},http:{label:`HTTP try`,doc:`One HTTP attempt of a model call.`},cutout:{label:`Cutout`,doc:`A side effect the host recorded after the turn.`},decision:{label:`Decision`,doc:`One typed decision over JSON state.`},evaluation:{label:`Evaluation`,doc:`An eval graded this trace, or a suite ran.`},host:{label:`Host span`,doc:`A step the host recorded itself.`}};function He(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function Ue(e,t){let n={type:e,...Ve[e]};return t?{...n,subject:t}:n}function We(e){switch(He(e,`gen_ai.operation.name`)){case`invoke_agent`:return Ue(e.events.some(e=>e.name===`theorem.session`)?`session`:`turn`,He(e,`gen_ai.agent.name`));case`chat`:case`generate_content`:return Ue(`theorem.request.live`in e.attributes?`response`:`call`,He(e,`gen_ai.request.model`));case`execute_tool`:return Ue(`tool`,He(e,`gen_ai.tool.name`));case`decide`:return Ue(`decision`,He(e,`gen_ai.agent.name`));case`embeddings`:return Ue(`call`,He(e,`gen_ai.request.model`))}return`http.request.method`in e.attributes?Ue(`http`,He(e,`url.path`)):e.name===`cutout`?Ue(`cutout`,He(e,`url.path`)):e.name===`theorem.eval.trial`||e.name===`theorem.eval.run`?Ue(`evaluation`,He(e,`theorem.evaluation.suite`)):Ue(`host`,e.name)}var F=t(i()),Ge=d();function Ke(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ke(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ke(e))&&(r&&(r+=` `),r+=t);return r}var qe=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Je(e){return typeof e==`string`&&qe.includes(e)}var Ye=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Xe(e){return typeof e==`string`&&Ye.has(e)}function Ze(e){return typeof e==`string`&&e.startsWith(`data-`)}function Qe(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Xe(n)||Ze(n))&&(t[n]=e[n]);return t}function $e(e){if(e==null)return null;if((0,F.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Qe(t)}return typeof e==`object`&&!Array.isArray(e)?Qe(e):null}function et(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Xe(n)||Ze(n)||Je(n))&&(t[n]=e[n]);return t}function tt(e){return e==null?null:(0,F.isValidElement)(e)?et(e.props):typeof e==`object`&&!Array.isArray(e)?et(e):null}var nt=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(null,arguments)}function it(e,t){if(e==null)return{};var n,r,i=at(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function at(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ot=(0,F.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=it(e,nt),d=a||{width:r,height:i,x:0,y:0},f=I(`recharts-surface`,o);return F.createElement(`svg`,rt({},et(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),F.createElement(`title`,null,c),F.createElement(`desc`,null,l),n)}),st=[`children`,`className`];function ct(){return ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(null,arguments)}function lt(e,t){if(e==null)return{};var n,r,i=ut(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ut(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var dt=F.forwardRef((e,t)=>{var n=e.children,r=e.className,i=lt(e,st),a=I(`recharts-layer`,r);return F.createElement(`g`,ct({className:a},et(i),{ref:t}),n)});function ft(e){return e===`__proto__`}var pt=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function mt(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:pt.test(e);default:return!1}}function ht(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function gt(e){return typeof e==`symbol`||e instanceof Symbol}function _t(e){return e==null?``:vt(e)}function vt(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(vt).join(`,`);if(gt(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function yt(e){if(Array.isArray(e))return e.map(ht);if(typeof e==`symbol`)return[e];e=_t(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function bt(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ft(t))return n;let r=e[t];return r===void 0?mt(t)&&!Object.hasOwn(e,t)?bt(e,yt(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=ht(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return xt(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ft(t))return n;let r=e[t];return r===void 0?n:r}}}function xt(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ft(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var St=4;function Ct(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:St),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function wt(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+Ct(i)+n},``)}var Tt=e=>e===0?0:e>0?1:-1,Et=e=>typeof e==`number`&&e!=+e,Dt=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,L=e=>(typeof e==`number`||e instanceof Number)&&!Et(e),Ot=e=>L(e)||typeof e==`string`,kt=0,At=e=>{var t=++kt;return`${e||``}${t}`},jt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!L(e)&&typeof e!=`string`)return n;var i;if(Dt(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return Et(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Mt=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Nt(e,t,n){return L(e)&&L(t)?Ct(e+n*(t-e)):t}function Pt(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):bt(e,t))===n)}var R=e=>e==null,Ft=e=>R(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function It(e){return e!=null}function Lt(){}function Rt(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zt(Object(n),!0).forEach(function(t){Vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vt(e,t,n){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=Ut(e,`string`);return typeof t==`symbol`?t:t+``}function Ut(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wt=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Rt(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Bt({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Bt({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Bt({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Bt({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Bt({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Bt({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Bt({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Bt({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(L(n.x)||Dt(n.x))&&(L(n.y)||Dt(n.y))?Bt({x:c+jt(n.x,g),y:l+jt(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Bt({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Gt=[`top`,`left`,`right`,`bottom`];function Kt(e){return e==null?!1:typeof e==`object`||Gt.includes(e)}var qt=(0,F.createContext)(null);function z(e){return function(){return e}}var Jt=Math.PI,Yt=2*Jt,Xt=1e-6,Zt=Yt-Xt;function Qt(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function $t(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Qt;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var en=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Qt:$t(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Xt){if(!(Math.abs(u*s-c*l)>Xt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Jt-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Xt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Xt||Math.abs(this._y1-l)>Xt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Yt+Yt),d>Zt?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Xt&&this._append`A${n},${n},0,${+(d>=Jt)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};en.prototype;function tn(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new en(t)}Array.prototype.slice;function nn(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function rn(e){this._context=e}rn.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)}}};function an(e){return new rn(e)}function on(e){return e[0]}function sn(e){return e[1]}function cn(e,t){var n=z(!0),r=null,i=an,a=null,o=tn(s);e=typeof e==`function`?e:e===void 0?on:z(e),t=typeof t==`function`?t:t===void 0?sn:z(t);function s(s){var c,l=(s=nn(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:z(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ln(e,t,n){var r=null,i=z(!0),a=null,o=an,s=null,c=tn(l);e=typeof e==`function`?e:e===void 0?on:z(+e),t=typeof t==`function`?t:z(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sn:z(+n);function l(l){var u,d,f,p=(l=nn(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return cn().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:z(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:z(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:z(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:z(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:z(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var un=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function dn(e){return new un(e,!0)}function fn(e){return new un(e,!1)}function pn(){}function mn(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function hn(e){this._context=e}hn.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:mn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gn(e){return new hn(e)}function _n(e){this._context=e}_n.prototype={areaStart:pn,areaEnd:pn,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)}},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:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vn(e){return new _n(e)}function yn(e){this._context=e}yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mn(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bn(e){return new yn(e)}function xn(e){this._context=e}xn.prototype={areaStart:pn,areaEnd:pn,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 Sn(e){return new xn(e)}function Cn(e){return e<0?-1:1}function wn(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Cn(a)+Cn(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Tn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function En(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Dn(e){this._context=e}Dn.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:En(this,this._t0,Tn(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,En(this,Tn(this,n=wn(this,e,t)),n);break;default:En(this,this._t0,n=wn(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function On(e){this._context=new kn(e)}(On.prototype=Object.create(Dn.prototype)).point=function(e,t){Dn.prototype.point.call(this,t,e)};function kn(e){this._context=e}kn.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function An(e){return new Dn(e)}function jn(e){return new On(e)}function Mn(e){this._context=e}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Nn(e),i=Nn(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Nn(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Pn(e){return new Mn(e)}function Fn(e,t){this._context=e,this._t=t}Fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function In(e){return new Fn(e,.5)}function Ln(e){return new Fn(e,0)}function Rn(e){return new Fn(e,1)}function zn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Bn(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Vn(e,t){return e[t]}function Hn(e){let t=[];return t.key=e,t}function Un(){var e=z([]),t=Bn,n=zn,r=Vn;function i(i){var a=Array.from(e.apply(this,arguments),Hn),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=nn(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:z(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:z(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Bn:typeof e==`function`?e:z(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??zn,i):n},i}function Wn(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}zn(e,t)}}function Gn(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}zn(e,t)}}function Kn(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,zn(e,t)}}var qn=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Jn=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,F.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Je(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Yn=(e,t,n)=>r=>(e(t,n,r),null),Xn=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Je(i)&&typeof a==`function`&&(r||={},r[i]=Yn(a,t,n))}),r};function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zn(Object(n),!0).forEach(function(t){$n(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $n(e,t,n){return(t=er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=tr(e,`string`);return typeof t==`symbol`?t:t+``}function tr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nr(e,t){var n=Qn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function rr(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ir(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function ar(e){return e}function or(e){return Number.isSafeInteger(e)&&e>=0}function sr(e){return e!=null&&typeof e!=`function`&&or(e.length)}function cr(e){return function(t){return bt(t,e)}}function lr(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ur(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function fr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var pr=`[object RegExp]`,mr=`[object String]`,hr=`[object Number]`,gr=`[object Boolean]`,_r=`[object Arguments]`,vr=`[object Symbol]`,yr=`[object Date]`,br=`[object Map]`,xr=`[object Set]`,Sr=`[object Array]`,Cr=`[object Function]`,wr=`[object ArrayBuffer]`,Tr=`[object Object]`,Er=`[object Error]`,Dr=`[object DataView]`,Or=`[object Uint8Array]`,kr=`[object Uint8ClampedArray]`,Ar=`[object Uint16Array]`,jr=`[object Uint32Array]`,Mr=`[object BigUint64Array]`,Nr=`[object Int8Array]`,Pr=`[object Int16Array]`,Fr=`[object Int32Array]`,Ir=`[object BigInt64Array]`,Lr=`[object Float32Array]`,Rr=`[object Float64Array]`,zr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Br(e){return zr.Buffer!==void 0&&zr.Buffer.isBuffer(e)}function Vr(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(lr(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Hr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Hr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Hr(a,void 0,n,r,i));return t}if(Br(e))return e.subarray();if(ur(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Hr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Ur(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Ur(t,e,n,r,i),t}if(typeof e==`object`&&Wr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Ur(t,e,n,r,i),t}return e}function Ur(e,t,n=e,r,i){let a=[...Object.keys(t),...dr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Hr(t[s],s,n,r,i))}}function Wr(e){switch(fr(e)){case _r:case Sr:case wr:case Dr:case gr:case yr:case Lr:case Rr:case Nr:case Pr:case Fr:case br:case hr:case Tr:case pr:case xr:case mr:case vr:case Or:case kr:case Ar:case jr:return!0;default:return!1}}function Gr(e){return Hr(e,void 0,e,new Map,void 0)}function Kr(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function qr(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Jr(e,t,n){return typeof n==`function`?Yr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Yr(t,r,e,s,!1):!!c},new Map,!0):Jr(e,t,()=>void 0)}function Yr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Xr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?Yr(e,{...t},n,r,i):Kr(e,t);default:return qr(e)&&i?typeof t!=`string`||t===``:Kr(e,t)}}function Xr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return Qr(e,t,n,r);if(t instanceof Map)return Zr(e,t,n,r);if(t instanceof Set)return $r(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)lr(e)&&(e=Object(e));else{let t=fr(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Zr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Qr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function $r(e,t,n,r){return t.size===0||e instanceof Set&&Qr([...e],[...t],n,r)}function ei(e,t){return Jr(e,t,()=>void 0)}function ti(e){return e=Gr(e),t=>ei(t,e)}function ni(e,t){return Vr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(fr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Ur(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case hr:case mr:case gr:{let t=new e.constructor(e?.valueOf());return Ur(t,e),t}case _r:{let t={};return Ur(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ri(e){return ni(e)}var ii=/^(?:0|[1-9]\d*)$/;function ai(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ii.test(e)}}function oi(e){return typeof e==`object`&&!!e&&fr(e)===`[object Arguments]`}function si(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&mt(t)&&!(t in Object(e))?yt(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=ht(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||oi(r))&&ai(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function ci(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=ht(e)}return t=ri(t),function(n){let r=bt(n,e);return r===void 0?si(n,e):t===void 0?r===void 0:ei(r,t)}}function li(e){if(e==null)return ar;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?ci(e[0],e[1]):ti(e);default:return cr(e)}}function ui(e){return e===0?0:e}function di(e,t=ar){return sr(e)?rr(Array.from(e),ir(li(t),1)).map(ui):[]}function fi(e,t,n){return t===!0?di(e,n):typeof t==`function`?di(e,t):e}var pi=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),mi=n(((e,t)=>{t.exports=pi()})),hi=n((e=>{var t=i(),n=mi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),gi=n(((e,t)=>{t.exports=hi()}))(),_i=(0,F.createContext)(null),vi=e=>e,B=()=>{var e=(0,F.useContext)(_i);return e?e.store.dispatch:vi},yi=()=>{},bi=()=>yi,xi=(e,t)=>e===t;function V(e){var t=(0,F.useContext)(_i),n=(0,F.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:yi,[t,e]);return(0,gi.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:bi,t?t.store.getState:yi,t?t.store.getState:yi,n,xi)}function Si(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Ci(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var wi=e=>Array.isArray(e)?e:[e];function Ti(e){let t=Array.isArray(e[0])?e[0]:e;return Ci(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Ei(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Di=class{constructor(e){this.value=e}deref(){return this.value}},Oi=typeof WeakRef>`u`?Di:WeakRef,ki=0,Ai=1;function ji(){return{s:ki,v:void 0,o:null,p:null}}function Mi(e){return e instanceof Oi?e.deref():e}function Ni(e,t={}){let n=ji(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=ji(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=ji(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Ai)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Mi(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Oi(c):c}return s.s=Ai,s.v=c,c}return o.clearCache=()=>{n=ji(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Pi(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Si(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ni,argsMemoizeOptions:u=[]}={...n,...a},d=wi(c),f=wi(u),p=Ti(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Ei(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var H=Pi(Ni);function Fi(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Ii(e,t,n){return qr(n)&&(typeof t==`number`&&sr(n)&&ai(t)&&t<n.length||typeof t==`string`&&t in n)?Kr(n[t],e):!1}function Li(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Ri=(e,t,n)=>{if(e!==t){let r=Li(e),i=Li(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bi=/^\w*$/;function Vi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||gt(e)?!0:typeof e==`string`&&(Bi.test(e)||!zi.test(e))||t!=null&&Object.hasOwn(t,e)}function Hi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=sr(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Vi(e)?e:{key:e,path:yt(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Ri(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Ui(e,...t){let n=t.length;return n>1&&Ii(e,t[0],t[1])?t=[]:n>2&&Ii(t[0],t[1],t[2])&&(t=[t[0]]),Hi(e,Fi(t),[`asc`])}var Wi=e=>e.legend.settings,Gi=e=>e.legend.size;H([e=>e.legend.payload,Wi],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Ui(r,n):r});function Ki(e,t){return Zi(e)||Xi(e,t)||Ji(e,t)||qi()}function qi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ji(e,t){if(e){if(typeof e==`string`)return Yi(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(e,t):void 0}}function Yi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xi(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Zi(e){if(Array.isArray(e))return e}var Qi=1;function $i(e,t){return Math.abs(e.height-t.height)>Qi||Math.abs(e.left-t.left)>Qi||Math.abs(e.top-t.top)>Qi||Math.abs(e.width-t.width)>Qi}function ea(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ta(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=Ki((0,F.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,F.useRef)(null),a=(0,F.useRef)(n);a.current=n;var o=(0,F.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=ea(e);if($i(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=ea(e);$i(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,F.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function na(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ra=typeof Symbol==`function`&&Symbol.observable||`@@observable`,ia=()=>Math.random().toString(36).substring(7).split(``).join(`.`),aa={INIT:`@@redux/INIT${ia()}`,REPLACE:`@@redux/REPLACE${ia()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ia()}`};function oa(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function sa(e,t,n){if(typeof e!=`function`)throw Error(na(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(na(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(na(1));return n(sa)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(na(3));return i}function d(e){if(typeof e!=`function`)throw Error(na(4));if(c)throw Error(na(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(na(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!oa(e))throw Error(na(7));if(e.type===void 0)throw Error(na(8));if(typeof e.type!=`string`)throw Error(na(17));if(c)throw Error(na(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(na(10));r=e,f({type:aa.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(na(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[ra](){return this}}}return f({type:aa.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[ra]:m}}function ca(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:aa.INIT})===void 0)throw Error(na(12));if(n(void 0,{type:aa.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(na(13))})}function la(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ca(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(na(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function ua(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function da(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(na(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=ua(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function fa(e){return oa(e)&&`type`in e&&typeof e.type==`string`}var pa=Symbol.for(`immer-nothing`),ma=Symbol.for(`immer-draftable`),ha=Symbol.for(`immer-state`);function ga(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _a=Object,va=_a.getPrototypeOf,ya=`constructor`,ba=`prototype`,xa=`configurable`,Sa=`enumerable`,Ca=`writable`,wa=`value`,Ta=e=>!!e&&!!e[ha];function Ea(e){return e?ka(e)||Ia(e)||!!e[ma]||!!e[ya]?.[ma]||La(e)||Ra(e):!1}var Da=_a[ba][ya].toString(),Oa=new WeakMap;function ka(e){if(!e||!za(e))return!1;let t=va(e);if(t===null||t===_a[ba])return!0;let n=_a.hasOwnProperty.call(t,ya)&&t[ya];if(n===Object)return!0;if(!Ba(n))return!1;let r=Oa.get(n);return r===void 0&&(r=Function.toString.call(n),Oa.set(n,r)),r===Da}function Aa(e,t,n=!0){ja(e)===0?(n?Reflect.ownKeys(e):_a.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ja(e){let t=e[ha];return t?t.type_:Ia(e)?1:La(e)?2:Ra(e)?3:0}var Ma=(e,t,n=ja(e))=>n===2?e.has(t):_a[ba].hasOwnProperty.call(e,t),Na=(e,t,n=ja(e))=>n===2?e.get(t):e[t],Pa=(e,t,n,r=ja(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Fa(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Ia=Array.isArray,La=e=>e instanceof Map,Ra=e=>e instanceof Set,za=e=>typeof e==`object`,Ba=e=>typeof e==`function`,Va=e=>typeof e==`boolean`;function Ha(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ua=e=>e.copy_||e.base_,Wa=e=>e.modified_?e.copy_:e.base_;function Ga(e,t){if(La(e))return new Map(e);if(Ra(e))return new Set(e);if(Ia(e))return Array[ba].slice.call(e);let n=ka(e);if(t===!0||t===`class_only`&&!n){let t=_a.getOwnPropertyDescriptors(e);delete t[ha];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ca]===!1&&(a[Ca]=!0,a[xa]=!0),(a.get||a.set)&&(t[i]={[xa]:!0,[Ca]:!0,[Sa]:a[Sa],[wa]:e[i]})}return _a.create(va(e),t)}{let t=va(e);if(t!==null&&n)return{...e};let r=_a.create(t);return _a.assign(r,e)}}function Ka(e,t=!1){return Ya(e)||Ta(e)||!Ea(e)||(ja(e)>1&&_a.defineProperties(e,{set:Ja,add:Ja,clear:Ja,delete:Ja}),_a.freeze(e),t&&Aa(e,(e,t)=>{Ka(t,!0)},!1)),e}function qa(){ga(2)}var Ja={[wa]:qa};function Ya(e){return e===null||!za(e)||_a.isFrozen(e)}var Xa=`MapSet`,Za=`Patches`,Qa=`ArrayMethods`,$a={};function eo(e){let t=$a[e];return t||ga(0,e),t}var to=e=>!!$a[e],no,ro=()=>no,io=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:to(Xa)?eo(Xa):void 0,arrayMethodsPlugin_:to(Qa)?eo(Qa):void 0});function ao(e,t){t&&(e.patchPlugin_=eo(Za),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oo(e){so(e),e.drafts_.forEach(lo),e.drafts_=null}function so(e){e===no&&(no=e.parent_)}var co=e=>no=io(no,e);function lo(e){let t=e[ha];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function uo(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ha].modified_&&(oo(t),ga(4)),Ea(e)&&(e=fo(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ha].base_,e,t)}else e=fo(t,n);return po(t,e,!0),oo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===pa?void 0:e}function fo(e,t){if(Ya(t))return t;let n=t[ha];if(!n)return xo(t,e.handledSet_,e);if(!ho(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);yo(n,e)}return n.copy_}function po(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ka(t,n)}function mo(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ho=(e,t)=>e.scope_===t,go=[];function _o(e,t,n,r){let i=Ua(e),a=e.type_;if(r!==void 0&&Na(i,r,a)===t){Pa(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Aa(i,(e,n)=>{if(Ta(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??go;for(let e of o)Pa(i,e,n,a)}function vo(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ho(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Wa(i);_o(e,i.draft_??i,a,n),yo(i,r)})}function yo(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}mo(e)}}function bo(e,t,n){let{scope_:r}=e;if(Ta(n)){let i=n[ha];ho(i,r)&&i.callbacks_.push(function(){Ao(e),_o(e,n,Wa(i),t)})}else Ea(n)&&e.callbacks_.push(function(){let i=Ua(e);e.type_===3?i.has(n)&&xo(n,r.handledSet_,r):Na(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xo(Na(e.copy_,t,e.type_),r.handledSet_,r)})}function xo(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ta(e)||t.has(e)||!Ea(e)||Ya(e)||(t.add(e),Aa(e,(r,i)=>{if(Ta(i)){let t=i[ha];ho(t,n)&&(Pa(e,r,Wa(t),e.type_),mo(t))}else Ea(i)&&xo(i,t,n)})),e}function So(e,t){let n=Ia(e),r={type_:+!!n,scope_:t?t.scope_:ro(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Co;n&&(i=[r],a=wo);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Co={get(e,t){if(t===ha)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ua(e);if(!Ma(i,t,e.type_))return Do(e,i,t);let a=i[t];if(e.finalized_||!Ea(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ha(t))return a;if(a===To(e.base_,t)||Eo(e,t,a)){Ao(e);let n=e.type_===1?+t:t,r=Mo(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ua(e)},ownKeys(e){return Reflect.ownKeys(Ua(e))},set(e,t,n){let r=Oo(Ua(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=To(Ua(e),t),i=r?.[ha];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Fa(n,r)&&(n!==void 0||Ma(e.base_,t,e.type_)))return!0;Ao(e),ko(e)}return e.copy_[t]===n&&(n!==void 0||Ma(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),bo(e,t,n)),!0},deleteProperty(e,t){return Ao(e),To(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ko(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ua(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ca]:!0,[xa]:e.type_!==1||t!==`length`,[Sa]:r[Sa],[wa]:n[t]}},defineProperty(){ga(11)},getPrototypeOf(e){return va(e.base_)},setPrototypeOf(){ga(12)}},wo={};for(let e in Co){let t=Co[e];wo[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}wo.deleteProperty=function(e,t){return wo.set.call(this,e,t,void 0)},wo.set=function(e,t,n){return Co.set.call(this,e[0],t,n,e[0])};function To(e,t){let n=e[ha];return(n?Ua(n):e)[t]}function Eo(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Ea(n)||n[ha]?!1:e.baseRefs_.has(n)}function Do(e,t,n){let r=Oo(t,n);return r?wa in r?r[wa]:r.get?.call(e.draft_):void 0}function Oo(e,t){if(!(t in e))return;let n=va(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=va(n)}}function ko(e){e.modified_||(e.modified_=!0,e.parent_&&ko(e.parent_))}function Ao(e){e.copy_||=(e.assigned_=new Map,Ga(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ba(e)&&!Ba(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ba(t)||ga(6),n!==void 0&&!Ba(n)&&ga(7);let r;if(Ea(e)){let i=co(this),a=Mo(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?oo(i):so(i)}return ao(i,n),uo(r,i)}if(!e||!za(e)){if(r=t(e),r===void 0&&(r=e),r===pa&&(r=void 0),this.autoFreeze_&&Ka(r,!0),n){let t=[],i=[];eo(Za).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}ga(1,e)},this.produceWithPatches=(e,t)=>{if(Ba(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Va(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Va(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Va(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ea(e)||ga(8),Ta(e)&&(e=No(e));let t=co(this),n=Mo(t,e,void 0);return n[ha].isManual_=!0,so(t),n}finishDraft(e,t){let n=e&&e[ha];(!n||!n.isManual_)&&ga(9);let{scope_:r}=n;return ao(r,t),uo(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=eo(Za).applyPatches_;return Ta(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Mo(e,t,n,r){let[i,a]=La(t)?eo(Xa).proxyMap_(t,n):Ra(t)?eo(Xa).proxySet_(t,n):So(t,n);return(n?.scope_??ro()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?vo(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function No(e){return Ta(e)||ga(10,e),Po(e)}function Po(e){if(!Ea(e)||Ya(e))return e;let t=e[ha],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ga(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ga(e,!0);return Aa(n,(e,t)=>{Pa(n,e,Po(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var Fo=new jo().produce,U=e=>e;function Io(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Lo=Io(),Ro=Io,zo=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?ua:ua.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Bo(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(Js(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>fa(t)&&t.type===e,n}var Vo=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Ho(e){return Ea(e)?Fo(e,()=>{}):e}function Uo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Wo(e){return typeof e==`boolean`}var Go=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Vo;return t&&(Wo(t)?a.push(Lo):a.push(Ro(t.extraArgument))),a},Ko=`RTK_autoBatch`,W=()=>e=>({payload:e,meta:{[Ko]:!0}}),qo=e=>t=>{setTimeout(t,e)},Jo=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Yo=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Jo(window.requestAnimationFrame,100):qo(10):e.type===`callback`?e.queueNotification:qo(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Ko],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Xo=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Vo(e);return n&&r.push(Yo(typeof n==`object`?n:void 0)),r};function Zo(e){let t=Go(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(oa(n))c=la(n);else throw Error(Js(1));let l;l=typeof r==`function`?r(t):t();let u=ua;i&&(u=zo({trace:!1,...typeof i==`object`&&i}));let d=Xo(da(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return sa(c,o,p)}function Qo(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(Js(28));if(r in t)throw Error(Js(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function $o(e){return typeof e==`function`}function es(e,t){let[n,r,i]=Qo(t),a;if($o(e))a=()=>Ho(e());else{let t=Ho(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(Ta(e)){let r=n(e,t);return r===void 0?e:r}if(Ea(e))return Fo(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var ts=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,ns=(e=21)=>{let t=``,n=e;for(;n--;)t+=ts[Math.random()*64|0];return t},rs=Symbol.for(`rtk-slice-createasyncthunk`);function is(e,t){return`${e}/${t}`}function as({creators:e}={}){let t=e?.asyncThunk?.[rs];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(Js(11));let i=(typeof e.reducers==`function`?e.reducers(cs()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(Js(12));if(n in o.sliceCaseReducersByType)throw Error(Js(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:is(n,r),createNotation:typeof e.reducers==`function`};us(a)?fs(o,a,s,t):ls(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?Qo(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return es(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Uo(d,r,m)),i}function i(t=l){return Uo(Uo(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=os(a,t,()=>Uo(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function os(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var ss=as();function cs(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function ls({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!ds(r))throw Error(Js(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Bo(e,o):Bo(e))}function us(e){return e._reducerDefinitionType===`asyncThunk`}function ds(e){return e._reducerDefinitionType===`reducerWithPrepare`}function fs({type:e,reducerName:t},n,r,i){if(!i)throw Error(Js(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||ps,pending:s||ps,rejected:c||ps,settled:l||ps})}function ps(){}var ms=`task`,hs=`listener`,gs=`completed`,_s=`cancelled`,vs=`task-${_s}`,ys=`task-${gs}`,bs=`${hs}-${_s}`,xs=`${hs}-${gs}`,Ss=class{constructor(e){this.code=e,this.message=`${ms} ${_s} (reason: ${e})`}code;name=`TaskAbortError`;message},Cs=(e,t)=>{if(typeof e!=`function`)throw TypeError(Js(32))},ws=()=>{},Ts=(e,t=ws)=>(e.catch(t),e),Es=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Ds=e=>{if(e.aborted)throw new Ss(e.reason)};function Os(e,t){let n=ws;return new Promise((r,i)=>{let a=()=>i(new Ss(e.reason));e.aborted?a():(n=Es(e,a),t.finally(()=>n()).then(r,i))}).finally(()=>{n=ws})}var ks=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof Ss?`cancelled`:`rejected`,error:e}}finally{t?.()}},As=e=>t=>Ts(Os(e,t).then(t=>(Ds(e),t))),js=e=>{let t=As(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Ms}=Object,Ns={},Ps=`listenerMiddleware`,Fs=(e,t)=>{let n=t=>Es(e,()=>t.abort(e.reason));return(r,i)=>{Cs(r,`taskExecutor`);let a=new AbortController;n(a);let o=ks(async()=>{Ds(e),Ds(a.signal);let t=await r({pause:As(a.signal),delay:js(a.signal),signal:a.signal});return Ds(a.signal),t},()=>a.abort(ys));return i?.autoJoin&&t.push(o.catch(ws)),{result:As(e)(o),cancel(){a.abort(vs)}}}},Is=(e,t)=>{let n=async(n,r)=>{Ds(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Os(t,Promise.race(a));return Ds(t),e}finally{i()}};return((e,t)=>Ts(n(e,t)))},Ls=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Bo(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(Js(21));return Cs(a,`options.listener`),{predicate:i,type:t,effect:a}},Rs=Ms(e=>{let{type:t,predicate:n,effect:r}=Ls(e);return{id:ns(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(Js(22))}}},{withTypes:()=>Rs}),zs=(e,t)=>{let{type:n,effect:r,predicate:i}=Ls(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Bs=e=>{e.pending.forEach(e=>{e.abort(bs)})},Vs=(e,t)=>()=>{for(let e of t.keys())Bs(e);e.clear()},Hs=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Us=Ms(Bo(`${Ps}/add`),{withTypes:()=>Us}),Ws=Bo(`${Ps}/removeAll`),Gs=Ms(Bo(`${Ps}/remove`),{withTypes:()=>Gs}),Ks=(...e)=>{console.error(`${Ps}/error`,...e)},qs=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Ks}=e;Cs(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Bs(e)}),c=(e=>{let n=zs(t,e)??Rs(e);return s(n)});Ms(c,{withTypes:()=>c});let l=e=>{let n=zs(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Bs(n)),!!n};Ms(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Is(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Ms({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:js(u.signal),pause:As(u.signal),extra:a,signal:u.signal,fork:Fs(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(bs),n.delete(e))})},cancel:()=>{u.abort(bs),e.pending.delete(u)},throwIfCancelled:()=>{Ds(u.signal)}})))}catch(e){e instanceof Ss||Hs(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(xs),i(e),e.pending.delete(u)}},d=Vs(t,n);return{middleware:e=>n=>r=>{if(!fa(r))return n(r);if(Us.match(r))return c(r.payload);if(Ws.match(r)){d();return}if(Gs.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Ns)throw Error(Js(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,Hs(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Ns}return s},startListening:c,stopListening:l,clearListeners:d}};function Js(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ys=ss({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),Xs=Ys.actions,Zs=Xs.setMargin,Qs=Xs.setLayout,$s=Xs.setChartSize,ec=Xs.setScale,tc=Ys.reducer;function nc(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function G(e){return Number.isFinite(e)}function rc(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function ic(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ic(Object(n),!0).forEach(function(t){oc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ic(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oc(e,t,n){return(t=sc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sc(e){var t=cc(e,`string`);return typeof t==`symbol`?t:t+``}function cc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function K(e,t,n){return R(e)||R(t)?n:Ot(t)?bt(e,t,n):typeof t==`function`?t(e):n}var lc=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(Kt(c)){if(c===`top`&&L(e.top))return ac(ac({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&L(e.bottom))return ac(ac({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&L(e.left))return ac(ac({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&L(e.right))return ac(ac({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&L(e[a]))return ac(ac({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&L(e[o]))return ac(ac({},e),{},{[o]:e[o]+(i||0)})}return e},uc=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,dc=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},fc=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?Tt(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return G(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(It):c&&l?l.map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(It):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(It):o.domain().map((e,t)=>{var n=o.map(e);return G(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(It)},pc=(e,t)=>{if(!t||t.length!==2||!L(t[0])||!L(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!L(e[0])||e[0]<n)&&(i[0]=n),(!L(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},mc={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=Et(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Wn,none:zn,silhouette:Gn,wiggle:Kn,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=Et(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},hc=(e,t,n)=>{var r=mc[n]??zn,i=Un().keys(t).value((e,t)=>Number(K(e,t,0))).order(Bn).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=K(e[i],t[r],0);Array.isArray(a)&&a.length===2&&L(a[0])&&L(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function gc(e){return e==null?void 0:String(e)}function _c(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!R(i[t.dataKey])){var s=Pt(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=K(i,R(o)?t.dataKey:o),l=t.scale.map(c);return L(l)?l:null}var vc=e=>{var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=K(a,t.dataKey,t.scale.domain()[o]);if(R(s))return null;var c=t.scale.map(s);return L(c)?c-i/2+r:null},yc=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},bc=e=>{var t=e.flat(2).filter(L);return[Math.min(...t),Math.max(...t)]},xc=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Sc=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return xc(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=bc(nc(r,t,n));return!G(i[0])||!G(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},Cc=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wc=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Tc=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Ui(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;s<c;s++){var l=(i[s]?.coordinate||0)-(i[s-1]?.coordinate||0);a.push(l),o=Math.max(l,o)}var u=o*1e-4,d=1/0;for(var f of a)f>u&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Ec(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return ac(ac({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Dc(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Oc=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},kc=(e,t)=>t===`centric`?e.angle:e.radius,Ac=e=>e.layout.width,jc=e=>e.layout.height,Mc=e=>e.layout.scale,Nc=e=>e.layout.margin,Pc=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Fc=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Ic=`data-recharts-item-index`;function Lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lc(Object(n),!0).forEach(function(t){zc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zc(e,t,n){return(t=Bc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bc(e){var t=Vc(e,`string`);return typeof t==`symbol`?t:t+``}function Vc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Hc=e=>e.brush.height;function Uc(e){return Fc(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Wc(e){return Fc(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Gc(e){return Pc(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Kc(e){return Pc(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var qc=H([Ac,jc,Nc,Hc,Uc,Wc,Gc,Kc,Wi,Gi],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Rc(Rc({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=lc(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Rc(Rc({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Jc=H(qc,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Yc=H(Ac,jc,(e,t)=>({x:0,y:0,width:e,height:t})),Xc=(0,F.createContext)(null),Zc=()=>(0,F.useContext)(Xc)!=null,Qc=e=>e.brush,$c=H([Qc,qc,Nc],(e,t,n)=>({height:e.height,x:L(e.x)?e.x:t.left,y:L(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:L(e.width)?e.width:t.width}));function el(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function tl(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=el(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function nl(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return tl(e,t,{leading:r,maxWait:t,trailing:i})}var rl=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},il={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},al=(e,t,n)=>{var r=n.width,i=r===void 0?il.width:r,a=n.height,o=a===void 0?il.height:a,s=n.aspect,c=n.maxHeight,l=Dt(i)?e:Number(i),u=Dt(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},ol={width:0,height:0,overflow:`visible`},sl={width:0,overflowX:`visible`},cl={height:0,overflowY:`visible`},ll={},ul=e=>{var t=e.width,n=e.height,r=Dt(t),i=Dt(n);return r&&i?ol:r?sl:i?cl:ll};function dl(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=il.width,a=il.height):i===void 0?i=r&&r>0?void 0:il.width:a===void 0&&(a=r&&r>0?void 0:il.height),{width:i,height:a}}var fl=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pl.apply(null,arguments)}function ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ml(Object(n),!0).forEach(function(t){gl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gl(e,t,n){return(t=_l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _l(e){var t=vl(e,`string`);return typeof t==`symbol`?t:t+``}function vl(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yl(e,t){return wl(e)||Cl(e,t)||xl(e,t)||bl()}function bl(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xl(e,t){if(e){if(typeof e==`string`)return Sl(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sl(e,t):void 0}}function Sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cl(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function wl(e){if(Array.isArray(e))return e}function Tl(e,t){if(e==null)return{};var n,r,i=El(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function El(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Dl=(0,F.createContext)(il.initialDimension);function Ol(e){return rc(e.width)&&rc(e.height)}function kl(e){var t=e.children,n=e.width,r=e.height,i=(0,F.useMemo)(()=>({width:n,height:r}),[n,r]);return Ol(i)?F.createElement(Dl.Provider,{value:i},t):null}var Al=()=>(0,F.useContext)(Dl),jl=(0,F.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?il.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?il.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?il.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,v=_===void 0?{}:_,y=Tl(e,fl),b=(0,F.useRef)(null),x=(0,F.useRef)();x.current=g,(0,F.useImperativeHandle)(t,()=>b.current);var S=yl((0,F.useState)({containerWidth:i.width,containerHeight:i.height}),2),C=S[0],w=S[1],T=(0,F.useCallback)((e,t)=>{w(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,F.useEffect)(()=>{if(b.current==null||typeof ResizeObserver>`u`)return Lt;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;T(i,a),(t=x.current)==null||t.call(x,i,a)}};p>0&&(e=nl(e,p,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=b.current.getBoundingClientRect(),r=n.width,i=n.height;return T(r,i),t.observe(b.current),()=>{t.disconnect()}},[T,p]);var E=C.containerWidth,D=C.containerHeight;rl(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var O=al(E,D,{width:a,height:o,aspect:n,maxHeight:u}),k=O.calculatedWidth,A=O.calculatedHeight;return rl(E<0||D<0||k!=null&&k>0||A!=null&&A>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
4
4
|
please check the style of container, or the props width(%s) and height(%s),
|