@bradsjm/logprob-visualizer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +93 -0
- package/bin/logprob-visualizer.js +40 -0
- package/dist/assets/index-AS3_kbXM.css +1 -0
- package/dist/assets/index-DEhFxOHf.js +229 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-180x180.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon-512.png +0 -0
- package/dist/favicon-64x64.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +25 -0
- package/dist/index.html +23 -0
- package/package.json +98 -0
- package/runtime/server.js +247 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
var fw=Object.defineProperty;var Xf=e=>{throw TypeError(e)};var pw=(e,t,n)=>t in e?fw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zf=(e,t,n)=>pw(e,typeof t!="symbol"?t+"":t,n),Vl=(e,t,n)=>t.has(e)||Xf("Cannot "+n);var E=(e,t,n)=>(Vl(e,t,"read from private field"),n?n.call(e):t.get(e)),K=(e,t,n)=>t.has(e)?Xf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),z=(e,t,n,r)=>(Vl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),re=(e,t,n)=>(Vl(e,t,"access private method"),n);var ji=(e,t,n,r)=>({set _(o){z(e,t,o,n)},get _(){return E(e,t,r)}});function hw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function bm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cm={exports:{}},nl={},Em={exports:{}},te={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ci=Symbol.for("react.element"),mw=Symbol.for("react.portal"),gw=Symbol.for("react.fragment"),vw=Symbol.for("react.strict_mode"),yw=Symbol.for("react.profiler"),xw=Symbol.for("react.provider"),ww=Symbol.for("react.context"),Sw=Symbol.for("react.forward_ref"),bw=Symbol.for("react.suspense"),Cw=Symbol.for("react.memo"),Ew=Symbol.for("react.lazy"),Jf=Symbol.iterator;function kw(e){return e===null||typeof e!="object"?null:(e=Jf&&e[Jf]||e["@@iterator"],typeof e=="function"?e:null)}var km={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nm=Object.assign,Pm={};function ts(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||km}ts.prototype.isReactComponent={};ts.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ts.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rm(){}Rm.prototype=ts.prototype;function fd(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||km}var pd=fd.prototype=new Rm;pd.constructor=fd;Nm(pd,ts.prototype);pd.isPureReactComponent=!0;var ep=Array.isArray,Tm=Object.prototype.hasOwnProperty,hd={current:null},_m={key:!0,ref:!0,__self:!0,__source:!0};function jm(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Tm.call(t,r)&&!_m.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Ci,type:e,key:s,ref:i,props:o,_owner:hd.current}}function Nw(e,t){return{$$typeof:Ci,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function md(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ci}function Pw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var tp=/\/+/g;function Wl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Pw(""+e.key):t.toString(36)}function oa(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ci:case mw:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Wl(i,0):r,ep(o)?(n="",e!=null&&(n=e.replace(tp,"$&/")+"/"),oa(o,t,n,"",function(u){return u})):o!=null&&(md(o)&&(o=Nw(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(tp,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",ep(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Wl(s,a);i+=oa(s,t,n,l,o)}else if(l=kw(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Wl(s,a++),i+=oa(s,t,n,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Mi(e,t,n){if(e==null)return e;var r=[],o=0;return oa(e,r,"","",function(s){return t.call(n,s,o++)}),r}function Rw(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var tt={current:null},sa={transition:null},Tw={ReactCurrentDispatcher:tt,ReactCurrentBatchConfig:sa,ReactCurrentOwner:hd};function Mm(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:Mi,forEach:function(e,t,n){Mi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Mi(e,function(){t++}),t},toArray:function(e){return Mi(e,function(t){return t})||[]},only:function(e){if(!md(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=ts;te.Fragment=gw;te.Profiler=yw;te.PureComponent=fd;te.StrictMode=vw;te.Suspense=bw;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tw;te.act=Mm;te.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Nm({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=hd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Tm.call(t,l)&&!_m.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Ci,type:e.type,key:o,ref:s,props:r,_owner:i}};te.createContext=function(e){return e={$$typeof:ww,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:xw,_context:e},e.Consumer=e};te.createElement=jm;te.createFactory=function(e){var t=jm.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:Sw,render:e}};te.isValidElement=md;te.lazy=function(e){return{$$typeof:Ew,_payload:{_status:-1,_result:e},_init:Rw}};te.memo=function(e,t){return{$$typeof:Cw,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=sa.transition;sa.transition={};try{e()}finally{sa.transition=t}};te.unstable_act=Mm;te.useCallback=function(e,t){return tt.current.useCallback(e,t)};te.useContext=function(e){return tt.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return tt.current.useDeferredValue(e)};te.useEffect=function(e,t){return tt.current.useEffect(e,t)};te.useId=function(){return tt.current.useId()};te.useImperativeHandle=function(e,t,n){return tt.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return tt.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return tt.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return tt.current.useMemo(e,t)};te.useReducer=function(e,t,n){return tt.current.useReducer(e,t,n)};te.useRef=function(e){return tt.current.useRef(e)};te.useState=function(e){return tt.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return tt.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return tt.current.useTransition()};te.version="18.3.1";Em.exports=te;var f=Em.exports;const I=bm(f),rl=hw({__proto__:null,default:I},[f]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var _w=f,jw=Symbol.for("react.element"),Mw=Symbol.for("react.fragment"),Ow=Object.prototype.hasOwnProperty,Aw=_w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Iw={key:!0,ref:!0,__self:!0,__source:!0};function Om(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ow.call(t,r)&&!Iw.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:jw,type:e,key:s,ref:i,props:o,_owner:Aw.current}}nl.Fragment=Mw;nl.jsx=Om;nl.jsxs=Om;Cm.exports=nl;var g=Cm.exports,Am={exports:{}},wt={},Im={exports:{}},Lm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(T,_){var F=T.length;T.push(_);e:for(;0<F;){var B=F-1>>>1,L=T[B];if(0<o(L,_))T[B]=_,T[F]=L,F=B;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var _=T[0],F=T.pop();if(F!==_){T[0]=F;e:for(var B=0,L=T.length,Y=L>>>1;B<Y;){var G=2*(B+1)-1,ie=T[G],we=G+1,D=T[we];if(0>o(ie,F))we<L&&0>o(D,ie)?(T[B]=D,T[we]=F,B=we):(T[B]=ie,T[G]=F,B=G);else if(we<L&&0>o(D,F))T[B]=D,T[we]=F,B=we;else break e}}return _}function o(T,_){var F=T.sortIndex-_.sortIndex;return F!==0?F:T.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,c=null,y=3,p=!1,w=!1,h=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(T){for(var _=n(u);_!==null;){if(_.callback===null)r(u);else if(_.startTime<=T)r(u),_.sortIndex=_.expirationTime,t(l,_);else break;_=n(u)}}function b(T){if(h=!1,x(T),!w)if(n(l)!==null)w=!0,V(C);else{var _=n(u);_!==null&&H(b,_.startTime-T)}}function C(T,_){w=!1,h&&(h=!1,v(P),P=-1),p=!0;var F=y;try{for(x(_),c=n(l);c!==null&&(!(c.expirationTime>_)||T&&!A());){var B=c.callback;if(typeof B=="function"){c.callback=null,y=c.priorityLevel;var L=B(c.expirationTime<=_);_=e.unstable_now(),typeof L=="function"?c.callback=L:c===n(l)&&r(l),x(_)}else r(l);c=n(l)}if(c!==null)var Y=!0;else{var G=n(u);G!==null&&H(b,G.startTime-_),Y=!1}return Y}finally{c=null,y=F,p=!1}}var k=!1,N=null,P=-1,j=5,R=-1;function A(){return!(e.unstable_now()-R<j)}function M(){if(N!==null){var T=e.unstable_now();R=T;var _=!0;try{_=N(!0,T)}finally{_?W():(k=!1,N=null)}}else k=!1}var W;if(typeof m=="function")W=function(){m(M)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Q=U.port2;U.port1.onmessage=M,W=function(){Q.postMessage(null)}}else W=function(){S(M,0)};function V(T){N=T,k||(k=!0,W())}function H(T,_){P=S(function(){T(e.unstable_now())},_)}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(T){T.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,V(C))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(y){case 1:case 2:case 3:var _=3;break;default:_=y}var F=y;y=_;try{return T()}finally{y=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,_){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var F=y;y=T;try{return _()}finally{y=F}},e.unstable_scheduleCallback=function(T,_,F){var B=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?B+F:B):F=B,T){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=F+L,T={id:d++,callback:_,priorityLevel:T,startTime:F,expirationTime:L,sortIndex:-1},F>B?(T.sortIndex=F,t(u,T),n(l)===null&&T===n(u)&&(h?(v(P),P=-1):h=!0,H(b,F-B))):(T.sortIndex=L,t(l,T),w||p||(w=!0,V(C))),T},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(T){var _=y;return function(){var F=y;y=_;try{return T.apply(this,arguments)}finally{y=F}}}})(Lm);Im.exports=Lm;var Lw=Im.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Dw=f,xt=Lw;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Dm=new Set,Ks={};function eo(e,t){Ko(e,t),Ko(e+"Capture",t)}function Ko(e,t){for(Ks[e]=t,e=0;e<t.length;e++)Dm.add(t[e])}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iu=Object.prototype.hasOwnProperty,Fw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,np={},rp={};function zw(e){return Iu.call(rp,e)?!0:Iu.call(np,e)?!1:Fw.test(e)?rp[e]=!0:(np[e]=!0,!1)}function $w(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Bw(e,t,n,r){if(t===null||typeof t>"u"||$w(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function nt(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new nt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new nt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new nt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new nt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){He[e]=new nt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new nt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new nt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new nt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new nt(e,5,!1,e.toLowerCase(),null,!1,!1)});var gd=/[\-:]([a-z])/g;function vd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(gd,vd);He[t]=new nt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(gd,vd);He[t]=new nt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gd,vd);He[t]=new nt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new nt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new nt(e,1,!1,e.toLowerCase(),null,!0,!0)});function yd(e,t,n,r){var o=He.hasOwnProperty(t)?He[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Bw(t,n,o,r)&&(n=null),r||o===null?zw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Nn=Dw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Oi=Symbol.for("react.element"),po=Symbol.for("react.portal"),ho=Symbol.for("react.fragment"),xd=Symbol.for("react.strict_mode"),Lu=Symbol.for("react.profiler"),Fm=Symbol.for("react.provider"),zm=Symbol.for("react.context"),wd=Symbol.for("react.forward_ref"),Du=Symbol.for("react.suspense"),Fu=Symbol.for("react.suspense_list"),Sd=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),$m=Symbol.for("react.offscreen"),op=Symbol.iterator;function gs(e){return e===null||typeof e!="object"?null:(e=op&&e[op]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,Hl;function Ps(e){if(Hl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Hl=t&&t[1]||""}return`
|
|
34
|
+
`+Hl+e}var Kl=!1;function Ql(e,t){if(!e||Kl)return"";Kl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
|
|
37
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ps(e):""}function Uw(e){switch(e.tag){case 5:return Ps(e.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return e=Ql(e.type,!1),e;case 11:return e=Ql(e.type.render,!1),e;case 1:return e=Ql(e.type,!0),e;default:return""}}function zu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ho:return"Fragment";case po:return"Portal";case Lu:return"Profiler";case xd:return"StrictMode";case Du:return"Suspense";case Fu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zm:return(e.displayName||"Context")+".Consumer";case Fm:return(e._context.displayName||"Context")+".Provider";case wd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sd:return t=e.displayName||null,t!==null?t:zu(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return zu(e(t))}catch{}}return null}function Vw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zu(t);case 8:return t===xd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ww(e){var t=Bm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ai(e){e._valueTracker||(e._valueTracker=Ww(e))}function Um(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $u(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vm(e,t){t=t.checked,t!=null&&yd(e,"checked",t,!1)}function Bu(e,t){Vm(e,t);var n=dr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uu(e,t.type,dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ip(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Uu(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rs=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Vu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ap(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(Rs(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:dr(n)}}function Wm(e,t){var n=dr(t.value),r=dr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function lp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Hm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Wu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Hm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ii,Km=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ii=Ii||document.createElement("div"),Ii.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ii.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ds={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hw=["Webkit","ms","Moz","O"];Object.keys(Ds).forEach(function(e){Hw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ds[t]=Ds[e]})});function Qm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ds.hasOwnProperty(e)&&Ds[e]?(""+t).trim():t+"px"}function Gm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Qm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Kw=Ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hu(e,t){if(t){if(Kw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function Ku(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qu=null;function bd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gu=null,No=null,Po=null;function up(e){if(e=Ni(e)){if(typeof Gu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=ll(t),Gu(e.stateNode,e.type,t))}}function Ym(e){No?Po?Po.push(e):Po=[e]:No=e}function qm(){if(No){var e=No,t=Po;if(Po=No=null,up(e),t)for(e=0;e<t.length;e++)up(t[e])}}function Xm(e,t){return e(t)}function Zm(){}var Gl=!1;function Jm(e,t,n){if(Gl)return e(t,n);Gl=!0;try{return Xm(e,t,n)}finally{Gl=!1,(No!==null||Po!==null)&&(Zm(),qm())}}function Gs(e,t){var n=e.stateNode;if(n===null)return null;var r=ll(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var Yu=!1;if(wn)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{Yu=!1}function Qw(e,t,n,r,o,s,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Fs=!1,Sa=null,ba=!1,qu=null,Gw={onError:function(e){Fs=!0,Sa=e}};function Yw(e,t,n,r,o,s,i,a,l){Fs=!1,Sa=null,Qw.apply(Gw,arguments)}function qw(e,t,n,r,o,s,i,a,l){if(Yw.apply(this,arguments),Fs){if(Fs){var u=Sa;Fs=!1,Sa=null}else throw Error(O(198));ba||(ba=!0,qu=u)}}function to(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function eg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function cp(e){if(to(e)!==e)throw Error(O(188))}function Xw(e){var t=e.alternate;if(!t){if(t=to(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return cp(o),e;if(s===r)return cp(o),t;s=s.sibling}throw Error(O(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function tg(e){return e=Xw(e),e!==null?ng(e):null}function ng(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ng(e);if(t!==null)return t;e=e.sibling}return null}var rg=xt.unstable_scheduleCallback,dp=xt.unstable_cancelCallback,Zw=xt.unstable_shouldYield,Jw=xt.unstable_requestPaint,_e=xt.unstable_now,e1=xt.unstable_getCurrentPriorityLevel,Cd=xt.unstable_ImmediatePriority,og=xt.unstable_UserBlockingPriority,Ca=xt.unstable_NormalPriority,t1=xt.unstable_LowPriority,sg=xt.unstable_IdlePriority,ol=null,on=null;function n1(e){if(on&&typeof on.onCommitFiberRoot=="function")try{on.onCommitFiberRoot(ol,e,void 0,(e.current.flags&128)===128)}catch{}}var Vt=Math.clz32?Math.clz32:s1,r1=Math.log,o1=Math.LN2;function s1(e){return e>>>=0,e===0?32:31-(r1(e)/o1|0)|0}var Li=64,Di=4194304;function Ts(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ea(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=Ts(a):(s&=i,s!==0&&(r=Ts(s)))}else i=n&~o,i!==0?r=Ts(i):s!==0&&(r=Ts(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Vt(t),o=1<<n,r|=e[n],t&=~o;return r}function i1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function a1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Vt(s),a=1<<i,l=o[i];l===-1?(!(a&n)||a&r)&&(o[i]=i1(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Xu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ig(){var e=Li;return Li<<=1,!(Li&4194240)&&(Li=64),e}function Yl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ei(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vt(t),e[t]=n}function l1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Vt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Ed(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Vt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var pe=0;function ag(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var lg,kd,ug,cg,dg,Zu=!1,Fi=[],tr=null,nr=null,rr=null,Ys=new Map,qs=new Map,Un=[],u1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fp(e,t){switch(e){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(t.pointerId)}}function ys(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Ni(t),t!==null&&kd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function c1(e,t,n,r,o){switch(t){case"focusin":return tr=ys(tr,e,t,n,r,o),!0;case"dragenter":return nr=ys(nr,e,t,n,r,o),!0;case"mouseover":return rr=ys(rr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ys.set(s,ys(Ys.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,qs.set(s,ys(qs.get(s)||null,e,t,n,r,o)),!0}return!1}function fg(e){var t=Nr(e.target);if(t!==null){var n=to(t);if(n!==null){if(t=n.tag,t===13){if(t=eg(n),t!==null){e.blockedOn=t,dg(e.priority,function(){ug(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 ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ju(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qu=r,n.target.dispatchEvent(r),Qu=null}else return t=Ni(n),t!==null&&kd(t),e.blockedOn=n,!1;t.shift()}return!0}function pp(e,t,n){ia(e)&&n.delete(t)}function d1(){Zu=!1,tr!==null&&ia(tr)&&(tr=null),nr!==null&&ia(nr)&&(nr=null),rr!==null&&ia(rr)&&(rr=null),Ys.forEach(pp),qs.forEach(pp)}function xs(e,t){e.blockedOn===t&&(e.blockedOn=null,Zu||(Zu=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,d1)))}function Xs(e){function t(o){return xs(o,e)}if(0<Fi.length){xs(Fi[0],e);for(var n=1;n<Fi.length;n++){var r=Fi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tr!==null&&xs(tr,e),nr!==null&&xs(nr,e),rr!==null&&xs(rr,e),Ys.forEach(t),qs.forEach(t),n=0;n<Un.length;n++)r=Un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)fg(n),n.blockedOn===null&&Un.shift()}var Ro=Nn.ReactCurrentBatchConfig,ka=!0;function f1(e,t,n,r){var o=pe,s=Ro.transition;Ro.transition=null;try{pe=1,Nd(e,t,n,r)}finally{pe=o,Ro.transition=s}}function p1(e,t,n,r){var o=pe,s=Ro.transition;Ro.transition=null;try{pe=4,Nd(e,t,n,r)}finally{pe=o,Ro.transition=s}}function Nd(e,t,n,r){if(ka){var o=Ju(e,t,n,r);if(o===null)su(e,t,r,Na,n),fp(e,r);else if(c1(o,e,t,n,r))r.stopPropagation();else if(fp(e,r),t&4&&-1<u1.indexOf(e)){for(;o!==null;){var s=Ni(o);if(s!==null&&lg(s),s=Ju(e,t,n,r),s===null&&su(e,t,r,Na,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else su(e,t,r,null,n)}}var Na=null;function Ju(e,t,n,r){if(Na=null,e=bd(r),e=Nr(e),e!==null)if(t=to(e),t===null)e=null;else if(n=t.tag,n===13){if(e=eg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Na=e,null}function pg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e1()){case Cd:return 1;case og:return 4;case Ca:case t1:return 16;case sg:return 536870912;default:return 16}default:return 16}}var Zn=null,Pd=null,aa=null;function hg(){if(aa)return aa;var e,t=Pd,n=t.length,r,o="value"in Zn?Zn.value:Zn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return aa=o.slice(e,1<r?1-r:void 0)}function la(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zi(){return!0}function hp(){return!1}function St(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?zi:hp,this.isPropagationStopped=hp,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zi)},persist:function(){},isPersistent:zi}),t}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rd=St(ns),ki=Ne({},ns,{view:0,detail:0}),h1=St(ki),ql,Xl,ws,sl=Ne({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Td,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ws&&(ws&&e.type==="mousemove"?(ql=e.screenX-ws.screenX,Xl=e.screenY-ws.screenY):Xl=ql=0,ws=e),ql)},movementY:function(e){return"movementY"in e?e.movementY:Xl}}),mp=St(sl),m1=Ne({},sl,{dataTransfer:0}),g1=St(m1),v1=Ne({},ki,{relatedTarget:0}),Zl=St(v1),y1=Ne({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),x1=St(y1),w1=Ne({},ns,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S1=St(w1),b1=Ne({},ns,{data:0}),gp=St(b1),C1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},k1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function N1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=k1[e])?!!t[e]:!1}function Td(){return N1}var P1=Ne({},ki,{key:function(e){if(e.key){var t=C1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=la(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Td,charCode:function(e){return e.type==="keypress"?la(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?la(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),R1=St(P1),T1=Ne({},sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vp=St(T1),_1=Ne({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Td}),j1=St(_1),M1=Ne({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),O1=St(M1),A1=Ne({},sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),I1=St(A1),L1=[9,13,27,32],_d=wn&&"CompositionEvent"in window,zs=null;wn&&"documentMode"in document&&(zs=document.documentMode);var D1=wn&&"TextEvent"in window&&!zs,mg=wn&&(!_d||zs&&8<zs&&11>=zs),yp=" ",xp=!1;function gg(e,t){switch(e){case"keyup":return L1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mo=!1;function F1(e,t){switch(e){case"compositionend":return vg(t);case"keypress":return t.which!==32?null:(xp=!0,yp);case"textInput":return e=t.data,e===yp&&xp?null:e;default:return null}}function z1(e,t){if(mo)return e==="compositionend"||!_d&&gg(e,t)?(e=hg(),aa=Pd=Zn=null,mo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mg&&t.locale!=="ko"?null:t.data;default:return null}}var $1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$1[e.type]:t==="textarea"}function yg(e,t,n,r){Ym(r),t=Pa(t,"onChange"),0<t.length&&(n=new Rd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $s=null,Zs=null;function B1(e){Tg(e,0)}function il(e){var t=yo(e);if(Um(t))return e}function U1(e,t){if(e==="change")return t}var xg=!1;if(wn){var Jl;if(wn){var eu="oninput"in document;if(!eu){var Sp=document.createElement("div");Sp.setAttribute("oninput","return;"),eu=typeof Sp.oninput=="function"}Jl=eu}else Jl=!1;xg=Jl&&(!document.documentMode||9<document.documentMode)}function bp(){$s&&($s.detachEvent("onpropertychange",wg),Zs=$s=null)}function wg(e){if(e.propertyName==="value"&&il(Zs)){var t=[];yg(t,Zs,e,bd(e)),Jm(B1,t)}}function V1(e,t,n){e==="focusin"?(bp(),$s=t,Zs=n,$s.attachEvent("onpropertychange",wg)):e==="focusout"&&bp()}function W1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return il(Zs)}function H1(e,t){if(e==="click")return il(t)}function K1(e,t){if(e==="input"||e==="change")return il(t)}function Q1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:Q1;function Js(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 o=n[r];if(!Iu.call(t,o)||!Ht(e[o],t[o]))return!1}return!0}function Cp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ep(e,t){var n=Cp(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cp(n)}}function Sg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bg(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function G1(e){var t=bg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sg(n.ownerDocument.documentElement,n)){if(r!==null&&jd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Ep(n,s);var i=Ep(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Y1=wn&&"documentMode"in document&&11>=document.documentMode,go=null,ec=null,Bs=null,tc=!1;function kp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tc||go==null||go!==wa(r)||(r=go,"selectionStart"in r&&jd(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}),Bs&&Js(Bs,r)||(Bs=r,r=Pa(ec,"onSelect"),0<r.length&&(t=new Rd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=go)))}function $i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vo={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionend:$i("Transition","TransitionEnd")},tu={},Cg={};wn&&(Cg=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function al(e){if(tu[e])return tu[e];if(!vo[e])return e;var t=vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cg)return tu[e]=t[n];return e}var Eg=al("animationend"),kg=al("animationiteration"),Ng=al("animationstart"),Pg=al("transitionend"),Rg=new Map,Np="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function mr(e,t){Rg.set(e,t),eo(t,[e])}for(var nu=0;nu<Np.length;nu++){var ru=Np[nu],q1=ru.toLowerCase(),X1=ru[0].toUpperCase()+ru.slice(1);mr(q1,"on"+X1)}mr(Eg,"onAnimationEnd");mr(kg,"onAnimationIteration");mr(Ng,"onAnimationStart");mr("dblclick","onDoubleClick");mr("focusin","onFocus");mr("focusout","onBlur");mr(Pg,"onTransitionEnd");Ko("onMouseEnter",["mouseout","mouseover"]);Ko("onMouseLeave",["mouseout","mouseover"]);Ko("onPointerEnter",["pointerout","pointerover"]);Ko("onPointerLeave",["pointerout","pointerover"]);eo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));eo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));eo("onBeforeInput",["compositionend","keypress","textInput","paste"]);eo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));eo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));eo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _s="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Z1=new Set("cancel close invalid load scroll toggle".split(" ").concat(_s));function Pp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qw(r,t,void 0,e),e.currentTarget=null}function Tg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;Pp(o,a,u),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;Pp(o,a,u),s=l}}}if(ba)throw e=qu,ba=!1,qu=null,e}function ye(e,t){var n=t[ic];n===void 0&&(n=t[ic]=new Set);var r=e+"__bubble";n.has(r)||(_g(t,e,2,!1),n.add(r))}function ou(e,t,n){var r=0;t&&(r|=4),_g(n,e,r,t)}var Bi="_reactListening"+Math.random().toString(36).slice(2);function ei(e){if(!e[Bi]){e[Bi]=!0,Dm.forEach(function(n){n!=="selectionchange"&&(Z1.has(n)||ou(n,!1,e),ou(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bi]||(t[Bi]=!0,ou("selectionchange",!1,t))}}function _g(e,t,n,r){switch(pg(t)){case 1:var o=f1;break;case 4:o=p1;break;default:o=Nd}n=o.bind(null,t,n,e),o=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function su(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Nr(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}Jm(function(){var u=s,d=bd(n),c=[];e:{var y=Rg.get(e);if(y!==void 0){var p=Rd,w=e;switch(e){case"keypress":if(la(n)===0)break e;case"keydown":case"keyup":p=R1;break;case"focusin":w="focus",p=Zl;break;case"focusout":w="blur",p=Zl;break;case"beforeblur":case"afterblur":p=Zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=g1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=j1;break;case Eg:case kg:case Ng:p=x1;break;case Pg:p=O1;break;case"scroll":p=h1;break;case"wheel":p=I1;break;case"copy":case"cut":case"paste":p=S1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=vp}var h=(t&4)!==0,S=!h&&e==="scroll",v=h?y!==null?y+"Capture":null:y;h=[];for(var m=u,x;m!==null;){x=m;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,v!==null&&(b=Gs(m,v),b!=null&&h.push(ti(m,b,x)))),S)break;m=m.return}0<h.length&&(y=new p(y,w,null,n,d),c.push({event:y,listeners:h}))}}if(!(t&7)){e:{if(y=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",y&&n!==Qu&&(w=n.relatedTarget||n.fromElement)&&(Nr(w)||w[Sn]))break e;if((p||y)&&(y=d.window===d?d:(y=d.ownerDocument)?y.defaultView||y.parentWindow:window,p?(w=n.relatedTarget||n.toElement,p=u,w=w?Nr(w):null,w!==null&&(S=to(w),w!==S||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=u),p!==w)){if(h=mp,b="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(h=vp,b="onPointerLeave",v="onPointerEnter",m="pointer"),S=p==null?y:yo(p),x=w==null?y:yo(w),y=new h(b,m+"leave",p,n,d),y.target=S,y.relatedTarget=x,b=null,Nr(d)===u&&(h=new h(v,m+"enter",w,n,d),h.target=x,h.relatedTarget=S,b=h),S=b,p&&w)t:{for(h=p,v=w,m=0,x=h;x;x=io(x))m++;for(x=0,b=v;b;b=io(b))x++;for(;0<m-x;)h=io(h),m--;for(;0<x-m;)v=io(v),x--;for(;m--;){if(h===v||v!==null&&h===v.alternate)break t;h=io(h),v=io(v)}h=null}else h=null;p!==null&&Rp(c,y,p,h,!1),w!==null&&S!==null&&Rp(c,S,w,h,!0)}}e:{if(y=u?yo(u):window,p=y.nodeName&&y.nodeName.toLowerCase(),p==="select"||p==="input"&&y.type==="file")var C=U1;else if(wp(y))if(xg)C=K1;else{C=W1;var k=V1}else(p=y.nodeName)&&p.toLowerCase()==="input"&&(y.type==="checkbox"||y.type==="radio")&&(C=H1);if(C&&(C=C(e,u))){yg(c,C,n,d);break e}k&&k(e,y,u),e==="focusout"&&(k=y._wrapperState)&&k.controlled&&y.type==="number"&&Uu(y,"number",y.value)}switch(k=u?yo(u):window,e){case"focusin":(wp(k)||k.contentEditable==="true")&&(go=k,ec=u,Bs=null);break;case"focusout":Bs=ec=go=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,kp(c,n,d);break;case"selectionchange":if(Y1)break;case"keydown":case"keyup":kp(c,n,d)}var N;if(_d)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else mo?gg(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(mg&&n.locale!=="ko"&&(mo||P!=="onCompositionStart"?P==="onCompositionEnd"&&mo&&(N=hg()):(Zn=d,Pd="value"in Zn?Zn.value:Zn.textContent,mo=!0)),k=Pa(u,P),0<k.length&&(P=new gp(P,e,null,n,d),c.push({event:P,listeners:k}),N?P.data=N:(N=vg(n),N!==null&&(P.data=N)))),(N=D1?F1(e,n):z1(e,n))&&(u=Pa(u,"onBeforeInput"),0<u.length&&(d=new gp("onBeforeInput","beforeinput",null,n,d),c.push({event:d,listeners:u}),d.data=N))}Tg(c,t)})}function ti(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pa(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Gs(e,n),s!=null&&r.unshift(ti(e,s,o)),s=Gs(e,t),s!=null&&r.push(ti(e,s,o))),e=e.return}return r}function io(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rp(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=Gs(n,s),l!=null&&i.unshift(ti(n,l,a))):o||(l=Gs(n,s),l!=null&&i.push(ti(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var J1=/\r\n?/g,eS=/\u0000|\uFFFD/g;function Tp(e){return(typeof e=="string"?e:""+e).replace(J1,`
|
|
38
|
+
`).replace(eS,"")}function Ui(e,t,n){if(t=Tp(t),Tp(e)!==t&&n)throw Error(O(425))}function Ra(){}var nc=null,rc=null;function oc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var sc=typeof setTimeout=="function"?setTimeout:void 0,tS=typeof clearTimeout=="function"?clearTimeout:void 0,_p=typeof Promise=="function"?Promise:void 0,nS=typeof queueMicrotask=="function"?queueMicrotask:typeof _p<"u"?function(e){return _p.resolve(null).then(e).catch(rS)}:sc;function rS(e){setTimeout(function(){throw e})}function iu(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Xs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Xs(t)}function or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function jp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var rs=Math.random().toString(36).slice(2),en="__reactFiber$"+rs,ni="__reactProps$"+rs,Sn="__reactContainer$"+rs,ic="__reactEvents$"+rs,oS="__reactListeners$"+rs,sS="__reactHandles$"+rs;function Nr(e){var t=e[en];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sn]||n[en]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jp(e);e!==null;){if(n=e[en])return n;e=jp(e)}return t}e=n,n=e.parentNode}return null}function Ni(e){return e=e[en]||e[Sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function ll(e){return e[ni]||null}var ac=[],xo=-1;function gr(e){return{current:e}}function xe(e){0>xo||(e.current=ac[xo],ac[xo]=null,xo--)}function ge(e,t){xo++,ac[xo]=e.current,e.current=t}var fr={},Xe=gr(fr),ut=gr(!1),Ur=fr;function Qo(e,t){var n=e.type.contextTypes;if(!n)return fr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ct(e){return e=e.childContextTypes,e!=null}function Ta(){xe(ut),xe(Xe)}function Mp(e,t,n){if(Xe.current!==fr)throw Error(O(168));ge(Xe,t),ge(ut,n)}function jg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,Vw(e)||"Unknown",o));return Ne({},n,r)}function _a(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fr,Ur=Xe.current,ge(Xe,e),ge(ut,ut.current),!0}function Op(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=jg(e,t,Ur),r.__reactInternalMemoizedMergedChildContext=e,xe(ut),xe(Xe),ge(Xe,e)):xe(ut),ge(ut,n)}var hn=null,ul=!1,au=!1;function Mg(e){hn===null?hn=[e]:hn.push(e)}function iS(e){ul=!0,Mg(e)}function vr(){if(!au&&hn!==null){au=!0;var e=0,t=pe;try{var n=hn;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}hn=null,ul=!1}catch(o){throw hn!==null&&(hn=hn.slice(e+1)),rg(Cd,vr),o}finally{pe=t,au=!1}}return null}var wo=[],So=0,ja=null,Ma=0,kt=[],Nt=0,Vr=null,vn=1,yn="";function Cr(e,t){wo[So++]=Ma,wo[So++]=ja,ja=e,Ma=t}function Og(e,t,n){kt[Nt++]=vn,kt[Nt++]=yn,kt[Nt++]=Vr,Vr=e;var r=vn;e=yn;var o=32-Vt(r)-1;r&=~(1<<o),n+=1;var s=32-Vt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,vn=1<<32-Vt(t)+o|n<<o|r,yn=s+e}else vn=1<<s|n<<o|r,yn=e}function Md(e){e.return!==null&&(Cr(e,1),Og(e,1,0))}function Od(e){for(;e===ja;)ja=wo[--So],wo[So]=null,Ma=wo[--So],wo[So]=null;for(;e===Vr;)Vr=kt[--Nt],kt[Nt]=null,yn=kt[--Nt],kt[Nt]=null,vn=kt[--Nt],kt[Nt]=null}var vt=null,gt=null,be=!1,Ut=null;function Ag(e,t){var n=Pt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ap(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,vt=e,gt=or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,vt=e,gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vr!==null?{id:vn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Pt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,vt=e,gt=null,!0):!1;default:return!1}}function lc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uc(e){if(be){var t=gt;if(t){var n=t;if(!Ap(e,t)){if(lc(e))throw Error(O(418));t=or(n.nextSibling);var r=vt;t&&Ap(e,t)?Ag(r,n):(e.flags=e.flags&-4097|2,be=!1,vt=e)}}else{if(lc(e))throw Error(O(418));e.flags=e.flags&-4097|2,be=!1,vt=e}}}function Ip(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;vt=e}function Vi(e){if(e!==vt)return!1;if(!be)return Ip(e),be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!oc(e.type,e.memoizedProps)),t&&(t=gt)){if(lc(e))throw Ig(),Error(O(418));for(;t;)Ag(e,t),t=or(t.nextSibling)}if(Ip(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gt=or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gt=null}}else gt=vt?or(e.stateNode.nextSibling):null;return!0}function Ig(){for(var e=gt;e;)e=or(e.nextSibling)}function Go(){gt=vt=null,be=!1}function Ad(e){Ut===null?Ut=[e]:Ut.push(e)}var aS=Nn.ReactCurrentBatchConfig;function Ss(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Wi(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Lp(e){var t=e._init;return t(e._payload)}function Lg(e){function t(v,m){if(e){var x=v.deletions;x===null?(v.deletions=[m],v.flags|=16):x.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function o(v,m){return v=lr(v,m),v.index=0,v.sibling=null,v}function s(v,m,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<m?(v.flags|=2,m):x):(v.flags|=2,m)):(v.flags|=1048576,m)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,m,x,b){return m===null||m.tag!==6?(m=hu(x,v.mode,b),m.return=v,m):(m=o(m,x),m.return=v,m)}function l(v,m,x,b){var C=x.type;return C===ho?d(v,m,x.props.children,b,x.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Fn&&Lp(C)===m.type)?(b=o(m,x.props),b.ref=Ss(v,m,x),b.return=v,b):(b=ma(x.type,x.key,x.props,null,v.mode,b),b.ref=Ss(v,m,x),b.return=v,b)}function u(v,m,x,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==x.containerInfo||m.stateNode.implementation!==x.implementation?(m=mu(x,v.mode,b),m.return=v,m):(m=o(m,x.children||[]),m.return=v,m)}function d(v,m,x,b,C){return m===null||m.tag!==7?(m=$r(x,v.mode,b,C),m.return=v,m):(m=o(m,x),m.return=v,m)}function c(v,m,x){if(typeof m=="string"&&m!==""||typeof m=="number")return m=hu(""+m,v.mode,x),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Oi:return x=ma(m.type,m.key,m.props,null,v.mode,x),x.ref=Ss(v,null,m),x.return=v,x;case po:return m=mu(m,v.mode,x),m.return=v,m;case Fn:var b=m._init;return c(v,b(m._payload),x)}if(Rs(m)||gs(m))return m=$r(m,v.mode,x,null),m.return=v,m;Wi(v,m)}return null}function y(v,m,x,b){var C=m!==null?m.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(v,m,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Oi:return x.key===C?l(v,m,x,b):null;case po:return x.key===C?u(v,m,x,b):null;case Fn:return C=x._init,y(v,m,C(x._payload),b)}if(Rs(x)||gs(x))return C!==null?null:d(v,m,x,b,null);Wi(v,x)}return null}function p(v,m,x,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return v=v.get(x)||null,a(m,v,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Oi:return v=v.get(b.key===null?x:b.key)||null,l(m,v,b,C);case po:return v=v.get(b.key===null?x:b.key)||null,u(m,v,b,C);case Fn:var k=b._init;return p(v,m,x,k(b._payload),C)}if(Rs(b)||gs(b))return v=v.get(x)||null,d(m,v,b,C,null);Wi(m,b)}return null}function w(v,m,x,b){for(var C=null,k=null,N=m,P=m=0,j=null;N!==null&&P<x.length;P++){N.index>P?(j=N,N=null):j=N.sibling;var R=y(v,N,x[P],b);if(R===null){N===null&&(N=j);break}e&&N&&R.alternate===null&&t(v,N),m=s(R,m,P),k===null?C=R:k.sibling=R,k=R,N=j}if(P===x.length)return n(v,N),be&&Cr(v,P),C;if(N===null){for(;P<x.length;P++)N=c(v,x[P],b),N!==null&&(m=s(N,m,P),k===null?C=N:k.sibling=N,k=N);return be&&Cr(v,P),C}for(N=r(v,N);P<x.length;P++)j=p(N,v,P,x[P],b),j!==null&&(e&&j.alternate!==null&&N.delete(j.key===null?P:j.key),m=s(j,m,P),k===null?C=j:k.sibling=j,k=j);return e&&N.forEach(function(A){return t(v,A)}),be&&Cr(v,P),C}function h(v,m,x,b){var C=gs(x);if(typeof C!="function")throw Error(O(150));if(x=C.call(x),x==null)throw Error(O(151));for(var k=C=null,N=m,P=m=0,j=null,R=x.next();N!==null&&!R.done;P++,R=x.next()){N.index>P?(j=N,N=null):j=N.sibling;var A=y(v,N,R.value,b);if(A===null){N===null&&(N=j);break}e&&N&&A.alternate===null&&t(v,N),m=s(A,m,P),k===null?C=A:k.sibling=A,k=A,N=j}if(R.done)return n(v,N),be&&Cr(v,P),C;if(N===null){for(;!R.done;P++,R=x.next())R=c(v,R.value,b),R!==null&&(m=s(R,m,P),k===null?C=R:k.sibling=R,k=R);return be&&Cr(v,P),C}for(N=r(v,N);!R.done;P++,R=x.next())R=p(N,v,P,R.value,b),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?P:R.key),m=s(R,m,P),k===null?C=R:k.sibling=R,k=R);return e&&N.forEach(function(M){return t(v,M)}),be&&Cr(v,P),C}function S(v,m,x,b){if(typeof x=="object"&&x!==null&&x.type===ho&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Oi:e:{for(var C=x.key,k=m;k!==null;){if(k.key===C){if(C=x.type,C===ho){if(k.tag===7){n(v,k.sibling),m=o(k,x.props.children),m.return=v,v=m;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Fn&&Lp(C)===k.type){n(v,k.sibling),m=o(k,x.props),m.ref=Ss(v,k,x),m.return=v,v=m;break e}n(v,k);break}else t(v,k);k=k.sibling}x.type===ho?(m=$r(x.props.children,v.mode,b,x.key),m.return=v,v=m):(b=ma(x.type,x.key,x.props,null,v.mode,b),b.ref=Ss(v,m,x),b.return=v,v=b)}return i(v);case po:e:{for(k=x.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(v,m.sibling),m=o(m,x.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=mu(x,v.mode,b),m.return=v,v=m}return i(v);case Fn:return k=x._init,S(v,m,k(x._payload),b)}if(Rs(x))return w(v,m,x,b);if(gs(x))return h(v,m,x,b);Wi(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(v,m.sibling),m=o(m,x),m.return=v,v=m):(n(v,m),m=hu(x,v.mode,b),m.return=v,v=m),i(v)):n(v,m)}return S}var Yo=Lg(!0),Dg=Lg(!1),Oa=gr(null),Aa=null,bo=null,Id=null;function Ld(){Id=bo=Aa=null}function Dd(e){var t=Oa.current;xe(Oa),e._currentValue=t}function cc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function To(e,t){Aa=e,Id=bo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lt=!0),e.firstContext=null)}function Tt(e){var t=e._currentValue;if(Id!==e)if(e={context:e,memoizedValue:t,next:null},bo===null){if(Aa===null)throw Error(O(308));bo=e,Aa.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Pr=null;function Fd(e){Pr===null?Pr=[e]:Pr.push(e)}function Fg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Fd(t)):(n.next=o.next,o.next=n),t.interleaved=n,bn(e,r)}function bn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var zn=!1;function zd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,bn(e,n)}return o=r.interleaved,o===null?(t.next=t,Fd(r)):(t.next=o.next,o.next=t),r.interleaved=t,bn(e,n)}function ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ed(e,n)}}function Dp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ia(e,t,n,r){var o=e.updateQueue;zn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var c=o.baseState;i=0,d=u=l=null,a=s;do{var y=a.lane,p=a.eventTime;if((r&y)===y){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,h=a;switch(y=t,p=n,h.tag){case 1:if(w=h.payload,typeof w=="function"){c=w.call(p,c,y);break e}c=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=h.payload,y=typeof w=="function"?w.call(p,c,y):w,y==null)break e;c=Ne({},c,y);break e;case 2:zn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,y=o.effects,y===null?o.effects=[a]:y.push(a))}else p={eventTime:p,lane:y,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,i|=y;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;y=a,a=y.next,y.next=null,o.lastBaseUpdate=y,o.shared.pending=null}}while(!0);if(d===null&&(l=c),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Hr|=i,e.lanes=i,e.memoizedState=c}}function Fp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(O(191,o));o.call(r)}}}var Pi={},sn=gr(Pi),ri=gr(Pi),oi=gr(Pi);function Rr(e){if(e===Pi)throw Error(O(174));return e}function $d(e,t){switch(ge(oi,t),ge(ri,e),ge(sn,Pi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wu(t,e)}xe(sn),ge(sn,t)}function qo(){xe(sn),xe(ri),xe(oi)}function $g(e){Rr(oi.current);var t=Rr(sn.current),n=Wu(t,e.type);t!==n&&(ge(ri,e),ge(sn,n))}function Bd(e){ri.current===e&&(xe(sn),xe(ri))}var Ee=gr(0);function La(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 lu=[];function Ud(){for(var e=0;e<lu.length;e++)lu[e]._workInProgressVersionPrimary=null;lu.length=0}var ca=Nn.ReactCurrentDispatcher,uu=Nn.ReactCurrentBatchConfig,Wr=0,ke=null,Oe=null,De=null,Da=!1,Us=!1,si=0,lS=0;function Qe(){throw Error(O(321))}function Vd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ht(e[n],t[n]))return!1;return!0}function Wd(e,t,n,r,o,s){if(Wr=s,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ca.current=e===null||e.memoizedState===null?fS:pS,e=n(r,o),Us){s=0;do{if(Us=!1,si=0,25<=s)throw Error(O(301));s+=1,De=Oe=null,t.updateQueue=null,ca.current=hS,e=n(r,o)}while(Us)}if(ca.current=Fa,t=Oe!==null&&Oe.next!==null,Wr=0,De=Oe=ke=null,Da=!1,t)throw Error(O(300));return e}function Hd(){var e=si!==0;return si=0,e}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?ke.memoizedState=De=e:De=De.next=e,De}function _t(){if(Oe===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=De===null?ke.memoizedState:De.next;if(t!==null)De=t,Oe=e;else{if(e===null)throw Error(O(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},De===null?ke.memoizedState=De=e:De=De.next=e}return De}function ii(e,t){return typeof t=="function"?t(e):t}function cu(e){var t=_t(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Oe,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,u=s;do{var d=u.lane;if((Wr&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,i=r):l=l.next=c,ke.lanes|=d,Hr|=d}u=u.next}while(u!==null&&u!==s);l===null?i=r:l.next=a,Ht(r,t.memoizedState)||(lt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,ke.lanes|=s,Hr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function du(e){var t=_t(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Ht(s,t.memoizedState)||(lt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Bg(){}function Ug(e,t){var n=ke,r=_t(),o=t(),s=!Ht(r.memoizedState,o);if(s&&(r.memoizedState=o,lt=!0),r=r.queue,Kd(Hg.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||De!==null&&De.memoizedState.tag&1){if(n.flags|=2048,ai(9,Wg.bind(null,n,r,o,t),void 0,null),Fe===null)throw Error(O(349));Wr&30||Vg(n,t,o)}return o}function Vg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wg(e,t,n,r){t.value=n,t.getSnapshot=r,Kg(t)&&Qg(e)}function Hg(e,t,n){return n(function(){Kg(t)&&Qg(e)})}function Kg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ht(e,n)}catch{return!0}}function Qg(e){var t=bn(e,1);t!==null&&Wt(t,e,1,-1)}function zp(e){var t=qt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:e},t.queue=e,e=e.dispatch=dS.bind(null,ke,e),[t.memoizedState,e]}function ai(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Gg(){return _t().memoizedState}function da(e,t,n,r){var o=qt();ke.flags|=e,o.memoizedState=ai(1|t,n,void 0,r===void 0?null:r)}function cl(e,t,n,r){var o=_t();r=r===void 0?null:r;var s=void 0;if(Oe!==null){var i=Oe.memoizedState;if(s=i.destroy,r!==null&&Vd(r,i.deps)){o.memoizedState=ai(t,n,s,r);return}}ke.flags|=e,o.memoizedState=ai(1|t,n,s,r)}function $p(e,t){return da(8390656,8,e,t)}function Kd(e,t){return cl(2048,8,e,t)}function Yg(e,t){return cl(4,2,e,t)}function qg(e,t){return cl(4,4,e,t)}function Xg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zg(e,t,n){return n=n!=null?n.concat([e]):null,cl(4,4,Xg.bind(null,t,e),n)}function Qd(){}function Jg(e,t){var n=_t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ev(e,t){var n=_t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function tv(e,t,n){return Wr&21?(Ht(n,t)||(n=ig(),ke.lanes|=n,Hr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=n)}function uS(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=uu.transition;uu.transition={};try{e(!1),t()}finally{pe=n,uu.transition=r}}function nv(){return _t().memoizedState}function cS(e,t,n){var r=ar(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rv(e))ov(t,n);else if(n=Fg(e,t,n,r),n!==null){var o=et();Wt(n,e,r,o),sv(n,t,r)}}function dS(e,t,n){var r=ar(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rv(e))ov(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Ht(a,i)){var l=t.interleaved;l===null?(o.next=o,Fd(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Fg(e,t,o,r),n!==null&&(o=et(),Wt(n,e,r,o),sv(n,t,r))}}function rv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function ov(e,t){Us=Da=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ed(e,n)}}var Fa={readContext:Tt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},fS={readContext:Tt,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:$p,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,da(4194308,4,Xg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return da(4194308,4,e,t)},useInsertionEffect:function(e,t){return da(4,2,e,t)},useMemo:function(e,t){var n=qt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=cS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:zp,useDebugValue:Qd,useDeferredValue:function(e){return qt().memoizedState=e},useTransition:function(){var e=zp(!1),t=e[0];return e=uS.bind(null,e[1]),qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=qt();if(be){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Fe===null)throw Error(O(349));Wr&30||Vg(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,$p(Hg.bind(null,r,s,e),[e]),r.flags|=2048,ai(9,Wg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=qt(),t=Fe.identifierPrefix;if(be){var n=yn,r=vn;n=(r&~(1<<32-Vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=si++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=lS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pS={readContext:Tt,useCallback:Jg,useContext:Tt,useEffect:Kd,useImperativeHandle:Zg,useInsertionEffect:Yg,useLayoutEffect:qg,useMemo:ev,useReducer:cu,useRef:Gg,useState:function(){return cu(ii)},useDebugValue:Qd,useDeferredValue:function(e){var t=_t();return tv(t,Oe.memoizedState,e)},useTransition:function(){var e=cu(ii)[0],t=_t().memoizedState;return[e,t]},useMutableSource:Bg,useSyncExternalStore:Ug,useId:nv,unstable_isNewReconciler:!1},hS={readContext:Tt,useCallback:Jg,useContext:Tt,useEffect:Kd,useImperativeHandle:Zg,useInsertionEffect:Yg,useLayoutEffect:qg,useMemo:ev,useReducer:du,useRef:Gg,useState:function(){return du(ii)},useDebugValue:Qd,useDeferredValue:function(e){var t=_t();return Oe===null?t.memoizedState=e:tv(t,Oe.memoizedState,e)},useTransition:function(){var e=du(ii)[0],t=_t().memoizedState;return[e,t]},useMutableSource:Bg,useSyncExternalStore:Ug,useId:nv,unstable_isNewReconciler:!1};function zt(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return(e=e._reactInternals)?to(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=et(),o=ar(e),s=xn(r,o);s.payload=t,n!=null&&(s.callback=n),t=sr(e,s,o),t!==null&&(Wt(t,e,o,r),ua(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=et(),o=ar(e),s=xn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=sr(e,s,o),t!==null&&(Wt(t,e,o,r),ua(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=et(),r=ar(e),o=xn(n,r);o.tag=2,t!=null&&(o.callback=t),t=sr(e,o,r),t!==null&&(Wt(t,e,r,n),ua(t,e,r))}};function Bp(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Js(n,r)||!Js(o,s):!0}function iv(e,t,n){var r=!1,o=fr,s=t.contextType;return typeof s=="object"&&s!==null?s=Tt(s):(o=ct(t)?Ur:Xe.current,r=t.contextTypes,s=(r=r!=null)?Qo(e,o):fr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Up(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function fc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},zd(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Tt(s):(s=ct(t)?Ur:Xe.current,o.context=Qo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(dc(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&dl.enqueueReplaceState(o,o.state,null),Ia(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Xo(e,t){try{var n="",r=t;do n+=Uw(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function fu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mS=typeof WeakMap=="function"?WeakMap:Map;function av(e,t,n){n=xn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$a||($a=!0,Cc=r),pc(e,t)},n}function lv(e,t,n){n=xn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){pc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){pc(e,t),typeof r!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Vp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=TS.bind(null,e,t,n),t.then(e,e))}function Wp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Hp(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=xn(-1,1),t.tag=2,sr(n,t,1))),n.lanes|=1),e)}var gS=Nn.ReactCurrentOwner,lt=!1;function Je(e,t,n,r){t.child=e===null?Dg(t,null,n,r):Yo(t,e.child,n,r)}function Kp(e,t,n,r,o){n=n.render;var s=t.ref;return To(t,o),r=Wd(e,t,n,r,s,o),n=Hd(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Cn(e,t,o)):(be&&n&&Md(t),t.flags|=1,Je(e,t,r,o),t.child)}function Qp(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!tf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,uv(e,t,s,r,o)):(e=ma(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Js,n(i,r)&&e.ref===t.ref)return Cn(e,t,o)}return t.flags|=1,e=lr(s,r),e.ref=t.ref,e.return=t,t.child=e}function uv(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Js(s,r)&&e.ref===t.ref)if(lt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(lt=!0);else return t.lanes=e.lanes,Cn(e,t,o)}return hc(e,t,n,r,o)}function cv(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(Eo,pt),pt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(Eo,pt),pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ge(Eo,pt),pt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ge(Eo,pt),pt|=r;return Je(e,t,o,n),t.child}function dv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hc(e,t,n,r,o){var s=ct(n)?Ur:Xe.current;return s=Qo(t,s),To(t,o),n=Wd(e,t,n,r,s,o),r=Hd(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Cn(e,t,o)):(be&&r&&Md(t),t.flags|=1,Je(e,t,n,o),t.child)}function Gp(e,t,n,r,o){if(ct(n)){var s=!0;_a(t)}else s=!1;if(To(t,o),t.stateNode===null)fa(e,t),iv(t,n,r),fc(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Tt(u):(u=ct(n)?Ur:Xe.current,u=Qo(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Up(t,i,r,u),zn=!1;var y=t.memoizedState;i.state=y,Ia(t,r,i,o),l=t.memoizedState,a!==r||y!==l||ut.current||zn?(typeof d=="function"&&(dc(t,n,d,r),l=t.memoizedState),(a=zn||Bp(t,n,a,r,y,l,u))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,zg(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:zt(t.type,a),i.props=u,c=t.pendingProps,y=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Tt(l):(l=ct(n)?Ur:Xe.current,l=Qo(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==c||y!==l)&&Up(t,i,r,l),zn=!1,y=t.memoizedState,i.state=y,Ia(t,r,i,o);var w=t.memoizedState;a!==c||y!==w||ut.current||zn?(typeof p=="function"&&(dc(t,n,p,r),w=t.memoizedState),(u=zn||Bp(t,n,u,r,y,w,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),i.props=r,i.state=w,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),r=!1)}return mc(e,t,n,r,s,o)}function mc(e,t,n,r,o,s){dv(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&Op(t,n,!1),Cn(e,t,s);r=t.stateNode,gS.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Yo(t,e.child,null,s),t.child=Yo(t,null,a,s)):Je(e,t,a,s),t.memoizedState=r.state,o&&Op(t,n,!0),t.child}function fv(e){var t=e.stateNode;t.pendingContext?Mp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mp(e,t.context,!1),$d(e,t.containerInfo)}function Yp(e,t,n,r,o){return Go(),Ad(o),t.flags|=256,Je(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0};function vc(e){return{baseLanes:e,cachePool:null,transitions:null}}function pv(e,t,n){var r=t.pendingProps,o=Ee.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(Ee,o&1),e===null)return uc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=hl(i,r,0,null),e=$r(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=vc(n),t.memoizedState=gc,e):Gd(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return vS(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=lr(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=lr(a,s):(s=$r(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?vc(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=gc,r}return s=e.child,e=s.sibling,r=lr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gd(e,t){return t=hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hi(e,t,n,r){return r!==null&&Ad(r),Yo(t,e.child,null,n),e=Gd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vS(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=fu(Error(O(422))),Hi(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=hl({mode:"visible",children:r.children},o,0,null),s=$r(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Yo(t,e.child,null,i),t.child.memoizedState=vc(i),t.memoizedState=gc,s);if(!(t.mode&1))return Hi(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(O(419)),r=fu(s,r,void 0),Hi(e,t,i,r)}if(a=(i&e.childLanes)!==0,lt||a){if(r=Fe,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,bn(e,o),Wt(r,e,o,-1))}return ef(),r=fu(Error(O(421))),Hi(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=_S.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,gt=or(o.nextSibling),vt=t,be=!0,Ut=null,e!==null&&(kt[Nt++]=vn,kt[Nt++]=yn,kt[Nt++]=Vr,vn=e.id,yn=e.overflow,Vr=t),t=Gd(t,r.children),t.flags|=4096,t)}function qp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cc(e.return,t,n)}function pu(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function hv(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Je(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qp(e,n,t);else if(e.tag===19)qp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&La(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),pu(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&La(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}pu(t,!0,n,null,s);break;case"together":pu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=lr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=lr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yS(e,t,n){switch(t.tag){case 3:fv(t),Go();break;case 5:$g(t);break;case 1:ct(t.type)&&_a(t);break;case 4:$d(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(Oa,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?pv(e,t,n):(ge(Ee,Ee.current&1),e=Cn(e,t,n),e!==null?e.sibling:null);ge(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return hv(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,cv(e,t,n)}return Cn(e,t,n)}var mv,yc,gv,vv;mv=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yc=function(){};gv=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Rr(sn.current);var s=null;switch(n){case"input":o=$u(e,o),r=$u(e,r),s=[];break;case"select":o=Ne({},o,{value:void 0}),r=Ne({},r,{value:void 0}),s=[];break;case"textarea":o=Vu(e,o),r=Vu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ra)}Hu(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ks.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ks.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ye("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};vv=function(e,t,n,r){n!==r&&(t.flags|=4)};function bs(e,t){if(!be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xS(e,t,n){var r=t.pendingProps;switch(Od(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return ct(t.type)&&Ta(),Ge(t),null;case 3:return r=t.stateNode,qo(),xe(ut),xe(Xe),Ud(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ut!==null&&(Nc(Ut),Ut=null))),yc(e,t),Ge(t),null;case 5:Bd(t);var o=Rr(oi.current);if(n=t.type,e!==null&&t.stateNode!=null)gv(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ge(t),null}if(e=Rr(sn.current),Vi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[en]=t,r[ni]=s,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(o=0;o<_s.length;o++)ye(_s[o],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":sp(r,s),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ye("invalid",r);break;case"textarea":ap(r,s),ye("invalid",r)}Hu(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ui(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ui(r.textContent,a,e),o=["children",""+a]):Ks.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ye("scroll",r)}switch(n){case"input":Ai(r),ip(r,s,!0);break;case"textarea":Ai(r),lp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ra)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Hm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[en]=t,e[ni]=r,mv(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ku(n,r),n){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;o<_s.length;o++)ye(_s[o],e);o=r;break;case"source":ye("error",e),o=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),o=r;break;case"details":ye("toggle",e),o=r;break;case"input":sp(e,r),o=$u(e,r),ye("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ne({},r,{value:void 0}),ye("invalid",e);break;case"textarea":ap(e,r),o=Vu(e,r),ye("invalid",e);break;default:o=r}Hu(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Gm(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Km(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Qs(e,l):typeof l=="number"&&Qs(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ks.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ye("scroll",e):l!=null&&yd(e,s,l,i))}switch(n){case"input":Ai(e),ip(e,r,!1);break;case"textarea":Ai(e),lp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+dr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ko(e,!!r.multiple,s,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ra)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ge(t),null;case 6:if(e&&t.stateNode!=null)vv(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Rr(oi.current),Rr(sn.current),Vi(t)){if(r=t.stateNode,n=t.memoizedProps,r[en]=t,(s=r.nodeValue!==n)&&(e=vt,e!==null))switch(e.tag){case 3:Ui(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ui(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[en]=t,t.stateNode=r}return Ge(t),null;case 13:if(xe(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(be&>!==null&&t.mode&1&&!(t.flags&128))Ig(),Go(),t.flags|=98560,s=!1;else if(s=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(O(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(O(317));s[en]=t}else Go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ge(t),s=!1}else Ut!==null&&(Nc(Ut),Ut=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?Ae===0&&(Ae=3):ef())),t.updateQueue!==null&&(t.flags|=4),Ge(t),null);case 4:return qo(),yc(e,t),e===null&&ei(t.stateNode.containerInfo),Ge(t),null;case 10:return Dd(t.type._context),Ge(t),null;case 17:return ct(t.type)&&Ta(),Ge(t),null;case 19:if(xe(Ee),s=t.memoizedState,s===null)return Ge(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)bs(s,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=La(e),i!==null){for(t.flags|=128,bs(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&_e()>Zo&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304)}else{if(!r)if(e=La(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!be)return Ge(t),null}else 2*_e()-s.renderingStartTime>Zo&&n!==1073741824&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=_e(),t.sibling=null,n=Ee.current,ge(Ee,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Jd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function wS(e,t){switch(Od(t),t.tag){case 1:return ct(t.type)&&Ta(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qo(),xe(ut),xe(Xe),Ud(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bd(t),null;case 13:if(xe(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(Ee),null;case 4:return qo(),null;case 10:return Dd(t.type._context),null;case 22:case 23:return Jd(),null;case 24:return null;default:return null}}var Ki=!1,qe=!1,SS=typeof WeakSet=="function"?WeakSet:Set,$=null;function Co(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function xc(e,t,n){try{n()}catch(r){Re(e,t,r)}}var Xp=!1;function bS(e,t){if(nc=ka,e=bg(),jd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,c=e,y=null;t:for(;;){for(var p;c!==n||o!==0&&c.nodeType!==3||(a=i+o),c!==s||r!==0&&c.nodeType!==3||(l=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(p=c.firstChild)!==null;)y=c,c=p;for(;;){if(c===e)break t;if(y===n&&++u===o&&(a=i),y===s&&++d===r&&(l=i),(p=c.nextSibling)!==null)break;c=y,y=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rc={focusedElem:e,selectionRange:n},ka=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var h=w.memoizedProps,S=w.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:zt(t.type,h),S);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(b){Re(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return w=Xp,Xp=!1,w}function Vs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&xc(t,n,s)}o=o.next}while(o!==r)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function yv(e){var t=e.alternate;t!==null&&(e.alternate=null,yv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[en],delete t[ni],delete t[ic],delete t[oS],delete t[sS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xv(e){return e.tag===5||e.tag===3||e.tag===4}function Zp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ra));else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}function bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(e,t,n),e=e.sibling}var Be=null,Bt=!1;function On(e,t,n){for(n=n.child;n!==null;)wv(e,t,n),n=n.sibling}function wv(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(ol,n)}catch{}switch(n.tag){case 5:qe||Co(n,t);case 6:var r=Be,o=Bt;Be=null,On(e,t,n),Be=r,Bt=o,Be!==null&&(Bt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(Bt?(e=Be,n=n.stateNode,e.nodeType===8?iu(e.parentNode,n):e.nodeType===1&&iu(e,n),Xs(e)):iu(Be,n.stateNode));break;case 4:r=Be,o=Bt,Be=n.stateNode.containerInfo,Bt=!0,On(e,t,n),Be=r,Bt=o;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&xc(n,t,i),o=o.next}while(o!==r)}On(e,t,n);break;case 1:if(!qe&&(Co(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Re(n,t,a)}On(e,t,n);break;case 21:On(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,On(e,t,n),qe=r):On(e,t,n);break;default:On(e,t,n)}}function Jp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new SS),t.forEach(function(r){var o=jS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Lt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Be=a.stateNode,Bt=!1;break e;case 3:Be=a.stateNode.containerInfo,Bt=!0;break e;case 4:Be=a.stateNode.containerInfo,Bt=!0;break e}a=a.return}if(Be===null)throw Error(O(160));wv(s,i,o),Be=null,Bt=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){Re(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sv(t,e),t=t.sibling}function Sv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lt(t,e),Yt(e),r&4){try{Vs(3,e,e.return),fl(3,e)}catch(h){Re(e,e.return,h)}try{Vs(5,e,e.return)}catch(h){Re(e,e.return,h)}}break;case 1:Lt(t,e),Yt(e),r&512&&n!==null&&Co(n,n.return);break;case 5:if(Lt(t,e),Yt(e),r&512&&n!==null&&Co(n,n.return),e.flags&32){var o=e.stateNode;try{Qs(o,"")}catch(h){Re(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Vm(o,s),Ku(a,i);var u=Ku(a,s);for(i=0;i<l.length;i+=2){var d=l[i],c=l[i+1];d==="style"?Gm(o,c):d==="dangerouslySetInnerHTML"?Km(o,c):d==="children"?Qs(o,c):yd(o,d,c,u)}switch(a){case"input":Bu(o,s);break;case"textarea":Wm(o,s);break;case"select":var y=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?ko(o,!!s.multiple,p,!1):y!==!!s.multiple&&(s.defaultValue!=null?ko(o,!!s.multiple,s.defaultValue,!0):ko(o,!!s.multiple,s.multiple?[]:"",!1))}o[ni]=s}catch(h){Re(e,e.return,h)}}break;case 6:if(Lt(t,e),Yt(e),r&4){if(e.stateNode===null)throw Error(O(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(h){Re(e,e.return,h)}}break;case 3:if(Lt(t,e),Yt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Xs(t.containerInfo)}catch(h){Re(e,e.return,h)}break;case 4:Lt(t,e),Yt(e);break;case 13:Lt(t,e),Yt(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Xd=_e())),r&4&&Jp(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(u=qe)||d,Lt(t,e),qe=u):Lt(t,e),Yt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for($=e,d=e.child;d!==null;){for(c=$=d;$!==null;){switch(y=$,p=y.child,y.tag){case 0:case 11:case 14:case 15:Vs(4,y,y.return);break;case 1:Co(y,y.return);var w=y.stateNode;if(typeof w.componentWillUnmount=="function"){r=y,n=y.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(h){Re(r,n,h)}}break;case 5:Co(y,y.return);break;case 22:if(y.memoizedState!==null){th(c);continue}}p!==null?(p.return=y,$=p):th(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{o=c.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Qm("display",i))}catch(h){Re(e,e.return,h)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(h){Re(e,e.return,h)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Lt(t,e),Yt(e),r&4&&Jp(e);break;case 21:break;default:Lt(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(xv(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Qs(o,""),r.flags&=-33);var s=Zp(e);bc(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Zp(e);Sc(e,a,i);break;default:throw Error(O(161))}}catch(l){Re(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function CS(e,t,n){$=e,bv(e)}function bv(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var o=$,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ki;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||qe;a=Ki;var u=qe;if(Ki=i,(qe=l)&&!u)for($=o;$!==null;)i=$,l=i.child,i.tag===22&&i.memoizedState!==null?nh(o):l!==null?(l.return=i,$=l):nh(o);for(;s!==null;)$=s,bv(s),s=s.sibling;$=o,Ki=a,qe=u}eh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,$=s):eh(e)}}function eh(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||fl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!qe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:zt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Fp(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Fp(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&Xs(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}qe||t.flags&512&&wc(t)}catch(y){Re(t,t.return,y)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function th(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function nh(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fl(4,t)}catch(l){Re(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Re(t,o,l)}}var s=t.return;try{wc(t)}catch(l){Re(t,s,l)}break;case 5:var i=t.return;try{wc(t)}catch(l){Re(t,i,l)}}}catch(l){Re(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var ES=Math.ceil,za=Nn.ReactCurrentDispatcher,Yd=Nn.ReactCurrentOwner,Rt=Nn.ReactCurrentBatchConfig,ae=0,Fe=null,Me=null,We=0,pt=0,Eo=gr(0),Ae=0,li=null,Hr=0,pl=0,qd=0,Ws=null,at=null,Xd=0,Zo=1/0,pn=null,$a=!1,Cc=null,ir=null,Qi=!1,Jn=null,Ba=0,Hs=0,Ec=null,pa=-1,ha=0;function et(){return ae&6?_e():pa!==-1?pa:pa=_e()}function ar(e){return e.mode&1?ae&2&&We!==0?We&-We:aS.transition!==null?(ha===0&&(ha=ig()),ha):(e=pe,e!==0||(e=window.event,e=e===void 0?16:pg(e.type)),e):1}function Wt(e,t,n,r){if(50<Hs)throw Hs=0,Ec=null,Error(O(185));Ei(e,n,r),(!(ae&2)||e!==Fe)&&(e===Fe&&(!(ae&2)&&(pl|=n),Ae===4&&Vn(e,We)),dt(e,r),n===1&&ae===0&&!(t.mode&1)&&(Zo=_e()+500,ul&&vr()))}function dt(e,t){var n=e.callbackNode;a1(e,t);var r=Ea(e,e===Fe?We:0);if(r===0)n!==null&&dp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dp(n),t===1)e.tag===0?iS(rh.bind(null,e)):Mg(rh.bind(null,e)),nS(function(){!(ae&6)&&vr()}),n=null;else{switch(ag(r)){case 1:n=Cd;break;case 4:n=og;break;case 16:n=Ca;break;case 536870912:n=sg;break;default:n=Ca}n=_v(n,Cv.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cv(e,t){if(pa=-1,ha=0,ae&6)throw Error(O(327));var n=e.callbackNode;if(_o()&&e.callbackNode!==n)return null;var r=Ea(e,e===Fe?We:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ua(e,r);else{t=r;var o=ae;ae|=2;var s=kv();(Fe!==e||We!==t)&&(pn=null,Zo=_e()+500,zr(e,t));do try{PS();break}catch(a){Ev(e,a)}while(!0);Ld(),za.current=s,ae=o,Me!==null?t=0:(Fe=null,We=0,t=Ae)}if(t!==0){if(t===2&&(o=Xu(e),o!==0&&(r=o,t=kc(e,o))),t===1)throw n=li,zr(e,0),Vn(e,r),dt(e,_e()),n;if(t===6)Vn(e,r);else{if(o=e.current.alternate,!(r&30)&&!kS(o)&&(t=Ua(e,r),t===2&&(s=Xu(e),s!==0&&(r=s,t=kc(e,s))),t===1))throw n=li,zr(e,0),Vn(e,r),dt(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Er(e,at,pn);break;case 3:if(Vn(e,r),(r&130023424)===r&&(t=Xd+500-_e(),10<t)){if(Ea(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=sc(Er.bind(null,e,at,pn),t);break}Er(e,at,pn);break;case 4:if(Vn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Vt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ES(r/1960))-r,10<r){e.timeoutHandle=sc(Er.bind(null,e,at,pn),r);break}Er(e,at,pn);break;case 5:Er(e,at,pn);break;default:throw Error(O(329))}}}return dt(e,_e()),e.callbackNode===n?Cv.bind(null,e):null}function kc(e,t){var n=Ws;return e.current.memoizedState.isDehydrated&&(zr(e,t).flags|=256),e=Ua(e,t),e!==2&&(t=at,at=n,t!==null&&Nc(t)),e}function Nc(e){at===null?at=e:at.push.apply(at,e)}function kS(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Ht(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vn(e,t){for(t&=~qd,t&=~pl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vt(t),r=1<<n;e[n]=-1,t&=~r}}function rh(e){if(ae&6)throw Error(O(327));_o();var t=Ea(e,0);if(!(t&1))return dt(e,_e()),null;var n=Ua(e,t);if(e.tag!==0&&n===2){var r=Xu(e);r!==0&&(t=r,n=kc(e,r))}if(n===1)throw n=li,zr(e,0),Vn(e,t),dt(e,_e()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Er(e,at,pn),dt(e,_e()),null}function Zd(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Zo=_e()+500,ul&&vr())}}function Kr(e){Jn!==null&&Jn.tag===0&&!(ae&6)&&_o();var t=ae;ae|=1;var n=Rt.transition,r=pe;try{if(Rt.transition=null,pe=1,e)return e()}finally{pe=r,Rt.transition=n,ae=t,!(ae&6)&&vr()}}function Jd(){pt=Eo.current,xe(Eo)}function zr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,tS(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(Od(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ta();break;case 3:qo(),xe(ut),xe(Xe),Ud();break;case 5:Bd(r);break;case 4:qo();break;case 13:xe(Ee);break;case 19:xe(Ee);break;case 10:Dd(r.type._context);break;case 22:case 23:Jd()}n=n.return}if(Fe=e,Me=e=lr(e.current,null),We=pt=t,Ae=0,li=null,qd=pl=Hr=0,at=Ws=null,Pr!==null){for(t=0;t<Pr.length;t++)if(n=Pr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Pr=null}return e}function Ev(e,t){do{var n=Me;try{if(Ld(),ca.current=Fa,Da){for(var r=ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Da=!1}if(Wr=0,De=Oe=ke=null,Us=!1,si=0,Yd.current=null,n===null||n.return===null){Ae=1,li=t,Me=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=We,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var y=d.alternate;y?(d.updateQueue=y.updateQueue,d.memoizedState=y.memoizedState,d.lanes=y.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Wp(i);if(p!==null){p.flags&=-257,Hp(p,i,a,s,t),p.mode&1&&Vp(s,u,t),t=p,l=u;var w=t.updateQueue;if(w===null){var h=new Set;h.add(l),t.updateQueue=h}else w.add(l);break e}else{if(!(t&1)){Vp(s,u,t),ef();break e}l=Error(O(426))}}else if(be&&a.mode&1){var S=Wp(i);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Hp(S,i,a,s,t),Ad(Xo(l,a));break e}}s=l=Xo(l,a),Ae!==4&&(Ae=2),Ws===null?Ws=[s]:Ws.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=av(s,l,t);Dp(s,v);break e;case 1:a=l;var m=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ir===null||!ir.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=lv(s,a,t);Dp(s,b);break e}}s=s.return}while(s!==null)}Pv(n)}catch(C){t=C,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function kv(){var e=za.current;return za.current=Fa,e===null?Fa:e}function ef(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Fe===null||!(Hr&268435455)&&!(pl&268435455)||Vn(Fe,We)}function Ua(e,t){var n=ae;ae|=2;var r=kv();(Fe!==e||We!==t)&&(pn=null,zr(e,t));do try{NS();break}catch(o){Ev(e,o)}while(!0);if(Ld(),ae=n,za.current=r,Me!==null)throw Error(O(261));return Fe=null,We=0,Ae}function NS(){for(;Me!==null;)Nv(Me)}function PS(){for(;Me!==null&&!Zw();)Nv(Me)}function Nv(e){var t=Tv(e.alternate,e,pt);e.memoizedProps=e.pendingProps,t===null?Pv(e):Me=t,Yd.current=null}function Pv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=wS(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,Me=null;return}}else if(n=xS(n,t,pt),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Ae===0&&(Ae=5)}function Er(e,t,n){var r=pe,o=Rt.transition;try{Rt.transition=null,pe=1,RS(e,t,n,r)}finally{Rt.transition=o,pe=r}return null}function RS(e,t,n,r){do _o();while(Jn!==null);if(ae&6)throw Error(O(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(l1(e,s),e===Fe&&(Me=Fe=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Qi||(Qi=!0,_v(Ca,function(){return _o(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Rt.transition,Rt.transition=null;var i=pe;pe=1;var a=ae;ae|=4,Yd.current=null,bS(e,n),Sv(n,e),G1(rc),ka=!!nc,rc=nc=null,e.current=n,CS(n),Jw(),ae=a,pe=i,Rt.transition=s}else e.current=n;if(Qi&&(Qi=!1,Jn=e,Ba=o),s=e.pendingLanes,s===0&&(ir=null),n1(n.stateNode),dt(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if($a)throw $a=!1,e=Cc,Cc=null,e;return Ba&1&&e.tag!==0&&_o(),s=e.pendingLanes,s&1?e===Ec?Hs++:(Hs=0,Ec=e):Hs=0,vr(),null}function _o(){if(Jn!==null){var e=ag(Ba),t=Rt.transition,n=pe;try{if(Rt.transition=null,pe=16>e?16:e,Jn===null)var r=!1;else{if(e=Jn,Jn=null,Ba=0,ae&6)throw Error(O(331));var o=ae;for(ae|=4,$=e.current;$!==null;){var s=$,i=s.child;if($.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for($=u;$!==null;){var d=$;switch(d.tag){case 0:case 11:case 15:Vs(8,d,s)}var c=d.child;if(c!==null)c.return=d,$=c;else for(;$!==null;){d=$;var y=d.sibling,p=d.return;if(yv(d),d===u){$=null;break}if(y!==null){y.return=p,$=y;break}$=p}}}var w=s.alternate;if(w!==null){var h=w.child;if(h!==null){w.child=null;do{var S=h.sibling;h.sibling=null,h=S}while(h!==null)}}$=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,$=i;else e:for(;$!==null;){if(s=$,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Vs(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,$=v;break e}$=s.return}}var m=e.current;for($=m;$!==null;){i=$;var x=i.child;if(i.subtreeFlags&2064&&x!==null)x.return=i,$=x;else e:for(i=m;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:fl(9,a)}}catch(C){Re(a,a.return,C)}if(a===i){$=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,$=b;break e}$=a.return}}if(ae=o,vr(),on&&typeof on.onPostCommitFiberRoot=="function")try{on.onPostCommitFiberRoot(ol,e)}catch{}r=!0}return r}finally{pe=n,Rt.transition=t}}return!1}function oh(e,t,n){t=Xo(n,t),t=av(e,t,1),e=sr(e,t,1),t=et(),e!==null&&(Ei(e,1,t),dt(e,t))}function Re(e,t,n){if(e.tag===3)oh(e,e,n);else for(;t!==null;){if(t.tag===3){oh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ir===null||!ir.has(r))){e=Xo(n,e),e=lv(t,e,1),t=sr(t,e,1),e=et(),t!==null&&(Ei(t,1,e),dt(t,e));break}}t=t.return}}function TS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&n,Fe===e&&(We&n)===n&&(Ae===4||Ae===3&&(We&130023424)===We&&500>_e()-Xd?zr(e,0):qd|=n),dt(e,t)}function Rv(e,t){t===0&&(e.mode&1?(t=Di,Di<<=1,!(Di&130023424)&&(Di=4194304)):t=1);var n=et();e=bn(e,t),e!==null&&(Ei(e,t,n),dt(e,n))}function _S(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rv(e,n)}function jS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Rv(e,n)}var Tv;Tv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)lt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return lt=!1,yS(e,t,n);lt=!!(e.flags&131072)}else lt=!1,be&&t.flags&1048576&&Og(t,Ma,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fa(e,t),e=t.pendingProps;var o=Qo(t,Xe.current);To(t,n),o=Wd(null,t,r,e,o,n);var s=Hd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(s=!0,_a(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zd(t),o.updater=dl,t.stateNode=o,o._reactInternals=t,fc(t,r,e,n),t=mc(null,t,r,!0,s,n)):(t.tag=0,be&&s&&Md(t),Je(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fa(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=OS(r),e=zt(r,e),o){case 0:t=hc(null,t,r,e,n);break e;case 1:t=Gp(null,t,r,e,n);break e;case 11:t=Kp(null,t,r,e,n);break e;case 14:t=Qp(null,t,r,zt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),hc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),Gp(e,t,r,o,n);case 3:e:{if(fv(t),e===null)throw Error(O(387));r=t.pendingProps,s=t.memoizedState,o=s.element,zg(e,t),Ia(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Xo(Error(O(423)),t),t=Yp(e,t,r,n,o);break e}else if(r!==o){o=Xo(Error(O(424)),t),t=Yp(e,t,r,n,o);break e}else for(gt=or(t.stateNode.containerInfo.firstChild),vt=t,be=!0,Ut=null,n=Dg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Go(),r===o){t=Cn(e,t,n);break e}Je(e,t,r,n)}t=t.child}return t;case 5:return $g(t),e===null&&uc(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,oc(r,o)?i=null:s!==null&&oc(r,s)&&(t.flags|=32),dv(e,t),Je(e,t,i,n),t.child;case 6:return e===null&&uc(t),null;case 13:return pv(e,t,n);case 4:return $d(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yo(t,null,r,n):Je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),Kp(e,t,r,o,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ge(Oa,r._currentValue),r._currentValue=i,s!==null)if(Ht(s.value,i)){if(s.children===o.children&&!ut.current){t=Cn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=xn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),cc(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(O(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),cc(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,To(t,n),o=Tt(o),r=r(o),t.flags|=1,Je(e,t,r,n),t.child;case 14:return r=t.type,o=zt(r,t.pendingProps),o=zt(r.type,o),Qp(e,t,r,o,n);case 15:return uv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zt(r,o),fa(e,t),t.tag=1,ct(r)?(e=!0,_a(t)):e=!1,To(t,n),iv(t,r,o),fc(t,r,o,n),mc(null,t,r,!0,e,n);case 19:return hv(e,t,n);case 22:return cv(e,t,n)}throw Error(O(156,t.tag))};function _v(e,t){return rg(e,t)}function MS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,n,r){return new MS(e,t,n,r)}function tf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OS(e){if(typeof e=="function")return tf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wd)return 11;if(e===Sd)return 14}return 2}function lr(e,t){var n=e.alternate;return n===null?(n=Pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ma(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")tf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ho:return $r(n.children,o,s,t);case xd:i=8,o|=8;break;case Lu:return e=Pt(12,n,t,o|2),e.elementType=Lu,e.lanes=s,e;case Du:return e=Pt(13,n,t,o),e.elementType=Du,e.lanes=s,e;case Fu:return e=Pt(19,n,t,o),e.elementType=Fu,e.lanes=s,e;case $m:return hl(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fm:i=10;break e;case zm:i=9;break e;case wd:i=11;break e;case Sd:i=14;break e;case Fn:i=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=Pt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function $r(e,t,n,r){return e=Pt(7,e,r,t),e.lanes=n,e}function hl(e,t,n,r){return e=Pt(22,e,r,t),e.elementType=$m,e.lanes=n,e.stateNode={isHidden:!1},e}function hu(e,t,n){return e=Pt(6,e,null,t),e.lanes=n,e}function mu(e,t,n){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yl(0),this.expirationTimes=Yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function nf(e,t,n,r,o,s,i,a,l){return e=new AS(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Pt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zd(s),e}function IS(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:po,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function jv(e){if(!e)return fr;e=e._reactInternals;e:{if(to(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(ct(n))return jg(e,n,t)}return t}function Mv(e,t,n,r,o,s,i,a,l){return e=nf(n,r,!0,e,o,s,i,a,l),e.context=jv(null),n=e.current,r=et(),o=ar(n),s=xn(r,o),s.callback=t??null,sr(n,s,o),e.current.lanes=o,Ei(e,o,r),dt(e,r),e}function ml(e,t,n,r){var o=t.current,s=et(),i=ar(o);return n=jv(n),t.context===null?t.context=n:t.pendingContext=n,t=xn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=sr(o,t,i),e!==null&&(Wt(e,o,i,s),ua(e,o,i)),i}function Va(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rf(e,t){sh(e,t),(e=e.alternate)&&sh(e,t)}function LS(){return null}var Ov=typeof reportError=="function"?reportError:function(e){console.error(e)};function of(e){this._internalRoot=e}gl.prototype.render=of.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));ml(e,t,null,null)};gl.prototype.unmount=of.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kr(function(){ml(null,e,null,null)}),t[Sn]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=cg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&fg(e)}};function sf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ih(){}function DS(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=Va(i);s.call(u)}}var i=Mv(t,r,e,0,null,!1,!1,"",ih);return e._reactRootContainer=i,e[Sn]=i.current,ei(e.nodeType===8?e.parentNode:e),Kr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=Va(l);a.call(u)}}var l=nf(e,0,!1,null,null,!1,!1,"",ih);return e._reactRootContainer=l,e[Sn]=l.current,ei(e.nodeType===8?e.parentNode:e),Kr(function(){ml(t,l,n,r)}),l}function yl(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=Va(i);a.call(l)}}ml(t,i,e,o)}else i=DS(n,t,e,o,r);return Va(i)}lg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ts(t.pendingLanes);n!==0&&(Ed(t,n|1),dt(t,_e()),!(ae&6)&&(Zo=_e()+500,vr()))}break;case 13:Kr(function(){var r=bn(e,1);if(r!==null){var o=et();Wt(r,e,1,o)}}),rf(e,1)}};kd=function(e){if(e.tag===13){var t=bn(e,134217728);if(t!==null){var n=et();Wt(t,e,134217728,n)}rf(e,134217728)}};ug=function(e){if(e.tag===13){var t=ar(e),n=bn(e,t);if(n!==null){var r=et();Wt(n,e,t,r)}rf(e,t)}};cg=function(){return pe};dg=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};Gu=function(e,t,n){switch(t){case"input":if(Bu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=ll(r);if(!o)throw Error(O(90));Um(r),Bu(r,o)}}}break;case"textarea":Wm(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};Xm=Zd;Zm=Kr;var FS={usingClientEntryPoint:!1,Events:[Ni,yo,ll,Ym,qm,Zd]},Cs={findFiberByHostInstance:Nr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zS={bundleType:Cs.bundleType,version:Cs.version,rendererPackageName:Cs.rendererPackageName,rendererConfig:Cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tg(e),e===null?null:e.stateNode},findFiberByHostInstance:Cs.findFiberByHostInstance||LS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gi.isDisabled&&Gi.supportsFiber)try{ol=Gi.inject(zS),on=Gi}catch{}}wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FS;wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sf(t))throw Error(O(200));return IS(e,t,null,n)};wt.createRoot=function(e,t){if(!sf(e))throw Error(O(299));var n=!1,r="",o=Ov;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=nf(e,1,!1,null,null,n,!1,r,o),e[Sn]=t.current,ei(e.nodeType===8?e.parentNode:e),new of(t)};wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=tg(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e){return Kr(e)};wt.hydrate=function(e,t,n){if(!vl(t))throw Error(O(200));return yl(null,e,t,!0,n)};wt.hydrateRoot=function(e,t,n){if(!sf(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Ov;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Mv(t,null,e,1,n??null,o,!1,s,i),e[Sn]=t.current,ei(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new gl(t)};wt.render=function(e,t,n){if(!vl(t))throw Error(O(200));return yl(null,e,t,!1,n)};wt.unmountComponentAtNode=function(e){if(!vl(e))throw Error(O(40));return e._reactRootContainer?(Kr(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[Sn]=null})}),!0):!1};wt.unstable_batchedUpdates=Zd;wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vl(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return yl(e,t,n,!1,r)};wt.version="18.3.1-next-f1338f8080-20240426";function Av(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Av)}catch(e){console.error(e)}}Av(),Am.exports=wt;var no=Am.exports;const Iv=bm(no);var Lv,ah=no;Lv=ah.createRoot,ah.hydrateRoot;var Ri=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_r,Wn,Ao,um,$S=(um=class extends Ri{constructor(){super();K(this,_r);K(this,Wn);K(this,Ao);z(this,Ao,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,Wn)||this.setEventListener(E(this,Ao))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Wn))==null||t.call(this),z(this,Wn,void 0))}setEventListener(t){var n;z(this,Ao,t),(n=E(this,Wn))==null||n.call(this),z(this,Wn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,_r)!==t&&(z(this,_r,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,_r)=="boolean"?E(this,_r):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_r=new WeakMap,Wn=new WeakMap,Ao=new WeakMap,um),af=new $S,BS={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Hn,dd,cm,US=(cm=class{constructor(){K(this,Hn,BS);K(this,dd,!1)}setTimeoutProvider(e){z(this,Hn,e)}setTimeout(e,t){return E(this,Hn).setTimeout(e,t)}clearTimeout(e){E(this,Hn).clearTimeout(e)}setInterval(e,t){return E(this,Hn).setInterval(e,t)}clearInterval(e){E(this,Hn).clearInterval(e)}},Hn=new WeakMap,dd=new WeakMap,cm),Tr=new US;function VS(e){setTimeout(e,0)}var WS=typeof window>"u"||"Deno"in globalThis;function it(){}function HS(e,t){return typeof e=="function"?e(t):e}function Pc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Dv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ur(e,t){return typeof e=="function"?e(t):e}function Et(e,t){return typeof e=="function"?e(t):e}function lh(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==lf(i,t.options))return!1}else if(!ci(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function uh(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ui(t.options.mutationKey)!==ui(s))return!1}else if(!ci(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function lf(e,t){return((t==null?void 0:t.queryKeyHashFn)||ui)(e)}function ui(e){return JSON.stringify(e,(t,n)=>Tc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function ci(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ci(e[n],t[n])):!1}var KS=Object.prototype.hasOwnProperty;function Fv(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=ch(e)&&ch(t);if(!r&&!(Tc(e)&&Tc(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,l=r?new Array(a):{};let u=0;for(let d=0;d<a;d++){const c=r?d:i[d],y=e[c],p=t[c];if(y===p){l[c]=y,(r?d<s:KS.call(e,c))&&u++;continue}if(y===null||p===null||typeof y!="object"||typeof p!="object"){l[c]=p;continue}const w=Fv(y,p,n+1);l[c]=w,w===y&&u++}return s===a&&u===s?e:l}function Rc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ch(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tc(e){if(!dh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!dh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function dh(e){return Object.prototype.toString.call(e)==="[object Object]"}function QS(e){return new Promise(t=>{Tr.setTimeout(t,e)})}function _c(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Fv(e,t):t}function GS(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function YS(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var uf=Symbol();function zv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===uf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $v(e,t){return typeof e=="function"?e(...t):!!e}function qS(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var di=(()=>{let e=()=>WS;return{isServer(){return e()},setIsServer(t){e=t}}})();function jc(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var XS=VS;function ZS(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=XS;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ue=ZS(),Io,Kn,Lo,dm,JS=(dm=class extends Ri{constructor(){super();K(this,Io,!0);K(this,Kn);K(this,Lo);z(this,Lo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,Kn)||this.setEventListener(E(this,Lo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Kn))==null||t.call(this),z(this,Kn,void 0))}setEventListener(t){var n;z(this,Lo,t),(n=E(this,Kn))==null||n.call(this),z(this,Kn,t(this.setOnline.bind(this)))}setOnline(t){E(this,Io)!==t&&(z(this,Io,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Io)}},Io=new WeakMap,Kn=new WeakMap,Lo=new WeakMap,dm),Wa=new JS;function eb(e){return Math.min(1e3*2**e,3e4)}function Bv(e){return(e??"online")==="online"?Wa.isOnline():!0}var Mc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Uv(e){let t=!1,n=0,r;const o=jc(),s=()=>o.status!=="pending",i=h=>{var S;if(!s()){const v=new Mc(h);y(v),(S=e.onCancel)==null||S.call(e,v)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>af.isFocused()&&(e.networkMode==="always"||Wa.isOnline())&&e.canRun(),d=()=>Bv(e.networkMode)&&e.canRun(),c=h=>{s()||(r==null||r(),o.resolve(h))},y=h=>{s()||(r==null||r(),o.reject(h))},p=()=>new Promise(h=>{var S;r=v=>{(s()||u())&&h(v)},(S=e.onPause)==null||S.call(e)}).then(()=>{var h;r=void 0,s()||(h=e.onContinue)==null||h.call(e)}),w=()=>{if(s())return;let h;const S=n===0?e.initialPromise:void 0;try{h=S??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(c).catch(v=>{var k;if(s())return;const m=e.retry??(di.isServer()?0:3),x=e.retryDelay??eb,b=typeof x=="function"?x(n,v):x,C=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,v);if(t||!C){y(v);return}n++,(k=e.onFail)==null||k.call(e,n,v),QS(b).then(()=>u()?void 0:p()).then(()=>{t?y(v):w()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?w():p().then(w),o)}}var jr,fm,Vv=(fm=class{constructor(){K(this,jr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pc(this.gcTime)&&z(this,jr,Tr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(di.isServer()?1/0:5*60*1e3))}clearGcTimeout(){E(this,jr)&&(Tr.clearTimeout(E(this,jr)),z(this,jr,void 0))}},jr=new WeakMap,fm),Mr,Do,bt,Or,Le,yi,Ar,ht,Wv,fn,pm,tb=(pm=class extends Vv{constructor(t){super();K(this,ht);K(this,Mr);K(this,Do);K(this,bt);K(this,Or);K(this,Le);K(this,yi);K(this,Ar);z(this,Ar,!1),z(this,yi,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Or,t.client),z(this,bt,E(this,Or).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,Mr,ph(this.options)),this.state=t.state??E(this,Mr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Le))==null?void 0:t.promise}setOptions(t){if(this.options={...E(this,yi),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ph(this.options);n.data!==void 0&&(this.setState(fh(n.data,n.dataUpdatedAt)),z(this,Mr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,bt).remove(this)}setData(t,n){const r=_c(this.state.data,t,this.options);return re(this,ht,fn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){re(this,ht,fn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=E(this,Le))==null?void 0:r.promise;return(o=E(this,Le))==null||o.cancel(t),n?n.then(it).catch(it):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return E(this,Mr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Et(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ur(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Dv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Le))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Le))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Le)&&(E(this,Ar)||re(this,ht,Wv).call(this)?E(this,Le).cancel({revert:!0}):E(this,Le).cancelRetry()),this.scheduleGc()),E(this,bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||re(this,ht,fn).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,d,c,y,p,w,h,S,v,m,x;if(this.state.fetchStatus!=="idle"&&((l=E(this,Le))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Le))return E(this,Le).continueRetry(),E(this,Le).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(C=>C.options.queryFn);b&&this.setOptions(b.options)}const r=new AbortController,o=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(z(this,Ar,!0),r.signal)})},s=()=>{const b=zv(this.options,n),k=(()=>{const N={client:E(this,Or),queryKey:this.queryKey,meta:this.meta};return o(N),N})();return z(this,Ar,!1),this.options.persister?this.options.persister(b,k,this):b(k)},a=(()=>{const b={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:E(this,Or),state:this.state,fetchFn:s};return o(b),b})();(u=this.options.behavior)==null||u.onFetch(a,this),z(this,Do,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&re(this,ht,fn).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),z(this,Le,Uv({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:b=>{b instanceof Mc&&b.revert&&this.setState({...E(this,Do),fetchStatus:"idle"}),r.abort()},onFail:(b,C)=>{re(this,ht,fn).call(this,{type:"failed",failureCount:b,error:C})},onPause:()=>{re(this,ht,fn).call(this,{type:"pause"})},onContinue:()=>{re(this,ht,fn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const b=await E(this,Le).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(y=E(this,bt).config).onSuccess)==null||p.call(y,b,this),(h=(w=E(this,bt).config).onSettled)==null||h.call(w,b,this.state.error,this),b}catch(b){if(b instanceof Mc){if(b.silent)return E(this,Le).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw re(this,ht,fn).call(this,{type:"error",error:b}),(v=(S=E(this,bt).config).onError)==null||v.call(S,b,this),(x=(m=E(this,bt).config).onSettled)==null||x.call(m,this.state.data,b,this),b}finally{this.scheduleGc()}}},Mr=new WeakMap,Do=new WeakMap,bt=new WeakMap,Or=new WeakMap,Le=new WeakMap,yi=new WeakMap,Ar=new WeakMap,ht=new WeakSet,Wv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},fn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Hv(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...fh(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return z(this,Do,t.manual?o:void 0),o;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,bt).notify({query:this,type:"updated",action:t})})},pm);function Hv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ph(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ot,oe,xi,Ze,Ir,Fo,mn,Qn,wi,zo,$o,Lr,Dr,Gn,Bo,fe,js,Oc,Ac,Ic,Lc,Dc,Fc,zc,Kv,hm,nb=(hm=class extends Ri{constructor(t,n){super();K(this,fe);K(this,ot);K(this,oe);K(this,xi);K(this,Ze);K(this,Ir);K(this,Fo);K(this,mn);K(this,Qn);K(this,wi);K(this,zo);K(this,$o);K(this,Lr);K(this,Dr);K(this,Gn);K(this,Bo,new Set);this.options=n,z(this,ot,t),z(this,Qn,null),z(this,mn,jc()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,oe).addObserver(this),hh(E(this,oe),this.options)?re(this,fe,js).call(this):this.updateResult(),re(this,fe,Lc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $c(E(this,oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $c(E(this,oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,re(this,fe,Dc).call(this),re(this,fe,Fc).call(this),E(this,oe).removeObserver(this)}setOptions(t){const n=this.options,r=E(this,oe);if(this.options=E(this,ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Et(this.options.enabled,E(this,oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");re(this,fe,zc).call(this),E(this,oe).setOptions(this.options),n._defaulted&&!Rc(this.options,n)&&E(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,oe),observer:this});const o=this.hasListeners();o&&mh(E(this,oe),r,this.options,n)&&re(this,fe,js).call(this),this.updateResult(),o&&(E(this,oe)!==r||Et(this.options.enabled,E(this,oe))!==Et(n.enabled,E(this,oe))||ur(this.options.staleTime,E(this,oe))!==ur(n.staleTime,E(this,oe)))&&re(this,fe,Oc).call(this);const s=re(this,fe,Ac).call(this);o&&(E(this,oe)!==r||Et(this.options.enabled,E(this,oe))!==Et(n.enabled,E(this,oe))||s!==E(this,Gn))&&re(this,fe,Ic).call(this,s)}getOptimisticResult(t){const n=E(this,ot).getQueryCache().build(E(this,ot),t),r=this.createResult(n,t);return ob(this,r)&&(z(this,Ze,r),z(this,Fo,this.options),z(this,Ir,E(this,oe).state)),r}getCurrentResult(){return E(this,Ze)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,mn).status==="pending"&&E(this,mn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){E(this,Bo).add(t)}getCurrentQuery(){return E(this,oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,ot).defaultQueryOptions(t),r=E(this,ot).getQueryCache().build(E(this,ot),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return re(this,fe,js).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Ze)))}createResult(t,n){var j;const r=E(this,oe),o=this.options,s=E(this,Ze),i=E(this,Ir),a=E(this,Fo),u=t!==r?t.state:E(this,xi),{state:d}=t;let c={...d},y=!1,p;if(n._optimisticResults){const R=this.hasListeners(),A=!R&&hh(t,n),M=R&&mh(t,r,n,o);(A||M)&&(c={...c,...Hv(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:w,errorUpdatedAt:h,status:S}=c;p=c.data;let v=!1;if(n.placeholderData!==void 0&&p===void 0&&S==="pending"){let R;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(R=s.data,v=!0):R=typeof n.placeholderData=="function"?n.placeholderData((j=E(this,$o))==null?void 0:j.state.data,E(this,$o)):n.placeholderData,R!==void 0&&(S="success",p=_c(s==null?void 0:s.data,R,n),y=!0)}if(n.select&&p!==void 0&&!v)if(s&&p===(i==null?void 0:i.data)&&n.select===E(this,wi))p=E(this,zo);else try{z(this,wi,n.select),p=n.select(p),p=_c(s==null?void 0:s.data,p,n),z(this,zo,p),z(this,Qn,null)}catch(R){z(this,Qn,R)}E(this,Qn)&&(w=E(this,Qn),p=E(this,zo),h=Date.now(),S="error");const m=c.fetchStatus==="fetching",x=S==="pending",b=S==="error",C=x&&m,k=p!==void 0,P={status:S,fetchStatus:c.fetchStatus,isPending:x,isSuccess:S==="success",isError:b,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:c.dataUpdatedAt,error:w,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:b&&!k,isPaused:c.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:b&&k,isStale:cf(t,n),refetch:this.refetch,promise:E(this,mn),isEnabled:Et(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=P.data!==void 0,A=P.status==="error"&&!R,M=Q=>{A?Q.reject(P.error):R&&Q.resolve(P.data)},W=()=>{const Q=z(this,mn,P.promise=jc());M(Q)},U=E(this,mn);switch(U.status){case"pending":t.queryHash===r.queryHash&&M(U);break;case"fulfilled":(A||P.data!==U.value)&&W();break;case"rejected":(!A||P.error!==U.reason)&&W();break}}return P}updateResult(){const t=E(this,Ze),n=this.createResult(E(this,oe),this.options);if(z(this,Ir,E(this,oe).state),z(this,Fo,this.options),E(this,Ir).data!==void 0&&z(this,$o,E(this,oe)),Rc(n,t))return;z(this,Ze,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!E(this,Bo).size)return!0;const i=new Set(s??E(this,Bo));return this.options.throwOnError&&i.add("error"),Object.keys(E(this,Ze)).some(a=>{const l=a;return E(this,Ze)[l]!==t[l]&&i.has(l)})};re(this,fe,Kv).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&re(this,fe,Lc).call(this)}},ot=new WeakMap,oe=new WeakMap,xi=new WeakMap,Ze=new WeakMap,Ir=new WeakMap,Fo=new WeakMap,mn=new WeakMap,Qn=new WeakMap,wi=new WeakMap,zo=new WeakMap,$o=new WeakMap,Lr=new WeakMap,Dr=new WeakMap,Gn=new WeakMap,Bo=new WeakMap,fe=new WeakSet,js=function(t){re(this,fe,zc).call(this);let n=E(this,oe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(it)),n},Oc=function(){re(this,fe,Dc).call(this);const t=ur(this.options.staleTime,E(this,oe));if(di.isServer()||E(this,Ze).isStale||!Pc(t))return;const r=Dv(E(this,Ze).dataUpdatedAt,t)+1;z(this,Lr,Tr.setTimeout(()=>{E(this,Ze).isStale||this.updateResult()},r))},Ac=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,oe)):this.options.refetchInterval)??!1},Ic=function(t){re(this,fe,Fc).call(this),z(this,Gn,t),!(di.isServer()||Et(this.options.enabled,E(this,oe))===!1||!Pc(E(this,Gn))||E(this,Gn)===0)&&z(this,Dr,Tr.setInterval(()=>{(this.options.refetchIntervalInBackground||af.isFocused())&&re(this,fe,js).call(this)},E(this,Gn)))},Lc=function(){re(this,fe,Oc).call(this),re(this,fe,Ic).call(this,re(this,fe,Ac).call(this))},Dc=function(){E(this,Lr)&&(Tr.clearTimeout(E(this,Lr)),z(this,Lr,void 0))},Fc=function(){E(this,Dr)&&(Tr.clearInterval(E(this,Dr)),z(this,Dr,void 0))},zc=function(){const t=E(this,ot).getQueryCache().build(E(this,ot),this.options);if(t===E(this,oe))return;const n=E(this,oe);z(this,oe,t),z(this,xi,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Kv=function(t){Ue.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,Ze))}),E(this,ot).getQueryCache().notify({query:E(this,oe),type:"observerResultsUpdated"})})},hm);function rb(e,t){return Et(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function hh(e,t){return rb(e,t)||e.state.data!==void 0&&$c(e,t,t.refetchOnMount)}function $c(e,t,n){if(Et(t.enabled,e)!==!1&&ur(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&cf(e,t)}return!1}function mh(e,t,n,r){return(e!==t||Et(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&cf(e,n)}function cf(e,t){return Et(t.enabled,e)!==!1&&e.isStaleByTime(ur(t.staleTime,e))}function ob(e,t){return!Rc(e.getCurrentResult(),t)}function gh(e){return{onFetch:(t,n)=>{var d,c,y,p,w;const r=t.options,o=(y=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:y.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let h=!1;const S=x=>{qS(x,()=>t.signal,()=>h=!0)},v=zv(t.options,t.fetchOptions),m=async(x,b,C)=>{if(h)return Promise.reject();if(b==null&&x.pages.length)return Promise.resolve(x);const N=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:b,direction:C?"backward":"forward",meta:t.options.meta};return S(A),A})(),P=await v(N),{maxPages:j}=t.options,R=C?YS:GS;return{pages:R(x.pages,P,j),pageParams:R(x.pageParams,b,j)}};if(o&&s.length){const x=o==="backward",b=x?sb:vh,C={pages:s,pageParams:i},k=b(r,C);a=await m(C,k,x)}else{const x=e??s.length;do{const b=l===0?i[0]??r.initialPageParam:vh(r,a);if(l>0&&b==null)break;a=await m(a,b),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var h,S;return(S=(h=t.options).persister)==null?void 0:S.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function vh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function sb(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Si,Xt,Ye,Fr,Zt,Ln,mm,ib=(mm=class extends Vv{constructor(t){super();K(this,Zt);K(this,Si);K(this,Xt);K(this,Ye);K(this,Fr);z(this,Si,t.client),this.mutationId=t.mutationId,z(this,Ye,t.mutationCache),z(this,Xt,[]),this.state=t.state||ab(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Xt).includes(t)||(E(this,Xt).push(t),this.clearGcTimeout(),E(this,Ye).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,Xt,E(this,Xt).filter(n=>n!==t)),this.scheduleGc(),E(this,Ye).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():E(this,Ye).remove(this))}continue(){var t;return((t=E(this,Fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,u,d,c,y,p,w,h,S,v,m,x,b,C,k,N;const n=()=>{re(this,Zt,Ln).call(this,{type:"continue"})},r={client:E(this,Si),meta:this.options.meta,mutationKey:this.options.mutationKey};z(this,Fr,Uv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{re(this,Zt,Ln).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{re(this,Zt,Ln).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Ye).canRun(this)}));const o=this.state.status==="pending",s=!E(this,Fr).canStart();try{if(o)n();else{re(this,Zt,Ln).call(this,{type:"pending",variables:t,isPaused:s}),E(this,Ye).config.onMutate&&await E(this,Ye).config.onMutate(t,this,r);const j=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t,r));j!==this.state.context&&re(this,Zt,Ln).call(this,{type:"pending",context:j,variables:t,isPaused:s})}const P=await E(this,Fr).start();return await((u=(l=E(this,Ye).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,P,t,this.state.context,r)),await((p=(y=E(this,Ye).config).onSettled)==null?void 0:p.call(y,P,null,this.state.variables,this.state.context,this,r)),await((h=(w=this.options).onSettled)==null?void 0:h.call(w,P,null,t,this.state.context,r)),re(this,Zt,Ln).call(this,{type:"success",data:P}),P}catch(P){try{await((v=(S=E(this,Ye).config).onError)==null?void 0:v.call(S,P,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((x=(m=this.options).onError)==null?void 0:x.call(m,P,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((C=(b=E(this,Ye).config).onSettled)==null?void 0:C.call(b,void 0,P,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((N=(k=this.options).onSettled)==null?void 0:N.call(k,void 0,P,t,this.state.context,r))}catch(j){Promise.reject(j)}throw re(this,Zt,Ln).call(this,{type:"error",error:P}),P}finally{E(this,Ye).runNext(this)}}},Si=new WeakMap,Xt=new WeakMap,Ye=new WeakMap,Fr=new WeakMap,Zt=new WeakSet,Ln=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ue.batch(()=>{E(this,Xt).forEach(r=>{r.onMutationUpdate(t)}),E(this,Ye).notify({mutation:this,type:"updated",action:t})})},mm);function ab(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gn,$t,bi,gm,lb=(gm=class extends Ri{constructor(t={}){super();K(this,gn);K(this,$t);K(this,bi);this.config=t,z(this,gn,new Set),z(this,$t,new Map),z(this,bi,0)}build(t,n,r){const o=new ib({client:t,mutationCache:this,mutationId:++ji(this,bi)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){E(this,gn).add(t);const n=Yi(t);if(typeof n=="string"){const r=E(this,$t).get(n);r?r.push(t):E(this,$t).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,gn).delete(t)){const n=Yi(t);if(typeof n=="string"){const r=E(this,$t).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&E(this,$t).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yi(t);if(typeof n=="string"){const r=E(this,$t).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Yi(t);if(typeof n=="string"){const o=(r=E(this,$t).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ue.batch(()=>{E(this,gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,gn).clear(),E(this,$t).clear()})}getAll(){return Array.from(E(this,gn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uh(n,r))}findAll(t={}){return this.getAll().filter(n=>uh(t,n))}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ue.batch(()=>Promise.all(t.map(n=>n.continue().catch(it))))}},gn=new WeakMap,$t=new WeakMap,bi=new WeakMap,gm);function Yi(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Jt,vm,ub=(vm=class extends Ri{constructor(t={}){super();K(this,Jt);this.config=t,z(this,Jt,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??lf(o,n);let i=this.get(s);return i||(i=new tb({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){E(this,Jt).has(t.queryHash)||(E(this,Jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,Jt).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,Jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Jt).get(t)}getAll(){return[...E(this,Jt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>lh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>lh(t,r)):n}notify(t){Ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jt=new WeakMap,vm),Pe,Yn,qn,Uo,Vo,Xn,Wo,Ho,ym,cb=(ym=class{constructor(e={}){K(this,Pe);K(this,Yn);K(this,qn);K(this,Uo);K(this,Vo);K(this,Xn);K(this,Wo);K(this,Ho);z(this,Pe,e.queryCache||new ub),z(this,Yn,e.mutationCache||new lb),z(this,qn,e.defaultOptions||{}),z(this,Uo,new Map),z(this,Vo,new Map),z(this,Xn,0)}mount(){ji(this,Xn)._++,E(this,Xn)===1&&(z(this,Wo,af.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Pe).onFocus())})),z(this,Ho,Wa.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Pe).onOnline())})))}unmount(){var e,t;ji(this,Xn)._--,E(this,Xn)===0&&((e=E(this,Wo))==null||e.call(this),z(this,Wo,void 0),(t=E(this,Ho))==null||t.call(this),z(this,Ho,void 0))}isFetching(e){return E(this,Pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,Yn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=E(this,Pe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ur(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(this,Pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=E(this,Pe).get(r.queryHash),s=o==null?void 0:o.state.data,i=HS(t,s);if(i!==void 0)return E(this,Pe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ue.batch(()=>E(this,Pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Pe);Ue.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Pe);return Ue.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ue.batch(()=>E(this,Pe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(it).catch(it)}invalidateQueries(e,t={}){return Ue.batch(()=>(E(this,Pe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ue.batch(()=>E(this,Pe).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(it)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(it)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Pe).build(this,t);return n.isStaleByTime(ur(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(it).catch(it)}fetchInfiniteQuery(e){return e.behavior=gh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(it).catch(it)}ensureInfiniteQueryData(e){return e.behavior=gh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wa.isOnline()?E(this,Yn).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Pe)}getMutationCache(){return E(this,Yn)}getDefaultOptions(){return E(this,qn)}setDefaultOptions(e){z(this,qn,e)}setQueryDefaults(e,t){E(this,Uo).set(ui(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Uo).values()],n={};return t.forEach(r=>{ci(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,Vo).set(ui(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Vo).values()],n={};return t.forEach(r=>{ci(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,qn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===uf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,qn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Pe).clear(),E(this,Yn).clear()}},Pe=new WeakMap,Yn=new WeakMap,qn=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,Xn=new WeakMap,Wo=new WeakMap,Ho=new WeakMap,ym),Qv=f.createContext(void 0),Gv=e=>{const t=f.useContext(Qv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},db=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Qv.Provider,{value:e,children:t})),Yv=f.createContext(!1),fb=()=>f.useContext(Yv);Yv.Provider;function pb(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hb=f.createContext(pb()),mb=()=>f.useContext(hb),gb=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?$v(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},vb=e=>{f.useEffect(()=>{e.clearReset()},[e])},yb=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||$v(n,[e.error,r])),xb=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wb=(e,t)=>e.isLoading&&e.isFetching&&!t,Sb=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,yh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bb(e,t,n){var y,p,w,h;const r=fb(),o=mb(),s=Gv(),i=s.defaultQueryOptions(e);(p=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||p.call(y,i);const a=s.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",xb(i),gb(i,o,a),vb(o);const l=!s.getQueryCache().get(i.queryHash),[u]=f.useState(()=>new t(s,i)),d=u.getOptimisticResult(i),c=!r&&e.subscribed!==!1;if(f.useSyncExternalStore(f.useCallback(S=>{const v=c?u.subscribe(Ue.batchCalls(S)):it;return u.updateResult(),v},[u,c]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),f.useEffect(()=>{u.setOptions(i)},[i,u]),Sb(i,d))throw yh(i,u,o);if(yb({result:d,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw d.error;if((h=(w=s.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||h.call(w,i,d),i.experimental_prefetchInRender&&!di.isServer()&&wb(d,r)){const S=l?yh(i,u,o):a==null?void 0:a.promise;S==null||S.catch(it).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?d:u.trackResult(d)}function qv(e,t){return bb(e,nb)}/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fi.apply(this,arguments)}var er;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(er||(er={}));const xh="popstate";function Cb(e){e===void 0&&(e={});function t(r,o){let{pathname:s,search:i,hash:a}=r.location;return Bc("",{pathname:s,search:i,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Xv(o)}return kb(t,n,null,e)}function Ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function df(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Eb(){return Math.random().toString(36).substr(2,8)}function wh(e,t){return{usr:e.state,key:e.key,idx:t}}function Bc(e,t,n,r){return n===void 0&&(n=null),fi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?os(t):t,{state:n,key:t&&t.key||r||Eb()})}function Xv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function os(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function kb(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,a=er.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(fi({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function c(){a=er.Pop;let S=d(),v=S==null?null:S-u;u=S,l&&l({action:a,location:h.location,delta:v})}function y(S,v){a=er.Push;let m=Bc(h.location,S,v);u=d()+1;let x=wh(m,u),b=h.createHref(m);try{i.pushState(x,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(b)}s&&l&&l({action:a,location:h.location,delta:1})}function p(S,v){a=er.Replace;let m=Bc(h.location,S,v);u=d();let x=wh(m,u),b=h.createHref(m);i.replaceState(x,"",b),s&&l&&l({action:a,location:h.location,delta:0})}function w(S){let v=o.location.origin!=="null"?o.location.origin:o.location.href,m=typeof S=="string"?S:Xv(S);return m=m.replace(/ $/,"%20"),Ie(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let h={get action(){return a},get location(){return e(o,i)},listen(S){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(xh,c),l=S,()=>{o.removeEventListener(xh,c),l=null}},createHref(S){return t(o,S)},createURL:w,encodeLocation(S){let v=w(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:y,replace:p,go(S){return i.go(S)}};return h}var Sh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sh||(Sh={}));function Nb(e,t,n){return n===void 0&&(n="/"),Pb(e,t,n)}function Pb(e,t,n,r){let o=typeof t=="string"?os(t):t,s=ey(o.pathname||"/",n);if(s==null)return null;let i=Zv(e);Rb(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=$b(s);a=Db(i[l],u)}return a}function Zv(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(s,i,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Br([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Ie(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Zv(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:Ib(u,s.index),routesMeta:d})};return e.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let l of Jv(s.path))o(s,i,l)}),t}function Jv(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=Jv(r.join("/")),a=[];return a.push(...i.map(l=>l===""?s:[s,l].join("/"))),o&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Rb(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Lb(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Tb=/^:[\w-]+$/,_b=3,jb=2,Mb=1,Ob=10,Ab=-2,bh=e=>e==="*";function Ib(e,t){let n=e.split("/"),r=n.length;return n.some(bh)&&(r+=Ab),t&&(r+=jb),n.filter(o=>!bh(o)).reduce((o,s)=>o+(Tb.test(s)?_b:s===""?Mb:Ob),r)}function Lb(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Db(e,t,n){let{routesMeta:r}=e,o={},s="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",c=Fb({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),y=l.route;if(!c)return null;Object.assign(o,c.params),i.push({params:o,pathname:Br([s,c.pathname]),pathnameBase:Qb(Br([s,c.pathnameBase])),route:y}),c.pathnameBase!=="/"&&(s=Br([s,c.pathnameBase]))}return i}function Fb(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=zb(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((u,d,c)=>{let{paramName:y,isOptional:p}=d;if(y==="*"){let h=a[c]||"";i=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}const w=a[c];return p&&!w?u[y]=void 0:u[y]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:i,pattern:e}}function zb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),df(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function $b(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return df(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ey(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Bb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ub=e=>Bb.test(e);function Vb(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?os(e):e,s;if(n)if(Ub(n))s=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),df(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?s=Ch(n.substring(1),"/"):s=Ch(n,t)}else s=t;return{pathname:s,search:Gb(r),hash:Yb(o)}}function Ch(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function gu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Wb(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Hb(e,t){let n=Wb(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Kb(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=os(e):(o=fi({},e),Ie(!o.pathname||!o.pathname.includes("?"),gu("?","pathname","search",o)),Ie(!o.pathname||!o.pathname.includes("#"),gu("#","pathname","hash",o)),Ie(!o.search||!o.search.includes("#"),gu("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,a;if(i==null)a=n;else{let c=t.length-1;if(!r&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),c-=1;o.pathname=y.join("/")}a=c>=0?t[c]:"/"}let l=Vb(o,a),u=i&&i!=="/"&&i.endsWith("/"),d=(s||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Br=e=>e.join("/").replace(/\/\/+/g,"/"),Qb=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Gb=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yb=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qb(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ty=["post","put","patch","delete"];new Set(ty);const Xb=["get",...ty];new Set(Xb);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}const ff=f.createContext(null),Zb=f.createContext(null),xl=f.createContext(null),wl=f.createContext(null),ss=f.createContext({outlet:null,matches:[],isDataRoute:!1}),ny=f.createContext(null);function Sl(){return f.useContext(wl)!=null}function bl(){return Sl()||Ie(!1),f.useContext(wl).location}function ry(e){f.useContext(xl).static||f.useLayoutEffect(e)}function Jb(){let{isDataRoute:e}=f.useContext(ss);return e?fC():eC()}function eC(){Sl()||Ie(!1);let e=f.useContext(ff),{basename:t,future:n,navigator:r}=f.useContext(xl),{matches:o}=f.useContext(ss),{pathname:s}=bl(),i=JSON.stringify(Hb(o,n.v7_relativeSplatPath)),a=f.useRef(!1);return ry(()=>{a.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Kb(u,JSON.parse(i),s,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Br([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,i,s,e])}function tC(e,t){return nC(e,t)}function nC(e,t,n,r){Sl()||Ie(!1);let{navigator:o}=f.useContext(xl),{matches:s}=f.useContext(ss),i=s[s.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=bl(),d;if(t){var c;let S=typeof t=="string"?os(t):t;l==="/"||(c=S.pathname)!=null&&c.startsWith(l)||Ie(!1),d=S}else d=u;let y=d.pathname||"/",p=y;if(l!=="/"){let S=l.replace(/^\//,"").split("/");p="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=Nb(e,{pathname:p}),h=aC(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:Br([l,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:Br([l,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),s,n,r);return t&&h?f.createElement(wl.Provider,{value:{location:pi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:er.Pop}},h):h}function rC(){let e=dC(),t=qb(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const oC=f.createElement(rC,null);class sC extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(ss.Provider,{value:this.props.routeContext},f.createElement(ny.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iC(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(ff);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(ss.Provider,{value:t},r)}function aC(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let d=i.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Ie(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let c=i[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:y,errors:p}=n,w=c.route.loader&&y[c.route.id]===void 0&&(!p||p[c.route.id]===void 0);if(c.route.lazy||w){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,c,y)=>{let p,w=!1,h=null,S=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,h=c.route.errorElement||oC,l&&(u<0&&y===0?(pC("route-fallback"),w=!0,S=null):u===y&&(w=!0,S=c.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,y+1)),m=()=>{let x;return p?x=h:w?x=S:c.route.Component?x=f.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=d,f.createElement(iC,{match:c,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:x})};return n&&(c.route.ErrorBoundary||c.route.errorElement||y===0)?f.createElement(sC,{location:n.location,revalidation:n.revalidation,component:h,error:p,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var oy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(oy||{}),sy=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(sy||{});function lC(e){let t=f.useContext(ff);return t||Ie(!1),t}function uC(e){let t=f.useContext(Zb);return t||Ie(!1),t}function cC(e){let t=f.useContext(ss);return t||Ie(!1),t}function iy(e){let t=cC(),n=t.matches[t.matches.length-1];return n.route.id||Ie(!1),n.route.id}function dC(){var e;let t=f.useContext(ny),n=uC(),r=iy();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function fC(){let{router:e}=lC(oy.UseNavigateStable),t=iy(sy.UseNavigateStable),n=f.useRef(!1);return ry(()=>{n.current=!0}),f.useCallback(function(o,s){s===void 0&&(s={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,pi({fromRouteId:t},s)))},[e,t])}const Eh={};function pC(e,t,n){Eh[e]||(Eh[e]=!0)}function hC(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Uc(e){Ie(!1)}function mC(e){let{basename:t="/",children:n=null,location:r,navigationType:o=er.Pop,navigator:s,static:i=!1,future:a}=e;Sl()&&Ie(!1);let l=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:l,navigator:s,static:i,future:pi({v7_relativeSplatPath:!1},a)}),[l,a,s,i]);typeof r=="string"&&(r=os(r));let{pathname:d="/",search:c="",hash:y="",state:p=null,key:w="default"}=r,h=f.useMemo(()=>{let S=ey(d,l);return S==null?null:{location:{pathname:S,search:c,hash:y,state:p,key:w},navigationType:o}},[l,d,c,y,p,w,o]);return h==null?null:f.createElement(xl.Provider,{value:u},f.createElement(wl.Provider,{children:n,value:h}))}function gC(e){let{children:t,location:n}=e;return tC(Vc(t),n)}new Promise(()=>{});function Vc(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let s=[...t,o];if(r.type===f.Fragment){n.push.apply(n,Vc(r.props.children,s));return}r.type!==Uc&&Ie(!1),!r.props.index||!r.props.children||Ie(!1);let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Vc(r.props.children,s)),n.push(i)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Wc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function vC(e,t){let n=Wc(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(s=>{n.append(o,s)})}),n}const yC="6";try{window.__reactRouterVersion=yC}catch{}const xC="startTransition",kh=rl[xC];function wC(e){let{basename:t,children:n,future:r,window:o}=e,s=f.useRef();s.current==null&&(s.current=Cb({window:o,v5Compat:!0}));let i=s.current,[a,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&kh?kh(()=>l(c)):l(c)},[l,u]);return f.useLayoutEffect(()=>i.listen(d),[i,d]),f.useEffect(()=>hC(r),[r]),f.createElement(mC,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var Nh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Nh||(Nh={}));var Ph;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ph||(Ph={}));function SC(e){let t=f.useRef(Wc(e)),n=f.useRef(!1),r=bl(),o=f.useMemo(()=>vC(r.search,n.current?null:t.current),[r.search]),s=Jb(),i=f.useCallback((a,l)=>{const u=Wc(typeof a=="function"?a(o):a);n.current=!0,s("?"+u,l)},[s,o]);return[o,i]}const bC=()=>{const e=bl();return f.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface px-6",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),g.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Page not found"}),g.jsx("a",{href:"/",className:"text-primary underline underline-offset-4 hover:text-primary-hover",children:"Return to Home"})]})})};/**
|
|
68
|
+
* @license lucide-react v0.462.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const CC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ay=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
73
|
+
* @license lucide-react v0.462.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/var EC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
78
|
+
* @license lucide-react v0.462.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const kC=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>f.createElement("svg",{ref:l,...EC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ay("lucide",o),...a},[...i.map(([u,d])=>f.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
|
|
83
|
+
* @license lucide-react v0.462.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const ze=(e,t)=>{const n=f.forwardRef(({className:r,...o},s)=>f.createElement(kC,{ref:s,iconNode:t,className:ay(`lucide-${CC(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
88
|
+
* @license lucide-react v0.462.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const Rh=ze("ChartNoAxesColumnIncreasing",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/**
|
|
93
|
+
* @license lucide-react v0.462.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const NC=ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
98
|
+
* @license lucide-react v0.462.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const pf=ze("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
103
|
+
* @license lucide-react v0.462.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const PC=ze("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
108
|
+
* @license lucide-react v0.462.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const ly=ze("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
113
|
+
* @license lucide-react v0.462.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const RC=ze("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
118
|
+
* @license lucide-react v0.462.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const TC=ze("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
123
|
+
* @license lucide-react v0.462.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const _C=ze("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
128
|
+
* @license lucide-react v0.462.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const jC=ze("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
133
|
+
* @license lucide-react v0.462.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const MC=ze("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
138
|
+
* @license lucide-react v0.462.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const OC=ze("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
143
|
+
* @license lucide-react v0.462.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const hf=ze("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
148
|
+
* @license lucide-react v0.462.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const AC=ze("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
153
|
+
* @license lucide-react v0.462.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const IC=ze("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
158
|
+
* @license lucide-react v0.462.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const LC=ze("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
163
|
+
* @license lucide-react v0.462.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const DC=ze("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
168
|
+
* @license lucide-react v0.462.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const mf=ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
173
|
+
* @license lucide-react v0.462.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const FC=ze("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var zC=e=>{switch(e){case"success":return UC;case"info":return WC;case"warning":return VC;case"error":return HC;default:return null}},$C=Array(12).fill(0),BC=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},$C.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),UC=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),VC=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),WC=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),HC=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),KC=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),QC=()=>{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Hc=1,GC=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Hc++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async l=>{if(s=["resolve",l],I.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(qC(l)&&!l.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Hc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},st=new GC,YC=(e,t)=>{let n=(t==null?void 0:t.id)||Hc++;return st.addToast({title:e,...t,id:n}),n},qC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XC=YC,ZC=()=>st.toasts,JC=()=>st.getActiveToasts(),nn=Object.assign(XC,{success:st.success,info:st.info,warning:st.warning,error:st.error,custom:st.custom,message:st.message,promise:st.promise,dismiss:st.dismiss,loading:st.loading},{getHistory:ZC,getToasts:JC});function eE(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}eE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
178
|
+
`);function qi(e){return e.label!==void 0}var tE=3,nE="32px",rE="16px",Th=4e3,oE=356,sE=14,iE=20,aE=200;function Dt(...e){return e.filter(Boolean).join(" ")}function lE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var uE=e=>{var t,n,r,o,s,i,a,l,u,d,c;let{invert:y,toast:p,unstyled:w,interacting:h,setHeights:S,visibleToasts:v,heights:m,index:x,toasts:b,expanded:C,removeToast:k,defaultRichColors:N,closeButton:P,style:j,cancelButtonStyle:R,actionButtonStyle:A,className:M="",descriptionClassName:W="",duration:U,position:Q,gap:V,loadingIcon:H,expandByDefault:T,classNames:_,icons:F,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:L}=e,[Y,G]=I.useState(null),[ie,we]=I.useState(null),[D,ue]=I.useState(!1),[he,se]=I.useState(!1),[X,J]=I.useState(!1),[Ce,$e]=I.useState(!1),[ft,jt]=I.useState(!1),[Mt,un]=I.useState(0),[Rn,hs]=I.useState(0),de=I.useRef(p.duration||U||Th),cn=I.useRef(null),je=I.useRef(null),ms=x===0,Tn=x+1<=v,rt=p.type,ro=p.dismissible!==!1,sw=p.className||"",iw=p.descriptionClassName||"",_i=I.useMemo(()=>m.findIndex(q=>q.toastId===p.id)||0,[m,p.id]),aw=I.useMemo(()=>{var q;return(q=p.closeButton)!=null?q:P},[p.closeButton,P]),Qf=I.useMemo(()=>p.duration||U||Th,[p.duration,U]),Bl=I.useRef(0),oo=I.useRef(0),Gf=I.useRef(0),so=I.useRef(null),[lw,uw]=Q.split("-"),Yf=I.useMemo(()=>m.reduce((q,me,Se)=>Se>=_i?q:q+me.height,0),[m,_i]),qf=QC(),cw=p.invert||y,Ul=rt==="loading";oo.current=I.useMemo(()=>_i*V+Yf,[_i,Yf]),I.useEffect(()=>{de.current=Qf},[Qf]),I.useEffect(()=>{ue(!0)},[]),I.useEffect(()=>{let q=je.current;if(q){let me=q.getBoundingClientRect().height;return hs(me),S(Se=>[{toastId:p.id,height:me,position:p.position},...Se]),()=>S(Se=>Se.filter(Ot=>Ot.toastId!==p.id))}},[S,p.id]),I.useLayoutEffect(()=>{if(!D)return;let q=je.current,me=q.style.height;q.style.height="auto";let Se=q.getBoundingClientRect().height;q.style.height=me,hs(Se),S(Ot=>Ot.find(At=>At.toastId===p.id)?Ot.map(At=>At.toastId===p.id?{...At,height:Se}:At):[{toastId:p.id,height:Se,position:p.position},...Ot])},[D,p.title,p.description,S,p.id]);let _n=I.useCallback(()=>{se(!0),un(oo.current),S(q=>q.filter(me=>me.toastId!==p.id)),setTimeout(()=>{k(p)},aE)},[p,k,S,oo]);I.useEffect(()=>{if(p.promise&&rt==="loading"||p.duration===1/0||p.type==="loading")return;let q;return C||h||L&&qf?(()=>{if(Gf.current<Bl.current){let me=new Date().getTime()-Bl.current;de.current=de.current-me}Gf.current=new Date().getTime()})():de.current!==1/0&&(Bl.current=new Date().getTime(),q=setTimeout(()=>{var me;(me=p.onAutoClose)==null||me.call(p,p),_n()},de.current)),()=>clearTimeout(q)},[C,h,p,rt,L,qf,_n]),I.useEffect(()=>{p.delete&&_n()},[_n,p.delete]);function dw(){var q,me,Se;return F!=null&&F.loading?I.createElement("div",{className:Dt(_==null?void 0:_.loader,(q=p==null?void 0:p.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":rt==="loading"},F.loading):H?I.createElement("div",{className:Dt(_==null?void 0:_.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":rt==="loading"},H):I.createElement(BC,{className:Dt(_==null?void 0:_.loader,(Se=p==null?void 0:p.classNames)==null?void 0:Se.loader),visible:rt==="loading"})}return I.createElement("li",{tabIndex:0,ref:je,className:Dt(M,sw,_==null?void 0:_.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[rt],(n=p==null?void 0:p.classNames)==null?void 0:n[rt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:N,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":D,"data-promise":!!p.promise,"data-swiped":ft,"data-removed":he,"data-visible":Tn,"data-y-position":lw,"data-x-position":uw,"data-index":x,"data-front":ms,"data-swiping":X,"data-dismissible":ro,"data-type":rt,"data-invert":cw,"data-swipe-out":Ce,"data-swipe-direction":ie,"data-expanded":!!(C||T&&D),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${he?Mt:oo.current}px`,"--initial-height":T?"auto":`${Rn}px`,...j,...p.style},onDragEnd:()=>{J(!1),G(null),so.current=null},onPointerDown:q=>{Ul||!ro||(cn.current=new Date,un(oo.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(J(!0),so.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,me,Se,Ot;if(Ce||!ro)return;so.current=null;let At=Number(((q=je.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((me=je.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Sr=new Date().getTime()-((Se=cn.current)==null?void 0:Se.getTime()),It=Y==="x"?At:jn,Mn=Math.abs(It)/Sr;if(Math.abs(It)>=iE||Mn>.11){un(oo.current),(Ot=p.onDismiss)==null||Ot.call(p,p),we(Y==="x"?At>0?"right":"left":jn>0?"down":"up"),_n(),$e(!0),jt(!1);return}J(!1),G(null)},onPointerMove:q=>{var me,Se,Ot,At;if(!so.current||!ro||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let jn=q.clientY-so.current.y,Sr=q.clientX-so.current.x,It=(Se=e.swipeDirections)!=null?Se:lE(Q);!Y&&(Math.abs(Sr)>1||Math.abs(jn)>1)&&G(Math.abs(Sr)>Math.abs(jn)?"x":"y");let Mn={x:0,y:0};Y==="y"?(It.includes("top")||It.includes("bottom"))&&(It.includes("top")&&jn<0||It.includes("bottom")&&jn>0)&&(Mn.y=jn):Y==="x"&&(It.includes("left")||It.includes("right"))&&(It.includes("left")&&Sr<0||It.includes("right")&&Sr>0)&&(Mn.x=Sr),(Math.abs(Mn.x)>0||Math.abs(Mn.y)>0)&&jt(!0),(Ot=je.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Mn.x}px`),(At=je.current)==null||At.style.setProperty("--swipe-amount-y",`${Mn.y}px`)}},aw&&!p.jsx?I.createElement("button",{"aria-label":B,"data-disabled":Ul,"data-close-button":!0,onClick:Ul||!ro?()=>{}:()=>{var q;_n(),(q=p.onDismiss)==null||q.call(p,p)},className:Dt(_==null?void 0:_.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(s=F==null?void 0:F.close)!=null?s:KC):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:I.createElement(I.Fragment,null,rt||p.icon||p.promise?I.createElement("div",{"data-icon":"",className:Dt(_==null?void 0:_.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||dw():null,p.type!=="loading"?p.icon||(F==null?void 0:F[rt])||zC(rt):null):null,I.createElement("div",{"data-content":"",className:Dt(_==null?void 0:_.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Dt(_==null?void 0:_.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?I.createElement("div",{"data-description":"",className:Dt(W,iw,_==null?void 0:_.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&qi(p.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:q=>{var me,Se;qi(p.cancel)&&ro&&((Se=(me=p.cancel).onClick)==null||Se.call(me,q),_n())},className:Dt(_==null?void 0:_.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&qi(p.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||A,onClick:q=>{var me,Se;qi(p.action)&&((Se=(me=p.action).onClick)==null||Se.call(me,q),!q.defaultPrevented&&_n())},className:Dt(_==null?void 0:_.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function _h(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function cE(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?rE:nE;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var dE=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:y,style:p,visibleToasts:w=tE,toastOptions:h,dir:S=_h(),gap:v=sE,loadingIcon:m,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:C}=e,[k,N]=I.useState([]),P=I.useMemo(()=>Array.from(new Set([r].concat(k.filter(L=>L.position).map(L=>L.position)))),[k,r]),[j,R]=I.useState([]),[A,M]=I.useState(!1),[W,U]=I.useState(!1),[Q,V]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=I.useRef(null),T=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=I.useRef(null),F=I.useRef(!1),B=I.useCallback(L=>{N(Y=>{var G;return(G=Y.find(ie=>ie.id===L.id))!=null&&G.delete||st.dismiss(L.id),Y.filter(({id:ie})=>ie!==L.id)})},[]);return I.useEffect(()=>st.subscribe(L=>{if(L.dismiss){N(Y=>Y.map(G=>G.id===L.id?{...G,delete:!0}:G));return}setTimeout(()=>{Iv.flushSync(()=>{N(Y=>{let G=Y.findIndex(ie=>ie.id===L.id);return G!==-1?[...Y.slice(0,G),{...Y[G],...L},...Y.slice(G+1)]:[L,...Y]})})})}),[]),I.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:Y})=>{V(Y?"dark":"light")})}catch{L.addListener(({matches:G})=>{try{V(G?"dark":"light")}catch(ie){console.error(ie)}})}},[d]),I.useEffect(()=>{k.length<=1&&M(!1)},[k]),I.useEffect(()=>{let L=Y=>{var G,ie;o.every(we=>Y[we]||Y.code===we)&&(M(!0),(G=H.current)==null||G.focus()),Y.code==="Escape"&&(document.activeElement===H.current||(ie=H.current)!=null&&ie.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[o]),I.useEffect(()=>{if(H.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,F.current=!1)}},[H.current]),I.createElement("section",{ref:t,"aria-label":`${b} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((L,Y)=>{var G;let[ie,we]=L.split("-");return k.length?I.createElement("ol",{key:L,dir:S==="auto"?_h():S,tabIndex:-1,ref:H,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":ie,"data-lifted":A&&k.length>1&&!s,"data-x-position":we,style:{"--front-toast-height":`${((G=j[0])==null?void 0:G.height)||0}px`,"--width":`${oE}px`,"--gap":`${v}px`,...p,...cE(l,u)},onBlur:D=>{F.current&&!D.currentTarget.contains(D.relatedTarget)&&(F.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||F.current||(F.current=!0,_.current=D.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{W||M(!1)},onDragEnd:()=>M(!1),onPointerDown:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},k.filter(D=>!D.position&&Y===0||D.position===L).map((D,ue)=>{var he,se;return I.createElement(uE,{key:D.id,icons:x,index:ue,toast:D,defaultRichColors:c,duration:(he=h==null?void 0:h.duration)!=null?he:y,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:w,closeButton:(se=h==null?void 0:h.closeButton)!=null?se:i,interacting:W,position:L,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:B,toasts:k.filter(X=>X.position==D.position),heights:j.filter(X=>X.position==D.position),setHeights:R,expandByDefault:s,gap:v,loadingIcon:m,expanded:A,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});function jh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gf(...e){return t=>{let n=!1;const r=e.map(o=>{const s=jh(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():jh(e[o],null)}}}}function le(...e){return f.useCallback(gf(...e),e)}var fE=Symbol.for("react.lazy"),Ha=rl[" use ".trim().toString()];function pE(e){return typeof e=="object"&&e!==null&&"then"in e}function uy(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fE&&"_payload"in e&&pE(e._payload)}function cy(e){const t=mE(e),n=f.forwardRef((r,o)=>{let{children:s,...i}=r;uy(s)&&typeof Ha=="function"&&(s=Ha(s._payload));const a=f.Children.toArray(s),l=a.find(vE);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...i,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return g.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var hE=cy("Slot");function mE(e){const t=f.forwardRef((n,r)=>{let{children:o,...s}=n;if(uy(o)&&typeof Ha=="function"&&(o=Ha(o._payload)),f.isValidElement(o)){const i=xE(o),a=yE(s,o.props);return o.type!==f.Fragment&&(a.ref=r?gf(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gE=Symbol("radix.slottable");function vE(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gE}function yE(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function xE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dy(e))&&(r&&(r+=" "),r+=t);return r}const Mh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Oh=fy,vf=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Oh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=s==null?void 0:s[u];if(d===null)return null;const y=Mh(d)||Mh(c);return o[u][y]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,y]=d;return y===void 0||(u[c]=y),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:y,...p}=d;return Object.entries(p).every(w=>{let[h,S]=w;return Array.isArray(S)?S.includes({...s,...a}[h]):{...s,...a}[h]===S})?[...u,c,y]:u},[]);return Oh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},yf="-",wE=e=>{const t=bE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(yf);return a[0]===""&&a.length!==1&&a.shift(),py(a,t)||SE(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},py=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?py(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(yf);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Ah=/^\[(.+)\]$/,SE=e=>{if(Ah.test(e)){const t=Ah.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return EE(Object.entries(e.classGroups),n).forEach(([s,i])=>{Kc(i,r,s,t)}),r},Kc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ih(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(CE(o)){Kc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Kc(i,Ih(t,s),n,r)})})},Ih=(e,t)=>{let n=e;return t.split(yf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},CE=e=>e.isThemeGetter,EE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,kE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},hy="!",NE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let u=0,d=0,c;for(let S=0;S<a.length;S++){let v=a[S];if(u===0){if(v===o&&(r||a.slice(S,S+s)===t)){l.push(a.slice(d,S)),d=S+s;continue}if(v==="/"){c=S;continue}}v==="["?u++:v==="]"&&u--}const y=l.length===0?a:a.substring(d),p=y.startsWith(hy),w=p?y.substring(1):y,h=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:h}};return n?a=>n({className:a,parseClassName:i}):i},PE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},RE=e=>({cache:kE(e.cacheSize),parseClassName:NE(e),...wE(e)}),TE=/\s+/,_E=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(TE);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:d,hasImportantModifier:c,baseClassName:y,maybePostfixModifierPosition:p}=n(u);let w=!!p,h=r(w?y.substring(0,p):y);if(!h){if(!w){a=u+(a.length>0?" "+a:a);continue}if(h=r(y),!h){a=u+(a.length>0?" "+a:a);continue}w=!1}const S=PE(d).join(":"),v=c?S+hy:S,m=v+h;if(s.includes(m))continue;s.push(m);const x=o(h,w);for(let b=0;b<x.length;++b){const C=x[b];s.push(v+C)}a=u+(a.length>0?" "+a:a)}return a};function jE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=my(t))&&(r&&(r+=" "),r+=n);return r}const my=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=my(e[r]))&&(n&&(n+=" "),n+=t);return n};function ME(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((d,c)=>c(d),e());return n=RE(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=_E(l,n);return o(l,d),d}return function(){return s(jE.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gy=/^\[(?:([a-z-]+):)?(.+)\]$/i,OE=/^\d+\/\d+$/,AE=new Set(["px","full","screen"]),IE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LE=/\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$/,DE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dn=e=>jo(e)||AE.has(e)||OE.test(e),An=e=>is(e,"length",QE),jo=e=>!!e&&!Number.isNaN(Number(e)),vu=e=>is(e,"number",jo),Es=e=>!!e&&Number.isInteger(Number(e)),$E=e=>e.endsWith("%")&&jo(e.slice(0,-1)),Z=e=>gy.test(e),In=e=>IE.test(e),BE=new Set(["length","size","percentage"]),UE=e=>is(e,BE,vy),VE=e=>is(e,"position",vy),WE=new Set(["image","url"]),HE=e=>is(e,WE,YE),KE=e=>is(e,"",GE),ks=()=>!0,is=(e,t,n)=>{const r=gy.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},QE=e=>LE.test(e)&&!DE.test(e),vy=()=>!1,GE=e=>FE.test(e),YE=e=>zE.test(e),qE=()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),s=ve("borderRadius"),i=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),d=ve("hueRotate"),c=ve("invert"),y=ve("gap"),p=ve("gradientColorStops"),w=ve("gradientColorStopPositions"),h=ve("inset"),S=ve("margin"),v=ve("opacity"),m=ve("padding"),x=ve("saturate"),b=ve("scale"),C=ve("sepia"),k=ve("skew"),N=ve("space"),P=ve("translate"),j=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",Z,t],M=()=>[Z,t],W=()=>["",dn,An],U=()=>["auto",jo,Z],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",Z],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[jo,Z];return{cacheSize:500,separator:":",theme:{colors:[ks],spacing:[dn,An],blur:["none","",In,Z],brightness:B(),borderColor:[e],borderRadius:["none","","full",In,Z],borderSpacing:M(),borderWidth:W(),contrast:B(),grayscale:_(),hueRotate:B(),invert:_(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[$E,An],inset:A(),margin:A(),opacity:B(),padding:M(),saturate:B(),scale:B(),sepia:_(),skew:B(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[In]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),Z]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Es,Z]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Es,Z]}],"grid-cols":[{"grid-cols":[ks]}],"col-start-end":[{col:["auto",{span:["full",Es,Z]},Z]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[ks]}],"row-start-end":[{row:["auto",{span:[Es,Z]},Z]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[In]},In]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",In,An]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vu]}],"font-family":[{font:[ks]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",jo,vu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",dn,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",dn,An]}],"underline-offset":[{"underline-offset":["auto",dn,Z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),VE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",UE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[dn,Z]}],"outline-w":[{outline:[dn,An]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[dn,An]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",In,KE]}],"shadow-color":[{shadow:[ks]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",In,Z]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Es,Z]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[dn,An,vu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},XE=ME(qE);function ce(...e){return XE(fy(e))}const yy=[{band:"high",label:"High probability",min:.75,max:1,surfaceClassName:"token-high-prob",textClassName:"text-token-high"},{band:"med-high",label:"Medium-high probability",min:.5,max:.75,surfaceClassName:"token-med-high-prob",textClassName:"text-token-med-high"},{band:"med-low",label:"Medium-low probability",min:.25,max:.5,surfaceClassName:"token-med-low-prob",textClassName:"text-token-med-low"},{band:"low",label:"Low probability",min:0,max:.25,surfaceClassName:"token-low-prob",textClassName:"text-token-low"}];function ZE(e){return/^\s+$/.test(e)}function JE(e){const t=e.replace(/\s+/g,"");return t.length===0?!1:/^[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]+$/.test(t)}function ek(e,t,n,r=.5){var s;if(!e.length)return null;const o=typeof t=="number"?t+n:n>0?0:e.length-1;for(let i=o;i>=0&&i<e.length;i+=n)if(((s=e[i])==null?void 0:s.prob)<r)return i;return null}function hi(e,t=2){if(!Number.isFinite(e)||e<0)return`< 0.${"0".repeat(Math.max(t-1,0))}1%`;const n=10**t,r=Math.min(e,1),o=Math.floor(r*100*n)/n;return o<1/n?`< 0.${"0".repeat(Math.max(t-1,0))}1%`:r<1?`${Math.min(o,100-1/n).toFixed(t)}%`:`${o.toFixed(t)}%`}function tk(e){return e<.25?"token-low-prob":e<.5?"token-med-low-prob":e<.75?"token-med-high-prob":"token-high-prob"}function nk(e){return e<.25?"low":e<.5?"med-low":e<.75?"med-high":"high"}function Ka(e){const t=nk(e);return yy.find(n=>n.band===t)}const rk=vf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hover",destructive:"bg-destructive text-destructive-foreground hover:opacity-90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary-hover",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ve=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?hE:"button";return g.jsx(i,{className:ce(rk({variant:t,size:n,className:e})),ref:s,...o})});Ve.displayName="Button";function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ok(e,t){const n=f.createContext(t),r=s=>{const{children:i,...a}=s,l=f.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function yr(e,t=[]){let n=[];function r(s,i){const a=f.createContext(i),l=n.length;n=[...n,i];const u=c=>{var v;const{scope:y,children:p,...w}=c,h=((v=y==null?void 0:y[e])==null?void 0:v[l])||a,S=f.useMemo(()=>w,Object.values(w));return g.jsx(h.Provider,{value:S,children:p})};u.displayName=s+"Provider";function d(c,y){var h;const p=((h=y==null?void 0:y[e])==null?void 0:h[l])||a,w=f.useContext(p);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>f.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,sk(o,...t)]}function sk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ke=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},ik=rl[" useId ".trim().toString()]||(()=>{}),ak=0;function cr(e){const[t,n]=f.useState(ik());return Ke(()=>{n(r=>r??String(ak++))},[e]),t?`radix-${t}`:""}var lk=rl[" useInsertionEffect ".trim().toString()]||Ke;function Qr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=uk({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=f.useCallback(d=>{var c;if(a){const y=ck(d)?d(e):d;y!==e&&((c=i.current)==null||c.call(i,y))}else s(d)},[a,e,s,i]);return[l,u]}function uk({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),s=f.useRef(t);return lk(()=>{s.current=t},[t]),f.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function ck(e){return typeof e=="function"}function mi(e){const t=dk(e),n=f.forwardRef((r,o)=>{const{children:s,...i}=r,a=f.Children.toArray(s),l=a.find(pk);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...i,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return g.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function dk(e){const t=f.forwardRef((n,r)=>{const{children:o,...s}=n;if(f.isValidElement(o)){const i=mk(o),a=hk(s,o.props);return o.type!==f.Fragment&&(a.ref=r?gf(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xy=Symbol("radix.slottable");function fk(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=xy,t}function pk(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xy}function hk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function mk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=gk.reduce((e,t)=>{const n=mi(`Primitive.${t}`),r=f.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vk(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function Gr(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function yk(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var xk="DismissableLayer",Qc="dismissableLayer.update",wk="dismissableLayer.pointerDownOutside",Sk="dismissableLayer.focusOutside",Lh,wy=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cl=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=f.useContext(wy),[d,c]=f.useState(null),y=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),w=le(t,N=>c(N)),h=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(S),m=d?h.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=m>=v,C=Ek(N=>{const P=N.target,j=[...u.branches].some(R=>R.contains(P));!b||j||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},y),k=kk(N=>{const P=N.target;[...u.branches].some(R=>R.contains(P))||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},y);return yk(N=>{m===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},y),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Lh=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Dh(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Lh)}},[d,y,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Dh())},[d,u]),f.useEffect(()=>{const N=()=>p({});return document.addEventListener(Qc,N),()=>document.removeEventListener(Qc,N)},[]),g.jsx(ne.div,{...l,ref:w,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,C.onPointerDownCapture)})});Cl.displayName=xk;var bk="DismissableLayerBranch",Ck=f.forwardRef((e,t)=>{const n=f.useContext(wy),r=f.useRef(null),o=le(t,r);return f.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(ne.div,{...e,ref:o})});Ck.displayName=bk;function Ek(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Sy(wk,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kk(e,t=globalThis==null?void 0:globalThis.document){const n=Gr(e),r=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!r.current&&Sy(Sk,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Dh(){const e=new CustomEvent(Qc);document.dispatchEvent(e)}function Sy(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vk(o,s):o.dispatchEvent(s)}var yu="focusScope.autoFocusOnMount",xu="focusScope.autoFocusOnUnmount",Fh={bubbles:!1,cancelable:!0},Nk="FocusScope",xf=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=f.useState(null),u=Gr(o),d=Gr(s),c=f.useRef(null),y=le(t,h=>l(h)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let h=function(x){if(p.paused||!a)return;const b=x.target;a.contains(b)?c.current=b:Dn(c.current,{select:!0})},S=function(x){if(p.paused||!a)return;const b=x.relatedTarget;b!==null&&(a.contains(b)||Dn(c.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Dn(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",S);const m=new MutationObserver(v);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",S),m.disconnect()}}},[r,a,p.paused]),f.useEffect(()=>{if(a){$h.add(p);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(yu,Fh);a.addEventListener(yu,u),a.dispatchEvent(v),v.defaultPrevented||(Pk(Mk(by(a)),{select:!0}),document.activeElement===h&&Dn(a))}return()=>{a.removeEventListener(yu,u),setTimeout(()=>{const v=new CustomEvent(xu,Fh);a.addEventListener(xu,d),a.dispatchEvent(v),v.defaultPrevented||Dn(h??document.body,{select:!0}),a.removeEventListener(xu,d),$h.remove(p)},0)}}},[a,u,d,p]);const w=f.useCallback(h=>{if(!n&&!r||p.paused)return;const S=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(S&&v){const m=h.currentTarget,[x,b]=Rk(m);x&&b?!h.shiftKey&&v===b?(h.preventDefault(),n&&Dn(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),n&&Dn(b,{select:!0})):v===m&&h.preventDefault()}},[n,r,p.paused]);return g.jsx(ne.div,{tabIndex:-1,...i,ref:y,onKeyDown:w})});xf.displayName=Nk;function Pk(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Dn(r,{select:t}),document.activeElement!==n)return}function Rk(e){const t=by(e),n=zh(t,e),r=zh(t.reverse(),e);return[n,r]}function by(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zh(e,t){for(const n of e)if(!Tk(n,{upTo:t}))return n}function Tk(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function _k(e){return e instanceof HTMLInputElement&&"select"in e}function Dn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_k(e)&&t&&e.select()}}var $h=jk();function jk(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Bh(e,t),e.unshift(t)},remove(t){var n;e=Bh(e,t),(n=e[0])==null||n.resume()}}}function Bh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Mk(e){return e.filter(t=>t.tagName!=="A")}var Ok="Portal",wf=f.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=f.useState(!1);Ke(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Iv.createPortal(g.jsx(ne.div,{...r,ref:t}),i):null});wf.displayName=Ok;function Ak(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var as=e=>{const{present:t,children:n}=e,r=Ik(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=le(r.ref,Lk(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};as.displayName="Presence";function Ik(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Ak(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Xi(r.current);s.current=a==="mounted"?u:"none"},[a]),Ke(()=>{const u=r.current,d=o.current;if(d!==e){const y=s.current,p=Xi(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&y!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ke(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const h=Xi(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},y=p=>{p.target===t&&(s.current=Xi(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Xi(e){return(e==null?void 0:e.animationName)||"none"}function Lk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wu=0;function Cy(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Uh()),document.body.insertAdjacentElement("beforeend",e[1]??Uh()),wu++,()=>{wu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wu--}},[])}function Uh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var tn=function(){return tn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},tn.apply(this,arguments)};function Ey(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Dk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ga="right-scroll-bar-position",va="width-before-scroll-bar",Fk="with-scroll-bars-hidden",zk="--removed-body-scroll-bar-size";function Su(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $k(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Bk=typeof window<"u"?f.useLayoutEffect:f.useEffect,Vh=new WeakMap;function Uk(e,t){var n=$k(null,function(r){return e.forEach(function(o){return Su(o,r)})});return Bk(function(){var r=Vh.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Su(a,null)}),s.forEach(function(a){o.has(a)||Su(a,i)})}Vh.set(n,e)},[e]),n}function Vk(e){return e}function Wk(e,t){t===void 0&&(t=Vk);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Hk(e){e===void 0&&(e={});var t=Wk(null);return t.options=tn({async:!0,ssr:!1},e),t}var ky=function(e){var t=e.sideCar,n=Ey(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,tn({},n))};ky.isSideCarExport=!0;function Kk(e,t){return e.useMedium(t),ky}var Ny=Hk(),bu=function(){},El=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:bu,onWheelCapture:bu,onTouchMoveCapture:bu}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,y=e.sideCar,p=e.noRelative,w=e.noIsolation,h=e.inert,S=e.allowPinchZoom,v=e.as,m=v===void 0?"div":v,x=e.gapMode,b=Ey(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=y,k=Uk([n,t]),N=tn(tn({},b),o);return f.createElement(f.Fragment,null,d&&f.createElement(C,{sideCar:Ny,removeScrollBar:u,shards:c,noRelative:p,noIsolation:w,inert:h,setCallbacks:s,allowPinchZoom:!!S,lockRef:n,gapMode:x}),i?f.cloneElement(f.Children.only(a),tn(tn({},N),{ref:k})):f.createElement(m,tn({},N,{className:l,ref:k}),a))});El.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};El.classNames={fullWidth:va,zeroRight:ga};var Qk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qk();return t&&e.setAttribute("nonce",t),e}function Yk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Xk=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gk())&&(Yk(t,n),qk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Zk=function(){var e=Xk();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Py=function(){var e=Zk(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Jk={left:0,top:0,right:0,gap:0},Cu=function(e){return parseInt(e||"",10)||0},eN=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Cu(n),Cu(r),Cu(o)]},tN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jk;var t=eN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nN=Py(),Mo="data-scroll-locked",rN=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
179
|
+
.`.concat(Fk,` {
|
|
180
|
+
overflow: hidden `).concat(r,`;
|
|
181
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
182
|
+
}
|
|
183
|
+
body[`).concat(Mo,`] {
|
|
184
|
+
overflow: hidden `).concat(r,`;
|
|
185
|
+
overscroll-behavior: contain;
|
|
186
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
187
|
+
padding-left: `.concat(o,`px;
|
|
188
|
+
padding-top: `).concat(s,`px;
|
|
189
|
+
padding-right: `).concat(i,`px;
|
|
190
|
+
margin-left:0;
|
|
191
|
+
margin-top:0;
|
|
192
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
193
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.`).concat(ga,` {
|
|
197
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.`).concat(va,` {
|
|
201
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.`).concat(ga," .").concat(ga,` {
|
|
205
|
+
right: 0 `).concat(r,`;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.`).concat(va," .").concat(va,` {
|
|
209
|
+
margin-right: 0 `).concat(r,`;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
body[`).concat(Mo,`] {
|
|
213
|
+
`).concat(zk,": ").concat(a,`px;
|
|
214
|
+
}
|
|
215
|
+
`)},Wh=function(){var e=parseInt(document.body.getAttribute(Mo)||"0",10);return isFinite(e)?e:0},oN=function(){f.useEffect(function(){return document.body.setAttribute(Mo,(Wh()+1).toString()),function(){var e=Wh()-1;e<=0?document.body.removeAttribute(Mo):document.body.setAttribute(Mo,e.toString())}},[])},sN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;oN();var s=f.useMemo(function(){return tN(o)},[o]);return f.createElement(nN,{styles:rN(s,!t,o,n?"":"!important")})},Gc=!1;if(typeof window<"u")try{var Zi=Object.defineProperty({},"passive",{get:function(){return Gc=!0,!0}});window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{Gc=!1}var ao=Gc?{passive:!1}:!1,iN=function(e){return e.tagName==="TEXTAREA"},Ry=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!iN(e)&&n[t]==="visible")},aN=function(e){return Ry(e,"overflowY")},lN=function(e){return Ry(e,"overflowX")},Hh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ty(e,r);if(o){var s=_y(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ty=function(e,t){return e==="v"?aN(t):lN(t)},_y=function(e,t){return e==="v"?uN(t):cN(t)},dN=function(e,t){return e==="h"&&t==="rtl"?-1:1},fN=function(e,t,n,r,o){var s=dN(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,d=i>0,c=0,y=0;do{if(!a)break;var p=_y(e,a),w=p[0],h=p[1],S=p[2],v=h-S-s*w;(w||v)&&Ty(e,a)&&(c+=v,y+=w);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(c)<1||!d&&Math.abs(y)<1)&&(u=!0),u},Ji=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kh=function(e){return[e.deltaX,e.deltaY]},Qh=function(e){return e&&"current"in e?e.current:e},pN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hN=function(e){return`
|
|
216
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
217
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
218
|
+
`)},mN=0,lo=[];function gN(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(mN++)[0],s=f.useState(Py)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Dk([e.lockRef.current],(e.shards||[]).map(Qh),!0).filter(Boolean);return h.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(h,S){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var v=Ji(h),m=n.current,x="deltaX"in h?h.deltaX:m[0]-v[0],b="deltaY"in h?h.deltaY:m[1]-v[1],C,k=h.target,N=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in h&&N==="h"&&k.type==="range")return!1;var P=window.getSelection(),j=P&&P.anchorNode,R=j?j===k||j.contains(k):!1;if(R)return!1;var A=Hh(N,k);if(!A)return!0;if(A?C=N:(C=N==="v"?"h":"v",A=Hh(N,k)),!A)return!1;if(!r.current&&"changedTouches"in h&&(x||b)&&(r.current=C),!C)return!0;var M=r.current||C;return fN(M,S,h,M==="h"?x:b)},[]),l=f.useCallback(function(h){var S=h;if(!(!lo.length||lo[lo.length-1]!==s)){var v="deltaY"in S?Kh(S):Ji(S),m=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&pN(C.delta,v)})[0];if(m&&m.should){S.cancelable&&S.preventDefault();return}if(!m){var x=(i.current.shards||[]).map(Qh).filter(Boolean).filter(function(C){return C.contains(S.target)}),b=x.length>0?a(S,x[0]):!i.current.noIsolation;b&&S.cancelable&&S.preventDefault()}}},[]),u=f.useCallback(function(h,S,v,m){var x={name:h,delta:S,target:v,should:m,shadowParent:vN(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),d=f.useCallback(function(h){n.current=Ji(h),r.current=void 0},[]),c=f.useCallback(function(h){u(h.type,Kh(h),h.target,a(h,e.lockRef.current))},[]),y=f.useCallback(function(h){u(h.type,Ji(h),h.target,a(h,e.lockRef.current))},[]);f.useEffect(function(){return lo.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:y}),document.addEventListener("wheel",l,ao),document.addEventListener("touchmove",l,ao),document.addEventListener("touchstart",d,ao),function(){lo=lo.filter(function(h){return h!==s}),document.removeEventListener("wheel",l,ao),document.removeEventListener("touchmove",l,ao),document.removeEventListener("touchstart",d,ao)}},[]);var p=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(s,{styles:hN(o)}):null,p?f.createElement(sN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yN=Kk(Ny,gN);var Sf=f.forwardRef(function(e,t){return f.createElement(El,tn({},e,{ref:t,sideCar:yN}))});Sf.classNames=El.classNames;var xN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},uo=new WeakMap,ea=new WeakMap,ta={},Eu=0,jy=function(e){return e&&(e.host||jy(e.parentNode))},wN=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},SN=function(e,t,n,r){var o=wN(t,Array.isArray(e)?e:[e]);ta[n]||(ta[n]=new WeakMap);var s=ta[n],i=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(y){if(a.has(y))d(y);else try{var p=y.getAttribute(r),w=p!==null&&p!=="false",h=(uo.get(y)||0)+1,S=(s.get(y)||0)+1;uo.set(y,h),s.set(y,S),i.push(y),h===1&&w&&ea.set(y,!0),S===1&&y.setAttribute(n,"true"),w||y.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",y,v)}})};return d(t),a.clear(),Eu++,function(){i.forEach(function(c){var y=uo.get(c)-1,p=s.get(c)-1;uo.set(c,y),s.set(c,p),y||(ea.has(c)||c.removeAttribute(r),ea.delete(c)),p||c.removeAttribute(n)}),Eu--,Eu||(uo=new WeakMap,uo=new WeakMap,ea=new WeakMap,ta={})}},My=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xN(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),SN(r,o,n,"aria-hidden")):function(){return null}},kl="Dialog",[Oy]=yr(kl),[bN,Gt]=Oy(kl),Ay=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=f.useRef(null),l=f.useRef(null),[u,d]=Qr({prop:r,defaultProp:o??!1,onChange:s,caller:kl});return g.jsx(bN,{scope:t,triggerRef:a,contentRef:l,contentId:cr(),titleId:cr(),descriptionId:cr(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(c=>!c),[d]),modal:i,children:n})};Ay.displayName=kl;var Iy="DialogTrigger",CN=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gt(Iy,n),s=le(t,o.triggerRef);return g.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ef(o.open),...r,ref:s,onClick:ee(e.onClick,o.onOpenToggle)})});CN.displayName=Iy;var bf="DialogPortal",[EN,Ly]=Oy(bf,{forceMount:void 0}),Dy=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Gt(bf,t);return g.jsx(EN,{scope:t,forceMount:n,children:f.Children.map(r,i=>g.jsx(as,{present:n||s.open,children:g.jsx(wf,{asChild:!0,container:o,children:i})}))})};Dy.displayName=bf;var Qa="DialogOverlay",Fy=f.forwardRef((e,t)=>{const n=Ly(Qa,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Gt(Qa,e.__scopeDialog);return s.modal?g.jsx(as,{present:r||s.open,children:g.jsx(NN,{...o,ref:t})}):null});Fy.displayName=Qa;var kN=mi("DialogOverlay.RemoveScroll"),NN=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gt(Qa,n);return g.jsx(Sf,{as:kN,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(ne.div,{"data-state":Ef(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Yr="DialogContent",zy=f.forwardRef((e,t)=>{const n=Ly(Yr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Gt(Yr,e.__scopeDialog);return g.jsx(as,{present:r||s.open,children:s.modal?g.jsx(PN,{...o,ref:t}):g.jsx(RN,{...o,ref:t})})});zy.displayName=Yr;var PN=f.forwardRef((e,t)=>{const n=Gt(Yr,e.__scopeDialog),r=f.useRef(null),o=le(t,n.contentRef,r);return f.useEffect(()=>{const s=r.current;if(s)return My(s)},[]),g.jsx($y,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault())})}),RN=f.forwardRef((e,t)=>{const n=Gt(Yr,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return g.jsx($y,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),$y=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Gt(Yr,n),l=f.useRef(null),u=le(t,l);return Cy(),g.jsxs(g.Fragment,{children:[g.jsx(xf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(Cl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ef(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(TN,{titleId:a.titleId}),g.jsx(jN,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Cf="DialogTitle",By=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gt(Cf,n);return g.jsx(ne.h2,{id:o.titleId,...r,ref:t})});By.displayName=Cf;var Uy="DialogDescription",Vy=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gt(Uy,n);return g.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});Vy.displayName=Uy;var Wy="DialogClose",Hy=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gt(Wy,n);return g.jsx(ne.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});Hy.displayName=Wy;function Ef(e){return e?"open":"closed"}var Ky="DialogTitleWarning",[LT,Qy]=ok(Ky,{contentName:Yr,titleName:Cf,docsSlug:"dialog"}),TN=({titleId:e})=>{const t=Qy(Ky),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
219
|
+
|
|
220
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
221
|
+
|
|
222
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_N="DialogDescriptionWarning",jN=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qy(_N).contentName}}.`;return f.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},MN=Ay,ON=Dy,Gy=Fy,Yy=zy,qy=By,Xy=Vy,AN=Hy;const Zy=MN,IN=ON,Jy=AN,e0=f.forwardRef(({className:e,...t},n)=>g.jsx(Gy,{ref:n,className:ce("fixed inset-0 z-50 bg-overlay/72 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));e0.displayName=Gy.displayName;const kf=f.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(IN,{children:[g.jsx(e0,{}),g.jsx(Yy,{ref:r,className:ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:t})]}));kf.displayName=Yy.displayName;const Nf=({className:e,...t})=>g.jsx("div",{className:ce("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Nf.displayName="DialogHeader";const t0=({className:e,...t})=>g.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});t0.displayName="DialogFooter";const Pf=f.forwardRef(({className:e,...t},n)=>g.jsx(qy,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",e),...t}));Pf.displayName=qy.displayName;const n0=f.forwardRef(({className:e,...t},n)=>g.jsx(Xy,{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));n0.displayName=Xy.displayName;const Ga=f.forwardRef(({className:e,type:t,...n},r)=>g.jsx("input",{type:t,className:ce("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ga.displayName="Input";var LN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],DN=LN.reduce((e,t)=>{const n=cy(`Primitive.${t}`),r=f.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),FN="Label",r0=f.forwardRef((e,t)=>g.jsx(DN.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));r0.displayName=FN;var o0=r0;const zN=vf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ct=f.forwardRef(({className:e,...t},n)=>g.jsx(o0,{ref:n,className:ce(zN(),e),...t}));Ct.displayName=o0.displayName;const Rf="logprob-visualizer.connection.v1",$N="https://api.openai.com/v1";function BN(e){return e.trim()}function ls(e){return{apiKey:BN(e.apiKey),baseUrl:e.baseUrl.trim().replace(/\/+$/,"")}}function Ya(e){return e.trim()?ls({apiKey:"",baseUrl:e}).baseUrl:$N}function UN(e){const t=ls({apiKey:"",baseUrl:e}).baseUrl;if(!t)return null;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?"Base URL must use http or https.":null}catch{return"Base URL must be a valid absolute URL."}}function VN(){if(typeof window>"u")return{apiKey:"",baseUrl:""};const e=window.localStorage.getItem(Rf);if(!e)return{apiKey:"",baseUrl:""};try{const t=JSON.parse(e);return ls({apiKey:typeof t.apiKey=="string"?t.apiKey:"",baseUrl:typeof t.baseUrl=="string"?t.baseUrl:""})}catch{return{apiKey:"",baseUrl:""}}}function WN(e){const t=ls(e);return typeof window<"u"&&window.localStorage.setItem(Rf,JSON.stringify(t)),t}function HN(){typeof window<"u"&&window.localStorage.removeItem(Rf)}function KN(e){const t=ls(e);if(!t.apiKey)return`${Ya(t.baseUrl)}:anonymous`;let n=0;for(const r of t.apiKey)n=n*31+r.charCodeAt(0)>>>0;return`${Ya(t.baseUrl)}:${n.toString(16)}`}function us(e){const t=ls(e);return{settings:t,resolvedBaseUrl:Ya(t.baseUrl),cacheKey:KN(t),hasSavedSettings:t.apiKey.length>0}}function QN({open:e,onOpenChange:t,settings:n,resolvedBaseUrl:r,onSave:o,onClear:s}){const[i,a]=f.useState(n);f.useEffect(()=>{e&&a(n)},[e,n]);const l=UN(i.baseUrl),u=i.apiKey.trim().length>0&&!l,d=Ya(i.baseUrl);return g.jsx(Zy,{open:e,onOpenChange:t,children:g.jsxs(kf,{className:"max-w-3xl bg-background",children:[g.jsxs(Nf,{className:"relative",children:[g.jsx(Pf,{children:"Connection Settings"}),g.jsx(n0,{children:"Your API key is stored locally in this browser. A blank base URL uses the default OpenAI API."}),g.jsx(Jy,{asChild:!0,children:g.jsx(Ve,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-8 w-8","aria-label":"Close",children:g.jsx(mf,{className:"h-4 w-4"})})})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ct,{htmlFor:"api-key",children:"API key"}),g.jsx(Ga,{id:"api-key",autoComplete:"off",placeholder:"sk-...",type:"password",value:i.apiKey,onChange:c=>a(y=>({...y,apiKey:c.target.value}))})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ct,{htmlFor:"base-url",children:"Base URL"}),g.jsx(Ga,{id:"base-url",autoComplete:"off",placeholder:"https://api.openai.com/v1",value:i.baseUrl,onChange:c=>a(y=>({...y,baseUrl:c.target.value}))}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Resolved API base: ",d||r]}),l?g.jsx("p",{className:"text-xs text-destructive",children:l}):null]})]}),g.jsxs(t0,{className:"gap-2",children:[g.jsx(Ve,{type:"button",variant:"outline",onClick:()=>{s(),t(!1)},children:"Clear"}),g.jsx(Ve,{type:"button",disabled:!u,onClick:()=>{o(i),t(!1)},children:"Save"})]})]})})}function qa(e,[t,n]){return Math.min(n,Math.max(t,e))}function s0(e){const t=e+"CollectionProvider",[n,r]=yr(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:S,children:v}=h,m=I.useRef(null),x=I.useRef(new Map).current;return g.jsx(o,{scope:S,itemMap:x,collectionRef:m,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=mi(a),u=I.forwardRef((h,S)=>{const{scope:v,children:m}=h,x=s(a,v),b=le(S,x.collectionRef);return g.jsx(l,{ref:b,children:m})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",y=mi(d),p=I.forwardRef((h,S)=>{const{scope:v,children:m,...x}=h,b=I.useRef(null),C=le(S,b),k=s(d,v);return I.useEffect(()=>(k.itemMap.set(b,{ref:b,...x}),()=>void k.itemMap.delete(b))),g.jsx(y,{[c]:"",ref:C,children:m})});p.displayName=d;function w(h){const S=s(e+"CollectionConsumer",h);return I.useCallback(()=>{const m=S.collectionRef.current;if(!m)return[];const x=Array.from(m.querySelectorAll(`[${c}]`));return Array.from(S.itemMap.values()).sort((k,N)=>x.indexOf(k.ref.current)-x.indexOf(N.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},w,r]}var GN=f.createContext(void 0);function i0(e){const t=f.useContext(GN);return e||t||"ltr"}const YN=["top","right","bottom","left"],pr=Math.min,mt=Math.max,Xa=Math.round,na=Math.floor,an=e=>({x:e,y:e}),qN={left:"right",right:"left",bottom:"top",top:"bottom"};function Yc(e,t,n){return mt(e,pr(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function kn(e){return e.split("-")[0]}function cs(e){return e.split("-")[1]}function Tf(e){return e==="x"?"y":"x"}function _f(e){return e==="y"?"height":"width"}function rn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jf(e){return Tf(rn(e))}function XN(e,t,n){n===void 0&&(n=!1);const r=cs(e),o=jf(e),s=_f(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Za(i)),[i,Za(i)]}function ZN(e){const t=Za(e);return[qc(e),t,qc(t)]}function qc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gh=["left","right"],Yh=["right","left"],JN=["top","bottom"],eP=["bottom","top"];function tP(e,t,n){switch(e){case"top":case"bottom":return n?t?Yh:Gh:t?Gh:Yh;case"left":case"right":return t?JN:eP;default:return[]}}function nP(e,t,n,r){const o=cs(e);let s=tP(kn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(qc)))),s}function Za(e){const t=kn(e);return qN[t]+e.slice(t.length)}function rP(e){return{top:0,right:0,bottom:0,left:0,...e}}function a0(e){return typeof e!="number"?rP(e):{top:e,right:e,bottom:e,left:e}}function Ja(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function qh(e,t,n){let{reference:r,floating:o}=e;const s=rn(t),i=jf(t),a=_f(i),l=kn(t),u=s==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,y=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-o.width,y:c};break;default:p={x:r.x,y:r.y}}switch(cs(t)){case"start":p[i]-=y*(n&&u?-1:1);break;case"end":p[i]+=y*(n&&u?-1:1);break}return p}async function oP(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:y=!1,padding:p=0}=En(t,e),w=a0(p),S=a[y?c==="floating"?"reference":"floating":c],v=Ja(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),m=c==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Ja(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:x,strategy:l}):m);return{top:(v.top-C.top+w.top)/b.y,bottom:(C.bottom-v.bottom+w.bottom)/b.y,left:(v.left-C.left+w.left)/b.x,right:(C.right-v.right+w.right)/b.x}}const sP=50,iP=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:oP},l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=qh(u,r,l),y=r,p=0;const w={};for(let h=0;h<s.length;h++){const S=s[h];if(!S)continue;const{name:v,fn:m}=S,{x,y:b,data:C,reset:k}=await m({x:d,y:c,initialPlacement:r,placement:y,strategy:o,middlewareData:w,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,c=b??c,w[v]={...w[v],...C},k&&p<sP&&(p++,typeof k=="object"&&(k.placement&&(y=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:c}=qh(u,y,l)),h=-1)}return{x:d,y:c,placement:y,strategy:o,middlewareData:w}},aP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=En(e,t)||{};if(u==null)return{};const c=a0(d),y={x:n,y:r},p=jf(o),w=_f(p),h=await i.getDimensions(u),S=p==="y",v=S?"top":"left",m=S?"bottom":"right",x=S?"clientHeight":"clientWidth",b=s.reference[w]+s.reference[p]-y[p]-s.floating[w],C=y[p]-s.reference[p],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=k?k[x]:0;(!N||!await(i.isElement==null?void 0:i.isElement(k)))&&(N=a.floating[x]||s.floating[w]);const P=b/2-C/2,j=N/2-h[w]/2-1,R=pr(c[v],j),A=pr(c[m],j),M=R,W=N-h[w]-A,U=N/2-h[w]/2+P,Q=Yc(M,U,W),V=!l.arrow&&cs(o)!=null&&U!==Q&&s.reference[w]/2-(U<M?R:A)-h[w]/2<0,H=V?U<M?U-M:U-W:0;return{[p]:y[p]+H,data:{[p]:Q,centerOffset:U-Q-H,...V&&{alignmentOffset:H}},reset:V}}}),lP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:y,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...S}=En(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=kn(o),m=rn(a),x=kn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=y||(x||!h?[Za(a)]:ZN(a)),k=w!=="none";!y&&k&&C.push(...nP(a,h,w,b));const N=[a,...C],P=await l.detectOverflow(t,S),j=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&j.push(P[v]),c){const U=XN(o,i,b);j.push(P[U[0]],P[U[1]])}if(R=[...R,{placement:o,overflows:j}],!j.every(U=>U<=0)){var A,M;const U=(((A=s.flip)==null?void 0:A.index)||0)+1,Q=N[U];if(Q&&(!(c==="alignment"?m!==rn(Q):!1)||R.every(T=>rn(T.placement)===m?T.overflows[0]>0:!0)))return{data:{index:U,overflows:R},reset:{placement:Q}};let V=(M=R.filter(H=>H.overflows[0]<=0).sort((H,T)=>H.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!V)switch(p){case"bestFit":{var W;const H=(W=R.filter(T=>{if(k){const _=rn(T.placement);return _===m||_==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(_=>_>0).reduce((_,F)=>_+F,0)]).sort((T,_)=>T[1]-_[1])[0])==null?void 0:W[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function Xh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zh(e){return YN.some(t=>e[t]>=0)}const uP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=En(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Xh(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Zh(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Xh(i,n.floating);return{data:{escapedOffsets:a,escaped:Zh(a)}}}default:return{}}}}},l0=new Set(["left","top"]);async function cP(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=kn(n),a=cs(n),l=rn(n)==="y",u=l0.has(i)?-1:1,d=s&&l?-1:1,c=En(t,e);let{mainAxis:y,crossAxis:p,alignmentAxis:w}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*d,y:y*u}:{x:y*u,y:p*d}}const dP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await cP(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},fP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:m,y:x}=v;return{x:m,y:x}}},...u}=En(e,t),d={x:n,y:r},c=await s.detectOverflow(t,u),y=rn(kn(o)),p=Tf(y);let w=d[p],h=d[y];if(i){const v=p==="y"?"top":"left",m=p==="y"?"bottom":"right",x=w+c[v],b=w-c[m];w=Yc(x,w,b)}if(a){const v=y==="y"?"top":"left",m=y==="y"?"bottom":"right",x=h+c[v],b=h-c[m];h=Yc(x,h,b)}const S=l.fn({...t,[p]:w,[y]:h});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[p]:i,[y]:a}}}}}},pP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=En(e,t),d={x:n,y:r},c=rn(o),y=Tf(c);let p=d[y],w=d[c];const h=En(a,t),S=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const x=y==="y"?"height":"width",b=s.reference[y]-s.floating[x]+S.mainAxis,C=s.reference[y]+s.reference[x]-S.mainAxis;p<b?p=b:p>C&&(p=C)}if(u){var v,m;const x=y==="y"?"width":"height",b=l0.has(kn(o)),C=s.reference[c]-s.floating[x]+(b&&((v=i.offset)==null?void 0:v[c])||0)+(b?0:S.crossAxis),k=s.reference[c]+s.reference[x]+(b?0:((m=i.offset)==null?void 0:m[c])||0)-(b?S.crossAxis:0);w<C?w=C:w>k&&(w=k)}return{[y]:p,[c]:w}}}},hP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=En(e,t),d=await i.detectOverflow(t,u),c=kn(o),y=cs(o),p=rn(o)==="y",{width:w,height:h}=s.floating;let S,v;c==="top"||c==="bottom"?(S=c,v=y===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=c,S=y==="end"?"top":"bottom");const m=h-d.top-d.bottom,x=w-d.left-d.right,b=pr(h-d[S],m),C=pr(w-d[v],x),k=!t.middlewareData.shift;let N=b,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=m),k&&!y){const R=mt(d.left,0),A=mt(d.right,0),M=mt(d.top,0),W=mt(d.bottom,0);p?P=w-2*(R!==0||A!==0?R+A:mt(d.left,d.right)):N=h-2*(M!==0||W!==0?M+W:mt(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:N});const j=await i.getDimensions(a.floating);return w!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}};function Nl(){return typeof window<"u"}function ds(e){return u0(e)?(e.nodeName||"").toLowerCase():"#document"}function yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ln(e){var t;return(t=(u0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function u0(e){return Nl()?e instanceof Node||e instanceof yt(e).Node:!1}function Kt(e){return Nl()?e instanceof Element||e instanceof yt(e).Element:!1}function Pn(e){return Nl()?e instanceof HTMLElement||e instanceof yt(e).HTMLElement:!1}function Jh(e){return!Nl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yt(e).ShadowRoot}function Ti(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function mP(e){return/^(table|td|th)$/.test(ds(e))}function Pl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gP=/transform|translate|scale|rotate|perspective|filter/,vP=/paint|layout|strict|content/,br=e=>!!e&&e!=="none";let ku;function Mf(e){const t=Kt(e)?Qt(e):e;return br(t.transform)||br(t.translate)||br(t.scale)||br(t.rotate)||br(t.perspective)||!Of()&&(br(t.backdropFilter)||br(t.filter))||gP.test(t.willChange||"")||vP.test(t.contain||"")}function yP(e){let t=hr(e);for(;Pn(t)&&!Jo(t);){if(Mf(t))return t;if(Pl(t))return null;t=hr(t)}return null}function Of(){return ku==null&&(ku=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ku}function Jo(e){return/^(html|body|#document)$/.test(ds(e))}function Qt(e){return yt(e).getComputedStyle(e)}function Rl(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(ds(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jh(e)&&e.host||ln(e);return Jh(t)?t.host:t}function c0(e){const t=hr(e);return Jo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pn(t)&&Ti(t)?t:c0(t)}function gi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=c0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=yt(o);if(s){const a=Xc(i);return t.concat(i,i.visualViewport||[],Ti(o)?o:[],a&&n?gi(a):[])}else return t.concat(o,gi(o,[],n))}function Xc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function d0(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Xa(n)!==s||Xa(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Af(e){return Kt(e)?e:e.contextElement}function Oo(e){const t=Af(e);if(!Pn(t))return an(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=d0(t);let i=(s?Xa(n.width):n.width)/r,a=(s?Xa(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const xP=an(0);function f0(e){const t=yt(e);return!Of()||!t.visualViewport?xP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yt(e)?!1:t}function qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Af(e);let i=an(1);t&&(r?Kt(r)&&(i=Oo(r)):i=Oo(e));const a=wP(s,n,r)?f0(s):an(0);let l=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,c=o.height/i.y;if(s){const y=yt(s),p=r&&Kt(r)?yt(r):r;let w=y,h=Xc(w);for(;h&&r&&p!==w;){const S=Oo(h),v=h.getBoundingClientRect(),m=Qt(h),x=v.left+(h.clientLeft+parseFloat(m.paddingLeft))*S.x,b=v.top+(h.clientTop+parseFloat(m.paddingTop))*S.y;l*=S.x,u*=S.y,d*=S.x,c*=S.y,l+=x,u+=b,w=yt(h),h=Xc(w)}}return Ja({width:d,height:c,x:l,y:u})}function Tl(e,t){const n=Rl(e).scrollLeft;return t?t.left+n:qr(ln(e)).left+n}function p0(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function SP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ln(r),a=t?Pl(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=an(1);const d=an(0),c=Pn(r);if((c||!c&&!s)&&((ds(r)!=="body"||Ti(i))&&(l=Rl(r)),c)){const p=qr(r);u=Oo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const y=i&&!c&&!s?p0(i,l):an(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+y.x,y:n.y*u.y-l.scrollTop*u.y+d.y+y.y}}function bP(e){return Array.from(e.getClientRects())}function CP(e){const t=ln(e),n=Rl(e),r=e.ownerDocument.body,o=mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Tl(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(i+=mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const em=25;function EP(e,t){const n=yt(e),r=ln(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=Of();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Tl(r);if(u<=0){const d=r.ownerDocument,c=d.body,y=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,w=Math.abs(r.clientWidth-c.clientWidth-p);w<=em&&(s-=w)}else u<=em&&(s+=u);return{width:s,height:i,x:a,y:l}}function kP(e,t){const n=qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Pn(e)?Oo(e):an(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:a,x:l,y:u}}function tm(e,t,n){let r;if(t==="viewport")r=EP(e,n);else if(t==="document")r=CP(ln(e));else if(Kt(t))r=kP(t,n);else{const o=f0(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ja(r)}function h0(e,t){const n=hr(e);return n===t||!Kt(n)||Jo(n)?!1:Qt(n).position==="fixed"||h0(n,t)}function NP(e,t){const n=t.get(e);if(n)return n;let r=gi(e,[],!1).filter(a=>Kt(a)&&ds(a)!=="body"),o=null;const s=Qt(e).position==="fixed";let i=s?hr(e):e;for(;Kt(i)&&!Jo(i);){const a=Qt(i),l=Mf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ti(i)&&!l&&h0(e,i))?r=r.filter(d=>d!==i):o=a,i=hr(i)}return t.set(e,r),r}function PP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pl(t)?[]:NP(t,this._c):[].concat(n),r],a=tm(t,i[0],o);let l=a.top,u=a.right,d=a.bottom,c=a.left;for(let y=1;y<i.length;y++){const p=tm(t,i[y],o);l=mt(p.top,l),u=pr(p.right,u),d=pr(p.bottom,d),c=mt(p.left,c)}return{width:u-c,height:d-l,x:c,y:l}}function RP(e){const{width:t,height:n}=d0(e);return{width:t,height:n}}function TP(e,t,n){const r=Pn(t),o=ln(t),s=n==="fixed",i=qr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=an(0);function u(){l.x=Tl(o)}if(r||!r&&!s)if((ds(t)!=="body"||Ti(o))&&(a=Rl(t)),r){const p=qr(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?p0(o,a):an(0),c=i.left+a.scrollLeft-l.x-d.x,y=i.top+a.scrollTop-l.y-d.y;return{x:c,y,width:i.width,height:i.height}}function Nu(e){return Qt(e).position==="static"}function nm(e,t){if(!Pn(e)||Qt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ln(e)===n&&(n=n.ownerDocument.body),n}function m0(e,t){const n=yt(e);if(Pl(e))return n;if(!Pn(e)){let o=hr(e);for(;o&&!Jo(o);){if(Kt(o)&&!Nu(o))return o;o=hr(o)}return n}let r=nm(e,t);for(;r&&mP(r)&&Nu(r);)r=nm(r,t);return r&&Jo(r)&&Nu(r)&&!Mf(r)?n:r||yP(e)||n}const _P=async function(e){const t=this.getOffsetParent||m0,n=this.getDimensions,r=await n(e.floating);return{reference:TP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jP(e){return Qt(e).direction==="rtl"}const MP={convertOffsetParentRelativeRectToViewportRelativeRect:SP,getDocumentElement:ln,getClippingRect:PP,getOffsetParent:m0,getElementRects:_P,getClientRects:bP,getDimensions:RP,getScale:Oo,isElement:Kt,isRTL:jP};function g0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function OP(e,t){let n=null,r;const o=ln(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:c,width:y,height:p}=u;if(a||t(),!y||!p)return;const w=na(c),h=na(o.clientWidth-(d+y)),S=na(o.clientHeight-(c+p)),v=na(d),x={rootMargin:-w+"px "+-h+"px "+-S+"px "+-v+"px",threshold:mt(0,pr(1,l))||1};let b=!0;function C(k){const N=k[0].intersectionRatio;if(N!==l){if(!b)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!g0(u,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return i(!0),s}function AP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Af(e),d=o||s?[...u?gi(u):[],...t?gi(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const c=u&&a?OP(u,n):null;let y=-1,p=null;i&&(p=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let w,h=l?qr(e):null;l&&S();function S(){const v=qr(e);h&&!g0(h,v)&&n(),h=v,w=requestAnimationFrame(S)}return n(),()=>{var v;d.forEach(m=>{o&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),c==null||c(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const IP=dP,LP=fP,DP=lP,FP=hP,zP=uP,rm=aP,$P=pP,BP=(e,t,n)=>{const r=new Map,o={platform:MP,...n},s={...o.platform,_c:r};return iP(e,t,{...o,platform:s})};var UP=typeof document<"u",VP=function(){},ya=UP?f.useLayoutEffect:VP;function el(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!el(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!el(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function v0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function om(e,t){const n=v0(e);return Math.round(t*n)/n}function Pu(e){const t=f.useRef(e);return ya(()=>{t.current=e}),t}function WP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,p]=f.useState(r);el(y,r)||p(r);const[w,h]=f.useState(null),[S,v]=f.useState(null),m=f.useCallback(T=>{T!==k.current&&(k.current=T,h(T))},[]),x=f.useCallback(T=>{T!==N.current&&(N.current=T,v(T))},[]),b=s||w,C=i||S,k=f.useRef(null),N=f.useRef(null),P=f.useRef(d),j=l!=null,R=Pu(l),A=Pu(o),M=Pu(u),W=f.useCallback(()=>{if(!k.current||!N.current)return;const T={placement:t,strategy:n,middleware:y};A.current&&(T.platform=A.current),BP(k.current,N.current,T).then(_=>{const F={..._,isPositioned:M.current!==!1};U.current&&!el(P.current,F)&&(P.current=F,no.flushSync(()=>{c(F)}))})},[y,t,n,A,M]);ya(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,c(T=>({...T,isPositioned:!1})))},[u]);const U=f.useRef(!1);ya(()=>(U.current=!0,()=>{U.current=!1}),[]),ya(()=>{if(b&&(k.current=b),C&&(N.current=C),b&&C){if(R.current)return R.current(b,C,W);W()}},[b,C,W,R,j]);const Q=f.useMemo(()=>({reference:k,floating:N,setReference:m,setFloating:x}),[m,x]),V=f.useMemo(()=>({reference:b,floating:C}),[b,C]),H=f.useMemo(()=>{const T={position:n,left:0,top:0};if(!V.floating)return T;const _=om(V.floating,d.x),F=om(V.floating,d.y);return a?{...T,transform:"translate("+_+"px, "+F+"px)",...v0(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:F}},[n,a,V.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:W,refs:Q,elements:V,floatingStyles:H}),[d,W,Q,V,H])}const HP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?rm({element:r.current,padding:o}).fn(n):{}:r?rm({element:r,padding:o}).fn(n):{}}}},KP=(e,t)=>{const n=IP(e);return{name:n.name,fn:n.fn,options:[e,t]}},QP=(e,t)=>{const n=LP(e);return{name:n.name,fn:n.fn,options:[e,t]}},GP=(e,t)=>({fn:$P(e).fn,options:[e,t]}),YP=(e,t)=>{const n=DP(e);return{name:n.name,fn:n.fn,options:[e,t]}},qP=(e,t)=>{const n=FP(e);return{name:n.name,fn:n.fn,options:[e,t]}},XP=(e,t)=>{const n=zP(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZP=(e,t)=>{const n=HP(e);return{name:n.name,fn:n.fn,options:[e,t]}};var JP="Arrow",y0=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return g.jsx(ne.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});y0.displayName=JP;var e2=y0;function If(e){const[t,n]=f.useState(void 0);return Ke(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Lf="Popper",[x0,_l]=yr(Lf),[t2,w0]=x0(Lf),S0=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return g.jsx(t2,{scope:t,anchor:r,onAnchorChange:o,children:n})};S0.displayName=Lf;var b0="PopperAnchor",C0=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=w0(b0,n),i=f.useRef(null),a=le(t,i),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||i.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:g.jsx(ne.div,{...o,ref:a})});C0.displayName=b0;var Df="PopperContent",[n2,r2]=x0(Df),E0=f.forwardRef((e,t)=>{var D,ue,he,se,X,J;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:y=!1,updatePositionStrategy:p="optimized",onPlaced:w,...h}=e,S=w0(Df,n),[v,m]=f.useState(null),x=le(t,Ce=>m(Ce)),[b,C]=f.useState(null),k=If(b),N=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,j=r+(s!=="center"?"-"+s:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},A=Array.isArray(u)?u:[u],M=A.length>0,W={padding:R,boundary:A.filter(s2),altBoundary:M},{refs:U,floatingStyles:Q,placement:V,isPositioned:H,middlewareData:T}=WP({strategy:"fixed",placement:j,whileElementsMounted:(...Ce)=>AP(...Ce,{animationFrame:p==="always"}),elements:{reference:S.anchor},middleware:[KP({mainAxis:o+P,alignmentAxis:i}),l&&QP({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?GP():void 0,...W}),l&&YP({...W}),qP({...W,apply:({elements:Ce,rects:$e,availableWidth:ft,availableHeight:jt})=>{const{width:Mt,height:un}=$e.reference,Rn=Ce.floating.style;Rn.setProperty("--radix-popper-available-width",`${ft}px`),Rn.setProperty("--radix-popper-available-height",`${jt}px`),Rn.setProperty("--radix-popper-anchor-width",`${Mt}px`),Rn.setProperty("--radix-popper-anchor-height",`${un}px`)}}),b&&ZP({element:b,padding:a}),i2({arrowWidth:N,arrowHeight:P}),y&&XP({strategy:"referenceHidden",...W})]}),[_,F]=P0(V),B=Gr(w);Ke(()=>{H&&(B==null||B())},[H,B]);const L=(D=T.arrow)==null?void 0:D.x,Y=(ue=T.arrow)==null?void 0:ue.y,G=((he=T.arrow)==null?void 0:he.centerOffset)!==0,[ie,we]=f.useState();return Ke(()=>{v&&we(window.getComputedStyle(v).zIndex)},[v]),g.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:H?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(se=T.transformOrigin)==null?void 0:se.x,(X=T.transformOrigin)==null?void 0:X.y].join(" "),...((J=T.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(n2,{scope:n,placedSide:_,onArrowChange:C,arrowX:L,arrowY:Y,shouldHideArrow:G,children:g.jsx(ne.div,{"data-side":_,"data-align":F,...h,ref:x,style:{...h.style,animation:H?void 0:"none"}})})})});E0.displayName=Df;var k0="PopperArrow",o2={top:"bottom",right:"left",bottom:"top",left:"right"},N0=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=r2(k0,r),i=o2[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(e2,{...o,ref:n,style:{...o.style,display:"block"}})})});N0.displayName=k0;function s2(e){return e!==null}var i2=e=>({name:"transformOrigin",options:e,fn(t){var S,v,m;const{placement:n,rects:r,middlewareData:o}=t,i=((S=o.arrow)==null?void 0:S.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=P0(n),c={start:"0%",center:"50%",end:"100%"}[d],y=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,p=(((m=o.arrow)==null?void 0:m.y)??0)+l/2;let w="",h="";return u==="bottom"?(w=i?c:`${y}px`,h=`${-l}px`):u==="top"?(w=i?c:`${y}px`,h=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,h=i?c:`${p}px`):u==="left"&&(w=`${r.floating.width+l}px`,h=i?c:`${p}px`),{data:{x:w,y:h}}}});function P0(e){const[t,n="center"]=e.split("-");return[t,n]}var R0=S0,T0=C0,_0=E0,j0=N0;function Ff(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var M0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a2="VisuallyHidden",O0=f.forwardRef((e,t)=>g.jsx(ne.span,{...e,ref:t,style:{...M0,...e.style}}));O0.displayName=a2;var l2=O0,u2=[" ","Enter","ArrowUp","ArrowDown"],c2=[" ","Enter"],Xr="Select",[jl,Ml,d2]=s0(Xr),[fs]=yr(Xr,[d2,_l]),Ol=_l(),[f2,xr]=fs(Xr),[p2,h2]=fs(Xr),A0=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:c,disabled:y,required:p,form:w}=e,h=Ol(t),[S,v]=f.useState(null),[m,x]=f.useState(null),[b,C]=f.useState(!1),k=i0(u),[N,P]=Qr({prop:r,defaultProp:o??!1,onChange:s,caller:Xr}),[j,R]=Qr({prop:i,defaultProp:a,onChange:l,caller:Xr}),A=f.useRef(null),M=S?w||!!S.closest("form"):!0,[W,U]=f.useState(new Set),Q=Array.from(W).map(V=>V.props.value).join(";");return g.jsx(R0,{...h,children:g.jsxs(f2,{required:p,scope:t,trigger:S,onTriggerChange:v,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:C,contentId:cr(),value:j,onValueChange:R,open:N,onOpenChange:P,dir:k,triggerPointerDownPosRef:A,disabled:y,children:[g.jsx(jl.Provider,{scope:t,children:g.jsx(p2,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(V=>{U(H=>new Set(H).add(V))},[]),onNativeOptionRemove:f.useCallback(V=>{U(H=>{const T=new Set(H);return T.delete(V),T})},[]),children:n})}),M?g.jsxs(ox,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:c,value:j,onChange:V=>R(V.target.value),disabled:y,form:w,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from(W)]},Q):null]})})};A0.displayName=Xr;var I0="SelectTrigger",L0=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ol(n),i=xr(I0,n),a=i.disabled||r,l=le(t,i.onTriggerChange),u=Ml(n),d=f.useRef("touch"),[c,y,p]=ix(h=>{const S=u().filter(x=>!x.disabled),v=S.find(x=>x.value===i.value),m=ax(S,h,v);m!==void 0&&i.onValueChange(m.value)}),w=h=>{a||(i.onOpenChange(!0),p()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return g.jsx(T0,{asChild:!0,...s,children:g.jsx(ne.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":sx(i.value)?"":void 0,...o,ref:l,onClick:ee(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:ee(o.onPointerDown,h=>{d.current=h.pointerType;const S=h.target;S.hasPointerCapture(h.pointerId)&&S.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:ee(o.onKeyDown,h=>{const S=c.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&y(h.key),!(S&&h.key===" ")&&u2.includes(h.key)&&(w(),h.preventDefault())})})})});L0.displayName=I0;var D0="SelectValue",F0=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=xr(D0,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,c=le(t,l.onValueNodeChange);return Ke(()=>{u(d)},[u,d]),g.jsx(ne.span,{...a,ref:c,style:{pointerEvents:"none"},children:sx(l.value)?g.jsx(g.Fragment,{children:i}):s})});F0.displayName=D0;var m2="SelectIcon",z0=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});z0.displayName=m2;var g2="SelectPortal",$0=e=>g.jsx(wf,{asChild:!0,...e});$0.displayName=g2;var Zr="SelectContent",B0=f.forwardRef((e,t)=>{const n=xr(Zr,e.__scopeSelect),[r,o]=f.useState();if(Ke(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?no.createPortal(g.jsx(U0,{scope:e.__scopeSelect,children:g.jsx(jl.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(V0,{...e,ref:t})});B0.displayName=Zr;var Ft=10,[U0,wr]=fs(Zr),v2="SelectContentImpl",y2=mi("SelectContent.RemoveScroll"),V0=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:c,collisionBoundary:y,collisionPadding:p,sticky:w,hideWhenDetached:h,avoidCollisions:S,...v}=e,m=xr(Zr,n),[x,b]=f.useState(null),[C,k]=f.useState(null),N=le(t,D=>b(D)),[P,j]=f.useState(null),[R,A]=f.useState(null),M=Ml(n),[W,U]=f.useState(!1),Q=f.useRef(!1);f.useEffect(()=>{if(x)return My(x)},[x]),Cy();const V=f.useCallback(D=>{const[ue,...he]=M().map(J=>J.ref.current),[se]=he.slice(-1),X=document.activeElement;for(const J of D)if(J===X||(J==null||J.scrollIntoView({block:"nearest"}),J===ue&&C&&(C.scrollTop=0),J===se&&C&&(C.scrollTop=C.scrollHeight),J==null||J.focus(),document.activeElement!==X))return},[M,C]),H=f.useCallback(()=>V([P,x]),[V,P,x]);f.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:T,triggerPointerDownPosRef:_}=m;f.useEffect(()=>{if(x){let D={x:0,y:0};const ue=se=>{var X,J;D={x:Math.abs(Math.round(se.pageX)-(((X=_.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(se.pageY)-(((J=_.current)==null?void 0:J.y)??0))}},he=se=>{D.x<=10&&D.y<=10?se.preventDefault():x.contains(se.target)||T(!1),document.removeEventListener("pointermove",ue),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",he,{capture:!0})}}},[x,T,_]),f.useEffect(()=>{const D=()=>T(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[T]);const[F,B]=ix(D=>{const ue=M().filter(X=>!X.disabled),he=ue.find(X=>X.ref.current===document.activeElement),se=ax(ue,D,he);se&&setTimeout(()=>se.ref.current.focus())}),L=f.useCallback((D,ue,he)=>{const se=!Q.current&&!he;(m.value!==void 0&&m.value===ue||se)&&(j(D),se&&(Q.current=!0))},[m.value]),Y=f.useCallback(()=>x==null?void 0:x.focus(),[x]),G=f.useCallback((D,ue,he)=>{const se=!Q.current&&!he;(m.value!==void 0&&m.value===ue||se)&&A(D)},[m.value]),ie=r==="popper"?Zc:W0,we=ie===Zc?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:c,collisionBoundary:y,collisionPadding:p,sticky:w,hideWhenDetached:h,avoidCollisions:S}:{};return g.jsx(U0,{scope:n,content:x,viewport:C,onViewportChange:k,itemRefCallback:L,selectedItem:P,onItemLeave:Y,itemTextRefCallback:G,focusSelectedItem:H,selectedItemText:R,position:r,isPositioned:W,searchRef:F,children:g.jsx(Sf,{as:y2,allowPinchZoom:!0,children:g.jsx(xf,{asChild:!0,trapped:m.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:ee(o,D=>{var ue;(ue=m.trigger)==null||ue.focus({preventScroll:!0}),D.preventDefault()}),children:g.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:g.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:D=>D.preventDefault(),...v,...we,onPlaced:()=>U(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ee(v.onKeyDown,D=>{const ue=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!ue&&D.key.length===1&&B(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let se=M().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(D.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const X=D.target,J=se.indexOf(X);se=se.slice(J+1)}setTimeout(()=>V(se)),D.preventDefault()}})})})})})})});V0.displayName=v2;var x2="SelectItemAlignedPosition",W0=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=xr(Zr,n),i=wr(Zr,n),[a,l]=f.useState(null),[u,d]=f.useState(null),c=le(t,N=>d(N)),y=Ml(n),p=f.useRef(!1),w=f.useRef(!0),{viewport:h,selectedItem:S,selectedItemText:v,focusSelectedItem:m}=i,x=f.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&h&&S&&v){const N=s.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),R=v.getBoundingClientRect();if(s.dir!=="rtl"){const X=R.left-P.left,J=j.left-X,Ce=N.left-J,$e=N.width+Ce,ft=Math.max($e,P.width),jt=window.innerWidth-Ft,Mt=qa(J,[Ft,Math.max(Ft,jt-ft)]);a.style.minWidth=$e+"px",a.style.left=Mt+"px"}else{const X=P.right-R.right,J=window.innerWidth-j.right-X,Ce=window.innerWidth-N.right-J,$e=N.width+Ce,ft=Math.max($e,P.width),jt=window.innerWidth-Ft,Mt=qa(J,[Ft,Math.max(Ft,jt-ft)]);a.style.minWidth=$e+"px",a.style.right=Mt+"px"}const A=y(),M=window.innerHeight-Ft*2,W=h.scrollHeight,U=window.getComputedStyle(u),Q=parseInt(U.borderTopWidth,10),V=parseInt(U.paddingTop,10),H=parseInt(U.borderBottomWidth,10),T=parseInt(U.paddingBottom,10),_=Q+V+W+T+H,F=Math.min(S.offsetHeight*5,_),B=window.getComputedStyle(h),L=parseInt(B.paddingTop,10),Y=parseInt(B.paddingBottom,10),G=N.top+N.height/2-Ft,ie=M-G,we=S.offsetHeight/2,D=S.offsetTop+we,ue=Q+V+D,he=_-ue;if(ue<=G){const X=A.length>0&&S===A[A.length-1].ref.current;a.style.bottom="0px";const J=u.clientHeight-h.offsetTop-h.offsetHeight,Ce=Math.max(ie,we+(X?Y:0)+J+H),$e=ue+Ce;a.style.height=$e+"px"}else{const X=A.length>0&&S===A[0].ref.current;a.style.top="0px";const Ce=Math.max(G,Q+h.offsetTop+(X?L:0)+we)+he;a.style.height=Ce+"px",h.scrollTop=ue-G+h.offsetTop}a.style.margin=`${Ft}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[y,s.trigger,s.valueNode,a,u,h,S,v,s.dir,r]);Ke(()=>x(),[x]);const[b,C]=f.useState();Ke(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const k=f.useCallback(N=>{N&&w.current===!0&&(x(),m==null||m(),w.current=!1)},[x,m]);return g.jsx(S2,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:k,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:g.jsx(ne.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});W0.displayName=x2;var w2="SelectPopperPosition",Zc=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ft,...s}=e,i=Ol(n);return g.jsx(_0,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Zc.displayName=w2;var[S2,zf]=fs(Zr,{}),Jc="SelectViewport",H0=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=wr(Jc,n),i=zf(Jc,n),a=le(t,s.onViewportChange),l=f.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(jl.Slot,{scope:n,children:g.jsx(ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:y}=i;if(y!=null&&y.current&&c){const p=Math.abs(l.current-d.scrollTop);if(p>0){const w=window.innerHeight-Ft*2,h=parseFloat(c.style.minHeight),S=parseFloat(c.style.height),v=Math.max(h,S);if(v<w){const m=v+p,x=Math.min(w,m),b=m-x;c.style.height=x+"px",c.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,c.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});H0.displayName=Jc;var K0="SelectGroup",[b2,C2]=fs(K0),E2=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cr();return g.jsx(b2,{scope:n,id:o,children:g.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});E2.displayName=K0;var Q0="SelectLabel",G0=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=C2(Q0,n);return g.jsx(ne.div,{id:o.id,...r,ref:t})});G0.displayName=Q0;var tl="SelectItem",[k2,Y0]=fs(tl),q0=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=xr(tl,n),l=wr(tl,n),u=a.value===r,[d,c]=f.useState(s??""),[y,p]=f.useState(!1),w=le(t,m=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,m,r,o)}),h=cr(),S=f.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(k2,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:f.useCallback(m=>{c(x=>x||((m==null?void 0:m.textContent)??"").trim())},[]),children:g.jsx(jl.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:g.jsx(ne.div,{role:"option","aria-labelledby":h,"data-highlighted":y?"":void 0,"aria-selected":u&&y,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:w,onFocus:ee(i.onFocus,()=>p(!0)),onBlur:ee(i.onBlur,()=>p(!1)),onClick:ee(i.onClick,()=>{S.current!=="mouse"&&v()}),onPointerUp:ee(i.onPointerUp,()=>{S.current==="mouse"&&v()}),onPointerDown:ee(i.onPointerDown,m=>{S.current=m.pointerType}),onPointerMove:ee(i.onPointerMove,m=>{var x;S.current=m.pointerType,o?(x=l.onItemLeave)==null||x.call(l):S.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,m=>{var x;m.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ee(i.onKeyDown,m=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(c2.includes(m.key)&&v(),m.key===" "&&m.preventDefault())})})})})});q0.displayName=tl;var Ms="SelectItemText",X0=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=xr(Ms,n),a=wr(Ms,n),l=Y0(Ms,n),u=h2(Ms,n),[d,c]=f.useState(null),y=le(t,v=>c(v),l.onItemTextChange,v=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,v,l.value,l.disabled)}),p=d==null?void 0:d.textContent,w=f.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:S}=u;return Ke(()=>(h(w),()=>S(w)),[h,S,w]),g.jsxs(g.Fragment,{children:[g.jsx(ne.span,{id:l.textId,...s,ref:y}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?no.createPortal(s.children,i.valueNode):null]})});X0.displayName=Ms;var Z0="SelectItemIndicator",J0=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Y0(Z0,n).isSelected?g.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});J0.displayName=Z0;var ed="SelectScrollUpButton",ex=f.forwardRef((e,t)=>{const n=wr(ed,e.__scopeSelect),r=zf(ed,e.__scopeSelect),[o,s]=f.useState(!1),i=le(t,r.onScrollButtonChange);return Ke(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(nx,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});ex.displayName=ed;var td="SelectScrollDownButton",tx=f.forwardRef((e,t)=>{const n=wr(td,e.__scopeSelect),r=zf(td,e.__scopeSelect),[o,s]=f.useState(!1),i=le(t,r.onScrollButtonChange);return Ke(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(nx,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});tx.displayName=td;var nx=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=wr("SelectScrollButton",n),i=f.useRef(null),a=Ml(n),l=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Ke(()=>{var d;const u=a().find(c=>c.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),g.jsx(ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{l()})})}),N2="SelectSeparator",rx=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});rx.displayName=N2;var nd="SelectArrow",P2=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ol(n),s=xr(nd,n),i=wr(nd,n);return s.open&&i.position==="popper"?g.jsx(j0,{...o,...r,ref:t}):null});P2.displayName=nd;var R2="SelectBubbleInput",ox=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),s=le(r,o),i=Ff(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const c=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(c)}},[i,t]),g.jsx(ne.select,{...n,style:{...M0,...n.style},ref:s,defaultValue:t})});ox.displayName=R2;function sx(e){return e===""||e===void 0}function ix(e){const t=Gr(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ax(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=T2(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function T2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _2=A0,lx=L0,j2=F0,M2=z0,O2=$0,ux=B0,A2=H0,cx=G0,dx=q0,I2=X0,L2=J0,fx=ex,px=tx,hx=rx;const D2=_2,F2=j2,mx=f.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(lx,{ref:r,className:ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,g.jsx(M2,{asChild:!0,children:g.jsx(pf,{className:"h-4 w-4 opacity-50"})})]}));mx.displayName=lx.displayName;const gx=f.forwardRef(({className:e,...t},n)=>g.jsx(fx,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(PC,{className:"h-4 w-4"})}));gx.displayName=fx.displayName;const vx=f.forwardRef(({className:e,...t},n)=>g.jsx(px,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(pf,{className:"h-4 w-4"})}));vx.displayName=px.displayName;const yx=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>g.jsx(O2,{children:g.jsxs(ux,{ref:o,className:ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[g.jsx(gx,{}),g.jsx(A2,{className:ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),g.jsx(vx,{})]})}));yx.displayName=ux.displayName;const z2=f.forwardRef(({className:e,...t},n)=>g.jsx(cx,{ref:n,className:ce("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));z2.displayName=cx.displayName;const xx=f.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(dx,{ref:r,className:ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",e),...n,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(L2,{children:g.jsx(NC,{className:"h-4 w-4"})})}),g.jsx(I2,{children:t})]}));xx.displayName=dx.displayName;const $2=f.forwardRef(({className:e,...t},n)=>g.jsx(hx,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",e),...t}));$2.displayName=hx.displayName;var wx=["PageUp","PageDown"],Sx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ps="Slider",[rd,B2,U2]=s0(ps),[Cx]=yr(ps,[U2]),[V2,Al]=Cx(ps),Ex=f.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:c=()=>{},onValueCommit:y=()=>{},inverted:p=!1,form:w,...h}=e,S=f.useRef(new Set),v=f.useRef(0),x=i==="horizontal"?W2:H2,[b=[],C]=Qr({prop:d,defaultProp:u,onChange:A=>{var W;(W=[...S.current][v.current])==null||W.focus(),c(A)}}),k=f.useRef(b);function N(A){const M=q2(b,A);R(A,M)}function P(A){R(A,v.current)}function j(){const A=k.current[v.current];b[v.current]!==A&&y(b)}function R(A,M,{commit:W}={commit:!1}){const U=eR(s),Q=tR(Math.round((A-r)/s)*s+r,U),V=qa(Q,[r,o]);C((H=[])=>{const T=G2(H,V,M);if(J2(T,l*s)){v.current=T.indexOf(V);const _=String(T)!==String(H);return _&&W&&y(T),_?T:H}else return H})}return g.jsx(V2,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:v,thumbs:S.current,values:b,orientation:i,form:w,children:g.jsx(rd.Provider,{scope:e.__scopeSlider,children:g.jsx(rd.Slot,{scope:e.__scopeSlider,children:g.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...h,ref:t,onPointerDown:ee(h.onPointerDown,()=>{a||(k.current=b)}),min:r,max:o,inverted:p,onSlideStart:a?void 0:N,onSlideMove:a?void 0:P,onSlideEnd:a?void 0:j,onHomeKeyDown:()=>!a&&R(r,0,{commit:!0}),onEndKeyDown:()=>!a&&R(o,b.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:M})=>{if(!a){const Q=wx.includes(A.key)||A.shiftKey&&Sx.includes(A.key)?10:1,V=v.current,H=b[V],T=s*Q*M;R(H+T,V,{commit:!0})}}})})})})});Ex.displayName=ps;var[kx,Nx]=Cx(ps,{startEdge:"left",endEdge:"right",size:"width",direction:1}),W2=f.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...d}=e,[c,y]=f.useState(null),p=le(t,x=>y(x)),w=f.useRef(void 0),h=i0(o),S=h==="ltr",v=S&&!s||!S&&s;function m(x){const b=w.current||c.getBoundingClientRect(),C=[0,b.width],N=$f(C,v?[n,r]:[r,n]);return w.current=b,N(x-b.left)}return g.jsx(kx,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:g.jsx(Px,{dir:h,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const b=m(x.clientX);i==null||i(b)},onSlideMove:x=>{const b=m(x.clientX);a==null||a(b)},onSlideEnd:()=>{w.current=void 0,l==null||l()},onStepKeyDown:x=>{const C=bx[v?"from-left":"from-right"].includes(x.key);u==null||u({event:x,direction:C?-1:1})}})})}),H2=f.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...u}=e,d=f.useRef(null),c=le(t,d),y=f.useRef(void 0),p=!o;function w(h){const S=y.current||d.current.getBoundingClientRect(),v=[0,S.height],x=$f(v,p?[r,n]:[n,r]);return y.current=S,x(h-S.top)}return g.jsx(kx,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:g.jsx(Px,{"data-orientation":"vertical",...u,ref:c,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const S=w(h.clientY);s==null||s(S)},onSlideMove:h=>{const S=w(h.clientY);i==null||i(S)},onSlideEnd:()=>{y.current=void 0,a==null||a()},onStepKeyDown:h=>{const v=bx[p?"from-bottom":"from-top"].includes(h.key);l==null||l({event:h,direction:v?-1:1})}})})}),Px=f.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...u}=e,d=Al(ps,n);return g.jsx(ne.span,{...u,ref:t,onKeyDown:ee(e.onKeyDown,c=>{c.key==="Home"?(i(c),c.preventDefault()):c.key==="End"?(a(c),c.preventDefault()):wx.concat(Sx).includes(c.key)&&(l(c),c.preventDefault())}),onPointerDown:ee(e.onPointerDown,c=>{const y=c.target;y.setPointerCapture(c.pointerId),c.preventDefault(),d.thumbs.has(y)?y.focus():r(c)}),onPointerMove:ee(e.onPointerMove,c=>{c.target.hasPointerCapture(c.pointerId)&&o(c)}),onPointerUp:ee(e.onPointerUp,c=>{const y=c.target;y.hasPointerCapture(c.pointerId)&&(y.releasePointerCapture(c.pointerId),s(c))})})}),Rx="SliderTrack",Tx=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(Rx,n);return g.jsx(ne.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Tx.displayName=Rx;var od="SliderRange",_x=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Al(od,n),s=Nx(od,n),i=f.useRef(null),a=le(t,i),l=o.values.length,u=o.values.map(y=>Ox(y,o.min,o.max)),d=l>1?Math.min(...u):0,c=100-Math.max(...u);return g.jsx(ne.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:c+"%"}})});_x.displayName=od;var sd="SliderThumb",jx=f.forwardRef((e,t)=>{const n=B2(e.__scopeSlider),[r,o]=f.useState(null),s=le(t,a=>o(a)),i=f.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return g.jsx(K2,{...e,ref:s,index:i})}),K2=f.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=Al(sd,n),a=Nx(sd,n),[l,u]=f.useState(null),d=le(t,m=>u(m)),c=l?i.form||!!l.closest("form"):!0,y=If(l),p=i.values[r],w=p===void 0?0:Ox(p,i.min,i.max),h=Y2(r,i.values.length),S=y==null?void 0:y[a.size],v=S?X2(S,w,a.direction):0;return f.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),g.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${w}% + ${v}px)`},children:[g.jsx(rd.ItemSlot,{scope:e.__scopeSlider,children:g.jsx(ne.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":i.min,"aria-valuenow":p,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:ee(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),c&&g.jsx(Mx,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:p},r)]})});jx.displayName=sd;var Q2="RadioBubbleInput",Mx=f.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=f.useRef(null),s=le(o,r),i=Ff(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const c=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(c)}},[i,t]),g.jsx(ne.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Mx.displayName=Q2;function G2(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Ox(e,t,n){const s=100/(n-t)*(e-t);return qa(s,[0,100])}function Y2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function q2(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function X2(e,t,n){const r=e/2,s=$f([0,50],[0,r]);return(r-s(t)*n)*n}function Z2(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function J2(e,t){if(t>0){const n=Z2(e);return Math.min(...n)>=t}return!0}function $f(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eR(e){return(String(e).split(".")[1]||"").length}function tR(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Ax=Ex,nR=Tx,rR=_x,oR=jx;const kr=f.forwardRef(({className:e,...t},n)=>g.jsxs(Ax,{ref:n,className:ce("relative flex w-full touch-none select-none items-center",e),...t,children:[g.jsx(nR,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:g.jsx(rR,{className:"absolute h-full bg-primary"})}),g.jsx(oR,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));kr.displayName=Ax.displayName;function co(e,t,n){return Math.max(t,Math.min(n,e))}function ra(e){return e.toFixed(2)}function sm(e){return String(Math.round(e))}const fo=e=>e,Bf=[fo({key:"temperature",label:"Temperature",description:"Controls randomness. Higher = more creative, lower = more focused.",min:0,max:2,step:.1,control:"slider",formatValue:ra,normalizeValue:e=>co(e,0,2)}),fo({key:"top_p",label:"Top-p",description:"Limits choices to the most likely words; lower stays safe, higher invites more variety.",min:0,max:1,step:.05,control:"slider",formatValue:ra,normalizeValue:e=>co(e,0,1)}),fo({key:"max_completion_tokens",label:"Max completion tokens",description:"Maximum completion length (capped at 256).",min:1,max:256,step:1,control:"number",formatValue:sm,normalizeValue:e=>Math.round(co(e,1,256))}),fo({key:"top_logprobs",label:"Top alternatives",description:"Number of alternative tokens to show (max 10).",min:1,max:10,step:1,control:"slider",formatValue:sm,normalizeValue:e=>Math.round(co(e,1,10))}),fo({key:"presence_penalty",label:"Presence penalty",description:"Encourage fresh topics. Increase to avoid repeating the same ideas.",min:-2,max:2,step:.1,control:"slider",formatValue:ra,normalizeValue:e=>co(e,-2,2)}),fo({key:"frequency_penalty",label:"Frequency penalty",description:"Rein in repeated words. Higher values cut down on echoing phrases.",min:-2,max:2,step:.1,control:"slider",formatValue:ra,normalizeValue:e=>co(e,-2,2)})],sR=new Map(Bf.map(e=>[e.key,e])),iR=Object.freeze({temperature:.7,top_p:1,max_completion_tokens:128,top_logprobs:5,presence_penalty:0,frequency_penalty:0});function $n(e){return sR.get(e)}function Bn(e,t){return $n(e).normalizeValue(t)}function Ix(e){return{temperature:Bn("temperature",e.temperature),top_p:Bn("top_p",e.top_p),max_completion_tokens:Bn("max_completion_tokens",e.max_completion_tokens),top_logprobs:Bn("top_logprobs",e.top_logprobs),presence_penalty:Bn("presence_penalty",e.presence_penalty),frequency_penalty:Bn("frequency_penalty",e.frequency_penalty)}}function aR(e){const t={...iR};for(const n of Bf){const r=e.get(n.key);if(r===null)continue;const o=Number(r);Number.isFinite(o)&&(t[n.key]=n.normalizeValue(o))}return t}function Ru(e,t,n){const r=new URLSearchParams(e);t?r.set("model",t):r.delete("model");for(const o of Bf)r.set(o.key,o.formatValue(n[o.key]));return r}function im(e,t){return Ix({...e,...t})}const lR=({models:e,selectedModelId:t,onModelChange:n,temperature:r,onTemperatureChange:o,disabled:s=!1,isLoading:i=!1})=>{const a=$n("temperature");return g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs(D2,{disabled:s||i||e.length===0,value:t??void 0,onValueChange:n,children:[g.jsx(mx,{className:"w-40",children:g.jsx(F2,{placeholder:i?"Loading models...":"Select a model"})}),g.jsx(yx,{children:e.map(l=>g.jsx(xx,{value:l.id,children:g.jsx("div",{className:"flex items-center justify-between w-full",children:l.name})},l.id))})]}),g.jsxs("div",{className:"flex items-center gap-3 min-w-[220px]",children:[g.jsx(Ct,{htmlFor:"header-temp",className:"whitespace-nowrap text-xs text-muted-foreground",children:"Temperature"}),g.jsx("div",{className:"flex-1 max-w-[180px]",children:g.jsx(kr,{id:"header-temp",min:a.min,max:a.max,step:a.step,value:[r],disabled:s,onValueChange:([l])=>o(l)})}),g.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-8 text-right",children:Number(a.formatValue(r)).toFixed(1)})]})]})},Tu=256,uR=720,Te={top:16,right:24,bottom:28,left:44};function cR(e){return`hsl(var(--token-${Ka(e).band}))`}function dR(){const e=f.useRef(null),[t,n]=f.useState(uR);return f.useEffect(()=>{const r=e.current;if(!r)return;const o=new ResizeObserver(s=>{var a;const i=(a=s[0])==null?void 0:a.contentRect.width;typeof i=="number"&&i>0&&n(i)});return o.observe(r),()=>o.disconnect()},[]),{ref:e,width:t}}function fR({tokens:e,onTokenClick:t,onTokenHover:n}){const{ref:r,width:o}=dR(),[s,i]=f.useState(null),a=Math.max(o-Te.left-Te.right,1),l=Tu-Te.top-Te.bottom,u=Math.max(e.length-1,1),d=f.useMemo(()=>e.map((h,S)=>({index:S,x:Te.left+a*S/u,y:Te.top+(1-h.prob)*l,prob:h.prob,logprob:h.logprob,token:h.token})),[e,l,a,u]),c=s===null?null:d.find(h=>h.index===s)??null,y=d.map((h,S)=>`${S===0?"M":"L"} ${h.x} ${h.y}`).join(" "),p=[{start:0,end:.25,fill:"hsl(var(--token-low) / 0.12)"},{start:.25,end:.5,fill:"hsl(var(--token-med-low) / 0.12)"},{start:.5,end:.75,fill:"hsl(var(--token-med-high) / 0.12)"},{start:.75,end:1,fill:"hsl(var(--token-high) / 0.12)"}],w=[0,.25,.5,.75,1];return g.jsxs("div",{ref:r,className:"relative h-64 w-full",children:[g.jsxs("svg",{className:"h-full w-full",viewBox:`0 0 ${o} ${Tu}`,role:"group","aria-label":"Token probability chart",onMouseLeave:()=>{i(null),n==null||n(null)},children:[p.map(h=>{const S=Te.top+(1-h.end)*l,v=(h.end-h.start)*l;return g.jsx("rect",{x:Te.left,y:S,width:a,height:v,fill:h.fill},`${h.start}-${h.end}`)}),w.map(h=>{const S=Te.top+(1-h)*l;return g.jsxs("g",{children:[g.jsx("line",{x1:Te.left,x2:Te.left+a,y1:S,y2:S,stroke:"hsl(var(--border))",strokeDasharray:h===.5?"4 4":"3 3",strokeOpacity:h===.5?1:.4}),g.jsxs("text",{x:Te.left-8,y:S+4,fontSize:"12",textAnchor:"end",fill:"hsl(var(--muted-foreground))",children:[Math.round(h*100),"%"]})]},h)}),g.jsx("line",{x1:Te.left,x2:Te.left,y1:Te.top,y2:Te.top+l,stroke:"hsl(var(--border))"}),g.jsx("line",{x1:Te.left,x2:Te.left+a,y1:Te.top+l,y2:Te.top+l,stroke:"hsl(var(--border))"}),d.length>1?g.jsx("path",{d:y,fill:"none",stroke:"hsl(var(--accent))",strokeWidth:"2"}):null,d.map(h=>{const S=cR(h.prob);return g.jsx("circle",{cx:h.x,cy:h.y,r:s===h.index?6:4,fill:S,stroke:S,className:"cursor-pointer",role:"button",tabIndex:0,"aria-label":`Token ${h.index}, probability ${hi(h.prob)}, log probability ${h.logprob.toFixed(3)}`,onClick:()=>t(h.index),onMouseEnter:()=>{i(h.index),n==null||n(h.index)},onFocus:()=>{i(h.index),n==null||n(h.index)},onBlur:()=>{i(v=>v===h.index?null:v),n==null||n(null)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),t(h.index))}},h.index)}),g.jsx("text",{x:Te.left+a/2,y:Tu-4,fontSize:"12",textAnchor:"middle",fill:"hsl(var(--muted-foreground))",children:"Token Index"})]}),c?g.jsxs("div",{className:"pointer-events-none absolute z-10 -translate-x-1/2 rounded-lg border bg-popover p-3 shadow-lg",style:{left:c.x,top:Math.max(c.y-108,8)},children:[g.jsxs("p",{className:"font-medium",children:["Token #",c.index]}),g.jsx("p",{className:"text-sm",children:g.jsxs("code",{className:`rounded bg-muted px-1 text-xs ${Ka(c.prob).textClassName}`,children:['"',c.token,'"']})}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Probability:"," ",g.jsx("span",{className:"font-medium",children:hi(c.prob)})]}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Log probability:"," ",g.jsx("span",{className:"font-medium",children:c.logprob.toFixed(3)})]}),g.jsx("p",{className:"pt-1 text-xs text-muted-foreground",children:"Click to scroll to token"})]}):null]})}const Os=f.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ce("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Os.displayName="Card";const As=f.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",e),...t}));As.displayName="CardHeader";const Is=f.forwardRef(({className:e,...t},n)=>g.jsx("h3",{ref:n,className:ce("text-2xl font-semibold leading-none tracking-tight",e),...t}));Is.displayName="CardTitle";const pR=f.forwardRef(({className:e,...t},n)=>g.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",e),...t}));pR.displayName="CardDescription";const Ls=f.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ce("p-6 pt-0",e),...t}));Ls.displayName="CardContent";const hR=f.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",e),...t}));hR.displayName="CardFooter";var Il="Collapsible",[mR]=yr(Il),[gR,Uf]=mR(Il),Lx=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,u]=Qr({prop:r,defaultProp:o??!1,onChange:i,caller:Il});return g.jsx(gR,{scope:n,disabled:s,contentId:cr(),open:l,onOpenToggle:f.useCallback(()=>u(d=>!d),[u]),children:g.jsx(ne.div,{"data-state":Wf(l),"data-disabled":s?"":void 0,...a,ref:t})})});Lx.displayName=Il;var Dx="CollapsibleTrigger",Fx=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Uf(Dx,n);return g.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Wf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:ee(e.onClick,o.onOpenToggle)})});Fx.displayName=Dx;var Vf="CollapsibleContent",zx=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Uf(Vf,e.__scopeCollapsible);return g.jsx(as,{present:n||o.open,children:({present:s})=>g.jsx(vR,{...r,ref:t,present:s})})});zx.displayName=Vf;var vR=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Uf(Vf,n),[a,l]=f.useState(r),u=f.useRef(null),d=le(t,u),c=f.useRef(0),y=c.current,p=f.useRef(0),w=p.current,h=i.open||a,S=f.useRef(h),v=f.useRef(void 0);return f.useEffect(()=>{const m=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(m)},[]),Ke(()=>{const m=u.current;if(m){v.current=v.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const x=m.getBoundingClientRect();c.current=x.height,p.current=x.width,S.current||(m.style.transitionDuration=v.current.transitionDuration,m.style.animationName=v.current.animationName),l(r)}},[i.open,r]),g.jsx(ne.div,{"data-state":Wf(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:d,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:h&&o})});function Wf(e){return e?"open":"closed"}var yR=Lx;const xR=yR,wR=Fx,SR=zx,bR=({completion:e,onTokenClick:t,onTokenHover:n,isLoadingChart:r})=>{var d,c,y;const[o,s]=f.useState(!1);if(!e)return g.jsx("aside",{className:"w-[28rem] border-l bg-surface/50 xl:w-[32rem]",children:g.jsxs("div",{className:"p-6 text-center text-muted-foreground",children:[g.jsx(Rh,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Generate a completion to see analysis"})]})});const i=p=>p<1e3?`${p}ms`:`${(p/1e3).toFixed(1)}s`,a=(e.finish_reason||"").toLowerCase(),l=a==="stop"||a==="end_turn"||a==="completed"?"text-success":a==="length"||a==="max_completion_tokens"?"text-destructive":a==="content_filter"?"text-warning":a==="tool_calls"?"text-info":"text-foreground",u=p=>typeof p=="number"?String(p):"--";return g.jsx("aside",{className:"w-[28rem] border-l bg-surface/50 xl:w-[32rem]",children:g.jsxs("div",{className:"p-4 space-y-4 overflow-y-auto",children:[g.jsxs(Os,{children:[g.jsx(As,{className:"pb-3",children:g.jsx(Is,{className:"text-sm font-medium",children:"Color Legend"})}),g.jsxs(Ls,{className:"space-y-2",children:[g.jsx("div",{className:"space-y-2 text-xs",children:yy.map(p=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:`h-3 w-4 rounded border ${p.surfaceClassName}`,"aria-hidden":"true"}),g.jsxs("span",{children:[p.label," (",(p.min*100).toFixed(2),"% to"," ",(p.max*100).toFixed(2),"%)"]})]},p.band))}),g.jsxs("div",{className:"pt-2 border-t text-xs text-muted-foreground flex items-start gap-2",children:[g.jsx(ly,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),g.jsx("span",{children:"Dashed underlines indicate tokens with < 50% probability"})]})]})]}),g.jsxs(Os,{children:[g.jsx(As,{className:"pb-3",children:g.jsxs(Is,{className:"text-sm font-medium flex items-center gap-2",children:[g.jsx(Rh,{className:"w-4 h-4"}),"Token Probabilities",r?g.jsxs("span",{className:"ml-2 inline-flex items-center text-muted-foreground text-xs",children:[g.jsx(hf,{className:"w-3 h-3 mr-1 animate-spin"}),"Rendering analysis…"]}):null]})}),g.jsx(Ls,{children:g.jsx(fR,{tokens:e.tokens,onTokenClick:t,onTokenHover:n})})]}),g.jsxs(Os,{children:[g.jsx(As,{className:"pb-3",children:g.jsx(Is,{className:"text-sm font-medium",children:"Statistics"})}),g.jsxs(Ls,{className:"space-y-3",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-muted-foreground",children:"Prompt tokens"}),g.jsx("div",{className:"font-medium",children:u((d=e.usage)==null?void 0:d.prompt_tokens)})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-muted-foreground",children:"Completion tokens"}),g.jsx("div",{className:"font-medium",children:u((c=e.usage)==null?void 0:c.completion_tokens)})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-muted-foreground",children:"Total tokens"}),g.jsx("div",{className:"font-medium",children:u((y=e.usage)==null?void 0:y.total_tokens)})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-muted-foreground",children:"Finish reason"}),g.jsx("div",{className:`font-medium capitalize ${l}`,children:e.finish_reason})]})]}),e.latency&&g.jsx("div",{className:"pt-2 border-t",children:g.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.jsx(TC,{className:"w-4 h-4 text-muted-foreground"}),g.jsx("span",{className:"text-muted-foreground",children:"Latency:"}),g.jsx("span",{className:"font-medium",children:i(e.latency)})]})}),g.jsx("div",{className:"pt-2 border-t",children:g.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.jsx(FC,{className:"w-4 h-4 text-muted-foreground"}),g.jsx("span",{className:"text-muted-foreground",children:"Model:"}),g.jsx("span",{className:"font-medium font-mono text-xs",children:e.model})]})}),g.jsx("div",{className:"pt-2 border-t",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsx("div",{className:"text-sm font-medium",children:"Export"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(Ve,{variant:"outline",size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(e.text),nn("Copied text",{description:"Completion text copied to clipboard"})}catch(p){nn("Copy failed",{description:p.message})}},"aria-label":"Copy completion text",children:[g.jsx(_C,{className:"w-4 h-4 mr-1"})," Copy"]}),g.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>{const p=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),w=URL.createObjectURL(p),h=document.createElement("a");h.href=w,h.download=`completion-${Date.now()}.json`,document.body.appendChild(h),h.click(),h.remove(),URL.revokeObjectURL(w)},"aria-label":"Download JSON",children:[g.jsx(MC,{className:"w-4 h-4 mr-1"})," JSON"]}),g.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>{const p=b=>`"${b.replace(/"/g,'""')}"`,w=["index","token","logprob","prob","alts"].join(","),h=e.tokens.map(b=>{var k;const C=((k=b.top_logprobs)==null?void 0:k.map(N=>({token:N.token,logprob:N.logprob,prob:N.prob})))??[];return[b.index,p(b.token),b.logprob,b.prob,p(JSON.stringify(C))].join(",")}),S=[w,...h].join(`
|
|
223
|
+
`),v=new Blob([S],{type:"text/csv;charset=utf-8"}),m=URL.createObjectURL(v),x=document.createElement("a");x.href=m,x.download=`completion-${Date.now()}.csv`,document.body.appendChild(x),x.click(),x.remove(),URL.revokeObjectURL(m)},"aria-label":"Download CSV",children:[g.jsx(jC,{className:"w-4 h-4 mr-1"})," CSV"]})]})]})})]})]}),g.jsx(Os,{children:g.jsxs(xR,{open:o,onOpenChange:s,children:[g.jsx(wR,{asChild:!0,children:g.jsx(As,{className:"pb-3 cursor-pointer hover:bg-surface/50 transition-colors",children:g.jsxs(Is,{className:"text-sm font-medium flex items-center justify-between",children:[g.jsx("span",{children:"Raw Response"}),g.jsx(pf,{className:`w-4 h-4 transition-transform ${o?"rotate-180":""}`})]})})}),g.jsx(SR,{children:g.jsx(Ls,{children:g.jsx("div",{className:"text-xs font-mono bg-muted p-3 rounded overflow-auto max-h-64",children:g.jsx("pre",{className:"whitespace-pre-wrap",children:JSON.stringify(e,null,2)})})})})]})})]})})};/*!---------------------------------------------------------------------------------------------
|
|
224
|
+
* Copyright (c) StackBlitz. All rights reserved.
|
|
225
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
226
|
+
*--------------------------------------------------------------------------------------------*/const CR={damping:.7,stiffness:.05,mass:1.25},ER=70,kR=1e3/60,NR=350;let Ll=!1;var xm;(xm=globalThis.document)==null||xm.addEventListener("mousedown",()=>{Ll=!0});var wm;(wm=globalThis.document)==null||wm.addEventListener("mouseup",()=>{Ll=!1});var Sm;(Sm=globalThis.document)==null||Sm.addEventListener("click",()=>{Ll=!1});const PR=(e={})=>{const[t,n]=f.useState(!1),[r,o]=f.useState(e.initial!==!1),[s,i]=f.useState(!1),a=f.useRef(null);a.current=e;const l=f.useCallback(()=>{var b;if(!Ll)return!1;const m=window.getSelection();if(!m||!m.rangeCount)return!1;const x=m.getRangeAt(0);return x.commonAncestorContainer.contains(S.current)||((b=S.current)==null?void 0:b.contains(x.commonAncestorContainer))},[]),u=f.useCallback(m=>{c.isAtBottom=m,o(m)},[]),d=f.useCallback(m=>{c.escapedFromLock=m,n(m)},[]),c=f.useMemo(()=>{let m;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var x;return((x=S.current)==null?void 0:x.scrollTop)??0},set scrollTop(x){S.current&&(S.current.scrollTop=x,c.ignoreScrollToTop=S.current.scrollTop)},get targetScrollTop(){return!S.current||!v.current?0:S.current.scrollHeight-1-S.current.clientHeight},get calculatedTargetScrollTop(){if(!S.current||!v.current)return 0;const{targetScrollTop:x}=this;if(!e.targetScrollTop)return x;if((m==null?void 0:m.targetScrollTop)===x)return m.calculatedScrollTop;const b=Math.max(Math.min(e.targetScrollTop(x,{scrollElement:S.current,contentElement:v.current}),x),0);return m={targetScrollTop:x,calculatedScrollTop:b},requestAnimationFrame(()=>{m=void 0}),b},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ER}}},[]),y=f.useCallback((m={})=>{var j;typeof m=="string"&&(m={animation:m}),m.preserveScrollPosition||u(!0);const x=Date.now()+(Number(m.wait)||0),b=ju(a.current,m.animation),{ignoreEscapes:C=!1}=m;let k,N=c.calculatedTargetScrollTop;m.duration instanceof Promise?m.duration.finally(()=>{k=Date.now()}):k=x+(m.duration??0);const P=async()=>{const R=new Promise(requestAnimationFrame).then(()=>{var U;if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:A}=c,M=performance.now(),W=(M-(c.lastTick??M))/kR;if(c.animation||(c.animation={behavior:b,promise:R,ignoreEscapes:C}),c.animation.behavior===b&&(c.lastTick=M),l()||x>Date.now())return P();if(A<Math.min(N,c.calculatedTargetScrollTop)){if(((U=c.animation)==null?void 0:U.behavior)===b){if(b==="instant")return c.scrollTop=c.calculatedTargetScrollTop,P();c.velocity=(b.damping*c.velocity+b.stiffness*c.scrollDifference)/b.mass,c.accumulated+=c.velocity*W,c.scrollTop+=c.accumulated,c.scrollTop!==A&&(c.accumulated=0)}return P()}return k>Date.now()?(N=c.calculatedTargetScrollTop,P()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?y({animation:ju(a.current,a.current.resize),ignoreEscapes:C,duration:Math.max(0,k-Date.now())||void 0}):c.isAtBottom)});return R.then(A=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),A))};return m.wait!==!0&&(c.animation=void 0),((j=c.animation)==null?void 0:j.behavior)===b?c.animation.promise:P()},[u,l,c]),p=f.useCallback(()=>{d(!0),u(!1)},[d,u]),w=f.useCallback(({target:m})=>{if(m!==S.current)return;const{scrollTop:x,ignoreScrollToTop:b}=c;let{lastScrollTop:C=x}=c;c.lastScrollTop=x,c.ignoreScrollToTop=void 0,b&&b>x&&(C=b),i(c.isNearBottom),setTimeout(()=>{var P;if(c.resizeDifference||x===b)return;if(l()){d(!0),u(!1);return}const k=x>C,N=x<C;if((P=c.animation)!=null&&P.ignoreEscapes){c.scrollTop=C;return}N&&(d(!0),u(!1)),k&&d(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[d,u,l,c]),h=f.useCallback(({target:m,deltaY:x})=>{var C;let b=m;for(;!["scroll","auto"].includes(getComputedStyle(b).overflow);){if(!b.parentElement)return;b=b.parentElement}b===S.current&&x<0&&S.current.scrollHeight>S.current.clientHeight&&!((C=c.animation)!=null&&C.ignoreEscapes)&&(d(!0),u(!1))},[d,u,c]),S=am(m=>{var x,b;(x=S.current)==null||x.removeEventListener("scroll",w),(b=S.current)==null||b.removeEventListener("wheel",h),m==null||m.addEventListener("scroll",w,{passive:!0}),m==null||m.addEventListener("wheel",h,{passive:!0})},[]),v=am(m=>{var b,C;if((b=c.resizeObserver)==null||b.disconnect(),!m)return;let x;c.resizeObserver=new ResizeObserver(([k])=>{const{height:N}=k.contentRect,P=N-(x??N);if(c.resizeDifference=P,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),i(c.isNearBottom),P>=0){const j=ju(a.current,x?a.current.resize:a.current.initial);y({animation:j,wait:!0,preserveScrollPosition:!0,duration:j==="instant"?void 0:NR})}else c.isNearBottom&&(d(!1),u(!0));x=N,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===P&&(c.resizeDifference=0)},1)})}),(C=c.resizeObserver)==null||C.observe(m)},[]);return{contentRef:v,scrollRef:S,scrollToBottom:y,stopScroll:p,isAtBottom:r||s,isNearBottom:s,escapedFromLock:t,state:c}};function am(e,t){const n=f.useCallback(r=>(n.current=r,e(r)),t);return n}const _u=new Map;function ju(...e){const t={...CR};let n=!1;for(const o of e){if(o==="instant"){n=!0;continue}typeof o=="object"&&(n=!1,t.damping=o.damping??t.damping,t.stiffness=o.stiffness??t.stiffness,t.mass=o.mass??t.mass)}const r=JSON.stringify(t);return _u.has(r)||_u.set(r,Object.freeze(t)),n?"instant":_u.get(r)}const RR=({token:e,tooltipId:t,onAlternativeClick:n,onClose:r,isPinned:o,anchorEl:s})=>{const i=f.useRef(null),[a,l]=f.useState(null),[u,d]=f.useState(!1);f.useEffect(()=>{const w=S=>{S.key==="Escape"&&r()},h=S=>{o&&i.current&&!i.current.contains(S.target)&&r()};return o&&(document.addEventListener("keydown",w),document.addEventListener("mousedown",h)),()=>{document.removeEventListener("keydown",w),document.removeEventListener("mousedown",h)}},[o,r]);const c=Ka(e.prob).textClassName;f.useLayoutEffect(()=>{let w=null;const h=()=>{w!==null&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{if(!s||!i.current)return;const m=8,x=10,b=s.getBoundingClientRect(),C=i.current;C.style.visibility="hidden",C.style.position="fixed",C.style.top="0px",C.style.left="0px";const k=C.offsetWidth,N=C.offsetHeight,P=window.innerWidth,j=window.innerHeight;let R=b.left+b.width/2-k/2;R=Math.max(m,Math.min(R,P-k-m));const A=j-b.bottom-m,M=b.top-m,W=N+x<=A,U=N+x<=M;let Q;W?Q=b.bottom+x:U?Q=b.top-N-x:A>=M?Q=b.bottom+x:Q=Math.max(m,b.top-N-x),l({top:Q,left:R}),d(!0)})};h();const S=()=>h(),v=()=>h();return window.addEventListener("resize",S),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",v,!0),w!==null&&cancelAnimationFrame(w)}},[s,e.index,e.logprob]);const y=document.body,p=g.jsxs("div",{ref:i,id:t,role:"dialog","aria-label":`Token probabilities for ${e.token}`,className:"z-50 p-4 bg-popover border rounded-lg shadow-lg min-w-64 max-w-80 scale-in",style:{position:"fixed",top:(a==null?void 0:a.top)??-9999,left:(a==null?void 0:a.left)??-9999,visibility:u?"visible":"hidden"},children:[o&&g.jsx(Ve,{variant:"ghost",size:"sm",className:"absolute top-2 right-2 h-6 w-6 p-0",onClick:r,"aria-label":"Close tooltip",children:g.jsx(mf,{className:"h-3 w-3"})}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"font-medium text-popover-foreground",children:["Token:"," ",g.jsxs("code",{className:`px-1 py-0.5 bg-muted rounded text-sm font-mono ${c}`,children:['"',e.token,'"']})]}),g.jsxs("div",{className:"text-sm text-muted-foreground",children:["Probability:"," ",g.jsx("span",{className:`font-medium ${c}`,children:hi(e.prob)})]}),g.jsxs("div",{className:"text-sm text-muted-foreground",children:["Log probability:"," ",g.jsx("span",{className:`font-medium ${c}`,children:e.logprob.toFixed(3)})]})]}),e.top_logprobs&&e.top_logprobs.length>1&&g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"text-sm font-medium text-popover-foreground",children:["Top ",e.top_logprobs.length," alternatives:"]}),g.jsx("div",{className:"space-y-1",children:e.top_logprobs.slice(0,5).map((w,h)=>{const S=Ka(w.prob).textClassName;return g.jsx("button",{onClick:()=>n(w.token),className:"w-full rounded p-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("code",{className:`text-sm font-mono group-hover:text-accent-foreground ${S}`,children:['"',w.token,'"']}),g.jsx("span",{className:`text-sm text-muted-foreground group-hover:text-accent-foreground ${S}`,children:hi(w.prob)})]})},h)})}),e.top_logprobs.length>5&&g.jsxs("div",{className:"text-xs text-muted-foreground text-center pt-1 border-t",children:["Showing top 5 of ",e.top_logprobs.length," alternatives"]})]})]})]});return no.createPortal(p,y)},TR=({tokens:e,onTokenClick:t,tokenScopeId:n,isInteractive:r=!0,highlightedTokenIndex:o=null,showWhitespaceOverlays:s=!1,showPunctuationOverlays:i=!1})=>{const[a,l]=f.useState(null),[u,d]=f.useState(null),c=f.useRef([]),y=(w,h)=>{l(a===w?null:w),t(w,h)},p=(w,h,S)=>{w.key==="Enter"||w.key===" "?(w.preventDefault(),y(h,S)):w.key==="Escape"&&l(null)};return g.jsx("div",{className:"relative leading-relaxed","aria-live":"polite",children:e.map(w=>{const h=w.index,S=ZE(w.token),v=JE(w.token);let m=tk(w.prob),x=w.prob<.5;(!s&&S||!i&&v)&&(m="",x=!1);const b=r&&(u===h||a===h),C=`tooltip-${n}-${h}`;return g.jsxs("span",{className:"relative",children:[g.jsx("span",{ref:k=>{c.current[h]=k},"data-token-index":h,"data-token-scope":n,className:`token-span ${m} ${o===h?"token-highlighted":""} ${m?x?"border-b-2 border-dashed border-current":"border-b-2 border-transparent":""}`,role:r?"button":void 0,"aria-pressed":r&&a===h?!0:void 0,tabIndex:r?0:void 0,"aria-describedby":b?C:void 0,"aria-label":`Token ${JSON.stringify(w.token)}, probability ${hi(w.prob,1)}`,onMouseEnter:()=>{r&&d(h)},onMouseLeave:()=>{r&&d(null)},onClick:()=>{r&&y(h,w.token)},onKeyDown:k=>{r&&p(k,h,w.token)},children:w.token}),b&&g.jsx(RR,{token:w,tooltipId:C,onAlternativeClick:k=>t(h,k),onClose:()=>{l(null),d(null)},isPinned:a===h,anchorEl:c.current[h]})]},h)})})},_R=({tokens:e,onTokenClick:t,tokenScopeId:n,isInteractive:r,highlightedTokenIndex:o,showWhitespaceOverlays:s,showPunctuationOverlays:i})=>g.jsx(TR,{tokens:e,onTokenClick:t,tokenScopeId:n,isInteractive:r,highlightedTokenIndex:o,showWhitespaceOverlays:s,showPunctuationOverlays:i}),jR=({messages:e,isLoading:t,onTokenClick:n,onRegenerateMessage:r,regenerableMessageId:o=null,isRegenerateDisabled:s=!1,activeCompletionMessageId:i,highlightedTokenIndex:a=null,showWhitespaceOverlays:l=!1,showPunctuationOverlays:u=!1})=>{var p;const{scrollRef:d,contentRef:c}=PR(),y=e.length>0&&((p=e[e.length-1])==null?void 0:p.role)==="assistant";return g.jsx("div",{ref:d,className:"transcript-scroll flex-1 overflow-y-auto px-6 py-4",children:g.jsxs("div",{ref:c,className:"space-y-6",children:[e.length===0&&g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-lg mb-2",children:"Start exploring token probabilities"}),g.jsx("p",{className:"text-sm",children:"Type a message below to see how the model generates tokens"})]})}),e.map(w=>g.jsx("div",{className:"flex",children:w.role==="user"?g.jsxs("div",{className:"ml-auto max-w-[80%] rounded-2xl rounded-br-md bg-secondary p-4",children:[g.jsx("p",{className:"text-sm font-medium text-secondary-foreground mb-1",children:"You"}),g.jsx("p",{className:"whitespace-pre-wrap",children:w.content})]}):g.jsxs("div",{className:"group relative max-w-[85%] rounded-2xl rounded-bl-md border bg-card p-4 pr-12",children:[w.id===o&&r?g.jsx(Ve,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 rounded-full text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100","aria-label":"Regenerate response",disabled:s,onClick:()=>r(w.id),children:g.jsx(AC,{className:"h-4 w-4"})}):null,g.jsx("p",{className:"text-sm font-medium text-card-foreground mb-2",children:"Assistant"}),w.tokens?g.jsx(_R,{tokens:w.tokens,onTokenClick:n,tokenScopeId:w.id,isInteractive:w.id===i,highlightedTokenIndex:w.id===i?a:null,showWhitespaceOverlays:l,showPunctuationOverlays:u}):g.jsx("p",{className:"whitespace-pre-wrap",children:w.content})]})},w.id)),t&&!y&&g.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-bl-md border bg-card p-4",children:[g.jsx("p",{className:"text-sm font-medium text-card-foreground mb-2",children:"Assistant"}),g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(hf,{className:"w-4 h-4 animate-spin"}),g.jsx("span",{children:"Generating response..."})]})]}),g.jsx("div",{"aria-hidden":!0})]})})};var Dl="Switch",[MR]=yr(Dl),[OR,AR]=MR(Dl),$x=f.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:u,form:d,...c}=e,[y,p]=f.useState(null),w=le(t,x=>p(x)),h=f.useRef(!1),S=y?d||!!y.closest("form"):!0,[v,m]=Qr({prop:o,defaultProp:s??!1,onChange:u,caller:Dl});return g.jsxs(OR,{scope:n,checked:v,disabled:a,children:[g.jsx(ne.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":Wx(v),"data-disabled":a?"":void 0,disabled:a,value:l,...c,ref:w,onClick:ee(e.onClick,x=>{m(b=>!b),S&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),S&&g.jsx(Vx,{control:y,bubbles:!h.current,name:r,value:l,checked:v,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});$x.displayName=Dl;var Bx="SwitchThumb",Ux=f.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=AR(Bx,n);return g.jsx(ne.span,{"data-state":Wx(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Ux.displayName=Bx;var IR="SwitchBubbleInput",Vx=f.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=f.useRef(null),a=le(i,s),l=Ff(n),u=If(t);return f.useEffect(()=>{const d=i.current;if(!d)return;const c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&p){const w=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(w)}},[l,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Vx.displayName=IR;function Wx(e){return e?"checked":"unchecked"}var Hx=$x,LR=Ux;const id=f.forwardRef(({className:e,...t},n)=>g.jsx(Hx,{className:ce("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:g.jsx(LR,{className:ce("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));id.displayName=Hx.displayName;const DR=({isOpen:e,parameters:t,onParametersChange:n,onClose:r,showWhitespaceOverlays:o=!1,showPunctuationOverlays:s=!1,onReadabilityChange:i})=>{const a=(w,h)=>{n({...t,[w]:h})},l=$n("temperature"),u=$n("top_p"),d=$n("max_completion_tokens"),c=$n("top_logprobs"),y=$n("presence_penalty"),p=$n("frequency_penalty");return g.jsx(Zy,{open:e,onOpenChange:w=>{w||r()},children:g.jsxs(kf,{className:"max-w-3xl bg-background",children:[g.jsxs(Nf,{className:"relative",children:[g.jsx(Pf,{children:"Generation Parameters"}),g.jsx(Jy,{asChild:!0,children:g.jsx(Ve,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8","aria-label":"Close",children:g.jsx(mf,{className:"h-4 w-4"})})})]}),g.jsxs("div",{className:"px-6 pb-4 space-y-6",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(Ct,{htmlFor:"temperature",children:[l.label,":"," ",l.formatValue(t.temperature)]}),g.jsx(kr,{id:"temperature",min:l.min,max:l.max,step:l.step,value:[t.temperature],onValueChange:([w])=>a("temperature",w),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:l.description})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(Ct,{htmlFor:"top-p",children:[u.label,": ",u.formatValue(t.top_p)]}),g.jsx(kr,{id:"top-p",min:u.min,max:u.max,step:u.step,value:[t.top_p],onValueChange:([w])=>a("top_p",w),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:u.description})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ct,{htmlFor:"max-completion-tokens",children:d.label}),g.jsx(Ga,{id:"max-completion-tokens",type:"number",min:d.min,max:d.max,value:t.max_completion_tokens,onChange:w=>a("max_completion_tokens",Bn("max_completion_tokens",parseInt(w.target.value,10)||1)),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:d.description})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(Ct,{htmlFor:"top-logprobs",children:[c.label,":"," ",c.formatValue(t.top_logprobs)]}),g.jsx(kr,{id:"top-logprobs",min:c.min,max:c.max,step:c.step,value:[t.top_logprobs],onValueChange:([w])=>a("top_logprobs",w),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:c.description})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(Ct,{htmlFor:"presence-penalty",children:[y.label,":"," ",y.formatValue(t.presence_penalty)]}),g.jsx(kr,{id:"presence-penalty",min:y.min,max:y.max,step:y.step,value:[t.presence_penalty],onValueChange:([w])=>a("presence_penalty",w),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:y.description})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(Ct,{htmlFor:"frequency-penalty",children:[p.label,":"," ",p.formatValue(t.frequency_penalty)]}),g.jsx(kr,{id:"frequency-penalty",min:p.min,max:p.max,step:p.step,value:[t.frequency_penalty],onValueChange:([w])=>a("frequency_penalty",w),className:"w-full"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:p.description})]})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsx("div",{className:"text-sm font-medium",children:"Readability"}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx(Ct,{htmlFor:"toggle-whitespace",children:"Show whitespace overlays"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Display overlays for spaces and newlines to make gaps visible."})]}),g.jsx(id,{id:"toggle-whitespace",checked:o,onCheckedChange:w=>i==null?void 0:i({showWhitespace:w})})]}),g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx(Ct,{htmlFor:"toggle-punct",children:"Show punctuation overlays"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Display overlays for punctuation tokens (., !, ?, etc.)."})]}),g.jsx(id,{id:"toggle-punct",checked:s,onCheckedChange:w=>i==null?void 0:i({showPunctuation:w})})]})]})]})]})]})})},Kx=f.forwardRef(({className:e,...t},n)=>g.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Kx.displayName="Textarea";var[Fl]=yr("Tooltip",[_l]),zl=_l(),Qx="TooltipProvider",FR=700,ad="tooltip.open",[zR,Hf]=Fl(Qx),Gx=e=>{const{__scopeTooltip:t,delayDuration:n=FR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=f.useRef(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(zR,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};Gx.displayName=Qx;var vi="Tooltip",[$R,$l]=Fl(vi),Yx=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Hf(vi,e.__scopeTooltip),u=zl(t),[d,c]=f.useState(null),y=cr(),p=f.useRef(0),w=i??l.disableHoverableContent,h=a??l.delayDuration,S=f.useRef(!1),[v,m]=Qr({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(ad))):l.onClose(),s==null||s(N)},caller:vi}),x=f.useMemo(()=>v?S.current?"delayed-open":"instant-open":"closed",[v]),b=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,S.current=!1,m(!0)},[m]),C=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,m(!1)},[m]),k=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{S.current=!0,m(!0),p.current=0},h)},[h,m]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),g.jsx(R0,{...u,children:g.jsx($R,{scope:t,contentId:y,open:v,stateAttribute:x,trigger:d,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?k():b()},[l.isOpenDelayedRef,k,b]),onTriggerLeave:f.useCallback(()=>{w?C():(window.clearTimeout(p.current),p.current=0)},[C,w]),onOpen:b,onClose:C,disableHoverableContent:w,children:n})})};Yx.displayName=vi;var ld="TooltipTrigger",qx=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$l(ld,n),s=Hf(ld,n),i=zl(n),a=f.useRef(null),l=le(t,a,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(T0,{asChild:!0,...i,children:g.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ee(e.onPointerMove,y=>{y.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:ee(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:ee(e.onBlur,o.onClose),onClick:ee(e.onClick,o.onClose)})})});qx.displayName=ld;var BR="TooltipPortal",[DT,UR]=Fl(BR,{forceMount:void 0}),es="TooltipContent",Xx=f.forwardRef((e,t)=>{const n=UR(es,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=$l(es,e.__scopeTooltip);return g.jsx(as,{present:r||i.open,children:i.disableHoverableContent?g.jsx(Zx,{side:o,...s,ref:t}):g.jsx(VR,{side:o,...s,ref:t})})}),VR=f.forwardRef((e,t)=>{const n=$l(es,e.__scopeTooltip),r=Hf(es,e.__scopeTooltip),o=f.useRef(null),s=le(t,o),[i,a]=f.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,y=f.useCallback(()=>{a(null),c(!1)},[c]),p=f.useCallback((w,h)=>{const S=w.currentTarget,v={x:w.clientX,y:w.clientY},m=GR(v,S.getBoundingClientRect()),x=YR(v,m),b=qR(h.getBoundingClientRect()),C=ZR([...x,...b]);a(C),c(!0)},[c]);return f.useEffect(()=>()=>y(),[y]),f.useEffect(()=>{if(l&&d){const w=S=>p(S,d),h=S=>p(S,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[l,d,p,y]),f.useEffect(()=>{if(i){const w=h=>{const S=h.target,v={x:h.clientX,y:h.clientY},m=(l==null?void 0:l.contains(S))||(d==null?void 0:d.contains(S)),x=!XR(v,i);m?y():x&&(y(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,i,u,y]),g.jsx(Zx,{...e,ref:s})}),[WR,HR]=Fl(vi,{isInside:!1}),KR=fk("TooltipContent"),Zx=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=$l(es,n),u=zl(n),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(ad,d),()=>document.removeEventListener(ad,d)),[d]),f.useEffect(()=>{if(l.trigger){const c=y=>{const p=y.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(_0,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(KR,{children:r}),g.jsx(WR,{scope:n,isInside:!0,children:g.jsx(l2,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Xx.displayName=es;var Jx="TooltipArrow",QR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zl(n);return HR(Jx,n).isInside?null:g.jsx(j0,{...o,...r,ref:t})});QR.displayName=Jx;function GR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function YR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function XR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,d=a.y,c=l.x,y=l.y;d>r!=y>r&&n<(c-u)*(r-d)/(y-d)+u&&(o=!o)}return o}function ZR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),JR(t)}function JR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var eT=Gx,tT=Yx,nT=qx,ew=Xx;const rT=eT,Mu=tT,Ou=nT,xa=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(ew,{ref:r,sideOffset:t,className:ce("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));xa.displayName=ew.displayName;const oT=f.forwardRef(function({onSendMessage:t,isLoading:n,isStreaming:r=!1,onCancel:o,canSubmit:s=!0,onBlockedSend:i,blockedSendMessage:a,parameters:l,onParametersChange:u,showWhitespaceOverlays:d=!1,showPunctuationOverlays:c=!1,onReadabilityChange:y,onClearHistory:p},w){const[h,S]=f.useState(""),[v,m]=f.useState(!1),x=f.useRef(null),[b,C]=f.useState(!1);f.useImperativeHandle(w,()=>({focus:()=>{var R;(R=x.current)==null||R.focus()},openParameters:()=>m(!0),setMessage:R=>{S(R)}}),[]);const k=R=>{R.preventDefault(),N()},N=()=>{if(!(!h.trim()||n)){if(!s){i==null||i();return}t(h),S("")}},P=R=>{(R.metaKey||R.ctrlKey)&&R.key==="Enter"&&(R.preventDefault(),N())},j=R=>{S(R.target.value)};return f.useLayoutEffect(()=>{const R=x.current;if(!R)return;R.style.height="auto";const A=Math.min(R.scrollHeight,200);R.style.height=`${A}px`,C(R.scrollHeight>=200)},[h]),g.jsxs("div",{className:"border-t bg-background",children:[g.jsx("div",{className:"px-6 py-4",children:g.jsxs("form",{onSubmit:k,className:"space-y-3",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex-1 relative",children:g.jsx(Kx,{ref:x,value:h,onChange:j,onKeyDown:P,placeholder:"Type your message... (Cmd/Ctrl+Enter to send)",disabled:n,className:`composer-textarea min-h-[44px] max-h-[200px] pr-12 ${b?"overflow-y-auto":"overflow-hidden"}`,rows:1})}),g.jsxs("div",{className:"flex gap-1",children:[g.jsxs(Mu,{children:[g.jsx(Ou,{asChild:!0,children:r?g.jsx(Ve,{type:"button",variant:"destructive",onClick:()=>o==null?void 0:o(),className:"h-11 px-4","aria-label":"Cancel streaming",children:g.jsx(RC,{className:"h-4 w-4"})}):g.jsx(Ve,{type:"submit",disabled:!h.trim()||n,className:"h-11 px-4",children:g.jsx(IC,{className:"h-4 w-4"})})}),g.jsx(xa,{children:r?"Cancel":s?"Send (Cmd/Ctrl+Enter)":a??"Sending is currently blocked"})]}),g.jsxs(Mu,{children:[g.jsx(Ou,{asChild:!0,children:g.jsx(Ve,{type:"button",variant:"outline",size:"icon",className:"h-11 w-11",onClick:()=>{if(!p)return;window.confirm("Clear conversation history?")&&p()},"aria-label":"Clear conversation history",children:g.jsx(DC,{className:"h-4 w-4"})})}),g.jsx(xa,{children:"Clear history"})]}),g.jsxs(Mu,{children:[g.jsx(Ou,{asChild:!0,children:g.jsx(Ve,{type:"button",variant:"outline",size:"icon",onClick:()=>m(!v),className:"h-11 w-11",children:g.jsx(LC,{className:"h-4 w-4"})})}),g.jsx(xa,{children:"Parameters"})]})]})]}),g.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[g.jsx("div",{children:"Cmd/Ctrl+Enter to send"}),g.jsxs("div",{children:["Max completion tokens: ",l.max_completion_tokens]})]})]})}),g.jsx(DR,{isOpen:v,onClose:()=>m(!1),parameters:l,onParametersChange:u,showWhitespaceOverlays:d,showPunctuationOverlays:c,onReadabilityChange:y})]})}),sT=vf("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),tw=f.forwardRef(({className:e,variant:t,...n},r)=>g.jsx("div",{ref:r,role:"alert",className:ce(sT({variant:t}),e),...n}));tw.displayName="Alert";const nw=f.forwardRef(({className:e,...t},n)=>g.jsx("h5",{ref:n,className:ce("mb-1 font-medium leading-none tracking-tight",e),...t}));nw.displayName="AlertTitle";const rw=f.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ce("text-sm [&_p]:leading-relaxed",e),...t}));rw.displayName="AlertDescription";function Ns(e,t,n){const r=e.findIndex(s=>s.id===t);if(r===-1)return[...e];const o=[...e];return o[r]=n,o}function iT(e,t){return e.filter(n=>n.id!==t)}function lm(e){if(e.length<2)return null;const t=e.length-1,n=e[t],r=e[t-1];return!n||n.role!=="assistant"||!r||r.role!=="user"?null:{assistantMessage:n,requestMessages:e.slice(0,t)}}function aT({transport:e,selectedModelId:t,runParameters:n,blockState:r,onRequireSettings:o,onFocusComposer:s,onResetTokenNavigation:i}){var F;const[a,l]=f.useState([]),[u,d]=f.useState(null),[c,y]=f.useState(null),[p,w]=f.useState(!1),[h,S]=f.useState(null),[v,m]=f.useState(null),[x,b]=f.useState(""),[C,k]=f.useTransition(),N=f.useRef(null),P=f.useRef(null),j=f.useRef(0),R=f.useRef(0),A=f.useRef(!1);f.useEffect(()=>{C&&b("Rendering analysis…")},[C]),f.useEffect(()=>{!C&&u&&b("Response ready")},[u,C]),f.useEffect(()=>()=>{var B;P.current=null,(B=N.current)==null||B.abort(),N.current=null},[]);const M=()=>{i(),S(null),d(null),y(null)},W=()=>(R.current+=1,`message-${R.current}`),U=B=>{if(!B){M();return}S(B.lastLowIndex),d(B.completion),y(B.activeCompletionMessageId)},Q=B=>!u||c!==B?null:{completion:u,activeCompletionMessageId:c,lastLowIndex:h},V=B=>{B&&(A.current=!0),P.current=null;const L=N.current;N.current=null,m(null),L==null||L.abort()},H=async({requestMessages:B,assistantMessageId:L,commitOptimisticMessages:Y,handleFailedMessages:G,analysisSnapshot:ie,startAnnouncement:we,failureAnnouncement:D,cancellationAnnouncement:ue})=>{var se;if(!t||r){(r==null?void 0:r.kind)==="missing-settings"&&o(),nn("Cannot send request",{description:(r==null?void 0:r.description)??"Select a compatible model before sending a request."});return}V(!1),M(),l(X=>Y(X));const he=j.current+1;j.current=he,w(!0),b(we);try{const X=e.complete({messages:B.map(de=>({role:de.role,content:de.content})),model:t,temperature:n.temperature,top_p:n.top_p,presence_penalty:n.presence_penalty,frequency_penalty:n.frequency_penalty,max_completion_tokens:n.max_completion_tokens,top_logprobs:n.top_logprobs});let J="";const Ce={current:[]};let $e=!1,ft=null,jt=!1,Mt=!1,un=null;P.current=he,N.current=X,m(X);const Rn=()=>{$e||($e=!0,ft=requestAnimationFrame(()=>{if($e=!1,ft=null,P.current!==he)return;const de=Ce.current;de.length!==0&&(l(cn=>{const je=cn.find(Tn=>Tn.id===L);if(!je)return cn;const ms=je.tokens&&je.tokens.length>0?[...je.tokens,...de]:[...de];return Ns(cn,L,{id:L,role:"assistant",content:J,tokens:ms})}),Ce.current=[],jt=!0)}))},hs=()=>{ft!==null&&(cancelAnimationFrame(ft),ft=null),$e=!1,Ce.current=[]};try{for await(const de of X){if(P.current!==he)continue;if(de.type==="delta"){J+=de.delta,jt||l(je=>je.find(Tn=>Tn.id===L)?Ns(je,L,{id:L,role:"assistant",content:J}):je),b("Streaming response…");continue}if(de.type==="logprobs"){Ce.current.push(de.delta),Rn();continue}if(hs(),de.error){Mt=!0,un=de.error,U(ie),b(D);continue}const cn=((se=de.completion)==null?void 0:se.text)??J;l(je=>{var Tn;return je.find(rt=>rt.id===L)?Ns(je,L,{id:L,role:"assistant",content:cn,tokens:(Tn=de.completion)==null?void 0:Tn.tokens}):je}),de.completion?k(()=>{d(de.completion??null),y(L)}):b("Response complete (no chart data)")}}catch(de){if((de==null?void 0:de.name)==="AbortError"||A.current)Mt=!0,U(ie),b(ue);else throw de}finally{hs(),Mt&&(l(de=>G(de)),un&&(nn("Request failed",{description:un}),s())),P.current===he&&(P.current=null,N.current=null,m(null)),A.current=!1}}catch(X){U(ie);const J=X.message;l(Ce=>G(Ce)),nn("Request failed",{description:J}),b(D),s()}finally{w(!1)}},T=async B=>{if(!B.trim())return;const L={id:W(),role:"user",content:B},Y=W(),G={id:Y,role:"assistant",content:""};await H({requestMessages:[...a,L],assistantMessageId:Y,commitOptimisticMessages:ie=>[...ie,L,G],handleFailedMessages:ie=>iT(ie,Y),analysisSnapshot:null,startAnnouncement:"Sending request...",failureAnnouncement:"Request failed. Focus returned to composer.",cancellationAnnouncement:"Streaming canceled"})},_=async B=>{const L=lm(a);if(!L||L.assistantMessage.id!==B)return;const Y={id:L.assistantMessage.id,role:"assistant",content:""};await H({requestMessages:L.requestMessages,assistantMessageId:L.assistantMessage.id,commitOptimisticMessages:G=>Ns(G,L.assistantMessage.id,Y),handleFailedMessages:G=>Ns(G,L.assistantMessage.id,L.assistantMessage),analysisSnapshot:Q(L.assistantMessage.id),startAnnouncement:"Regenerating response…",failureAnnouncement:"Regeneration failed. Previous response restored.",cancellationAnnouncement:"Regeneration canceled. Previous response restored."})};return{messages:a,currentCompletion:u,activeCompletionMessageId:c,isLoading:p,isStreaming:v!==null,liveMessage:x,isChartPending:C,regenerableMessageId:((F=lm(a))==null?void 0:F.assistantMessage.id)??null,lastLowIndex:h,setLastLowIndex:S,setLiveMessage:b,sendMessage:T,regenerateMessage:_,cancelStream(){N.current&&(A.current=!0,N.current.abort())},abortActiveStream:V,resetAnalysisState:M,clearHistory(){V(!0),l([]),M(),b("History cleared"),s()}}}function lT(e,t){return`[data-token-scope="${e}"][data-token-index="${t}"]`}function uT(e,t){return document.querySelector(lT(e,t))}function cT({composerRef:e,currentCompletion:t,activeCompletionMessageId:n,lastLowIndex:r,onLastLowIndexChange:o,onAnnounce:s}){const[i,a]=f.useState(null),l=f.useCallback((u,d=!1)=>{if(n===null)return;const c=uT(n,u);c==null||c.scrollIntoView({behavior:"smooth",block:"center"}),d&&(c==null||c.focus())},[n]);return f.useEffect(()=>{const u=d=>{var w,h;const c=d.target,y=c==null?void 0:c.tagName.toLowerCase();if(!(y==="input"||y==="textarea"||c!=null&&c.isContentEditable)){if(d.key==="/"){d.preventDefault(),(w=e.current)==null||w.focus(),s("Composer focused");return}if(d.key==="."){d.preventDefault(),(h=e.current)==null||h.openParameters(),s("Parameters opened");return}if((d.key==="["||d.key==="]")&&t&&n!==null){d.preventDefault();const S=d.key==="]"?1:-1,v=ek(t.tokens,r,S,.5);v!==null&&(o(v),a(v),l(v,!0),s(`Jumped to low-confidence token ${v}`))}}};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[n,e,t,r,o,s,l]),{highlightedTokenIndex:i,resetTokenNavigation(){a(null),o(null)},handleBranch(u,d){var y,p;if(!t||n===null)return;const c=t.tokens.slice(0,u).map(w=>w.token).join("");(y=e.current)==null||y.setMessage(c+d),(p=e.current)==null||p.focus()},handleChartHover(u){if(n===null){a(null);return}a(u)},scrollToToken:l}}function ow(e){return{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}}async function Kf(e){var o;const t=`HTTP ${e.status}: ${e.statusText}`,r=(await e.text().catch(()=>"")).trim();if(!r)return t;try{const s=JSON.parse(r),i=((o=s.error)==null?void 0:o.message)??s.message??s.detail??r;return`HTTP ${e.status}: ${i}`}catch{return`HTTP ${e.status}: ${r}`}}function ud(e){return typeof e=="object"&&e!==null}function dT(e){const t=/logprob|top_logprobs/i.test(e),n=/unsupported|not support|does not support|unknown parameter|invalid parameter/i.test(e);return t&&n}class Au extends Error{constructor(t){super(t),this.name="TransientModelCapabilityError"}}async function fT(e){const t="resolvedBaseUrl"in e?e:us(e),{resolvedBaseUrl:n,settings:r}=t,o=await fetch(`${n}/models`,{method:"GET",headers:ow(r.apiKey)});if(!o.ok)throw new Error(await Kf(o));const s=await o.json();if(!Array.isArray(s.data))throw new Error("Provider returned an invalid models response.");const i=s.data.flatMap(a=>!ud(a)||typeof a.id!="string"||a.id.length===0?[]:[{id:a.id,name:a.id}]);if(i.length===0)throw new Error("Provider returned an invalid models response.");return i.sort((a,l)=>a.name.localeCompare(l.name,void 0,{numeric:!0,sensitivity:"base"}))}async function pT(e,t,n){var d;const r="resolvedBaseUrl"in e?e:us(e),{resolvedBaseUrl:o,settings:s}=r,i=await fetch(`${o}/chat/completions`,{method:"POST",headers:ow(s.apiKey),body:JSON.stringify({model:t,messages:[{role:"user",content:"."}],max_completion_tokens:1,temperature:0,logprobs:!0,top_logprobs:1,stream:!1}),signal:n});if(!i.ok){const c=await Kf(i);if(dT(c))return{status:"unsupported",message:c};throw new Au(c)}const l=(d=(await i.json()).choices)==null?void 0:d[0];if(!ud(l))throw new Au("Provider returned an invalid capability probe response.");if(!("logprobs"in l)||!ud(l.logprobs))return{status:"unsupported",message:"Provider returned a completion without logprobs data."};const u=l.logprobs.content;if(u!==void 0&&!Array.isArray(u))throw new Au("Provider returned an invalid logprobs payload.");return{status:"supported",message:null}}function Jr(e){return typeof e=="object"&&e!==null}function hT(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>Jr(t)&&typeof t.text=="string"?t.text:"").join(""):Jr(e)&&typeof e.content=="string"?e.content:""}function mT(e){return Jr(e)&&typeof e.prompt_tokens=="number"&&Number.isInteger(e.prompt_tokens)&&e.prompt_tokens>=0&&typeof e.completion_tokens=="number"&&Number.isInteger(e.completion_tokens)&&e.completion_tokens>=0&&typeof e.total_tokens=="number"&&Number.isInteger(e.total_tokens)&&e.total_tokens>=0}function gT(e,t){return Array.isArray(e)?e.flatMap((n,r)=>{if(!Jr(n))return[];const o=typeof n.token=="string"?n.token:"",s=typeof n.logprob=="number"?n.logprob:Number.NEGATIVE_INFINITY,i=Array.isArray(n.top_logprobs)?n.top_logprobs.flatMap(a=>{if(!Jr(a))return[];const l=typeof a.token=="string"?a.token:"",u=typeof a.logprob=="number"?a.logprob:Number.NEGATIVE_INFINITY;return[{token:l,logprob:u,prob:Math.exp(u)}]}):[];return[{index:t+r,token:o,logprob:s,prob:Math.exp(s),top_logprobs:i}]}):[]}async function*vT(e){const t=new TextDecoder;let n="",r=[];const o=function*(){if(r.length===0)return;const s=r.filter(i=>i.startsWith("data:")).map(i=>i.slice(5).trimStart()).join(`
|
|
227
|
+
`);r=[],s&&(yield s)};for(;;){const{done:s,value:i}=await e.read();if(s){n+=t.decode();break}n+=t.decode(i,{stream:!0});let a=n.indexOf(`
|
|
228
|
+
`);for(;a!==-1;){const l=n.slice(0,a);n=n.slice(a+1);const u=l.endsWith("\r")?l.slice(0,-1):l;u===""?yield*o():u.startsWith(":")||r.push(u),a=n.indexOf(`
|
|
229
|
+
`)}}n.trim()&&r.push(n.trim()),yield*o()}function yT(e,t,n,r,o,s){return{text:t,tokens:[...n],finish_reason:o||"stop",usage:s,model:r,latency:Date.now()-e}}function xT(e){return Jr(e)?Jr(e.error)&&typeof e.error.message=="string"&&e.error.message.trim().length>0?e.error.message:typeof e.message=="string"&&e.message.trim().length>0?e.message:typeof e.detail=="string"&&e.detail.trim().length>0?e.detail:null:null}function wT(e,t){var s,i,a;typeof t.model=="string"&&(e.model=t.model),mT(t.usage)&&(e.usage=t.usage);const n=(s=t.choices)==null?void 0:s[0],r=hT((i=n==null?void 0:n.delta)==null?void 0:i.content);r&&(e.aggregatedText+=r);const o=gT((a=n==null?void 0:n.logprobs)==null?void 0:a.content,e.tokens.length);return o.length>0&&e.tokens.push(...o),typeof(n==null?void 0:n.finish_reason)=="string"&&(e.finishReason=n.finish_reason),{deltaText:r,tokenEvents:o}}function ST(e,t,n){return yT(t,n.aggregatedText,n.tokens,n.model,n.finishReason,n.usage)}function bT(e){const t=Ix(e);return{...e,...t}}class CT{constructor(t){Zf(this,"connection");this.connection="resolvedBaseUrl"in t?t:us(t)}complete(t){const n=new AbortController,r=this.connection,o=JSON.stringify({...bT(t),logprobs:!0,stream:!0,stream_options:{include_usage:!0}}),s=async function*(){const a=Date.now(),l=await fetch(`${r.resolvedBaseUrl}/chat/completions`,{method:"POST",headers:{Authorization:`Bearer ${r.settings.apiKey}`,"Content-Type":"application/json"},body:o,signal:n.signal});if(!l.ok||!l.body){yield{type:"done",error:await Kf(l)};return}const u={aggregatedText:"",tokens:[],finishReason:"stop",usage:null,model:t.model};try{for await(const d of vT(l.body.getReader())){if(d==="[DONE]")break;let c;try{c=JSON.parse(d)}catch{continue}const y=xT(c);if(y){yield{type:"done",error:y};return}const{deltaText:p,tokenEvents:w}=wT(u,c);p&&(yield{type:"delta",delta:p});for(const h of w)yield{type:"logprobs",delta:h}}yield{type:"done",completion:ST(t,a,u)}}catch(d){if(d.name==="AbortError")throw d;yield{type:"done",error:d.message}}};return{abort:()=>n.abort(),[Symbol.asyncIterator](){return s()}}}}function ET({connection:e,selectedModelId:t,runParameters:n,setRunParameters:r,blockState:o,capabilityNotice:s,onOpenSettings:i}){var v,m;const a=f.useRef(null),l=f.useRef(()=>{}),[u,d]=f.useState(!1),[c,y]=f.useState(!1),p=f.useMemo(()=>new CT(e),[e]),w=aT({transport:p,selectedModelId:t,runParameters:n,blockState:o,onRequireSettings:i,onFocusComposer:()=>{var x;return(x=a.current)==null?void 0:x.focus()},onResetTokenNavigation:()=>l.current()}),h=cT({composerRef:a,currentCompletion:w.currentCompletion,activeCompletionMessageId:w.activeCompletionMessageId,lastLowIndex:w.lastLowIndex,onLastLowIndexChange:w.setLastLowIndex,onAnnounce:w.setLiveMessage});l.current=h.resetTokenNavigation;const S=f.useDeferredValue(w.currentCompletion);return g.jsxs("main",{className:"flex min-h-0 flex-1",children:[g.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[g.jsx("div",{"aria-live":"polite",className:"sr-only",role:"status",children:w.liveMessage}),o??s?g.jsx("div",{className:"px-6 pt-4",children:g.jsxs(tw,{variant:(o==null?void 0:o.kind)==="unsupported-model"||(o==null?void 0:o.kind)==="model-error"?"destructive":"default",children:[(o==null?void 0:o.kind)==="checking-capability"||(o==null?void 0:o.kind)==="loading-models"?g.jsx(hf,{className:"h-4 w-4 animate-spin"}):g.jsx(ly,{className:"h-4 w-4"}),g.jsx(nw,{children:(v=o??s)==null?void 0:v.title}),g.jsx(rw,{children:(m=o??s)==null?void 0:m.description})]})}):null,g.jsx(jR,{messages:w.messages,isLoading:w.isLoading,onTokenClick:h.handleBranch,onRegenerateMessage:w.regenerateMessage,regenerableMessageId:w.regenerableMessageId,isRegenerateDisabled:w.isLoading||o!==null,activeCompletionMessageId:w.activeCompletionMessageId,highlightedTokenIndex:h.highlightedTokenIndex,showWhitespaceOverlays:u,showPunctuationOverlays:c}),g.jsx(oT,{ref:a,onSendMessage:w.sendMessage,isLoading:w.isLoading,isStreaming:w.isStreaming,canSubmit:o===null,blockedSendMessage:(o==null?void 0:o.description)??null,onBlockedSend:()=>{(o==null?void 0:o.kind)==="missing-settings"&&i(),o&&nn("Cannot send request",{description:o.description})},onCancel:w.cancelStream,parameters:n,onParametersChange:r,showWhitespaceOverlays:u,showPunctuationOverlays:c,onReadabilityChange:x=>{typeof x.showWhitespace=="boolean"&&d(x.showWhitespace),typeof x.showPunctuation=="boolean"&&y(x.showPunctuation)},onClearHistory:w.clearHistory})]}),g.jsx(bR,{completion:S,isLoadingChart:w.isChartPending,onTokenClick:x=>h.scrollToToken(x),onTokenHover:h.handleChartHover})]})}const kT=({onApplyPreset:e})=>{const t=()=>e({temperature:0,top_p:1}),n=()=>e({temperature:1.2,top_p:1});return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ve,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs",onClick:t,"aria-label":"Apply Deterministic preset",children:"Deterministic"}),g.jsx(Ve,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs",onClick:n,"aria-label":"Apply Creative preset",children:"Creative"})]})};function NT(){const[e,t]=SC(),n=e.get("model"),r=aR(e);return{selectedModelId:n,setSelectedModelId(o){const s=e.get("model"),i=typeof o=="function"?o(s):o,a=Ru(e,i,r);a.toString()!==e.toString()&&t(a,{replace:!0})},runParameters:r,setRunParameters(o){const s=im(r,typeof o=="function"?o(r):o),i=Ru(e,n,s);i.toString()!==e.toString()&&t(i,{replace:!0})},applyRunParameterPatch(o){const s=im(r,o),i=Ru(e,n,s);i.toString()!==e.toString()&&t(i,{replace:!0})}}}function PT(){const[e,t]=f.useState(()=>VN()),n=f.useMemo(()=>us(e),[e]),r=s=>{t(WN(s))},o=()=>{HN(),t({apiKey:"",baseUrl:""})};return{settings:e,connection:n,resolvedBaseUrl:n.resolvedBaseUrl,hasSavedSettings:n.hasSavedSettings,saveSettings:r,clearSettings:o}}const cd={models(e){return["provider","models",e.cacheKey]},modelCapability(e,t){return["provider","model-capability",e.cacheKey,t]}};function RT(e,t){const[n,r]=f.useState(e);return f.useEffect(()=>{const o=window.setTimeout(()=>{r(e)},t);return()=>{window.clearTimeout(o)}},[t,e]),n}function TT(e,t){var l,u;const n="resolvedBaseUrl"in e?e:us(e),r=RT(t,500),o=t!==r,s=n.hasSavedSettings,i=Gv();f.useEffect(()=>{!s||!r||!o||i.cancelQueries({queryKey:cd.modelCapability(n,r)})},[r,s,o,i,n]);const a=qv({queryKey:r?cd.modelCapability(n,r):["provider","model-capability",n.cacheKey,"idle"],queryFn:async({signal:d})=>pT(n,r,d),enabled:s&&!!r,staleTime:3e4,gcTime:5*60*1e3,retry:!1,refetchOnWindowFocus:!1});return s&&t&&o?{status:"checking",message:null,isLoading:!0}:a.isLoading||a.isFetching?{status:"checking",message:null,isLoading:!0}:a.isError?{status:"unknown-transient",message:a.error.message,isLoading:!1}:{status:((l=a.data)==null?void 0:l.status)??"idle",message:((u=a.data)==null?void 0:u.message)??null,isLoading:!1}}function _T(e){const t="resolvedBaseUrl"in e?e:us(e),n=qv({queryKey:cd.models(t),queryFn:async()=>fT(t),enabled:t.hasSavedSettings,staleTime:5*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{models:n.data??[],isLoading:n.isLoading,isError:!!n.isError,errorMessage:n.isError?n.error.message:null}}const jT=()=>{const[e,t]=f.useState(!1),{settings:n,connection:r,resolvedBaseUrl:o,hasSavedSettings:s,saveSettings:i,clearSettings:a}=PT(),{selectedModelId:l,setSelectedModelId:u,runParameters:d,setRunParameters:c,applyRunParameterPatch:y}=NT(),{models:p,isLoading:w,isError:h,errorMessage:S}=_T(r),v=p.find(k=>k.id===l)??null,m=TT(r,(v==null?void 0:v.id)??null);f.useEffect(()=>{if(!s||p.length===0||(l?p.some(P=>P.id===l):!1))return;const N=p[0]??null;if(!N){u(null);return}u(N.id),l&&nn("Model updated",{description:`Selected ${N.name}`})},[s,p,l,u]);const x=f.useRef(null);f.useEffect(()=>{if(!v||m.status!=="unsupported")return;const k=`${o}:${v.id}`;x.current!==k&&(x.current=k,nn("Selected model is incompatible",{description:m.message??"This model does not return logprobs and cannot be used here."}))},[m.message,m.status,o,v]);const b=f.useMemo(()=>s?w?{title:"Loading models",description:"Fetching models from the configured provider.",kind:"loading-models"}:h?{title:"Model discovery failed",description:S??"The provider did not return a usable models response.",kind:"model-error"}:v?m.status==="checking"?{title:"Checking logprobs support",description:"Verifying that the selected model supports logprobs.",kind:"checking-capability"}:m.status==="unsupported"?{title:"Selected model does not support logprobs",description:m.message??"Choose a different model. This app requires logprobs for analysis.",kind:"unsupported-model"}:null:{title:"No model selected",description:"Choose a provider model before sending a prompt.",kind:"missing-model"}:{title:"Connection settings required",description:"Add an API key before loading models or generating completions.",kind:"missing-settings"},[m.message,m.status,S,s,h,w,v]),C=f.useMemo(()=>m.status!=="unknown-transient"?null:{title:"Unable to verify logprobs support",description:m.message??"Capability probing failed. You can still try a generation request."},[m.message,m.status]);return g.jsxs("div",{className:"flex h-screen flex-col",children:[g.jsx(QN,{open:e,onOpenChange:t,settings:n,resolvedBaseUrl:o,onSave:k=>{i(k),nn("Connection settings saved",{description:"Refreshing provider models."})},onClear:()=>{a(),u(null),nn("Connection settings cleared")}}),g.jsxs("header",{className:"flex items-center justify-between border-b bg-surface/50 px-6 py-4",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("h1",{className:"text-xl font-bold text-foreground",children:"Logprob Visualizer"}),g.jsx(lR,{models:p,selectedModelId:l,onModelChange:u,temperature:d.temperature,disabled:!s,isLoading:w,onTemperatureChange:k=>y({temperature:Bn("temperature",k)})}),g.jsx(kT,{onApplyPreset:y})]}),g.jsx("div",{className:"flex items-center gap-4",children:g.jsxs(Ve,{type:"button",size:"sm",onClick:()=>t(!0),variant:s?"outline":"default",className:"h-8 px-2 text-xs",children:[g.jsx(OC,{className:"mr-2 h-4 w-4"}),s?"Connection Settings":"Set API Key"]})})]}),g.jsx(ET,{connection:r,selectedModelId:(v==null?void 0:v.id)??null,runParameters:d,setRunParameters:c,blockState:b,capabilityNotice:C,onOpenSettings:()=>t(!0)},r.cacheKey)]})},MT=({...e})=>g.jsx(dE,{theme:"light",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e}),OT=new cb,AT=()=>g.jsx(db,{client:OT,children:g.jsxs(rT,{children:[g.jsx(MT,{}),g.jsx(wC,{children:g.jsxs(gC,{children:[g.jsx(Uc,{path:"/",element:g.jsx(jT,{})}),g.jsx(Uc,{path:"*",element:g.jsx(bC,{})})]})})]})});Lv(document.getElementById("root")).render(g.jsx(AT,{}));
|