radiance 2.0.0

Radiance becomes a multi-model engine: one process serves several models behind one port, loads
each when a request names it, parks it in host memory or restores it from its container, and
shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the
command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP).

Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an
int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block
FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such
weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5,
Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B,
the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0
serves all of them.

Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new
Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill
reworked, and a reworked adaptive draft window.

Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its
configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool
in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server,
each accelerator's memory by model, model states over time.

Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by
AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests
keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410);
eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d
large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi
(#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon
(#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and
multi-model serving as asked for in #367 and #109.

Plugin ABI 39: out-of-tree plugins need to be rebuilt.

Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz.
This commit is contained in:
Deadcode committed 2026-11-14 22:32:28 +01:00
1 parent b4c04b6042
commit ddcb9c69bb
696 files changed
+120770 -56596

No files matched your search

+67 -4
View File
@@ -31,13 +31,15 @@
#include "text/tokenizer.h"
#include "mm/processor.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <iterator>
#include <memory>
#include <mutex>
#include <unordered_map>
namespace rad {
namespace server {
@@ -96,6 +98,7 @@ inline SchedMetrics bridge_metrics(const rad::SchedMetrics& m) {
* rate has a different granularity (spec §7.3) and is reported separately, not averaged
* in. */
o.prefix_hit_rate = m.attn_hit_rate;
o.prefix_queries = m.prompt_tokens;
o.prefix_evictions = m.prefix_evictions;
/* What only the cache holds (SchedMetrics::prefix_held_tokens), clamped to the pool's
* used figure: the two are counted at different moments in a step, and cached > used
@@ -568,6 +571,7 @@ public:
bool ready() const { return t_.ready() && fmt_ != nullptr; }
bool supports_tools() const override { return t_.caps().tools; }
std::string tools_probe_error() const override { return t_.caps().probe_error; }
bool supports_reasoning() const override { return t_.caps().preserve_reasoning; }
std::string tool_refusal() const override { return tool_refusal_; }
std::string source() const override { return t_.source(); }
@@ -628,12 +632,46 @@ public:
out->preserved_tokens = declared_ ? chat_format_markers(f) : p.preserved_tokens;
out->grammar_triggers.clear();
/* The grammar and the parser below are pure functions of the tools, the schema, the
* generation prompt and the call options -- all fixed for this deployment's format --
* and building them walks every tool schema (measured ~0.4 ms for a dozen agent tools).
* An agent resends the same tools every turn, so a repeated build is a cache hit. The
* key is the tools' own dump plus length-prefixed fields; the dump is an order of
* magnitude cheaper than the build it gates. */
std::string built_key;
if (calls || doc) {
built_key = tools.dump();
auto field = [&built_key](const std::string& s) {
built_key += '\x1f';
built_key += std::to_string(s.size());
built_key += ':';
built_key += s;
};
field(opt.json_schema);
field(p.generation_prompt);
field(opt.tool_choice);
field(opt.tool_name);
field(opt.reasoning_format);
built_key += opt.parallel_tool_calls ? '\x01' : '\x00';
std::lock_guard<std::mutex> lk(built_mu_);
const auto it = built_.find(built_key);
if (it != built_.end()) {
const BuiltCall& b = it->second;
out->grammar = b.grammar;
out->grammar_lazy = b.grammar_lazy;
out->grammar_triggers = b.triggers;
out->parser = b.parser;
out->think_open = b.think_open;
out->think_close = b.think_close;
out->think_starts_open = b.think_starts_open;
return RAD_OK;
}
}
if (calls || doc) {
/* The grammar, and the words that trigger it, come from the reply format: the same
* description the parser reads the reply back with. */
const nlohmann::ordered_json schema =
doc ? nlohmann::ordered_json::parse(opt.json_schema, nullptr, false)
: nlohmann::ordered_json();
const Json schema = doc ? Json::parse(opt.json_schema, nullptr, false) : Json();
ChatGrammarRequest gq;
gq.tools = calls ? &tools : nullptr;
gq.json_schema = doc && schema.is_object() ? &schema : nullptr;
@@ -678,6 +716,19 @@ public:
out->think_close = rm.close;
out->think_starts_open = rm.starts_open;
out->parser = std::make_shared<ReplyParserBridge>(std::move(rp));
if (!built_key.empty()) {
BuiltCall b;
b.grammar = out->grammar;
b.grammar_lazy = out->grammar_lazy;
b.triggers = out->grammar_triggers;
b.parser = out->parser;
b.think_open = out->think_open;
b.think_close = out->think_close;
b.think_starts_open = out->think_starts_open;
std::lock_guard<std::mutex> lk(built_mu_);
if (built_.size() >= 32) built_.clear();
built_.emplace(std::move(built_key), std::move(b));
}
return RAD_OK;
}
@@ -686,11 +737,23 @@ private:
* kinds the way llama.cpp's common_grammar_trigger_type does. */
static constexpr int kTriggerWord = 1;
/* What one (tools, schema, options) build produced; see apply(). */
struct BuiltCall {
std::string grammar;
bool grammar_lazy = false;
std::vector<SamplingParams::GrammarTrigger> triggers;
std::shared_ptr<IReplyParser> parser;
std::string think_open, think_close;
bool think_starts_open = false;
};
ChatTemplate t_;
std::vector<std::string> terminators_;
std::shared_ptr<const ReplyFormat> fmt_;
bool declared_ = false;
std::string tool_refusal_;
mutable std::mutex built_mu_;
mutable std::unordered_map<std::string, BuiltCall> built_;
};
/* ================================================================== grammar
+9 -4
View File
@@ -17,7 +17,7 @@
#include "rad_internal.h"
#include "text/tokenizer.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
namespace rad {
namespace server {
@@ -243,10 +243,13 @@ HttpResponse Server::handle_detokenize(const HttpRequest& req) {
toks.push_back(id);
}
/* `prompt` is vLLM's key and `content` llama-server's, for the same text. */
/* `prompt` is vLLM's key and `content` llama-server's, for the same text. (Through a
* named copy: o["content"] = o["prompt"] reads through a member reference that inserting
* the second member may have just invalidated.) */
const std::string text = deps_.tok->decode(toks);
json o;
o["prompt"] = deps_.tok->decode(toks);
o["content"] = o["prompt"];
o["prompt"] = text;
o["content"] = text;
metrics_.observe_http(200);
return HttpResponse::json_body(200, json_dump(o));
}
@@ -382,6 +385,8 @@ HttpResponse Server::handle_tokenizer_info(const HttpRequest& req) {
}
/* ================================================================== capabilities */
std::string Server::capabilities_json() const { return capabilities().dump(); }
json Server::capabilities() const {
json caps;
const bool rerank = is_reranker(deps_.embed);
+1 -1
View File
@@ -39,7 +39,7 @@
#include "mm/media.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cmath>
+1 -1
View File
@@ -10,7 +10,7 @@
#include "rad_clef.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cmath>
+41 -3456
View File
File diff suppressed because it is too large. Load diff
+166
View File
@@ -0,0 +1,166 @@
/* core/server/dashboard_page.h -- the dashboard's page: one document with its script, style and
* type inlined, so the engine serves it from memory with no asset directory and no fetch from
* another origin (it runs on machines with no route to one).
*
* GENERATED by tools/dashboard_embed.py from the build of dashboard/; edit the sources there and
* run `npm run embed` in that directory. The ctest `dashboard_page` fails while the sources and
* this file disagree.
*/
#pragma once
/* A digest of dashboard/'s sources as of this build of the page. */
static const char* const kPageSources = "6e4b952a7acd6ebb56a321f90011faeb0f937f2538dbc76c804a068186a2198e";
/* Every field the page reads of a route's object, as "object.field": the members of the
* interfaces in dashboard/src/lib/api.ts, which the page's compiler holds it to. Ends with null. */
static const char* const kPageReads[] = {
"stats.model",
"stats.uptime_s",
"stats.in_flight",
"stats.max_num_seqs",
"stats.jobs",
"stats.running",
"stats.waiting",
"stats.kv_bytes_used",
"stats.kv_bytes_total",
"stats.prefix_hit_rate",
"stats.prefill_tps",
"stats.decode_tps",
"stats.total_requests",
"stats.preemptions",
"stats.step_ns_decode_best",
"stats.draft_positions",
"stats.requests",
"stats.experts",
"requests.id",
"requests.state",
"requests.prompt",
"requests.computed",
"requests.cached",
"requests.output",
"requests.max",
"requests.age_s",
"requests.tps",
"draft_positions.reached",
"draft_positions.rate",
"experts.n_units",
"experts.tiers",
"experts.layer_units",
"experts.layer_resident",
"tiers.name",
"tiers.units",
"tiers.bytes",
"sessions.sessions",
"sessions.enabled",
"sessions.pool",
"sessions.occupancy",
"sessions.linear",
"sessions.prefix_hit_rate",
"session.id",
"session.label",
"session.tokens",
"session.bytes",
"session.idle_s",
"session.on_device",
"session.on_host",
"session.moving",
"session.snapshots",
"session.resume_tokens",
nullptr
};
static const char* const kPage =
R"RADPAGE(<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark light" />
<title>radiance</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%236f9bff'%3E%3Crect x='17' y='11' width='8' height='42'/%3E%3Cpath d='M29 11h7a12.5 12.5 0 0 1 0 25h-7v-8h7a4.5 4.5 0 0 0 0-9h-7z'/%3E%3Cpath d='M33 40h9l8 13h-9z'/%3E%3C/svg%3E" />
<script>
// The theme before first paint: the stored choice, else the system's.
(function () {
var t = null;
try { t = localStorage.getItem("radiance.theme"); } catch (e) {}
if (t !== "light" && t !== "dark") t = matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark";
document.documentElement.classList.toggle("dark", t === "dark");
})();
</script>
<script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&Line truncated
R"RADPAGE(ction(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormSLine truncated
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&ty)RADPAGE"
R"RADPAGE(peof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
`),l=s.split(`
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);case 30:return xe(`ViewTransition`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
Error generating stack: `+e.message+`
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,J=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ue(n),i=1<<r;t|=e[r],n&=~i}return t}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=J;return J<<=1,!(J&62914560)&&(J=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ue(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&it(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function it(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function at(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=oe.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function ut(e,t){var n=oe.p;try{return oe.p=e,t()}finally{oe.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,Y=`__reactProps$`+dt,pt=`__reactContainer$`+dt,mt=`__reactEvents$`+dt,ht=`__reactListeners$`+dt,gt=`__reactHandles$`+dt,_t=`__reactResources$`+dt,vt=`__reactMarker$`+dt,yt=`__reactLoad$`+dt;function bt(e){delete e[ft],delete e[Y],delete e[ht],delete e[gt]}function xt(e){var t;if(t=e[ft])return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[ft])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[ft]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function wt(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[vt]=!0}function Et(e){e[yt]=void 0}var Dt=new Set,Ot={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(Ot[e]=t,e=0;e<t.lengtLine truncated
R"RADPAGE(,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||$t.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function tn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Ft=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(en(e,a,r),Ft=!0)}else for(var o in t)t.hasOwnProperty(o)&&en(e,o,t[o])}function nn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var rn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),an=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function on(e){return an.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function sn(){}var cn=null;function ln(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var un=null,dn=null;function fn(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[Y]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+X(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Y]||null;if(!a)throw Error(i(90));Kt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Wt(r)}break a;case`textarea`:Xt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Yt(e,!!n.multiple,t,!1)}}}var Z=!1;function pn(e,t,n){if(Z)return e(t,n);Z=!0;try{return e(t)}finally{if(Z=!1,(un!==null||dn!==null)&&(Ld(),un&&(t=un,e=dn,dn=un=null,fn(t),e)))for(t=0;t<e.length;t++)fn(e[t])}}function mn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Y]||null;if(r===null)return null;n=r[t]Line truncated
R"RADPAGE(=`keyup`||e===`keydown`)return gr(mr)}function Tr(e,t){if(e===`click`)return gr(t)}function Er(e,t){if(e===`input`||e===`change`)return gr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ar(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ar(e.document)}return t}function Fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ir=hn&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Ar(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&kr(zr,r)||(zr=r,r=qf(Rr,`onSelect`),0<r.length&&(t=new Dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionrun:Hr(`Transition`,`TransitionRun`),transitionstart:Hr(`Transition`,`TransitionStart`),transitioncancel:Hr(`Transition`,`TransitionCancel`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};hn&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionrun`),Zr=Kr(`transitionstart`),Qr=Kr(`transitioncancel`),$r=Kr(`transitionend`),ei=new Map,ti=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),kt(t,[e])}var ri=0;function ii(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=vd.identifierPrefix;var n=ri++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function ai(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ed;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function oi(e,t){return e=ai(e),t=ai(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var si=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ci=[],li=0,ui=0;function Line truncated
R"RADPAGE(text;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ca(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ca(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ca(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ua(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Or(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&la(t,e,n,r),t.flags|=262144,e!==null}function da(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fa(e){ia=e,aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pa(e){return ha(ia,e)}function ma(e,t){return ia===null&&fa(e),ha(e,t)}function ha(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},aa===null){if(e===null)throw Error(i(308));aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else aa=aa.next=t;return n}var ga=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},_a=t.unstable_scheduleCallback,va=t.unstable_NormalPriority,ya={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ba(){return{controller:new ga,data:new Map,refCount:0}}function xa(e){e.refCount--,e.refCount===0&&_a(va,function(){e.controller.abort()})}function Sa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ca=null;function wa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ta=null,Ea=0,Da=0,Oa=null;function ka(e,t){if(Ta===null){var n=Ta=[];Ea=0,Da=Mf(),Oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ea++,t.then(Aa,Aa),t}function Aa(){if(--Ea===0&&(Ca=null,Ta!==null)){Oa!==null&&(Oa.status=`fulfilled`);var e=Ta;Ta=null,Da=0,Oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ja(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ma=G.S;G.S=function(e,t){if(pd=je(),typeof t==`object`&&t&&typeof t.then==`function`&&ka(e,t),Ca!==null)for(var n=yf;n!==null;)Sa(n,Ca),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Sa(r,n),r=r.next;if(Da!==0){r=Ca,r===null&&(r=Ca=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ma!==null&&Ma(e,t)};var Na=ue(null);function Pa(){var e=Na.current;return e===null?Ju.pooledCache:e}function Fa(e,t){t===null?fe(Na,Na.current):fe(Na,t.pool)}function Ia(){var e=Pa();return e===null?null:{parent:ya._currentValue,pool:e}}var La=Error(i(460)),Ra=Error(i(474)),za=Error(i(542)),Ba={then:function(){}};function Va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(sn,sn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ka(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(sn,sn);else{if(e=Ju,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ka(e),e}throw Wa=t,La}}function Ua(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Wa=e,La):e}}var Wa=null;function Ga(){if(Wa===null)throw Error(i(459));var e=Wa;return Wa=null,e}function Ka(e){if(e===La||e===za)throw Error(i(483))}var qa=null,Ja=0;function Ya(e){var t=Ja;return Ja+=1,qa===null&&(qa=[]),Ha(qa,e,t)}function Xa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Za(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Qa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletioLine truncated
R"RADPAGE(i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Xu&f)===f:(r&f)===f){f!==0&&f===Da&&(co=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:to=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),id|=o,e.lanes=o,e.memoizedState=d}}function fo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function po(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)fo(n[e],t)}var mo=ue(null),ho=ue(0);function go(e,t){e=nd,fe(ho,e),fe(mo,t),nd=e|t.baseLanes}function _o(){fe(ho,nd),fe(mo,mo.current)}function vo(){nd=ho.current,de(mo),de(ho)}var yo=ue(null),bo=null;function xo(e){var t=e.alternate;fe(Eo,Eo.current&1),fe(yo,e),bo===null&&(t===null||mo.current!==null||t.memoizedState!==null)&&(bo=e)}function So(e){fe(Eo,Eo.current),fe(yo,e),bo===null&&(bo=e)}function Co(e){e.tag===22?(fe(Eo,Eo.current),fe(yo,e),bo===null&&(bo=e)):wo()}function wo(){fe(Eo,Eo.current),fe(yo,yo.current)}function To(e){de(yo),bo===e&&(bo=null),de(Eo)}var Eo=ue(0);function Do(e,t){fe(yo,yo.current),fe(Eo,t)}function Oo(e){de(Eo),de(yo),bo===e&&(bo=null)}function ko(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ao=0,jo=null,Mo=null,No=null,Po=!1,Fo=!1,Io=!1,Lo=0,Ro=0,zo=null,Bo=0;function Vo(){throw Error(i(321))}function Ho(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function Uo(e,t,n,r,i,a){return Ao=a,jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?oc:sc,Io=!1,a=n(r,i),Io=!1,Fo&&(a=Go(t,n,r,i)),Wo(e),a}function Wo(e){G.H=ac;var t=Mo!==null&&Mo.next!==null;if(Ao=0,No=Mo=jo=null,Po=!1,Ro=0,zo=null,t)throw Error(i(300));e===null||wc||(e=e.dependencies,e!==null&&da(e)&&(wc=!0))}function Go(e,t,n,r){jo=e;var a=0;do{if(Fo&&(zo=null),Ro=0,Fo=!1,25<=a)throw Error(i(301));if(a+=1,No=Mo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}G.H=cc,o=t(n,r)}while(Fo);return o}function Ko(){var e=G.H,t=e.useState()[0];return t=typeof t.then==`function`?$o(t):t,e=e.useState()[0],(Mo===null?null:Mo.memoizedState)!==e&&(jo.flags|=1024),t}function qo(){var e=Lo!==0;return Lo=0,e}function Jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Yo(e){if(Po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Po=!1}Ao=0,No=Mo=jo=null,Fo=!1,Ro=Lo=0,zo=null}function Xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return No===null?jo.memoizedState=No=e:No=No.next=e,No}function Zo(){if(Mo===null){var e=jo.alternate;e=e===null?null:e.memoizedState}else e=Mo.next;var t=No===null?jo.memoizedState:No.next;if(t!==null)No=t,Mo=e;else{if(e===null)throw jo.alternate===null?Error(i(467)):Error(i(310));Mo=e,e={memoizedState:Mo.memoizedState,baseState:Mo.baseState,baseQueue:Mo.baseQueue,queue:Mo.queue,next:null},No===null?jo.memoizedState=No=e:No=No.next=e}return No}function Qo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $o(e){var t=Ro;return Ro+=1,zo===null&&(zo=[]),e=Ha(zo,e,t),t=jo,(No===null?t.memoizedState:No.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?oc:sc),e}function es(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return $o(e);if(e.$$typeof===ne)return;if(e.$$typeof===F)return pa(e)}throw Error(i(438,String(e)))}function ts(e){var t=null,n=jo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=jo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Qo(),jo.updateQueue=n),n.memoCachLine truncated
R"RADPAGE(u&261930)?(wc=!0,e.memoizedState=n):(e=Ad(),jo.lanes|=e,id|=e,t):(e=Vs(e,n,r),Or(e,t)||(wc=!0),e)}function Us(e,t,n,r,i){var a=oe.p;oe.p=a!==0&&8>a?a:8;var o=G.T,s={};s.types=o===null?null:o.types,G.T=s,tc(e,!1,t,n);try{var c=i(),l=G.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ec(e,t,ja(c,r),kd(e)):ec(e,t,r,kd(e))}catch(n){ec(e,t,{then:function(){},status:`rejected`,reason:n},kd())}finally{oe.p=a,o!==null&&s.types!==null&&(o.types=s.types),G.T=o}}function Ws(){}function Gs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ks(e).queue;Us(e,a,t,se,n===null?Ws:function(){return qs(e),n(r)})}function Ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function qs(e){var t=Ks(e);t.next===null&&(t=e.alternate.memoizedState),ec(e,t.next.queue,{},kd())}function Js(){return pa(sh)}function Ys(){return Zo().memoizedState}function Xs(){return Zo().memoizedState}function Zs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kd();e=io(n);var r=ao(t,e,n);r!==null&&(Md(r,t,n),oo(r,t,n)),t={cache:ba()},e.payload=t;return}t=t.return}}function Qs(e,t,n){var r=kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e)?rc(t,n):(n=pi(e,t,n,r),n!==null&&(Md(n,e,r),ic(n,t,r)))}function $s(e,t,n){ec(e,t,n,kd())}function ec(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(nc(e))rc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o))return fi(e,t,i,0),Ju===null&&di(),!1}catch{}if(n=pi(e,t,i,r),n!==null)return Md(n,e,r),ic(n,t,r),!0}return!1}function tc(e,t,n,r){if(r={lane:2,revertLane:Mf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},nc(e)){if(t)throw Error(i(479))}else t=pi(e,n,r,2),t!==null&&Md(t,e,2)}function nc(e){var t=e.alternate;return e===jo||t!==null&&t===jo}function rc(e,t){Fo=Po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ic(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var ac={readContext:pa,use:es,useCallback:Vo,useContext:Vo,useEffect:Vo,useImperativeHandle:Vo,useLayoutEffect:Vo,useInsertionEffect:Vo,useMemo:Vo,useReducer:Vo,useRef:Vo,useState:Vo,useDebugValue:Vo,useDeferredValue:Vo,useTransition:Vo,useSyncExternalStore:Vo,useId:Vo,useHostTransitionStatus:Vo,useFormState:Vo,useActionState:Vo,useOptimistic:Vo,useMemoCache:Vo,useCacheRefresh:Vo,useEffectEvent:Vo},oc={readContext:pa,use:es,useCallback:function(e,t){return Xo().memoizedState=[e,t===void 0?null:t],e},useContext:pa,useEffect:As,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Os(4194308,4,Is.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){Os(4,2,e,t)},useMemo:function(e,t){var n=Xo();t=t===void 0?null:t;var r=e();if(Io){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Xo();if(n!==void 0){var i=n(t);if(Io){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Qs.bind(null,jo,e),[r.memoizedState,e]},useRef:function(e){var t=Xo();return e={current:e},t.memoizedState=e},useState:function(e){e=fs(e);var t=e.queue,n=$s.bind(null,jo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Rs,useDeferredValue:function(e,t){return Vs(Xo(),e,t)},useTransition:function(){var e=fs(!1);return e=Us.bind(null,jo,e.queue,!0,!1),Xo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=jo,a=Xo();if(Ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ju===null)throw Error(i(349));Xu&127||ss(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,As(ls.bind(null,r,o,e),[e]),r.flags|=2048,Es(9,{destroy:void 0},cs.bind(null,r,o,n,t),null),n},useId:function(){var e=Xo(),t=Ju.identifierPrefix;if(Ki){var n=Ri,r=Li;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Lo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Js,useFormState:xs,useActionState:xs,useOptimistic:function(e){var t=Xo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tc.bind(null,jo,!0,n),n.dispatch=t,[e,t]},useMemoCache:ts,useCacheRefresh:function(){return Xo().memoizedState=Zs.bind(null,jo)},useEffectEvent:function(e){var Line truncated
R"RADPAGE(null&&Fa(t,null),_o(),Co(t),e!==null&&ua(e,t,r,!0),t.childLanes=i,null}function Mc(e,t){return t=Gc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nc(e,t,n){return $a(t,e.child,null,n),e=Mc(t,t.pendingProps),e.flags|=2,To(t),t.memoizedState=null,e}function Pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ki){if(r.mode===`hidden`)return e=Mc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ac(null,e);if(So(t),(e=Gi)?(e=am(e,Ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ii===null?null:{id:Li,overflow:Ri},retryLane:536870912,hydrationErrors:null},n=Ei(e),n.return=t,t.child=n,Wi=t,Gi=null)):e=null,e===null)throw Xi(t);return t.lanes=536870912,null}return Mc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(So(t),a){if(t.flags&256)t.flags&=-257,t=Nc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(wc||ua(e,t,n,!1),a=(n&e.childLanes)!==0,wc||a){if(mo.current===null){if(r=Ju,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,mi(e,s),Md(r,e,s),Cc;Wd()}t=Nc(e,t,n)}else e=o.treeContext,Gi=lm(s.nextSibling),Wi=t,Ki=!0,qi=null,Ji=!1,e!==null&&Ui(t,e),t=Mc(t,r),t.flags|=134221824;return t}return e=xi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ic(e,t,n,r,i){return fa(t),n=Uo(e,t,n,r,void 0,i),r=qo(),e!==null&&!wc?(Jo(e,t,i),el(e,t,i)):(Ki&&r&&Vi(t),t.flags|=1,Tc(e,t,n,i),t.child)}function Lc(e,t,n,r,i,a){return fa(t),t.updateQueue=null,n=Go(t,r,n,i),Wo(e),r=qo(),e!==null&&!wc?(Jo(e,t,a),el(e,t,a)):(Ki&&r&&Vi(t),t.flags|=1,Tc(e,t,n,a),t.child)}function Rc(e,t,n,r,i){if(fa(t),t.stateNode===null){var a=_i,o=n.contextType;typeof o==`object`&&o&&(a=pa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=uc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},no(t),o=n.contextType,a.context=typeof o==`object`&&o?pa(o):_i,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(lc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&uc.enqueueReplaceState(a,a.state,null),uo(t,r,a,i),lo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=pc(n,s);a.props=c;var l=a.context,u=n.contextType;o=_i,typeof u==`object`&&u&&(o=pa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&fc(t,a,r,o),to=!1;var f=t.memoizedState;a.state=f,uo(t,r,a,i),lo(),l=t.memoizedState,s||f!==l||to?(typeof d==`function`&&(lc(t,n,d,r),l=t.memoizedState),(c=to||dc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ro(e,t),o=t.memoizedProps,u=pc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=_i,typeof l==`object`&&l&&(c=pa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&fc(t,a,r,c),to=!1,f=t.memoizedState,a.state=f,uo(t,r,a,i),lo();var p=t.memoizedState;o!==d||f!==p||to||e!==null&&e.dependencies!==null&&da(e.dependencies)?(typeof s==`function`&&(lc(t,n,s,r),p=t.memoizedState),(u=to||dc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&da(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`funLine truncated
R"RADPAGE(!0;else{if(!tl(e,n)&&!(t.flags&128))return wc=!1,nl(e,t,n);wc=!!(e.flags&131072)}}else wc=!1,Ki&&t.flags&1048576&&Bi(t,Ni,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ua(t.elementType),t.type=e,typeof e==`function`)bi(e)?(r=pc(e,r),t.tag=1,t=Rc(null,t,e,r,n)):(t.tag=0,t=Ic(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===I){t.tag=11,t=Ec(null,t,e,r,n);break a}if(a===z){t.tag=14,t=Dc(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=$c(null,t,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return Ic(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=pc(r,t.pendingProps),Rc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ro(e,t),uo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,oa(t,ya,r),r!==o.cache&&la(t,[ya],n,!0),lo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=zc(e,t,r,n);break a}if(r!==a){a=ki(Error(i(424)),t),na(a),t=zc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Gi=lm(e.firstChild),Wi=t,Ki=!0,qi=null,Ji=!0,n=eo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ea(),r===a){t=el(e,t,n);break a}Tc(e,t,r,n)}t=t.child}return t;case 26:return Fc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ki||(t.stateNode=fp(t.type,t.pendingProps,q.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&Ki&&(r=t.stateNode=hm(t.type,t.pendingProps,q.current),Wi=t,Ji=!0,a=Gi,Sp(t.type)?(um=a,Gi=lm(r.firstChild)):Gi=a),Tc(e,t,t.pendingProps.children,n),Fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ki&&((a=r=Gi)&&(r=rm(r,t.type,t.pendingProps,Ji),r===null?a=!1:(t.stateNode=r,Wi=t,Gi=lm(r.firstChild),Ji=!1,a=!0)),a||Xi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Uo(e,t,Ko,null,null,n),sh._currentValue=a),Fc(e,t),Tc(e,t,r,n),t.child;case 6:return e===null&&Ki&&((e=n=Gi)&&(n=im(n,t.pendingProps,Ji),n===null?e=!1:(t.stateNode=n,Wi=t,Gi=null,e=!0)),e||Xi(t)),null;case 13:return Uc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$a(t,null,r,n):Tc(e,t,r,n),t.child;case 11:return Ec(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Fc(e,t),Tc(e,t,r,n),t.child;case 8:return Tc(e,t,t.pendingProps.children,n),t.child;case 12:return Tc(e,t,t.pendingProps.children,n),t.child;case 10:return $c(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,fa(t),a=pa(a),r=r(a),t.flags|=1,Tc(e,t,r,n),t.child;case 14:return Dc(e,t,t.type,t.pendingProps,n);case 15:return Oc(e,t,t.type,t.pendingProps,n);case 19:return Qc(e,t,n);case 31:return Pc(e,t,n);case 22:return kc(e,t,n,t.pendingProps);case 24:return fa(t),r=pa(ya),e===null?(a=Pa(),a===null&&(a=Ju,o=ba(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},no(t),oa(t,ya,a)):((e.lanes&n)!==0&&(ro(e,t),uo(t,null,null,n),lo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,oa(t,ya,r),r!==a.cache&&la(t,[ya],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),oa(t,ya,r))),Tc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Ki&&Vi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Fc(e,t),Tc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function il(e){e.flags|=4}function al(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw Wa=Ba,Ra}}else e.flags&=-16777217}function ol(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Vd())e.flags|=8192;else throw Wa=Ba,Ra}}function sl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:et(),e.lanes|=t,cd|=t)}function cl(e,t){if(!Ki)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ll(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.chilLine truncated
R"RADPAGE(|128,t):null;case 19:return Oo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ge(),null;case 10:return sa(t.type),null;case 22:case 23:return To(t),vo(),e!==null&&de(Na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sa(ya),null;case 25:return null;default:return null}}function fl(e,t){switch(Hi(t),t.tag){case 3:sa(ya),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&To(t);break;case 13:To(t);break;case 19:Oo(t);break;case 10:sa(t.type);break;case 22:case 23:To(t),vo(),e!==null&&de(Na);break;case 24:sa(ya)}}function pl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function ml(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function hl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{po(t,n)}catch(t){ff(e,e.return,t)}}}function gl(e,t,n){n.props=pc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function _l(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=ii(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function vl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function yl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function bl(e){for(var t=e.return;t!==null&&(Cl(t)&&em(e.stateNode,t.stateNode),!Sl(t));)t=t.return}function xl(e){for(var t=e.return;t!==null&&(Cl(t)&&tm(e.stateNode,t.stateNode),!Sl(t));)t=t.return}function Sl(e){return e.tag===5||e.tag===3||e.tag===27}function Cl(e){return e&&e.tag===7&&e.stateNode!==null}function wl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function Tl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Y]=t}catch(t){ff(e,e.return,t)}}function El(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Dl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||El(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ol(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn)),yl(e,r),Ft=!0;else if(i!==4&&(i===27&&(yl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ol(e,t,n,r),e=e.sibling;e!==null;)Ol(e,t,n,r),e=e.sibling}function kl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),yl(e,r),Ft=!0;else if(i!==4&&(i===27&&(yl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(kl(e,t,n,r),e=e.sibling;e!==null;)kl(e,t,n,r),e=e.sibling}function Al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[ft]=e,t[Y]=n}catch(t){ff(e,e.return,t)}}var jl=!1,Ml=null;function Nl(e){(e.tag===30||e.subtreeFlags&33554432)&&(jl=!0)}var Pl=null;function Fl(){var e=Pl;return Pl=null,e}var Il=0;function Ll(e,t,n,r,i){return Il=0,Rl(e.child,t,n,r,i)}function Rl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);jl=!0,Tp(o,Il===0?t:t+`_`+Il,n),Il++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Rl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function zl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||zl(e.child,t),e=e.sibling}function Bl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Bl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paLine truncated
R"RADPAGE(reak;case 22:case 23:e.memoizedState===null&&lu(e,t);break;default:lu(e,t)}}function du(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:uu(n,r);break a;case 22:n.memoizedState===null&&du(n,r);break a;default:du(n,r)}}e=e.sibling}}function fu(e){var t=e.alternate;t!==null&&(e.alternate=null,fu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pu=null,mu=!1;function hu(e,t,n){for(n=n.child;n!==null;)gu(e,t,n),n=n.sibling}function gu(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:Zl||vl(n,t),hu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Zl&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zl||vl(n,t),xl(n);var r=pu,i=mu;Sp(n.type)&&(pu=n.stateNode,mu=!1),hu(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),pu=r,mu=i;break;case 5:Zl||vl(n,t),xl(n);case 6:if(n.tag===6&&xl(n),r=pu,i=mu,pu=null,hu(e,t,n),pu=r,mu=i,pu!==null){if(mu)try{(pu.nodeType===9?pu.body:pu.nodeName===`HTML`?pu.ownerDocument.body:pu).removeChild(n.stateNode),Ft=!0}catch(e){ff(n,t,e)}else try{pu.removeChild(n.stateNode),Ft=!0}catch(e){ff(n,t,e)}}break;case 18:pu!==null&&(mu?(e=pu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(pu,n.stateNode));break;case 4:r=pu,i=mu,pu=n.stateNode.containerInfo,mu=!0,hu(e,t,n),pu=r,mu=i;break;case 0:case 11:case 14:case 15:ml(2,n,t),Zl||ml(4,n,t),hu(e,t,n);break;case 1:Zl||(vl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&gl(n,t,r)),hu(e,t,n);break;case 21:hu(e,t,n);break;case 22:Zl=(r=Zl)||n.memoizedState!==null,hu(e,t,n),Zl=r;break;case 30:vl(n,t),hu(e,t,n);break;case 7:Zl||vl(n,t),hu(e,t,n);break;default:hu(e,t,n)}}function _u(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function yu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new eu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new eu),t;default:throw Error(i(435,e.tag))}}function bu(e,t){var n=yu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function xu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){pu=l.stateNode,mu=!1;break a}break;case 5:pu=l.stateNode,mu=!1;break a;case 3:case 4:pu=l.stateNode.containerInfo,mu=!0;break a}l=l.return}if(pu===null)throw Error(i(160));gu(s,c,o),pu=null,mu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cu(t,e,n),t=t.sibling}var Su=null;function Cu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}xu(t,e,n),wu(e),a&4&&(ml(3,e,e.return),pl(3,e),ml(5,e,e.return));break;case 1:xu(t,e,n),wu(e),a&512&&(Zl||r===null||vl(r,r.return)),a&64&&Xl&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Su,xu(t,e,n),wu(e),a&512&&(Zl||r===null||vl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Xl)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[vt]||r[ft]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[ft]=e,Tt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}rLine truncated
R"RADPAGE(&&t.return.alternate!==null&&Kl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Nu(e,t,n,r),a&2048&&pl(9,t);break;case 1:Nu(e,t,n,r);break;case 3:Nu(e,t,n,r),i&&au&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&xa(a)));break;case 12:if(a&2048){Nu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Nu(e,t,n,r);break;case 31:Nu(e,t,n,r);break;case 13:Nu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Kl(t),o._visibility&2?Nu(e,t,n,r):(o._visibility|=2,Fu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Kl(s),o._visibility&2?Nu(e,t,n,r):Iu(e,t)),a&2048&&ju(s,t);break;case 24:Nu(e,t,n,r),a&2048&&Mu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(zl(a.child,!0),zl(t.child,!0))),Nu(e,t,n,r);break;default:Nu(e,t,n,r)}}function Fu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fu(a,o,s,c,i),pl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fu(a,o,s,c,i)):u._visibility&2?Fu(a,o,s,c,i):Iu(a,o),i&&l&2048&&ju(o.alternate,o);break;case 24:Fu(a,o,s,c,i),i&&l&2048&&Mu(o.alternate,o);break;default:Fu(a,o,s,c,i)}t=t.sibling}}function Iu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Iu(n,r),i&2048&&ju(r.alternate,r);break;case 24:Iu(n,r),i&2048&&Mu(r.alternate,r);break;default:Iu(n,r)}t=t.sibling}}var Lu=8192;function Ru(e,t,n){if(e.subtreeFlags&Lu)for(e=e.child;e!==null;)zu(e,t,n),e=e.sibling}function zu(e,t,n){switch(e.tag){case 26:Ru(e,t,n),e.flags&Lu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Su,e.memoizedState,e.memoizedProps));break;case 5:Ru(e,t,n),e.flags&Lu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Su;Su=bm(e.stateNode.containerInfo),Ru(e,t,n),Su=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Lu,Lu=16777216,Ru(e,t,n),Lu=r):Ru(e,t,n));break;case 30:if((e.flags&Lu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ml===null&&(Ml=new Map),Ml.set(r,i)}Ru(e,t,n);break;default:Ru(e,t,n)}}function Bu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tu=r,Wu(r,e)}Bu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hu(e),e=e.sibling}function Hu(e){switch(e.tag){case 0:case 11:case 15:Vu(e),e.flags&2048&&ml(9,e,e.return);break;case 3:Vu(e);break;case 12:Vu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uu(e)):Vu(e);break;default:Vu(e)}}function Uu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tu=r,Wu(r,e)}Bu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ml(8,t,t.return),Uu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Uu(t));break;default:Uu(t)}e=e.sibling}}function Wu(e,t){for(;tu!==null;){var n=tu;switch(n.tag){case 0:case 11:case 15:ml(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:xa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tu=r;else a:for(n=e;tu!==null;){r=tu;var i=r.sibling,a=r.return;if(fu(r),r===n){tu=null;break a}if(i!==null){i.return=a,tu=i;break a}tu=a}}}var Gu={getCacheForType:function(e){var t=pa(ya),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return pa(ya).controller.signal}},Ku=typeof WeakMap==`function`?WeakMap:Map,qu=0,Ju=null,Yu=null,Xu=0,Zu=0,Qu=null,$u=!1,ed=!1,td=!1,nd=0,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=null,ud=null,dd=!1,fd=0,pd=0,md=1/0,hd=null,gd=null,_d=0,vd=null,yd=null,bd=0,xd=0,Sd=null,Cd=null,wd=null,Td=null,Ed=null,Dd=0,Od=null;function kd(){return qu&2&&Xu!==0?Xu&-Xu:G.T===null?lt():Mf()}function Ad(){if(sd===0){if(!(Xu&536870912)||Ki){var e=Je;Je<<=1,!(Je&3932160)&&(Je=262144),sd=e}else sd=536870912}return e=yo.current,e!==null&&(e.flags|=32),sd}function jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(ii(e.memoizedProps,n))),Td===null&&(Td=[]),Td.push(t.bind(null,r))}}function Md(e,t,n){(e===Ju&&(Zu===2||Zu===9)||e.cancelPendingCommit!==null)&Line truncated
R"RADPAGE(ar t=vd.onRecoverableError;t(e,{componentStack:null})}}function rf(){_d===3&&(_d=0,Du(yd,vd),_d=4)}function af(){if(_d===1){_d=0;var e=vd,t=yd,n=bd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=G.T,G.T=null;var i=oe.p;oe.p=2;var a=qu;qu|=4;try{ru=iu=!1,Cu(t,e,n),n=cp;var o=Pr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Nr(s.ownerDocument.documentElement,s)){if(c!==null&&Fr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Mr(s,h),v=Mr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{qu=a,oe.p=i,G.T=r}}e.current=t,_d=2}}function of(){if(_d===2){_d=0;var e=vd,t=yd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=G.T,G.T=null;var r=oe.p;oe.p=2;var i=qu;qu|=4;try{cu(e,t.alternate,t)}finally{qu=i,oe.p=r,G.T=n}}_d=3}}function sf(){if(_d===4||_d===3){_d=0;var e=wd;wd=null,Ae();var t=vd,n=yd,r=bd,i=Cd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?_d=5:(_d=0,yd=vd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(gd=null),ct(r),n=n.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=G.T,a=oe.p,oe.p=2,G.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{G.T=n,oe.p=a}}if(i=Td,o=Ed,Ed=null,i!==null&&(Td=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);bd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Od?Dd++:(Dd=0,Od=t):(Dd=0,Od=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xa(t)))}function lf(){return wd!==null&&(wd.skipTransition(),wd=null),af(),of(),sf(),uf()}function uf(){if(_d!==5)return!1;var e=vd,t=xd;xd=0;var n=ct(bd),r=G.T,a=oe.p;try{oe.p=32>n?32:n,G.T=null,n=Sd,Sd=null;var o=vd,s=bd;if(_d=0,yd=vd=null,bd=0,qu&6)throw Error(i(331));var c=qu;if(qu|=4,Hu(o.current),Pu(o,o.current,s,n),qu=c,Ef(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{oe.p=a,G.T=r,cf(e,t)}}function df(e,t,n){t=ki(n,t),t=yc(e.stateNode,t,2),e=ao(e,t,2),e!==null&&(nt(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gd===null||!gd.has(r))){e=ki(n,e),n=bc(2),r=ao(t,n,2),r!==null&&(xc(n,r,t,e),nt(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ku;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(td=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ju===e&&(Xu&n)===n&&(rd===4||rd===3&&(Xu&62914560)===Xu&&300>je()-fd?qu&2?od|=n:zd(e,0):od|=n,cd===Xu&&(cd=0)),Tf(e)}function hf(e,t){t===0&&(t=et()),e=mi(e,t),e!==null&&(nt(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return De(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,jf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Af(r,a))}else a=Xu,a=Xe(r,r===Ju?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,Af(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=je(),n=null,r=yf;r!==null;){var i=r.next,a=$(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}_d!==0&&_d!==5||Ef(e,!1),wf!==0&&(wf=0)}function $(e,tLine truncated
R"RADPAGE(l?u:Ct(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?Ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=_r;else if(dr(c)){if(vr)_=Er;else{_=wr;var v=Cr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&nn(r.elementType)&&(_=_r):_=Tr;if(_&&=_(e,r)){fr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ct(r):window,e){case`focusin`:(dr(v)||v.contentEditable===`true`)&&(Lr=v,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(s,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(s,n,i)}var y;if($n)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else sr?ar(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(nr&&n.locale!==`ko`&&(sr||b!==`onCompositionStart`?b===`onCompositionEnd`&&sr&&(y=xn()):(vn=i,yn=`value`in vn?vn.value:vn.textContent,sr=!0)),v=qf(r,b),0<v.length&&(b=new zn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=or(n),y!==null&&(b.data=y)))),(y=tr?cr(e,n):lr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new zn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Pf(s,e,r,n,i)}zf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=mn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=mn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=mn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=mn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||Qt(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&Qt(e,``+r);else return;break;case`className`:Rt(e,`class`,r);break;case`tabIndex`:Rt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Rt(e,n,r);break;case`style`:tn(e,r,o);return;case`data`:if(t!==`object`){Rt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=sn);return;case`onScroll`:r!=null&&Bf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Bf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=on(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Bf(`beforetoggle`,e),Bf(`toggle`,e),Lt(e,`popover`,r);break;case`xlinkActuate`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Lt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=rn.get(n)||n,Lt(e,n,r);else return}Ft=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:tn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)Qt(e,r);else if(typeof r==`number`||typeof r==`bigint`)Qt(e,``+r);else return;break;case`onScroll`:r!=null&&Bf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Bf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=sn);return;case` Line truncated
R"RADPAGE(e`defaultValue`:a!==o&&(Ft=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}Xt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Ft=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(nn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[ft]=r,n[Y]=t,np(n,e,t),Tt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+nLine truncated
R"RADPAGE(ction(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=xt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:caseLine truncated
R"RADPAGE(pe:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=wt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+X(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[yt]){r.loading=1;return}}else t=e.createElement(`link`),t[yt]=!0,t.onload=t.onerror=Et.bind(null,t),np(t,`link`,n),Tt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+X(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+X(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Tt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.hreLine truncated
R"RADPAGE(:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=xt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cn=r,n.target.dispatchEvent(r),cn=null}else return t=St(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Gs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Y]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Y]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[pt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:G,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Be=Jh.inject(qh),Ve=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=mc,s=hc,c=gc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[pt]=t.current,Uf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof _Line truncated
R"RADPAGE(tretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,pe=(()=>{let e=ue.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=ue[n];i<ue[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(ue[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=ue[i];a<ue[i+1];a++)n[r++]=e,e+=t[e]}return n})(),K=G(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),q=oe(G(`123333359346463635126536711576`)),me=G(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),he=G(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),ge=se(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),_e=(()=>{let e=new Int32Array(319).fill(-1),t=se(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=se(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),ve=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-dLine truncated
R"RADPAGE((;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Le(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(Le(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,B=n.prefix??e.prefix??``,V=B===``?``:B+`:`,ee=V.length,H=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),te=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,U=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,re=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=0,ie=-1,ae=-1,G=-1,oe=-1,se=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ce=e=>/\s/.test(String.fromCharCode(e)),le=(e,t,n)=>{if(W=0,ie=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)W=1;else if(r===40&&i===41)W=2;else return;G=t+1,oe=n-1;let a=t+1;if(se(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!se(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ie=t+1,ae=a,G=a+1)}},ue=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},de=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,fe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pe=e=>!!e&&!Number.isNaN(Number(e)),K=(e,t,n)=>{if(n-t<11||!ue(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&ue(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&ue(e,t+10,t+18,`-normal/`)},q=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],me=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),he=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ge=(e,t,n,r)=>{if(e>=10){if(e>=25)return H[e-25](t.slice(n,r));let i=e-10;if(W!==q[i])return!1;if(ie>=0){for(let e of me[i])if(ue(t,ie,ae,e))return!0;return!1}switch(he[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(G,oe);return te.test(e)&&!ne.test(e)}case 3:return pe(t.slice(G,oe));case 4:return re.test(t.slice(G,oe));default:return U.test(t.slice(G,oe))}}switch(e){case 0:return!0;case 1:return W===0;case 2:return W===1;case 3:return W===2;case 4:return de.test(t.slice(n,r));case 5:return pe(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&pe(t.slice(n,r-1));case 8:return fe.test(t.slice(n,r));default:return K(t,n,r)}},_e=new Set(typeof E==`string`?E.split(` `):E),ve=(e,t,n,r,i,a)=>{let o=Le(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},ye=new Map,be=new Map,xe=2,Se=4096,Ce=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||_e.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=be.get(s);return c===void 0&&be.set(s,c=xe++),c},we=new Map,Te=r,Ee=r+4096,De=()=>Te++,Oe=2097152,ke=8192,Ae=new Int32Array(ke),je=Array(ke).fill(null),Me=new Int32Array(ke),Ne=new Int32Array(ke),ze=new Uint8Array(ke),Be=0,Ve=(e,t,n,r,i,a,o,s)=>{let c=e;if(je[e]!==null){if(je[e|1]===null)c=e|1;else if(!(Be++&3))c=e|Be>>2&1;else return}je[c]=t.slice(n,r),Ae[c]=i,Me[c]=a,Ne[c]=o,ze[c]=s},Ue=()=>je.fill(null),We=256,Ge=[new Int32Array(We),new Int32Array(We),new Int32Array(We),new Int32Array(We)],[Ke,qe,Je,J]=Ge,Ye=new Uint8Array(We),Xe=new Uint8Array(We),Ze=()=>{We*=2,Ge=Ge.map(e=>{let t=new Int32Array(We);return t.set(e),t}),[Ke,qe,Je,J]=Ge;let e=new Uint8Array(We);e.set(Ye),Ye=e,Xe=new Uint8Array(We)},Qe=64,$e=new Int32Array(Qe),et=new Int32Array(Qe),tt=new Int32Array(r),nt=2048,rt=21,it=new Float64Array(nt),at=new Int32Array(nt),ot=0,st=(e,t)=>{if(e===0&&t<r)return tt[t]===ot?1:(tt[t]=ot,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>rt;for(;at[i]===ot;){if(it[i]===n)return 1;i=i+1&nt-1}return it[i]=n,at[i]=ot,0},ct=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Fe:ve(we,e,t+1,r,0,De)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=et[t];if(r>n)continue;let i=Line truncated
R"RADPAGE(ll){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Je=ze(Ne),J=qe(Je.mergeString,Je);Je.merge;function Ye({className:e,size:t=`default`,...n}){return(0,W.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:J(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function Xe({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-header`,className:J(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function Ze({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-title`,className:J(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function Qe({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-description`,className:J(`text-sm text-muted-foreground`,e),...t})}function $e({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-action`,className:J(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...t})}function et({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-content`,className:J(`px-(--card-spacing)`,e),...t})}var tt={};function nt(e,t){let n=_.useRef(tt);return n.current===tt&&(n.current=e(t)),n}var rt=[],it=void 0;function at(){return it}function ot(e){rt.push(e)}function st(e){let t=(t,n)=>{let r=nt(lt).current,i;try{it=r;for(let e of rt)e.before(r);i=e(t,n);for(let e of rt)e.after(r);r.didInitialize=!0}finally{it=void 0}return i};return t.displayName=e.displayName||e.name,t}function ct(e){return _.forwardRef(st(e))}function lt(){return{didInitialize:!1}}function ut(){}var dt=Object.freeze([]),ft=Object.freeze({}),Y=typeof document<`u`?_.useLayoutEffect:()=>{};function pt(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var mt=pt(`https://base-ui.com/production-error`,`Base UI`),ht=_.createContext(void 0);function gt(e){let t=_.useContext(ht);if(t===void 0&&!e)throw Error(mt(72));return t}function _t(e){_.useEffect(e,dt)}var vt=0,yt=class e{static create(){return new e}currentId=vt;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=vt,t()},e)}isStarted(){return this.currentId!==vt}clear=()=>{this.currentId!==vt&&(clearTimeout(this.currentId),this.currentId=vt)};disposeEffect=()=>this.clear};function bt(){let e=nt(yt.create).current;return _t(e.disposeEffect),e}function xt(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:St,platform:Ct,maxTouchPoints:wt}=xt(),Tt=St.toLowerCase(),Et=Ct.toLowerCase(),Dt=/^i(os$|p)/.test(Et)||Et===`macintel`&&wt>1,Ot=`android`,kt=Et===Ot||Tt.includes(Ot),At=!Dt&&Et.startsWith(`mac`);Et.startsWith(`win`),!kt&&/^(linux|chrome os)/.test(Et);var jt=At||Dt,Mt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Mt&&Tt.includes(`firefox`),!Mt&&Tt.includes(`chrom`);var Nt=jt,Pt=/jsdom|happydom/.test(Tt);function Ft(e){e.preventDefault(),e.stopPropagation()}function It(e){return`nativeEvent`in e}function Lt(e){return e.pointerType===``&&e.isTrusted?!0:kt&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Rt(e){return Pt?!1:!kt&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(kt||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function zt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Bt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Vt(){return typeof window<`u`}function Ht(e){return Gt(e)?(e.nodeName||``).toLowerCase():`#document`}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wt(e){return((Gt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Gt(e){return Vt()?e instanceof Node||e instanceof Ut(e).Node:!1}function X(e){return Vt()?e instanceof Element||e instanceof Ut(e).Element:!1}functiLine truncated
R"RADPAGE(e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function _r(e){let t=nt(vr,e).current;return t.next=e,Y(t.effect),t}function vr(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var yr={..._},br=yr.useInsertionEffect,xr=br&&br!==yr.useLayoutEffect?br:e=>e();function Q(e){let t=nt(Sr).current;return t.next=e,xr(t.effect),t.trampoline}function Sr(){let e={next:void 0,callback:Cr,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Cr(){}var wr=null;globalThis.requestAnimationFrame;var Tr=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Er=class e{static create(){return new e}static request(e){return Tr.request(e)}static cancel(e){return Tr.cancel(e)}currentId=wr;request(e){this.cancel(),this.currentId=Tr.request(()=>{this.currentId=wr,e()})}cancel=()=>{this.currentId!==wr&&(Tr.cancel(this.currentId),this.currentId=wr)};disposeEffect=()=>this.cancel};function Dr(){let e=nt(Er.create).current;return _t(e.disposeEffect),e}function Or(e){return e?.ownerDocument||document}var kr={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Ar={...kr,position:`fixed`,margin:0,top:0,left:0},jr={...kr,position:`absolute`},Mr=_.forwardRef(function(e,t){let[n,r]=_.useState();Y(()=>{Nt&&Mt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,W.jsx)(`span`,{...e,ref:t,style:Ar,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Nr=Math.min,Pr=Math.max,Fr=Math.round,Ir=Math.floor,Lr=e=>({x:e,y:e}),Rr={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function zr(e,t,n){return Pr(e,Nr(t,n))}function Br(e,t){return typeof e==`function`?e(t):e}function Vr(e){return e.split(`-`)[0]}function Hr(e){return e.split(`-`)[1]}function Ur(e){return e===`x`?`y`:`x`}function Wr(e){return e===`y`?`height`:`width`}function Gr(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Kr(e){return Ur(Gr(e))}function qr(e,t,n){n===void 0&&(n=!1);let r=Hr(e),i=Kr(e),a=Wr(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ni(o)),[o,ni(o)]}function Jr(e){let t=ni(e);return[Yr(e),t,Yr(t)]}function Yr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Xr=[`left`,`right`],Zr=[`right`,`left`],Qr=[`top`,`bottom`],$r=[`bottom`,`top`];function ei(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Zr:Xr:t?Xr:Zr;case`left`:case`right`:return t?Qr:$r;default:return[]}}function ti(e,t,n,r){let i=Hr(e),a=ei(Vr(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Yr)))),a}function ni(e){let t=Vr(e);return Rr[t]+e.slice(t.length)}function ri(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ii(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ri(e)}function ai(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function oi(e,t){return t<0||t>=e.length}function si(e,t){return li(e.current,{disabledIndices:t})}function ci(e,t){return li(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function li(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ui(e,a,r));return a}function ui(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!fi(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function di(e){return e.visibility===`hidden`||e.visibility===`collapse`}function fi(e,t=e?on(e):null){return!e||!e.isConnected||!t||di(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var pi=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function mi(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return qt(n)?n.host:null}function hi(e){for(let t of Array.from(e.children))if(Ht(t)===`summary`)return t;return null}function gi(e,t){let n=hi(t);return!!n&&(e===n||Z(n,e))}function _i(e){let t=e?Ht(e):``;return e!=null&&e.matches(pi)&&(t!==`summary`||e.parentElement!=null&&Ht(e.parentElement)===`details`&&hi(e.parentElement)===e)&&(t!==`details`||hi(e)==Line truncated
R"RADPAGE(end`},Ma={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Na=c(m(),1),Pa=_.createContext(null),Fa=()=>_.useContext(Pa),Ia=Li(`portal`);function La(e={}){let{ref:t,container:n,componentProps:r=ft,elementProps:i}=e,a=ta(),o=Fa()?.portalNode,[s,c]=_.useState(null),[l,u]=_.useState(null),d=Q(e=>{e!==null&&u(e)}),f=_.useRef(null);Y(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Gt(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Ca(`div`,r,{ref:[t,d],props:[{id:a,[Ia]:``},i]}),m=s&&p?Na.createPortal(p,s):null;return{node:l,nodeId:_.isValidElement(p)?p.props.id:void 0,subtree:m}}var Ra=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=La({container:o,ref:t,componentProps:e,elementProps:c}),f=_.useRef(null),p=_.useRef(null),m=_.useRef(null),h=_.useRef(null),[g,v]=_.useState(null),y=_.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;_.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&Mi(e)&&(e.type===`focusin`?y.current&&=(Pi(l),!1):(Ni(l),y.current=!0))}return ur(lr(l,`focusin`,e,!0),lr(l,`focusout`,e,!0))},[l,b]),Y(()=>{l&&x===!0&&y.current&&(Pi(l),y.current=!1)},[x,l]);let C=_.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:v}),[l]);return(0,W.jsxs)(_.Fragment,{children:[d,(0,W.jsxs)(Pa.Provider,{value:C,children:[S&&l&&(0,W.jsx)(Mr,{"data-type":`outside`,ref:f,onFocus:e=>{Mi(e,l)?m.current?.focus():ji(g?g.domReference:null)?.focus()}}),S&&l&&(0,W.jsx)(`span`,{role:s,"aria-owns":u,style:Ma}),l&&Na.createPortal(a,l),S&&l&&(0,W.jsx)(Mr,{"data-type":`outside`,ref:p,onFocus:e=>{Mi(e,l)?h.current?.focus():(Ai(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Kn(`focus-out`,e.nativeEvent)))}})]})]})});function za(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ba=_.createContext(null),Va=_.createContext(null),Ha=()=>_.useContext(Ba)?.id||null,Ua=e=>{let t=_.useContext(Va);return e??t};function Wa(e){return e==null?e:`current`in e?e.current:e}function Ga(e,t){let n=Ut(mn(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Lt(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Ka=20,qa=[];function Ja(){qa=qa.filter(e=>e.deref()?.isConnected)}function Ya(e){Ja(),e&&Ht(e)!==`body`&&(qa.push(new WeakRef(e)),qa.length>Ka&&(qa=qa.slice(-20)))}function Xa(){return Ja(),qa[qa.length-1]?.deref()}function Za(e){return e?Ei(e)?e:Oi(e)[0]||e:null}function Qa(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Di(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ei(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function $a(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),v=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:b,dataRef:x}=t.context,S=Q(()=>x.current.floatingContext?.nodeId),C=i===!1,w=Rn(v)&&C,T=_r(i),E=_r(a),D=_r(o),O=_r(u),k=_r(g),A=Ua(m),j=Fa(),M=_.useRef(!1),N=_.useRef(!1),P=_.useRef(!1),F=_.useRef(null),I=_.useRef(``),L=_.useRef(``),R=_.useRef(null),z=_.useRef(null),B=dr(R,p,j?.beforeInsideRef),V=dr(z,j?.afterInsideRef),ee=bt(),H=bt(),te=Dr(),ne=j!=null,U=Bn(y),re=Q((e=U)=>e?Oi(e):[]),ie=Q(()=>h?.().filter(e=>e!=null)??[]);_.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,fn(Or(U)))&&re().length===0&&!w&&Ft(e)}return lr(Or(U),`keydown`,e)},[r,U,c,w,re]),_.useEffect(()=>{if(r||!g)return;let e=Or(U);function t(){P.current=!1}function n(e){let t=mn(e),n=ie(),r=Z(y,t)||Z(v,t)||Z(j?.portalNode,t)||n.some(e=>e===t||Z(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,pn(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,H.start(0,()=>{N.current=!1}))}function i(){L.current=`keyboard`}return ur(lr(e,`pointerdown`,n,!0),lr(e,`pointerup`,t,!0),lr(e,`pointercancel`,t,!0),lr(e,`keydown`,i,!0),t)},[r,y,v,U,g,j,H,ie]),_.useEffect(()=>{if(r||!l)return;let e=Or(U);function n(){N.current=!0,H.start(0,()=>{N.current=!1})}function i(e){let t=mn(e);Ei(t)&&(F.current=t)}function a(n){let r=nLine truncated
R"RADPAGE(urrent,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=Q(t=>Pn(t,e.select(`floatingElement`))||Pn(t,e.select(`domReferenceElement`))),P=Q(t=>{o()&&e.setOpen(!1,Kn(Jn,t.nativeEvent))}),F=Q(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=It(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&M(`__escapeKeyBubbles`))return;let a=Kn(er,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),I=Q(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=Q(t=>{if(!l||!n||t.button!==0)return;let r=mn(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),R=Q(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});_.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),_.useEffect(()=>j,[j]),_.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=y,d.current.__outsidePressBubbles=b;let t=new yt,i=Or(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(Mt?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function _(e){let t=d.current.floatingContext?.nodeId,n=p&&Fi(p.nodesRef.current,t).some(t=>Pn(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=mn(n),i=`[${Li(`inert`)}]`,a=X(r)?r.getRootNode():null,o=Array.from((qt(a)?a:Or(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=X(r)?r:null;for(;c&&!an(c);){let e=cn(c);if(an(e)||!X(e))break;c=e}if(!(o.length&&X(r)&&!Fn(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Kt(r)&&!(`touches`in n)){let e=an(r),t=on(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!_(n)){if(f()===`intentional`){if(n.detail!==0&&!Lt(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,Kn(Zn,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=mn(e);if(!n)return;let r=lr(n,e.type,()=>{t(e),r()})}function R(e){E.current=`touch`,L(e,I)}function z(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function B(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():_(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function V(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function ee(e){L(e,V)}function H(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function te(e){L(e,H)}let ne=ur(r&&ur(lr(i,`keydown`,F),lr(i,`compositionstart`,a),lr(i,`compositionend`,o)),g&&ur(lr(i,`click`,z,!0),lr(i,`pointerdown`,z,!0),lr(i,`pointerup`,B,!0),lr(i,`pointercancel`,B,!0),lr(i,`mousedown`,z,!0),lr(i,`mouseup`,B,!0),lr(i,`touchstart`,R,{capture:!0,passive:!0}),lr(i,`touchmove`,ee,{capture:!0,passive:!0}),lr(i,`touchend`,te,{capture:!0,passive:!0})));return()=>{ne(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,y,b,F,j,v,M,N,p,e,O,A]);let z=_.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),B=_.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return _.useMemo(()=>n?{reference:z,floating:B,trigger:z}:{},[n,z,B])}function oo(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=Line truncated
R"RADPAGE(`,null)},[e])}var ko=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Ao=o((e=>{var t=u();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,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(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:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),jo=o(((e,t)=>{t.exports=Ao()})),Mo=o((e=>{var t=u(),n=jo();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),No=o(((e,t)=>{t.exports=Mo()})),Po=jo(),Fo=No(),Io=ra(19)?zo:Bo;function Lo(e,t,n,r,i){return Io(e,t,n,r,i)}function Ro(e,t,n,r,i){let a=_.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Po.useSyncExternalStore)(e.subscribe,a,a)}ot({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Po.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function zo(e,t,n,r,i){let a=at();if(!a)return Ro(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Bo(e,t,n,r,i){return(0,Fo.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Vo=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Lo(this,e,t,n,r)}},Ho=class extends Vo{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){_.useDebugValue(e);let n=this;Y(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Y(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Y(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){_.useDebugValue(e);let n=this,r=t!==void 0;Y(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return _.useDebugValue(e),Lo(this,this.selectors[e],t,n,r)}useContextCallback(e,t){_.useDebugValue(e);let n=Q(t??ut);this.context[e]=n}useStateSetter(e){let t=_.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}Line truncated
R"RADPAGE(lear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(Nn(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&X(o)&&Fi(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Kn(Yn,n)),l.events.emit(`floating.closed`,n)})}let y=o;return ur(y&&lr(y,`mouseenter`,g),y&&lr(y,`mouseleave`,_),y&&lr(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var ss={current:null};function cs(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=ss,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,v=Ua(l),y=as(e),b=_.useRef(!1),x=_r(i),S=_r(r),C=_r(o),w=_r(n),T=_r(p),E=_r(f),D=Q(()=>Wn(h.current.openEvent?.type,y.interactedInside)),O=Q(()=>T.current?.()!==!1),k=Q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!X(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),A=Q(()=>{y.handler&&=(Or(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),j=Q(()=>{rs(y)});return u&&(y.handleCloseOptions=i?.__options),_.useEffect(()=>A,[A]),_.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===Yn,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,y,A]),_.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Hn(S.current,`close`,y.pointerType);r?y.openChangeTimeout.start(r,()=>{e.setOpen(!1,Kn(Yn,t)),v?.events.emit(`floating.closed`,t)}):n&&(y.openChangeTimeout.clear(),e.setOpen(!1,Kn(Yn,t)),v?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!X(r))return;function i(t){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!zt(y.pointerType))return;let n=Un(C.current),r=Hn(S.current,`open`,y.pointerType),i=mn(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(X(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}X(o)&&X(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&b.current,p=!l&&X(c)&&X(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,Kn(Yn,t,c)):m||(r?y.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,Kn(Yn,t,c))}):g&&O()&&e.setOpen(!0,Kn(Yn,t,c)))}function o(n){if(D()){j();return}A();let r=Or(e.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!Nn(n.relatedTarget,e.context.triggerElements)){if(x.current&&i){e.select(`open`)||y.openChangeTimeout.clear();let a=c.current;y.handler=x.current({...i,tree:v,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,y.handler),y.handler(n)}else y.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let f=m?lr(r,`mouseout`,l):void 0;return s?ur(lr(r,`mousemove`,i,{once:!0}),lr(r,`mouseenter`,i),lr(r,`mouseleave`,o),f):ur(lr(r,`mouseenter`,i),lr(r,`mouseleave`,o),f)},[A,j,h,S,e,n,x,y,u,k,D,a,s,C,c,v,w,d,E,O,m]),_.useMemo(()=>{if(!n)return;function t(e){y.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!zt(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=y.handleCloseOptions?.getScope?.()??r.ownerDocument.body;is(y,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Un(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,D())return;let t=e.select(`open`);!y.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,Kn(Yn,n,r))}y.pointerType===`touch`?Na.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[n,y,D,k,a,e,C,O])}var ls=.1,us=ls*ls,ds=.5;function fs(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ps(e,t,n,r,i,a,o,s,c,l){let u=!1;return fs(e,t,n,r,i,a)&&(u=!u),fs(e,t,i,a,o,s)&&(u=!u),fs(e,t,o,s,c,l)&&(u=!u),fs(e,t,c,l,n,r)&&(u=!u),u}function ms(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function hs(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.Line truncated
R"RADPAGE({let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Br(e,t),u={x:n,y:r},d=Gr(i),f=Ur(d),p=u[f],m=u[d],h=Br(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ss.has(Vr(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ds=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Br(e,t),c=await i.detectOverflow(t,s),l=Vr(n),u=Hr(n),d=Gr(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Nr(p-c[m],g),y=Nr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Pr(c.left,c.right):S=p-2*Pr(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Os(e){let t=on(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Kt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Fr(n)!==a||Fr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ks(e){return X(e)?e:e.contextElement}function As(e){let t=ks(e);if(!Kt(t))return Lr(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Os(t),o=(a?Fr(n.width):n.width)/r,s=(a?Fr(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var js=Lr(0);function Ms(e){let t=Ut(e);return!rn()||!t.visualViewport?js:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ns(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ut(e)}function Ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ks(e),o=Lr(1);t&&(r?X(r)&&(o=As(r)):o=As(e));let s=Ns(a,n,r)?Ms(a):Lr(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ut(a),t=X(r)?Ut(r):r,n=e,i=dn(n);for(;i&&t!==n;){let e=As(i),t=i.getBoundingClientRect(),r=on(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ut(i),i=dn(n)}}return ai({width:u,height:d,x:c,y:l})}function Fs(e,t){let n=sn(e).scrollLeft;return t?t.left+n:Ps(Wt(e)).left+n}function Is(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fs(e,n),y:n.top+t.scrollTop}}function Ls(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Wt(r),s=t?Xt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Lr(1),u=Lr(0),d=Kt(r);if((d||!a)&&((Ht(r)!==`body`||Jt(o))&&(c=sn(r)),d)){let e=Ps(r);l=As(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Is(o,c):Lr(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Rs(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function zs(e){let t=sn(e),n=e.ownerDocument.body,r=Pr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Pr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fs(e),o=-t.scrollTop;return on(n).direction===`rtl`&&(a+=Pr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Bs=25;function Vs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ut(e),a=Wt(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!rn()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fs(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Bs&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Hs(e,t){let n=Ps(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=As(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Us(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Vs(e,n,t);else if(t===`document`)r=zs(Wt(e));else if(X(t))r=Hs(t,n);else{let n=Ms(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ai(r)}function Ws(e,t){let n=t.get(e);if(n)return n;let r=un(e,[],!1).filter(e=>X(e)&&Ht(e)!==`body`),i=null,a=on(e).position===`fixed`,o=a?cn(e):e;for(;X(o)&&!an(o);){let e=on(o),t=tn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=cn(o)}return t.set(e,r),r}function Gs(e){let{element:t,boundary:n,rootBouLine truncated
R"RADPAGE(ull,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Cc(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var wc=st(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=_o((e,t)=>new xc({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),v=p.useState(`mounted`),y=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),To(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=Eo(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=_.useRef(null);Y(()=>{m&&t&&p.setOpen(!1,Kn(tr))},[m,t,p]),Y(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),Y(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),_.useImperativeHandle(o,()=>({unmount:b,close:()=>p.setOpen(!1,Kn(ir))}),[b,p]);let E=h||v||!t&&a!==`none`;return(0,W.jsxs)(ht.Provider,{value:p,children:[l&&(0,W.jsx)(vo,{handle:l,store:p}),E&&(0,W.jsx)(Tc,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:y}):f]})});function Tc({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=ao(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=no(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=_.useMemo(()=>ua(a.reference,i.reference),[a.reference,i.reference]);return Do(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??ft}),null}function Ec(e){return ta(e,`base-ui`)}var Dc=_.createContext(void 0);function Oc(){return _.useContext(Dc)}var kc=`data-base-ui-tooltip-trigger`;function Ac(e){let t=mn(e);return X(t)?t:null}var jc=ct(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=gt(!0),m=Qo(a)??p;if(!m)throw Error(mt(82));let h=Ec(d),g=m.useState(`isTriggerActive`,h),v=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=_.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=wo(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Oc(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=cr(y,{open:v}),k=as(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=_r(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=_.useRef(!1),I=bt(),L=_.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=b.current;if(!t||!e)return!1;let n=pn(e,`[${kc}]`);return n!==null&&n!==t&&Z(t,n)}function B(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let V=cs(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?gs():null,restMs:R,delay(){return u==null&&O?{close:Hn(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),ee=es(y,{enabled:!j}).reference,H=e=>{let t=F.current,n=Ac(e),r=B(n),i=b.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Kn(Yn,e));else if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&zt(L.current)){let t=()=>{F.current||M.current||m.select(`open`)||m.setOpen(!0,Kn(Yn,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},te=m.useState(`appliedTriggerProps`,C||N!==`none`);return Ca(`button`,e,{state:{open:v},ref:[t,S,b],props:[V,ee,te,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){z(Ac(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Mn]:j?``:void 0,[kc]:j?void 0:``},f],stateAttributesMapping:kn})}),Mc=_.createContext(void 0);function Nc(){let e=_.useContext(Mc);if(e===void 0)throw Error(mt(70));return e}var Pc=_.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=La({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,W.jsxs)(_.Fragment,{children:[l,c&&Na.createPortal(n,c)]})}),Fc=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return gt().useState(`mounted`)||n?(0,W.jsx)(Mc.Provider,{value:n,children:(0,W.jsx)(Pc,{ref:t,...r})}):null}),Ic=_.createContext(void 0);function Lc(){let e=_.useContext(Ic);if(e===vLine truncated
R"RADPAGE(tionReference(e.current),Ee.current=e.current)},[g,K,j,M]),_.useEffect(()=>{if(m&&g&&q.reference&&q.floating)return nc(q.reference,q.floating,_e,pe)},[m,g,q,_e,pe]);let De=Vr(ve),Oe=Qc(i,De,P),ke=Hr(ve)||`center`,Ae=!!ge.hide?.referenceHidden;Y(()=>{S&&g&&be&&(De!==B||L&&ke!==V)&&I(ve)},[S,L,g,be,ve,De,ke,B,V]);let je=_.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return _.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ie,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:K,context:ye,isPositioned:be,update:_e}),[Te,je,ie,Me,Oe,ke,De,Ae,K,ye,be,_e])}function nl(e){return e!=null&&`current`in e}function rl(e){return e===`starting`?Aa:ft}function il(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Ca(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},rl(r),i],stateAttributesMapping:An})}var al=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ja,style:g,...v}=e,y=gt(),b=Nc(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`trackCursorAxis`),w=y.useState(`disableHoverablePopup`),T=y.useState(`floatingRootContext`),E=y.useState(`instantType`),D=y.useState(`transitionStatus`),O=el({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,adaptiveOrigin:y.useState(`adaptiveOrigin`)}),k=il(e,_.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,W.jsx)(Ic.Provider,{value:O,children:k})}),ol=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gt(),{side:s,align:c}=Lc(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);po({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),os(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Ca(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[ho,f,rl(d),a],stateAttributesMapping:jn})}),sl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gt(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Lc();return Ca(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:An})}),cl=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=_.useMemo(()=>({open:t,close:n}),[t,n]);return(0,W.jsx)(Dc.Provider,{value:t,children:(0,W.jsx)(sr,{delay:i,timeoutMs:r,children:e.children})})};function ll(e){return ra(19)?e:e?`true`:void 0}function ul({delay:e=0,...t}){return(0,W.jsx)(cl,{"data-slot":`tooltip-provider`,delay:e,...t})}function dl({...e}){return(0,W.jsx)(wc,{"data-slot":`tooltip`,...e})}function fl({...e}){return(0,W.jsx)(jc,{"data-slot":`tooltip-trigger`,...e})}function pl({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,W.jsx)(Fc,{children:(0,W.jsx)(al,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,W.jsxs)(ol,{"data-slot":`tooltip-content`,className:J(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,W.jsx)(sl,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[sidLine truncated
R"RADPAGE(ed:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=kl({disabled:i,focusableWhenDisabled:a,native:o});return Ca(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Nl(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=Nl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Pl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Nl(e))&&(r&&(r+=` `),r+=t);return r}var Fl=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Il=Pl,Ll=(e,t)=>n=>{if(t?.variants==null)return Il(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Fl(t)||Fl(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Il(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Rl=Ll(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function zl({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,W.jsx)(Ml,{"data-slot":`button`,className:J(Rl({variant:t,size:n,className:e})),...r})}var Bl=_.createContext(void 0);function Vl(e){let t=_.useContext(Bl);if(!e&&t===void 0)throw Error(mt(27));return t}var Hl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Vl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Ca(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:jn,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Ul=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Vl(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=kl({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Kn(Qn,e.nativeEvent))}return Ca(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Wl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Vl(),c=Ec(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Ca(`p`,e,{ref:t,props:[{id:c},o]})}),Gl=_.createContext(void 0);function Kl(){let e=_.useContext(Gl);if(e===void 0)throw Error(mt(26));return e}var ql=`ArrowUp`,Jl=`ArrowDown`,Yl=`ArrowLeft`,Xl=`ArrowRight`,Zl=new Set([ql,Jl,YLine truncated
R"RADPAGE(ock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Or(e),n=t.documentElement,r=t.body,i=Ut(n);if(mu(i,n,r)){let t=new i.MutationObserver(()=>{mu(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Dt||!hu(e);this.restore=a?_u(e):vu(e)}};function bu(e=!0,t=null){Y(()=>{if(e)return yu.acquire(t)},[e,t])}function xu({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=_.useState(0),[d,f]=_.useState(0),p=l===0,m=ao(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=mn(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Z(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return bu(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),Y(()=>{!r&&!i&&(u(0),f(0))},[r,i]),Y(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),Do(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Su={...Zo,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Cu=class extends Ho{constructor(e,t,n){let r=new ko,i=wu(e,r,t,n);super(i,Tu(r),Su)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(xo(this.state,e,t.trigger)))}};function wu(e,t,n,r=!1){return{...Go(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Tu(e){return{popupRef:_.createRef(),backdropRef:_.createRef(),internalBackdropRef:_.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Eu(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,v=m?`alertdialog`:`dialog`,y=Vl(!0),b={modal:h,disablePointerDismissal:g,nested:y!=null,role:v},x=_o((e,t)=>new Cu({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...b},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(b),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);Oo(x,S),To(x);let{forceUnmount:T}=Eo(S,x);_.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,Kn(ir))}),[T,x]);let E=S||C||u!=null;return(0,W.jsxs)(Bl.Provider,{value:x,children:[u&&(0,W.jsx)(vo,{handle:u,store:x}),E&&(0,W.jsx)(xu,{store:x,parentContext:y?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var Du=st(function(e){return Eu(`dialog`,e)}),Ou=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Vl(),c=Ec(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Ca(`h2`,e,{ref:t,props:[{id:c},o]})});function ku(e,t){let n=_.useRef(e),r=Q(t);Y(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Au({...e}){return(0,W.jsx)(Du,{"data-slot":`dialog`,...e})}function ju({...e}){return(0,W.jsx)(lu,{"data-slot":`dialog-portal`,...e})}function Mu({className:e,...t}){return(0,W.jsx)(Hl,{"data-slot":`dialog-overlay`,className:J(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Nu({className:e,children:t,showCloseButton:n=!0,...r}){return(0,W.jsxs)(ju,{children:[(0,W.jsx)(Mu,{}),(0,W.jsxs)(su,{Line truncated
R"RADPAGE(,...t}){return(0,W.jsx)(Hl,{"data-slot":`sheet-overlay`,className:J(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function dd({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,W.jsxs)(ld,{children:[(0,W.jsx)(ud,{}),(0,W.jsxs)(su,{"data-slot":`sheet-content`,"data-side":n,className:J(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,W.jsxs)(Ul,{"data-slot":`sheet-close`,render:(0,W.jsx)(zl,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,W.jsx)(U,{}),(0,W.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fd({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`sheet-header`,className:J(`flex flex-col gap-0.5 p-4`,e),...t})}function pd({className:e,...t}){return(0,W.jsx)(Ou,{"data-slot":`sheet-title`,className:J(`font-heading text-base font-medium text-foreground`,e),...t})}function md({className:e,...t}){return(0,W.jsx)(Wl,{"data-slot":`sheet-description`,className:J(`text-sm text-muted-foreground`,e),...t})}var hd=`sidebar_state`,gd=604800,_d=`16rem`,vd=`18rem`,yd=`3rem`,bd=`b`,xd=_.createContext(null);function Sd(){let e=_.useContext(xd);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Cd({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=sd(),[c,l]=_.useState(!1),[u,d]=_.useState(e),f=t??u,p=_.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${hd}=${t}; path=/; max-age=${gd}`},[n,f]),m=_.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);_.useEffect(()=>{let e=e=>{e.key===bd&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=_.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,W.jsx)(xd.Provider,{value:g,children:(0,W.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":_d,"--sidebar-width-icon":yd,...i},className:J(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function wd({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Sd();return n===`none`?(0,W.jsx)(`div`,{"data-slot":`sidebar`,className:J(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,W.jsx)(cd,{open:l,onOpenChange:u,...o,children:(0,W.jsxs)(dd,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":vd},side:e,children:[(0,W.jsxs)(fd,{className:`sr-only`,children:[(0,W.jsx)(pd,{children:`Sidebar`}),(0,W.jsx)(md,{children:`Displays the mobile sidebar.`})]}),(0,W.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,W.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,W.jsx)(`div`,{"data-slot":`sidebar-gap`,className:J(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,W.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:J(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[leLine truncated
R"RADPAGE(ate:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}var Kd=_.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=Ec(u||void 0),h=Bd(),g=h?.value??[],v=(i||h?.disabled)??!1,[y,b]=Rd({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:x,buttonRef:S}=kl({disabled:v,native:d}),C={disabled:v,pressed:y},w=[S,t],T=[{"aria-pressed":y,onClick(e){let t=!y,n=Kn(qn,e.nativeEvent);o?.(t,n),n.isCanceled||(m&&h?.setGroupValue?.(m,t,n),n.isCanceled||b(t))}},p,x],E=Ca(`button`,e,{enabled:!h,state:C,ref:w,props:T}),D=_.useMemo(()=>({disabled:v,focusableWhenDisabled:!1}),[v]);return h?(0,W.jsx)(Gd,{tag:`button`,render:c,className:n,style:f,metadata:D,state:C,refs:w,props:T}):E});function qd(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Q(i),[,o]=_.useState(0),s=nt(Yd).current,c=nt(Jd).current,l=_.useRef(0),u=_.useRef(!0),d=_.useRef(null),f=_.useRef(null),p=Q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Q((e,t)=>{c.set(e,t),p()}),h=Q(e=>{c.delete(e),p()}),g=Q(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function v(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Qd(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&$d(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Zd(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=Q(()=>{let[e,t]=Xd(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});Y(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),Y(()=>{u.current&&y()}),Y(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let b=Q(e=>(s.add(e),()=>{s.delete(e)})),x=_.useMemo(()=>({register:m,unregister:h,subscribeMapChange:b,nextIndexRef:l}),[m,h,b,l]);return(0,W.jsx)(Vd.Provider,{value:x,children:t})}function Jd(){return new Map}function Yd(){return new Set}function Xd(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>$d(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Zd(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Qd(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function $d(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function ef(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var tf=`data-composite-item-active`;function nf(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=dt}=e,[p,m]=_.useState(0),h=r!=null,g=_.useRef(null),v=dr(g,c),y=_.useRef([]),b=_.useRef(!1),x=_.useRef(null),S=o??p,C=Q((e,t=!1)=>{if(x.current=y.current[e]??null,(s??m)(e),t){let t=y.current[e];tu(g.current,t,a,n)}}),w=Q(e=>{if(e.size===0)return;if(b.current){let e=y.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||ui(e,S,d)?C(rf(e,d)):x.current=t}else t!==S&&C(t);return}b.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(ui(t,S,d)){let e=li(t,{disabledIndices:d});oi(t,e)||C(e)}tu(g.current,r,a,n)});Y(()=>{if(d==null||o!=null||!b.current)return;let e=y.current;if(ui(e,S,d)){let t=li(e,{disabledIndices:d});oi(e,t)||C(t)}},[d,o,S,y,C]);let T=Q((e,t,n)=>i?i(e,t,n,y):n),E=Q(e=>{let o=e.key===`Home`||e.key===`End`;if(!Zl.has(e.key)||!l&&o||af(e,f)||!g.current)return;let s=a===`rtl`,c=s?Yl:Xl,p=s?Xl:Yl,m=n===`vertical`?Jl:c,_=n===`vertical`?ql:p,v=mn(e.nativeEvent);if(v!=null&&eu(v)&&!ef(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=S,x=si(y,d),w=ci(y,d);r!=null&&(b=r({disabledIndices:d,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let Line truncated
R"RADPAGE(clearInterval(o)}},[e,t]),{data:e?Cf.get(e)??null:null,error:r}}var Tf=e=>typeof e==`number`&&Number.isFinite(e);function Ef(e){if(!Tf(e))return`–`;let t=[`B`,`KiB`,`MiB`,`GiB`,`TiB`],n=0,r=Math.abs(e);for(;r>=1024&&n<t.length-1;)r/=1024,++n;let i=r>=100||n===0?r.toFixed(0):r>=10?r.toFixed(1):r.toFixed(2);return(e<0?`-`:``)+i+` `+t[n]}function Df(e){let t=Ef(e);if(t===`–`)return[`–`,``];let n=t.lastIndexOf(` `);return[t.slice(0,n),t.slice(n+1)]}var Of=e=>Tf(e)?Ef(e)+`/s`:`–`;function $(e,t=0){return Tf(e)?e.toLocaleString(`en-US`,{minimumFractionDigits:t,maximumFractionDigits:t}):`–`}function kf(e){if(!Tf(e))return`–`;let t=Math.abs(e);return t>=100?$(e,0):t>=10?$(e,1):$(e,2)}var Af=(e,t=1)=>Tf(e)?(e*100).toFixed(t):`–`;function jf(e){return Tf(e)?e<1?Math.round(e*1e3)+` ms`:e<60?(e<10?e.toFixed(1):e.toFixed(0))+` s`:e<3600?Math.floor(e/60)+` m `+String(Math.floor(e%60)).padStart(2,`0`)+` s`:e<86400?Math.floor(e/3600)+` h `+String(Math.floor(e%3600/60)).padStart(2,`0`)+` m`:Math.floor(e/86400)+` d `+Math.floor(e%86400/3600)+` h`:`–`}function Mf(e,t=!1){let n=new Date(e*1e3),r=e=>String(e).padStart(2,`0`);return r(n.getHours())+`:`+r(n.getMinutes())+(t?`:`+r(n.getSeconds()):``)}function Nf(e,t){return jf(Math.max(0,(t-e)/1e3))+` ago`}var Pf=3600,Ff=200,If=class{t=[];c=new Map;append(e,t){let n=0;for(;n<e.length&&e[n]<=this.end;)++n;if(n===e.length)return;let r=this.t.length;for(let t=n;t<e.length;++t)this.t.push(e[t]);let i=this.t.length;for(let[e,i]of Object.entries(t)){let t=this.c.get(e);t||(t=Array(r).fill(null),this.c.set(e,t));for(let e=n;e<i.length;++e)t.push(i[e])}for(let e of this.c.values())for(;e.length<i;)e.push(null);let a=this.firstAfter(this.t[i-1]-Pf);if(a>64){this.t.splice(0,a);for(let e of this.c.values())e.splice(0,a)}}firstAfter(e){let t=0,n=this.t.length;for(;t<n;){let r=t+n>>1;this.t[r]<=e?t=r+1:n=r}return t}col(e){return this.c.get(e)}has(e){let t=this.c.get(e);return!!t&&t.some(e=>e!==null)}last(e,t=300){let n=this.c.get(e);if(n){for(let e=n.length-1;e>=0&&e>=n.length-t;--e)if(n[e]!==null)return n[e]}return null}get end(){return this.t.length?this.t[this.t.length-1]:0}},Lf=class{series=new If;live=null;finished=[];loaded=!1;error=null;refused=!1;version=0;path;subs=new Set;timer;busy=!1;users=0;constructor(e){this.path=e}subscribe=e=>(this.subs.add(e),++this.users===1&&this.start(),()=>{this.subs.delete(e),--this.users===0&&this.stop()});getVersion=()=>this.version;start(){this.poll(),this.timer=window.setInterval(()=>{document.hidden||this.poll()},Ff),document.addEventListener(`visibilitychange`,this.onVisible)}stop(){window.clearInterval(this.timer),document.removeEventListener(`visibilitychange`,this.onVisible)}onVisible=()=>{document.hidden||this.poll()};async poll(){if(!(this.busy||this.refused)){this.busy=!0;try{let e=this.series.end,t=this.path.includes(`?`)?`&`:`?`,n=await xf(this.path+(e?t+`since=`+e:``));if(this.series.append(n.t,n.c),n.requests?.length){let e=new Set(this.finished.slice(-64).map(e=>e.id+`:`+e.at));for(let t of n.requests)e.has(t.id+`:`+t.at)||this.finished.push(t);this.finished.length>500&&this.finished.splice(0,this.finished.length-500)}this.live=n.live,this.loaded=!0,this.error=null}catch(e){this.error=e instanceof Error?e.message:String(e),e instanceof bf&&e.status===403&&(this.refused=!0)}finally{this.busy=!1,++this.version,this.subs.forEach(e=>e())}}}},Rf=new Lf(`history`),zf=new Map;function Bf(e){let t=zf.get(e);return t||(t=new Lf(Sf(`history`,e)),zf.set(e,t)),t}function Vf(e){return(0,_.useSyncExternalStore)(e.subscribe,e.getVersion),e}function Hf(e){let t=e,n=new Set;return{get:()=>t,set(e){e!==t&&(t=e,n.forEach(e=>e()))},subscribe(e){return n.add(e),()=>{n.delete(e)}}}}var Uf=e=>{try{return localStorage.getItem(e)}catch{return null}},Wf=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},Gf=Hf(document.documentElement.classList.contains(`dark`)?`dark`:`light`);function Kf(e){document.documentElement.classList.toggle(`dark`,e===`dark`),Wf(`radiance.theme`,e),Gf.set(e)}var qf=()=>(0,_.useSyncExternalStore)(Gf.subscribe,Gf.get),Jf=[[60,`1m`],[300,`5m`],[900,`15m`],[3600,`1h`]],Yf=Number(Uf(`radiance.range`)),Xf=Hf(Jf.some(([e])=>e===Yf)?Yf:300);function Zf(e){Wf(`radiance.range`,String(e)),Xf.set(e)}var Qf=()=>(0,_.useSyncExternalStore)(Xf.subscribe,Xf.get),$f=[`performance`,`requests`,`sessions`,`details`];function ep(){let e=/^#\/m\/([^/]+)(?:\/([a-z]+))?/.exec(location.hash);if(!e)return{model:null,tab:`performance`};let t=$f.includes(e[2])?e[2]:`performance`;return{model:decodeURIComponent(e[1]),tab:t}}var tp=ep(),np=new Set;window.addEventListener(`hashchange`,()=>{tp=ep(),np.forEach(e=>e())});var rp=()=>(0,_.useSyncExternalStore)(e=>(np.add(e),()=>{np.delete(e)}),()=>tp),ip=(e,t=`performance`)=>e===null?`#/`:`#/m/`+encodeURIComponent(e)+`/`+t,ap=_.createContext(void 0);function op(){let e=_.useContext(ap);if(e===void 0)throw Error(mt(64));return e}var sp=`data-activation-direction`,cp={tabActivationDirection:e=>({[sp]:e})Line truncated
R"RADPAGE( [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function bp({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,W.jsx)(`table`,{"data-slot":`table`,className:J(`w-full caption-bottom text-sm`,e),...t})})}function xp({className:e,...t}){return(0,W.jsx)(`thead`,{"data-slot":`table-header`,className:J(`[&_tr]:border-b`,e),...t})}function Sp({className:e,...t}){return(0,W.jsx)(`tbody`,{"data-slot":`table-body`,className:J(`[&_tr:last-child]:border-0`,e),...t})}function Cp({className:e,...t}){return(0,W.jsx)(`tr`,{"data-slot":`table-row`,className:J(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function wp({className:e,...t}){return(0,W.jsx)(`th`,{"data-slot":`table-head`,className:J(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function Tp({className:e,...t}){return(0,W.jsx)(`td`,{"data-slot":`table-cell`,className:J(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}var Ep=_.createContext(void 0);function Dp(){let e=_.useContext(Ep);if(e===void 0)throw Error(mt(63));return e}var Op=`data-checked`,kp=`data-unchecked`,Ap={...Hu,checked(e){return e?{[Op]:``}:{[kp]:``}}},jp=_.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:v,style:y,...b}=e,{clearErrors:x}=qu(),{state:S,setTouched:C,setDirty:w,validityData:T,setFilled:E,validationMode:D,disabled:O,name:k,validation:A}=Gu(),{labelId:j}=Yu(),M=O||m,N=k??l,P=_.useRef(null),F=dr(P,c,A.inputRef),I=_.useRef(null),L=ed(M,I),R=Ec(),z=$u({id:s}),B=u?void 0:z,[V,ee]=Rd({controlled:n,default:!!i,name:`Switch`,state:`checked`});td(I,R,V,void 0,!M,l),Y(()=>{E(V)},[V,E]),ku(V,()=>{x(N),w(V!==T.initialValue),A.change(V)});let{getButtonProps:H,buttonRef:te}=kl({disabled:M,native:u}),ne=Xu(a,j,P,!u,B,b[`aria-label`]),U={id:u?z:R,role:`switch`,"aria-checked":V,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":ne,onFocus(){L(!0)},onBlur(){let e=P.current;e&&!M&&(C(!0),L(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){if(f||M)return;e.preventDefault();let t=P.current;t&&Ol(t,e)}},re={...A.getValidationProps(M),checked:V,disabled:M,form:o,id:B,name:N,required:p,style:N?jr:Ar,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:F,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Kn(qn,e.nativeEvent);d?.(t,n),n.isCanceled||ee(t)},onClick(e){e.stopPropagation()},onFocus(){I.current?.focus()},...v===void 0?ft:{value:v}},ie=_.useMemo(()=>({...S,checked:V,disabled:M,readOnly:f,required:p}),[S,V,M,f,p]),ae=Ca(`span`,e,{state:ie,ref:[t,I,te],props:[U,b,H,e=>A.getValidationProps(M,e)],stateAttributesMapping:Ap});return(0,W.jsxs)(Ep.Provider,{value:ie,children:[ae,!V&&N&&g!==void 0&&(0,W.jsx)(`input`,{type:`hidden`,form:o,name:N,value:g,disabled:M}),(0,W.jsx)(`input`,{...re,suppressHydrationWarning:!0})]})}),Mp=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Ca(`span`,e,{state:Dp(),ref:t,stateAttributesMapping:Ap,props:a})});function Np({className:e,size:t=`default`,...n}){return(0,W.jsx)(jp,{"data-slot":`switch`,"data-size":t,className:J(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-dLine truncated
R"RADPAGE(assName:`num text-right`,children:$(e.kernels)}),(0,W.jsx)(Tp,{className:`pr-4 text-muted-foreground`,children:e.build_target??`–`})]},e.name))})]})}),(n.notes?.length??0)>0&&(0,W.jsx)(hl,{title:`Notes`,description:`Messages from the model plugin during setup`,children:(0,W.jsx)(`ul`,{className:`flex flex-col gap-2 text-sm text-muted-foreground`,children:n.notes.map((e,t)=>(0,W.jsx)(`li`,{className:`border-l-2 pl-3 leading-snug`,children:e},t))})})]}),(0,W.jsx)(cd,{open:!!s,onOpenChange:e=>{e||c(null)},children:(0,W.jsx)(dd,{className:`w-full gap-0 overflow-y-auto sm:max-w-xl`,children:s&&(0,W.jsx)(Rp,{op:s})})})]})}function Lp({model:e}){let[t,n]=(0,_.useState)(null),r=()=>{xf(Sf(`admin/control-vector`,e)).then(n).catch(()=>n(null))};return(0,_.useEffect)(r,[e]),t?(0,W.jsxs)(`label`,{className:`flex items-center gap-3 rounded-xl border bg-card px-4 py-3`,children:[(0,W.jsx)(`span`,{className:`text-sm font-medium`,children:`Control vector`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-muted-foreground`,children:t.name??``}),(0,W.jsx)(Np,{checked:!!t.default,onCheckedChange:i=>{n({...t,default:i}),xf(Sf(`admin/control-vector`,e),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:i})}).catch(()=>void 0).finally(r)}})]}):null}function Rp({op:e}){let t=Pp(e),n=[[`Geometry`,e.geometry],[`Launches per pass`,$(e.count??1)],[`Range`,e.ranged?`${e.ranged} from ${e.range_lo} to ${e.range_hi}`:void 0],[`Kernel`,t?.kernel],[`Library`,t?.plugin],[`Computes`,t?.computes],[`Shapes`,t?.shape],[`Types`,t?.dtypes],[`Requires`,t?.constraints?.length?t.constraints.join(`; `):void 0]];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(fd,{children:[(0,W.jsx)(pd,{children:e.op}),(0,W.jsx)(md,{children:e.schema?.doc??`Op `+e.index})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-6`,children:[(0,W.jsx)(`dl`,{className:`grid grid-cols-[8rem_1fr] gap-x-3 gap-y-2 text-sm`,children:n.filter(([,e])=>e).map(([e,t])=>(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,W.jsx)(`dd`,{className:`min-w-0 break-words font-mono text-xs leading-5`,children:t})]},e))}),(e.weights?.length??0)>0&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:`Weights`}),(0,W.jsx)(`div`,{className:`overflow-hidden rounded-lg border`,children:e.weights.slice(0,24).map(e=>(0,W.jsxs)(`div`,{className:`flex items-baseline gap-3 border-b px-3 py-1.5 text-xs last:border-b-0`,children:[(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,children:e.name}),(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.dtype,` · `,e.shape]}),(0,W.jsx)(`span`,{className:`num w-20 text-right`,children:Ef(e.bytes)})]},e.name))})]}),(e.bands?.length??0)>1&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:`By size`}),(0,W.jsx)(`div`,{className:`overflow-hidden rounded-lg border`,children:e.bands.map(e=>(0,W.jsxs)(`div`,{className:`flex items-baseline gap-3 border-b px-3 py-1.5 text-xs last:border-b-0`,children:[(0,W.jsx)(`span`,{className:`num w-28 text-muted-foreground`,children:e.span}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,children:(e.device??e.host)?.kernel??`–`})]},e.span))})]})]})]})}var zp=!0,Bp=`uplot`,Vp=`u-hz`,Hp=`u-vt`,Up=`u-title`,Wp=`u-wrap`,Gp=`u-under`,Kp=`u-over`,qp=`u-axis`,Jp=`u-off`,Yp=`u-select`,Xp=`u-cursor-x`,Zp=`u-cursor-y`,Qp=`u-cursor-pt`,$p=`u-legend`,em=`u-live`,tm=`u-inline`,nm=`u-series`,rm=`u-marker`,im=`u-label`,am=`u-value`,om=`width`,sm=`height`,cm=`top`,lm=`bottom`,um=`left`,dm=`right`,fm=`#000`,pm=`#0000`,mm=`mousemove`,hm=`mousedown`,gm=`mouseup`,_m=`mouseenter`,vm=`mouseleave`,ym=`dblclick`,bm=`resize`,xm=`scroll`,Sm=`change`,Cm=`dppxchange`,wm=`--`,Tm=typeof window<`u`,Em=Tm?document:null,Dm=Tm?window:null,Om=Tm?navigator:null,km,Am;function jm(){let e=devicePixelRatio;km!=e&&(km=e,Am&&Km(Sm,Am,jm),Am=matchMedia(`(min-resolution: ${km-.001}dppx) and (max-resolution: ${km+.001}dppx)`),Gm(Sm,Am,jm),Dm.dispatchEvent(new CustomEvent(Cm)))}function Mm(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function Nm(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function Pm(e,t,n){e.style[t]=n+`px`}function Fm(e,t,n,r){let i=Em.createElement(e);return t!=null&&Mm(i,t),n?.insertBefore(i,r),i}function Im(e,t){return Fm(`div`,e,t)}var Lm=new WeakMap;function Rm(e,t,n,r,i){let a=`translate(`+t+`px,`+n+`px)`;a!=Lm.get(e)&&(e.style.transform=a,Lm.set(e,a),t<0||n<0||t>r||n>i?Mm(e,Jp):Nm(e,Jp))}var zm=new WeakMap;function Bm(e,t,n){let r=t+n;r!=zm.get(e)&&(zm.set(e,r),e.style.background=t,e.style.borderColor=n)}var Vm=new WeakMap;function Hm(e,t,n,r){let i=t+``+n;i!=Vm.get(e)&&(Vm.set(e,i),e.style.height=n+`px`,e.style.width=t+`px`,e.style.marginLeft=r?-t/2+`px`:0,e.style.marginTop=r?-n/2+`px`:0)}var Um={passive:!0},Wm={...Um,cLine truncated
`,Mg=`{YYYY}`,Ng=jg+Mg,Pg=`{M}/{D}`,Fg=jg+Pg,Ig=Fg+`/{YY}`,Lg=`{aa}`,Rg=`{h}:{mm}`+Lg,zg=jg+Rg,Bg=`:{ss}`,Vg=null;functi)RADPAGE"
R"RADPAGE(on Hg(e){let t=e*1e3,n=t*60,r=n*60,i=r*24,a=i*30,o=i*365,s=(e==1?Gh(10,0,3,Eg).filter(Tg):Gh(10,-3,0,Eg)).concat([t,t*5,t*10,t*15,t*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,i,i*2,i*3,i*4,i*5,i*6,i*7,i*8,i*9,i*10,i*15,a,a*2,a*3,a*4,a*6,o,o*2,o*5,o*10,o*25,o*50,o*100]),c=[[o,Mg,Vg,Vg,Vg,Vg,Vg,Vg,1],[i*28,`{MMM}`,Ng,Vg,Vg,Vg,Vg,Vg,1],[i,Pg,Ng,Vg,Vg,Vg,Vg,Vg,1],[r,`{h}`+Lg,Ig,Vg,Fg,Vg,Vg,Vg,1],[n,Rg,Ig,Vg,Fg,Vg,Vg,Vg,1],[t,Bg,Ig+` `+Rg,Vg,Fg+` `+Rg,Vg,zg,Vg,1],[e,Bg+`.{fff}`,Ig+` `+Rg,Vg,Fg+` `+Rg,Vg,zg,Vg,1]];function l(t){return(s,c,l,u,d,f)=>{let p=[],m=d>=o,h=d>=a&&d<o,g=t(l),_=Hh(g*e,3),v=Qg(g.getFullYear(),m?0:g.getMonth(),h||m?1:g.getDate()),y=Hh(v*e,3);if(h||m){let n=h?d/a:0,r=m?d/o:0,i=_==y?_:Hh(Qg(v.getFullYear()+r,v.getMonth()+n,1)*e,3),s=new Date(gh(i/e)),c=s.getFullYear(),l=s.getMonth();for(let a=0;i<=u;a++){let o=Qg(c+r*a,l+n*a,1),s=o-t(Hh(o*e,3));i=Hh((+o+s)*e,3),i<=u&&p.push(i)}}else{let a=d>=i?i:d,o=y+(hh(l)-hh(_))+Bh(_-y,a);p.push(o);let m=t(o),h=m.getHours()+m.getMinutes()/n+m.getSeconds()/r,g=d/r,v=f/s.axes[c]._space;for(;o=Hh(o+d,e==1?0:3),!(o>u);)if(g>1){let e=hh(Hh(h+g,6))%24,n=t(o).getHours()-e;n>1&&(n=-1),o-=n*r,h=(h+g)%24;let i=p[p.length-1];Hh((o-i)/d,3)*v>=.7&&p.push(o)}else p.push(o)}return p}}return[s,c,l]}var[Ug,Wg,Gg]=Hg(1),[Kg,qg,Jg]=Hg(.001);Gh(2,-53,53,[1]);function Yg(e,t){return e.map(e=>e.map((n,r)=>r==0||r==8||n==null?n:t(r==1||e[8]==0?n:e[1]+n)))}function Xg(e,t){return(n,r,i,a,o)=>{let s=t.find(e=>o>=e[0])||t[t.length-1],c,l,u,d,f,p;return r.map(t=>{let n=e(t),r=n.getFullYear(),i=n.getMonth(),a=n.getDate(),o=n.getHours(),m=n.getMinutes(),h=n.getSeconds(),g=r!=c&&s[2]||i!=l&&s[3]||a!=u&&s[4]||o!=d&&s[5]||m!=f&&s[6]||h!=p&&s[7]||s[1];return c=r,l=i,u=a,d=o,f=m,p=h,g(n)})}}function Zg(e,t){let n=Sg(t);return(t,r,i,a,o)=>r.map(t=>n(e(t)))}function Qg(e,t,n){return new Date(e,t,n)}function $g(e,t){return t(e)}var e_=`{YYYY}-{MM}-{DD} {h}:{mm}{aa}`;function t_(e,t){return(n,r,i,a)=>a==null?wm:t(e(r))}function n_(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null}function r_(e,t){return e.series[t].fill(e,t)}var i_={show:!0,live:!0,isolate:!1,mount:jh,markers:{show:!0,width:2,stroke:n_,fill:r_,dash:`solid`},idx:null,idxs:null,values:[]};function a_(e,t){let n=e.cursor.points,r=Im(),i=n.size(e,t);Pm(r,om,i),Pm(r,sm,i);let a=i/-2;Pm(r,`marginLeft`,a),Pm(r,`marginTop`,a);let o=n.width(e,t,i);return o&&Pm(r,`borderWidth`,o),r}function o_(e,t){let n=e.series[t].points;return n._fill||n._stroke}function s_(e,t){let n=e.series[t].points;return n._stroke||n._fill}function c_(e,t){return e.series[t].points.size}var l_=[0,0];function u_(e,t,n){return l_[0]=t,l_[1]=n,l_}function d_(e,t,n,r=!0){return e=>{e.button!=0||r&&e.target!=t||n(e)}}function f_(e,t,n,r=!0){return e=>{r&&e.target!=t||n(e)}}var p_={show:!0,x:!0,y:!0,lock:!1,move:u_,points:{one:!1,show:a_,size:c_,width:0,stroke:s_,fill:o_},bind:{mousedown:d_,mouseup:d_,click:d_,dblclick:d_,mousemove:f_,mouseleave:f_,mouseenter:f_},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,i)=>r-i,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},m_={show:!0,stroke:`rgba(0,0,0,0.07)`,width:2},h_=ig({},m_,{filter:Nh}),g_=ig({},h_,{size:10}),__=ig({},m_,{show:!1}),v_=`12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,y_=`bold `+v_,b_=1.5,x_={show:!0,scale:`x`,stroke:fm,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:y_,side:2,grid:h_,ticks:g_,border:__,font:v_,lineGap:b_,rotate:0},S_=`Value`,C_=`Time`,w_={show:!0,scale:`x`,auto:!1,sorted:1,min:Eh,max:-1/0,idxs:[]};function T_(e,t,n,r,i){return t.map(e=>e==null?``:dh(e))}function E_(e,t,n,r,i,a,o){let s=[],c=Uh.get(i)||0;n=o?n:Hh(Bh(n,i),c);for(let e=n;e<=r;e=Hh(e+i,c))s.push(Object.is(e,-0)?0:e);return s}function D_(e,t,n,r,i,a,o){let s=[],c=e.scales[e.axes[t].scale].log;i=bh(c,hh((c==10?Sh:Ch)(n))),c==10&&(i=Ag[qm(i,Ag)]);let l=n,u=i*c;c==10&&(u=Ag[qm(u,Ag)]);do s.push(l),l+=i,c==10&&!Uh.has(l)&&(l=Hh(l,Uh.get(i))),l>=u&&(i=l,u=i*c,c==10&&(u=Ag[qm(u,Ag)]));while(l<=r);return s}function O_(e,t,n,r,i,a,o){let s=e.scales[e.axes[t].scale].asinh,c=r>s?D_(e,t,yh(s,n),r,i):[s],l=r>=0&&n<=0?[0]:[];return(n<-s?D_(e,t,yh(s,-r),-n,i):[s]).reverse().map(e=>-e).concat(l,c)}var k_=/./,A_=/[12357]/,j_=/[125]/,M_=/1/,N_=(e,t,n,r)=>e.map((e,i)=>t==4&&e==0||i%r==0&&n.test(e.toExponential()[+(e<0)])?e:null);function P_(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=e.scales[o],c=e.valToPos,l=a._space,u=c(10,o),d=c(9,o)-u>=l?k_:c(7,o)-u>=l?A_:c(5,o)-u>=l?j_:M_;if(d==M_){let e=mh(c(1,o)-u);if(e<l)return N_(t.slice().reverse(),s.distr,d,_h(l/e)).reverse()}return N_(t,s.distr,d,1)}function F_(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=a._space,c=e.valToPos,l=mh(c(1,o)-Line truncated
R"RADPAGE(r,o,a)},F=sh(e.bands,qh).find(e=>e.series[0]==t),I=F==null?0:F.dir,L=m.fillTo(e,t,m.min,m.max,I),R=T(b(L,v,w,S)),z,B,V,ee=C,H=T(m.width*km),te=!1,ne=null,U=null,re=null,W=null;d!=null&&(H==0||f!=null)&&(te=!0,ne=d.values(e,t,i,p),U=new Map,new Set(ne).forEach(e=>{e!=null&&U.set(e,new Path2D)}),H>0&&(re=f.values(e,t,i,p),W=new Map,new Set(re).forEach(e=>{e!=null&&W.set(e,new Path2D)})));let{x0:ie,size:ae}=l;if(ie!=null&&ae!=null){E=1,h=ie.values(e,t,i,p),ie.unit==2&&(h=h.map(t=>e.posToVal(x+t*C,_.key,!0)));let n=ae.values(e,t,i,p);B=ae.unit==2?n[0]*C:y(n[0],_,C,x)-y(0,_,C,x),ee=Sv(h,g,y,_,C,x,ee),V=ee-B+D}else ee=Sv(h,g,y,_,C,x,ee),V=ee*o+D,B=ee-V;V<1&&(V=0),H>=B/2&&(H=0),V<5&&(T=Mh);let G=V>0,oe=ee-V-(G?H:0);B=T(Oh(oe,k,O)),z=(E==0?B/2:E==M?0:B)-E*M*((E==0?D/2:0)+(G?H/2:0));let se={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},ce=te?null:new Path2D,le=null;if(F!=null)le=e.data[F.series[1]];else{let{y0:n,y1:r}=l;n!=null&&r!=null&&(g=r.values(e,t,i,p),le=n.values(e,t,i,p))}let ue=A*B,de=j*B;for(let n=M==1?i:p;n>=i&&n<=p;n+=M){let r=g[n];if(r==null)continue;if(le!=null){let e=le[n]??0;if(r-e==0)continue;R=b(e,v,w,S)}let i=y(_.distr!=2||l!=null?h[n]:n,_,C,x),a=b(sh(r,L),v,w,S),o=T(i-z),s=T(yh(a,R)),c=T(vh(a,R)),u=s-c;if(r!=null){let i=r<0?de:ue,a=r<0?ue:de;te?(H>0&&re[n]!=null&&N(W.get(re[n]),o,c+hh(H/2),B,yh(0,u-H),i,a),ne[n]!=null&&N(U.get(ne[n]),o,c+hh(H/2),B,yh(0,u-H),i,a)):N(ce,o,c+hh(H/2),B,yh(0,u-H),i,a),P(e,t,n,o-H/2,c,B+H,u)}}return H>0?se.stroke=te?W:ce:te||(se._fill=m.width==0?m._fill:m._stroke??m._fill,se.width=0),se.fill=te?U:ce,se})}function wv(e,t){let n=sh(t?.alignGaps,0);return(t,r,i,a)=>Z_(t,r,(o,s,c,l,u,d,f,p,m,h,g)=>{[i,a]=Zm(c,i,a);let _=o.pxRound,v=e=>_(d(e,l,h,p)),y=e=>_(f(e,u,g,m)),b,x,S;l.ori==0?(b=ov,S=cv,x=mv):(b=sv,S=lv,x=hv);let C=l.dir*(l.ori==0?1:-1),w=v(s[C==1?i:a]),T=w,E=[],D=[];for(let e=C==1?i:a;e>=i&&e<=a;e+=C)if(c[e]!=null){let t=s[e],n=v(t);E.push(T=n),D.push(y(c[e]))}let O={stroke:e(E,D,b,S,x,_),fill:null,clip:null,band:null,gaps:null,flags:Y_},k=O.stroke,[A,j]=Q_(t,r);if(o.fill!=null||A!=0){let e=O.fill=new Path2D(k),n=y(o.fillTo(t,r,o.min,o.max,A));S(e,T,n),S(e,w,n)}if(!o.spanGaps){let e=[];e.push(...rv(s,c,i,a,C,v,n)),O.gaps=e=o.gaps(t,r,i,a,e),O.clip=tv(e,l.ori,p,m,h,g)}return j!=0&&(O.band=j==2?[ev(t,r,i,a,k,-1),ev(t,r,i,a,k,1)]:ev(t,r,i,a,k,j)),O})}function Tv(e){return wv(Ev,e)}function Ev(e,t,n,r,i,a){let o=e.length;if(o<2)return null;let s=new Path2D;if(n(s,e[0],t[0]),o==2)r(s,e[1],t[1]);else{let n=Array(o),r=Array(o-1),a=Array(o-1),c=Array(o-1);for(let n=0;n<o-1;n++)a[n]=t[n+1]-t[n],c[n]=e[n+1]-e[n],r[n]=a[n]/c[n];n[0]=r[0];for(let e=1;e<o-1;e++)r[e]===0||r[e-1]===0||r[e-1]>0!=r[e]>0?n[e]=0:(n[e]=3*(c[e-1]+c[e])/((2*c[e]+c[e-1])/r[e-1]+(c[e]+2*c[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[o-1]=r[o-2];for(let r=0;r<o-1;r++)i(s,e[r]+c[r]/3,t[r]+n[r]*c[r]/3,e[r+1]-c[r]/3,t[r+1]-n[r+1]*c[r]/3,e[r+1],t[r+1])}return s}var Dv=new Set;function Ov(){for(let e of Dv)e.syncRect(!0)}Tm&&(Gm(bm,Dm,Ov),Gm(xm,Dm,Ov,!0),Gm(Cm,Dm,()=>{Wv.pxRatio=km}));var kv=bv(),Av=gv();function jv(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((e,r)=>Nv(e,r,t,n))}function Mv(e,t){return e.map((e,n)=>n==0?{}:ig({},t,e))}function Nv(e,t,n,r){return ig({},t==0?n:r,e)}function Pv(e,t,n){return t==null?Jh:[t,n]}var Fv=Pv;function Iv(e,t,n){return t==null?Jh:oh(t,n,nh,!0)}function Lv(e,t,n,r){return t==null?Jh:eh(t,n,e.scales[r].log,!1)}var Rv=Lv;function zv(e,t,n,r){return t==null?Jh:th(t,n,e.scales[r].log,!1)}var Bv=zv;function Vv(e,t,n,r,i){let a=yh(Dh(e),Dh(t)),o=t-e,s=qm(i/r*o,n);do{let e=n[s],t=r*e/o;if(t>=i&&a+(e<5?Uh.get(e):0)<=17)return[e,t]}while(++s<n.length);return[0,0]}function Hv(e){let t,n;return e=e.replace(/(\d+)px/,(e,r)=>(t=gh((n=+r)*km))+`px`),[e,t,n]}function Uv(e){e.show&&[e.font,e.labelFont].forEach(e=>{let t=Hh(e[2]*km,1);e[0]=e[0].replace(/[0-9.]+px/,t+`px`),e[1]=t})}function Wv(e,t,n){let r={mode:sh(e.mode,1)},i=r.mode;function a(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?1-i:i)}function o(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?i:1-i)}function s(e,t,n,r){return t.ori==0?a(e,t,n,r):o(e,t,n,r)}r.valToPosH=a,r.valToPosV=o;let c=!1;r.status=0;let l=r.root=Im(Bp);if(e.id!=null&&(l.id=e.id),Mm(l,e.class),e.title){let t=Im(Up,l);t.textContent=e.title}let u=Fm(`canvas`),d=r.ctx=u.getContext(`2d`),f=Im(Wp,l);Gm(`click`,f,e=>{e.target===m&&(Zt!=qt||Qt!=Jt)&&en.click(r,e)},!0);let p=r.under=Im(Gp,f);f.appendChild(u);let m=r.over=Im(Kp,f);e=rg(e);let h=+sh(e.pxAlign,1),g=iv(h);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(r,e)||e)});let _=e.ms||.001,v=r.series=i==1?jv(e.series||[],w_,U_,!1):Mv(e.series||[null],H_),y=r.axes=jv(e.axes||[],x_,L_,!0),b=r.scales={},x=r.bands=e.bands||[];x.forEach(e=>{e.fill=Ah(e.fill||null),e.dir=sh(e.dir,-1)});let S=i==2?v[1].facets[0].scale:v[0].scale,C={axes:Mt,series:xt},w=(e.drawOrder||[`axes`,`series`]).map(e=>C[e]);function T(e){let t=e.distr==3?t=>Sh(t>0?t:e.clamp(r,t,e.min,e.Line truncated
R"RADPAGE(urn c==0&&(s||a)&&(l=t==0&&!i||t==2&&!o?gh(x_.size/3):0),c==1&&(i||o)&&(l=t==1&&!a||t==3&&!s?gh(L_.size/2):0),l}let Xe=r.padding=(e.padding||[Ye,Ye,Ye,Ye]).map(e=>Ah(sh(e,Ye))),Ze=r._padding=Xe.map((e,t)=>e(r,t,Je,0)),Qe,$e=null,et=null,tt=i==1?v[0].idxs:null,nt=null,rt=!1;function it(e,n){if(t=e??[],r.data=r._data=t,i==2){Qe=0;for(let e=1;e<v.length;e++)Qe+=t[e][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),nt=t[0],Qe=nt.length;let e=t;if(O==2){e=t.slice();let n=e[0]=Array(Qe);for(let e=0;e<Qe;e++)n[e]=e}r._data=t=e}if(Nt(!0),Gn(`setData`),O==2&&(Ee=!0),n!==!1){let e=D;e.auto(r,rt)?at():cn(S,e.min,e.max),De||=z.left>=0,ke=!0,Rt()}}r.setData=it;function at(){rt=!0;let e,n;i==1&&(Qe>0?($e=tt[0]=0,et=tt[1]=Qe-1,e=t[0][$e],n=t[0][et],O==2?(e=$e,n=et):e==n&&(O==3?[e,n]=eh(e,e,D.log,!1):O==4?[e,n]=th(e,e,D.log,!1):D.time?n=e+gh(86400/_):[e,n]=oh(e,n,nh,!0))):($e=tt[0]=e=null,et=tt[1]=n=null)),cn(S,e,n)}let ot,st,ct,lt,ut,dt,ft,Y,pt,mt;function ht(e,t,n,r,i,a){e??=pm,n??=qh,r??=`butt`,i??=pm,a??=`round`,e!=ot&&(d.strokeStyle=ot=e),i!=st&&(d.fillStyle=st=i),t!=ct&&(d.lineWidth=ct=t),a!=ut&&(d.lineJoin=ut=a),r!=dt&&(d.lineCap=dt=r),n!=lt&&d.setLineDash(lt=n)}function gt(e,t,n,r){t!=st&&(d.fillStyle=st=t),e!=ft&&(d.font=ft=e),n!=Y&&(d.textAlign=Y=n),r!=pt&&(d.textBaseline=pt=r)}function _t(e,t,n,i,a=0){if(i.length>0&&e.auto(r,rt)&&(t==null||t.min==null)){let t=sh($e,0),r=sh(et,i.length-1),o=n.min==null?$m(i,t,r,a,e.distr==3):[n.min,n.max];e.min=vh(e.min,n.min=o[0]),e.max=yh(e.max,n.max=o[1])}}let vt={min:null,max:null};function yt(){for(let e in b){let t=b[e];j[e]==null&&(t.min==null||j[S]!=null&&t.auto(r,rt))&&(j[e]=vt)}for(let e in b){let t=b[e];j[e]==null&&t.from!=null&&j[t.from]!=null&&(j[e]=vt)}j[S]!=null&&Nt(!0);let e={};for(let t in j){let n=j[t];if(n!=null){let a=e[t]=rg(b[t],eg);if(n.min!=null)ig(a,n);else if(t!=S||i==2){if(Qe==0&&a.from==null){let e=a.range(r,null,null,t);a.min=e[0],a.max=e[1]}else a.min=Eh,a.max=-1/0}}}if(Qe>0){v.forEach((n,a)=>{if(i==1){let i=n.scale,o=j[i];if(o==null)return;let s=e[i];if(a==0){let e=s.range(r,s.min,s.max,i);s.min=e[0],s.max=e[1],$e=qm(s.min,t[0]),et=qm(s.max,t[0]),et-$e>1&&(t[0][$e]<s.min&&$e++,t[0][et]>s.max&&et--),n.min=nt[$e],n.max=nt[et]}else n.show&&n.auto&&_t(s,o,n,t[a],n.sorted);n.idxs[0]=$e,n.idxs[1]=et}else if(a>0&&n.show&&n.auto){let[r,i]=n.facets,o=r.scale,s=i.scale,[c,l]=t[a],u=e[o],d=e[s];u!=null&&_t(u,j[o],r,c,r.sorted),d!=null&&_t(d,j[s],i,l,i.sorted),n.min=i.min,n.max=i.max}});for(let t in e){let n=e[t],i=j[t];if(n.from==null&&(i==null||i.min==null)){let e=n.range(r,n.min==Eh?null:n.min,n.max==-1/0?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(n.from!=null){let i=e[n.from];if(i.min==null)n.min=n.max=null;else{let e=n.range(r,i.min,i.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],i=b[t];if(i.min!=r.min||i.max!=r.max){i.min=r.min,i.max=r.max;let e=i.distr;i._min=e==3?Sh(i.min):e==4?Th(i.min,i.asinh):e==100?i.fwd(i.min):i.min,i._max=e==3?Sh(i.max):e==4?Th(i.max,i.asinh):e==100?i.fwd(i.max):i.max,n[t]=a=!0}}if(a){v.forEach((e,t)=>{i==2?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)});for(let e in n)Ee=!0,Gn(`setScale`,e);V&&z.left>=0&&(De=ke=!0)}for(let e in j)j[e]=null}function bt(e){let t=Oh($e-1,0,Qe-1),n=Oh(et+1,0,Qe-1);for(;e[t]==null&&t>0;)t--;for(;e[n]==null&&n<Qe-1;)n++;return[t,n]}function xt(){if(Qe>0){let e=v.some(e=>e._focus)&&mt!=Re.alpha;e&&(d.globalAlpha=mt=Re.alpha),v.forEach((e,n)=>{if(n>0&&e.show&&(St(n,!1),St(n,!0),e._paths==null)){let a=mt;mt!=e.alpha&&(d.globalAlpha=mt=e.alpha);let o=i==2?[0,t[n][0].length-1]:bt(t[n]);e._paths=e.paths(r,n,o[0],o[1]),mt!=a&&(d.globalAlpha=mt=a)}}),v.forEach((e,t)=>{if(t>0&&e.show){let n=mt;mt!=e.alpha&&(d.globalAlpha=mt=e.alpha),e._paths!=null&&Ct(t,!1);{let n=e._paths==null?null:e._paths.gaps,i=e.points.show(r,t,$e,et,n),a=e.points.filter(r,t,i,n);(i||a)&&(e.points._paths=e.points.paths(r,t,$e,et,a),Ct(t,!0))}mt!=n&&(d.globalAlpha=mt=n),Gn(`drawSeries`,t)}}),e&&(d.globalAlpha=mt=1)}}function St(e,t){let n=t?v[e].points:v[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function Ct(e,t){let n=t?v[e].points:v[e],{stroke:r,fill:i,clip:a,flags:o,_stroke:s=n._stroke,_fill:c=n._fill,_width:l=n.width}=n._paths;l=Hh(l*km,3);let u=null,f=l%2/2;t&&c==null&&(c=l>0?`#fff`:s);let p=n.pxAlign==1&&f>0;if(p&&d.translate(f,f),!t){let e=be-l/2,t=xe-l/2,n=Se+l,r=Ce+l;u=new Path2D,u.rect(e,t,n,r)}t?Tt(s,l,n.dash,n.cap,c,r,i,o,a):wt(e,s,l,n.dash,n.cap,c,r,i,o,u,a),p&&d.translate(-f,-f)}function wt(e,n,i,a,o,s,c,l,u,d,f){let p=!1;u!=0&&x.forEach((m,h)=>{if(m.series[0]==e){let e=v[m.series[1]],g=t[m.series[1]],_=(e._paths||Kh).band;Yh(_)&&(_=m.dir==1?_[0]:_[1]);let y,b=null;e.show&&_&&ch(g,$e,et)?(b=m.fill(r,h)||s,y=e._paths.clip):_=null,Tt(n,i,a,o,b,c,l,u,d,f,y,_),p=!0}}),p||Tt(n,i,a,o,s,c,l,u,d,f)}function Tt(e,t,n,r,i,a,o,s,c,l,u,f){ht(e,t,n,r,i),(c||l||f)&&(d.save(),c&&d.clip(c),l&&d.clip(l)),f?(s&3)==3?(d.clip(f),u&&d.clip(u),Dt(i,o),Et(e,a,t)):s&X_?(Dt(Line truncated
`)==-1?[t]:t.split(/\n/gm);for(let e=0;e<n.length;e++){let t=n[e];D?(d.save(),d.translate(a,o+e*j),d.rotate(D),d.fillText(t,0,0),d.restore()):d.fillText(t,a,o+e*j)}}}S.show&&kt(M,S.filter(r,v,e,f,x),i,n,O,T,Hh(S.width*km,3),S.stroke(r,e),S.dash,S.cap);let P=t.grid;P.show&&kt(M,P.filter(r,v,e,f,x),i,i==0?2:1,i==0?xe:be,i==0?Ce:Se,Hh(P.width*km,3),P.stroke(r,e),P.dash,P.cap),C.show&&kt([O],[1],+(i==0),i==0?1:2,i==1?xe:be,i==1?Ce:Se,Hh(C.width*km,3),C.stroke(r,e),C.dash,C.cap)}Gn(`drawAxes`)}function Nt(e){v.forEach((t,n)=>{n>0&&(t._paths=null,e&&(i==1?(t.min=null,t.max=null):t.facets.forEach(e=>{e.min=null,e.max=null})))})}let Pt=!1,Ft=!1,It=[];function Lt(){Ft=!1;for(let e=0;e<It.length;e++)Gn(...It[e]);It.length=0}function Rt(){Pt||=(ug(Bt),!0)}function zt(e,t=!1){Pt=!0,Ft=t,e(r),Bt(),t&&It.length>0&&queueMicrotask(Lt)}r.batch=zt;function Bt(){if(we&&=(yt(),!1),Ee&&=(Me(),!1),Te){if(Pm(p,um,me),Pm(p,cm,he),Pm(p,om,K),Pm(p,sm,q),Pm(m,um,me),Pm(m,cm,he),Pm(m,om,K),Pm(m,sm,q),Pm(f,om,fe),Pm(f,sm,pe),u.width=gh(fe*km),u.height=gh(pe*km),y.forEach(({_el:e,_show:t,_size:n,_pos:r,side:i})=>{if(e!=null){if(t){let t=i===3||i===0?n:0,a=i%2==1;Pm(e,a?`left`:`top`,r-t),Pm(e,a?`width`:`height`,n),Pm(e,a?`top`:`left`,a?he:me),Pm(e,a?`height`:`width`,a?q:K),Nm(e,Jp)}else Mm(e,Jp)}}),ot=st=ct=ut=dt=ft=Y=pt=lt=null,mt=1,kn(!0),me!=ge||he!=_e||K!=ve||q!=ye){Nt(!1);let e=K/ve,t=q/ye;if(V&&!De&&z.left>=0){z.left*=e,z.top*=t,Wt&&Rm(Wt,gh(z.left),0,K,q),Gt&&Rm(Gt,0,gh(z.top),K,q);for(let n=0;n<Ve.length;n++){let r=Ve[n];r!=null&&(He[n]*=e,Ue[n]*=t,Rm(r,_h(He[n]),_h(Ue[n]),K,q))}}if(rn.show&&!Oe&&rn.left>=0&&rn.width>0){rn.left*=e,rn.width*=e,rn.top*=t,rn.height*=t;for(let e in Mn)Pm(an,e,rn[e])}ge=me,_e=he,ve=K,ye=q}Gn(`setSize`),Te=!1}fe>0&&pe>0&&(d.clearRect(0,0,u.width,u.height),Gn(`drawClear`),w.forEach(e=>e()),Gn(`draw`)),rn.show&&Oe&&(on(rn),Oe=!1),V&&De&&(Dn(null,!0,!1),De=!1),R.show&&R.live&&ke&&(Tn(),ke=!1),c||(c=!0,r.status=1,Gn(`ready`)),rt=!1,Pt=!1}r.redraw=(e,t)=>{Ee=t||!1,e===!1?Rt():cn(S,D.min,D.max)};function Vt(e,n){let i=b[e];if(i.from==null){if(Qe==0){let t=i.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Qe>1&&n.min!=null&&n.max!=null&&n.max-n.min<1e-16)return;e==S&&i.distr==2&&Qe>0&&(n.min=qm(n.min,t[0]),n.max=qm(n.max,t[0]),n.min==n.max&&n.max++),j[e]=n,we=!0,Rt()}}r.setScale=Vt;let Ht,Ut,Wt,Gt,X,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t=!1,en=z.drag,tn=en.x,nn=en.y;V&&(z.x&&(Ht=Im(Xp,m)),z.y&&(Ut=Im(Zp,m)),D.ori==0?(Wt=Ht,Gt=Ut):(Wt=Ut,Gt=Ht),Zt=z.left,Qt=z.top);let rn=r.select=ig({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),an=rn.show?Im(Yp,rn.over?m:p):null;function on(e,t){if(rn.show){for(let t in e)rn[t]=e[t],t in Mn&&Pm(an,t,e[t]);t!==!1&&Gn(`setSelect`)}}r.setSelect=on;function sn(e){if(v[e].show)B&&Nm(U[e],Jp);else if(B&&Mm(U[e],Jp),V){let t=Be?Ve[0]:Ve[e];t!=null&&Rm(t,-10,-10,K,q)}}function cn(e,t,n){Vt(e,{min:t,max:n})}function ln(e,t,n,a){t.focus!=null&&_n(e),t.show!=null&&v.forEach((n,r)=>{r>0&&(e==r||e==null)&&(n.show=t.show,sn(r),i==2?(cn(n.facets[0].scale,null,null),cn(n.facets[1].scale,null,null)):cn(n.scale,null,null),Rt())}),n!==!1&&Gn(`setSeries`,e,t),a&&Xn(`setSeries`,r,e,t)}r.setSeries=ln;function un(e,t){ig(x[e],t)}function dn(e,t){e.fill=Ah(e.fill||null),e.dir=sh(e.dir,-1),t??=x.length,x.splice(t,0,e)}function fn(e){e==null?x.length=0:x.splice(e,1)}r.addBand=dn,r.setBand=un,r.delBand=fn;function Z(e,t){v[e].alpha=t,V&&Ve[e]!=null&&(Ve[e].style.opacity=t),B&&U[e]&&(U[e].style.opacity=t)}let pn,mn,hn,gn={focus:!0};function _n(e){if(e!=hn){let t=e==null,n=Re.alpha!=1;v.forEach((r,a)=>{if(i==1||a>0){let i=t||a==0||a==e;r._focus=t?null:i,n&&Z(a,i?1:Re.alpha)}}),hn=e,n&&Rt()}}B&&ze&&ue(vm,H,e=>{z._lock||(Ie(e),hn!=null&&ln(null,gn,!0,qn.setSeries))});function vn(e,t,n){let r=b[t];n&&(e=e/km-(r.ori==1?he:me));let i=K;r.ori==1&&(i=q,e=i-e),r.dir==-1&&(e=i-e);let a=r._min,o=r._max,s=e/i,c=a+(o-a)*s,l=r.distr;return l==3?bh(10,c):l==4?wh(c,r.asinh):l==100?r.bwd(c):c}function yn(e,n){return qm(vn(e,S,n),t[0],$e,et)}r.valToIdx=e=>qm(e,t[0]),r.posToIdx=yn,r.posToVal=vn,r.valToPos=(e,t,n)=>b[t].ori==0?a(e,b[t],n?Se:K,n?be:0):o(e,b[t],n?Ce:q,n?xe:0),r.setCursor=(e,t,n)=>{Zt=e.left,Qt=e.top,Dn(null,t,n)};function bn(e,t){Pm(an,um,rn.left=e),Pm(an,om,rn.width=t)}function xn(e,t){Pm(an,cm,rn.top=e),Pm(an,sm,rn.height=t)}let Sn=D.ori==0?bn:xn,Cn=D.ori==1?bn:xn;function wn(){if(B&&R.live)for(let e=+(i==2);e<v.length;e++){if(e==0&&ie)continue;let t=R.values[e],n=0;for(let r in t)re[e][n++].firstChild.nodeValue=t[r]}}function Tn(e,t){if(e!=null&&(e.idxs?e.idxs.fo)RADPAGE"
R"RADPAGE(rEach((e,t)=>{L[t]=e}):Zh(e.idx)||L.fill(e.idx),R.idx=L[0]),B&&R.live){for(let e=0;e<v.length;e++)(e>0||i==1&&!ie)&&En(e,L[e]);wn()}ke=!1,t!==!1&&Gn(`setLegend`)}r.setLegend=Tn;function En(e,n){let i=v[e],a=e==0&&O==2?nt:t[e],o;ie?o=i.values(r,e,n)??ae:(o=i.value(r,n==null?null:a[n],e,n),o=o==null?ae:{_:o}),R.values[e]=o}function Dn(e,n,a){Yt=Zt,Xt=Qt,[Zt,Qt]=z.move(r,Zt,Qt),z.left=Zt,z.top=Qt,V&&(Wt&&Rm(Wt,gh(Zt),0,K,q),Gt&&Rm(Gt,0,gh(Qt),K,q));let o,s=$e>et;pn=Eh,mn=null;let c=D.ori==0?K:q,l=D.ori==1?K:q;if(Zt<0||Qe==0||s){o=z.idx=null;for(let e=0;e<v.length;e++){let t=Ve[e];t!=null&&Rm(t,-10,-10,K,q)}ze&&ln(null,gn,!0,e==null&&qn.setSeries),R.live&&(L.fill(o),ke=!0)}else{let e,n,a;i==1&&(e=D.ori==0?Zt:Qt,n=vn(e,S),o=z.idx=qm(n,t[0],$e,et),a=k(t[0][o],D,c,0));let s=-10,u=-10,d=0,f=0,p=!0,m=``,h=``;for(let e=+(i==2);e<v.length;e++){let g=v[e],_=L[e],y=_==null?null:i==1?t[e][_]:t[e][1][_],x=z.dataIdx(r,e,o,n),S=x==null?null:i==1?t[e][x]:t[e][1][x];if(ke=ke||S!=y||x!=_,L[e]=x,e>0&&g.show){let n=x==null?-10:x==o?a:k(i==1?t[0][x]:t[e][0][x],D,c,0),_=S==null?-10:A(S,i==1?b[g.scale]:b[g.facets[1].scale],l,0);if(ze&&S!=null){let t=D.ori==1?Zt:Qt,n=mh(Re.dist(r,e,x,_,t));if(n<pn){let r=Re.bias;if(r!=0){let i=vn(t,g.scale),a=S>=0?1:-1,o=i>=0?1:-1;o==a&&(o==1?r==1?S>=i:S<=i:r==1?S<=i:S>=i)&&(pn=n,mn=e)}else pn=n,mn=e}}if(ke||Be){let t,i;D.ori==0?(t=n,i=_):(t=_,i=n);let a,o,c,l,g,v,y=!0,b=Le.bbox;if(b!=null){y=!1;let t=b(r,e);c=t.left,l=t.top,a=t.width,o=t.height}else c=t,l=i,a=o=Le.size(r,e);if(v=Le.fill(r,e),g=Le.stroke(r,e),Be)e==mn&&pn<=Re.prox&&(s=c,u=l,d=a,f=o,p=y,m=v,h=g);else{let t=Ve[e];t!=null&&(He[e]=c,Ue[e]=l,Hm(t,a,o,y),Bm(t,v,g),Rm(t,_h(c),_h(l),K,q))}}}}if(Be){let e=Re.prox;if(ke||(hn==null?pn<=e:pn>e||mn!=hn)){let e=Ve[0];e!=null&&(He[0]=s,Ue[0]=u,Hm(e,d,f,p),Bm(e,m,h),Rm(e,_h(s),_h(u),K,q))}}}if(rn.show&&$t){if(e!=null){let[t,n]=qn.scales,[r,i]=qn.match,[a,o]=e.cursor.sync.scales,s=e.cursor.drag;if(tn=s._x,nn=s._y,tn||nn){let{left:s,top:u,width:d,height:f}=e.select,p=e.scales[a].ori,m=e.posToVal,h,g,_,v,y,x=t!=null&&r(t,a),S=n!=null&&i(n,o);x&&tn?(p==0?(h=s,g=d):(h=u,g=f),_=b[t],v=k(m(h,a),_,c,0),y=k(m(h+g,a),_,c,0),Sn(vh(v,y),mh(y-v))):Sn(0,c),S&&nn?(p==1?(h=s,g=d):(h=u,g=f),_=b[n],v=A(m(h,o),_,l,0),y=A(m(h+g,o),_,l,0),Cn(vh(v,y),mh(y-v))):Cn(0,l)}else Nn()}else{let e=mh(Yt-X),t=mh(Xt-Kt);if(D.ori==1){let n=e;e=t,t=n}tn=en.x&&e>=en.dist,nn=en.y&&t>=en.dist;let n=en.uni;n==null?en.x&&en.y&&(tn||nn)&&(tn=nn=!0):tn&&nn&&(tn=e>=n,nn=t>=n,!tn&&!nn&&(t>e?nn=!0:tn=!0));let r,i;tn&&(D.ori==0?(r=qt,i=Zt):(r=Jt,i=Qt),Sn(vh(r,i),mh(i-r)),nn||Cn(0,l)),nn&&(D.ori==1?(r=qt,i=Zt):(r=Jt,i=Qt),Cn(vh(r,i),mh(i-r)),tn||Sn(0,c)),!tn&&!nn&&(Sn(0,0),Cn(0,0))}}if(en._x=tn,en._y=nn,e==null){if(a){if(Jn!=null){let[e,t]=qn.scales;qn.values[0]=e==null?null:vn(D.ori==0?Zt:Qt,e),qn.values[1]=t==null?null:vn(D.ori==1?Zt:Qt,t)}Xn(mm,r,Zt,Qt,K,q,o)}if(ze){let e=a&&qn.setSeries,t=Re.prox;hn==null?pn<=t&&ln(mn,gn,!0,e):pn>t?ln(null,gn,!0,e):mn!=hn&&ln(mn,gn,!0,e)}}ke&&(R.idx=o,Tn()),n!==!1&&Gn(`setCursor`)}let On=null;Object.defineProperty(r,"rect",{get(){return On??kn(!1),On}});function kn(e=!1){e?On=null:(On=m.getBoundingClientRect(),Gn(`syncRect`,On))}function An(e,t,n,r,i,a,o){z._lock||$t&&e!=null&&e.movementX==0&&e.movementY==0||(jn(e,t,n,r,i,a,o,!1,e!=null),e==null?Dn(t,!0,!1):Dn(null,!0,!0))}function jn(e,t,n,i,a,o,c,l,u){if(On??kn(!1),Ie(e),e!=null)n=e.clientX-On.left,i=e.clientY-On.top;else{if(n<0||i<0){Zt=-10,Qt=-10;return}let[e,r]=qn.scales,c=t.cursor.sync,[l,u]=c.values,[d,f]=c.scales,[p,m]=qn.match,h=t.axes[0].side%2==1,g=D.ori==0?K:q,_=D.ori==1?K:q,v=h?o:a,y=h?a:o,x=h?i:n,S=h?n:i;if(n=d==null?x/v*g:p(e,d)?s(l,b[e],g,0):-10,i=f==null?S/y*_:m(r,f)?s(u,b[r],_,0):-10,D.ori==1){let e=n;n=i,i=e}}u&&(t==null||t.cursor.event.type==mm)&&((n<=1||n>=K-1)&&(n=zh(n,K)),(i<=1||i>=q-1)&&(i=zh(i,q))),l?(X=n,Kt=i,[qt,Jt]=z.move(r,n,i)):(Zt=n,Qt=i)}let Mn={width:0,height:0,left:0,top:0};function Nn(){on(Mn,!1)}let Pn,Fn,In,Ln;function Rn(e,t,n,i,a,o,s){$t=!0,tn=nn=en._x=en._y=!1,jn(e,t,n,i,a,o,s,!0,!1),e!=null&&(ue(gm,Em,zn,!1),Xn(hm,r,qt,Jt,K,q,null));let{left:c,top:l,width:u,height:d}=rn;Pn=c,Fn=l,In=u,Ln=d}function zn(e,t,n,i,a,o,s){$t=en._x=en._y=!1,jn(e,t,n,i,a,o,s,!1,!0);let{left:c,top:l,width:u,height:d}=rn,f=u>0||d>0,p=Pn!=c||Fn!=l||In!=u||Ln!=d;if(f&&p&&on(rn),en.setScale&&f&&p){let e=c,t=u,n=l,r=d;if(D.ori==1&&(e=l,t=d,n=c,r=u),tn&&cn(S,vn(e,S),vn(e+t,S)),nn)for(let e in b){let t=b[e];e!=S&&t.from==null&&t.min!=Eh&&cn(e,vn(n+r,e),vn(n,e))}Nn()}else z.lock&&(z._lock=!z._lock,Dn(t,!0,e!=null));e!=null&&(de(gm,Em),Xn(gm,r,Zt,Qt,K,q,null))}function Bn(e,t,n,r,i,a,o){if(z._lock)return;Ie(e);let s=$t;if($t){let e=!0,t=!0,n,r;D.ori==0?(n=tn,r=nn):(n=nn,r=tn),n&&r&&(e=Zt<=10||Zt>=K-10,t=Qt<=10||Qt>=q-10),n&&e&&(Zt=Zt<qt?0:K),r&&t&&(Qt=Qt<Jt?0:q),Dn(null,!0,!0),$t=!1}Zt=-10,Qt=-10,L.fill(null),Dn(null,!0,!0),s&&($t=s)}function Vn(e,t,n,i,a,o,s){z._lock||(Ie(e),at(),Nn(),e!=null&&Xn(ym,r,Zt,Qt,K,q,null))}function Hn(){y.forEaLine truncated
R"RADPAGE(t`,label:`Decode`,unit:`tok/s`,show:e=>[Tf(e.decode_tps)?ny(e.decode_tps):`–`],lines:ry(`decode`,`tokens a second`),fmt:ny},{id:`step`,kinds:`chat`,label:`Step`,unit:`ms`,show:(e,t)=>{let n=t.last(`step`);return[Tf(n)?n>=100?n.toFixed(0):n.toFixed(2):`–`,(e.step_ns_decode_best??0)>0?`best `+ey(e.step_ns_decode_best/1e6):``]},lines:[{key:`step`,label:`step`,color:1},{key:`stepBest`,label:`best`,dash:!0}],fmt:ey,tight:!0},{id:`prefill`,kinds:`chat`,label:`Prefill`,unit:`tok/s`,show:(e,t)=>{let n=t.last(`prefillRate`);return[Tf(n)?ny(n):`–`]},lines:ry(`prefillRate`,`tokens a second`),fmt:ny,join:!0},{id:`reqs`,kinds:`chat`,always:!0,label:`Requests`,show:(e,t,n)=>[String(e.running??0),(n?`of `+n+` slots`:``)+(e.waiting?` · `+e.waiting+` waiting`:``)],lines:[{key:`running`,label:`running`,color:1},{key:`waiting`,label:`waiting`,color:5},{key:`preempted`,label:`preempted`,color:2}],fmt:e=>$(e),stack:!0,integer:!0},{id:`kv`,kinds:`chat`,label:`KV cache`,show:e=>{let[t,n]=Df(e.kv_bytes_used);return[t,`of `+Ef(e.kv_bytes_total),n]},lines:[{key:`kvRead`,label:`in use`,color:1},{key:`kvKept`,label:`cached for the next turn`,color:4}],fmt:Ef,stack:!0,bytes:!0},{id:`hit`,kinds:`chat`,label:`Prefix cache hits`,unit:`%`,show:e=>[Tf(e.prefix_hit_rate)?Af(e.prefix_hit_rate):`–`],lines:ry(`hit`,`of prompt tokens`),fmt:ty,max:1},{id:`accept`,kinds:`chat`,label:`Acceptance`,unit:`%`,draft:!0,show:(e,t)=>[Af(t.last(`accept`))],lines:ry(`accept`,`of drafted tokens`),fmt:ty,max:1},{id:`tok`,kinds:`chat`,label:`Tokens per step`,draft:!0,show:(e,t)=>{let n=t.last(`tokStep`);return[Tf(n)?n.toFixed(2):`–`]},lines:ry(`tokStep`,`tokens`),fmt:e=>e.toFixed(2),tight:!0},{id:`ethru`,kinds:`embed`,always:!0,label:`Throughput`,unit:`tok/s`,show:e=>[Tf(e.prefill_tps)?ny(e.prefill_tps):`–`],lines:ry(`prefill`,`tokens a second`),fmt:ny},{id:`erate`,kinds:`embed`,always:!0,label:`Inputs`,unit:`/s`,show:(e,t)=>{let n=t.last(`reqRate`);return[Tf(n)?ny(n):`–`]},lines:ry(`reqRate`,`inputs a second`),fmt:ny},{id:`estep`,kinds:`embed`,always:!0,label:`Step`,unit:`ms`,show:(e,t)=>{let n=t.last(`stepAny`);return[Tf(n)?n.toFixed(2):`–`]},lines:ry(`stepAny`,`step`),fmt:ey,tight:!0},{id:`eflight`,kinds:`embed`,always:!0,label:`Active requests`,show:e=>[String(e.in_flight??0)],lines:ry(`flight`,`in flight`),fmt:e=>$(e),integer:!0},{id:`jrun`,kinds:`gen`,always:!0,label:`Running`,show:e=>[String(e.jobs?.running??0)],lines:ry(`jobRun`,`running`),fmt:e=>$(e),integer:!0},{id:`jdone`,kinds:`gen`,always:!0,label:`Completed`,show:e=>[$(e.jobs?.done),e.jobs?.failed?e.jobs.failed+` failed`:``],lines:ry(`jobDone`,`made`),fmt:e=>$(e),integer:!0},{id:`jlast`,kinds:`gen`,always:!0,label:`Last duration`,show:e=>[e.jobs?.done?jf(e.jobs.last_ms/1e3):`–`],lines:ry(`jobTime`,`took`),fmt:e=>jf(e),join:!0},{id:`jmean`,kinds:`gen`,always:!0,label:`Mean`,show:e=>[e.jobs?.done?jf(e.jobs.total_ms/e.jobs.done/1e3):`–`],lines:ry(`jobTime`,`took`),fmt:e=>jf(e),join:!0}],ay=[[`lkAr`,`between accelerators`],[`lkUp`,`host to accelerator`],[`lkDn`,`accelerator to host`],[`lkSsd`,`drive`],[`lkStream`,`streaming`]].map(([e,t],n)=>({key:e,label:t,color:n+1}));function oy({scope:e,kind:t,slots:n,noun:r}){let i=Qf(),[a,o]=(0,_.useState)(null),s=e.live,c=e.series,l=(s?.draft_positions?.length??0)>0,u=e=>e.always||e.lines.some(e=>!e.dash&&(c.col(e.key)??[]).some(e=>(e??0)>0)),d=iy.filter(e=>e.kinds===t&&(!e.draft||l||c.has(e.lines[0].key))&&(s?u(e):!e.draft)),f=d.find(e=>e.id===a)??d[0];if(!f)return(0,W.jsx)(wl,{children:`No data for this model yet`});let p=ay.filter(e=>(c.col(e.key)??[]).some(e=>(e??0)>0)),m=s?.experts;return(0,W.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`div`,{className:`overflow-hidden rounded-xl border bg-card`,children:[(0,W.jsx)(`div`,{role:`tablist`,className:`grid grid-cols-2 border-b sm:grid-cols-4 xl:grid-flow-col xl:auto-cols-fr xl:grid-cols-none`,children:d.map(e=>{let[t,i,a]=s?e.show(s,c,n,r):[`–`],l=e===f;return(0,W.jsxs)(`button`,{role:`tab`,"aria-selected":l,onClick:()=>o(e.id),className:J(`relative -mb-px flex min-w-0 flex-col gap-1 border-r border-b px-4 py-3 text-left transition-colors outline-none last:border-r-0 hover:bg-accent/50 focus-visible:bg-accent/60`,l&&`bg-accent/40`),children:[(0,W.jsx)(`span`,{className:`truncate text-xs font-medium text-muted-foreground`,children:e.id===`jdone`&&r?r:e.label}),(0,W.jsxs)(`span`,{className:`num flex items-baseline gap-1 text-xl leading-none font-semibold tracking-tight`,children:[(0,W.jsx)(`span`,{className:`truncate`,children:t}),(a??e.unit)&&(0,W.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:a??e.unit})]}),(0,W.jsx)(`span`,{className:`min-h-4 truncate text-xs text-muted-foreground`,children:i}),l&&(0,W.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 bg-primary`})]},e.id)})}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[f.lines.length>1&&(0,W.jsx)($v,{lines:f.lines}),(0,W.jsx)(Qv,{data:c,version:eLine truncated
R"RADPAGE(ldren:u.slice(0,r).map(e=>(0,W.jsxs)(Cp,{children:[(0,W.jsx)(Tp,{className:`num pl-4 font-medium`,children:e.id}),(0,W.jsx)(Tp,{className:`num text-right`,children:$(e.prompt)}),(0,W.jsx)(Tp,{className:`num text-right`,children:$(e.out)}),(0,W.jsx)(Tp,{className:`num text-right text-muted-foreground`,children:$(e.ctx)}),(0,W.jsx)(Tp,{className:`num text-right`,children:Tf(e.ttft)?jf(e.ttft):`–`}),(0,W.jsx)(Tp,{className:`num text-right`,children:Tf(e.pf)?kf(e.pf)+` tok/s`:`–`}),(0,W.jsx)(Tp,{className:`num text-right`,children:Tf(e.tps)&&e.tps>0?kf(e.tps)+` tok/s`:`–`}),(0,W.jsx)(Tp,{className:`num pr-4 text-right text-muted-foreground`,children:Nf(e.at,a)})]},e.id+`:`+e.at))})]}),u.length>r&&(0,W.jsx)(`div`,{className:`border-t p-2 text-center`,children:(0,W.jsxs)(zl,{variant:`ghost`,size:`sm`,onClick:()=>i(r+100),children:[`Show `,Math.min(100,u.length-r),` more`]})})]})})]})}var fy=e=>e>=1e3?kf(e/1e3)+`k`:kf(e);function py({pts:e}){if(e.length<2)return(0,W.jsx)(wl,{children:`Available after two finished requests`});let t=e.map(e=>e.x),n=e.map(e=>e.y),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n)*1.08,o=e=>i>r?(Math.log(e)-Math.log(r))/(Math.log(i)-Math.log(r)):.5;return(0,W.jsxs)(`div`,{className:`grid grid-cols-[auto_1fr] gap-x-2 gap-y-1`,children:[(0,W.jsxs)(`div`,{className:`num flex flex-col justify-between text-right text-[11px] text-muted-foreground`,children:[(0,W.jsx)(`span`,{children:kf(a)}),(0,W.jsx)(`span`,{children:kf(a/2)}),(0,W.jsx)(`span`,{children:`0`})]}),(0,W.jsxs)(`div`,{className:`relative h-44 rounded-md border bg-background/40`,children:[(0,W.jsx)(`div`,{className:`absolute inset-x-0 top-1/2 border-t border-dashed border-grid`}),e.map((e,t)=>(0,W.jsxs)(dl,{children:[(0,W.jsx)(fl,{render:(0,W.jsx)(`i`,{className:`absolute size-2 -translate-x-1/2 translate-y-1/2 rounded-full bg-primary/70 ring-1 ring-background hover:bg-primary`,style:{left:2+96*o(e.x)+`%`,bottom:96*e.y/a+`%`}})}),(0,W.jsxs)(pl,{children:[e.r.id,` · `,$(e.x),` tokens of context · `,kf(e.y),` tok/s`]})]},t))]}),(0,W.jsx)(`div`,{}),(0,W.jsxs)(`div`,{className:`num flex justify-between text-[11px] text-muted-foreground`,children:[(0,W.jsx)(`span`,{children:fy(r)}),(0,W.jsx)(`span`,{children:`tokens of context`}),(0,W.jsx)(`span`,{children:fy(i)})]})]})}function my({values:e}){if(e.length<2)return(0,W.jsx)(wl,{children:`Available after two finished requests`});let t=[0,.1,.2,.5,1,2,5,10,30,1/0],n=t.findIndex(t=>t>Math.max(...e)),r=t.slice(0,Math.max(6,n+1)),i=r.slice(0,-1).map((t,n)=>e.filter(e=>e>=t&&e<r[n+1]).length),a=Math.max(...i,1),o=e=>r[e+1]===1/0?`over `+jf(r[e]):`under `+jf(r[e+1]);return(0,W.jsxs)(`div`,{className:`flex h-[12.25rem] flex-col justify-end gap-1.5`,children:[(0,W.jsx)(`div`,{className:`flex flex-1 items-end justify-center gap-1.5`,children:i.map((e,t)=>(0,W.jsxs)(dl,{children:[(0,W.jsx)(fl,{render:(0,W.jsxs)(`div`,{className:`flex h-full max-w-24 flex-1 flex-col justify-end`,children:[(0,W.jsx)(`span`,{className:`num mb-1 text-center text-[11px] text-muted-foreground`,children:e||``}),(0,W.jsx)(`div`,{className:`rounded-sm bg-primary/80`,style:{height:Math.max(e?3:0,82*e/a)+`%`}})]})}),(0,W.jsxs)(pl,{children:[e,` `,e===1?`request`:`requests`,` `,o(t)]})]},t))}),(0,W.jsx)(`div`,{className:`num flex justify-center gap-1.5 border-t pt-1 text-[11px] text-muted-foreground`,children:i.map((e,t)=>(0,W.jsx)(`span`,{className:`max-w-24 flex-1 truncate text-center`,children:r[t+1]===1/0?`> `+jf(r[t]):`< `+jf(r[t+1])},t))})]})}function hy({model:e}){let{data:t,error:n}=wf(Sf(`sessions`,e),5e3);if(!t)return(0,W.jsx)(wl,{children:n??`Loading`});let r=(t.sessions??[]).slice().sort((e,t)=>e.idle_s-t.idle_s),i=(t.linear?.checkpoints_written??0)>0||r.some(e=>e.snapshots>0),a=r.filter(e=>!i||e.resume_tokens>0||e.snapshots>0),o=r.filter(e=>!a.includes(e)),s=e=>i?Math.min(e.resume_tokens||0,e.tokens):e.tokens,[c,l]=Df(t.pool?.bytes_used),[u,d]=Df(t.occupancy?.host_bytes);return(0,W.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,W.jsx)(ml,{label:`Resumable`,value:$(a.length),detail:o.length?`${o.length} will restart`:`cached conversations`}),(0,W.jsx)(ml,{label:`Tokens cached`,value:$(t.pool?.tokens_used),detail:t.pool?`of ${$(t.pool.tokens_total)}`:``}),(0,W.jsx)(ml,{label:`VRAM in use`,value:c,unit:l,detail:t.pool?`of ${Ef(t.pool.bytes_total)}`:``}),t.enabled?(0,W.jsx)(ml,{label:`Host memory in use`,value:u,unit:d,detail:t.occupancy?.host_cap_bytes?`of ${Ef(t.occupancy.host_cap_bytes)}`:``}):(0,W.jsx)(ml,{label:`Prefix cache hits`,value:t.prefix_hit_rate==null?`–`:(t.prefix_hit_rate*100).toFixed(1),unit:`%`,detail:`of prompt tokens reused`})]}),(0,W.jsx)(hl,{title:`Will resume`,description:a.length?`Conversations whose next turn can reuse cached tokens, most recent first`:void 0,flush:a.length>0,children:a.length?(0,W.jsx)(gy,{rows:a,reuse:s}):(0,W.jsx)(wl,{children:`No cached conversations`})}),o.lengLine truncated
R"RADPAGE(0,W.jsx)(Ty,{fleet:n,card:i.card,hueOf:r,data:e.series,version:e.version,range:t},i.card))}),(0,W.jsx)(hl,{title:`State over time`,description:`Each model's state across the time range`,children:(0,W.jsx)(Dy,{models:n.models,data:e.series,version:e.version,range:t})}),(0,W.jsx)(hl,{title:`Models`,flush:!0,children:(0,W.jsxs)(bp,{children:[(0,W.jsx)(xp,{children:(0,W.jsxs)(Cp,{className:`hover:bg-transparent`,children:[(0,W.jsx)(wp,{className:`pl-4`,children:`Model`}),(0,W.jsx)(wp,{children:`State`}),(0,W.jsx)(wp,{className:`text-right`,children:`Priority`}),(0,W.jsx)(wp,{children:`Accelerators`}),(0,W.jsx)(wp,{className:`text-right`,children:`VRAM`}),(0,W.jsx)(wp,{className:`text-right`,children:`Host`}),(0,W.jsx)(wp,{className:`text-right`,children:`Active`}),(0,W.jsx)(wp,{className:`text-right`,children:`Loads`}),(0,W.jsx)(wp,{className:`text-right`,children:`Parks`}),(0,W.jsx)(wp,{className:`pr-4 text-right`,children:`Last load`})]})}),(0,W.jsx)(Sp,{children:n.models.map(e=>(0,W.jsxs)(Cp,{className:`cursor-pointer`,onClick:()=>{location.hash=ip(e.id)},children:[(0,W.jsxs)(Tp,{className:`pl-4`,children:[(0,W.jsxs)(`a`,{href:ip(e.id),className:`flex items-center gap-2 font-medium`,onClick:e=>e.stopPropagation(),children:[(0,W.jsx)(`i`,{className:`size-2 rounded-full`,style:{background:r.get(e.id)}}),e.id]}),(0,W.jsx)(`div`,{className:`mt-0.5 max-w-72 truncate pl-4 text-xs text-muted-foreground`,children:e.error??e.file})]}),(0,W.jsx)(Tp,{children:(0,W.jsx)(bl,{state:e.state,doing:e.doing})}),(0,W.jsxs)(Tp,{className:`num text-right`,children:[$(e.priority),e.pinned?` · pinned`:``]}),(0,W.jsx)(Tp,{className:`num text-muted-foreground`,children:e.cards?.length?e.cards.join(`, `):`–`}),(0,W.jsx)(Tp,{className:`num text-right`,children:Cy(e)>0?Ef(Cy(e)):`–`}),(0,W.jsx)(Tp,{className:`num text-right`,children:(e.host_bytes??0)+(e.host_pinned_bytes??0)>0?Ef((e.host_bytes??0)+(e.host_pinned_bytes??0)):`–`}),(0,W.jsxs)(Tp,{className:`num text-right`,children:[e.in_flight?$(e.in_flight):`–`,e.waiting?` +${e.waiting}`:``]}),(0,W.jsx)(Tp,{className:`num text-right`,children:$(e.loads)}),(0,W.jsx)(Tp,{className:`num text-right`,children:$(e.parks)}),(0,W.jsx)(Tp,{className:`num pr-4 text-right`,children:Tf(e.load_seconds)?jf(e.load_seconds):`–`})]},e.id))})]})})]})}function Ty({fleet:e,card:t,hueOf:n,data:r,version:i,range:a}){let o=e.cards.find(e=>e.card===t),s=e.models.map(e=>({key:e.id,label:e.id,value:Sy(e,t),color:n.get(e.id),text:Ef(Sy(e,t))})),c=(o.vram_bytes??0)-(o.free_bytes??0),l=s.reduce((e,t)=>e+t.value,0),u=Math.max(Math.min(o.queue_bytes??0,c-l),0),d=c-l-u;u>0&&s.push({key:`~queues`,label:`Queues (${o.queues??0} open)`,value:u,color:`var(--idle)`,text:Ef(u)}),d>64<<20&&s.push({key:`~other`,label:`Model buffers and driver`,value:d,color:`var(--muted-foreground)`,text:Ef(d)});let f=e.models.map((e,n)=>({key:`c${t}:${e.id}`,label:e.id,color:n+1}));return(0,W.jsx)(hl,{title:(0,W.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[`Accelerator `,t,(0,W.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:o.name})]}),action:(0,W.jsxs)(`span`,{className:`num text-xs text-muted-foreground`,children:[Ef(o.free_bytes),` free of `,Ef(o.vram_bytes)]}),children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,W.jsx)(xl,{parts:s,total:o.vram_bytes,className:`h-3`}),(0,W.jsx)(Sl,{parts:s,className:`content-start xl:min-h-10`}),(0,W.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,W.jsx)(Ey,{label:`Busy`,value:Tf(o.busy)?Math.round(o.busy*100)+`%`:`–`,data:r,k:`busy${t}`,max:1}),(0,W.jsx)(Ey,{label:`Power`,value:Tf(o.power_w)?Math.round(o.power_w)+` W`:`–`,data:r,k:`power${t}`}),(0,W.jsx)(Ey,{label:`Temperature`,value:Tf(o.temp_c)?Math.round(o.temp_c)+` °C`:`–`,data:r,k:`temp${t}`})]}),(0,W.jsx)(Qv,{data:r,version:i,lines:f,range:a,fmt:Ef,stack:!0,bytes:!0,height:170,max:o.vram_bytes})]})})}function Ey({label:e,value:t,data:n,k:r,max:i}){let a=n.col(r)??[],o=n.firstAfter(n.end-300),s=a.slice(o),c=s.filter(e=>e!==null),l=i??Math.max(1,...c)*1.05,u=i===void 0?Math.min(...c,l)*.9:0,d=s.length,f=``,p=!1;return s.forEach((e,t)=>{e===null?p=!1:(f+=(p?`L`:`M`)+(100*t/Math.max(1,d-1)).toFixed(2)+` `+(27-24*(Math.min(e,l)-u)/Math.max(1e-9,l-u)).toFixed(2),p=!0)}),(0,W.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border bg-background/40 px-3 py-2`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e}),(0,W.jsx)(`div`,{className:`num text-base font-semibold whitespace-nowrap`,children:t})]}),(0,W.jsx)(`svg`,{viewBox:`0 0 100 30`,preserveAspectRatio:`none`,className:`h-8 min-w-0 flex-1 text-primary`,children:(0,W.jsx)(`path`,{d:f,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})})]})}function Dy({models:e,data:t,version:n,range:r}){let i=(0,_.useMemo)(()=>{let n=t.end-r,i=t.firstAfter(n);rLine truncated
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backd)RADPAGE"
R"RADPAGE(rop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@layer theme{:root,:host{--font-sans:"Geist Variable", ui-sans-serif, system-ui, sans-serif;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-snug:1.375;--radius-md:calc(var(--radius) * .8);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Geist Variable", ui-sans-serif, system-ui, sans-serif;--default-mono-font-family:"Geist Mono Variable", ui-monospace, "SF Mono", Menlo, monospace}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--defLine truncated
R"RADPAGE(n-width\){max-width:var(--skeleton-width)}.max-w-14{max-width:calc(var(--spacing) * 14)}.max-w-24{max-width:calc(var(--spacing) * 24)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-80{max-width:calc(var(--spacing) * 80)}.max-w-\[28rem\]{max-width:28rem}.max-w-\[50vw\]{max-width:50vw}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-prose{max-width:65ch}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-12{min-width:calc(var(--spacing) * 12)}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-\[3px\]{min-width:3px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.origin-\(--transform-origin\){transform-origin:var(--transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%-2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[8rem_1fr\]{grid-template-columns:8rem 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.grid-cols-\[minmax\(6rem\,10rem\)_1fr\]{grid-template-columns:minmax(6rem,10rem) 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-\(--card-spacing\){gap:var(--card-spacing)}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-\[--spacing\(var\(--gap\)\)\]{gap:calc(var(--spacing) * var(--gap))}.gap-\[3px\]{gap:3px}.gap-px{gap:1px}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[1px\]{border-radius:1px}.rounded-\[2px\]{border-radius:2px}.rounded-\[min\(var\(--radius-md\)\,10px\)\]{border-radius:min(var(--radius-md), 10px)}.rounded-\[min\(var\(--radius-md\)\,12px\)\]{border-radius:min(var(--radius-md), 12px)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-t-xl{border-top-left-radius:calc(var(--radius) * 1.4);border-top-right-radius:calc(var(--radius) * 1.4)}.rounded-b-xl{border-bottom-right-radius:calc(var(--radius) * 1.4);border-bottom-left-radius:calc(var(--radius) * 1.4)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-background\/60{border-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.boLine truncated
R"RADPAGE(00001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-foreground\/10{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.ring-foreground\/10{--tw-ring-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:Line truncated
R"RADPAGE(:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:-inset-x-3:after{content:var(--tw-content);inset-inline:calc(var(--spacing) * -3)}.after\:-inset-y-2:after{content:var(--tw-content);inset-block:calc(var(--spacing) * -2)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:0}.after\:start-1\/2:after{content:var(--tw-content);inset-inline-start:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}:is(:where(.group)[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full):after{content:var(--tw-content);left:100%}:is(:where(.group\/tabs):where([data-orientation=horizontal]) .group-data-horizontal\/tabs\:after\:inset-x-0):after{content:var(--tw-content);inset-inline:0}:is(:where(.group\/tabs):where([data-orientation=horizontal]) .group-data-horizontal\/tabs\:after\:bottom-\[-5px\]):after{content:var(--tw-content);bottom:-5px}:is(:where(.group\/tabs):where([data-orientation=horizontal]) .group-data-horizontal\/tabs\:after\:h-0\.5):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}:is(:where(.group\/tabs):where([data-orientation=vertical]) .group-data-vertical\/tabs\:after\:inset-y-0):after{content:var(--tw-content);inset-block:0}:is(:where(.group\/tabs):where([data-orientation=vertical]) .group-data-vertical\/tabs\:after\:-right-1):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}:is(:where(.group\/tabs):where([data-orientation=vertical]) .group-data-vertical\/tabs\:after\:w-0\.5):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:color-mix(in oklch,var(--secondary),var(--foreground) 5%)}}.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary:hover,.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_var\(--sidebar-accent\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--sidebar-accent));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:outline:hover{outline-style:var(--tw-outline-style);outline-width:1px}.hover\:outline-foreground:hover{outline-color:var(--foreground)}:is(:where(.group)[data-collapsible=offcanvas] .hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover){background-color:var(--sidebar)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:z-10:focus,.focus-visible\:z-10:focus-visible{z-iLine truncated
R"RADPAGE(a-side=inline-end]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=inline-end\]\:slide-in-from-left-2[data-side=inline-end]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=inline-start\]\:top-1\/2\![data-side=inline-start]{top:50%!important}.data-\[side\=inline-start\]\:-right-1[data-side=inline-start]{right:calc(var(--spacing) * -1)}.data-\[side\=inline-start\]\:-translate-y-1\/2[data-side=inline-start]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=inline-start\]\:slide-in-from-right-2[data-side=inline-start]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=left\]\:inset-y-0[data-side=left]{inset-block:0}.data-\[side\=left\]\:top-1\/2\![data-side=left]{top:50%!important}.data-\[side\=left\]\:-right-1[data-side=left]{right:calc(var(--spacing) * -1)}.data-\[side\=left\]\:left-0[data-side=left]{left:0}.data-\[side\=left\]\:h-full[data-side=left]{height:100%}.data-\[side\=left\]\:w-3\/4[data-side=left]{width:75%}.data-\[side\=left\]\:-translate-y-1\/2[data-side=left]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:border-r[data-side=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}:is(:where(.group)[data-collapsible=offcanvas] .data-\[side\=left\]\:group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\][data-side=left]){left:calc(var(--sidebar-width) * -1)}.data-\[side\=left\]\:data-ending-style\:translate-x-\[-2\.5rem\][data-side=left][data-ending-style],.data-\[side\=left\]\:data-starting-style\:translate-x-\[-2\.5rem\][data-side=left][data-starting-style]{--tw-translate-x:-2.5rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:inset-y-0[data-side=right]{inset-block:0}.data-\[side\=right\]\:top-1\/2\![data-side=right]{top:50%!important}.data-\[side\=right\]\:right-0[data-side=right]{right:0}.data-\[side\=right\]\:-left-1[data-side=right]{left:calc(var(--spacing) * -1)}.data-\[side\=right\]\:h-full[data-side=right]{height:100%}.data-\[side\=right\]\:w-3\/4[data-side=right]{width:75%}.data-\[side\=right\]\:-translate-y-1\/2[data-side=right]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:border-l[data-side=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}:is(:where(.group)[data-collapsible=offcanvas] .data-\[side\=right\]\:group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\][data-side=right]){right:calc(var(--sidebar-width) * -1)}.data-\[side\=right\]\:data-ending-style\:translate-x-\[2\.5rem\][data-side=right][data-ending-style],.data-\[side\=right\]\:data-starting-style\:translate-x-\[2\.5rem\][data-side=right][data-starting-style]{--tw-translate-x:2.5rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:inset-x-0[data-side=top]{inset-inline:0}.data-\[side\=top\]\:top-0[data-side=top]{top:0}.data-\[side\=top\]\:-bottom-2\.5[data-side=top]{bottom:calc(var(--spacing) * -2.5)}.data-\[side\=top\]\:h-auto[data-side=top]{height:auto}.data-\[side\=top\]\:border-b[data-side=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[side\=top\]\:data-ending-style\:translate-y-\[-2\.5rem\][data-side=top][data-ending-style],.data-\[side\=top\]\:data-starting-style\:translate-y-\[-2\.5rem\][data-side=top][data-starting-style]{--tw-translate-y:-2.5rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[size\=default\]\:h-\[18\.4px\][data-size=default]{height:18.4px}.data-\[size\=default\]\:w-\[32px\][data-size=default]{width:32px}.data-\[size\=md\]\:text-sm[data-size=md]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\[size\=sm\]\:h-\[14px\][data-size=sm]{height:14px}.data-\[size\=sm\]\:w-\[24px\][data-size=sm]{width:24px}.data-\[size\=sm\]\:rounded-\[min\(var\(--radius-md\)\,10px\)\][data-size=sm]{border-radius:min(var(--radius-md), 10px)}.data-\[size\=sm\]\:text-xs[data-size=sm]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.data-\[size\=sm\]\:\[--card-spacing\:--spacing\(3\)\][data-size=sm]{--card-spacing:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:has-data-\[slot\=card-footer\]\:pb-0[data-size=sm]:has([data-slot=card-footer]){padding-bottom:0}:is(.\*\*\:data-\[slot\=kbd\]\:relative *)[data-slot=kbd]{position:relative}:is(.\*\*\:data-\[slot\=kbd\]\:isolate *)[data-slot=kbd]{isolation:isolate}:is(.\*\*\:data-\[slot\=kbd\]\:z-Line truncated
R"RADPAGE(arent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:disabled\:bg-input\/80:is(.dark *):disabled{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.data-open\:animate-in:where([data-state=open]),.data-open\:animate-in:where([data-open]:not([data-open=false])){animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-open\:fade-in-0:where([data-state=open]),.data-open\:fade-in-0:where([data-open]:not([data-open=false])){--tw-enter-opacity:0}.data-open\:zoom-in-95:where([data-state=open]),.data-open\:zoom-in-95:where([data-open]:not([data-open=false])){--tw-enter-scale:.95}@media (hover:hover){:is(.data-open\:hover\:bg-sidebar-accent:where([data-state=open]),.data-open\:hover\:bg-sidebar-accent:where([data-open]:not([data-open=false]))):hover{background-color:var(--sidebar-accent)}:is(.data-open\:hover\:text-sidebar-accent-foreground:where([data-state=open]),.data-open\:hover\:text-sidebar-accent-foreground:where([data-open]:not([data-open=false]))):hover{color:var(--sidebar-accent-foreground)}}.data-closed\:animate-out:where([data-state=closed]),.data-closed\:animate-out:where([data-closed]:not([data-closed=false])){animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-closed\:fade-out-0:where([data-state=closed]),.data-closed\:fade-out-0:where([data-closed]:not([data-closed=false])){--tw-exit-opacity:0}.data-closed\:zoom-out-95:where([data-state=closed]),.data-closed\:zoom-out-95:where([data-closed]:not([data-closed=false])){--tw-exit-scale:.95}.data-checked\:bg-primary:where([data-state=checked]),.data-checked\:bg-primary:where([data-checked]:not([data-checked=false])){background-color:var(--primary)}:is(:where(.group\/switch)[data-size=default] .group-data-\[size\=default\]\/switch\:data-checked\:translate-x-\[calc\(100\%-2px\)\]):where([data-state=checked]),:is(:where(.group\/switch)[data-size=default] .group-data-\[size\=default\]\/switch\:data-checked\:translate-x-\[calc\(100\%-2px\)\]):where([data-checked]:not([data-checked=false])),:is(:where(.group\/switch)[data-size=sm] .group-data-\[size\=sm\]\/switch\:data-checked\:translate-x-\[calc\(100\%-2px\)\]):where([data-state=checked]),:is(:where(.group\/switch)[data-size=sm] .group-data-\[size\=sm\]\/switch\:data-checked\:translate-x-\[calc\(100\%-2px\)\]):where([data-checked]:not([data-checked=false])){--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.dark\:data-checked\:bg-primary-foreground:is(.dark *):where([data-state=checked]),.dark\:data-checked\:bg-primary-foreground:is(.dark *):where([data-checkLine truncated
R"RADPAGE(height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-\(--card-spacing\).border-b{padding-bottom:var(--card-spacing)}:is(.\*\:\[a\]\:underline>*):is(a){text-decoration-line:underline}:is(.\*\:\[a\]\:underline-offset-3>*):is(a){text-underline-offset:3px}@media (hover:hover){:is(.\*\:\[a\]\:hover\:text-foreground>*):is(a):hover{color:var(--foreground)}}:is(.\*\:\[img\:first-child\]\:rounded-t-xl>*):is(img:first-child){border-top-left-radius:calc(var(--radius) * 1.4);border-top-right-radius:calc(var(--radius) * 1.4)}:is(.\*\:\[img\:last-child\]\:rounded-b-xl>*):is(img:last-child){border-bottom-right-radius:calc(var(--radius) * 1.4);border-bottom-left-radius:calc(var(--radius) * 1.4)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --scroll-fade-t{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-b{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAHLYABQAAAABAQgAAHJiAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoYFG4GfHhyHTD9IVkFSh1s/TVZBUjwGYD9TVEFUgTgAhRAvfhEICvZo3iMLhEIAMIGoaAE2AiQDiQAEIAWIGgeLSQwHGyLxFWxXY6CewOalNZfPMyrYrmbcDkTU+r1qNsKGjQMg3hwT/X9SUhlDE9iTFqA63e4PtWQjlBo5goYcMo0ZqbViQ0jvqjjmPNf7mgM3sj6o9UXp+5FQOzPJbOE3Jx5hd/ytpmpjm0pYR9BzruG68ZnXxBVYEMSHMTAwnWpYTZ0wG3f74drkjkO9/6wik1904hQkUpdYDWmJLZFY0pNBEcb7IndF19PSj1kEuE38iIQcX4SK1qgisnr6gFERPc4+OgJHpJCEZJaAxtzpl8/CAc8Rzfk/exe9hCSEEEII4fAAIZilNJgFLUVSVAJFvJRHwV/VaP29R8UpddoiNaXiVOXz+nnW8vzTuOd/7TP3wUxgI76kJCdlOHSryZ2cIZquptBglVCzlLbxtmnUViK7SXY3ySbepI23Th21In7G/T/8PXD3nBn2TjlRgXtD5X9y8/sLj1BKDapUxtT7bcyW//zF1njpmb9ZiFmfWWVarEkKASLEBdHC8/y9O39WtzLine truncated
R"RADPAGE(hgFzcWgiIURoBZFeqj4chNBGAQYMVzgZqSpYeYUNRExJ2HGnRsHCi6c2ZPQJy59J2QVuwW66Sr6W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v2paCAuxEQeRiIt4iI8ESIhE+inWX4lSZcpVqFTFKR7rbYhaSo1addLqNWgEjwk/QhpaOzFsZrDJBSvwEcRSiRxwUAYuniGGSZHmokt0kHCHcjLIfxETyYhjpeXWWG2tJTFrYaj3ljqNFSvL/ELgG7f30PR0fjTcFukJgJ1AgwzWZoihhhluhJFGGW2MscYZbwKlMq3zWJ0nqj0N3uxXuDvXN91XPJUdUiNa7bg6pPxjPaNU2MccDplz2pa4Jyf6hFm1eizbV/VPzgxk0QaaGL1CmpbbDAxNr02aGJplEC8nMV9dTpqUHco6d6DnGJRToVCuMDtCc4RCMXOF2RXKERo+rQsCIQNjKgaktHMVMp6RBrtrfajVix/WXeDBy8tH3rtX1XXSletWzkyNFwb0x8UmVUdpK+pArmt60M90r4Q9U5ONK8NUlpvowsmh0d5juziDY2MjrC8crizpHZt083VE6jeGSV7bez/74naknK/ed1z3WFuv4WYAAA==)format("woff2-variations")}:root{--background:#f9fafb;--foreground:#111419;--card:#fff;--card-foreground:#111419;--popover:#fff;--popover-foreground:#111419;--primary:#2e62c9;--primary-foreground:#f9fafb;--secondary:#eef0f3;--secondary-foreground:#1e2228;--muted:#eef0f3;--muted-foreground:#5e646c;--accent:#e9edf2;--accent-foreground:#171b20;--destructive:#df2225;--border:#dfe1e5;--input:#dfe1e5;--ring:#5684da;--radius:.625rem;--sidebar:#f4f6f8;--sidebar-foreground:#111419;--sidebar-primary:#2e62c9;--sidebar-primary-foreground:#f9fafb;--sidebar-accent:#e6eaef;--sidebar-accent-foreground:#171b20;--sidebar-border:#dfe1e5;--sidebar-ring:#5684da;--series-1:#396ed6;--series-2:#d95737;--series-3:#00967c;--series-4:#915dc5;--series-5:#b88a00;--series-6:#c3518d;--series-7:#0094bd;--series-8:#419547;--ok:#25984d;--warn:#d38e00;--bad:#de3b3d;--idle:#7f8793;--grid:#e2e5e8}@supports (color:lab(0% 0 0)){:root{--background:lab(98.2562% -.166595 -.736153);--foreground:lab(6.15419% -.356875 -4.10882);--card:lab(100% 0 0);--card-foreground:lab(6.15419% -.356875 -4.10882);--popover:lab(100% 0 0);--popover-foreground:lab(6.15419% -.356875 -4.10882);--primary:lab(42.6189% 11.5611 -59.7505);--primary-foreground:lab(98.2562% -.166595 -.736153);--secondary:lab(94.7703% -.411719 -1.83765);--secondary-foreground:lab(12.9538% -.484258 -4.41422);--muted:lab(94.7703% -.411719 -1.83765);--muted-foreground:lab(41.9469% -.688925 -5.55613);--accent:lab(93.604% -.651121 -2.93589);--accent-foreground:lab(9.47247% -.459656 -4.40383);--destructive:lab(49.0747% 69.3434 49.6251);--border:lab(89.5482% -.491649 -2.20379);--input:lab(89.5482% -.491649 -2.20379);--ring:lab(54.8356% 4.35138 -49.6759);--sidebar:lab(96.7463% -.248939 -1.10371);--sidebar-foreground:lab(6.15419% -.356875 -4.10882);--sidebar-primary:lab(42.6189% 11.5611 -59.7505);--sidebar-primary-foreground:lab(98.2562% -.166595 -.736153);--sidebar-accent:lab(92.444% -.650853 -2.93578);--sidebar-accent-foreground:lab(9.47247% -.459656 -4.40383);--sidebar-border:lab(89.5482% -.491649 -2.20379);--sidebar-ring:lab(54.8356% 4.35138 -49.6759);--series-1:lab(47.3516% 10.0889 -59.8436);--series-2:lab(54.4452% 50.6614 45.0348);--series-3:lab(55.1513% -42.4221 3.65769);--series-4:lab(48.837% 37.1132 -46.9834);--series-5:lab(60.6937% 11.3242 68.7955);--series-6:lab(51.444% 51.1158 -9.89943);--series-7:lab(56.3446% -25.1481 -33.3622);--series-8:lab(55.2905% -39.2931 32.7248);--ok:lab(55.4741% -45.4549 30.1606);--waLine truncated
R"RADPAGE(ox!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{pointer-events:none;background:#00000012;position:absolute}.u-cursor-x,.u-cursor-y{pointer-events:none;will-change:transform;position:absolute;top:0;left:0}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{pointer-events:none;will-change:transform;border:0 solid;border-radius:50%;position:absolute;top:0;left:0;background-clip:padding-box!important}.u-axis.u-off,.u-select.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-cursor-pt.u-off{display:none}
/*$vite$:1*/</style>
</head>
<body>
<div id="root"></div>
</body>
</html>
)RADPAGE";
+891
View File
@@ -0,0 +1,891 @@
/* front.cpp -- the listener in front of every model's server (front.h, docs/MULTIMODEL.md §5). */
#include "server/front.h"
#include "server/server.h"
#include "rad_internal.h"
#include "util/json.h"
#include <algorithm>
#include <chrono>
#include <ctime>
#include <cstring>
#include <map>
namespace rad {
namespace server {
namespace {
/* Requests that name a job by its id in the path. Without a model they are asked of every model,
* and the one that knows the id answers; the others say 404. */
bool id_route(const std::string& path) {
return path.rfind("/v1/videos/", 0) == 0 || path.rfind("/status/", 0) == 0;
}
/* The id in such a path: the segment after the route's prefix. */
std::string route_id(const std::string& path) {
const size_t at = path.rfind("/status/", 0) == 0 ? 8 : 11;
const size_t end = path.find('/', at);
return path.substr(at, end == std::string::npos ? std::string::npos : end - at);
}
HttpResponse refuse(const std::string& path, int status, const char* type, const std::string& msg) {
return HttpResponse::json_body(status, error_body(path, status, type, msg));
}
/* `r` holds `lease` until the transport has finished with it (on_close), so the model's server
* outlives the response and its stream. */
void hold_until_close(HttpResponse& r, std::shared_ptr<void> lease) {
std::function<void(bool)> prev = std::move(r.on_close);
r.on_close = [prev, lease](bool ok) { if (prev) prev(ok); };
}
} // namespace
/* ------------------------------------------------------------------ reading the model */
/* The member `key` of the top-level object: its raw value in [*begin, *end). `string_only` refuses
* a value that is not a string and returns a string's text without its quotes. */
static bool json_top(const std::string& s, const char* key, bool string_only, size_t* begin,
size_t* end) {
const size_t n = s.size();
size_t i = 0;
auto ws = [&] { while (i < n && (s[i] == ' ' || s[i] == '\t' || s[i] == '\n' || s[i] == '\r')) ++i; };
/* A string starting at s[i] == '"': i ends past the closing quote. False if unterminated. */
auto skip_string = [&]() -> bool {
for (++i; i < n; ++i) {
if (s[i] == '\\') { ++i; continue; }
if (s[i] == '"') { ++i; return true; }
}
return false;
};
/* Any value at s[i]: i ends past it. */
auto skip_value = [&]() -> bool {
if (i >= n) return false;
if (s[i] == '"') return skip_string();
if (s[i] == '{' || s[i] == '[') {
int depth = 0;
while (i < n) {
const char c = s[i];
if (c == '"') { if (!skip_string()) return false; continue; }
if (c == '{' || c == '[') ++depth;
else if (c == '}' || c == ']') { if (--depth == 0) { ++i; return true; } }
++i;
}
return false;
}
while (i < n && s[i] != ',' && s[i] != '}' && s[i] != ']') ++i;
return true;
};
const size_t klen = std::strlen(key);
ws();
if (i >= n || s[i] != '{') return false;
++i;
for (;;) {
ws();
if (i >= n || s[i] != '"') return false;
const size_t kb = i + 1;
if (!skip_string()) return false;
const size_t ke = i - 1;
ws();
if (i >= n || s[i] != ':') return false;
++i;
ws();
if (ke - kb == klen && s.compare(kb, klen, key) == 0) {
if (string_only) {
if (i >= n || s[i] != '"') return false;
const size_t vb = i + 1;
if (!skip_string()) return false;
*begin = vb;
*end = i - 1;
return true;
}
const size_t vb = i;
if (!skip_value()) return false;
size_t ve = i;
while (ve > vb && (s[ve - 1] == ' ' || s[ve - 1] == '\t' || s[ve - 1] == '\n' ||
s[ve - 1] == '\r'))
--ve;
*begin = vb;
*end = ve;
return true;
}
if (!skip_value()) return false;
ws();
if (i < n && s[i] == ',') { ++i; continue; }
return false;
}
}
bool json_top_string(const std::string& s, const char* key, size_t* begin, size_t* end) {
return json_top(s, key, true, begin, end);
}
bool json_top_value(const std::string& s, const char* key, size_t* begin, size_t* end) {
return json_top(s, key, false, begin, end);
}
std::string Front::requested_model(const HttpRequest& q) {
auto it = q.query.find("model");
if (it != q.query.end()) return it->second;
if (const FormPart* p = q.part("model")) return p->data;
size_t b = 0, e = 0;
if (!q.body.empty() && json_top_string(q.body, "model", &b, &e)) {
const std::string raw = q.body.substr(b, e - b);
if (raw.find('\\') == std::string::npos) return raw;
/* An escaped name: decode it as JSON does. */
const json j = json::parse("\"" + raw + "\"", nullptr, false);
return j.is_string() ? j.get<std::string>() : std::string();
}
return std::string();
}
/* ------------------------------------------------------------------ metrics */
std::string merge_metrics(const std::vector<std::string>& texts) {
struct Family { std::string help, type; std::vector<std::string> samples; };
std::vector<std::string> order;
std::map<std::string, Family> fam;
auto family = [&](const std::string& name) -> Family& {
auto it = fam.find(name);
if (it == fam.end()) { order.push_back(name); it = fam.emplace(name, Family{}).first; }
return it->second;
};
for (const std::string& t : texts) {
std::string current;
size_t at = 0;
while (at < t.size()) {
size_t nl = t.find('\n', at);
if (nl == std::string::npos) nl = t.size();
const std::string line = t.substr(at, nl - at);
at = nl + 1;
if (line.empty()) continue;
if (line.rfind("# HELP ", 0) == 0 || line.rfind("# TYPE ", 0) == 0) {
const size_t ns = 7, ne = line.find(' ', ns);
current = line.substr(ns, ne == std::string::npos ? std::string::npos : ne - ns);
Family& f = family(current);
std::string& slot = line[2] == 'H' ? f.help : f.type;
if (slot.empty()) slot = line;
continue;
}
if (line[0] == '#') continue;
const size_t ne = line.find_first_of("{ ");
const std::string name = line.substr(0, ne);
/* _bucket, _sum, _count belong to the histogram declared above them. */
const std::string owner =
!current.empty() && name.compare(0, current.size(), current) == 0 ? current : name;
family(owner).samples.push_back(line);
}
}
std::string out;
for (const std::string& name : order) {
const Family& f = fam[name];
if (!f.help.empty()) out += f.help + "\n";
if (!f.type.empty()) out += f.type + "\n";
for (const std::string& s : f.samples) out += s + "\n";
}
return out;
}
/* ------------------------------------------------------------------ the Front */
const char* Front::state_name(State s) {
switch (s) {
case State::Cold: return "cold";
case State::Loading: return "loading";
case State::Open: return "resident";
case State::Closing: return "closing";
case State::Failed: return "failed";
case State::Parked: return "parked";
}
return "?";
}
Front::Front(TransportOptions t, int64_t keepalive_ms)
: topts_(std::move(t)), keepalive_ms_(keepalive_ms) {
/* Every model server registers the same routes whatever it serves (Server::register_routes),
* so a server built on nothing gives the table, and the Front can listen before any model is
* loaded. Its handlers are never called. */
Server proto(Deps{}, ServerOptions{});
install_routes(proto.router());
}
Front::~Front() { stop(); }
void Front::install_routes(const Router& model_router) {
/* The GET routes that describe the whole process: answered here, never forwarded. */
using Own = HttpResponse (Front::*)(const HttpRequest&);
static const std::pair<const char*, Own> own[] = {
{ "/v1/models", &Front::models }, { "/models", &Front::models },
{ "/v1/models/*id", &Front::models }, { "/health", &Front::health },
{ "/v1/health", &Front::health }, { "/metrics", &Front::metrics },
};
for (const std::string& sig : model_router.routes()) {
const size_t sp = sig.find(' ');
const std::string method = sig.substr(0, sp), path = sig.substr(sp + 1);
bool fleet = method == "GET" && (path == "/" || path == "/dashboard");
for (const auto& [p, fn] : own) fleet |= method == "GET" && path == p;
if (fleet) continue;
router_.add(method, path, [this](const HttpRequest& q) { return forward(q); });
}
for (const auto& [p, fn] : own)
router_.get(p, [this, fn = fn](const HttpRequest& q) { return (this->*fn)(q); });
/* The page itself, from here: it names no model, and asking one for it would wake that one. */
router_.get("/", [](const HttpRequest&) { return dashboard_page(); });
router_.get("/dashboard", [](const HttpRequest&) { return dashboard_page(); });
for (const std::string& path : model_router.socket_routes())
router_.socket(path, [this](const HttpRequest& q, WsConn& c) { forward_socket(q, c); });
}
void Front::route(const std::string& method, const std::string& path, Handler h) {
router_.add(method, path, std::move(h));
}
void Front::add(const std::string& name, const std::vector<std::string>& aliases, int64_t wait_ms,
bool required) {
std::lock_guard<std::mutex> lk(mu_);
auto e = std::make_unique<Entry>();
e->name = name;
e->aliases = aliases;
e->wait_ms = wait_ms;
e->required = required;
entries_.push_back(std::move(e));
}
void Front::update(const std::string& name, const std::vector<std::string>& aliases,
int64_t wait_ms, bool required) {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed) {
p->aliases = aliases;
p->wait_ms = wait_ms;
p->required = required;
}
}
void Front::remove(const std::string& name) {
std::unique_lock<std::mutex> lk(mu_);
for (size_t i = 0; i < entries_.size(); ++i) {
Entry* e = entries_[i].get();
if (e->name != name || e->removed) continue;
e->removed = true;
changed_.notify_all();
changed_.wait(lk, [&] { return e->leases == 0 && e->waiting == 0; });
for (size_t j = 0; j < entries_.size(); ++j)
if (entries_[j].get() == e) { entries_.erase(entries_.begin() + (long)j); break; }
return;
}
}
void Front::loading(const std::string& name) {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed) p->state = State::Loading;
changed_.notify_all();
}
void Front::abandon(const std::string& name) {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed && p->state == State::Loading) p->state = State::Cold;
changed_.notify_all();
}
void Front::set_parked(const std::string& name, bool parked) {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed) {
if (parked && p->state == State::Cold) p->state = State::Parked;
else if (!parked && p->state == State::Parked) p->state = State::Cold;
}
changed_.notify_all();
}
void Front::fail(const std::string& name, const std::string& why, int64_t retry_ms) {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed) {
p->state = State::Failed;
p->why = why;
p->retry_ns = rad_mono_ns() + (uint64_t)std::max<int64_t>(retry_ms, 0) * 1000000ull;
p->server = nullptr;
}
changed_.notify_all();
}
void Front::attach(const std::string& name, const std::vector<std::string>& aliases, Server* s) {
std::lock_guard<std::mutex> lk(mu_);
Entry* e = nullptr;
for (auto& p : entries_)
if (p->name == name && !p->removed) e = p.get();
if (!e) {
entries_.push_back(std::make_unique<Entry>());
e = entries_.back().get();
e->name = name;
}
e->aliases = aliases;
e->server = s;
if (s) e->caps = s->capabilities_json();
e->state = State::Open;
e->why.clear();
e->last_used_ns = rad_mono_ns();
changed_.notify_all();
}
bool Front::detach(const std::string& name, int wait_ms) {
std::unique_lock<std::mutex> lk(mu_);
Entry* e = nullptr;
for (auto& p : entries_)
if (p->name == name && (p->state == State::Open || p->state == State::Closing)) e = p.get();
if (!e) return true;
e->state = State::Closing;
changed_.notify_all();
const bool idle = changed_.wait_for(lk, std::chrono::milliseconds(wait_ms),
[&] { return e->leases == 0; });
if (idle) {
e->state = State::Cold;
e->server = nullptr;
changed_.notify_all();
}
return idle;
}
std::string Front::capabilities(const std::string& name) const {
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (p->name == name && !p->removed) return p->caps;
return std::string();
}
Front::Activity Front::activity(const std::string& name) const {
std::lock_guard<std::mutex> lk(mu_);
Activity a;
for (auto& p : entries_)
if (p->name == name && !p->removed) {
a.state = p->state;
a.leases = p->leases;
a.waiting = p->waiting;
a.last_used_ns = p->last_used_ns;
a.uses = p->uses;
a.waits = p->waits;
a.wait_s = p->wait_s;
a.wait_le = p->wait_le;
}
return a;
}
std::vector<std::string> Front::names() const {
std::lock_guard<std::mutex> lk(mu_);
std::vector<std::string> v;
for (auto& p : entries_)
if (!p->removed) v.push_back(p->name);
return v;
}
std::shared_ptr<void> Front::lease_entry(Entry* e) {
++e->leases;
++e->uses;
e->last_used_ns = rad_mono_ns();
return std::shared_ptr<void>(static_cast<void*>(e), [this](void* p) {
std::lock_guard<std::mutex> lk(mu_);
Entry* x = static_cast<Entry*>(p);
--x->leases;
x->last_used_ns = rad_mono_ns();
changed_.notify_all();
});
}
/* A hold on an open model's server that is not a use of the model: detach() waits for it, and the
* idle clock and the use count do not see it. For the dashboard's reads. Under mu_. */
std::shared_ptr<void> Front::lease_quiet(Entry* e) {
++e->leases;
return std::shared_ptr<void>(static_cast<void*>(e), [this](void* p) {
std::lock_guard<std::mutex> lk(mu_);
--static_cast<Entry*>(p)->leases;
changed_.notify_all();
});
}
std::string Front::peek(const std::string& model, const std::string& path) {
Entry* e = nullptr;
std::shared_ptr<void> hold;
{
std::lock_guard<std::mutex> lk(mu_);
e = resolve(model);
if (!e || e->removed || e->state != State::Open || !e->server) return std::string();
hold = lease_quiet(e);
}
HttpRequest q;
q.path = path;
HttpResponse r = e->server->router().dispatch(std::move(q));
return r.status == 200 && !r.streaming() ? std::move(r.body) : std::string();
}
Front::Entry* Front::resolve(const std::string& model) {
auto names = [](const Entry& e, const std::string& m) {
if (e.name == m) return true;
for (const std::string& a : e.aliases)
if (a == m) return true;
return false;
};
const std::string want = model.empty() ? std::string("default") : model;
for (auto& p : entries_)
if (!p->removed && names(*p, want)) return p.get();
if (!model.empty()) {
const size_t colon = model.find(':');
if (colon != std::string::npos)
for (auto& p : entries_)
if (!p->removed && names(*p, model.substr(0, colon))) return p.get();
return nullptr;
}
Entry* only = nullptr;
int n = 0;
for (auto& p : entries_)
if (!p->removed) { only = p.get(); ++n; }
return n == 1 ? only : nullptr;
}
Front::Got Front::lease(const std::string& model, const std::string& path, int64_t wait_ms,
uint64_t* until_ns, Entry** out, std::shared_ptr<void>* held,
HttpResponse* refusal) {
std::unique_lock<std::mutex> lk(mu_);
*out = nullptr;
Entry* e = resolve(model);
if (!e) {
std::string serving;
for (auto& p : entries_)
if (!p->removed) serving += (serving.empty() ? "" : ", ") + p->name;
*refusal = model.empty()
? refuse(path, 400, "invalid_request_error",
"this server serves several models (" + serving + "); name one with `model`")
: refuse(path, 404, "not_found_error",
"no model '" + model + "' is served here (serving: " + serving + ")");
return Got::Refused;
}
/* A model not open: ask for it and wait (docs/MULTIMODEL.md §8.2). The entry's own timeout
* bounds the whole wait; `wait_ms` only a slice of it, for the keepalive. */
const uint64_t t0 = rad_mono_ns();
uint64_t own = 0;
if (!until_ns) until_ns = &own;
if (*until_ns == 0) *until_ns = t0 + (uint64_t)std::max<int64_t>(e->wait_ms, 0) * 1000000ull;
const auto now = std::chrono::steady_clock::now();
const auto limit = now + std::chrono::nanoseconds(*until_ns > t0 ? *until_ns - t0 : 0);
const auto slice = wait_ms < 0 ? limit : std::min(limit, now + std::chrono::milliseconds(wait_ms));
++e->waiting;
for (;;) {
if (e->removed) break;
if (e->state == State::Open) break;
if (e->state == State::Failed) {
if (rad_mono_ns() < e->retry_ns) break;
e->state = State::Cold;
}
if ((e->state == State::Cold || e->state == State::Parked) && demand_) demand_(e->name);
if (stopping()) break;
if (changed_.wait_until(lk, slice) == std::cv_status::timeout) break;
}
--e->waiting;
changed_.notify_all();
if (e->removed) {
*refusal = refuse(path, 404, "not_found_error", "model '" + e->name + "' is no longer served here");
return Got::Refused;
}
if (e->state == State::Failed) {
*refusal = refuse(path, 503, "service_unavailable",
"model '" + e->name + "' could not be loaded: " + e->why);
const uint64_t t = rad_mono_ns();
refusal->set_header("Retry-After",
std::to_string(e->retry_ns > t ? (e->retry_ns - t) / 1000000000ull + 1 : 1));
return Got::Refused;
}
if (e->state != State::Open) {
if (std::chrono::steady_clock::now() < limit && !stopping()) return Got::Waiting;
*refusal = refuse(path, 503, "service_unavailable",
"model '" + e->name + "' is " + state_name(e->state) +
" and did not open within the load timeout; try again");
refusal->set_header("Retry-After", "5");
return Got::Refused;
}
*out = e;
*held = lease_entry(e);
/* The whole wait began where *until_ns was set, the entry's timeout before its end. */
const uint64_t began = *until_ns - (uint64_t)std::max<int64_t>(e->wait_ms, 0) * 1000000ull;
const double waited = (double)(rad_mono_ns() - std::min(began, rad_mono_ns())) * 1e-9;
++e->waits;
e->wait_s += waited;
for (size_t k = 0; k < kWaitLe.size(); ++k)
if (waited <= kWaitLe[k]) ++e->wait_le[k];
return Got::Leased;
}
/* `base:adapter` reaches the model's server as the adapter's own name, the spelling a one-model
* process takes: in the query, the form field, or the body's top-level string, in place. */
static void strip_base(HttpRequest* q, const std::string& model) {
const size_t colon = model.find(':');
if (colon == std::string::npos) return;
const std::string adapter = model.substr(colon + 1);
auto it = q->query.find("model");
if (it != q->query.end()) { it->second = adapter; return; }
for (FormPart& p : q->form)
if (p.name == "model") { p.data = adapter; return; }
size_t b = 0, e = 0;
if (json_top_string(q->body, "model", &b, &e)) {
const std::string raw = q->body.substr(b, e - b);
const size_t c = raw.find(':');
if (c != std::string::npos) q->body.replace(b, e - b, raw.substr(c + 1));
}
}
/* The body asks for a streamed answer: its top-level `stream` is true. */
static bool wants_stream(const HttpRequest& q) {
size_t b = 0, e = 0;
return !q.body.empty() && json_top_value(q.body, "stream", &b, &e) &&
q.body.compare(b, e - b, "true") == 0;
}
std::vector<std::pair<Front::Entry*, std::shared_ptr<void>>> Front::hold_open() {
std::vector<std::pair<Entry*, std::shared_ptr<void>>> held;
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_)
if (!p->removed && p->state == State::Open) held.emplace_back(p.get(), lease_entry(p.get()));
return held;
}
bool Front::dashboard_read(const HttpRequest& q) {
if (q.method != "GET") return false;
return q.path == "/stats" || q.path == "/sessions" || q.path == "/graph" ||
q.path == "/server_info" || q.path == "/admin/control-vector";
}
void Front::keep_job(const std::string& id, int64_t expires_at, int64_t max_kept, Handler answer) {
std::lock_guard<std::mutex> lk(jobs_mu_);
const int64_t now = (int64_t)std::time(nullptr);
jobs_.erase(std::remove_if(jobs_.begin(), jobs_.end(),
[&](const KeptJob& j) { return j.expires_at <= now || j.id == id; }),
jobs_.end());
jobs_.push_back(KeptJob{ id, expires_at, std::move(answer) });
const size_t cap = (size_t)std::max<int64_t>(max_kept, 1);
if (jobs_.size() > cap) jobs_.erase(jobs_.begin(), jobs_.end() - (std::ptrdiff_t)cap);
}
Handler Front::kept_job(const HttpRequest& q) {
if (!id_route(q.path)) return nullptr;
const std::string id = route_id(q.path);
const int64_t now = (int64_t)std::time(nullptr);
std::lock_guard<std::mutex> lk(jobs_mu_);
for (size_t i = 0; i < jobs_.size(); ++i) {
if (jobs_[i].id != id) continue;
if (jobs_[i].expires_at <= now) {
jobs_.erase(jobs_.begin() + (std::ptrdiff_t)i);
return nullptr;
}
Handler h = jobs_[i].answer;
if (q.method == "DELETE") jobs_.erase(jobs_.begin() + (std::ptrdiff_t)i);
return h;
}
return nullptr;
}
HttpResponse Front::forward(HttpRequest q) {
if (Handler kept = kept_job(q)) return kept(q);
const std::string model = requested_model(q);
/* A dashboard read is not a use of the model: it does not bring one back, and it does not
* keep one that nobody asks anything of from going idle. */
if (dashboard_read(q)) {
Entry* r = nullptr;
std::shared_ptr<void> hold;
{
std::lock_guard<std::mutex> lk(mu_);
r = resolve(model);
if (r && r->state != State::Open)
return refuse(q.path, 409, "model_not_open", "model '" + r->name + "' is " +
state_name(r->state) +
"; this read does not bring it back");
if (r && r->server) hold = lease_quiet(r);
}
if (hold) {
const bool sessions = q.path == "/sessions";
const std::string name = r->name;
const uint64_t now = rad_mono_ns();
if (sessions) {
std::lock_guard<std::mutex> lk(sessions_mu_);
const auto it = sessions_read_.find(name);
if (it != sessions_read_.end() && now - it->second.first < kSessionsKeepNs) {
HttpResponse kept;
kept.status = 200;
kept.content_type = "application/json";
kept.body = it->second.second;
kept.set_header("Cache-Control", "no-store");
return kept;
}
}
strip_base(&q, model);
HttpResponse resp = r->server->router().dispatch(std::move(q));
if (sessions && resp.status == 200) {
std::lock_guard<std::mutex> lk(sessions_mu_);
sessions_read_[name] = { now, resp.body };
}
hold_until_close(resp, hold);
return resp;
}
}
Entry* e = nullptr;
std::shared_ptr<void> l;
HttpResponse refusal;
/* A streaming request for a model that is not open gets its event stream at once. */
if (keepalive_ms_ > 0 && wants_stream(q)) {
bool open = false;
{
std::lock_guard<std::mutex> lk(mu_);
Entry* r = resolve(model);
open = !r || r->state == State::Open;
}
if (!open) return forward_waiting(std::move(q), model);
}
const Got g = lease(model, q.path, -1, nullptr, &e, &l, &refusal);
if (g != Got::Leased) {
if (model.empty() && id_route(q.path) && refusal.status == 400) {
/* Every loaded model that might hold the job, in turn; the first that knows it
* answers. */
for (auto& [ent, hold] : hold_open()) {
HttpResponse r = ent->server->router().dispatch(q);
if (r.status == 404) continue;
hold_until_close(r, hold);
return r;
}
return refuse(q.path, 404, "not_found_error", "no model holds " + q.path);
}
return refusal;
}
strip_base(&q, model);
HttpResponse r = e->server->router().dispatch(std::move(q));
hold_until_close(r, l);
return r;
}
HttpResponse Front::forward_waiting(HttpRequest q, const std::string& model) {
struct Wait {
HttpRequest q;
std::string model;
std::shared_ptr<void> lease;
HttpResponse inner;
bool relaying = false;
bool done = false;
uint64_t until = 0; /* the whole wait's end, set by the first lease() */
};
auto w = std::make_shared<Wait>();
w->q = std::move(q);
w->model = model;
HttpResponse r;
r.status = 200;
r.content_type = "text/event-stream";
r.set_header("Cache-Control", "no-cache");
r.next = [this, w](std::string& chunk) -> bool {
chunk.clear();
if (w->done) return false;
if (w->relaying) {
if (!w->inner.next) { w->done = true; return false; }
const bool more = w->inner.next(chunk);
if (!more) w->done = true;
return more || !chunk.empty();
}
Entry* e = nullptr;
HttpResponse refusal;
const Got g = lease(w->model, w->q.path, keepalive_ms_, &w->until, &e, &w->lease, &refusal);
if (g == Got::Waiting) {
chunk = ": loading model " + w->model + "\n\n";
return true;
}
if (g == Got::Refused) {
chunk = "data: " + refusal.body + "\n\n";
w->done = true;
return true;
}
strip_base(&w->q, w->model);
w->inner = e->server->router().dispatch(std::move(w->q));
if (!w->inner.streaming()) {
/* The model answered whole (a refusal, most likely): one event carrying it. */
chunk = "data: " + w->inner.body + "\n\n";
w->done = true;
return true;
}
w->relaying = true;
return true;
};
r.on_close = [w](bool ok) {
if (w->inner.on_close) w->inner.on_close(ok);
w->inner.on_close = nullptr;
w->lease.reset();
};
return r;
}
void Front::forward_socket(const HttpRequest& q, WsConn& c) {
const std::string model = requested_model(q);
Entry* e = nullptr;
std::shared_ptr<void> l;
HttpResponse refusal;
if (lease(model, q.path, -1, nullptr, &e, &l, &refusal) != Got::Leased) {
c.close(1008, model.empty() ? "name a model with ?model=" : "model '" + model + "' is not served here");
return;
}
const SocketHandler* h = e->server->router().socket_for(q.path);
if (!h) { c.close(1008, "this model serves no " + q.path); return; }
(*h)(q, c);
}
HttpResponse Front::models(const HttpRequest& q) {
/* One model's card: asked of the model it names, under its own id. A model not loaded is
* described without loading it. */
if (q.path.rfind("/v1/models/", 0) == 0 && q.path.size() > 11) {
const std::string id = q.path.substr(11);
Entry* e = nullptr;
std::shared_ptr<void> l;
{
std::lock_guard<std::mutex> lk(mu_);
Entry* r = resolve(id);
if (!r)
return refuse(q.path, 404, "not_found_error", "no model '" + id + "' is served here");
if (r->state != State::Open) {
json card = {{"id", r->name}, {"object", "model"}, {"owned_by", "radiance"},
{"state", state_name(r->state)}};
return HttpResponse::json_body(200, card.dump());
}
e = r;
l = lease_entry(r);
}
HttpRequest one = q;
const size_t colon = id.find(':');
one.path = "/v1/models/" + (colon != std::string::npos ? id.substr(colon + 1) : e->name);
return e->server->router().dispatch(std::move(one));
}
struct Row { Entry* e; std::shared_ptr<void> hold; std::string name; std::vector<std::string> aliases; State st; };
std::vector<Row> rows;
{
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_) {
if (p->removed) continue;
Row r{p.get(), nullptr, p->name, p->aliases, p->state};
if (p->state == State::Open) r.hold = lease_entry(p.get());
rows.push_back(std::move(r));
}
}
json data = json::array();
for (Row& row : rows) {
json extra = json::object();
if (describe_) {
const json j = json::parse(describe_(row.name), nullptr, false);
if (j.is_object()) extra = j;
}
std::vector<json> cards;
if (row.hold) {
HttpRequest one = q;
one.path = "/v1/models";
const HttpResponse r = row.e->server->router().dispatch(std::move(one));
const json j = r.status == 200 ? json::parse(r.body, nullptr, false) : json();
if (!j.is_discarded() && j.is_object() && j.contains("data"))
for (json card : j["data"]) {
/* An adapter's card is addressed base:adapter in a process of several models. */
if (card.contains("parent") && card.value("id", "") != row.name) {
card["id"] = row.name + ":" + card.value("id", "");
card["parent"] = row.name;
}
cards.push_back(card);
}
}
if (cards.empty())
cards.push_back({{"id", row.name}, {"object", "model"}, {"owned_by", "radiance"}});
for (json& card : cards) {
const bool own = card.value("id", "") == row.name;
if (own) {
card["state"] = state_name(row.st);
for (const auto& [k, v] : extra.items()) card[k] = v;
}
data.push_back(card);
if (own)
for (const std::string& a : row.aliases) {
json alias = card;
alias["id"] = a;
alias["parent"] = row.name;
data.push_back(alias);
}
}
}
json out;
out["object"] = "list";
out["data"] = data;
return HttpResponse::json_body(200, out.dump());
}
HttpResponse Front::health(const HttpRequest& q) {
/* One model: its own answer when loaded, its state when not; asking does not load it. */
if (auto it = q.query.find("model"); it != q.query.end()) {
Entry* e = nullptr;
std::shared_ptr<void> l;
{
std::lock_guard<std::mutex> lk(mu_);
e = resolve(it->second);
if (!e) return refuse(q.path, 404, "not_found_error", "no model '" + it->second + "' is served here");
if (e->state != State::Open) {
json j = {{"status", state_name(e->state)}, {"model", e->name}};
if (e->state == State::Failed) j["error"] = e->why;
return HttpResponse::json_body(503, j.dump());
}
l = lease_entry(e);
}
return e->server->router().dispatch(q);
}
/* The process: healthy once every model that must be loaded (pinned or preloaded) is, and
* each of those says so. */
std::vector<std::pair<Entry*, std::shared_ptr<void>>> held;
json states = json::object();
std::string missing;
{
std::lock_guard<std::mutex> lk(mu_);
for (auto& p : entries_) {
if (p->removed) continue;
states[p->name] = state_name(p->state);
if (!p->required) continue;
if (p->state == State::Open) held.emplace_back(p.get(), lease_entry(p.get()));
else missing += (missing.empty() ? "" : ", ") + p->name;
}
}
if (!missing.empty()) {
json j = {{"status", "loading"}, {"waiting_for", missing}, {"models", states}};
return HttpResponse::json_body(503, j.dump());
}
for (auto& [e, hold] : held) {
HttpResponse r = e->server->router().dispatch(q);
if (r.status != 200) return r;
}
json j = {{"status", "ok"}, {"models", states}};
return HttpResponse::json_body(200, j.dump());
}
HttpResponse Front::metrics(const HttpRequest& q) {
std::vector<std::string> texts;
std::string type;
for (auto& [e, hold] : hold_open()) {
HttpResponse r = e->server->router().dispatch(q);
if (r.status != 200) continue;
if (type.empty()) type = r.content_type;
texts.push_back(std::move(r.body));
}
if (fleet_metrics_) texts.push_back(fleet_metrics_());
HttpResponse r = HttpResponse::text(200, merge_metrics(texts));
r.content_type = type.empty() ? "text/plain; version=0.0.4; charset=utf-8" : type;
return r;
}
int Front::run() { return transport_.serve(router_, topts_); }
void Front::stop() {
stopping_.store(true, std::memory_order_release);
{
std::lock_guard<std::mutex> lk(mu_);
changed_.notify_all();
}
transport_.stop();
}
} /* namespace server */
} /* namespace rad */
+251
View File
@@ -0,0 +1,251 @@
/* front.h -- the process's one listener in front of every model's server (docs/MULTIMODEL.md §5).
*
* Each engine builds its own Server, as a process serving one model always has: its routes, its
* limits, its tokenizer and template, its metrics. The Front owns the socket. It registers the
* routes every model server registers, reads which model a request names, and hands the request
* to that model's router. The model servers never listen.
*
* A request picks its model by, in order: a `model` query parameter, a `model` form field, the
* body's top-level `model` string. `base:adapter` names an adapter of the model `base`; the server
* then sees the adapter's own name, as a one-model process would. A request naming no model goes
* to the model named or aliased `default`, or to the only model when there is one. A request that
* names a job by id (a video, a shape) and no model asks every loaded model, and the one that knows
* the id answers.
*
* Every model the configuration names is known to the Front from the start, loaded or not (§8.1):
*
* Cold not loaded. A request for it asks the fleet to load it (the demand callback) and
* waits.
* Loading the fleet is loading it; requests wait.
* Open its server takes requests.
* Closing it is leaving (an eviction, an unload, a reload); new requests wait for it to come
* back, the responses already handed out finish.
* Failed its last load failed; requests are refused with the reason until the retry time,
* and the first request after that asks for a load again.
* Parked loaded but out of VRAM (§7): its memory waits in host RAM. A request asks the fleet
* to bring it back, as for a Cold model, and waits.
*
* A request naming a finished job by id is answered here, whatever state its model is in
* (keep_job).
*
* A waiting request waits at most its model's load timeout, then gets 503 with Retry-After. A
* streaming request (`"stream": true`) is answered at once with an event stream that carries an
* SSE comment every keepalive interval while it waits, so proxies and clients keep the connection;
* the model's own stream follows on the same connection (§8.2).
*
* The Front answers itself for the routes that describe the whole process: /v1/models (every model
* and alias, with its state), /health, /metrics (every loaded model's series, each family once,
* plus the fleet's).
*
* Lifetime: a model attaches once its server is ready and detaches before the server goes away.
* detach() waits for every response handed out for that model to be finished with (the response
* object, and so its stream, holds a lease), so a server is never destroyed under a stream.
*/
#pragma once
#include "server/http.h"
#include <array>
#include <atomic>
#include <condition_variable>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
namespace rad {
namespace server {
class Server;
class Front {
public:
enum class State { Cold, Loading, Open, Closing, Failed, Parked };
static const char* state_name(State s);
/* Upper bounds, in seconds, of the buckets of a request's wait for its model to open
* (Activity::wait_le; the last bucket, +Inf, is `waits`). */
static constexpr std::array<double, 9> kWaitLe = { 0.01, 0.1, 0.5, 1, 2, 5, 10, 30, 60 };
/* What the fleet reads to schedule (docs/MULTIMODEL.md §8.3) and reports. */
struct Activity {
State state = State::Cold;
int64_t leases = 0; /* responses handed out and not yet finished */
int64_t waiting = 0; /* requests waiting for it to open */
uint64_t last_used_ns = 0; /* rad_mono_ns of the last lease taken or returned */
uint64_t uses = 0; /* leases taken since it was added */
/* How long the leased requests waited for the model to open (a load or a restore; 0 for
* one that found it open): how many, their sum, and the cumulative count at or under each
* bound. */
uint64_t waits = 0;
double wait_s = 0;
std::array<uint64_t, kWaitLe.size()> wait_le{};
};
/* `keepalive_ms` is the SSE comment interval for streaming requests that wait; 0 sends none. */
Front(TransportOptions t, int64_t keepalive_ms);
~Front();
Front(const Front&) = delete;
Front& operator=(const Front&) = delete;
/* A model the process serves, Cold. A request for it waits at most `wait_ms` for it to open.
* `required` models must be open for /health to answer 200 (pinned and preloaded ones). */
void add(const std::string& name, const std::vector<std::string>& aliases, int64_t wait_ms,
bool required);
/* Forgets a model (hot reload removed it): requests for it are 404 from now on. Waits for its
* leases like detach(). */
void remove(const std::string& name);
/* The model's aliases, wait and health requirement change (hot reload). */
void update(const std::string& name, const std::vector<std::string>& aliases, int64_t wait_ms,
bool required);
/* Called when a request needs a Cold or Parked model, or a Failed one past its retry time, and
* again on every wake-up while the request waits for it. It runs under the Front's lock, so it
* must not block or call back into the Front; the fleet queues a load. */
void set_demand(std::function<void(const std::string&)> f) { demand_ = std::move(f); }
/* Extra JSON members for a model's /v1/models card (state detail, cards), and extra metrics
* text; both from the fleet. */
void set_describe(std::function<std::string(const std::string&)> f) { describe_ = std::move(f); }
void set_metrics(std::function<std::string()> f) { fleet_metrics_ = std::move(f); }
/* What the model does (Server::capabilities_json), from when it last opened: it stays known
* while the model is parked, when its server cannot be asked. Empty before its first load. */
std::string capabilities(const std::string& name) const;
/* The fleet is loading it. */
void loading(const std::string& name);
/* A load nobody asked for gave up (the fleet's warm-up): a loading model is cold again, and
* any request that came meanwhile asks for it anew. */
void abandon(const std::string& name);
/* A Cold model is parked (its memory waits in host RAM), or no longer is. */
void set_parked(const std::string& name, bool parked);
/* The load failed: requests waiting get `why` as a 503, and so do new ones until `retry_ms`
* from now; after that a request asks for a load again. */
void fail(const std::string& name, const std::string& why, int64_t retry_ms);
/* `s` serves the model `name` from now on. */
void attach(const std::string& name, const std::vector<std::string>& aliases, Server* s);
/* No new request reaches `name` (they wait for it to come back); returns once every response
* handed out for it is gone, or after `wait_ms`, whichever is first. False when responses were
* still held at the deadline, and the model stays Closing; a later call waits again. On true
* the model is Cold. */
bool detach(const std::string& name, int wait_ms);
Activity activity(const std::string& name) const;
/* Every model's name, in the order added. */
std::vector<std::string> names() const;
/* A finished job of a model (a video, a shape), named by its id in the path (/v1/videos/{id},
* /status/{id}). The model's memory may go at any moment after it finishes, and with it the
* server that made the job, so from here on `answer` serves every request naming that id, and
* a client polling for its result is no reason to bring the model back. Kept until `expires_at`
* (unix seconds) and among the newest `max_kept`; a DELETE is answered and forgets it. */
void keep_job(const std::string& id, int64_t expires_at, int64_t max_kept, Handler answer);
/* What answers the kept job a request's path names; empty when there is none. */
Handler kept_job(const HttpRequest& q);
/* A route the Front answers itself (the fleet's /admin routes). Before run(). */
void route(const std::string& method, const std::string& path, Handler h);
/* A dashboard read of an open model made in-process (the fleet's history reads /stats this
* way): the body of `path` as the model's server answers it, or empty when the model is not
* open or does not answer 200. Like a dashboard read from the socket it is not a use: it
* neither brings a model back nor keeps one from going idle. */
std::string peek(const std::string& model, const std::string& path);
/* Blocks serving until stop(). */
int run();
void stop();
bool stopping() const { return stopping_.load(std::memory_order_acquire); }
/* The model a request names, as read before any parsing (see the file header), or "". */
static std::string requested_model(const HttpRequest& q);
/* A read the dashboard polls. It reports on a model and is no reason to bring one back, so it
* is refused while that model is not open, where a request for work would wait for it. */
static bool dashboard_read(const HttpRequest& q);
private:
struct Entry {
std::string name;
std::vector<std::string> aliases;
Server* server = nullptr;
State state = State::Cold;
std::string why; /* State::Failed: the reason */
std::string caps; /* what it does, from when it last opened */
uint64_t retry_ns = 0; /* State::Failed: when a request may ask again */
int64_t wait_ms = 0;
bool required = false;
bool removed = false;
int64_t leases = 0;
int64_t waiting = 0;
uint64_t last_used_ns = 0;
uint64_t uses = 0;
uint64_t waits = 0;
double wait_s = 0;
std::array<uint64_t, kWaitLe.size()> wait_le{};
};
struct KeptJob {
std::string id;
int64_t expires_at = 0;
Handler answer;
};
enum class Got { Leased, Refused, Waiting };
/* The entry `model` resolves to (a name, an alias, or `base` of base:adapter), under mu_. */
Entry* resolve(const std::string& model);
/* A lease on the entry `model` resolves to, waiting for it to open for at most `wait_ms`
* (-1: until the whole wait's end). *until_ns (rad_mono_ns) is the end of the whole wait; a
* zero there, or a null `until_ns`, starts the wait now with the entry's load timeout, and the
* end is written back so later calls continue the same wait. Refused with *refusal set when
* there is no such model, it failed, or the whole wait passed; Waiting when only `wait_ms`
* passed. */
Got lease(const std::string& model, const std::string& path, int64_t wait_ms,
uint64_t* until_ns, Entry** out, std::shared_ptr<void>* held, HttpResponse* refusal);
std::shared_ptr<void> lease_entry(Entry* e);
std::shared_ptr<void> lease_quiet(Entry* e);
HttpResponse forward(HttpRequest q);
HttpResponse forward_waiting(HttpRequest q, const std::string& model);
void forward_socket(const HttpRequest& q, WsConn& c);
HttpResponse models(const HttpRequest& q);
HttpResponse health(const HttpRequest& q);
HttpResponse metrics(const HttpRequest& q);
void install_routes(const Router& model_router);
/* Leases on every Open entry, for the fleet-wide routes. */
std::vector<std::pair<Entry*, std::shared_ptr<void>>> hold_open();
TransportOptions topts_;
int64_t keepalive_ms_ = 0;
Router router_;
HttpTransport transport_;
std::atomic<bool> stopping_{false};
std::function<void(const std::string&)> demand_;
std::function<std::string(const std::string&)> describe_;
std::function<std::string()> fleet_metrics_;
mutable std::mutex mu_;
/* Finished jobs, oldest first; their own lock, since one is answered without a model. */
std::mutex jobs_mu_;
/* A model's last /sessions answer and when it was read. Listing the
* conversations takes the idle tiers' lock in slices, so however many pages show them, the
* engine is asked at most once in kSessionsKeepNs. Times are rad_mono_ns. */
static constexpr uint64_t kSessionsKeepNs = 5ull * 1000 * 1000 * 1000;
std::mutex sessions_mu_;
std::map<std::string, std::pair<uint64_t, std::string>> sessions_read_;
std::vector<KeptJob> jobs_;
std::condition_variable changed_;
std::vector<std::unique_ptr<Entry>> entries_;
};
/* The top-level string member `key` of the JSON object `body`: true with its raw (still escaped)
* text in [*begin, *end) of `body`, false when absent or not a string. Reads only as far as the
* key, skipping nested values, so a body of hundreds of MB costs no parse. */
bool json_top_string(const std::string& body, const char* key, size_t* begin, size_t* end);
/* The same for any value: its raw text, e.g. `true` or `{...}`. */
bool json_top_value(const std::string& body, const char* key, size_t* begin, size_t* end);
/* Prometheus text from several sources as one exposition: each family's HELP and TYPE once, its
* samples together. */
std::string merge_metrics(const std::vector<std::string>& texts);
} /* namespace server */
} /* namespace rad */
+387
View File
@@ -0,0 +1,387 @@
/* core/server/history.cpp -- see history.h. */
#include "server/history.h"
#include <chrono>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <limits>
namespace rad {
namespace server {
namespace {
const double kNone = std::numeric_limits<double>::quiet_NaN();
/* A member's number, or NaN where the object has none. */
double num(const json& o, const char* k) {
if (!o.is_object() || !o.contains(k)) return kNone;
const json& v = o[k];
return v.is_number() ? v.get<double>() : kNone;
}
double num0(const json& o, const char* k) {
const double v = num(o, k);
return std::isfinite(v) ? v : 0.0;
}
const json* member(const json& o, const char* k) {
return o.is_object() && o.contains(k) ? &o[k] : nullptr;
}
std::string text(const json& o, const char* k) {
if (!o.is_object() || !o.contains(k)) return std::string();
const json& v = o[k];
return v.is_string() ? v.get<std::string>() : v.dump();
}
/* Four significant digits: what a chart resolves, and a third of the bytes on the wire. */
double round4(double v) {
char b[32];
std::snprintf(b, sizeof b, "%.4g", v);
return std::strtod(b, nullptr);
}
void put(History::Row& r, const char* k, double v) {
if (std::isfinite(v)) r.emplace_back(k, v);
}
/* A model's state as a level a chart can draw; an unknown state is 0. */
double state_code(const std::string& s) {
if (s == "resident") return 3;
if (s == "loading" || s == "closing") return 2;
if (s == "parked") return 1;
if (s == "failed") return 4;
if (s == "waiting") return 5;
return 0;
}
} // namespace
/* ------------------------------------------------------------------ rows */
History::Row History::model_row(const json& s, const json* prev, double dt) {
Row row;
put(row, "decode", num(s, "decode_tps"));
put(row, "prefill", num(s, "prefill_tps"));
put(row, "running", num(s, "running"));
put(row, "waiting", num(s, "waiting"));
put(row, "preempted", num(s, "preempted"));
put(row, "flight", num(s, "in_flight"));
put(row, "hit", num(s, "prefix_hit_rate"));
put(row, "kvUsed", num(s, "kv_bytes_used"));
put(row, "kvCap", num(s, "kv_bytes_total"));
/* The pool's bytes split by tokens: what finished turns keep for reuse and what running
* requests read. */
{
const double held = num0(s, "kv_bytes_used"), used = num0(s, "kv_tokens_used");
const double kept = std::min(num0(s, "kv_tokens_cached"), used);
const double kept_b = used > 0 ? held * kept / used : 0.0;
put(row, "kvKept", kept_b);
put(row, "kvRead", std::max(0.0, held - kept_b));
}
if (const double best = num(s, "step_ns_decode_best"); best > 0) put(row, "stepBest", best / 1e6);
const json* jobs = member(s, "jobs");
if (jobs) {
put(row, "jobRun", num(*jobs, "running"));
put(row, "jobDone", num(*jobs, "done"));
}
/* A prompt's fresh tokens over its own prefill time, for the requests whose prefill ended
* since the last sample: the scheduler's rate divides by everything the step loop did, so
* one short prompt among long decodes would read as a few tokens a second. */
if (const json* rq = member(s, "requests"); rq && rq->is_array()) {
std::set<std::string> seen;
if (prev)
if (const json* pq = member(*prev, "requests"); pq && pq->is_array())
for (const json& r : *pq)
if (num(r, "prefill_s") > 0) seen.insert(text(r, "id"));
double sum = 0;
int n = 0;
for (const json& r : *rq) {
const double pf = num(r, "prefill_s"), fresh = num0(r, "prompt") - num0(r, "cached");
if (pf > 0 && fresh > 0 && !seen.count(text(r, "id"))) {
sum += fresh / pf;
++n;
}
}
if (n) put(row, "prefillRate", sum / n);
}
if (!prev || !(dt > 0)) return row;
const json& p = *prev;
if (jobs)
if (const json* pj = member(p, "jobs"); pj && num0(*jobs, "done") > num0(*pj, "done"))
put(row, "jobTime", num(*jobs, "last_ms") / 1000.0);
put(row, "reqRate", std::max(0.0, (num0(s, "total_requests") - num0(p, "total_requests")) / dt));
if (const double steps = num0(s, "steps") - num0(p, "steps"); steps > 0)
put(row, "stepAny", (num0(s, "step_ns") - num0(p, "step_ns")) / steps / 1e6);
const double ds = num0(s, "steps_decode") - num0(p, "steps_decode");
if (ds > 0) put(row, "step", (num0(s, "step_ns_decode") - num0(p, "step_ns_decode")) / ds / 1e6);
/* Acceptance is accepted over reached, summed over the draft positions that were verified. */
{
const json* dp = member(s, "draft_positions");
const json* pp = member(p, "draft_positions");
if (dp && pp && dp->is_array() && pp->is_array() && dp->size() == pp->size()) {
double reached = 0, accepted = 0;
for (size_t i = 0; i < dp->size(); ++i) {
const double dr = num0((*dp)[i], "reached") - num0((*pp)[i], "reached");
const double da = num0((*dp)[i], "accepted") - num0((*pp)[i], "accepted");
if (dr > 0) {
reached += dr;
accepted += da;
}
}
if (reached > 0) put(row, "accept", accepted / reached);
if (reached > 0 && ds > 0) put(row, "tokStep", 1.0 + accepted / ds);
}
}
{
const json* lk = member(s, "link");
const json* lp = member(p, "link");
if (lk && lp) {
auto d = [&](const char* f) { return std::max(0.0, (num0(*lk, f) - num0(*lp, f)) / dt); };
put(row, "lkAr", d("ar_bytes"));
put(row, "lkUp", d("h2d_bytes"));
put(row, "lkDn", d("d2h_bytes"));
put(row, "lkSsd", d("ssd_bytes"));
put(row, "lkStream", d("stream_bytes") + d("kv_stream_bytes"));
}
}
{
const json* ex = member(s, "experts");
const json* xp = member(p, "experts");
if (ex && xp) {
if (const double routed = num0(*ex, "routed") - num0(*xp, "routed"); routed > 0)
put(row, "expHit", (num0(*ex, "routed_res") - num0(*xp, "routed_res")) / routed);
put(row, "expIn", std::max(0.0, (num0(*ex, "promotions") - num0(*xp, "promotions")) / dt));
put(row, "expOut", std::max(0.0, (num0(*ex, "demotions") - num0(*xp, "demotions")) / dt));
}
}
return row;
}
History::Row History::fleet_row(const json& f) {
Row row;
const json* models = member(f, "models");
const json* cards = member(f, "cards");
if (models && models->is_array())
for (const json& m : *models) row.emplace_back("s:" + text(m, "id"), state_code(text(m, "state")));
if (!cards || !cards->is_array()) return row;
for (const json& c : *cards) {
const std::string card = text(c, "card");
auto name = [&](const char* k) { return std::string(k) + card; };
if (const double v = num(c, "busy"); std::isfinite(v)) row.emplace_back(name("busy"), v);
if (const double v = num(c, "power_w"); std::isfinite(v)) row.emplace_back(name("power"), v);
if (const double v = num(c, "temp_c"); std::isfinite(v)) row.emplace_back(name("temp"), v);
if (const double v = num(c, "free_bytes"); std::isfinite(v)) row.emplace_back(name("free"), v);
if (!models || !models->is_array()) continue;
/* A model's bytes on this card, 0 where it holds none: the stacked memory chart draws a
* model that left as an empty band, not as a gap. */
const double ci = num(c, "card");
for (const json& m : *models) {
double bytes = 0;
/* What the model holds on this card now (a loading or partly parked one too), else
* its claim on each of its cards. */
const json* by = member(m, "vram_bytes_by_card");
if (by && by->is_object()) {
if (const auto it = by->find(card); it != by->end() && it->is_number()) bytes = it->get<double>();
} else if (const json* on = member(m, "cards"); on && on->is_array()) {
for (const json& x : *on)
if (x.is_number() && x.get<double>() == ci) bytes = num0(m, "vram_bytes_per_card");
}
row.emplace_back("c" + card + ":" + text(m, "id"), bytes);
}
}
return row;
}
/* ------------------------------------------------------------------ the ring */
void History::Series::push(double at, const Row& row) {
if (t.empty()) t.assign((size_t)kRows, 0.0);
const size_t i = head;
/* Kept as it is written out, to the millisecond: a page asks for what came after the last
* time it was given, and a time kept finer than it was sent would be later than itself. */
t[i] = std::round(at * 1000.0) / 1000.0;
for (auto& [k, col] : c) col[i] = std::numeric_limits<float>::quiet_NaN();
for (const auto& [k, v] : row) {
auto it = c.find(k);
if (it == c.end())
it = c.emplace(k, std::vector<float>((size_t)kRows, std::numeric_limits<float>::quiet_NaN())).first;
it->second[i] = (float)v;
}
head = (head + 1) % (size_t)kRows;
if (n < (size_t)kRows) ++n;
}
void History::Series::write(json& out, double since) const {
json times = json::array();
json cols = json::object();
std::vector<size_t> at;
const size_t first = (head + (size_t)kRows - n) % (size_t)kRows;
/* The ring holds the hour at its fastest rate, so at one row a second it holds more than the
* hour: only what is within kKeepS of the latest row is given. */
const double oldest = n ? t[(head + (size_t)kRows - 1) % (size_t)kRows] - (double)kKeepS : 0.0;
for (size_t k = 0; k < n; ++k) {
const size_t i = (first + k) % (size_t)kRows;
if (t[i] > since && t[i] > oldest) at.push_back(i);
}
for (size_t i : at) times.push_back(t[i]);
for (const auto& [name, col] : c) {
bool any = false;
for (size_t i : at) any = any || std::isfinite(col[i]);
if (!any) continue;
json a = json::array();
for (size_t i : at) {
if (std::isfinite(col[i])) a.push_back(round4((double)col[i]));
else a.push_back(nullptr);
}
cols[name] = std::move(a);
}
out["keep_s"] = kKeepS;
out["t"] = std::move(times);
out["c"] = std::move(cols);
}
/* ------------------------------------------------------------------ samples */
void History::track_requests(Model& m, const json& stats, double t) {
auto finish = [&](const json& r) {
const double fresh = num0(r, "prompt") - num0(r, "cached");
const double pf = num(r, "prefill_s"), ttft = num(r, "ttft_s"), tps = num(r, "tps");
json h;
h["id"] = text(r, "id");
h["prompt"] = num0(r, "prompt");
h["out"] = num0(r, "output");
h["ctx"] = num0(r, "ctx");
if (std::isfinite(ttft)) h["ttft"] = ttft; else h["ttft"] = nullptr;
if (pf > 0 && fresh > 0) h["pf"] = round4(fresh / pf); else h["pf"] = nullptr;
if (tps > 0) h["tps"] = round4(tps); else h["tps"] = nullptr;
h["at"] = (int64_t)std::llround(t * 1000.0);
m.finished.push_back(std::move(h));
if (m.finished.size() > (size_t)kRequests) m.finished.pop_front();
};
std::set<std::string> seen;
if (const json* rq = member(stats, "requests"); rq && rq->is_array())
for (const json& r : *rq) {
const std::string id = text(r, "id");
if (id.empty()) continue;
seen.insert(id);
m.live[id] = r;
if (text(r, "state") == "done" && m.done.insert(id).second) finish(r);
}
/* A request that left the table without being seen done ended between two samples. */
for (auto it = m.live.begin(); it != m.live.end();) {
if (seen.count(it->first)) {
++it;
continue;
}
if (!m.done.count(it->first)) finish(it->second);
m.done.erase(it->first);
it = m.live.erase(it);
}
}
void History::model_sample(const std::string& id, const json& stats, double t, std::string body) {
std::lock_guard<std::mutex> lk(mu_);
Model& m = models_[id];
m.latest = std::move(body);
/* Counters start over with the model: a sample of another start is no predecessor. */
const bool same = m.prev.is_object() && num(m.prev, "started_at") == num(stats, "started_at");
if (!same) {
m.live.clear();
m.done.clear();
}
m.series.push(t, model_row(stats, same ? &m.prev : nullptr, t - m.prev_t));
track_requests(m, stats, t);
m.prev = stats;
m.prev_t = t;
}
void History::fleet_sample(const json& fleet, double t, std::string body) {
std::lock_guard<std::mutex> lk(mu_);
fleet_.push(t, fleet_row(fleet));
fleet_live_ = std::move(body);
}
namespace {
int64_t steady_ns() {
return std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::steady_clock::now().time_since_epoch()).count();
}
} // namespace
bool History::watched(double seconds) const {
const int64_t at = asked_ns_.load(std::memory_order_relaxed);
return at != 0 && (double)(steady_ns() - at) * 1e-9 < seconds;
}
void History::model_closed(const std::string& id) {
std::lock_guard<std::mutex> lk(mu_);
if (auto it = models_.find(id); it != models_.end()) it->second.latest.clear();
}
void History::forget(const std::string& id) {
std::lock_guard<std::mutex> lk(mu_);
models_.erase(id);
}
json History::model_since(const std::string& id, double since) const {
std::lock_guard<std::mutex> lk(mu_);
json out = json::object();
json reqs = json::array();
auto it = models_.find(id);
if (it == models_.end()) {
Series().write(out, since);
} else {
it->second.series.write(out, since);
for (const json& h : it->second.finished)
/* In whole milliseconds on both sides, as `at` is. */
if (num0(h, "at") > (double)std::llround(since * 1000.0)) reqs.push_back(h);
}
out["requests"] = std::move(reqs);
return out;
}
json History::fleet_since(double since) const {
std::lock_guard<std::mutex> lk(mu_);
json out = json::object();
fleet_.write(out, since);
return out;
}
namespace {
/* `{...}` with `"live": <text>` appended, the text spliced in as it was read. */
std::string with_live(const json& o, const std::string& live) {
std::string b = o.dump();
b.pop_back();
b += ",\"live\":";
b += live.empty() ? "null" : live;
b += '}';
return b;
}
} // namespace
std::string History::model_body(const std::string& id, double since) const {
asked_ns_.store(steady_ns(), std::memory_order_relaxed);
const json o = model_since(id, since);
std::string live;
{
std::lock_guard<std::mutex> lk(mu_);
if (auto it = models_.find(id); it != models_.end()) live = it->second.latest;
}
return with_live(o, live);
}
std::string History::fleet_body(double since) const {
asked_ns_.store(steady_ns(), std::memory_order_relaxed);
const json o = fleet_since(since);
std::string live;
{
std::lock_guard<std::mutex> lk(mu_);
live = fleet_live_;
}
return with_live(o, live);
}
} // namespace server
} // namespace rad
+99
View File
@@ -0,0 +1,99 @@
/* core/server/history.h -- an hour of the dashboard's figures, kept by the process.
*
* A page that keeps its own samples shows nothing of the time before it was opened. The process
* samples once a second instead and keeps an hour: for each model the figures its Performance page
* charts, derived from two consecutive /stats objects, and the requests that finished; for the
* fleet every card's telemetry, every model's state and its bytes on each card. A page loads the
* hour when it opens (`since` 0) and asks for what is new after its last sample from then on.
*
* The sampler is the only reader of the engine on the dashboard's behalf. Every answer here comes
* from what it last read (`live` is the /stats or /admin/fleet object of the latest sample, as
* text), so any number of open pages costs the serving path nothing beyond the one sample a second.
*
* A row is a set of named values at one time; a value a sample did not yield is a gap, not a zero.
* Rates are counter differences over the time between two samples of one start of the model: the
* first sample after a load yields only the instantaneous figures.
*/
#pragma once
#include "server/iface.h"
#include <deque>
#include <map>
#include <mutex>
#include <atomic>
#include <set>
#include <string>
#include <utility>
#include <vector>
namespace rad {
namespace server {
class History {
public:
static constexpr int kKeepS = 3600; /* seconds of samples kept */
/* Rows a ring holds: the hour at the five rows a second a watched page is given. */
static constexpr int kRows = kKeepS * 5;
static constexpr int kRequests = 500; /* finished requests kept for a model */
/* One sample of a model from its /stats object (`body` its text), `t` in unix seconds. */
void model_sample(const std::string& id, const json& stats, double t, std::string body = std::string());
/* One sample of the fleet from /admin/fleet's object. */
void fleet_sample(const json& fleet, double t, std::string body = std::string());
/* A page asked for a body within the last `seconds`. */
bool watched(double seconds) const;
/* A model that is not open right now: its history stays, its live object goes. */
void model_closed(const std::string& id);
/* A model the process no longer serves. */
void forget(const std::string& id);
/* {"keep_s", "t": [...], "c": {name: [...]}, "requests": [...]}: the samples later than
* `since` and the requests that finished after it. A column holds a value or null for every
* time in `t`; a column with no value in the range is left out. An unknown model answers with
* empty arrays. */
json model_since(const std::string& id, double since) const;
/* The fleet's, without `requests`. */
json fleet_since(double since) const;
/* The same as response bodies, with `"live"`: the latest sample's object, null for a model
* that is not open. */
std::string model_body(const std::string& id, double since) const;
std::string fleet_body(double since) const;
using Row = std::vector<std::pair<std::string, double>>;
/* The row two consecutive /stats objects of one model yield (`prev` null for the first, `dt`
* the seconds between them). Exposed for the tests. */
static Row model_row(const json& now, const json* prev, double dt);
/* The row /admin/fleet's object yields. */
static Row fleet_row(const json& fleet);
private:
/* A ring of rows in columns. */
struct Series {
std::vector<double> t;
std::map<std::string, std::vector<float>> c;
size_t head = 0, n = 0;
void push(double at, const Row& row);
void write(json& out, double since) const;
};
struct Model {
Series series;
json prev; /* the last /stats object */
double prev_t = 0;
/* Requests seen and not yet finished, by id, and the finished ones, oldest first. */
std::map<std::string, json> live;
std::set<std::string> done;
std::deque<json> finished;
std::string latest; /* the latest /stats text; empty while not open */
};
void track_requests(Model& m, const json& stats, double t);
mutable std::mutex mu_;
std::map<std::string, Model> models_;
Series fleet_;
std::string fleet_live_;
/* steady_clock nanoseconds of the last body asked for; 0 before the first. */
mutable std::atomic<int64_t> asked_ns_{ 0 };
};
} // namespace server
} // namespace rad
+7 -3
View File
@@ -295,11 +295,11 @@ const char* anthropic_error_type(int status) {
}
/* A refusal the transport or the router writes itself. `type` is OpenAI's; on an Anthropic path
* the status picks Anthropic's instead. Hand-rolled, not nlohmann: this error path must work even
* the status picks Anthropic's instead. Hand-rolled, no DOM: this error path must work even
* if the JSON layer failed. The message can quote a request's decoded path, so bytes that are not
* UTF-8 become U+FFFD; a JSON body must be UTF-8 for a client to parse it. */
static std::string error_body(const std::string& path, int status, const char* type,
const std::string& msg) {
std::string error_body(const std::string& path, int status, const char* type,
const std::string& msg) {
std::string esc;
for (char c : utf8_sanitize(msg)) {
if (c == '"' || c == '\\') { esc.push_back('\\'); esc.push_back(c); }
@@ -626,6 +626,10 @@ int HttpTransport::serve(const Router& router, const TransportOptions& o) {
svr.set_write_timeout(o.write_timeout_s, 0);
svr.set_keep_alive_timeout(o.keep_alive_timeout_s);
svr.set_payload_max_length(o.max_body_bytes);
/* Streamed replies are one small write per token; Nagle would hold a chunk (the final one
* included) for a delayed ACK, which is latency on every token for no throughput gain at
* these write sizes. */
svr.set_tcp_nodelay(true);
const int nt = idle_workers(o.n_threads);
const size_t most = (size_t)std::max<int64_t>(o.max_threads, nt);
+4
View File
@@ -197,6 +197,10 @@ private:
* "message"}}`, so every refusal on one of its paths (/v1/messages and below) is written in it,
* the transport's own included; every other path gets OpenAI's. */
bool anthropic_path(const std::string& path);
/* A refusal's JSON body in the envelope `path` calls for (OpenAI's, or Anthropic's on its paths),
* written without the JSON library so the error path cannot itself fail. */
std::string error_body(const std::string& path, int status, const char* type,
const std::string& msg);
/* Anthropic's error `type` for an HTTP status. */
const char* anthropic_error_type(int status);
+10 -5
View File
@@ -10,8 +10,7 @@
*/
#pragma once
#include "rad_core.h"
#include <nlohmann/json_fwd.hpp>
#include "util/json.h"
#include <map>
#include <memory>
@@ -27,9 +26,10 @@ namespace gen { struct Request; struct AudioRequest; class AudioTicket; struct V
namespace mm { struct Frame; struct Item; }
namespace server {
/* ordered_json, not json: a tool's parameter schema is rendered into the prompt in the caller's
* order, and property order in a schema changes what the model emits. */
using json = nlohmann::ordered_json;
/* The ordered DOM (util/json.h), not a sorted one: a tool's parameter schema is rendered into
* the prompt in the caller's order, and property order in a schema changes what the model
* emits. */
using json = Json;
/* ================================================================== the scheduler
*
@@ -93,6 +93,9 @@ struct SchedMetrics {
double linear_hit_rate = 0.0;
int64_t attn_cached_tokens = 0;
int64_t linear_cached_tokens = 0;
/* Prompt tokens of every admitted request: what the two cached counts above are out of, counted
* at the admission as they are. */
int64_t prefix_queries = 0;
int64_t checkpoints_written = 0;
double prefill_tps = 0.0;
double decode_tps = 0.0;
@@ -431,6 +434,8 @@ public:
virtual bool supports_tools() const = 0;
virtual bool supports_reasoning() const = 0;
/* What the template's tool capability probe threw (ChatCaps::probe_error), or "". */
virtual std::string tools_probe_error() const { return std::string(); }
/* Why this model's tool calls cannot be read, or "" when they can. A template may support
* tools in a format the reply parser does not know; the model still chats, and a request that
+1 -1
View File
@@ -31,7 +31,7 @@
#include "rad_internal.h"
#include "rad_plugin.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <chrono>
+5
View File
@@ -1,4 +1,5 @@
#include "json_partial.h"
#include "util/simd.h"
namespace rad {
namespace server {
@@ -182,6 +183,10 @@ bool json_quote_append(std::string& out, std::string_view s) {
const unsigned char* e = p + s.size();
const unsigned char* run = p; /* [run, p) is verified and goes out as it is */
while (p < e) {
/* Ordinary bytes go out as they are: jump over them a vector at a time to the next
* byte that needs an escape or UTF-8 validation. */
p += simd::first_json_special((const char*)p, (size_t)(e - p));
if (p >= e) break;
const unsigned char c = *p;
if (c >= 0x80) {
/* Sequence length and the allowed range of the second byte, which rejects overlong
+3 -3
View File
@@ -7,7 +7,7 @@
* json_stable_prefix How much may be streamed now? A fragment is JSON-encoded into the SSE
* payload, so it must end on a UTF-8 boundary; a split code point corrupts
* this delta and the next.
* json_quote_append Writes a string literal exactly as nlohmann does, for delta chunks.
* json_quote_append Writes a string literal exactly as Json::dump does, for delta chunks.
*
* A scanner, not a parser: it allocates nothing and builds no DOM.
*/
@@ -33,11 +33,11 @@ size_t utf8_trunc(std::string_view s);
* escape. */
size_t json_stable_prefix(std::string_view s);
/* Append `s` to `out` as a JSON string literal, quotes included, byte for byte as nlohmann's
/* Append `s` to `out` as a JSON string literal, quotes included, byte for byte as Json::dump's
* dump() writes one: `\b \t \n \f \r \" \\` as two characters, other control characters as
* `\u00xx` in lowercase hex, everything else (DEL and non-ASCII included) as itself. Returns
* false with `out` unchanged when `s` is not well-formed UTF-8 (including overlong forms,
* surrogates and code points past U+10FFFF), which nlohmann refuses.
* surrogates and code points past U+10FFFF), which Json::dump refuses.
*
* Streamed chunks use this around a fixed frame: building and dumping a DOM per token cost more
* than the rest of the token's host work. */
+1 -1
View File
@@ -10,7 +10,7 @@
#include "rad_laya.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cctype>
+8 -4
View File
@@ -2,6 +2,7 @@
#include "loras.h"
#include "rad_internal.h"
#include <algorithm>
#include <cmath>
#include <cstdlib>
@@ -29,15 +30,15 @@ bool split_entry(const std::string& s, std::string* name, double* w) {
} /* namespace */
int parse_loras(const nlohmann::json& body, std::string* prompt,
int parse_loras(const Json& body, std::string* prompt,
std::vector<std::pair<std::string, double>>* out, std::string* field,
std::string* why) {
out->clear();
const char* key = body.contains("loras") ? "loras" : "lora";
if (body.contains(key) && !body[key].is_null()) {
*field = key;
const nlohmann::json& v = body[key];
auto entry = [&](const nlohmann::json& e) -> bool {
const Json& v = body[key];
auto entry = [&](const Json& e) -> bool {
std::string name;
double w = 1.0;
if (e.is_string()) {
@@ -58,7 +59,7 @@ int parse_loras(const nlohmann::json& body, std::string* prompt,
return true;
};
if (v.is_array()) {
for (const nlohmann::json& e : v)
for (const Json& e : v)
if (!entry(e)) {
*why = "each entry is a name, \"name:strength\" or {\"name\", \"weight\"}";
return RAD_E_INVAL;
@@ -71,6 +72,9 @@ int parse_loras(const nlohmann::json& body, std::string* prompt,
}
out->push_back({ it.key(), it.value().get<double>() });
}
/* By name, not as written: the adapters apply in the order they are listed, and a
* {name: strength} object has none of its own. */
std::sort(out->begin(), out->end());
} else if (!entry(v)) {
*why = "expected a list of adapters (names, \"name:strength\" or {\"name\", \"weight\"})";
return RAD_E_INVAL;
+2 -2
View File
@@ -11,7 +11,7 @@
*
* A strength not given is 1. */
#pragma once
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <string>
#include <utility>
@@ -22,7 +22,7 @@ namespace server {
/* RAD_OK with the adapters in `out` (possibly none) and their tags removed from *prompt;
* RAD_E_INVAL with `why` for a malformed entry. `field` receives the field the error is about. */
int parse_loras(const nlohmann::json& body, std::string* prompt,
int parse_loras(const Json& body, std::string* prompt,
std::vector<std::pair<std::string, double>>* out, std::string* field,
std::string* why);
+26 -1
View File
@@ -80,6 +80,7 @@ Metrics::Metrics(std::string model_name, int64_t max_model_len)
h_tpot_(buckets_tpot()),
h_e2e_(buckets_latency()),
h_decode_(buckets_latency()),
h_queue_(buckets_latency()),
h_prompt_tokens_(buckets_1_2_5(max_model_len > 0 ? max_model_len : 32768)),
h_generation_tokens_(buckets_1_2_5(max_model_len > 0 ? max_model_len : 32768)),
h_params_n_({1, 2, 5, 10, 20}),
@@ -98,9 +99,17 @@ static const char* reason_str(SuccessReason r) {
}
}
void Metrics::set_cache_config(const std::string& dtype, int64_t block_size, bool prefix_caching,
int64_t prefix_cache_mib) {
cache_labels_ = labels_.substr(0, labels_.size() - 1) + ",cache_dtype=\"" + esc_label(dtype) +
"\",block_size=\"" + std::to_string(block_size) +
"\",enable_prefix_caching=\"" + (prefix_caching ? "True" : "False") +
"\",prefix_cache_mib=\"" + std::to_string(prefix_cache_mib) + "\"}";
}
void Metrics::observe_request(int64_t n_prompt, int64_t n_generated,
double ttft_s, double tpot_s, double e2e_s, double decode_s,
int n_choices, int64_t max_tokens, SuccessReason r) {
double queue_s, int n_choices, int64_t max_tokens, SuccessReason r) {
c_prompt_tokens_.inc((double)n_prompt);
c_generation_tokens_.inc((double)n_generated);
c_success_[(size_t)r].inc();
@@ -116,6 +125,7 @@ void Metrics::observe_request(int64_t n_prompt, int64_t n_generated,
if (tpot_s >= 0.0 && n_generated > 1) h_tpot_.observe(tpot_s);
if (e2e_s >= 0.0) h_e2e_.observe(e2e_s);
if (decode_s >= 0.0 && n_generated > 1) h_decode_.observe(decode_s);
if (queue_s >= 0.0) h_queue_.observe(queue_s);
}
void Metrics::observe_rejected() { c_rejected_.inc(); }
@@ -189,6 +199,7 @@ void Metrics::sample(const SchedMetrics& m) {
c_lookup_held_hits_.advance_to(m.lookup_held_hits);
c_attn_cached_.advance_to(m.attn_cached_tokens);
c_linear_cached_.advance_to(m.linear_cached_tokens);
c_prefix_queries_.advance_to(m.prefix_queries);
c_checkpoints_.advance_to(m.checkpoints_written);
/* The cache's own cumulative counts, turned into deltas like the others. */
c_prefix_evict_.advance_to(m.prefix_evictions);
@@ -305,6 +316,17 @@ std::string Metrics::render() const {
w.out += '\n';
w.gauge("vllm:gpu_prefix_cache_hit_rate",
"GPU prefix cache block hit rate.", L, g_prefix_hit_.get());
/* The same as counters, which sum over time and across instances where the gauge cannot.
* Hits are the tokens a request did not compute again: on a hybrid model the checkpoint it
* resumed from bounds them, not the attention blocks found. */
w.counter("vllm:prefix_cache_queries_total",
"Prompt tokens of admitted requests, each looked up in the prefix cache.",
L, c_prefix_queries_.get());
w.counter("vllm:prefix_cache_hits_total",
"Prompt tokens served from the prefix cache instead of computed.",
L, c_linear_cached_.get());
if (!cache_labels_.empty())
w.gauge("vllm:cache_config_info", "The KV cache's settings, as labels.", cache_labels_, 1.0);
/* ---------------- vLLM-compatible: counters ---------------- */
w.counter("vllm:prompt_tokens_total",
@@ -341,6 +363,9 @@ std::string Metrics::render() const {
"Histogram of end to end request latency in seconds.", L, h_e2e_);
w.hist("vllm:request_decode_time_seconds",
"Histogram of time spent in the decode phase, in seconds.", L, h_decode_);
w.hist("vllm:request_queue_time_seconds",
"Histogram of time a request waited before the scheduler admitted it, in seconds.",
L, h_queue_);
w.hist("vllm:request_prompt_tokens",
"Number of prefill tokens processed.", L, h_prompt_tokens_);
w.hist("vllm:request_generation_tokens",
+8 -2
View File
@@ -89,15 +89,19 @@ public:
Metrics(std::string model_name, int64_t max_model_len);
/* --- observed at the HTTP boundary, per finished request --- */
/* A time below zero was not observed (`queue_s`: the request was never admitted). */
void observe_request(int64_t n_prompt, int64_t n_generated,
double ttft_s, double tpot_s, double e2e_s, double decode_s,
int n_choices, int64_t max_tokens, SuccessReason r);
double queue_s, int n_choices, int64_t max_tokens, SuccessReason r);
void observe_rejected(); /* 429: the admission queue was full */
void observe_disconnect(); /* the client went away mid-stream */
void observe_overflow(); /* the sink ring filled: the HTTP side could not keep up */
void observe_http(int status);
void set_queue_depth(int64_t d) { queue_depth_.set((double)d); }
/* The cache settings vllm:cache_config_info carries as labels; set once, before serving. */
void set_cache_config(const std::string& dtype, int64_t block_size, bool prefix_caching,
int64_t prefix_cache_mib);
/* --- pulled from the scheduler at scrape time --- */
void sample(const SchedMetrics& m);
@@ -109,6 +113,7 @@ public:
private:
std::string model_;
std::string labels_; /* {model_name="...",engine="0"} */
std::string cache_labels_; /* vllm:cache_config_info's; empty until set_cache_config */
Gauge g_running_, g_waiting_, g_kv_util_, g_prefix_hit_;
Gauge g_kv_max_tokens_, g_kv_max_bytes_, g_kv_resident_blocks_;
@@ -152,6 +157,7 @@ private:
Counter c_draft_refills_, c_draft_refill_tokens_;
Counter c_lookup_proposals_, c_lookup_held_, c_lookup_held_drafts_, c_lookup_held_hits_;
Counter c_attn_cached_, c_linear_cached_, c_checkpoints_;
Counter c_prefix_queries_;
Counter c_prefix_evict_, c_prefix_ckpt_evict_;
Counter c_prefix_expired_, c_prefix_ckpt_expired_;
Counter c_prefix_released_, c_prefix_ckpt_released_;
@@ -163,7 +169,7 @@ private:
Counter c_rejected_, c_disconnect_, c_overflow_;
Counter c_http_2xx_, c_http_4xx_, c_http_5xx_;
Histogram h_ttft_, h_tpot_, h_e2e_, h_decode_;
Histogram h_ttft_, h_tpot_, h_e2e_, h_decode_, h_queue_;
Histogram h_prompt_tokens_, h_generation_tokens_, h_params_n_, h_params_max_tokens_;
};
+1 -1
View File
@@ -8,7 +8,7 @@
#include "mica.h"
#include "systemone.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cmath>
+1 -1
View File
@@ -2,7 +2,7 @@
* Other embedding models continue through their existing template/raw-input paths. */
#pragma once
#include "server/iface.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
struct RadModelMeta;
+349 -119
View File
@@ -5,12 +5,16 @@
#include "mm/processor.h"
#include "server/nemotron35.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include "util/rowpool.h"
#include "util/simd.h"
#include <algorithm>
#include <array>
#include <charconv>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <limits>
@@ -44,22 +48,25 @@ static const char kB64[] =
std::string base64_encode(const void* data, size_t len) {
const uint8_t* p = (const uint8_t*)data;
std::string out;
out.reserve((len + 2) / 3 * 4);
size_t i = 0;
std::string out((len + 2) / 3 * 4, '\0');
char* w = out.data();
/* The vector levels take whole blocks; the scalar loop below the rest and the padding. */
size_t i = simd::b64_encode_run(p, len, w);
w += i / 3 * 4;
for (; i + 2 < len; i += 3) {
uint32_t v = (uint32_t)p[i] << 16 | (uint32_t)p[i + 1] << 8 | p[i + 2];
out.push_back(kB64[(v >> 18) & 63]); out.push_back(kB64[(v >> 12) & 63]);
out.push_back(kB64[(v >> 6) & 63]); out.push_back(kB64[v & 63]);
w[0] = kB64[(v >> 18) & 63]; w[1] = kB64[(v >> 12) & 63];
w[2] = kB64[(v >> 6) & 63]; w[3] = kB64[v & 63];
w += 4;
}
if (i < len) {
uint32_t v = (uint32_t)p[i] << 16;
bool two = (i + 1 < len);
if (two) v |= (uint32_t)p[i + 1] << 8;
out.push_back(kB64[(v >> 18) & 63]);
out.push_back(kB64[(v >> 12) & 63]);
out.push_back(two ? kB64[(v >> 6) & 63] : '=');
out.push_back('=');
w[0] = kB64[(v >> 18) & 63];
w[1] = kB64[(v >> 12) & 63];
w[2] = two ? kB64[(v >> 6) & 63] : '=';
w[3] = '=';
}
return out;
}
@@ -83,8 +90,19 @@ bool base64_decode(const std::string& in, std::vector<uint8_t>* out) {
const uint8_t* const end = p + in.size();
uint32_t acc = 0;
int bits = 0;
/* The scalar level has no vector run to offer. */
const uint8_t* vec_from = simd::level() > simd::kScalar ? p : end;
while (p < end) {
/* Fast path: four valid digits at once. */
/* Whole vector blocks of digits, then four valid digits at once. A block the vector
* levels did not take (a line break or padding) is not offered again
* for its 16 bytes, so the scalar path below pays no call per group. */
if (bits == 0 && p >= vec_from && end - p >= 16) {
const size_t k = simd::b64_decode_run(p, (size_t)(end - p), o);
p += k;
o += k / 4 * 3;
if (p == end) break;
vec_from = p + 16;
}
if (bits == 0 && end - p >= 4) {
const int a = kVal[p[0]], b = kVal[p[1]], c = kVal[p[2]], d = kVal[p[3]];
if ((a | b | c | d) >= 0) {
@@ -124,22 +142,11 @@ int64_t json_value_budget(int64_t max_ctx) {
* copy recurse once per level, and a request's schema is serialised on the way to its grammar.
* A few hundred KB of brackets, well inside the value budget, would overflow the worker's stack.
* No legitimate request nests near it; the grammar compiler refuses schemas at half the bound. */
/* The bounded read itself lives in util/json.cpp, where yyjson's transient allocation is
* capped in bytes as the value count is capped here, so a body that is refused has also not
* been allowed to grow memory on its way to the refusal. */
json parse_json_bounded(const std::string& body, int64_t max_ctx, bool* over, bool* deep) {
const int64_t budget = json_value_budget(max_ctx);
int64_t n = 0;
*over = false;
*deep = false;
/* Each completed value counts once: a scalar at `value`, a container at its end. Once over
* or too deep, every event returns false so the parser keeps nothing more. */
json::parser_callback_t keep = [&](int depth, json::parse_event_t ev, json&) {
if (!*deep && depth > kJsonMaxDepth) *deep = true;
if (!*over && (ev == json::parse_event_t::value ||
ev == json::parse_event_t::object_end ||
ev == json::parse_event_t::array_end))
*over = ++n > budget;
return !*over && !*deep;
};
return json::parse(body, keep, /*allow_exceptions=*/false);
return Json::parse_bounded(body, json_value_budget(max_ctx), kJsonMaxDepth, over, deep);
}
bool token_id(const json& v, int32_t* out) {
@@ -246,8 +253,9 @@ ApiError err_internal(const std::string& why) {
namespace {
const char* kAcceptedCommon[] = {
"model", "stream", "stream_options", "n", "seed", "stop", "max_tokens", "n_predict",
"temperature", "top_p", "top_k", "min_p", "typical_p",
"model", "stream", "stream_options", "usage", "n", "seed", "stop", "max_tokens",
"max_completion_tokens", "max_output_tokens", "max_new_tokens", "n_predict",
"temperature", "top_p", "top_k", "min_p", "typical_p", "typ_p",
"presence_penalty", "frequency_penalty", "repetition_penalty", "repeat_penalty",
"repeat_last_n", "xtc_probability", "xtc_threshold",
"dry_multiplier", "dry_base", "dry_allowed_length", "dry_penalty_last_n",
@@ -256,12 +264,14 @@ const char* kAcceptedCommon[] = {
"timings_per_token", "return_progress", "session_id", "n_probs",
"control_vector",
"ngram_ban_n", "ngram_window", "ngram_whitelist", "no_repeat_ngram_whitelist",
"no_repeat_ngram_size", "no_repeat_ngram_window_size",
};
const char* kAcceptedChat[] = {
"messages", "tools", "tool_choice", "response_format", "top_logprobs",
"parallel_tool_calls", "add_generation_prompt", "max_completion_tokens",
"chat_template_kwargs", "reasoning_effort", "enable_thinking", "preserve_thinking",
"chat_template_kwargs", "reasoning_effort", "reasoning", "thinking",
"enable_thinking", "preserve_thinking",
"thinking_token_budget", "thinking_budget", "thinking_budget_tokens",
"reasoning_budget_tokens", "reasoning_format", "continue_final_message",
"functions", "function_call",
@@ -304,6 +314,7 @@ struct Guarded {
bool is_zero(const json& v) { return v.is_null() || (v.is_number() && v.get<double>() == 0.0); }
bool non_positive(const json& v) { return v.is_null() || (v.is_number() && v.get<double>() <= 0.0); }
bool falsy(const json& v) { return v.is_null() || (v.is_boolean() && !v.get<bool>()); }
bool truthy(const json& v) { return v.is_null() || (v.is_boolean() && v.get<bool>()); }
/* json::empty() is false for every string, the empty one included, so a string is tested as one. */
bool empty_value(const json& v) {
if (v.is_string()) return v.get_ref<const std::string&>().empty();
@@ -347,6 +358,15 @@ const Guarded kGuarded[] = {
"a caller's grammar applies from the first token; the lazy form is the chat format's own" },
{ "preserved_tokens", empty_value, "an empty list",
"the chat format names the control tokens a reply keeps" },
/* vLLM's and SGLang's switches for keeping the reasoning out of, or merged into, the
* reply. Their "off" meanings differ between servers, so each is served only at the
* value that matches this server's separated reasoning; `reasoning_format` names the
* same choice here. */
{ "include_reasoning", truthy, "true",
"suppressing the reasoning in a reply is not served; it is returned beside the "
"content (`reasoning_format` names the spellings served)" },
{ "separate_reasoning", truthy, "true",
"merging the reasoning into the content is `reasoning_format: \"none\"` here" },
};
template <size_t N>
@@ -399,7 +419,7 @@ bool get_num(const json& b, const char* k, double* out, ApiError* err) {
}
/* Every integer field read here is stored in 32 bits, so a value that does not fit is refused
* rather than narrowed: 2^32 would become 0 and 2^31 negative, both "no limit" for `max_tokens`.
* nlohmann keeps a literal above INT64_MAX as unsigned, hence the unsigned branch. */
* The DOM keeps a literal above INT64_MAX as unsigned, hence the unsigned branch. */
bool get_int(const json& b, const char* k, int64_t* out, ApiError* err) {
auto it = b.find(k);
if (it == b.end() || it->is_null()) return true;
@@ -744,8 +764,10 @@ static int parse_sampling(const json& b, const OaiLimits& lim, OaiRequest* r, Ap
if (!ok("min_p", d)) return RAD_E_INVAL;
r->sp.min_p = (float)d;
/* /props spells it `typ_p` beside `typical_p`, and llama.cpp's clients echo /props back:
* both names are the one stage, and disagreeing values are refused as elsewhere. */
d = r->sp.typical_p;
if (!get_num(b, "typical_p", &d, err)) return RAD_E_INVAL;
if (!get_any(b, { "typical_p", "typ_p" }, &d, nullptr, err)) return RAD_E_INVAL;
if (!ok("typical_p", d)) return RAD_E_INVAL;
r->sp.typical_p = (float)d;
@@ -854,8 +876,8 @@ static int parse_sampling(const json& b, const OaiLimits& lim, OaiRequest* r, Ap
* what the context leaves; unlike an absent field it ignores --default-max-tokens. */
int64_t mt = 0;
bool mt_named = false;
if (!get_any(b, { "max_tokens", "max_completion_tokens", "n_predict" }, &mt, &mt_named,
err))
if (!get_any(b, { "max_tokens", "max_completion_tokens", "max_output_tokens",
"max_new_tokens", "n_predict" }, &mt, &mt_named, err))
return RAD_E_INVAL;
if (mt_named && mt == 0) { *err = err_bad("max_tokens", "must be >= 1, or -1 for no limit"); return RAD_E_INVAL; }
r->max_tokens = (int32_t)(mt > 0 ? mt : mt < 0 ? 0 : lim.default_max_tokens);
@@ -1017,6 +1039,24 @@ static int parse_sampling(const json& b, const OaiLimits& lim, OaiRequest* r, Ap
bool iu = false;
if (!get_bool(*so, "include_usage", &iu, err)) return RAD_E_INVAL;
r->include_usage = iu;
/* Continuous stats would put a usage object on every chunk; this server sends it in
* the final chunk only, so asking for more is refused rather than dropped. */
bool cont = false;
if (!get_bool(*so, "continuous_usage_stats", &cont, err)) return RAD_E_INVAL;
if (cont) {
*err = err_unsupported("stream_options.continuous_usage_stats",
"usage is sent in the final chunk only; send "
"`stream_options.include_usage`");
return RAD_E_UNSUPPORTED;
}
}
/* OpenRouter's spelling of the same ask, at the top level. */
auto uo = b.find("usage");
if (uo != b.end() && !uo->is_null()) {
if (!uo->is_object()) { *err = err_bad("usage", "expected an object"); return RAD_E_INVAL; }
bool iu = false;
if (!get_bool(*uo, "include", &iu, err)) return RAD_E_INVAL;
if (iu) r->include_usage = true;
}
return RAD_OK;
@@ -1045,11 +1085,20 @@ RequestThinking request_thinking(const json& b) {
auto top = b.find("enable_thinking");
/* An empty reasoning_effort string reads as unset, so it names no effort either. */
auto re = b.find("reasoning_effort");
/* The grouped spellings count as saying something, too: OpenRouter's `reasoning`
* object and Anthropic's `thinking` object, both read in parse_thinking. */
auto ro = b.find("reasoning");
const bool ro_obj = ro != b.end() && ro->is_object();
auto th = b.find("thinking");
const bool th_obj = th != b.end() && th->is_object();
RequestThinking t;
t.effort = (obj && kw->contains("reasoning_effort")) ||
(re != b.end() && re->is_string() && !re->get<std::string>().empty());
(re != b.end() && re->is_string() && !re->get<std::string>().empty()) ||
(ro_obj && ro->contains("effort") && ro->at("effort").is_string() &&
!ro->at("effort").get_ref<const std::string&>().empty());
t.thinking = t.effort || (top != b.end() && !top->is_null()) ||
(obj && kw->contains("enable_thinking"));
(obj && kw->contains("enable_thinking")) ||
(ro_obj && (ro->contains("enabled") || ro->contains("max_tokens"))) || th_obj;
return t;
}
@@ -1143,6 +1192,49 @@ static int parse_thinking(const json& b, const OaiLimits& lim, ChatRenderOptions
}
map_reasoning_effort(lim, opt);
/* OpenRouter groups the same switches in one `reasoning` object on Chat
* (`effort`, `enabled`, `max_tokens`), and Anthropic's `thinking` object names its
* switch by `type`. Both are read onto the flat fields here; the flat spellings,
* read below, still win. `reasoning.exclude` would keep the reasoning out of the
* reply altogether, which is not served, so it is refused rather than dropped --
* silently ignoring it would return the very text the caller asked to withhold.
* A budget in either object is read with the flat ones in parse_thinking_budget. */
std::string grouped_effort;
if (auto ro = b.find("reasoning"); ro != b.end() && !ro->is_null()) {
if (!ro->is_object()) {
*err = err_bad("reasoning", "expected an object");
return RAD_E_INVAL;
}
bool enabled = opt->enable_thinking;
if (!get_bool(*ro, "enabled", &enabled, err)) return RAD_E_INVAL;
if (ro->contains("enabled") && !ro->at("enabled").is_null())
opt->enable_thinking = enabled;
bool exclude = false;
if (!get_bool(*ro, "exclude", &exclude, err)) return RAD_E_INVAL;
if (exclude) {
*err = err_unsupported("reasoning.exclude",
"the reasoning is returned beside the content, or in "
"it with `reasoning_format: \"none\"`; it is not withheld");
return RAD_E_UNSUPPORTED;
}
if (!get_str(*ro, "effort", &grouped_effort, err)) return RAD_E_INVAL;
}
if (auto th = b.find("thinking"); th != b.end() && !th->is_null()) {
if (!th->is_object()) {
*err = err_bad("thinking", "expected an object");
return RAD_E_INVAL;
}
std::string type;
if (!member_str(*th, "type", "thinking.type", &type, err)) return RAD_E_INVAL;
if (type == "disabled" || type == "between_tools") opt->enable_thinking = false;
else if (type == "enabled" || type == "adaptive") opt->enable_thinking = true;
else if (!type.empty()) {
*err = err_bad("thinking.type", "must be \"enabled\", \"adaptive\", "
"\"disabled\" or \"between_tools\"");
return RAD_E_INVAL;
}
}
bool think = opt->enable_thinking;
if (!get_bool(b, "enable_thinking", &think, err)) return RAD_E_INVAL;
opt->enable_thinking = think;
@@ -1169,6 +1261,7 @@ static int parse_thinking(const json& b, const OaiLimits& lim, ChatRenderOptions
* emplace does not overwrite. */
std::string effort;
if (!get_str(b, "reasoning_effort", &effort, err)) return RAD_E_INVAL;
if (effort.empty()) effort = grouped_effort;
/* --reasoning-effort-map, before "none" and "minimal" are read, so a map can name either. */
if (auto m = lim.reasoning_effort_map.find(effort);
!effort.empty() && m != lim.reasoning_effort_map.end())
@@ -1354,21 +1447,21 @@ static bool json_text_too_deep(const std::string& s) {
* Tool-call arguments and tool-message content arrive as strings; the template layer parses and
* re-serialises them recursively, so a string of brackets could overflow the worker's stack. */
static int check_template_json(const json& msg, const std::string& role, ApiError* err) {
if (role == "assistant") {
auto tcs = msg.find("tool_calls");
if (tcs != msg.end() && tcs->is_array()) {
for (const auto& tc : *tcs) {
if (!tc.is_object()) continue;
auto fn = tc.find("function");
if (fn == tc.end() || !fn->is_object()) continue;
auto args = fn->find("arguments");
if (args != fn->end() && args->is_string() &&
json_text_too_deep(args->get_ref<const std::string&>())) {
*err = err_bad("messages[].tool_calls[].function.arguments",
"nests more than " + std::to_string(kJsonMaxDepth) +
" levels deep");
return RAD_E_INVAL;
}
/* Whatever the role: the chat lift reads tool_calls on any message, and parses their
* arguments text recursively. */
auto tcs = msg.find("tool_calls");
if (tcs != msg.end() && tcs->is_array()) {
for (const auto& tc : *tcs) {
if (!tc.is_object()) continue;
auto fn = tc.find("function");
if (fn == tc.end() || !fn->is_object()) continue;
auto args = fn->find("arguments");
if (args != fn->end() && args->is_string() &&
json_text_too_deep(args->get_ref<const std::string&>())) {
*err = err_bad("messages[].tool_calls[].function.arguments",
"nests more than " + std::to_string(kJsonMaxDepth) +
" levels deep");
return RAD_E_INVAL;
}
}
}
@@ -1537,13 +1630,21 @@ static int lower_content_parts(json& messages, const OaiDeps& d, const OaiLimits
}
type = tit->get<std::string>();
if (type == "text") {
if (type == "text" || type == "input_text" || type == "output_text") {
if (!part.contains("text") || !part.at("text").is_string()) {
*err = err_bad("messages[].content[].text", "expected a string");
return RAD_E_INVAL;
}
/* The Responses API's names for a text part, in a Chat message: the chat
* layer reads only `text`, so the part is renamed on its way there. */
part["type"] = "text";
continue;
}
/* Reasoning carried as a part is moved onto the message by the chat layer
* (core/text/chat.cpp); it is admitted here and left for that pass. */
if (type == "thinking" || type == "reasoning" || type == "reasoning_text" ||
type == "redacted_thinking")
continue;
/* Media parts (read_media_part) become a media_marker part, not text: the chat layer
* joins text parts with a newline but a marker with nothing, matching the model's own
* template (<|vision_end|> runs straight into the following text). As text, each
@@ -1763,6 +1864,30 @@ static int parse_thinking_budget(const json& b, const OaiDeps& d, const OaiLimit
budget = v;
named = k;
}
/* The grouped spellings carry the same budget: OpenRouter's `reasoning.max_tokens`
* and Anthropic's `thinking.budget_tokens`. A second, disagreeing budget is refused
* like the flat spellings above. */
{
struct Grouped { const char* outer; const char* inner; const char* name; };
for (const Grouped g :
{ Grouped{ "reasoning", "max_tokens", "reasoning.max_tokens" },
Grouped{ "thinking", "budget_tokens", "thinking.budget_tokens" } }) {
auto outer = b.find(g.outer);
if (outer == b.end() || !outer->is_object()) continue;
auto inner = outer->find(g.inner);
if (inner == outer->end() || inner->is_null()) continue;
int64_t v = 0;
if (!get_int(*outer, g.inner, &v, err)) return RAD_E_INVAL;
if (v < 0) v = -1;
if (named && v != budget) {
*err = err_bad(g.name, std::string("disagrees with ") + named +
", which is the same field");
return RAD_E_INVAL;
}
budget = v;
named = g.name;
}
}
if (!named) {
if (span.known()) sp->thinking_budget = (int32_t)lim.default_thinking_budget;
return RAD_OK;
@@ -1949,7 +2074,10 @@ int parse_chat_request(const std::string& body, const OaiDeps& d, const OaiLimit
return RAD_E_INVAL;
}
if (fcall->is_string()) {
b["tool_choice"] = *fcall;
/* By value first: inserting "tool_choice" can reallocate b's member vector,
* which fcall points into. */
const json choice = *fcall;
b["tool_choice"] = choice;
} else if (fcall->is_object() && fcall->contains("name") && fcall->at("name").is_string()) {
b["tool_choice"] = json{ { "type", "function" },
{ "function", { { "name", fcall->at("name") } } } };
@@ -1959,22 +2087,34 @@ int parse_chat_request(const std::string& body, const OaiDeps& d, const OaiLimit
}
}
/* tools and tool_choice. */
/* tools and tool_choice. The Responses API spells a function tool flat
* ({"type":"function","name":..., "parameters":...}) where Chat nests it under
* `function`; unified SDKs send the flat form to both, so it is folded into the
* nested one here, as the deprecated `functions` list is above. */
json tools = json::array();
auto tit = b.find("tools");
if (tit != b.end() && !tit->is_null()) {
if (!tit->is_array()) { *err = err_bad("tools", "expected an array"); return RAD_E_INVAL; }
for (const auto& t : *tit) {
if (!t.is_object() || !t.contains("type") || t.at("type") != "function" ||
!t.contains("function") || !t.at("function").is_object() ||
!t.at("function").contains("name") ||
!t.at("function").at("name").is_string()) {
json tool = t;
if (tool.is_object() && tool.contains("type") && tool.at("type") == "function" &&
!tool.contains("function") && tool.contains("name") &&
tool.at("name").is_string()) {
json fn = json::object();
for (auto it = tool.begin(); it != tool.end(); ++it)
if (it.key() != "type") fn[it.key()] = it.value();
tool = json{ { "type", "function" }, { "function", std::move(fn) } };
}
if (!tool.is_object() || !tool.contains("type") || tool.at("type") != "function" ||
!tool.contains("function") || !tool.at("function").is_object() ||
!tool.at("function").contains("name") ||
!tool.at("function").at("name").is_string()) {
*err = err_bad("tools[]",
"expected {\"type\":\"function\",\"function\":{\"name\":...}}");
return RAD_E_INVAL;
}
tools.push_back(std::move(tool));
}
tools = *tit;
out->n_tools = (int)tools.size();
}
@@ -1988,13 +2128,18 @@ int parse_chat_request(const std::string& body, const OaiDeps& d, const OaiLimit
tool_choice = tcit->get<std::string>();
} else if (tcit->is_object()) {
auto f = tcit->find("function");
if (f == tcit->end() || !f->is_object() || !f->contains("name") ||
if ((f == tcit->end() || !f->is_object()) && tcit->contains("name") &&
tcit->at("name").is_string()) {
/* The flat Responses spelling: {"type":"function","name":...}. */
named = tcit->at("name").get<std::string>();
tool_choice = "required";
} else if (f == tcit->end() || !f->is_object() || !f->contains("name") ||
!f->at("name").is_string()) {
*err = err_bad("tool_choice",
"an object tool_choice must be {\"type\":\"function\","
"\"function\":{\"name\":...}}");
return RAD_E_INVAL;
}
} else
named = f->at("name").get<std::string>();
tool_choice = "required";
} else {
@@ -2032,8 +2177,14 @@ int parse_chat_request(const std::string& body, const OaiDeps& d, const OaiLimit
if (!get_bool(b, "parallel_tool_calls", &parallel, err)) return RAD_E_INVAL;
if (!tools.empty() && !d.chat->supports_tools()) {
/* A probe that threw says so: the template may declare tools and call something the
* engine lacks (ChatCaps::probe_error). */
const std::string probe = d.chat->tools_probe_error();
*err = err_unsupported("tools",
"this model's chat template does not declare tool support");
probe.empty()
? "this model's chat template does not declare tool support"
: "this model's chat template failed the tool capability "
"probe: " + probe);
return RAD_E_UNSUPPORTED;
}
if (!tools.empty()) {
@@ -2656,7 +2807,7 @@ int parse_embeddings_request(const std::string& body, const OaiDeps& d, const Oa
return RAD_E_INVAL;
}
const std::string type = tit->get<std::string>();
if (type == "text") {
if (type == "text" || type == "input_text" || type == "output_text") {
if (!part.contains("text") || !part.at("text").is_string()) {
*e = err_bad("input[].text", "expected a string");
return RAD_E_INVAL;
@@ -2963,7 +3114,13 @@ std::string chat_completion_body(const OaiRequest& r, const std::vector<ChoiceOu
m["role"] = "assistant";
if (c.msg.content.empty() && !c.msg.tool_calls.empty()) m["content"] = nullptr;
else m["content"] = c.msg.content;
if (!c.msg.reasoning.empty()) m["reasoning_content"] = c.msg.reasoning;
/* Both spellings, the one text: llama.cpp's clients read `reasoning_content`,
* vLLM's and OpenRouter's read `reasoning`. A client that takes only the other
* name would drop the reasoning at receipt and replay none of it. */
if (!c.msg.reasoning.empty()) {
m["reasoning_content"] = c.msg.reasoning;
m["reasoning"] = c.msg.reasoning;
}
if (!c.msg.tool_calls.empty() && r.legacy_functions)
m["function_call"] = json{ { "name", c.msg.tool_calls[0].name },
{ "arguments", c.msg.tool_calls[0].arguments } };
@@ -3000,28 +3157,69 @@ std::string text_completion_body(const OaiRequest& r, const std::vector<ChoiceOu
return completion_object(r, "text_completion", std::move(arr), u, t);
}
/* One embedding value, as JSON: the shortest digits that read back as the float, so a reader
* narrowing to float gets the engine's value exactly and one parsing a double gets its nearest
* decimal (OpenAI's spelling of the same values). A non-finite value is null, as the DOM writes
* it. */
static void append_json_f32(std::string& out, float v) { json_append_float(out, v); }
std::string embeddings_body(const OaiRequest& r, const std::vector<std::vector<float>>& vecs,
const UsageOut& u) {
json data = json::array();
for (size_t i = 0; i < vecs.size(); ++i) {
json e;
e["object"] = "embedding";
if (r.base64_embeddings)
e["embedding"] = base64_encode(vecs[i].data(), vecs[i].size() * sizeof(float));
else
e["embedding"] = vecs[i];
e["index"] = (int64_t)i;
data.push_back(std::move(e));
/* Written, not built: a batch is hundreds of thousands of floats, and a DOM node plus a
* dump per float cost about twice the direct write (measured in hostbench's embeddings
* bench). The object shape and key order are the DOM's. */
std::string out;
size_t est = 128 + r.model.size();
int64_t floats = 0;
for (const auto& v : vecs) {
est += 48 + (r.base64_embeddings ? v.size() * sizeof(float) / 3 * 4 + 4 : v.size() * 20);
floats += (int64_t)v.size();
}
json usage;
usage["prompt_tokens"] = u.prompt;
usage["total_tokens"] = u.prompt;
json o;
o["object"] = "list";
o["data"] = std::move(data);
o["model"] = r.model;
o["usage"] = std::move(usage);
return o.dump();
out.reserve(est);
auto spell = [](std::string& o, const std::vector<float>& v) {
o += '[';
for (size_t j = 0; j < v.size(); ++j) {
if (j) o += ',';
append_json_f32(o, v[j]);
}
o += ']';
};
/* A batch's vectors are spelled on the row pool, each into its own string, and joined in
* order: the shortest spelling of a float is ~40 ns, a millisecond for 32 vectors of 768. */
constexpr int64_t kParFloats = 16384;
std::vector<std::string> spelled;
if (!r.base64_embeddings && vecs.size() > 1 && floats >= kParFloats) {
spelled.resize(vecs.size());
row_pool_run((int64_t)vecs.size(), 8, [&](int64_t i) {
spelled[(size_t)i].reserve(vecs[(size_t)i].size() * 20 + 2);
spell(spelled[(size_t)i], vecs[(size_t)i]);
});
}
out += "{\"object\":\"list\",\"data\":[";
for (size_t i = 0; i < vecs.size(); ++i) {
if (i) out += ',';
out += "{\"object\":\"embedding\",\"embedding\":";
if (r.base64_embeddings) {
out += '"';
out += base64_encode(vecs[i].data(), vecs[i].size() * sizeof(float));
out += '"';
} else if (!spelled.empty()) {
out += spelled[i];
} else {
spell(out, vecs[i]);
}
out += ",\"index\":";
out += std::to_string(i);
out += '}';
}
out += "],\"model\":";
if (!json_quote_append(out, r.model)) out += json(r.model).dump();
out += ",\"usage\":{\"prompt_tokens\":";
out += std::to_string(u.prompt);
out += ",\"total_tokens\":";
out += std::to_string(u.prompt);
out += "}}";
return out;
}
std::string rerank_body(const OaiRequest& r, const std::vector<std::vector<float>>& scores,
@@ -3202,8 +3400,8 @@ std::string ChatDeltaStream::chunk(json delta, const char* finish_reason, const
}
void ChatDeltaStream::delta_open(std::string& out) {
/* Built from nlohmann's serialisation of each field, on first use rather than in the
* constructor, so a field nlohmann refuses throws where chunk() would. */
/* Built from Json::dump of each field, on first use rather than in the constructor,
* so a field dump() refuses throws where chunk() would. */
if (head_.empty())
head_ = "data: {\"id\":" + json(id_).dump() +
",\"object\":\"chat.completion.chunk\",\"created\":" + json(created_).dump() +
@@ -3239,7 +3437,7 @@ void ChatDeltaStream::set_timings(const TimingsOut& t) {
if (t.valid) timings_ = "\"timings\":" + timings_json(t).dump();
}
/* Malformed UTF-8 falls back to nlohmann, which throws the same exception chunk() would. */
/* Malformed UTF-8 falls back to Json::dump, which throws the same exception chunk() would. */
void ReplyStream::quote(std::string& out, std::string_view s) {
if (!json_quote_append(out, s)) out += json(std::string(s)).dump();
}
@@ -3275,8 +3473,11 @@ std::string ChatDeltaStream::emit(const std::vector<ReplyDelta>& ev) {
delta_open(out);
switch (d.kind) {
case ReplyDelta::Reasoning:
/* Both spellings of the one delta, as in chat_completion_body. */
out += "{\"reasoning_content\":";
quote(out, d.text);
out += ",\"reasoning\":";
quote(out, d.text);
out += '}';
break;
case ReplyDelta::Content:
@@ -4006,8 +4207,8 @@ std::string anthropic_message_body(const OaiRequest& r, const ChoiceOut& c, cons
if (!text.empty()) blocks.push_back(json{ { "type", "text" }, { "text", text } });
for (const ToolCall& tc : c.msg.tool_calls) {
/* The same bound the streaming path applies: `arguments` is model output, and
* json_complete's depth-capped scan must run before nlohmann's recursion and its
* teardown, neither of which bounds depth on its own. Too deep or incomplete reads as
* json_complete's depth-capped scan must run before the DOM's teardown, which does
* not bound depth on its own. Too deep or incomplete reads as
* an empty input, as a discarded parse did. */
json in = json::object();
if (json_complete(tc.arguments)) {
@@ -4052,6 +4253,22 @@ void AnthropicStream::event(std::string& out, const char* type, const json& data
out += "\n\n";
}
/* The bytes event() writes for a content_block_delta, without the DOM: this is the per-token
* event, and building and dumping a four-level object for one short string cost an order of
* magnitude more than the OpenAI chunk's hand-written path (hostbench stream_cost). */
void AnthropicStream::delta(std::string& out, const char* dtype, const char* field,
std::string_view text) {
out += "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":";
out += std::to_string(n_blocks_ - 1);
out += ",\"delta\":{\"type\":\"";
out += dtype;
out += "\",\"";
out += field;
out += "\":";
quote(out, text);
out += "}}\n\n";
}
std::string AnthropicStream::first_chunk() { return std::string(); }
std::string AnthropicStream::started() {
@@ -4073,14 +4290,19 @@ std::string AnthropicStream::started() {
void AnthropicStream::open(std::string& out, Block b, const ToolCall* tc) {
close(out);
json cb;
if (b == Block::Thinking)
cb = { { "type", "thinking" }, { "thinking", "" }, { "signature", "" } };
else if (b == Block::Text) cb = { { "type", "text" }, { "text", "" } };
else cb = { { "type", "tool_use" }, { "id", tc->id }, { "name", tc->name },
{ "input", json::object() } };
event(out, "content_block_start",
json{ { "type", "content_block_start" }, { "index", n_blocks_ }, { "content_block", cb } });
out += "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":";
out += std::to_string(n_blocks_);
out += ",\"content_block\":";
if (b == Block::Thinking) out += "{\"type\":\"thinking\",\"thinking\":\"\",\"signature\":\"\"}";
else if (b == Block::Text) out += "{\"type\":\"text\",\"text\":\"\"}";
else {
out += "{\"type\":\"tool_use\",\"id\":";
quote(out, tc->id);
out += ",\"name\":";
quote(out, tc->name);
out += ",\"input\":{}}";
}
out += "}\n\n";
++n_blocks_;
block_ = b;
}
@@ -4089,11 +4311,10 @@ void AnthropicStream::close(std::string& out) {
if (block_ == Block::None) return;
/* A thinking block ends with its signature, which clients send back next turn. A local model
* has none; the empty one matches llama-server. */
if (block_ == Block::Thinking)
event(out, "content_block_delta",
json{ { "type", "content_block_delta" }, { "index", n_blocks_ - 1 },
{ "delta", { { "type", "signature_delta" }, { "signature", "" } } } });
event(out, "content_block_stop", json{ { "type", "content_block_stop" }, { "index", n_blocks_ - 1 } });
if (block_ == Block::Thinking) delta(out, "signature_delta", "signature", std::string_view());
out += "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":";
out += std::to_string(n_blocks_ - 1);
out += "}\n\n";
block_ = Block::None;
}
@@ -4104,9 +4325,7 @@ std::string AnthropicStream::emit(const std::vector<ReplyDelta>& ev) {
switch (d.kind) {
case ReplyDelta::Reasoning:
if (block_ != Block::Thinking) open(out, Block::Thinking, nullptr);
event(out, "content_block_delta",
json{ { "type", "content_block_delta" }, { "index", n_blocks_ - 1 },
{ "delta", { { "type", "thinking_delta" }, { "thinking", d.text } } } });
delta(out, "thinking_delta", "thinking", d.text);
break;
case ReplyDelta::Content: {
/* The prefill is the caller's own text; Anthropic's API answers what follows it, and
@@ -4131,9 +4350,7 @@ std::string AnthropicStream::emit(const std::vector<ReplyDelta>& ev) {
open(out, Block::Tool, &last_.tool_calls.back());
break;
case ReplyDelta::CallArgs:
event(out, "content_block_delta",
json{ { "type", "content_block_delta" }, { "index", n_blocks_ - 1 },
{ "delta", { { "type", "input_json_delta" }, { "partial_json", d.text } } } });
delta(out, "input_json_delta", "partial_json", d.text);
break;
case ReplyDelta::CallEnd:
close(out);
@@ -4146,9 +4363,7 @@ std::string AnthropicStream::emit(const std::vector<ReplyDelta>& ev) {
void AnthropicStream::text_delta(std::string& out, const std::string& text) {
if (text.empty()) return;
if (block_ != Block::Text) open(out, Block::Text, nullptr);
event(out, "content_block_delta",
json{ { "type", "content_block_delta" }, { "index", n_blocks_ - 1 },
{ "delta", { { "type", "text_delta" }, { "text", text } } } });
delta(out, "text_delta", "text", text);
}
/* Content held against the prefill is the reply's own text once nothing more can complete the
@@ -4578,6 +4793,28 @@ void ResponsesStream::event(std::string& out, const char* type, json data) {
out += "\n\n";
}
/* The bytes event() writes for a delta, without the DOM: `type` and `sequence_number` come last,
* as event() appends them. As with Anthropic's, the per-token DOM dump cost an order of
* magnitude more than the hand-written chunk. */
void ResponsesStream::delta_event(std::string& out, const char* type, bool content_index,
bool logprobs, std::string_view text) {
out += "event: ";
out += type;
out += "\ndata: {\"item_id\":";
quote(out, item_id_);
out += ",\"output_index\":";
out += std::to_string((int64_t)items_.size());
if (content_index) out += ",\"content_index\":0";
out += ",\"delta\":";
quote(out, text);
if (logprobs) out += ",\"logprobs\":[]";
out += ",\"type\":\"";
out += type;
out += "\",\"sequence_number\":";
out += std::to_string(seq_++);
out += "}\n\n";
}
json ResponsesStream::response(const char* status) const {
const bool done = std::strcmp(status, "in_progress") != 0;
return response_object(*r_, status, json(items_), done ? &usage_ : nullptr, incomplete_);
@@ -4658,29 +4895,22 @@ std::string ResponsesStream::emit(const std::vector<ReplyDelta>& ev) {
std::string out;
for (const ReplyDelta& d : ev) {
if (!absorb(d)) continue;
/* The open item's index; read after open(), which may close one first. */
auto at = [this] { return (int64_t)items_.size(); };
switch (d.kind) {
case ReplyDelta::Reasoning:
if (item_ != Item::Reasoning) open(out, Item::Reasoning, 0);
text_ += d.text;
event(out, "response.reasoning_text.delta",
json{ { "item_id", item_id_ }, { "output_index", at() },
{ "content_index", 0 }, { "delta", d.text } });
delta_event(out, "response.reasoning_text.delta", true, false, d.text);
break;
case ReplyDelta::Content:
if (item_ != Item::Message) open(out, Item::Message, 0);
text_ += d.text;
event(out, "response.output_text.delta",
json{ { "item_id", item_id_ }, { "output_index", at() },
{ "content_index", 0 }, { "delta", d.text }, { "logprobs", json::array() } });
delta_event(out, "response.output_text.delta", true, true, d.text);
break;
case ReplyDelta::CallBegin:
open(out, Item::Call, last_.tool_calls.size() - 1);
break;
case ReplyDelta::CallArgs:
event(out, "response.function_call_arguments.delta",
json{ { "item_id", item_id_ }, { "output_index", at() }, { "delta", d.text } });
delta_event(out, "response.function_call_arguments.delta", false, false, d.text);
break;
case ReplyDelta::CallEnd:
close(out);
+7 -3
View File
@@ -53,9 +53,7 @@ ApiError err_internal(const std::string& why);
* to an empty list), otherwise llama.cpp's four (newline, colon, quote, asterisk). */
std::vector<std::string> dry_breakers(const std::vector<std::string>& deployment, bool set);
/* Out of line on purpose: inlined, nlohmann's dump() trips a GCC 16 false-positive warning
* (a speculatively devirtualised shared_ptr release reported as an out-of-bounds destroy) that
* comes and goes with how deeply the caller inlines. */
/* One dump entry point for response bodies, so every builder above serialises the same way. */
std::string json_dump(const json& j);
/* ================================================================== a parsed request */
@@ -592,6 +590,9 @@ private:
void close(std::string& out);
void text_delta(std::string& out, const std::string& text);
void release_held(std::string& out);
/* The per-token delta event written directly (see ChatDeltaStream): the bytes the DOM dump
* produced, without building one. */
void delta(std::string& out, const char* dtype, const char* field, std::string_view text);
static void event(std::string& out, const char* type, const json& data);
const OaiRequest* r_;
@@ -622,6 +623,9 @@ private:
std::string emit(const std::vector<ReplyDelta>& ev) override;
void open(std::string& out, Item k, size_t call);
void close(std::string& out);
/* The per-token delta event written directly: the bytes event() produced, without the DOM. */
void delta_event(std::string& out, const char* type, bool content_index, bool logprobs,
std::string_view text);
void event(std::string& out, const char* type, json data);
json response(const char* status) const;
+2 -2
View File
@@ -44,7 +44,7 @@
#include "mm/resample.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <chrono>
@@ -60,7 +60,7 @@ namespace server {
namespace {
using ojson = nlohmann::ordered_json;
using ojson = Json;
using Clock = std::chrono::steady_clock;
/* A pass once this much audio has come in since the turn's last one began. */
+64 -30
View File
@@ -11,7 +11,7 @@
#include "rad_internal.h"
#include "text/tokenizer.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cctype>
@@ -27,6 +27,9 @@ namespace server {
Server::Server(const Deps& d, const ServerOptions& o)
: deps_(d), opt_(o),
metrics_(o.model_id, o.max_ctx > 0 ? o.max_ctx : 32768) {
if (!opt_.kv_cache_dtype.empty())
metrics_.set_cache_config(opt_.kv_cache_dtype, opt_.kv_block_size, opt_.prefix_cache,
opt_.prefix_cache_mib);
lim_.model_id = opt_.model_id;
lim_.version = opt_.version;
lim_.max_ctx = opt_.max_ctx;
@@ -120,13 +123,13 @@ void Server::register_routes() {
router_.post("/v1/embeddings", [this](const HttpRequest& q) { return handle_embeddings(q); });
router_.post("/rerank", [this](const HttpRequest& q) { return handle_rerank(q); });
router_.post("/v1/rerank", [this](const HttpRequest& q) { return handle_rerank(q); });
router_.post("/v1/images/generations", [this](const HttpRequest& q) { return handle_images(q, false); });
router_.post("/v1/images/edits", [this](const HttpRequest& q) { return handle_images(q, true); });
router_.post("/v1/images/generations", [this](const HttpRequest& q) { return run_job(q, &Server::handle_image_generate); });
router_.post("/v1/images/edits", [this](const HttpRequest& q) { return run_job(q, &Server::handle_image_edit); });
router_.post("/v1/systemone", [this](const HttpRequest& q) { return handle_systemone(q); });
/* LiteLLM's name for the same endpoint. */
router_.post("/v1/decisions", [this](const HttpRequest& q) { return handle_systemone(q); });
/* Speech to text, for a model whose plugin says how it transcribes (RadAudioFormat). */
router_.post("/v1/audio/speech", [this](const HttpRequest& q) { return handle_speech(q); });
router_.post("/v1/audio/speech", [this](const HttpRequest& q) { return run_job(q, &Server::handle_speech); });
router_.post("/v1/videos", [this](const HttpRequest& q) { return handle_video_create(q); });
router_.get ("/v1/videos", [this](const HttpRequest& q) { return handle_video_list(q); });
router_.get ("/v1/videos/:id", [this](const HttpRequest& q) { return handle_video_get(q); });
@@ -135,7 +138,7 @@ void Server::register_routes() {
router_.get ("/v1/videos/:id/content",
[this](const HttpRequest& q) { return handle_video_content(q); });
/* Hunyuan3D-2's API server: a shape from a picture. */
router_.post("/generate", [this](const HttpRequest& q) { return handle_shape_generate(q); });
router_.post("/generate", [this](const HttpRequest& q) { return run_job(q, &Server::handle_shape_generate); });
router_.post("/send", [this](const HttpRequest& q) { return handle_shape_send(q); });
router_.get ("/status/:uid", [this](const HttpRequest& q) { return handle_shape_status(q); });
router_.post("/v1/audio/transcriptions",
@@ -179,10 +182,10 @@ void Server::register_routes() {
router_.post("/completions", [this](const HttpRequest& q) { return handle_native_completion(q); });
router_.post("/infill", [this](const HttpRequest& q) { return handle_infill(q); });
router_.post("/embeddings", [this](const HttpRequest& q) { return handle_embeddings(q); });
router_.post("/images/generations", [this](const HttpRequest& q) { return handle_images(q, false); });
router_.post("/images/edits", [this](const HttpRequest& q) { return handle_images(q, true); });
router_.post("/images/generations", [this](const HttpRequest& q) { return run_job(q, &Server::handle_image_generate); });
router_.post("/images/edits", [this](const HttpRequest& q) { return run_job(q, &Server::handle_image_edit); });
router_.post("/audio/transcriptions", [this](const HttpRequest& q) { return handle_transcription(q); });
router_.post("/audio/speech", [this](const HttpRequest& q) { return handle_speech(q); });
router_.post("/audio/speech", [this](const HttpRequest& q) { return run_job(q, &Server::handle_speech); });
router_.get ("/models", [this](const HttpRequest& q) { return handle_models(q); });
/* llama-server's: the prompt a chat request renders to, and how many tokens it is. */
router_.post("/apply-template", [this](const HttpRequest& q) { return handle_apply_template(q); });
@@ -258,6 +261,9 @@ void Server::register_routes() {
* keeps probes, the dashboard, 429 answers and idle keep-alive connections serviceable. The same
* number bounds the connections that may wait once the reserve is busy too. */
static const int64_t kSpareWorkers = 64;
/* What a request hears when its model stops or goes off its cards while it runs. The rest of the
* process serves on, and the model comes back for the next request. */
static const char* const kLeaving = "this model is stopping or leaving its cards; send the request again";
void Server::note_ready(uint64_t begin_ns) {
if (begin_ns == 0) return;
@@ -375,8 +381,12 @@ std::string Server::check_thinking_budget() const {
}
void Server::stop() {
stopping_.store(true);
transport_.stop();
retire();
}
void Server::retire() {
stopping_.store(true);
stop_videos();
stop_shapes();
drain_graveyard(2000);
@@ -606,8 +616,7 @@ std::optional<HttpResponse> Server::abandoned(const HttpRequest& req,
if (r) record(*r, gens, Finish::Cancelled);
retire(gens);
release(n);
if (!gone)
return error_response(err_overloaded("the server is shutting down"), req.peer, shape);
if (!gone) return error_response(err_overloaded(kLeaving), req.peer, shape);
metrics_.observe_http(499);
return HttpResponse::text(499, "client closed request\n");
}
@@ -924,9 +933,14 @@ void Server::record(const OaiRequest& r, const std::vector<Generation>& gens, Fi
for (const auto& p : r.prompts) n_prompt += (int64_t)p.tokens.size();
int64_t n_gen = 0;
double ttft = -1.0, tpot = -1.0, decode = -1.0, e2e = 0.0;
double ttft = -1.0, tpot = -1.0, decode = -1.0, e2e = 0.0, queue = -1.0;
for (const auto& g : gens) {
int64_t produced = g.sink->n_produced();
/* Arrival to the first admission among the request's choices. */
if (const int64_t ta = g.sink->t_admitted_ns(); ta >= 0) {
const double t = (double)ta * 1e-9;
queue = queue < 0 ? t : std::min(queue, t);
}
n_gen += produced;
e2e = std::max(e2e, (double)g.sink->age_ns() * 1e-9);
int64_t tf = g.sink->t_first_token_ns(), tl = g.sink->t_last_token_ns();
@@ -941,7 +955,7 @@ void Server::record(const OaiRequest& r, const std::vector<Generation>& gens, Fi
}
}
}
metrics_.observe_request(n_prompt, n_gen, ttft, tpot, e2e, decode,
metrics_.observe_request(n_prompt, n_gen, ttft, tpot, e2e, decode, queue,
r.n, r.max_tokens, to_reason(overall));
/* The request log's closing line: this request's share of what /metrics aggregates (finish,
@@ -1068,9 +1082,9 @@ HttpResponse Server::blocking_completion(const HttpRequest& req, OaiRequest& r)
/* ------------------------------------------------------------------ llama-server's native shape */
/* What a request was served with, under llama-server's names: its `generation_settings`. */
static nlohmann::ordered_json native_settings(const OaiRequest& r) {
static json native_settings(const OaiRequest& r) {
const SamplingParams& sp = r.sp;
nlohmann::ordered_json p;
json p;
p["seed"] = sp.seed;
p["temperature"] = sp.temp;
p["top_k"] = sp.top_k;
@@ -1119,7 +1133,7 @@ json Server::native_result(const OaiRequest& r, const Generation& g, const std::
const Sink* one = g.sink.get();
const TimingsOut t = timings_of(&one, 1, r.t_received_ns);
const int64_t n_prompt = (int64_t)r.prompts[(size_t)g.prompt_index].tokens.size();
nlohmann::ordered_json o;
json o;
o["index"] = g.index;
o["content"] = content;
o["tokens"] = r.return_tokens ? g.tokens : std::vector<int32_t>{};
@@ -1141,7 +1155,7 @@ json Server::native_result(const OaiRequest& r, const Generation& g, const std::
if (r.want_logprobs && !r.stream) {
const std::vector<LogprobEntry> kept = kept_logprobs(g.logprobs, g.stop_cut);
o["completion_probabilities"] =
nlohmann::ordered_json::parse("[" + logprobs_content(kept.data(), kept.size()) + "]");
json::parse("[" + logprobs_content(kept.data(), kept.size()) + "]");
}
return o;
}
@@ -1151,19 +1165,19 @@ json Server::native_result(const OaiRequest& r, const Generation& g, const std::
static std::string text_chunk(const OaiRequest& r, int index, const std::string& delta,
const char* finish_reason, const TimingsOut* t = nullptr,
const std::string& logprobs = std::string()) {
nlohmann::ordered_json ch;
json ch;
ch["text"] = delta;
ch["index"] = index;
if (!logprobs.empty()) ch["logprobs"] = nlohmann::ordered_json::parse(logprobs);
if (!logprobs.empty()) ch["logprobs"] = json::parse(logprobs);
else ch["logprobs"] = nullptr;
if (finish_reason) ch["finish_reason"] = finish_reason; else ch["finish_reason"] = nullptr;
nlohmann::ordered_json o;
json o;
o["id"] = r.id;
o["object"] = "text_completion";
o["created"] = r.created;
o["model"] = r.model;
if (!r.system_fingerprint.empty()) o["system_fingerprint"] = r.system_fingerprint;
o["choices"] = nlohmann::ordered_json::array({ch});
o["choices"] = json::array({ch});
if (t && t->valid) o["timings"] = timings_json(*t);
return sse_event(o.dump());
}
@@ -1173,22 +1187,22 @@ static std::string text_chunk(const OaiRequest& r, int index, const std::string&
* supplied, and the time since the prompt phase began. */
static std::string progress_chunk(const OaiRequest& r, int index, const Sink& s) {
const int64_t ta = s.t_admitted_ns();
nlohmann::ordered_json pp;
json pp;
pp["total"] = s.progress_total();
pp["cache"] = s.progress_cached();
pp["processed"] = s.progress_processed();
pp["time_ms"] = ta >= 0 ? (s.age_ns() - ta) / 1000000 : 0;
if (r.shape == ApiShape::LlamaNative) {
/* llama-server's native chunk carries the progress at its top level. */
nlohmann::ordered_json o;
json o;
o["index"] = index;
o["content"] = "";
o["tokens"] = nlohmann::ordered_json::array();
o["tokens"] = json::array();
o["stop"] = false;
o["prompt_progress"] = std::move(pp);
return sse_event(o.dump());
}
nlohmann::ordered_json ch;
json ch;
if (r.endpoint == Endpoint::Chat) {
ch["index"] = index;
ch["delta"] = { { "role", "assistant" }, { "content", nullptr } };
@@ -1198,13 +1212,13 @@ static std::string progress_chunk(const OaiRequest& r, int index, const Sink& s)
ch["logprobs"] = nullptr;
}
ch["finish_reason"] = nullptr;
nlohmann::ordered_json o;
json o;
o["id"] = r.id;
o["object"] = r.endpoint == Endpoint::Chat ? "chat.completion.chunk" : "text_completion";
o["created"] = r.created;
o["model"] = r.model;
if (!r.system_fingerprint.empty()) o["system_fingerprint"] = r.system_fingerprint;
o["choices"] = nlohmann::ordered_json::array({ch});
o["choices"] = json::array({ch});
o["prompt_progress"] = std::move(pp);
return sse_event(o.dump());
}
@@ -1264,6 +1278,27 @@ HttpResponse Server::streaming_completion(const HttpRequest& req, OaiRequest& r)
return false;
}
/* The model is leaving (end_streams, retire). The stream ends here whether or not the
* step loop still answers, since the response's lease is what keeps this server alive, and
* with an error event: a silent end would pass a truncated answer as complete. */
if (self->stopping_.load()) {
self->cancel_all(st->gens, false);
const UsageOut u = usage_of(st->r, st->gens);
const ApiError e = err_overloaded(kLeaving);
for (auto& g : st->gens) {
const Sink* one = g.sink.get();
const TimingsOut gt = timings_of(&one, 1, st->r.t_received_ns);
if (st->r.endpoint == Endpoint::Chat) out += g.delta->error_chunk(e, gt, u);
else out += sse_error(e);
}
if (st->r.shape == ApiShape::OpenAI) out += SSE_DONE;
st->done_sent = true;
self->record(st->r, st->gens, Finish::Cancelled);
self->retire(st->gens);
if (!st->released) { st->released = true; self->release(st->r.n_choices()); }
return false;
}
const bool progress = self->pump(st->gens, st->r);
size_t maxstop = 0;
for (const auto& s : st->r.stop) maxstop = std::max(maxstop, s.size());
@@ -1323,7 +1358,7 @@ HttpResponse Server::streaming_completion(const HttpRequest& req, OaiRequest& r)
} else if (st->r.shape == ApiShape::LlamaNative) {
/* llama-server's native chunk: the new text, the ids that made it, the counts. */
if (safe > g.emitted || g.tokens.size() > g.tokens_sent || lp_n) {
nlohmann::ordered_json o;
json o;
o["index"] = g.index;
o["content"] = g.text.substr(g.emitted, safe - g.emitted);
o["tokens"] = std::vector<int32_t>(g.tokens.begin() + (long)g.tokens_sent,
@@ -1335,7 +1370,7 @@ HttpResponse Server::streaming_completion(const HttpRequest& req, OaiRequest& r)
(int64_t)st->r.prompts[(size_t)g.prompt_index].tokens.size();
if (st->r.timings_per_token && now.valid) o["timings"] = timings_json(now);
if (lp_n)
o["completion_probabilities"] = nlohmann::ordered_json::parse(
o["completion_probabilities"] = json::parse(
"[" + logprobs_content(lp_at, lp_n) + "]");
out += sse_event(o.dump());
g.tokens_sent = g.tokens.size();
@@ -2314,7 +2349,6 @@ HttpResponse Server::handle_models(const HttpRequest& req) {
* ask, the rule /diagnostics follows. */
/* A generator's adapter files: what `loras` and <lora:...> tags may name. */
HttpResponse Server::handle_loras(const HttpRequest& req) {
using json = nlohmann::json;
if (!opt_.gen_lora_names) {
ApiError e;
e.status = 404;
+37
View File
@@ -35,6 +35,12 @@ namespace server {
struct Deps {
IScheduler* sched = nullptr; /* required */
/* Counts the jobs running with no open request (a video, an async shape), which the holder of
* this model's memory must see: they would otherwise look like an idle model. May be null. */
std::atomic<int64_t>* background = nullptr;
/* The listener this server sits behind, which keeps finished jobs past the server's end. May
* be null: a server that owns its socket lives as long as the process. */
class Front* front = nullptr;
ITokenizer* tok = nullptr; /* required */
IChatTemplate* chat = nullptr; /* absent -> /v1/chat/completions is 501 */
IGrammarCompiler* grammar = nullptr; /* absent -> response_format is 501 */
@@ -124,6 +130,12 @@ struct ServerOptions {
int retry_after_s = 1;
int64_t max_ctx = 0;
/* The KV cache's settings, for /metrics (vllm:cache_config_info): its dtype (empty: no such
* line, as for a generator), the paged groups' block size, and the prefix cache. */
std::string kv_cache_dtype;
int64_t kv_block_size = 0;
bool prefix_cache = false;
int64_t prefix_cache_mib = 0;
int64_t default_max_tokens = 0; /* 0: what the context leaves (OaiLimits) */
int64_t max_tokens_cap = 0; /* 0: none */
int max_n = 8;
@@ -206,6 +218,10 @@ struct ServerOptions {
size_t max_inflight_body_bytes = 0;
};
/* The dashboard's page: fixed markup that asks this origin for everything it shows, so it needs no
* model. A process serving several models answers `/` with it directly (Front). */
HttpResponse dashboard_page();
class Server {
public:
Server(const Deps& d, const ServerOptions& o);
@@ -250,9 +266,18 @@ public:
* attacker at the console of this machine is a local user either way, and stays admitted. */
bool local_operator(const HttpRequest& req) const;
void stop();
/* stop() without the transport: for a server behind a Front (front.h), which owns the socket.
* Ends video and shape jobs and drains finished generations. */
void retire();
/* Ends every stream and long poll in flight (they see the server stopping) while `on`; off
* again, the server takes requests as before. For a model being parked (Engine::park), whose
* server lives on. Video and shape jobs are left alone. */
void end_streams(bool on) { stopping_.store(on); }
int port() const { return transport_.port(); } /* 0 until run() is accepting */
int64_t in_flight() const { return in_flight_.load(std::memory_order_relaxed); }
/* What this model does, as /server_info reports it, in JSON. */
std::string capabilities_json() const;
/* The admission ceiling as resolved: ServerOptions::queue_depth, or 8 x max_seqs for 0. */
int64_t queue_cap() const { return queue_depth_; }
@@ -347,6 +372,9 @@ private:
/* Cancels every job and joins its thread; at stop(). */
void stop_videos();
static json video_json(const VideoJob& j);
/* A finished or running job's file: *res, or false with *err. */
static bool video_content(const VideoJob& j, const HttpRequest& req, HttpResponse* res, ApiError* err);
static HttpResponse video_deleted(const std::string& id);
/* ------------------------------------------------------------------ speech_stream.cpp */
/* vLLM-Omni's realtime speech session over a WebSocket at /v1/audio/speech/stream: text
@@ -380,6 +408,7 @@ private:
HttpResponse handle_shape_status(const HttpRequest& req);
void shape_work(std::shared_ptr<ShapeJob> j);
void sweep_shapes_locked(int64_t now);
static json shape_status(const ShapeJob& j);
void stop_shapes();
static void shape_caps(json& caps, const IShapeGen* gen);
@@ -449,6 +478,14 @@ private:
HttpTransport transport_;
std::atomic<int64_t> in_flight_{0};
/* Generation jobs (an image, a shape, speech): they do not pass through the scheduler, so
* its figures say nothing about them. A job ends when its response has been sent. */
struct JobStats {
std::atomic<int64_t> running{0}, done{0}, failed{0}, total_ms{0}, last_ms{0};
} jobs_;
HttpResponse run_job(const HttpRequest& q, HttpResponse (Server::*fn)(const HttpRequest&));
HttpResponse handle_image_generate(const HttpRequest& q) { return handle_images(q, false); }
HttpResponse handle_image_edit(const HttpRequest& q) { return handle_images(q, true); }
int64_t queue_depth_ = 0;
std::atomic<int64_t> realtime_sessions_{0};
std::atomic<int64_t> speech_sessions_{0};
+33 -18
View File
@@ -21,6 +21,7 @@
* field is refused by name. A finished background shape is kept for as long as a video, as many
* as videos.
*/
#include "front.h"
#include "server.h"
#include "oai.h"
@@ -28,7 +29,7 @@
#include "mm/media.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <chrono>
#include <cmath>
@@ -237,6 +238,31 @@ void Server::shape_work(std::shared_ptr<ShapeJob> j) {
} else {
j->file = std::move(file);
}
/* A finished shape can be read without this server, which may be gone when its client asks. */
if (deps_.front)
deps_.front->keep_job(j->uid, j->done_at + opt_.video_ttl_s, opt_.max_videos,
[j](const HttpRequest&) -> HttpResponse {
return HttpResponse::json_body(200, json_dump(shape_status(*j)));
});
}
json Server::shape_status(const ShapeJob& j) {
json o;
if (!j.finished) {
o["status"] = "processing";
int32_t steps = 0, points = 0;
j.ticket->progress_of(&steps, &points);
o["steps_done"] = steps;
o["steps"] = j.ticket->steps;
} else if (j.failed) {
o["status"] = "error";
o["message"] = j.message;
} else {
o["status"] = "completed";
o["type"] = j.type;
o["model_base64"] = base64_encode(j.file.data(), j.file.size());
}
return o;
}
void Server::sweep_shapes_locked(int64_t now) {
@@ -292,7 +318,11 @@ HttpResponse Server::handle_shape_send(const HttpRequest& req) {
sweep_shapes_locked(unix_now());
shapes_.push_back(j);
}
j->worker = std::thread([this, j] { shape_work(j); });
if (deps_.background) deps_.background->fetch_add(1);
j->worker = std::thread([this, j] {
shape_work(j);
if (deps_.background) deps_.background->fetch_sub(1);
});
json o;
o["uid"] = j->uid;
return HttpResponse::json_body(200, json_dump(o));
@@ -307,22 +337,7 @@ HttpResponse Server::handle_shape_status(const HttpRequest& req) {
sweep_shapes_locked(unix_now());
for (const auto& j : shapes_) {
if (j->uid != uid) continue;
json o;
if (!j->finished) {
o["status"] = "processing";
int32_t steps = 0, points = 0;
j->ticket->progress_of(&steps, &points);
o["steps_done"] = steps;
o["steps"] = j->ticket->steps;
} else if (j->failed) {
o["status"] = "error";
o["message"] = j->message;
} else {
o["status"] = "completed";
o["type"] = j->type;
o["model_base64"] = base64_encode(j->file.data(), j->file.size());
}
return HttpResponse::json_body(200, json_dump(o));
return HttpResponse::json_body(200, json_dump(shape_status(*j)));
}
ApiError e = err_bad("uid", "no shape '" + uid + "'; it may have expired");
e.status = 404;
+14 -3
View File
@@ -12,6 +12,8 @@ static int64_t now_ns() {
return duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count();
}
int64_t sink_now_ns() { return now_ns(); }
const char* finish_reason_oai(Finish f) {
switch (f) {
case Finish::Stop:
@@ -62,7 +64,7 @@ void Sink::enable_logprobs(int n) {
alt_n_.assign(ring_.size(), 0);
}
bool Sink::push(int32_t token, const TokenLogprobs* lp) {
bool Sink::push(int32_t token, const TokenLogprobs* lp, int64_t now) {
const uint64_t h = head_.load(std::memory_order_relaxed);
const uint64_t t = tail_.load(std::memory_order_acquire);
if (h - t > mask_) {
@@ -81,11 +83,18 @@ bool Sink::push(int32_t token, const TokenLogprobs* lp) {
}
head_.store(h + 1, std::memory_order_release);
const int64_t t_now = now_ns() - t_start_ns_;
const int64_t t_now = (now >= 0 ? now : now_ns()) - t_start_ns_;
if (h == 0) t_first_.store(t_now, std::memory_order_release);
t_last_.store(t_now, std::memory_order_release);
notify();
/* A wake only while the consumer is asleep (asleep_): at hundreds of streams a wake per
* token per stream, for consumers already awake draining, is a syscall each on the
* scheduler thread. Every push while it sleeps wakes it, so a wake that lands after its
* predicate test but before it sleeps (notify() takes no lock) is repaired by the next
* push, not left to the bounded wait. The fence orders the head store before the flag's
* load, against the consumer's flag store before its predicate's head load. */
std::atomic_thread_fence(std::memory_order_seq_cst);
if (asleep_.load(std::memory_order_relaxed)) notify();
return true;
}
@@ -155,7 +164,9 @@ bool Sink::wait(int timeout_ms) {
};
if (ready()) return true;
std::unique_lock<std::mutex> lk(m_);
asleep_.store(true, std::memory_order_seq_cst);
cv_.wait_for(lk, std::chrono::milliseconds(timeout_ms), ready);
asleep_.store(false, std::memory_order_relaxed);
return ready();
}
+10 -4
View File
@@ -73,8 +73,11 @@ public:
/* ------------------------------------------------------------------ producer: scheduler */
/* Returns false only on overflow, which also marks the request failed. `lp` is the token's
* logprobs when the request asked for them (enable_logprobs), and null otherwise. */
bool push(int32_t token, const TokenLogprobs* lp = nullptr);
* logprobs when the request asked for them (enable_logprobs), and null otherwise. `now`, a
* sink_now_ns() reading, is the token's time; negative reads the clock. A step's tokens share
* one reading: where the clocksource is HPET (the TSC marked unstable) a read is a system call
* of about a microsecond, a token's whole cost here. */
bool push(int32_t token, const TokenLogprobs* lp = nullptr, int64_t now = -1);
/* Terminal and idempotent: the first call wins, so a cancel racing a natural stop does not
* produce two finish reasons. */
@@ -189,13 +192,16 @@ private:
std::mutex m_;
std::condition_variable cv_;
std::atomic<bool> asleep_{false}; /* the consumer is inside cv_.wait_for */
};
/* The scheduler's call sites, so core/sched needs no casts. A null sink means nobody is
* listening (an offline or benchmark request). */
inline bool sink_push(void* s, int32_t token, const TokenLogprobs* lp = nullptr) {
return s ? static_cast<Sink*>(s)->push(token, lp) : true;
inline bool sink_push(void* s, int32_t token, const TokenLogprobs* lp = nullptr, int64_t now = -1) {
return s ? static_cast<Sink*>(s)->push(token, lp, now) : true;
}
/* The clock a sink's times are on, for push's `now`. */
int64_t sink_now_ns();
inline void sink_finish(void* s, Finish f) {
if (s) static_cast<Sink*>(s)->finish(f);
}
+7 -7
View File
@@ -26,7 +26,7 @@
#include "mm/processor.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cctype>
@@ -409,7 +409,7 @@ HttpResponse Server::handle_transcription(const HttpRequest& req) {
return t;
};
auto usage = [job]() {
nlohmann::ordered_json u;
json u;
u["type"] = "tokens";
u["input_tokens"] = job->n_prompt;
u["output_tokens"] = job->n_gen;
@@ -457,7 +457,7 @@ HttpResponse Server::handle_transcription(const HttpRequest& req) {
const std::string text = joined();
metrics_.observe_http(200);
if (fmt == "text") return HttpResponse::text(200, text + "\n");
nlohmann::ordered_json o;
json o;
if (fmt == "verbose_json") {
std::string lang = forced;
for (const Heard& h : job->heard)
@@ -466,9 +466,9 @@ HttpResponse Server::handle_transcription(const HttpRequest& req) {
o["language"] = lower(lang);
o["duration"] = (double)job->samples.size() / rate;
o["text"] = text;
nlohmann::ordered_json segs = nlohmann::ordered_json::array();
json segs = json::array();
for (size_t i = 0; i < job->heard.size(); ++i) {
nlohmann::ordered_json s;
json s;
s["id"] = (int64_t)i;
s["start"] = (double)job->cuts[i].first / rate;
s["end"] = (double)job->cuts[i].second / rate;
@@ -506,7 +506,7 @@ HttpResponse Server::handle_transcription(const HttpRequest& req) {
if (peer_closed && peer_closed()) return false;
auto delta = [&](const std::string& d) {
if (d.empty()) return;
nlohmann::ordered_json o;
json o;
o["type"] = "transcript.text.delta";
o["delta"] = d;
out += sse_event(json_dump(o));
@@ -560,7 +560,7 @@ HttpResponse Server::handle_transcription(const HttpRequest& req) {
}
if (!job->running && job->stream_clip >= job->cuts.size()) {
release_job();
nlohmann::ordered_json o;
json o;
o["type"] = "transcript.text.done";
o["text"] = joined();
o["usage"] = usage();
+2 -2
View File
@@ -33,7 +33,7 @@
#include "gen/audio.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <chrono>
@@ -48,7 +48,7 @@ namespace server {
namespace {
using ojson = nlohmann::ordered_json;
using ojson = Json;
/* The client messages a session may have queued and not yet taken in. */
constexpr size_t kMaxQueuedBytes = 16u << 20;
+31 -4
View File
@@ -19,7 +19,7 @@
#include "llama/src/unicode.h"
#include "mm/processor.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <cctype>
@@ -257,10 +257,37 @@ std::string py_json_dumps(const json& v) {
return v.dump(-1, ' ', false, json::error_handler_t::replace);
}
namespace {
/* The same tree with every object's members in byte order, which is code point order for
* UTF-8 keys: what Python's json.dumps(sort_keys=True) writes and the reference reads. This
* replaced a round trip through a sorted-key DOM. */
json sorted_copy(const json& v) {
if (v.is_array()) {
json out = json::array();
for (const auto& e : v) out.push_back(sorted_copy(e));
return out;
}
if (v.is_object()) {
/* Members appended in sorted order rather than looked up by key: a lookup in an
* object is a scan, so filling by key made a large object quadratic. */
std::vector<std::pair<std::string, const json*>> order;
order.reserve(v.size());
for (auto it = v.begin(); it != v.end(); ++it) order.emplace_back(it.key(), &it.value());
std::sort(order.begin(), order.end(),
[](const auto& a, const auto& b) { return a.first < b.first; });
json::object_t out;
out.reserve(order.size());
for (auto& kv : order) out.emplace_back(std::move(kv.first), sorted_copy(*kv.second));
return json(std::move(out));
}
return v;
}
} /* namespace */
std::string py_json_compact_sorted(const json& v) {
/* nlohmann's unordered json keeps its keys sorted by bytes, which is code point order for
* UTF-8. */
return nlohmann::json::parse(v.dump()).dump(-1, ' ', false, nlohmann::json::error_handler_t::replace);
return sorted_copy(v).dump(-1, ' ', false, json::error_handler_t::replace);
}
bool blank_text(const std::string& s) {
+75 -35
View File
@@ -44,6 +44,9 @@
* The prompt is the model's template with `{prompt}` filled; the template is tokenised with its
* special tokens and the prompt without, so a caller cannot write control tokens into it.
*/
#include <atomic>
#include "front.h"
#include "server.h"
#include "loras.h"
#include "oai.h"
@@ -54,7 +57,7 @@
#include "mm/mp4.h"
#include "rad_internal.h"
#include <nlohmann/json.hpp>
#include "util/json.h"
#include <algorithm>
#include <chrono>
@@ -107,6 +110,8 @@ struct Server::VideoJob {
std::string decoder; /* a decoder the request named other than the default */
int32_t w = 0, h = 0;
bool worker_done = false; /* its thread has nothing left to do but return */
/* Deleted, by the server or through the Front: nothing answers for it from here on. */
std::atomic<bool> deleted{false};
};
namespace {
@@ -1014,7 +1019,11 @@ HttpResponse Server::handle_video_create(const HttpRequest& req) {
std::lock_guard<std::mutex> lk(videos_m_);
sweep_videos_locked(unix_now());
videos_.push_back(j);
j->worker = std::thread([this, j] { video_work(j); });
if (deps_.background) deps_.background->fetch_add(1);
j->worker = std::thread([this, j] {
video_work(j);
if (deps_.background) deps_.background->fetch_sub(1);
});
return HttpResponse::json_body(200, json_dump(video_json(*j)));
}
@@ -1111,7 +1120,7 @@ void Server::video_work(std::shared_ptr<VideoJob> j) {
j->err_message = "the video could not be written: " + why;
} else if (aborted || t.status() == RAD_E_CANCELLED) {
j->err_code = "cancelled";
j->err_message = aborted ? "the server is shutting down" : "the video was cancelled";
j->err_message = aborted ? "this model is stopping" : "the video was cancelled";
} else {
j->err_code = t.status() == RAD_E_INVAL ? "invalid_request" : "generation_failed";
j->err_message = t.why().empty() ? std::string(rad_strerror(t.status())) : t.why();
@@ -1119,6 +1128,23 @@ void Server::video_work(std::shared_ptr<VideoJob> j) {
RAD_WARN("video %s: failed: %s", j->id.c_str(), j->err_message.c_str());
}
j->worker_done = true;
/* A finished job no longer changes, so it can be read without this server, which may be gone
* by the time its client comes for it. */
if (deps_.front && !j->deleted.load())
deps_.front->keep_job(j->id, j->expires_at ? j->expires_at : now + opt_.video_ttl_s,
opt_.max_videos, [j](const HttpRequest& q) -> HttpResponse {
if (q.method == "DELETE") {
j->deleted.store(true);
return video_deleted(j->id);
}
if (q.path.size() > 8 && q.path.compare(q.path.size() - 8, 8, "/content") == 0) {
HttpResponse res;
ApiError e;
if (video_content(*j, q, &res, &e)) return res;
return HttpResponse::json_body(e.status, error_body(q.path, e.status, e.type.c_str(), e.message));
}
return HttpResponse::json_body(200, json_dump(video_json(*j)));
});
}
void Server::sweep_videos_locked(int64_t now) {
@@ -1137,7 +1163,8 @@ void Server::sweep_videos_locked(int64_t now) {
for (size_t i = 0; i < videos_.size();) {
const VideoJob& j = *videos_[i];
const bool done = j.status == "completed" || j.status == "failed";
if (done && j.expires_at > 0 && j.expires_at <= now) drop(i);
if (done && j.deleted.load()) drop(i);
else if (done && j.expires_at > 0 && j.expires_at <= now) drop(i);
else if (done && j.failed && j.completed_at + opt_.video_ttl_s <= now) drop(i);
else ++i;
}
@@ -1227,7 +1254,8 @@ HttpResponse Server::handle_video_get(const HttpRequest& req) {
const std::string id = req.param("id");
std::lock_guard<std::mutex> lk(videos_m_);
for (const auto& j : videos_)
if (j->id == id) return HttpResponse::json_body(200, json_dump(video_json(*j)));
if (j->id == id && !j->deleted.load())
return HttpResponse::json_body(200, json_dump(video_json(*j)));
ApiError e = err_bad("id", "no video '" + id + "'; it may have expired");
e.status = 404;
e.type = "not_found_error";
@@ -1295,8 +1323,13 @@ HttpResponse Server::handle_video_delete(const HttpRequest& req) {
/* A running job is cancelled, and its thread ends once the driver has seen that (at its next
* pass, which may be seconds away); it is joined then. */
j->ticket->cancel.store(true);
j->deleted.store(true);
videos_gone_.push_back(j);
sweep_videos_locked(unix_now());
return video_deleted(id);
}
HttpResponse Server::video_deleted(const std::string& id) {
json o;
o["id"] = id;
o["object"] = "video.deleted";
@@ -1304,44 +1337,51 @@ HttpResponse Server::handle_video_delete(const HttpRequest& req) {
return HttpResponse::json_body(200, json_dump(o));
}
bool Server::video_content(const VideoJob& j, const HttpRequest& req, HttpResponse* res, ApiError* err) {
std::string variant = "video";
if (auto it = req.query.find("variant"); it != req.query.end()) variant = it->second;
if (variant != "video" && variant != "thumbnail") {
*err = err_unsupported("variant", "this server gives the video or its thumbnail");
err->supported = { "video", "thumbnail" };
return false;
}
if (variant == "thumbnail") {
if (j.first.empty()) {
*err = err_bad("id", "video '" + j.id + "' has no frames yet");
return false;
}
std::vector<uint8_t> file;
std::string why;
if (mm::encode_image(j.first.data(), j.w, j.h, 3, "webp", 90, &file, &why) < 0) {
*err = err_internal("the thumbnail could not be encoded: " + why);
return false;
}
res->content_type = "image/webp";
res->body.assign((const char*)file.data(), file.size());
return true;
}
if (j.status != "completed") {
*err = err_bad("id", "video '" + j.id + "' is " + j.status +
(j.failed ? ": " + j.err_message : ""));
return false;
}
res->content_type = "video/mp4";
res->body = j.mp4;
return true;
}
HttpResponse Server::handle_video_content(const HttpRequest& req) {
if (!deps_.videos)
return error_response(err_not_implemented("/v1/videos requires a video generation model"),
req.peer);
const std::string id = req.param("id");
std::string variant = "video";
if (auto it = req.query.find("variant"); it != req.query.end()) variant = it->second;
if (variant != "video" && variant != "thumbnail") {
ApiError e = err_unsupported("variant", "this server gives the video or its thumbnail");
e.supported = { "video", "thumbnail" };
return error_response(e, req.peer);
}
std::lock_guard<std::mutex> lk(videos_m_);
for (const auto& j : videos_) {
if (j->id != id) continue;
if (variant == "thumbnail") {
if (j->first.empty())
return error_response(err_bad("id", "video '" + id + "' has no frames yet"),
req.peer);
std::vector<uint8_t> file;
std::string why;
if (mm::encode_image(j->first.data(), j->w, j->h, 3, "webp", 90, &file, &why) < 0)
return error_response(err_internal("the thumbnail could not be encoded: " + why),
req.peer);
for (const auto& j : videos_)
if (j->id == id && !j->deleted.load()) {
HttpResponse res;
res.content_type = "image/webp";
res.body.assign((const char*)file.data(), file.size());
return res;
ApiError e;
return video_content(*j, req, &res, &e) ? res : error_response(e, req.peer);
}
if (j->status != "completed")
return error_response(err_bad("id", "video '" + id + "' is " + j->status +
(j->failed ? ": " + j->err_message : "")),
req.peer);
HttpResponse res;
res.content_type = "video/mp4";
res.body = j->mp4;
return res;
}
ApiError e = err_bad("id", "no video '" + id + "'; it may have expired");
e.status = 404;
e.type = "not_found_error";