pinomad 0.5.0 → 0.6.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/dist/{chunk-ebfaf3k2.js → chunk-0xh6cy9v.js} +1 -1
- package/dist/{chunk-gqr7ahv4.js → chunk-367n9je8.js} +2 -2
- package/dist/{chunk-f0v3sht0.js → chunk-3dnnaz4j.js} +10 -8
- package/dist/{chunk-d4wdt5qs.js → chunk-4btj08we.js} +92 -175
- package/dist/{chunk-kmbh44dt.js → chunk-7qb9tq54.js} +42 -6
- package/dist/{chunk-zttf1hvh.js → chunk-7s1f4z4g.js} +4 -3
- package/dist/chunk-b1h374jr.js +159 -0
- package/dist/{chunk-1d9sppj0.js → chunk-c8nxym2z.js} +1 -1
- package/dist/{chunk-aqj4wg33.js → chunk-d5ypmmr7.js} +29 -12
- package/dist/{chunk-m4q9wafw.js → chunk-d93kvxvc.js} +5 -2
- package/dist/chunk-ggb1taqy.js +16 -0
- package/dist/chunk-jn7y815x.js +79 -0
- package/dist/{chunk-9d59jjmt.js → chunk-k2s1hfq5.js} +36 -10
- package/dist/chunk-kzbzacz9.js +12 -0
- package/dist/{chunk-hsp12cjt.js → chunk-n4tjhcb7.js} +17 -17
- package/dist/{chunk-cjfmfyjb.js → chunk-ngf1zatm.js} +7 -6
- package/dist/{chunk-4by4x5c4.js → chunk-wqvp1fwh.js} +17 -4
- package/dist/{chunk-26d04z02.js → chunk-ywmm63ks.js} +7 -3
- package/dist/chunk-znhn8af7.js +33 -0
- package/dist/pinomad.js +36 -12
- package/package.json +1 -1
- package/web/assets/index-C_aU_ZiV.js +383 -0
- package/web/assets/index-DaPcXZPM.css +1 -0
- package/web/index.html +2 -2
- package/dist/chunk-5ng86fmy.js +0 -14
- package/dist/chunk-crv3dqzp.js +0 -63
- package/web/assets/index-BkF0-im5.css +0 -1
- package/web/assets/index-D4lgm3Y4.js +0 -383
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
var NC=Object.defineProperty;var ib=e=>{throw TypeError(e)};var MC=(e,t,n)=>t in e?NC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>MC(e,typeof t!="symbol"?t+"":t,n),s1=(e,t,n)=>t.has(e)||ib("Cannot "+n);var G=(e,t,n)=>(s1(e,t,"read from private field"),n?n.call(e):t.get(e)),ze=(e,t,n)=>t.has(e)?ib("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Se=(e,t,n,s)=>(s1(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),V=(e,t,n)=>(s1(e,t,"access private method"),n);var ed=(e,t,n,s)=>({set _(r){Se(e,t,r,n)},get _(){return G(e,t,s)}});function RC(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in e)){const i=Object.getOwnPropertyDescriptor(s,r);i&&Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>s[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function IC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H5={exports:{}},Wh={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and 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 _C=Symbol.for("react.transitional.element"),OC=Symbol.for("react.fragment");function P5(e,t,n){var s=null;if(n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:_C,type:e,key:s,ref:t!==void 0?t:null,props:n}}Wh.Fragment=OC;Wh.jsx=P5;Wh.jsxs=P5;H5.exports=Wh;var o=H5.exports,U5={exports:{}},ke={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and 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 o0=Symbol.for("react.transitional.element"),DC=Symbol.for("react.portal"),LC=Symbol.for("react.fragment"),BC=Symbol.for("react.strict_mode"),qC=Symbol.for("react.profiler"),HC=Symbol.for("react.consumer"),PC=Symbol.for("react.context"),UC=Symbol.for("react.forward_ref"),FC=Symbol.for("react.suspense"),GC=Symbol.for("react.memo"),F5=Symbol.for("react.lazy"),VC=Symbol.for("react.activity"),WC=Symbol.for("react.view_transition"),ab=Symbol.iterator;function KC(e){return e===null||typeof e!="object"?null:(e=ab&&e[ab]||e["@@iterator"],typeof e=="function"?e:null)}var G5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V5=Object.assign,W5={};function zl(e,t,n){this.props=e,this.context=t,this.refs=W5,this.updater=n||G5}zl.prototype.isReactComponent={};zl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};zl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function K5(){}K5.prototype=zl.prototype;function l0(e,t,n){this.props=e,this.context=t,this.refs=W5,this.updater=n||G5}var c0=l0.prototype=new K5;c0.constructor=l0;V5(c0,zl.prototype);c0.isPureReactComponent=!0;var ob=Array.isArray;function Dp(){}var Qe={H:null,A:null,T:null,S:null},X5=Object.prototype.hasOwnProperty;function u0(e,t,n){var s=n.ref;return{$$typeof:o0,type:e,key:t,ref:s!==void 0?s:null,props:n}}function XC(e,t){return u0(e.type,t,e.props)}function d0(e){return typeof e=="object"&&e!==null&&e.$$typeof===o0}function ZC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lb=/\/+/g;function r1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ZC(""+e.key):t.toString(36)}function YC(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Dp,Dp):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function yo(e,t,n,s,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case o0:case DC:a=!0;break;case F5:return a=e._init,yo(a(e._payload),t,n,s,r)}}if(a)return r=r(e),a=s===""?"."+r1(e,0):s,ob(r)?(n="",a!=null&&(n=a.replace(lb,"$&/")+"/"),yo(r,t,n,"",function(u){return u})):r!=null&&(d0(r)&&(r=XC(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(lb,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=s===""?".":s+":";if(ob(e))for(var c=0;c<e.length;c++)s=e[c],i=l+r1(s,c),a+=yo(s,t,n,i,r);else if(c=KC(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,i=l+r1(s,c++),a+=yo(s,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return yo(YC(e),t,n,s,r);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 a}function td(e,t,n){if(e==null)return e;var s=[],r=0;return yo(e,s,"","",function(i){return t.call(n,i,r++)}),s}function QC(e){if(e._status===-1){var t=e._result,n=t();n.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s,n.status===void 0&&(n.status="fulfilled",n.value=s))},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s,n.status===void 0&&(n.status="rejected",n.reason=s))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var cb=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Z5(e){var t=Qe.T,n={};n.types=t!==null?t.types:null,Qe.T=n;try{var s=e(),r=Qe.S;r!==null&&r(n,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Dp,cb)}catch(i){cb(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Qe.T=t}}function Y5(e){var t=Qe.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else Z5(Y5.bind(null,e))}var JC={map:td,forEach:function(e,t,n){td(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return td(e,function(){t++}),t},toArray:function(e){return td(e,function(t){return t})||[]},only:function(e){if(!d0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=VC;ke.Children=JC;ke.Component=zl;ke.Fragment=LC;ke.Profiler=qC;ke.PureComponent=l0;ke.StrictMode=BC;ke.Suspense=FC;ke.ViewTransition=WC;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Qe;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Qe.H.useMemoCache(e)}};ke.addTransitionType=Y5;ke.cache=function(e){return function(){return e.apply(null,arguments)}};ke.cacheSignal=function(){return null};ke.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=V5({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!X5.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(s[i]=t[i]);var i=arguments.length-2;if(i===1)s.children=n;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];s.children=a}return u0(e.type,r,s)};ke.createContext=function(e){return e={$$typeof:PC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:HC,_context:e},e};ke.createElement=function(e,t,n){var s,r={},i=null;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)X5.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(e&&e.defaultProps)for(s in a=e.defaultProps,a)r[s]===void 0&&(r[s]=a[s]);return u0(e,i,r)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:UC,render:e}};ke.isValidElement=d0;ke.lazy=function(e){return{$$typeof:F5,_payload:{_status:-1,_result:e},_init:QC}};ke.memo=function(e,t){return{$$typeof:GC,type:e,compare:t===void 0?null:t}};ke.startTransition=Z5;ke.unstable_useCacheRefresh=function(){return Qe.H.useCacheRefresh()};ke.use=function(e){return Qe.H.use(e)};ke.useActionState=function(e,t,n){return Qe.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return Qe.H.useCallback(e,t)};ke.useContext=function(e){return Qe.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return Qe.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return Qe.H.useEffect(e,t)};ke.useEffectEvent=function(e){return Qe.H.useEffectEvent(e)};ke.useId=function(){return Qe.H.useId()};ke.useImperativeHandle=function(e,t,n){return Qe.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Qe.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Qe.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Qe.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return Qe.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return Qe.H.useReducer(e,t,n)};ke.useRef=function(e){return Qe.H.useRef(e)};ke.useState=function(e){return Qe.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Qe.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Qe.H.useTransition()};ke.version="19.3.0";U5.exports=ke;var x=U5.exports;const Kh=IC(x),Q5=RC({__proto__:null,default:Kh},[x]);var Jl={},ub;function eE(){if(ub)return Jl;ub=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.styleq=void 0;var e=new WeakMap,t="$$css";function n(r){var i,a,l;return r!=null&&(i=r.disableCache===!0,a=r.disableMix===!0,l=r.transform),function(){for(var u=[],d="",f=null,h="",p=i?null:e,m=new Array(arguments.length),b=0;b<arguments.length;b++)m[b]=arguments[b];for(;m.length>0;){var y=m.pop();if(!(y==null||y===!1)){if(Array.isArray(y)){for(var g=0;g<y.length;g++)m.push(y[g]);continue}var k=l!=null?l(y):y;if(k.$$css!=null){var v="";if(p!=null&&p.has(k)){var w=p.get(k);w!=null&&(v=w[0],h=w[2],u.push.apply(u,w[1]),p=w[3])}else{var j=[];for(var S in k){var C=k[S];if(S===t){var E=k[S];E!==!0&&(h=h?E+"; "+h:E);continue}typeof C=="string"||C===null?u.includes(S)||(u.push(S),p!=null&&j.push(S),typeof C=="string"&&(v+=v?" "+C:C)):console.error("styleq: ".concat(S," typeof ").concat(String(C),' is not "string" or "null".'))}if(p!=null){var T=new WeakMap;p.set(k,[v,j,h,T]),p=T}}v&&(d=d?v+" "+d:v)}else if(a)f==null&&(f={}),f=Object.assign({},k,f);else{var $=null;for(var N in k){var A=k[N];A!==void 0&&(u.includes(N)||(A!=null&&(f==null&&(f={}),$==null&&($={}),$[N]=A),u.push(N),p=null))}$!=null&&(f=Object.assign($,f))}}}var M=[d,f,h];return M}}var s=Jl.styleq=n();return s.factory=n,Jl}var tE=eE();function q(...e){const[t,n,s]=tE.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),n!=null&&Object.keys(n).length>0&&(r.style=n),s!=null&&s!==""&&(r["data-style-src"]=s),r}const nE={"--color-accent":"light-dark(#0064E0, #2694FE)","--color-accent-muted":"light-dark(#0082FB33, #0082FB3F)","--color-on-accent":"light-dark(#FFFFFF, #FFFFFF)","--color-neutral":"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))","--color-background-surface":"light-dark(#FFFFFF, #1F1F22)","--color-background-body":"light-dark(#F1F4F7, #111112)","--color-overlay":"light-dark(#01122866, #11111299)","--color-overlay-hover":"light-dark(#0536590C, #FFFFFF0C)","--color-overlay-pressed":"light-dark(#05365919, #FFFFFF19)","--color-background-muted":"light-dark(#0536590C, #1111127F)","--color-text-primary":"light-dark(#0A1317, #DFE2E5)","--color-text-secondary":"light-dark(#4E606F, #AAAFB5)","--color-text-disabled":"light-dark(#A4B0BC, #6F747C)","--color-text-accent":"light-dark(#0064E0, #3E9EFB)","--color-on-dark":"light-dark(#FFFFFF, #FFFFFF)","--color-on-light":"light-dark(#000000, #000000)","--color-icon-accent":"light-dark(#0064E0, #2694FE)","--color-icon-primary":"light-dark(#0A1317, #DFE2E5)","--color-icon-secondary":"light-dark(#4E606F, #AAAFB5)","--color-icon-disabled":"light-dark(#A4B0BC, #6F747C)","--color-background-card":"light-dark(#FFFFFF, #1F1F22)","--color-background-popover":"light-dark(#FFFFFF, #28292C)","--color-background-inverted":"light-dark(#0A1317, #FFFFFF)","--color-background-error-inverted":"light-dark(#AA071E, #E3193B)","--color-success":"light-dark(#0D8626, #0D8626)","--color-success-muted":"light-dark(#0B991F33, #0B991F3F)","--color-on-success":"light-dark(#FFFFFF, #FFFFFF)","--color-error":"light-dark(#E3193B, #F5394F)","--color-error-muted":"light-dark(#E3193B33, #F5394F3F)","--color-on-error":"light-dark(#FFFFFF, #FFFFFF)","--color-warning":"light-dark(#E9AF08, #F2C00B)","--color-warning-muted":"light-dark(#E2A40033, #E2A4003F)","--color-on-warning":"light-dark(#0A1317, #0A1317)","--color-border":"light-dark(#05365919, #F2F4F619)","--color-border-emphasized":"light-dark(#CCD3DB, #494D53)","--color-skeleton":"light-dark(#CCD3DB, #5A5E66)","--color-track":"light-dark(#CCD3DB, #5A5E66)","--color-shadow":"light-dark(rgba(5, 54, 89, 0.1), rgba(0, 0, 0, 0.3))","--color-tint-hover":"light-dark(black, white)","--color-background-blue":"light-dark(#0171E333, #0171E333)","--color-border-blue":"light-dark(#0064E0, #2694FE)","--color-icon-blue":"light-dark(#0064E0, #2694FE)","--color-text-blue":"light-dark(#042F97, #AFD7FF)","--color-background-cyan":"light-dark(#03A7D733, #03A7D733)","--color-border-cyan":"light-dark(#089DD0, #0171A4)","--color-icon-cyan":"light-dark(#00ACC1, #26C6DA)","--color-text-cyan":"light-dark(#014975, #A1EEF9)","--color-background-gray":"light-dark(#0A131733, #666A724C)","--color-border-gray":"light-dark(#647685, #748695)","--color-icon-gray":"light-dark(#4E606F, #AAAFB5)","--color-text-gray":"light-dark(#0A1317, #E7EAED)","--color-background-green":"light-dark(#24BB5E33, #24BB5E33)","--color-border-green":"light-dark(#0D8626, #0B991F)","--color-icon-green":"light-dark(#0D8626, #26A756)","--color-text-green":"light-dark(#09441F, #A5F690)","--color-background-orange":"light-dark(#F2790233, #F2790233)","--color-border-orange":"light-dark(#EB6E00, #B34A01)","--color-icon-orange":"light-dark(#E9690B, #FB8C00)","--color-text-orange":"light-dark(#6B2203, #FDB876)","--color-background-pink":"light-dark(#E638B333, #E638B333)","--color-border-pink":"light-dark(#F351C0, #C02294)","--color-icon-pink":"light-dark(#C2185B, #EC407A)","--color-text-pink":"light-dark(#650053, #FEADE3)","--color-background-purple":"light-dark(#7952FF33, #7952FF33)","--color-border-purple":"light-dark(#9081FF, #7340FE)","--color-icon-purple":"light-dark(#5B08D8, #7952FF)","--color-text-purple":"light-dark(#3E0697, #B3B0FE)","--color-background-red":"light-dark(#E3193B33, #E3193B33)","--color-border-red":"light-dark(#E3193B, #F5394F)","--color-icon-red":"light-dark(#D31130, #E3193B)","--color-text-red":"light-dark(#7B0210, #FFB2B8)","--color-background-teal":"light-dark(#0DB7AF33, #0DB7AF33)","--color-border-teal":"light-dark(#08A3A3, #08767D)","--color-icon-teal":"light-dark(#009688, #26A69A)","--color-text-teal":"light-dark(#083943, #40DCCD)","--color-background-yellow":"light-dark(#E2A40033, #E2A40033)","--color-border-yellow":"light-dark(#C58600, #B47700)","--color-icon-yellow":"light-dark(#FBC02D, #FFEE58)","--color-text-yellow":"light-dark(#753F07, #FBCE03)"},sE={"--spacing-0":"0px","--spacing-0-5":"2px","--spacing-1":"4px","--spacing-1-5":"6px","--spacing-2":"8px","--spacing-3":"12px","--spacing-4":"16px","--spacing-5":"20px","--spacing-6":"24px","--spacing-7":"28px","--spacing-8":"32px","--spacing-9":"36px","--spacing-10":"40px","--spacing-11":"44px","--spacing-12":"48px"},is={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},rE={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},iE={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},aE={"--shadow-low":"0px 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-med":"0px 1px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 12px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-high":"0px 2px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 8px 24px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3))","--shadow-inset-hover":"inset 0px 0px 0px 2px light-dark(rgba(5, 54, 89, 0.15), rgba(223, 226, 229, 0.2))","--shadow-inset-selected":"inset 0px 0px 0px 2px rgba(1, 113, 227, 0.5)","--shadow-inset-success":"inset 0px 0px 0px 2px rgba(38, 167, 86, 0.3)","--shadow-inset-warning":"inset 0px 0px 0px 2px rgba(226, 164, 0, 0.3)","--shadow-inset-error":"inset 0px 0px 0px 2px rgba(227, 25, 59, 0.3)"},oE={"--duration-fast-min":"130ms","--duration-fast":"175ms","--duration-fast-max":"230ms","--duration-medium-min":"310ms","--duration-medium":"410ms","--duration-medium-max":"550ms","--duration-slow-min":"730ms","--duration-slow":"975ms","--duration-slow-max":"1300ms"},lE={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},cE={"--font-family-body":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'"SF Mono", Monaco, Consolas, monospace',"--font-family-heading":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},uE={"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem"},dE={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},fE={"--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-semibold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-semibold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.2414"},f0=x.createContext(null);f0.displayName="LayoutAreaContext";const hE={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},Xh=x.createContext(hE);Xh.displayName="LayoutSlotsContext";const Zh=x.createContext(null);Zh.displayName="LayoutDividerContext";const xE={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},pE={start:{kjj79g:"x1nhvcw1",$$css:!0},center:{kjj79g:"xl56j7k",$$css:!0},end:{kjj79g:"x13a6bvl",$$css:!0},between:{kjj79g:"x1qughib",$$css:!0},around:{kjj79g:"x1l1ennw",$$css:!0},evenly:{kjj79g:"xaw8158",$$css:!0}},gE={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},mE={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},yE={stack:{k1xSpc:"x78zum5",$$css:!0}},kE={0:{k1C7PZ:"x1o57wo1",khm7nJ:"x6yxi7o",$$css:!0},1:{k1C7PZ:"x1lfs0n9",khm7nJ:"x1ngg2t4",$$css:!0},2:{k1C7PZ:"xak3so",khm7nJ:"x1x7z4sm",$$css:!0},3:{k1C7PZ:"xewh9hi",khm7nJ:"x4olc9o",$$css:!0},4:{k1C7PZ:"xty4p9g",khm7nJ:"xtx9w7w",$$css:!0},5:{k1C7PZ:"x1eqhezk",khm7nJ:"x1iu6piu",$$css:!0},6:{k1C7PZ:"x3qlgwd",khm7nJ:"xczp1bk",$$css:!0},8:{k1C7PZ:"xicv188",khm7nJ:"xgx0vcf",$$css:!0},10:{k1C7PZ:"x1p37tyl",khm7nJ:"x1xpicb7",$$css:!0},"0.5":{k1C7PZ:"x1kihgfc",khm7nJ:"x1tw44j4",$$css:!0},"1.5":{k1C7PZ:"x1thn6ci",khm7nJ:"xhq53yo",$$css:!0}};function Lp({crossAlign:e,direction:t,gap:n,mainAlign:s,wrap:r}){return[yE.stack,gE[t],n!=null&&kE[n],e!=null&&xE[e],s!=null&&pE[s],r!=null&&mE[r]]}const bE={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},vE={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},wE={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function jE({crossAlignSelf:e,size:t}={}){return[bE.reset,wE[t??"static"],e!=null&&vE[e]]}function h0(e){return e==="base"?"":e.split("+").map(t=>{const[n,s]=t.split(":");return s===void 0?`.${n}`:/^\d/.test(s)?`.${n}-${s}`:`.${s}`}).join("")}function SE(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function nd(e,t){const n={...e,...t},s=[e.className,t.className].filter(Boolean).join(" ");s?n.className=s:delete n.className;const r=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return r?n.style=r:delete n.style,n}function F(e,t,n,s){if(typeof e=="string"){const l=e,c=t??{className:""},u=n;let d=c.className?`${l} ${c.className}`:l;u&&(d=`${d} ${u}`);const f=s&&c.style?{...c.style,...s}:s||c.style;return{...c,className:d,style:f}}let a=nd(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?a=nd(a,{className:n}):n!=null&&(a=nd(a,{style:n})),s!=null&&(a=nd(a,{style:s})),a}function it(...e){return t=>{const n=[];for(const s of e)if(typeof s=="function"){const r=s(t);typeof r=="function"&&n.push(r)}else s!=null&&(s.current=t);if(n.length>0)return()=>{for(const s of n)s()}}}function Yh(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const x0="astryx",J5=x0,Qh=x0,$E=x0;function Bp(e){return`${J5}-${e}`}function Cn(e){return`data-${Qh}-${e}`}function CE(e){return`--${$E}-${e}`}function EE(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function TE(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function zE(e,t){const n=[Bp(e)];if(t)for(const[s,r]of Object.entries(t))r!=null&&n.push(TE(s,String(r)));return n.join(" ")}function AE(e){const t={};if(e)for(const[n,s]of Object.entries(e))s!=null&&(t[EE(n)]=String(s));return t}function U(e,t){return{className:zE(e,t),...AE(t)}}function db(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function NE(e){var a;if(!e.some(l=>db(l)!=null))return[{heading:null,items:e}];const n=[],s=new Map,r=[];for(const l of e){const c=db(l);c!=null?(s.has(c)||(n.push(c),s.set(c,[])),(a=s.get(c))==null||a.push(l)):r.push(l)}const i=n.map(l=>({heading:l,items:s.get(l)??[]}));return r.length>0&&i.push({heading:null,items:r}),i}let ia=null;const Bf=new Map;function ME(){return ia||(ia=new ResizeObserver(e=>{for(const t of e){const n=Bf.get(t.target);n&&n(t)}})),ia}function p0(e,t){Bf.set(e,t),ME().observe(e),t({target:e})}function g0(e){Bf.delete(e),ia&&(ia.unobserve(e),Bf.size===0&&(ia.disconnect(),ia=null))}function i1(e){return e!=null&&typeof e!="boolean"&&e!==""}function fb(...e){const t=e.flatMap(n=>typeof n=="string"?n.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(" ")}function e3(e,t=[],n){return{ariaLabelledBy:n?fb(n.labelID,e):void 0,ariaDescribedBy:fb(n==null?void 0:n.describedByIDs,...t)}}const RE={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1}},qf=(e,t,n)=>Math.max(t,Math.min(n,e));function IE(e){return e.split("").map(t=>t+t).join("")}function _E(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?IE(t):t;return n.length!==6&&n.length!==8||!/^[0-9a-fA-F]+$/.test(n)?null:{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:n.length===8?parseInt(n.slice(6,8),16)/255:1}}function OE(e){const t=e.indexOf("(");if(t===-1||!e.trim().endsWith(")"))return null;const s=e.slice(t+1,e.lastIndexOf(")")).replace(/\//g," ").split(/[\s,]+/).map(u=>u.trim()).filter(Boolean);if(s.length<3)return null;const r=u=>{const d=u.endsWith("%")?parseFloat(u)/100*255:parseFloat(u);return qf(d,0,255)},i=r(s[0]),a=r(s[1]),l=r(s[2]);if([i,a,l].some(Number.isNaN))return null;let c=1;if(s.length>=4){const u=s[3];if(c=u.endsWith("%")?parseFloat(u)/100:parseFloat(u),Number.isNaN(c))return null;c=qf(c,0,1)}return{r:i,g:a,b:l,a:c}}function hb(e){const t=e.trim(),n=RE[t.toLowerCase()];return n?{...n}:t.startsWith("#")?_E(t):/^rgba?\(/i.test(t)?OE(t):null}function DE(e,t,n){const s=r=>qf(Math.round(r),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${s(e)}${s(t)}${s(n)}`}function LE({r:e,g:t,b:n,a:s}){if(s>=1)return DE(e,t,n);const r=i=>qf(Math.round(i),0,255);return`rgba(${r(e)}, ${r(t)}, ${r(n)}, ${parseFloat(s.toFixed(4))})`}function BE(e,t){return`${e}: ${t}`}function ga(e,t,...n){}function t3(e,t,...n){console.error(BE(e,t),...n)}function m0(e,t,n,...s){}const qE={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},dl={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[qE,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},n3={0:"spacing0",.5:"spacing0_5",1:"spacing1",1.5:"spacing1_5",2:"spacing2",3:"spacing3",4:"spacing4",5:"spacing5",6:"spacing6",8:"spacing8",10:"spacing10"},Al={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},Nl={0:{"--container-padding-inline-start":"x1gu2k80","--container-padding-inline-end":"x91ghl5",$$css:!0},1:{"--container-padding-inline-start":"x1cvlban","--container-padding-inline-end":"x2oyxnl",$$css:!0},2:{"--container-padding-inline-start":"x1xlrr2o","--container-padding-inline-end":"xcas3b9",$$css:!0},3:{"--container-padding-inline-start":"xfdwxua","--container-padding-inline-end":"xu0ipoa",$$css:!0},4:{"--container-padding-inline-start":"x1dlhslv","--container-padding-inline-end":"xs0pscg",$$css:!0},5:{"--container-padding-inline-start":"x1s81nki","--container-padding-inline-end":"xgkj7vj",$$css:!0},6:{"--container-padding-inline-start":"x1ep0dkj","--container-padding-inline-end":"x94cj42",$$css:!0},8:{"--container-padding-inline-start":"xw1diwv","--container-padding-inline-end":"x1b9k1pi",$$css:!0},10:{"--container-padding-inline-start":"xserb3f","--container-padding-inline-end":"xx5lg5w",$$css:!0},"0.5":{"--container-padding-inline-start":"x14ws0sr","--container-padding-inline-end":"x1wz3t3y",$$css:!0},"1.5":{"--container-padding-inline-start":"x176g23i","--container-padding-inline-end":"xntetml",$$css:!0}},Ml={0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},1:{"--container-padding-block-start":"xnsckjb",$$css:!0},2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},4:{"--container-padding-block-start":"xm01sq8",$$css:!0},5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},8:{"--container-padding-block-start":"xfv60at",$$css:!0},10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},"0.5":{"--container-padding-block-start":"xvdf9ev",$$css:!0},"1.5":{"--container-padding-block-start":"x1kbx601",$$css:!0}},Rl={0:{"--container-padding-block-end":"xkunwnr",$$css:!0},1:{"--container-padding-block-end":"x57a7ii",$$css:!0},2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},4:{"--container-padding-block-end":"x4hfsld",$$css:!0},5:{"--container-padding-block-end":"xbib2ws",$$css:!0},6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},8:{"--container-padding-block-end":"x8lgq76",$$css:!0},10:{"--container-padding-block-end":"x15vxphk",$$css:!0},"0.5":{"--container-padding-block-end":"x1cao3zv",$$css:!0},"1.5":{"--container-padding-block-end":"xv53x8y",$$css:!0}},HE={0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},"0.5":{"--layout-padding-outer-x":"xihiwg7",$$css:!0},"1.5":{"--layout-padding-outer-x":"x1u93lgd",$$css:!0}},PE={0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},"0.5":{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},"1.5":{"--layout-padding-outer-y":"xd3dqby",$$css:!0}},UE={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",$$css:!0}},FE={0:{kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},Fr={layoutOuter:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",$$css:!0},layoutInner:{"--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},fill:{kZKoxP:"x12qplqi",kskxy:"xenllk4",$$css:!0},auto:{kAzted:"x1us19tq",$$css:!0},middle:{kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},fullBleed:{"--layout-padding-outer-x":"x1wbjvqu","--layout-padding-outer-y":"xzxxx64",$$css:!0}},GE={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},xb={contentWidthVar:e=>[{"--layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?"x4906uf":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x---layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?typeof e=="number"?`${e}px`:e:void 0}],contentWidth:e=>[GE,{ks0D6T:(typeof e=="number"?`${e}px`:e)!=null?"xf68679":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function ec({area:e,children:t}){return t==null?null:o.jsx(f0,{value:e,children:t})}const VE={"x-default-marker":"x-default-marker",$$css:!0};function Jn({children:e,content:t,contentWidth:n,defaultHasDividers:s,end:r,footer:i,header:a,height:l="fill",padding:c,ref:u,start:d,xstyle:f,className:h,style:p}){const m=l==="fill",b=t??e,y=x.useMemo(()=>s!=null?{defaultHasDividers:s}:null,[s]),g=a!=null,k=i!=null,v=d!=null,w=r!=null,j=x.useMemo(()=>({hasHeader:g,hasFooter:k,hasStart:v,hasEnd:w}),[g,k,v,w]),S=o.jsx(Xh,{value:j,children:o.jsx("div",{ref:u,...F(U("layout",{height:l}),q(Fr.layoutOuter,m?Fr.fill:Fr.auto,f),h,p),children:o.jsxs("div",{...q(VE,Fr.layoutInner,...Lp({direction:"vertical"}),m?Fr.fill:Fr.auto,c===0&&Fr.fullBleed,c!=null&&HE[c],c!=null&&PE[c],n!=null&&xb.contentWidthVar(n)),children:[o.jsx(ec,{area:"header",children:a}),o.jsxs("div",{...q(...Lp({direction:"horizontal"}),Fr.middle,n!=null&&xb.contentWidth(n)),children:[o.jsx(ec,{area:"start",children:d}),o.jsx("div",{...q(...jE({size:"fill"})),children:o.jsx(ec,{area:"content",children:b})}),o.jsx(ec,{area:"end",children:r})]}),o.jsx(ec,{area:"footer",children:i})]})})});return y!=null?o.jsx(Zh,{value:y,children:S}):S}Jn.displayName="Layout";const sd={header:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"x81pis9",kGO01o:"xg476vw","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xzz8v79","--container-padding-block-end":"xi9ns85",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kt9PQ7:"xso031l",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},WE={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Hf({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=x.use(Zh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return o.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":h||void 0,...F(U("layout-header"),q(sd.header,WE.sizing(n??null),h&&sd.divider,a),l,c),...d,children:o.jsx("div",{...q(sd.inner,p&&sd.fullBleed,r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r],r!=null&&Rl[r]),children:e})})}Hf.displayName="LayoutHeader";const Cs={panel:{kB7OPa:"x9f619",kmuXW:"x2lah0s",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a",kGO01o:"xg476vw","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},startPanel:{kZCmMZ:"x139j0dd",$$css:!0},endPanel:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9",$$css:!0},noFooter:{kGO01o:"xon7vh3",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},dividerEnd:{ke9TFa:"x1lun4ml",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0},dividerStart:{k2ei4v:"xpilrb4",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",$$css:!0},collapseStart:{keTefX:"x1wim8z0",$$css:!0},collapseEnd:{k71WvV:"x1kpg4um",$$css:!0}},KE={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function y0({children:e,hasDivider:t=!1,isScrollable:n=!0,label:s,padding:r,role:i,width:a,resizable:l,xstyle:c,className:u,style:d,ref:f,...h}){const p=x.use(f0),{hasHeader:m,hasFooter:b}=x.use(Xh),y=l?l._size:a,g=p==="start",k=p==="end",v=r===0,w=!t&&!v&&r==null,j=g?Cs.dividerEnd:k?Cs.dividerStart:null,S=g?Cs.collapseEnd:k?Cs.collapseStart:null;return o.jsx("div",{ref:f,role:i,"aria-label":s,...F(U("layout-panel"),q(Cs.panel,KE.sizing(y??null),g&&!v&&r==null&&Cs.startPanel,k&&!v&&r==null&&Cs.endPanel,!m&&!v&&r==null&&Cs.noHeader,!b&&!v&&r==null&&Cs.noFooter,n&&Cs.scrollable,v&&Cs.fullBleed,r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r],r!=null&&Rl[r],t&&j,w&&S,c),u,d),...h,children:e})}y0.displayName="LayoutPanel";const Bi={content:{kB7OPa:"x9f619",kZKoxP:"x5yr21d",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a x1ioh5az",kGO01o:"xg476vw xsg11nj","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},noStart:{kZCmMZ:"x139j0dd","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r",$$css:!0},noEnd:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9","--container-padding-block-start":"xzz8v79",$$css:!0},noFooter:{kGO01o:"xon7vh3","--container-padding-block-end":"x1xjq73n",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0}};function es({children:e,isScrollable:t=!0,padding:n,label:s,role:r,xstyle:i,className:a,style:l,ref:c,...u}){const{hasHeader:d,hasFooter:f,hasStart:h,hasEnd:p}=x.use(Xh),m=n===0;return o.jsx("div",{ref:c,role:r,"aria-label":s,...F(U("layout-content"),q(Bi.content,!h&&!m&&n==null&&Bi.noStart,!p&&!m&&n==null&&Bi.noEnd,!d&&!m&&n==null&&Bi.noHeader,!f&&!m&&n==null&&Bi.noFooter,t&&Bi.scrollable,m&&Bi.fullBleed,n!=null&&Al[n],n!=null&&Nl[n],n!=null&&Ml[n],n!=null&&Rl[n],i),a,l),...u,children:e})}es.displayName="LayoutContent";function s3(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function r3(e,t){e.style.anchorName=t.join(", ")}function XE(e,t){const n=s3(e);n.includes(t)||(n.push(t),r3(e,n))}function ZE(e,t){r3(e,s3(e).filter(n=>n!==t))}const a1={base:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x1lziwak",k71WvV:"x14z9mp",kLKAdn:"xexx8yu",kGO01o:"x18d9i69",kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVQacm:"x1rea2x4",kMv6JI:"x9ynric",kWkggS:"xjbqb8w",$$css:!0},fixed:{kVAEAm:"xixxii4",$$css:!0}};function YE(e="above",t="center"){if(e==="above"||e==="below"){const s=e==="above"?"self-block-start":"self-block-end";return t==="start"?`${s} span-self-inline-end`:t==="end"?`${s} span-self-inline-start`:s}const n=e==="start"?"self-inline-start":"self-inline-end";return t==="start"?`${n} span-self-block-end`:t==="end"?`${n} span-self-block-start`:n}function QE(e="above",t="center"){const n="flip-block, flip-inline, flip-block flip-inline";if(t!=="center")return n;if(e==="above"||e==="below"){const[i,a]=e==="above"?["top","bottom"]:["bottom","top"];return`${n}, ${i} span-left, ${i} span-right, ${a} span-left, ${a} span-right`}const[s,r]=e==="start"?["left","right"]:["right","left"];return`${n}, ${s} span-top, ${s} span-bottom, ${r} span-top, ${r} span-bottom`}function Il(e){const{mode:t,onShow:n,onHide:s,lightDismiss:r=!1}=e,i=x.useId(),a=`--astryx-layer-${i.replace(/:/g,"")}`,[l,c]=x.useState(!1),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useCallback(()=>{const S=u.current;S&&!f.current&&(typeof S.showPopover=="function"?S.showPopover():S.style.display="block",f.current=!0,c(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(f.current){const S=u.current;S&&(typeof S.hidePopover=="function"?S.hidePopover():S.style.display="none"),f.current=!1,c(!1),s==null||s()}},[s]),m=t==="context"?S=>{d.current&&d.current!==S&&ZE(d.current,a),S&&XE(S,a),d.current=S}:void 0,b=x.useCallback(S=>{S.newState==="closed"&&f.current&&(f.current=!1,c(!1),s==null||s())},[s]),y=x.useRef(null),g=x.useRef(null),k=x.useCallback((S,C)=>{y.current&&g.current&&(y.current!==S||g.current!==C)&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null),S&&y.current!==S&&(S.addEventListener("toggle",C),y.current=S,g.current=C)},[]),v=x.useCallback(S=>{u.current=S,k(S,b)},[b,k]);x.useEffect(()=>(u.current&&k(u.current,b),()=>{y.current&&g.current&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null)}),[b,k]);const w=x.useCallback((S,C)=>{const{placement:E="above",alignment:T="center",positioning:$="anchor",role:N,"aria-label":A,xstyle:M,className:I,style:R,as:z="div",onMouseEnter:_,onMouseLeave:O}=C||{},D=$==="custom"?{positionAnchor:a}:{positionAnchor:a,positionArea:YE(E,T),positionTryFallbacks:QE(E,T)},L=q(a1.base,M),B=I?`${I} ${L.className??""}`:L.className;return o.jsx(z,{ref:v,id:i,role:N,"aria-label":A,popover:r?"auto":"manual",className:B,style:{...L.style,...D,...R},onMouseEnter:_,onMouseLeave:O,children:S})},[a,i,r,v]),j=x.useCallback((S,C)=>{const{x:E,y:T,xstyle:$,className:N,style:A}=C,M={top:T,left:E},I=q(a1.base,a1.fixed,$),R=N?`${N} ${I.className??""}`:I.className;return o.jsx("div",{ref:v,id:i,popover:r?"auto":"manual",className:R,style:{...I.style,...M,...A},children:S})},[v,i,r]);return t==="context"?{ref:m,anchorId:a,show:h,hide:p,isOpen:l,id:i,render:w}:{ref:void 0,show:h,hide:p,isOpen:l,id:i,render:j}}const ir={below:{kKVMdj:"xl1vlw0 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},above:{kKVMdj:"x3psbcj x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},end:{kKVMdj:"x1i331go x1vxsm5i x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},start:{kKVMdj:"xck01x9 x18lne9g x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}},JE=100,o1={container:{kWkggS:"x19aspcf",kMwMTN:"xrkvqaz",kaIpWk:"x1hviunn",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function eT(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function bs(e={}){const{placement:t="above",alignment:n="center",delay:s=200,hideDelay:r=0,focusTrigger:i="auto",isEnabled:a=!0,isOpen:l,isDefaultOpen:c=!1,onShow:u,onHide:d}=e,f=t==="above"||t==="below"?o1.marginBlock:o1.marginInline,h=Il({mode:"context",onShow:u,onHide:d}),p=x.useMemo(()=>[o1.container,f],[f]),m=x.useRef(null),b=x.useRef(null),y=x.useRef(null),g=x.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),k=x.useCallback(()=>{!a||l===!1||(g(),m.current=setTimeout(()=>{h.show()},s))},[a,l,g,h,s]),v=x.useCallback(()=>{if(l===!0)return;g();const M=r>0?r:JE;b.current=setTimeout(()=>{h.hide()},M)},[l,g,h,r]),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),j=x.useCallback(()=>{typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: none)").matches||k()},[k]),S=x.useCallback(()=>{v()},[v]),C=x.useCallback(M=>{!a||!M.target.matches(":focus-visible")||(g(),h.show())},[a,g,h]),E=x.useCallback(()=>{v()},[v]),T=x.useCallback(()=>{l===void 0&&(g(),h.hide())},[l,g,h]),$=x.useCallback(M=>{y.current&&(y.current.removeEventListener("mouseenter",j),y.current.removeEventListener("mouseleave",S),y.current.removeEventListener("focusin",C),y.current.removeEventListener("focusout",E),y.current.removeEventListener("pointerdown",T)),M&&(M.addEventListener("mouseenter",j),M.addEventListener("mouseleave",S),M.addEventListener("pointerdown",T),(i==="always"||i==="auto"&&eT(M))&&(M.addEventListener("focusin",C),M.addEventListener("focusout",E))),y.current=M},[i,j,S,C,E,T]),N=x.useCallback(M=>{h.ref(M),$(M)},[h,$]);x.useEffect(()=>()=>{g()},[g]),x.useEffect(()=>{c&&h.show()},[]),x.useEffect(()=>{l!==void 0&&(l?(g(),h.show()):(g(),h.hide()))},[l,g,h]),x.useEffect(()=>{if(l!==void 0)return;const M=I=>{I.key==="Escape"&&(I.isComposing||I.keyCode===229||(g(),h.hide()))};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[l,h,g]);const A=x.useCallback((M,I)=>{const R=(I==null?void 0:I.placement)??t,z={placement:R,alignment:(I==null?void 0:I.alignment)??n,role:"tooltip",xstyle:[p,ir[R]],className:U("tooltip").className,onMouseEnter:w,onMouseLeave:v};return h.render(o.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:M}),z)},[h,t,n,p,w,v]);return{ref:N,positionRef:h.ref,interactionRef:$,anchorId:h.anchorId,describedBy:h.id,renderTooltip:A}}const k0={"--color-syntax-keyword":"var(--color-text-accent)","--color-syntax-string":"var(--color-text-green)","--color-syntax-comment":"var(--color-text-secondary)","--color-syntax-number":"var(--color-text-orange)","--color-syntax-function":"var(--color-text-blue)","--color-syntax-type":"var(--color-text-purple)","--color-syntax-variable":"var(--color-text-primary)","--color-syntax-operator":"var(--color-text-cyan)","--color-syntax-constant":"var(--color-text-orange)","--color-syntax-tag":"var(--color-text-red)","--color-syntax-attribute":"var(--color-text-teal)","--color-syntax-property":"var(--color-text-cyan)","--color-syntax-punctuation":"var(--color-text-disabled)","--color-syntax-background":"var(--color-background-muted)"},tT={"--color-data-categorical-blue":"light-dark(#0171E3, #0171E3)","--color-data-categorical-orange":"light-dark(#EB6E00, #EB6E00)","--color-data-categorical-purple":"light-dark(#6B1EFD, #6B1EFD)","--color-data-categorical-green":"light-dark(#0B991F, #0B991F)","--color-data-categorical-pink":"light-dark(#F351C0, #F351C0)","--color-data-categorical-cyan":"light-dark(#0171A4, #0171A4)","--color-data-categorical-red":"light-dark(#F5394F, #F5394F)","--color-data-categorical-teal":"light-dark(#08A3A3, #08A3A3)","--color-data-categorical-brown":"light-dark(#965E03, #965E03)","--color-data-categorical-indigo":"light-dark(#6F8AFF, #6F8AFF)","--color-data-neutral":"light-dark(#8494A3, #8C939B)","--color-data-blue-5":"light-dark(#02165E, #02165E)","--color-data-blue-4":"light-dark(#004CBC, #004CBC)","--color-data-blue-3":"light-dark(#2694FE, #2694FE)","--color-data-blue-2":"light-dark(#78BEFF, #78BEFF)","--color-data-blue-1":"light-dark(#DBECFF, #DBECFF)","--color-data-shamrock-5":"light-dark(#0B603D, #0B603D)","--color-data-shamrock-4":"light-dark(#138546, #138546)","--color-data-shamrock-3":"light-dark(#24BB5E, #24BB5E)","--color-data-shamrock-2":"light-dark(#8EF7AA, #8EF7AA)","--color-data-shamrock-1":"light-dark(#D6FEE4, #D6FEE4)","--color-data-orange-5":"light-dark(#A13F04, #A13F04)","--color-data-orange-4":"light-dark(#D66100, #D66100)","--color-data-orange-3":"light-dark(#FD9537, #FD9537)","--color-data-orange-2":"light-dark(#FDB876, #FDB876)","--color-data-orange-1":"light-dark(#FFE6CF, #FFE6CF)","--color-data-pink-5":"light-dark(#8E1073, #8E1073)","--color-data-pink-4":"light-dark(#D123A1, #D123A1)","--color-data-pink-3":"light-dark(#F989D3, #F989D3)","--color-data-pink-2":"light-dark(#FEADE3, #FEADE3)","--color-data-pink-1":"light-dark(#FCE3F4, #FCE3F4)","--color-data-purple-5":"light-dark(#3E0697, #3E0697)","--color-data-purple-4":"light-dark(#6B1EFD, #6B1EFD)","--color-data-purple-3":"light-dark(#9081FF, #9081FF)","--color-data-purple-2":"light-dark(#B3B0FE, #B3B0FE)","--color-data-purple-1":"light-dark(#E8E8FB, #E8E8FB)","--color-data-red-5":"light-dark(#9D0519, #9D0519)","--color-data-red-4":"light-dark(#D31130, #D31130)","--color-data-red-3":"light-dark(#FB7D87, #FB7D87)","--color-data-red-2":"light-dark(#FFB2B8, #FFB2B8)","--color-data-red-1":"light-dark(#FEE4E6, #FEE4E6)","--color-data-teal-5":"light-dark(#08767D, #08767D)","--color-data-teal-4":"light-dark(#0C9293, #0C9293)","--color-data-teal-3":"light-dark(#0DB7AF, #0DB7AF)","--color-data-teal-2":"light-dark(#6CE6D8, #6CE6D8)","--color-data-teal-1":"light-dark(#D7FCF8, #D7FCF8)","--color-data-yellow-5":"light-dark(#8A5001, #8A5001)","--color-data-yellow-4":"light-dark(#D69804, #D69804)","--color-data-yellow-3":"light-dark(#FBCE03, #FBCE03)","--color-data-yellow-2":"light-dark(#FCEC85, #FCEC85)","--color-data-yellow-1":"light-dark(#FDF6BA, #FDF6BA)","--color-data-gray-5":"light-dark(#25363F, #333338)","--color-data-gray-4":"light-dark(#5D6C7B, #666A72)","--color-data-gray-3":"light-dark(#AFB9C4, #B2B8BE)","--color-data-gray-2":"light-dark(#CCD3DB, #D0D3D6)","--color-data-gray-1":"light-dark(#F1F4F7, #F2F4F6)"},nT={...k0,...tT},i3=new Map;function sT(e){i3.set(e.name,e)}function a3(e){return e==null||e===""?null:i3.get(e)??null}const rT={avatar:[{property:"fontSize",vars:["--_avatar-fallback-font-size"]},{property:"fontWeight",vars:["--_avatar-fallback-font-weight"]},{property:"color",vars:["--_avatar-fallback-color"]},{property:"backgroundColor",vars:["--_avatar-fallback-background"]}],banner:[{property:"borderRadius",vars:["--_banner-radius"]}],button:[{property:"borderRadius",vars:["--_button-radius"]}],card:[{property:"borderRadius",vars:["--_card-radius"]},{property:"padding",expand:"container"}],chat:[{property:"borderRadius",vars:["--_chat-composer-radius"]},{property:"padding",vars:["--_chat-composer-padding"]}],dialog:[{property:"borderRadius",vars:["--_dialog-radius"]},{property:"padding",expand:"container"}],"dropdown-menu":[{property:"borderRadius",vars:["--_dropdown-menu-radius"]},{property:"padding",vars:["--_dropdown-menu-padding"]}],field:[{property:"borderRadius",vars:["--_field-radius"]}],hovercard:[{property:"borderRadius",vars:["--_hovercard-radius"]}],popover:[{property:"borderRadius",vars:["--_popover-radius"]}],section:[{property:"padding",expand:"container"}],"segmented-control":[{property:"borderRadius",vars:["--_segmented-control-radius"]},{property:"padding",vars:["--_segmented-control-padding"]}]};function pb(e,t){const n=rT[e];return n?n.filter(s=>s.property===t):[]}function o3(e){return`[data-${Qh}-theme="${e}"]`}const l3=`[data-${Qh}-theme]`;function gb(e){return`[data-${Qh}-media="${e}"]`}function Do(e,t){return`.${J5}-${e}${t}`}function c3(e,t){const n=[];let s=0,r=0;for(let i=0;i<e.length;i++){const a=e[i];a==="("?s++:a===")"?s=Math.max(0,s-1):a===","&&s===0&&(n.push(e.slice(r,i).trim()),r=i+1)}return n.push(e.slice(r).trim()),n.map(i=>`${i}${t}`).join(", ")}function Pf(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const rd=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function iT(e){const t={};for(const[n,s]of e)switch(n){case"padding":{const r=s.trim().split(/\s+/);r.length===1?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[0]):r.length===2?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[1]):r.length>=3&&(t.blockStart=r[0],t.inline=r[1],t.blockEnd=r[2]);break}case"paddingBlock":{const r=s.trim().split(/\s+/);t.blockStart=r[0],t.blockEnd=r[1]??r[0];break}case"paddingInline":{const r=s.trim().split(/\s+/);r.length===1?t.inline=r[0]:(t.inlineStart=r[0],t.inlineEnd=r[1]);break}case"paddingBlockStart":t.blockStart=s;break;case"paddingBlockEnd":t.blockEnd=s;break;case"paddingInlineStart":t.inlineStart=s;break;case"paddingInlineEnd":t.inlineEnd=s;break}return t}function aT(e,t){const n=CE(`${e}-padding`),s=[],r=t.inlineStart??t.inline,i=t.inlineEnd??t.inline;return r!=null&&i!=null&&r===i&&t.blockStart!=null&&t.blockEnd!=null&&r===t.blockStart&&t.blockStart===t.blockEnd?(s.push([n,r??""]),s):(t.inlineStart!=null||t.inlineEnd!=null?(r!=null&&s.push([`${n}-inline-start`,r]),i!=null&&s.push([`${n}-inline-end`,i])):t.inline!=null&&s.push([`${n}-inline`,t.inline]),t.blockStart!=null&&s.push([`${n}-block-start`,t.blockStart]),t.blockEnd!=null&&s.push([`${n}-block-end`,t.blockEnd]),s)}function oT(e){const t=[],n=e.tokens,s=i=>n[i]||`var(${i})`,r=Object.entries(n);if(r.length>0){const i=r.map(([a,l])=>` ${a}: ${l};`).join(`
|
|
18
|
-
`);t.push(` :scope {
|
|
19
|
-
${i}
|
|
20
|
-
}`)}return e.components&&lT(e.components,t),cT(s,t),uT(e.components||{},t),fT(e.components||{},t),t}function lT(e,t){for(const[n,s]of Object.entries(e))for(const[r,i]of Object.entries(s)){const a=Object.entries(i);if(a.length===0)continue;const l=h0(r),c=Do(n,l),u=[],d=[];for(const[m,b]of a)m.startsWith(":")&&typeof b=="object"?d.push([m,b]):u.push([m,b]);let f=u;const h=[];let p=!1;for(const[m,b]of u){const y=pb(n,m),g=rd.has(m)&&m!=="padding"?pb(n,"padding"):[];for(const k of[...y,...g])if(k.expand==="container"&&rd.has(m)&&(p=!0),k.vars)for(const v of k.vars)h.push([v,b])}if(p){const m=u.filter(([k])=>rd.has(k)),b=u.filter(([k])=>!rd.has(k)),y=iT(m),g=aT(n,y);f=[...b,...g]}if(h.length>0&&(f=[...f,...h]),f.length>0){const m=f.map(([b,y])=>` ${Pf(b)}: ${y};`).join(`
|
|
21
|
-
`);t.push(` ${c} {
|
|
22
|
-
${m}
|
|
23
|
-
}`)}for(const[m,b]of d){const y=Object.entries(b);if(y.length>0){const g=y.map(([k,v])=>` ${Pf(k)}: ${v};`).join(`
|
|
24
|
-
`);t.push(` ${c3(c,m)} {
|
|
25
|
-
${g}
|
|
26
|
-
}`)}}}}function cT(e,t){t.push(` :where(h1, h2, h3, h4, h5, h6) {
|
|
27
|
-
font-family: var(--font-family-heading);
|
|
28
|
-
color: var(--color-text-primary);
|
|
29
|
-
}`);for(let n=1;n<=6;n++)t.push(` :where(h${n}) {
|
|
30
|
-
font-size: ${e(`--text-heading-${n}-size`)};
|
|
31
|
-
font-weight: ${e(`--text-heading-${n}-weight`)};
|
|
32
|
-
line-height: ${e(`--text-heading-${n}-leading`)};
|
|
33
|
-
}`);t.push(` :where(p) {
|
|
34
|
-
font-family: var(--font-family-body);
|
|
35
|
-
font-size: ${e("--text-body-size")};
|
|
36
|
-
font-weight: ${e("--text-body-weight")};
|
|
37
|
-
line-height: ${e("--text-body-leading")};
|
|
38
|
-
color: var(--color-text-primary);
|
|
39
|
-
}`),t.push(` :where(small) {
|
|
40
|
-
font-size: ${e("--text-supporting-size")};
|
|
41
|
-
font-weight: ${e("--text-supporting-weight")};
|
|
42
|
-
line-height: ${e("--text-supporting-leading")};
|
|
43
|
-
color: var(--color-text-secondary);
|
|
44
|
-
}`),t.push(` :where(code, pre) {
|
|
45
|
-
font-family: var(--font-family-code);
|
|
46
|
-
font-size: ${e("--text-code-size")};
|
|
47
|
-
line-height: ${e("--text-code-leading")};
|
|
48
|
-
}`),t.push(` :where(hr) {
|
|
49
|
-
border: none;
|
|
50
|
-
border-top: 1px solid var(--color-border);
|
|
51
|
-
}`)}function uT(e,t){const n={primary:"var(--color-text-primary)",secondary:"var(--color-text-secondary)",disabled:"var(--color-text-disabled)",placeholder:"var(--color-text-secondary)",accent:"var(--color-text-accent)"},s="text"in e,r="heading"in e,i="link"in e;if(s||r||i)for(const[a,l]of Object.entries(n))s&&t.push(` ${Do("text",`.${a}`)} { color: ${l}; }`),r&&t.push(` ${Do("heading",`.${a}`)} { color: ${l}; }`),i&&t.push(` ${Do("link",`.${a}`)} { color: ${l}; }`)}const dT={"4xs":"var(--font-size-4xs)","3xs":"var(--font-size-3xs)","2xs":"var(--font-size-2xs)",xsm:"var(--font-size-xs)",sm:"var(--font-size-sm)",base:"var(--font-size-base)",lg:"var(--font-size-lg)",xl:"var(--font-size-xl)","2xl":"var(--font-size-2xl)","3xl":"var(--font-size-3xl)","4xl":"var(--font-size-4xl)"};function fT(e,t){if("text"in e)for(const[n,s]of Object.entries(dT)){const r=h0(`size:${n}`);t.push(` ${Do("text",r)} { font-size: ${s}; }`)}}function hT(e){const t=oT(e),n=[],s=[];for(const r of t)r.trimStart().startsWith(":where(")?n.push(r):s.push(r);return{component:s,prose:n}}function xT(e){const t=[],n=o3(e.name);for(const r of["dark","light"]){const i=r==="dark"?e.__onDark:e.__onLight;if(!i)continue;const a=Object.entries(i.tokens);if(a.length>0){const l=a.map(([c,u])=>` ${c}: ${u};`).join(`
|
|
52
|
-
`);t.push(` ${gb(r)} {
|
|
53
|
-
${l}
|
|
54
|
-
}`)}if(i.components)for(const[l,c]of Object.entries(i.components))for(const[u,d]of Object.entries(c)){const f=Object.entries(d);if(f.length===0)continue;const h=h0(u),p=`:is(${gb(r)}) :is(${Do(l,h)})`,m=[],b=[];for(const[y,g]of f)y.startsWith(":")&&typeof g=="object"?b.push([y,g]):m.push([y,g]);if(m.length>0){const y=m.map(([g,k])=>` ${Pf(g)}: ${k};`).join(`
|
|
55
|
-
`);t.push(` ${p} {
|
|
56
|
-
${y}
|
|
57
|
-
}`)}for(const[y,g]of b){const k=Object.entries(g);if(k.length>0){const v=k.map(([w,j])=>` ${Pf(w)}: ${j};`).join(`
|
|
58
|
-
`);t.push(` ${c3(p,y)} {
|
|
59
|
-
${v}
|
|
60
|
-
}`)}}}}if(t.length===0)return"";const s=t.join(`
|
|
61
|
-
|
|
62
|
-
`);return`@scope (${n}) to (${l3}) {
|
|
63
|
-
${s}
|
|
64
|
-
}`}function pT(e){const{component:t,prose:n}=hT(e),s=o3(e.name),r=l3;let i="";if(n.length>0){const c=n.join(`
|
|
65
|
-
|
|
66
|
-
`);i=`@scope (${s}) to (${r}) {
|
|
67
|
-
${c}
|
|
68
|
-
}`}let a="";if(t.length>0){const c=t.join(`
|
|
69
|
-
|
|
70
|
-
`);a=`@scope (${s}) to (${r}) {
|
|
71
|
-
${c}
|
|
72
|
-
}`}const l=xT(e);return l&&(a=a?`${a}
|
|
73
|
-
|
|
74
|
-
${l}`:l),{prose:i,component:a}}const u3={...nE,...sE,...rE,...iE,...aE,...oE,...lE,...cE,...uE,...dE,...fE,...nT};function gT(e){return`var(${e})`}Object.fromEntries(Object.keys(u3).map(e=>[e,gT(e)]));function b0(e){let t=0,n=null,s=!1;for(let r=0;r<e.length;r++){const i=e[r];if(n!==null){s?s=!1:i==="\\"?s=!0:i===n&&(n=null);continue}if(i==='"'||i==="'"){n=i;continue}if(i==="("){t++;continue}if(i===")"){t=Math.max(0,t-1);continue}if(i===","&&t===0)return[e.slice(0,r).trim(),e.slice(r+1).trim()]}return null}function mT(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const s=t.slice(n.length,-1);return b0(s)}function l1(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=mT(e);return n!==null?t==="dark"?n[1]:n[0]:e}function d3(e,t){let n=0;for(let s=t;s<e.length;s++){const r=e[s];if(r==="(")n++;else if(r===")"&&(n--,n===0))return s}return-1}function mb(e){const t=e.trim(),n=t.match(/\s+([\d.]+)%$/);return n?{color:t.slice(0,n.index).trim(),percentage:parseFloat(n[1])}:{color:t,percentage:null}}function yT(e){const t=e.match(/^in\s+([\w-]+)\s*,\s*(.+)$/s);if(!t)return null;const[,n,s]=t;if(n.toLowerCase()!=="srgb")return null;const r=b0(s);if(r===null)return null;const i=mb(r[0]),a=mb(r[1]);if(i===null||a===null)return null;const l=hb(i.color),c=hb(a.color);if(l===null||c===null)return null;let u,d;i.percentage!==null&&a.percentage!==null?(u=i.percentage,d=a.percentage):i.percentage!==null?(u=i.percentage,d=100-u):a.percentage!==null?(d=a.percentage,u=100-d):(u=50,d=50);const f=u+d;if(f<=0)return null;const h=u/f,p=d/f,m=f<100?f/100:1,b=h*l.a+p*c.a,y=(j,S)=>h*j*l.a+p*S*c.a,g=y(l.r,c.r),k=y(l.g,c.g),v=y(l.b,c.b),w=b===0?{r:0,g:0,b:0}:{r:g/b,g:k/b,b:v/b};return LE({...w,a:b*m})}function qp(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,s=d3(e,n);if(s===-1)return e;const r=qp(e.slice(n+1,s)),a=yT(r)??`color-mix(${r})`;return e.slice(0,t)+a+qp(e.slice(s+1))}function Hp(e,t,n,s){const r=e.indexOf("var(");if(r===-1)return e;const i=r+3,a=d3(e,i);if(a===-1)return e;const l=e.slice(i+1,a),c=b0(l),u=(c?c[0]:l).trim(),d=c?c[1]:null;let f;s.has(u)?f=e.slice(r,a+1):u in t?(s.add(u),f=f3(u,t,n,s),s.delete(u)):d!==null?f=Hp(d.trim(),t,n,s):f=e.slice(r,a+1);const h=Hp(e.slice(a+1),t,n,s);return e.slice(0,r)+f+h}function kT(e,t,n,s){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const r=Hp(e,t,n,s);return qp(r)}function f3(e,t,n,s){if(e in n)return n[e];const r=t[e];if(r===void 0)return"";const i=kT(r,t,n,s);return n[e]=i,i}function yb(e){const t={};for(const n of Object.keys(e))f3(n,e,t,new Set);return t}function bT(e,t){const{mode:n}=t,s={};for(const[r,i]of Object.entries(u3))s[r]=l1(i,n);if(e==null)return yb(s);for(const[r,i]of Object.entries(e.tokens))s[r]=l1(i,n);if(e.__inputTokens)for(const[r,i]of Object.entries(e.__inputTokens))i!==void 0&&(s[r]=l1(i,n));return yb(s)}function Ha(e,t=!1){const n=x.useCallback(i=>{const a=window.matchMedia(e);return a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[e]),s=x.useCallback(()=>window.matchMedia(e).matches,[e]),r=x.useCallback(()=>t,[t]);return x.useSyncExternalStore(n,s,r)}const Jh=x.createContext(null);Jh.displayName="ThemeContext";function vT(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function wT(){return null}function jT(){return typeof document>"u"?null:document.documentElement.getAttribute(Cn("theme"))}function ST(){return null}function h3(){return null}const gc=new Set;let tc=null;const mc=new Set;let nc=null;function $T(){for(const e of gc)e()}function CT(e){return gc.add(e),gc.size===1&&typeof MutationObserver<"u"&&(tc=new MutationObserver($T),tc.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{gc.delete(e),gc.size===0&&tc&&(tc.disconnect(),tc=null)}}function ET(){for(const e of mc)e()}function TT(e){return mc.add(e),mc.size===1&&typeof MutationObserver<"u"&&(nc=new MutationObserver(ET),nc.observe(document.documentElement,{attributes:!0,attributeFilter:[Cn("theme")]})),()=>{mc.delete(e),mc.size===0&&nc&&(nc.disconnect(),nc=null)}}function x3(){return()=>{}}function zT(e){return x.useSyncExternalStore(e?x3:CT,e?h3:vT,wT)}function p3(e){return x.useSyncExternalStore(e?x3:TT,e?h3:jT,ST)}function g3(){const e=x.use(Jh),t=e!=null,n=p3(t);return(e==null?void 0:e.theme.name)??n}function ex(){const e=x.use(Jh),t=e!=null,n=zT(t),s=p3(t),r=Ha("(prefers-color-scheme: dark)"),i=(e==null?void 0:e.mode)??n??"system",a=(e==null?void 0:e.theme)??a3(s),l=i==="system"?r?"dark":"light":i,c=x.useMemo(()=>bT(a,{mode:l}),[a,l]),u=d=>c[d]??"";return{name:(a==null?void 0:a.name)??"default",mode:l,token:u,tokens:c}}const AT="modulepreload",NT=function(e){return"/"+e},kb={},m3=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=NT(c),c in kb)return;kb[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":AT,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},v0={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},MT={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},y3={body:{k63SB2:"xxovm9e",$$css:!0},large:{k63SB2:"x149oux8",$$css:!0},label:{k63SB2:"xmhvcl5",$$css:!0},code:{k63SB2:"xx3eeay",$$css:!0},supporting:{k63SB2:"xv8on6e",$$css:!0},"display-1":{k63SB2:"x1txul5o",$$css:!0},"display-2":{k63SB2:"x1y36c3f",$$css:!0},"display-3":{k63SB2:"x1on40hk",$$css:!0},inherit:{k63SB2:"x1pd3egz",$$css:!0}},w0={body:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},large:{kGuDYH:"x18juvz8",kLWn49:"xf74fhv",$$css:!0},label:{kGuDYH:"xcr08ib",kLWn49:"x1kq96og",$$css:!0},code:{kGuDYH:"xp03k98",kLWn49:"x17iicif",kMv6JI:"x9m5x89",$$css:!0},supporting:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},"display-1":{kGuDYH:"xsub3ws",kLWn49:"x112ttwr",$$css:!0},"display-2":{kGuDYH:"x1yego12",kLWn49:"xh0iwvy",$$css:!0},"display-3":{kGuDYH:"xlgnzhf",kLWn49:"x1ujwuaq",$$css:!0},inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}},RT={"4xs":{kGuDYH:"xxc45ev",$$css:!0},"3xs":{kGuDYH:"x10p7juq",$$css:!0},"2xs":{kGuDYH:"x16a80zy",$$css:!0},xsm:{kGuDYH:"x51wmvv",$$css:!0},sm:{kGuDYH:"x1eqnyfr",$$css:!0},base:{kGuDYH:"x1j29vfg",$$css:!0},lg:{kGuDYH:"xc7cgfe",$$css:!0},xl:{kGuDYH:"x1wqms48",$$css:!0},"2xl":{kGuDYH:"xhs0kqb",$$css:!0},"3xl":{kGuDYH:"x10srzze",$$css:!0},"4xl":{kGuDYH:"xqcvi3d",$$css:!0}},IT={1:{kGuDYH:"xcg7oai",kLWn49:"xfmsba7",k63SB2:"x1v68xuy",$$css:!0},2:{kGuDYH:"x1xvnhcw",kLWn49:"x1cpk1wn",k63SB2:"x12yy4cs",$$css:!0},3:{kGuDYH:"xii13ha",kLWn49:"xwjzt0u",k63SB2:"x1jcxfy8",$$css:!0},4:{kGuDYH:"x8tkxat",kLWn49:"xqerer",k63SB2:"x2hcmsi",$$css:!0},5:{kGuDYH:"xsgqta0",kLWn49:"xo3gurs",k63SB2:"xno150v",$$css:!0},6:{kGuDYH:"xw5ohdf",kLWn49:"xeixjfn",k63SB2:"x1pw4frv",$$css:!0}},k3={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Uf={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},b3={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},v3={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},w3={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},j3={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},_T={enabled:{kcqcaj:"xss6m8b",$$css:!0}},S3={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},$3={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function C3(e){const{maxLines:t}=e,[n,s]=x.useState(!1),[r,i]=x.useState(""),a=x.useRef(null),l=x.useCallback(u=>{if(t===0){s(!1);return}if(i(u.textContent??""),t===1)s(u.scrollWidth>u.offsetWidth);else{let d=u.scrollHeight;try{const f=document.createRange();f.selectNodeContents(u),d=f.getBoundingClientRect().height,f.detach()}catch{}s(d>u.offsetHeight)}},[t]);return{ref:x.useCallback(u=>{a.current&&g0(a.current),a.current=u,u&&t>0?typeof ResizeObserver<"u"?p0(u,()=>{l(u)}):l(u):(s(!1),i(""))},[t,l]),isTruncated:n,fullText:r}}const OT=x.lazy(async()=>m3(()=>Promise.resolve().then(()=>r4),void 0).then(e=>({default:e.Tooltip}))),DT={body:"primary",large:"primary",label:"primary",supporting:"secondary",code:"primary","display-1":"primary","display-2":"primary","display-3":"primary",inherit:"inherit"};function LT(e){return e in w0?e:"body"}function E3(e){return e in v0?e:"primary"}function ee({type:e="body",size:t,color:n,weight:s,display:r="inline",maxLines:i=0,hasTruncateTooltip:a=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,hasTabularNumbers:h=!1,xstyle:p,className:m,style:b,as:y="span",children:g,ref:k,...v}){const w=n??DT[e]??"primary",j=LT(e),S=E3(w),C=l??(i===1?"break-all":"break-word"),E=i>0||d?"block":r,T=C3({maxLines:i}),$=typeof a=="string"?a:"above",N=i>0&&a!==!1&&T.isTruncated,A=x.useRef(null),M=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(y,{ref:it(k,T.ref,A),...F(U("text",{type:e,size:t,color:w}),q(v0[S],w0[j],t&&RT[t],y3[j],s&&MT[s],i===1?Uf.singleLine:i>1?Uf.multiLine:k3[E],i>0&&b3[C],c&&v3[c],u!=="start"&&S3[u],d&&w3.enabled,f&&j3.strikethrough,h&&_T.enabled,p),m,{...b,...M}),title:N?T.fullText:void 0,...v,children:g}),N&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(OT,{anchorRef:A,content:o.jsx("span",{...q($3.content),children:T.fullText}),placement:$})})]})}ee.displayName="Text";const BT=.75,bb=1.5,vb={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},wb={wrapper:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},spinner:{k1xSpc:"xwz0xwf",kgQiWS:"x1ku5rj1",kVQacm:"xb3r6kr",kXLuUW:"xxymvpz",$$css:!0}};function on({size:e="md",shade:t="default",label:n,xstyle:s,className:r,style:i,"aria-label":a,"data-testid":l,ref:c,...u}){const d=x.useRef(null),{tokens:f}=ex();x.useEffect(()=>{const w=d.current;if(w==null)return;const j=w.getContext("2d");if(!j)return;const{border:S,diameter:C}=vb[e],E=window.devicePixelRatio||1,T=t==="inherit"?getComputedStyle(w).color:null,$=t==="inherit"?T:t==="onMedia"?f["--color-on-dark"]:t==="subtle"?f["--color-text-secondary"]:f["--color-accent"],N=t==="inherit"?T:t==="onMedia"?`${f["--color-on-dark"]}4D`:f["--color-track"],A=C+S*2,M=Math.round(A*E),I=M+M%2,R=I/A,z=C/2*R,_=S*R;w.height=w.width=I,w.style.width=w.style.height=A+"px",j.lineCap="round",j.lineWidth=_;const O=I/2;j.beginPath(),j.arc(O,O,z,0,2*Math.PI),j.strokeStyle=N,t==="inherit"&&(j.globalAlpha=.3),j.stroke(),j.globalAlpha=1,j.beginPath(),j.arc(O,O,z,bb*Math.PI,(bb+BT)%2*Math.PI),j.strokeStyle=$,j.stroke()},[t,e,f]);const{border:h,diameter:p}=vb[e],m=p+h*2,b=n!=null,y=x.useId(),g=b&&typeof n=="string"&&a==null,k=a??(typeof n=="string"?n:void 0)??"Loading",v=o.jsx("span",{ref:b?void 0:c,role:"status","aria-label":g?void 0:k,"aria-labelledby":g?y:void 0,"data-testid":b?void 0:l,...b?{}:u,...F(b?"":U("spinner",{size:e,shade:t}),q(wb.spinner,!b&&s),b?void 0:r,{...b?{}:i,width:m,height:m}),children:o.jsx("canvas",{ref:d,className:"xlp1x4z x1lliihq x1so62im x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782"})});return b?o.jsxs("div",{ref:c,"data-testid":l,...u,...F(U("spinner",{size:e,shade:t}),q(wb.wrapper,s),r,i),children:[v,typeof n=="string"?o.jsx(ee,{id:y,type:"body",weight:"bold",children:n}):n]}):v}on.displayName="Spinner";function Mi({children:e,as:t="span",ref:n,...s}){return x.createElement(t,{ref:n,...s,className:"x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o"},e)}Mi.displayName="VisuallyHidden";const Ff="data-astryx-edge-comp",qT={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},HT={inset:e=>[qT,{"--x-126w13d":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`)}]},j0=x.createContext(null);j0.displayName="SizeContext";function Pa(e,t="md"){const n=x.use(j0);return e??n??t}j0.Provider;const T3=x.createContext(null);T3.displayName="ButtonGroupContext";function PT(){return x.use(T3)}const z3=x.createContext(null);z3.displayName="LinkContext";function UT(e){function t({href:n,ref:s,...r}){return x.createElement(e,{ref:s,href:n,to:n,...r})}return t.displayName=`LinkWithTo(${typeof e=="string"?e:e.displayName||e.name||"Component"})`,t}function Ri(e){const t=x.use(z3),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":UT(n),[n])}const A3=x.createContext({locale:"en",direction:"ltr",messages:{}});A3.displayName="InternationalizationContext";function c1(e,t){const n=t&&t.cache?t.cache:ZT,s=t&&t.serializer?t.serializer:KT;return(t&&t.strategy?t.strategy:VT)(e,{cache:n,serializer:s})}function FT(e){return e==null||typeof e=="number"||typeof e=="boolean"}function GT(e,t,n,s){const r=FT(s)?s:n(s);let i=t.get(r);return typeof i>"u"&&(i=e.call(this,s),t.set(r,i)),i}function N3(e,t,n){const s=Array.prototype.slice.call(arguments,3),r=n(s);let i=t.get(r);return typeof i>"u"&&(i=e.apply(this,s),t.set(r,i)),i}function M3(e,t,n,s,r){return n.bind(t,e,s,r)}function VT(e,t){const n=e.length===1?GT:N3;return M3(e,this,n,t.cache.create(),t.serializer)}function WT(e,t){return M3(e,this,N3,t.cache.create(),t.serializer)}const KT=function(){return JSON.stringify(arguments)};var XT=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};const ZT={create:function(){return new XT}},u1={variadic:WT},YT=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function QT(e){const t={};return e.replace(YT,n=>{const s=n.length;switch(n[0]){case"G":t.era=s===4?"long":s===5?"narrow":"short";break;case"y":t.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"c":if(s<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][s-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][s-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][s-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][s-1];break;case"s":t.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}const JT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ez(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(JT).filter(s=>s.length>0),n=[];for(const s of t){let r=s.split("/");if(r.length===0)throw new Error("Invalid number skeleton");const[i,...a]=r;for(const l of a)if(l.length===0)throw new Error("Invalid number skeleton");n.push({stem:i,options:a})}return n}function tz(e){return e.replace(/^(.*?)-/,"")}const jb=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,R3=/^(@+)?(\+|#+)?[rs]?$/g,nz=/(\*)(0+)|(#+)(0+)|(0+)/g,I3=/^(0+)$/;function Sb(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(R3,function(n,s,r){return typeof r!="string"?(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length):r==="+"?t.minimumSignificantDigits=s.length:s[0]==="#"?t.maximumSignificantDigits=s.length:(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length+(typeof r=="string"?r.length:0)),""}),t}function _3(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sz(e){let t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){const n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!I3.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function $b(e){const t={},n=_3(e);return n||t}function rz(e){let t={};for(const n of e){switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=tz(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t={...t,notation:"scientific",...n.options.reduce((i,a)=>({...i,...$b(a)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((i,a)=>({...i,...$b(a)}),{})};continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(nz,function(i,a,l,c,u,d){if(a)t.minimumIntegerDigits=l.length;else{if(c&&u)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(I3.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(jb.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(jb,function(a,l,c,u,d,f){return c==="*"?t.minimumFractionDigits=l.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&f?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});const i=n.options[0];i==="w"?t={...t,trailingZeroDisplay:"stripIfInteger"}:i&&(t={...t,...Sb(i)});continue}if(R3.test(n.stem)){t={...t,...Sb(n.stem)};continue}const s=_3(n.stem);s&&(t={...t,...s});const r=sz(n.stem);r&&(t={...t,...r})}return t}let iz=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG",e}({});function Cb(e){return e.type===0}function az(e){return e.type===1}function O3(e){return e.type===2}function D3(e){return e.type===3}function L3(e){return e.type===4}function B3(e){return e.type===5}function q3(e){return e.type===6}function oz(e){return e.type===7}function H3(e){return e.type===8}function P3(e){return!!(e&&typeof e=="object"&&e.type===0)}function Pp(e){return!!(e&&typeof e=="object"&&e.type===1)}const U3=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,sc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function lz(e,t){let n="";for(let s=0;s<e.length;s++){const r=e.charAt(s);if(r==="j"){let i=0;for(;s+1<e.length&&e.charAt(s+1)===r;)i++,s++;let a=1+(i&1),l=i<2?1:3+(i>>1),c="a",u=cz(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)n+=c;for(;a-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function cz(e){var r,i;let t=e.hourCycle;if(t===void 0){const a=e;t=((r=a.getHourCycles)==null?void 0:r.call(a)[0])??((i=a.hourCycles)==null?void 0:i[0])}if(t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const n=e.language;let s;return n!=="root"&&(s=e.maximize().region),(sc[`${n}-${s}`]||sc[s||""]||sc[n||""]||sc[`${n}-001`]||sc["001"])[0].charAt(0)}const uz=new RegExp(`^${U3.source}*`),dz=new RegExp(`${U3.source}*$`);function Ne(e,t){return{start:e,end:t}}const fz=!!Object.fromEntries,hz=!!String.prototype.trimStart,xz=!!String.prototype.trimEnd,Eb=fz?Object.fromEntries:function(t){const n={};for(const[s,r]of t)n[s]=r;return n},pz=hz?function(t){return t.trimStart()}:function(t){return t.replace(uz,"")},gz=xz?function(t){return t.trimEnd()}:function(t){return t.replace(dz,"")},Tb=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function mz(e,t){return Tb.lastIndex=t,Tb.exec(e)[1]??""}function yz(e){if(e.length===0)return null;let t=1,n=1;for(let s=0;s<e.length;){const r=e.charCodeAt(s);switch(r){case 35:case 39:case 60:case 123:case 125:return null}if(r===10)t++,n=1,s++;else if(n++,r>=55296&&r<=56319&&s+1<e.length){const i=e.charCodeAt(s+1);s+=i>=56320&&i<=57343?2:1}else s++}return{offset:e.length,line:t,column:n}}var kz=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error("parser can only be used once");if(this.message.length>0){const e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){const t=yz(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Ne(n,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(e,t,n){let s=[];for(;!this.isEOF();){const r=this.char();if(r===123){const i=this.parseArgument(e,n);if(i.err)return i;s.push(i.val)}else{if(r===125&&e>0)break;if(r===35&&(t==="plural"||t==="selectordinal")){const i=this.clonePosition();this.bump(),s.push({type:7,location:Ne(i,this.clonePosition())})}else if(r===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Ne(this.clonePosition(),this.clonePosition()))}else if(r===60&&!this.ignoreTag&&Up(this.peek()||0)){const i=this.parseTag(e,t);if(i.err)return i;s.push(i.val)}else{const i=this.parseLiteral(e,t);if(i.err)return i;s.push(i.val)}}}return{val:s,err:null}}parseTag(e,t){const n=this.clonePosition();this.bump();const s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${s}/>`,location:Ne(n,this.clonePosition())},err:null};if(this.bumpIf(">")){const r=this.parseMessage(e+1,t,!0);if(r.err)return r;const i=r.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Up(this.char()))return this.error(23,Ne(a,this.clonePosition()));const l=this.clonePosition();return s!==this.parseTagName()?this.error(26,Ne(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:i,location:Ne(n,this.clonePosition())},err:null}:this.error(23,Ne(a,this.clonePosition())))}else return this.error(27,Ne(n,this.clonePosition()))}else return this.error(23,Ne(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&vz(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const n=this.clonePosition();let s="";for(;;){const i=this.tryParseQuote(t);if(i){s+=i;continue}const a=this.tryParseUnquoted(e,t);if(a){s+=a;continue}const l=this.tryParseLeftAngleBracket();if(l){s+=l;continue}break}const r=Ne(n,this.clonePosition());return{val:{type:0,value:s,location:r},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!bz(this.peek()||0))?(this.bump(),"<"):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();const t=[this.char()];for(this.bump();!this.isEOF();){const n=this.char();if(n===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(n);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;const n=this.char();return n===60||n===123||n===35&&(t==="plural"||t==="selectordinal")||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){const n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,Ne(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Ne(n,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,Ne(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Ne(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:Ne(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Ne(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(3,Ne(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=mz(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Ne(e,this.clonePosition())}}parseArgumentOptions(e,t,n,s){let r=this.clonePosition(),i=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(i){case"":return this.error(4,Ne(r,a));case"number":case"date":case"time":{this.bumpSpace();let l=null;if(this.bumpIf(",")){this.bumpSpace();const d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;const h=gz(f.val);if(h.length===0)return this.error(6,Ne(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Ne(d,this.clonePosition())}}const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=Ne(s,this.clonePosition());if(l&&l.style.startsWith("::")){let d=pz(l.style.slice(2));if(i==="number"){const f=this.parseNumberSkeletonFromString(d,l.styleLocation);return f.err?f:{val:{type:2,value:n,location:u,style:f.val},err:null}}else{if(d.length===0)return this.error(10,u);let f=d;this.locale&&(f=lz(d,this.locale));const h={type:1,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?QT(f):{}};return{val:{type:i==="date"?3:4,value:n,location:u,style:h},err:null}}}return{val:{type:i==="number"?2:i==="date"?3:4,value:n,location:u,style:(l==null?void 0:l.style)??null},err:null}}case"plural":case"selectordinal":case"select":{const l=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,Ne(l,{...l}));this.bumpSpace();let c=this.parseIdentifierIfPossible(),u=0;if(i!=="select"&&c.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Ne(this.clonePosition(),this.clonePosition()));this.bumpSpace();const p=this.tryParseDecimalInteger(13,14);if(p.err)return p;this.bumpSpace(),c=this.parseIdentifierIfPossible(),u=p.val}const d=this.tryParsePluralOrSelectOptions(e,i,t,c);if(d.err)return d;const f=this.tryParseArgumentClose(s);if(f.err)return f;const h=Ne(s,this.clonePosition());return i==="select"?{val:{type:5,value:n,options:Eb(d.val),location:h},err:null}:{val:{type:6,value:n,options:Eb(d.val),offset:u,pluralType:i==="plural"?"cardinal":"ordinal",location:h},err:null}}default:return this.error(5,Ne(r,a))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Ne(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0;const t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,Ne(n,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)e-=1;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=ez(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?rz(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,s){let r=!1;const i=[],a=new Set;let{value:l,location:c}=s;for(;;){if(l.length===0){const h=this.clonePosition();if(t!=="select"&&this.bumpIf("=")){const p=this.tryParseDecimalInteger(16,19);if(p.err)return p;c=Ne(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(a.has(l))return this.error(t==="select"?21:20,c);l==="other"&&(r=!0),this.bumpSpace();const u=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?17:18,Ne(this.clonePosition(),this.clonePosition()));const d=this.parseMessage(e+1,t,n);if(d.err)return d;const f=this.tryParseArgumentClose(u);if(f.err)return f;i.push([l,{value:d.val,location:Ne(u,this.clonePosition())}]),a.add(l),this.bumpSpace(),{value:l,location:c}=this.parseIdentifierIfPossible()}return i.length===0?this.error(t==="select"?15:16,Ne(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(22,Ne(this.clonePosition(),this.clonePosition())):{val:i,err:null}}tryParseDecimalInteger(e,t){let n=1;const s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);let r=!1,i=0;for(;!this.isEOF();){const l=this.char();if(l>=48&&l<=57)r=!0,i=i*10+(l-48),this.bump();else break}const a=Ne(s,this.clonePosition());return r?(i*=n,Number.isSafeInteger(i)?{val:i,err:null}:this.error(t,a)):this.error(e,a)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");const t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;const e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){const t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){const t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&wz(this.char());)this.bump()}peek(){if(this.isEOF())return null;const e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function Up(e){return e>=97&&e<=122||e>=65&&e<=90}function bz(e){return Up(e)||e===47}function vz(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function wz(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Fp(e){e.forEach(t=>{if(delete t.location,B3(t)||q3(t))for(const n in t.options)delete t.options[n].location,Fp(t.options[n].value);else O3(t)&&P3(t.style)||(D3(t)||L3(t))&&Pp(t.style)?delete t.style.location:H3(t)&&Fp(t.children)})}function jz(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new kz(e,t).parse();if(n.err){const s=SyntaxError(iz[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return t!=null&&t.captureLocation||Fp(n.val),n.val}var tx=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},zb=class extends tx{constructor(e,t,n,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",s)}},Sz=class extends tx{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},$z=class extends tx{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function Cz(e){return e.length<2?e:e.reduce((t,n)=>{const s=t[t.length-1];return!s||s.type!==0||n.type!==0?t.push(n):s.value+=n.value,t},[])}function Ez(e){return typeof e=="function"}function sf(e,t,n,s,r,i,a){if(e.length===1&&Cb(e[0]))return[{type:0,value:e[0].value}];const l=[];for(const c of e){if(Cb(c)){l.push({type:0,value:c.value});continue}if(oz(c)){typeof i=="number"&&l.push({type:0,value:n.getNumberFormat(t).format(i)});continue}const{value:u}=c;if(!(r&&u in r))throw new $z(u,a);let d=r[u];if(az(c)){(!d||typeof d=="string"||typeof d=="number"||typeof d=="bigint")&&(d=typeof d=="string"||typeof d=="number"||typeof d=="bigint"?String(d):""),l.push({type:typeof d=="string"?0:1,value:d});continue}if(D3(c)){const f=typeof c.style=="string"?s.date[c.style]:Pp(c.style)?c.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(L3(c)){const f=typeof c.style=="string"?s.time[c.style]:Pp(c.style)?c.style.parsedOptions:s.time.medium;l.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(O3(c)){const f=typeof c.style=="string"?s.number[c.style]:P3(c.style)?c.style.parsedOptions:void 0;if(f&&f.scale){const h=f.scale||1;if(typeof d=="bigint"){if(!Number.isInteger(h))throw new TypeError(`Cannot apply fractional scale ${h} to bigint value. Scale must be an integer when formatting bigint.`);d=d*BigInt(h)}else d=d*h}l.push({type:0,value:n.getNumberFormat(t,f).format(d)});continue}if(H3(c)){const{children:f,value:h}=c,p=r[h];if(!Ez(p))throw new Sz(h,"function",a);let m=p(sf(f,t,n,s,r,i).map(b=>b.value));Array.isArray(m)||(m=[m]),l.push(...m.map(b=>({type:typeof b=="string"?0:1,value:b})))}if(B3(c)){const f=d,h=(Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0)||c.options.other;if(!h)throw new zb(c.value,d,Object.keys(c.options),a);l.push(...sf(h.value,t,n,s,r));continue}if(q3(c)){const f=`=${d}`;let h=Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0;if(!h){if(!Intl.PluralRules)throw new tx(`Intl.PluralRules is not available in this environment.
|
|
75
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
76
|
-
`,"MISSING_INTL_API",a);const m=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));h=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!h)throw new zb(c.value,d,Object.keys(c.options),a);const p=typeof d=="bigint"?Number(d):d;l.push(...sf(h.value,t,n,s,r,p-(c.offset||0)));continue}}return Cz(l)}function Tz(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,s)=>(n[s]={...e[s],...t[s]},n),{})}:e}function zz(e,t){return t?Object.keys(e).reduce((n,s)=>(n[s]=Tz(e[s],t[s]),n),{...e}):e}function d1(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Az(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:c1((...t)=>new Intl.NumberFormat(...t),{cache:d1(e.number),strategy:u1.variadic}),getDateTimeFormat:c1((...t)=>new Intl.DateTimeFormat(...t),{cache:d1(e.dateTime),strategy:u1.variadic}),getPluralRules:c1((...t)=>new Intl.PluralRules(...t),{cache:d1(e.pluralRules),strategy:u1.variadic})}}var Vt,Nz=(Vt=class{constructor(t,n=Vt.defaultLocale,s,r){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=i=>{const a=this.formatToParts(i);if(a.length===1)return a[0].value;const l=a.reduce((c,u)=>(!c.length||u.type!==0||typeof c[c.length-1]!="string"?c.push(u.value):c[c.length-1]+=u.value,c),[]);return l.length<=1?l[0]||"":l},this.formatToParts=i=>sf(this.ast,this.locales,this.formatters,this.formats,i,void 0,this.message),this.resolvedOptions=()=>{var i;return{locale:((i=this.resolvedLocale)==null?void 0:i.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=Vt.resolveLocale(n),typeof t=="string"){if(this.message=t,!Vt.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...i}=r||{};this.ast=Vt.__parse(t,{...i,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=zz(Vt.formats,s),this.formatters=r&&r.formatters||Az(this.formatterCache)}static get defaultLocale(){return Vt.memoizedDefaultLocale||(Vt.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),Vt.memoizedDefaultLocale}},Vt.memoizedDefaultLocale=null,Vt.resolveLocale=t=>{if(typeof Intl.Locale>"u")return;const n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},Vt.__parse=jz,Vt.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Vt),Mz=Nz;const Rz={"@astryx.pagination.label":{defaultMessage:"Pagination",description:"Aria label for the pagination navigation region."},"@astryx.pagination.previous":{defaultMessage:"Go to previous page",description:"Aria label for the previous-page button."},"@astryx.pagination.next":{defaultMessage:"Go to next page",description:"Aria label for the next-page button."},"@astryx.pagination.previousBy":{defaultMessage:"Go back {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the previous button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.nextBy":{defaultMessage:"Go forward {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the next button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.first":{defaultMessage:"Go to first page",description:"Aria label for the first-page button (« double chevron) in the input pagination variant."},"@astryx.pagination.last":{defaultMessage:"Go to last page",description:"Aria label for the last-page button (» double chevron) in the input pagination variant."},"@astryx.pagination.goToPage":{defaultMessage:"Go to page {page, number}",description:"Aria label for an individual page-number button. `page` is 1-based."},"@astryx.pagination.goToPageInput":{defaultMessage:"Go to page",description:"Aria label for the editable page/row number box in the input pagination variant. No number — the box holds the value itself."},"@astryx.pagination.pageLabel":{defaultMessage:"Page",description:'Visible label before the editable box in the input pagination variant. Example: "Page [ 1 ] / 10".'},"@astryx.pagination.ofTotalPages":{defaultMessage:"/ {total, number}",description:'Visible total shown after the editable box in the input pagination variant. Example: the "/ 10" in "Page [ 1 ] / 10".'},"@astryx.pagination.pageIndicators":{defaultMessage:"Page indicators",description:"Aria label for the dots-variant page-indicator group."},"@astryx.pagination.itemsPerPage":{defaultMessage:"Items per page",description:"Label for the page-size selector."},"@astryx.pagination.count":{defaultMessage:"{from, number}–{to, number} of {total, number}",description:`Visible range-of-total text on a pagination bar. Example: "1–20 of 347"; the en-dash is translator's choice.`},"@astryx.pagination.pageOfTotal":{defaultMessage:"Page {current, number} of {total, number}",description:'Visible "Page X of Y" text on the compact pagination variant; also announced by screen readers. Keep short — sits in a compact toolbar.'},"@astryx.pagination.pageAnnounce":{defaultMessage:"Page {current, number}",description:"Screen-reader announcement when a page changes and total is unknown."},"@astryx.powersearch.editor.field":{defaultMessage:"Field",description:"Noun form-label above the field-picker dropdown in the PowerSearch filter-builder popover (which data column to filter on). Not an action."},"@astryx.powersearch.editor.operator":{defaultMessage:"Operator",description:'Noun form-label above the operator dropdown in the PowerSearch filter-builder popover. Refers to a comparison verb ("is", "contains"), not a math or phone operator.'},"@astryx.powersearch.editor.addFilter":{defaultMessage:"+ Add filter",description:'Button label inside a group in the PowerSearch filter-builder; adds another filter row (e.g. "Status = Active"). The leading "+ " is a plus-sign character.'},"@astryx.powersearch.editor.removeFilter":{defaultMessage:"Remove filter",description:'Screen-reader-only label on the "×" icon button next to a filter row in the PowerSearch editor; removes that row. Imperative verb.'},"@astryx.powersearch.editor.groupOperator":{defaultMessage:"Group operator",description:'Screen-reader-only label for the AND/OR toggle that combines sibling filters inside a filter group. Sighted users see just "AND" or "OR".'},"@astryx.powersearch.editor.group":{defaultMessage:"Group",description:'Fallback noun label shown on a nested filter-group chip when no AND/OR combining operator has been chosen. Use the noun ("a cluster"), not the verb "to group".'},"@astryx.powersearch.editor.delete":{defaultMessage:"Delete",description:"Button label inside the PowerSearch filter-editor popover; deletes the currently-edited filter row. Imperative verb form."},"@astryx.powersearch.editor.cancel":{defaultMessage:"Cancel",description:"Button label inside the PowerSearch filter-editor popover; closes the popover and discards pending edits. Imperative verb form."},"@astryx.powersearch.editor.apply":{defaultMessage:"Apply",description:'Primary button label inside the PowerSearch filter-editor popover; confirms the edited filter. Imperative verb; consumers may override to "Save".'},"@astryx.powersearch.valueEditor.value":{defaultMessage:"Value",description:'Noun form-label above a single free-text/number input in the PowerSearch value editor (e.g. the "acme" in `Name contains acme`). Not a verb or "worth".'},"@astryx.powersearch.valueEditor.values":{defaultMessage:"Values",description:"Plural noun form-label above a multi-value chip input in the PowerSearch value editor. Should match its singular counterpart `Value` in your language."},"@astryx.powersearch.valueEditor.time":{defaultMessage:"Time",description:"Noun form-label above a time-of-day (HH:MM) picker in the PowerSearch value editor. Clock time, not duration or era."},"@astryx.powersearch.valueEditor.date":{defaultMessage:"Date",description:"Noun form-label above a calendar-date picker in the PowerSearch value editor. Calendar date, not romantic date or fruit."},"@astryx.powersearch.valueEditor.relativeDate":{defaultMessage:"Relative date",description:'Label for the relative-date selector (e.g. "Last 7 days") in the PowerSearch value editor.'},"@astryx.powersearch.valueEditor.startDate":{defaultMessage:"Start date",description:"Noun form-label above the start-of-range date picker in the PowerSearch value editor. Pairs with `End date` — keep the two parallel in your language."},"@astryx.powersearch.valueEditor.endDate":{defaultMessage:"End date",description:"Noun form-label above the end-of-range date picker in the PowerSearch value editor. Pairs with `Start date` — keep the two parallel."},"@astryx.powersearch.valueEditor.entities":{defaultMessage:"Entities",description:'"Entities" is jargon — plural noun form-label above an entity picker (people, teams, projects). Prefer a natural collective like "items" if your language has no equivalent.'},"@astryx.powersearch.valueEditor.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input in the PowerSearch entity/typeahead picker. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterValuePlaceholder":{defaultMessage:"Enter value…",description:"Placeholder inside a free-text single-value input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.addValuesPlaceholder":{defaultMessage:"Add values…",description:"Placeholder inside a multi-value chip input where the user types items and presses Enter to add each as a chip. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterNumberPlaceholder":{defaultMessage:"Enter number…",description:"Placeholder inside a numeric input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.selectValuesPlaceholder":{defaultMessage:"Select values…",description:"Placeholder on a dropdown for choosing values from a fixed enum list in the PowerSearch value editor. Imperative verb (user selects, not types)."},"@astryx.powersearch.operator.contains":{defaultMessage:"contains",description:"PowerSearch string operator, rendered inline as `<field> contains <value>` (e.g. `Name contains acme`). Lowercase verb form."},"@astryx.powersearch.operator.notContains":{defaultMessage:"does not contain",description:"PowerSearch negated string operator. Example: `Name does not contain test`. Lowercase; pairs with `contains`."},"@astryx.powersearch.operator.startsWith":{defaultMessage:"starts with",description:"PowerSearch string prefix operator. Example: `Email starts with admin@`. Lowercase."},"@astryx.powersearch.operator.notStartsWith":{defaultMessage:"does not start with",description:"PowerSearch negated prefix operator. Example: `Email does not start with test`. Lowercase; pairs with `starts with`."},"@astryx.powersearch.operator.endsWith":{defaultMessage:"ends with",description:"PowerSearch string suffix operator. Example: `Email ends with @meta.com`. Lowercase."},"@astryx.powersearch.operator.notEndsWith":{defaultMessage:"does not end with",description:"PowerSearch negated suffix operator. Example: `Email does not end with @gmail.com`. Lowercase; pairs with `ends with`."},"@astryx.powersearch.operator.is":{defaultMessage:"is",description:"PowerSearch equality operator for strings/enums. Example: `Status is Active`. Separate from `operator.equals` (numbers) — translations may diverge."},"@astryx.powersearch.operator.isNot":{defaultMessage:"is not",description:"PowerSearch inequality operator for strings/enums. Example: `Status is not Draft`. Pairs with `is`; separate from `operator.notEquals`."},"@astryx.powersearch.operator.equals":{defaultMessage:"is",description:'PowerSearch numeric equality operator. Example: `Age is 30`. Ships same English "is" as `operator.is` but is separate so numbers may diverge (e.g. "equals").'},"@astryx.powersearch.operator.notEquals":{defaultMessage:"is not",description:"PowerSearch numeric inequality operator. Example: `Count is not 0`. Same divergence option as `operator.equals`."},"@astryx.powersearch.operator.greaterThan":{defaultMessage:"is greater than",description:"PowerSearch numeric operator, strictly greater than. Example: `Age is greater than 18`. Lowercase."},"@astryx.powersearch.operator.lessThan":{defaultMessage:"is less than",description:"PowerSearch numeric operator, strictly less than. Example: `Priority is less than 5`. Lowercase."},"@astryx.powersearch.operator.greaterThanOrEqual":{defaultMessage:"is greater than or equal to",description:'PowerSearch numeric operator, ≥. Example: `Age is greater than or equal to 21`. A shorter form (e.g. "≥") is fine if idiomatic.'},"@astryx.powersearch.operator.lessThanOrEqual":{defaultMessage:"is less than or equal to",description:"PowerSearch numeric operator, ≤. Example: `Priority is less than or equal to 3`. A shorter form is fine if idiomatic."},"@astryx.powersearch.operator.before":{defaultMessage:"is before",description:"PowerSearch date operator, strictly earlier. Example: `Created is before 2024-01-01`. Temporal, not spatial."},"@astryx.powersearch.operator.after":{defaultMessage:"is after",description:"PowerSearch date operator, strictly later. Example: `Updated is after 2024-06-01`. Temporal."},"@astryx.powersearch.operator.between":{defaultMessage:"is between",description:"PowerSearch date operator, inclusive range. Example: `Created is between 2024-01-01 and 2024-06-30`. The `and <end>` portion is composed separately."},"@astryx.powersearch.operator.isTrue":{defaultMessage:"is true",description:"PowerSearch boolean operator: matches truthy. Example: `Is admin is true`. Pairs with `is false`; field may be affirmative or a yes/no question."},"@astryx.powersearch.operator.isFalse":{defaultMessage:"is false",description:"PowerSearch boolean operator: matches falsy. Example: `Is admin is false`. Pairs with `is true`."},"@astryx.powersearch.operator.isAnyOf":{defaultMessage:"is any of",description:"PowerSearch list operator: value is in the set. Example: `Status is any of [Active, Paused, Draft]`. The value list is composed separately; pairs with `is none of`."},"@astryx.powersearch.operator.isNoneOf":{defaultMessage:"is none of",description:"PowerSearch negated list operator: value not in the set. Example: `Status is none of [Archived, Deleted]`. Pairs with `is any of`."},"@astryx.powersearch.valueEditor.itemsCount":{defaultMessage:"{count, number} {count, plural, one {item} other {items}}",description:"Overflow summary on a compact filter chip when the list of selected items is too long. Example: `3 items` or `1 item`."},"@astryx.powersearch.valueEditor.entitiesCount":{defaultMessage:"{count, number} {count, plural, one {entity} other {entities}}",description:"Overflow summary on a compact filter chip when the list of selected entities is too long. Example: `5 entities` or `1 entity`. Pair with `itemsCount` translation."},"@astryx.powersearch.valueEditor.dateRange":{defaultMessage:"date range",description:"Fallback lowercase noun rendered inline in a filter chip when a date-range value can't be formatted (e.g. `Created is between date range`). Keep lowercase."},"@astryx.powersearch.valueEditor.filtersCount":{defaultMessage:"{count, number} {count, plural, one {filter} other {filters}}",description:"Summary inside a filter chip when the value is a nested set of filters. Example: `3 filters` or `1 filter`."},"@astryx.powersearch.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."},"@astryx.alertDialog.cancel":{defaultMessage:"Cancel",description:"Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text."},"@astryx.appShell.mobileNavigation":{defaultMessage:"Mobile navigation",description:'Screen-reader-only accessible name for the mobile-only navigation region on small viewports. "Mobile" = phone/tablet (small screen), not "movable".'},"@astryx.appShell.skipToContent":{defaultMessage:"Skip to content",description:"Text of the skip link — the first focusable element on the page, visible only while keyboard-focused. Activating it jumps focus past the navigation to the main content area. Imperative verb; keep short."},"@astryx.avatar.nameWithStatus":{defaultMessage:"{name}, {status}",description:`Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. "Jane Doe, Online". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale.`},"@astryx.avatarGroup.label":{defaultMessage:"Avatars",description:'Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with "Team members", "Attendees", etc.'},"@astryx.avatarGroup.keyboardHint":{defaultMessage:"Use arrow keys to move between avatars",description:"Screen-reader-only instruction attached (via aria-describedby) to a group of interactive avatars that share a single Tab stop. Tells keyboard users the Left/Right arrow keys move focus between the avatars. Only announced when the group has interactive (link/button) avatars."},"@astryx.avatarGroup.overflow":{defaultMessage:"{count, number} more",description:'Accessible name for the "+N" overflow indicator at the end of an AvatarGroup — announces how many additional avatars are not shown. Example: `5 more`. The visible "+N" text is unaffected; this is the aria-label only.'},"@astryx.banner.dismiss":{defaultMessage:"Dismiss",description:'"Dismiss" = close/hide this notification (not "reject a person"). Aria label AND tooltip on the small X button on a Banner.'},"@astryx.calendar.previousMonth":{defaultMessage:"Previous month",description:"Screen-reader-only label on the left-arrow button in a Calendar's month header (navigates one month back). Pairs with `calendar.nextMonth`."},"@astryx.calendar.nextMonth":{defaultMessage:"Next month",description:"Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."},"@astryx.calendar.daySelected":{defaultMessage:"{date}, selected",description:'Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. "Thursday, January 15, 2026". The trailing state word tells screen-reader users the focused day is selected.'},"@astryx.calendar.dayRangeStart":{defaultMessage:"{date}, range start",description:"Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."},"@astryx.calendar.dayRangeEnd":{defaultMessage:"{date}, range end",description:"Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."},"@astryx.calendar.dayRangeStartAndEnd":{defaultMessage:"{date}, range start and range end",description:"Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."},"@astryx.calendar.dayInRange":{defaultMessage:"{date}, in range",description:"Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."},"@astryx.calendar.rangeStartAnnounce":{defaultMessage:"Start date {date}. Select an end date.",description:"Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."},"@astryx.calendar.rangeCompleteAnnounce":{defaultMessage:"Selected range: {start} to {end}.",description:"Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."},"@astryx.carousel.label":{defaultMessage:"Carousel",description:'Screen-reader-only fallback name for a horizontally-scrolling row of items. If "carousel" is unfamiliar in your locale, prefer the standard term (e.g. "slider").'},"@astryx.carousel.scrollLeft":{defaultMessage:"Scroll left",description:"Screen-reader-only label on the left arrow button in a Carousel. Pairs with `carousel.scrollRight`; in RTL locales, coordinate the two so left/right match layout."},"@astryx.carousel.scrollRight":{defaultMessage:"Scroll right",description:"Screen-reader-only label on the right arrow button in a Carousel. Pairs with `carousel.scrollLeft`; same RTL note."},"@astryx.carousel.slideLabel":{defaultMessage:"Slide {current, number} of {total, number}",description:"Screen-reader accessible name for one slide in a Carousel, giving its position. `current` is the 1-based slide number; `total` is the slide count."},"@astryx.chat.status.sending":{defaultMessage:"Sending",description:"Chat send-status caption under an outgoing message while it is being transmitted. Part of the set sending → sent → delivered → read (or failed) — keep tense/aspect consistent."},"@astryx.chat.status.sent":{defaultMessage:"Sent",description:"Chat send-status caption shown once the message reaches the server. Part of the set sending → **sent** → delivered → read (or failed) — keep tense consistent."},"@astryx.chat.status.delivered":{defaultMessage:"Delivered",description:"Chat send-status caption shown once the recipient's device received the message. Part of the set sending → sent → **delivered** → read (or failed)."},"@astryx.chat.status.read":{defaultMessage:"Read",description:'Chat send-status caption shown once the recipient opened the message. English past-participle ("has been read", /rɛd/), not the present verb — part of the set sending → sent → delivered → **read**.'},"@astryx.chat.status.failed":{defaultMessage:"Failed",description:"Chat send-status caption shown when the send attempt errored. Part of the set — the terminal failure branch, orthogonal to the sent → delivered → read success track."},"@astryx.chat.messageAriaLabel":{defaultMessage:"Message {status}",description:"Screen-reader-only accessible name for a chat message row. `{status}` interpolates the localized status word (e.g. `Message sent`, `Message delivered`) — reorder if needed."},"@astryx.chat.pastedText.expand":{defaultMessage:"Expand",description:'Button label on a chip in the chat composer representing a long pasted text block; clicking reveals full content. "Expand" here means reveal more, not grow physically.'},"@astryx.checkboxList.item.checkbox":{defaultMessage:"Checkbox",description:"Screen-reader-only last-ditch fallback name for a checkbox inside a list item when no label is provided. Should almost never render — consumers should supply a real label."},"@astryx.commandPalette.emptySearch":{defaultMessage:"No results",description:"Fallback empty-state text inside a CommandPalette when the user's query has no matches. Very short (2 words); neutral tone."},"@astryx.commandPalette.emptyBootstrap":{defaultMessage:"Type to search",description:"Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment."},"@astryx.commandPalette.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."},"@astryx.commandPalette.noResultsFor":{defaultMessage:"No results for {query}",description:"Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."},"@astryx.commandPalette.loading":{defaultMessage:"Loading",description:"Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner."},"@astryx.dateRangeInput.presetDateRanges":{defaultMessage:"Preset date ranges",description:'Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. "Last 7 days", "This month").'},"@astryx.dateTimeInput.timePlaceholder":{defaultMessage:"Select a time",description:'Grey placeholder inside the empty time-of-day slot in a DateTimeInput. "Time" = clock time (HH:MM), not duration.'},"@astryx.dialog.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss the dialog, not "nearby" (English homograph). Aria label AND tooltip on the X at the top-right of a Dialog.'},"@astryx.dropdownMenu.label":{defaultMessage:"Menu",description:'Screen-reader-only fallback name for a dropdown menu popover. Very generic; consumers usually override. Noun ("a menu"), not the imperative.'},"@astryx.lightbox.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss (not "nearby"). Screen-reader-only label on the X button that dismisses a Lightbox.'},"@astryx.lightbox.previous":{defaultMessage:"Previous",description:"Screen-reader-only label on the left-arrow button in a Lightbox (navigates to previous media item). Pairs with `lightbox.next`."},"@astryx.lightbox.next":{defaultMessage:"Next",description:"Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."},"@astryx.markdown.taskList":{defaultMessage:"Task list",description:"Screen-reader-only accessible name for a GitHub-flavored Markdown task list (rendered from `- [ ] item` / `- [x] done` syntax)."},"@astryx.markdown.table":{defaultMessage:"Table",description:'Screen-reader-only accessible name for a table rendered inside a Markdown block. Noun ("a table"), not the verb. Separate from `@astryx.table.label` — translations may diverge.'},"@astryx.mobileNav.closeNavigation":{defaultMessage:"Close navigation",description:"Screen-reader-only label on the X/close button that dismisses the MobileNav overlay. Pairs with `mobileNav.toggle.open`."},"@astryx.multiSelector.selectAll":{defaultMessage:"Select all",description:'Label on the checkbox/toggle at the top of a MultiSelector dropdown that selects every option. "All" is a determiner here (as in "all the options"), not the pronoun.'},"@astryx.multiSelector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a MultiSelector's dropdown panel. Imperative verb; trailing `…` is one character."},"@astryx.multiSelector.searchOptions":{defaultMessage:"Search options",description:"Screen-reader-only accessible name for that same search input inside a MultiSelector."},"@astryx.multiSelector.selectAllPartiallySelected":{defaultMessage:"{label}, partially selected",description:'Accessible name for the MultiSelector select-all option while only some options are selected. `{label}` is the visible select-all label (e.g. "Select all"). ARIA forbids aria-selected="mixed" on options, so the indeterminate state is conveyed through the name instead. "Partially" = some but not all.'},"@astryx.popover.close":{defaultMessage:"Close popover",description:'"Close" = shut/dismiss, not "nearby". Screen-reader-only label on the close button inside a Popover.'},"@astryx.selector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a Selector's dropdown panel (for filtering options). Imperative verb; trailing `…` is one character."},"@astryx.selector.searchOptions":{defaultMessage:"Search options",description:'"Options" = the list of choices in the dropdown. Screen-reader-only accessible name for the search input inside a Selector.'},"@astryx.sideNav.label":{defaultMessage:"Side navigation",description:"Screen-reader-only accessible name for the primary vertical sidebar nav (usually on the left)."},"@astryx.sideNav.resizeSidebar":{defaultMessage:"Resize sidebar",description:"Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label":{defaultMessage:"Tabs",description:'Screen-reader-only fallback name for a horizontal tab bar. Plural noun; "Tabs" here = UI tab panels, not browser tabs or the Tab key.'},"@astryx.table.label":{defaultMessage:"Table",description:'Fallback screen-reader-only accessible name for a data-table region when the consumer provides none. Noun ("a table"), not the verb "to table".'},"@astryx.table.noData":{defaultMessage:"No data",description:'Fallback empty-state text in the table body when there are zero rows. Neutral tone (not error-y); consumers commonly override with something specific like "No results".'},"@astryx.table.filter.allPlaceholder":{defaultMessage:"All",description:'Placeholder on a per-column filter dropdown when nothing is selected, meaning "no filter — all rows match". Determiner form (as in "all values"), not the pronoun.'},"@astryx.table.filter.reset":{defaultMessage:"Reset",description:"Button label inside a table's filter panel/popover; clears pending filter values back to defaults. Imperative verb."},"@astryx.table.filter.apply":{defaultMessage:"Apply",description:"Primary button label inside a table's filter panel/popover; commits pending filter values. Imperative verb; pairs with `Reset`."},"@astryx.table.selection.selectAllRows":{defaultMessage:"Select all rows",description:'Aria label for the "select all rows" checkbox in a Table header.'},"@astryx.table.selection.selectRow":{defaultMessage:"Select row",description:'Aria label for the "select row" checkbox on a Table row.'},"@astryx.table.selection.selectRowNamed":{defaultMessage:"Select {label}",description:"Aria label for a Table row's selection checkbox when a per-row label is available (via getRowLabel). `label` is the row's human-readable identity, e.g. \"Alice\"."},"@astryx.table.sort.ascending":{defaultMessage:"Sort ascending",description:"Screen-reader-only label on a column header button that will sort the column ascending. Part of a set with `sort.descending` and `sort.clear` — keep parallel."},"@astryx.table.sort.descending":{defaultMessage:"Sort descending",description:"Screen-reader-only label on a column header button that will sort the column descending. Part of a set with `sort.ascending` and `sort.clear`."},"@astryx.table.sort.clear":{defaultMessage:"Clear sort",description:'Screen-reader-only label on a column header button that will remove the current sort. "Clear" here means remove, not transparent. Part of the sort set.'},"@astryx.table.sort.direction.ascending":{defaultMessage:"ascending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.direction.descending":{defaultMessage:"descending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.sortBy":{defaultMessage:"Sort by {label}",description:"Aria label for a sortable Table header button when the column is unsorted. `label` is the column header text."},"@astryx.table.sort.sortedBy":{defaultMessage:"Sort by {label}, sorted {direction}",description:"Aria label for a sorted Table header button. `direction` is the localized direction word from @astryx.table.sort.direction.*."},"@astryx.table.sort.sortedByWithPriority":{defaultMessage:"Sort by {label}, sorted {direction}, priority {rank, number} of {total, number}",description:"Aria label for a sorted Table header button in multi-sort. `rank` is the 1-based position of this column in the sort order; `total` is the number of sorted columns."},"@astryx.toast.dismiss":{defaultMessage:"Dismiss notification",description:"Screen-reader-only label on the X button of a Toast (transient notification popup). Distinct from `banner.dismiss` (persistent banner)."},"@astryx.toast.viewport":{defaultMessage:"Notifications",description:"Screen-reader-only accessible name for the invisible landmark region hosting the stack of Toast popups (usually pinned to a screen corner)."},"@astryx.tokenizer.clearAll":{defaultMessage:"Clear all",description:'Label on the "×" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner "all"; short.'},"@astryx.topNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel":{defaultMessage:"Top navigation",description:"Default accessible name (aria-label) for the <nav> landmark rendered by TopNav when no label is provided."},"@astryx.treeList.toggleChildren":{defaultMessage:"Toggle children",description:'"Children" = child nodes in the tree, not human children. Screen-reader-only label on the chevron next to a TreeList item that has children — toggles the sub-list.'},"@astryx.typeahead.emptySearchResults":{defaultMessage:"No results found",description:"Fallback empty-state message inside a Typeahead's suggestion popover when the current query has no matches. Neutral tone (not error-y)."},"@astryx.typeahead.loading":{defaultMessage:"Loading",description:"Screen-reader-only name for a spinner shown inside a Typeahead dropdown while suggestions are being fetched. Present-progressive form."},"@astryx.typeahead.searchResults":{defaultMessage:"Search results",description:"Screen-reader-only accessible name for the list of suggestions inside a Typeahead dropdown."},"@astryx.typeahead.clearSelection":{defaultMessage:"Clear selection",description:'"Selection" = the chosen value (not highlighted text). Screen-reader-only label on the X that clears the currently-selected value from a Typeahead.'},"@astryx.breadcrumbs.label":{defaultMessage:"Breadcrumb",description:"Screen-reader-only fallback name for the breadcrumb trail (e.g. `Home > Section > Page`). Singular in English per ARIA convention; plural is fine if natural in your locale."},"@astryx.chat.composer.placeholder":{defaultMessage:"Type a message…",description:"Grey placeholder text inside the empty chat composer textarea. Imperative verb; trailing `…` is one character."},"@astryx.chat.composerDrawer.label":{defaultMessage:"Items",description:'Fallback aria label for the ChatComposerDrawer — a horizontal list of attachment/tool chips. Consumers usually override with "Attachments", "Tools", etc.'},"@astryx.chat.composerInput.label":{defaultMessage:"Message input",description:'Screen-reader-only accessible name for the chat composer textarea. Reorder freely if your language uses one word for "message field".'},"@astryx.chat.speechRecognition.noSpeechDetected":{defaultMessage:"No speech was detected.",description:"Full-sentence error shown inline in the chat composer after voice input captured silence. Soft-error tone (not alarming); keep terminal period."},"@astryx.commandPalette.label":{defaultMessage:"Command palette",description:'Screen-reader-only fallback name for a keyboard-driven command menu (usually opened with Cmd/Ctrl-K). If unfamiliar, prefer a natural equivalent like "quick actions".'},"@astryx.commandPalette.input.placeholder":{defaultMessage:"Search…",description:"Grey placeholder inside the CommandPalette's search input. Imperative verb; trailing `…` is one character."},"@astryx.commandPalette.list.label":{defaultMessage:"Commands",description:'"Command" = an app action a user can invoke (metaphor from CLI), not a Unix command. Screen-reader-only name for the matching-commands list.'},"@astryx.contextMenu.label":{defaultMessage:"Context menu",description:'Screen-reader-only fallback name for the right-click / long-press popup menu. "Context" = context-specific to the activated element, not linguistic context.'},"@astryx.dateInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateInput field. "Date" = calendar date, not romantic or fruit. Imperative verb.'},"@astryx.dateInput.dialogLabel":{defaultMessage:"Choose date",description:"Screen-reader-only accessible name for the popover dialog opened from a DateInput's calendar toggle. Imperative verb + noun."},"@astryx.dateInput.closeCalendar":{defaultMessage:"Close calendar",description:"Screen-reader-only label on the X inside the DateInput calendar popover (dismisses the popover). Distinct from `dateInput.toggleCalendarClose`, which labels the outer toggle."},"@astryx.dateInput.openCalendar":{defaultMessage:"Open calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is closed."},"@astryx.dateInput.toggleCalendarClose":{defaultMessage:"Close calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is open. Distinct from closeCalendar (which labels the X inside the popover) so translators can differentiate the toggle vs the close-X UI."},"@astryx.dateInput.clear":{defaultMessage:"Clear {label}",description:"Aria label for the clear-value button in DateInput / DateRangeInput / DateTimeInput. `{label}` is the field's own label so screen readers announce e.g. 'Clear Start date'."},"@astryx.dateTimeInput.timeSuffix":{defaultMessage:"{label} time",description:'Screen-reader-only accessible name for the time-of-day slot in a DateTimeInput. Example: `Start date time`; reorder freely (e.g. "time of {label}").'},"@astryx.dateRangeInput.placeholder":{defaultMessage:"Select date range",description:"Grey placeholder inside an empty DateRangeInput field. Represents picking a start–end date pair. Imperative verb."},"@astryx.dateRangeInput.dialogLabel":{defaultMessage:"Choose date range",description:"Screen-reader-only accessible name for the popover dialog opened from a DateRangeInput. Imperative verb + noun phrase."},"@astryx.dateTimeInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateTimeInput field. Note: the English says only "date" though the field is date+time — do not add "and time" unless natural.'},"@astryx.dateTimeInput.dialogLabel":{defaultMessage:"Choose date",description:`Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only "date" phrasing as the placeholder — don't add "and time" unless natural.`},"@astryx.link.newTab":{defaultMessage:"(opens in new tab)",description:"Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."},"@astryx.mobileNav.toggle.open":{defaultMessage:"Open navigation",description:"Screen-reader-only label on the hamburger button that opens the MobileNav overlay (rendered when the overlay is closed). Pairs with `mobileNav.closeNavigation`."},"@astryx.moreMenu.label":{defaultMessage:"More options",description:"Screen-reader-only name for the small `⋯` (three-dots) overflow button that opens a menu of additional actions. Very short — sits on a tiny icon button."},"@astryx.multiSelector.selectPlaceholder":{defaultMessage:"Select…",description:'Placeholder on an empty MultiSelector trigger button. Same English as `selector.placeholder` but a separate key — plural phrasing like "Choose items…" is fine.'},"@astryx.outline.label":{defaultMessage:"Table of contents",description:"Screen-reader-only fallback name for a page's outline / table-of-contents sidebar (list of in-page headings). Rendered as `aria-label` on a `<nav>` landmark."},"@astryx.powersearch.label":{defaultMessage:"Search",description:"Screen-reader-only accessible name for the PowerSearch input (a filter-builder). The visible placeholder is separate; noun form often reads better than the verb."},"@astryx.powersearch.placeholder":{defaultMessage:"Search…",description:"Grey placeholder text inside the empty PowerSearch input. Imperative verb; trailing `…` is one character."},"@astryx.resizable.collapsed":{defaultMessage:"Collapsed",description:"aria-valuetext for the Resizable drag handle (role=separator) while its panel is collapsed to zero size. Replaces the numeric value announcement, since the numeric value is clamped to the minimum while collapsed. Adjective describing the panel state, not a verb/command."},"@astryx.resizable.handle.label":{defaultMessage:"Resize handle",description:"Screen-reader-only accessible name for the small draggable divider between two Resizable panels (users drag it to change the split ratio)."},"@astryx.selector.placeholder":{defaultMessage:"Select…",description:"Placeholder text on an empty Selector trigger button (a dropdown). Imperative verb; trailing `…` is one character. Very short — appears on the button face."},"@astryx.sideNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a SideNavHeading's overflow menu."},"@astryx.table.pagination.label":{defaultMessage:"Table pagination",description:"Screen-reader-only accessible name for the pagination `<nav>` appended below a data table. Kept separate from `@astryx.pagination.label` so translations may diverge."},"@astryx.timeInput.placeholder":{defaultMessage:"Select a time",description:'"Time" = clock time (HH:MM), not duration or era. Grey placeholder inside an empty TimeInput field; imperative verb.'},"@astryx.topNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a TopNavHeading's overflow menu. Kept separate from the SideNav sibling."},"@astryx.typeahead.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside an empty Typeahead input (a search field that suggests results as the user types). Imperative verb; trailing `…` is one character."},"@astryx.banner.collapse":{defaultMessage:"Collapse",description:'"Collapse" = fold up, not crumble. Aria label AND tooltip on the Banner expand/collapse toggle when currently expanded. Pairs with `banner.expand`.'},"@astryx.banner.expand":{defaultMessage:"Expand",description:'"Expand" = reveal more, not grow physically. Aria label AND tooltip on the same toggle when currently collapsed. Pairs with `banner.collapse`.'},"@astryx.button.loading":{defaultMessage:"Loading",description:'Screen-reader-only live-region announcement while a Button is in its loading state (spinner shown, action in flight). Progressive sense ("work in progress"), not a noun. Kept separate from `typeahead.loading` — translations may diverge.'},"@astryx.chatComposerDrawer.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is collapsed. `{label}` is the drawer's visible name — example: `Expand Attachments`. Pairs with `collapse`."},"@astryx.chatComposerDrawer.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is expanded. Example: `Collapse Attachments`. Pairs with `expand`."},"@astryx.chatDictationButton.startDictation":{defaultMessage:"Start dictation",description:"Accessible label for the microphone button when idle (not listening)."},"@astryx.chatDictationButton.stopDictation":{defaultMessage:"Stop dictation",description:"Accessible label for the microphone button when actively listening."},"@astryx.chatLayout.newMessages":{defaultMessage:"New messages",description:"Text on a floating pill at the bottom of a chat viewport when unseen messages arrive below the fold; clicking scrolls to bottom. Keep short — narrow pill."},"@astryx.chatLayoutScrollButton.scrollToBottom":{defaultMessage:"Scroll to bottom",description:"Visible tooltip AND screen-reader label for a small down-arrow button that scrolls the chat viewport to its latest message."},"@astryx.chatMessage.messageFrom":{defaultMessage:"Message from {sender}",description:"Screen-reader-only accessible name for a chat message when the sender name isn't visible. Example: `Message from Sarah`, `Message from Bot` — reorder freely."},"@astryx.chatSendButton.stop":{defaultMessage:"Stop",description:"Button label that replaces `Send` on the chat send button while an AI response is streaming; clicking aborts generation. Short — appears on a small button."},"@astryx.chatSendButton.send":{defaultMessage:"Send",description:"Primary button label on the chat submit button (paperplane icon). Imperative verb; pairs with `Stop`. Very short."},"@astryx.chatToolCalls.error":{defaultMessage:"Error: {message}",description:"Screen-reader text for a tool call that failed. {message} is the error detail."},"@astryx.chatToolCalls.groupLabel":{defaultMessage:"{count} tool calls",description:"Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."},"@astryx.chatTriggerMenu.suggestions":{defaultMessage:"Suggestions",description:"Screen-reader-only fallback label for the popover listbox opened by a trigger character (`@`, `/`) in the chat composer when the trigger provides no specific label."},"@astryx.citation.label":{defaultMessage:"Citation {number}: {title}",description:"Screen-reader-only accessible name for a Citation chip (a small numbered link to a source). Example: `Citation 1: OpenAI research paper`. Reorder freely."},"@astryx.codeBlock.copied":{defaultMessage:"Copied",description:'Screen-reader-only label on the CodeBlock copy button for ~2s after a successful copy. Past-participle ("has been copied"); pairs with `codeBlock.copyCode`.'},"@astryx.codeBlock.copyCode":{defaultMessage:"Copy code",description:'"Code" = source code. Aria label AND tooltip on the CodeBlock copy button in its default state. Pairs with `codeBlock.copied` (post-click state).'},"@astryx.codeBlock.code":{defaultMessage:"Code",description:`Screen-reader-only fallback name for a code-snippet scroll container when the code's language is unknown. "Code" = source code, not secret code or code of conduct.`},"@astryx.field.optional":{defaultMessage:"Optional",description:"Visible indicator shown next to a form field's label when the field is optional (isOptional). Mutually exclusive with the required indicator. Very short — appears inline after the label text."},"@astryx.field.required":{defaultMessage:"Required",description:"Visible indicator shown next to a form field's label when the field must be filled in (isRequired). Mutually exclusive with the optional indicator. Very short — appears inline after the label text."},"@astryx.fileInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that removes the selected file from a FileInput. Example: `Clear Attachment`, `Clear Résumé`."},"@astryx.fileInput.required":{defaultMessage:"Required",description:'Screen-reader-only description on the FileInput trigger indicating the field must be filled in. Mirrors the visible `Required` indicator next to the field label; conveyed via description because aria-required is not supported on role="button".'},"@astryx.fileInput.triggerWithFiles":{defaultMessage:"{label}, {fileNames}",description:"Accessible name for a FileInput trigger that has files attached, composing the field label with the selected filenames. Example: `Attachments, report.pdf, notes.txt`."},"@astryx.keyboardHint.toNavigate":{defaultMessage:"to navigate",description:"Trailing text in the keyboard-hint badge, shown after arrow-key icons — reads as `← → to navigate`. Lowercase sentence fragment completing the visual phrase; the badge is aria-hidden, so this is for sighted users only."},"@astryx.lightbox.mediaViewer":{defaultMessage:"Media viewer",description:"Screen-reader-only fallback name for the Lightbox dialog when the current media item has no alt text. Should rarely render — consumers should provide alt."},"@astryx.lightbox.zoom":{defaultMessage:"Zoom",description:'Screen-reader-only label on the Lightbox image acting as a zoom toggle button (aria-pressed reflects zoomed state). Verb ("to zoom"), very short.'},"@astryx.lightbox.zoomedIn":{defaultMessage:"Zoomed in, use arrow keys to pan",description:"Polite screen-reader announcement after zooming into a Lightbox image, including a hint that arrow keys pan while zoomed. Pairs with `lightbox.zoomedOut`."},"@astryx.lightbox.zoomedOut":{defaultMessage:"Zoomed out",description:"Polite screen-reader announcement after zooming back out of a Lightbox image. Pairs with `lightbox.zoomedIn`."},"@astryx.metadataList.showMore":{defaultMessage:"Show more",description:"Button label under a MetadataList that reveals items hidden beyond the configured maximum. Toggles with `metadataList.showLess` — keep the pair parallel in your language."},"@astryx.metadataList.showLess":{defaultMessage:"Show less",description:"Button label under a MetadataList that re-hides the extra items revealed by `metadataList.showMore`. Keep the pair parallel."},"@astryx.mobileNav.navigation":{defaultMessage:"Navigation",description:"Screen-reader-only fallback name for the MobileNav overlay dialog when no explicit label was passed."},"@astryx.multiSelector.clearAll":{defaultMessage:"Clear all {label}",description:"Screen-reader-only label on the X that clears every selected value from a MultiSelector. Example: `Clear all Countries`. `{label}` is typically already plural in English."},"@astryx.input.statusButton.error":{defaultMessage:"Error details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is error. Activating or focusing the button reveals the error message in a tooltip. Keep it short — it labels an icon-only button."},"@astryx.input.statusButton.warning":{defaultMessage:"Warning details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is warning. Activating or focusing the button reveals the warning message in a tooltip."},"@astryx.input.statusButton.success":{defaultMessage:"Success details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is success. Activating or focusing the button reveals the success message in a tooltip."},"@astryx.numberInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a NumberInput. Example: `Clear Age`, `Clear Quantity`."},"@astryx.selector.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the selected value from a Selector. `{label}` is the selector's visible label — example: `Clear Country`."},"@astryx.sideNavCollapseButton.expandSidebar":{defaultMessage:"Expand sidebar",description:"Aria label AND tooltip on the SideNav collapse/expand toggle when the sidebar is currently collapsed (clicking expands it). Pairs with `collapseSidebar`."},"@astryx.sideNavCollapseButton.collapseSidebar":{defaultMessage:"Collapse sidebar",description:"Aria label AND tooltip on the same toggle when the sidebar is currently expanded (clicking collapses it). Pairs with `expandSidebar`."},"@astryx.sideNavItem.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the chevron next to a SideNav item with children when the group is collapsed. Example: `Expand Settings`. Pairs with `sideNavItem.collapse`."},"@astryx.sideNavItem.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse Settings`. Pairs with `sideNavItem.expand`."},"@astryx.tableFiltering.filterByColumn":{defaultMessage:"Filter {header}",description:"Triple-use string on per-column filter controls: visible label, placeholder, AND aria label. `{header}` is the column header — example: `Filter Name`. Keep short."},"@astryx.tableGroupedRows.expandGroup":{defaultMessage:"Expand group {groupKey}",description:"Screen-reader-only label on the chevron next to a grouped table's group header when collapsed. Example: `Expand group Q1 2024`. Pairs with `collapseGroup`."},"@astryx.tableGroupedRows.collapseGroup":{defaultMessage:"Collapse group {groupKey}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse group Q1 2024`. Pairs with `expandGroup`."},"@astryx.tableRowExpansion.collapseRow":{defaultMessage:"Collapse row",description:"Screen-reader-only label on the row-expand chevron when the row is currently expanded. Part of the four-way expand/collapse set."},"@astryx.tableRowExpansion.expandRow":{defaultMessage:"Expand row",description:"Screen-reader-only label on the row-expand chevron when the row is currently collapsed. Part of a four-way set with `collapseRow`, `expandAllRows`, `collapseAllRows`."},"@astryx.tableRowExpansion.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Screen-reader-only label on the same header button when every row is expanded. Part of the four-way set."},"@astryx.tableRowExpansion.expandAllRows":{defaultMessage:"Expand all rows",description:"Screen-reader-only label on the header expand-all/collapse-all button when at least one row is collapsed (clicking expands every expandable row). Part of the four-way set."},"@astryx.step.goToStep":{defaultMessage:"Go to step {stepNumber, number}: {label}",description:"Accessible name for a clickable step in the lab Stepper. {stepNumber} is the 1-based position, {label} is the step's visible label."},"@astryx.step.goToStepWithStatus":{defaultMessage:"Go to step {stepNumber, number}: {label}, {status}",description:"Accessible name for a clickable lab Stepper step that also carries a status. {status} is one of the translated `step.status.*` words (completed/warning/error). Keep the pattern parallel to `step.goToStep`."},"@astryx.step.status.completed":{defaultMessage:"completed",description:"Screen-reader-only status word rendered next to a lab Stepper step label when the step is done (either progress-completed or status=success). Lowercase adjective; it is read mid-sentence after the step label."},"@astryx.step.status.warning":{defaultMessage:"warning",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=warning. Lowercase noun/adjective; read mid-sentence after the step label."},"@astryx.step.status.error":{defaultMessage:"error",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=error. Lowercase noun; read mid-sentence after the step label."},"@astryx.tableTree.collapseRow":{defaultMessage:"Collapse row",description:"Aria label for the Table tree-data expander chevron when the row is currently expanded."},"@astryx.tableTree.expandRow":{defaultMessage:"Expand row",description:"Aria label for the Table tree-data expander chevron when the row is currently collapsed."},"@astryx.tableTree.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Aria label for the Table tree-data header toggle when all rows are expanded and clicking it collapses them."},"@astryx.tableTree.expandAllRows":{defaultMessage:"Expand all rows",description:"Aria label for the Table tree-data header toggle when rows are collapsed and clicking it expands them."},"@astryx.textArea.charactersRemaining":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} remaining",description:"Screen-reader-only announcement of how many characters the user can still type before hitting a TextArea's maxLength. Announced politely as the count nears the limit. `{count}` is the number remaining — example: `12 characters remaining`."},"@astryx.textArea.charactersOverLimit":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} over the limit",description:"Screen-reader-only assertive announcement when the user has typed past a TextArea's maxLength. `{count}` is how many characters over — example: `3 characters over the limit`."},"@astryx.textInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TextInput. Example: `Clear Email`, `Clear Name`."},"@astryx.thumbnail.remove":{defaultMessage:"Remove {accessibleName}",description:'Screen-reader-only label on the "×" on a Thumbnail (image preview chip). `{accessibleName}` is the thumbnail\'s name — example: `Remove profile.jpg`.'},"@astryx.thumbnail.open":{defaultMessage:"Open {accessibleName}",description:'"Open" = launch/reveal (not "unfold" or the adjective). Screen-reader-only name on a clickable Thumbnail — example: `Open Sunset photo`.'},"@astryx.thumbnail.fallbackName":{defaultMessage:"Thumbnail",description:"Generic screen-reader name for a Thumbnail (image preview) that has no `alt` or `label`. Last-resort fallback so the control is never nameless; prefer a real name via `alt` or `label`."},"@astryx.timeInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TimeInput. Example: `Clear Start time`."},"@astryx.timestamp.copyValue":{defaultMessage:"Copy {value}",description:"Aria label on a Timestamp copyable-hover-card row's copy button, in its default state. `value` is the formatted instant that row shows (e.g. `Copy February 19, 2026 at 5:00:00 PM UTC`). Imperative verb. Pairs with `timestamp.copied` (post-click state)."},"@astryx.timestamp.copy":{defaultMessage:"Copy",description:"Short label shown in the tooltip on a Timestamp copyable-hover-card row's copy button (hover/focus), in its default state. Imperative verb. Pairs with `timestamp.copied` (post-click state). The full `copyValue` string remains the button's aria-label for assistive tech."},"@astryx.timestamp.copied":{defaultMessage:"Copied",description:'Aria label on a Timestamp copy button for ~1.5s after a successful copy, and the text announced to a polite live region. Past-participle ("has been copied"); pairs with `timestamp.copyValue`.'},"@astryx.timestamp.detailsLabel":{defaultMessage:"Timestamp details",description:"Accessible name for the Timestamp copyable hover card popup, which lists the instant in the configured time zones/formats with a copy button per row."},"@astryx.token.remove":{defaultMessage:"Remove {label}",description:'Screen-reader-only label on the "×" on an individual Token/chip. Example: `Remove John Smith`, `Remove Active`. Imperative verb.'}},Iz=Rz,Ab=new Map;function _z(e,t){const n=`${t}::${e}`;let s=Ab.get(n);return s===void 0&&(s=new Mz(e,t),Ab.set(n,s)),s}function Oz(e){let t;try{t=new Intl.Locale(e).baseName}catch{t=e}const n=t.split("-"),s=[];for(let r=n.length;r>0;r--)s.push(n.slice(0,r).join("-"));return s}function Dz(e,t,n,s){var a,l;const r=Oz(t);if(s!==void 0)for(const c of r){const u=(a=s[c])==null?void 0:a[e];if(u!==void 0)return u}for(const c of r){const u=(l=n[c])==null?void 0:l[e];if(u!==void 0)return u.defaultMessage}const i=Iz[e];return i!==void 0?i.defaultMessage:null}function Lz(e,t,n,s,r){const i=Dz(e,n,s,r);return i===null?(m0(),e):t===void 0?i:_z(i,n).format(t)}function be(){const e=x.use(A3);return x.useCallback((t,n)=>Lz(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const Gr={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"x1jxw6zd",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kkrTdU:"x1ypdohk",k1ekBW:"xrafxwg",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},pressable:{k3aq6I:"x3oybdh xk4oym4",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},ariaDisabled:{kKwaWg:"x18o3ruo x8o3jvd xuqm82a",$$css:!0},iconOnly:{"--button-icon-only-aspect":"x1v15ycx",kOBAk4:"xioom0i",kg3NbH:"xnjsko4",k8WAf4:"xt970qd",$$css:!0},iconWrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0},contentWrapper:{k1xSpc:"xjp7ctv",$$css:!0},link:{kybGjl:"x1hl2dhg",$$css:!0}},Bz={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},qz={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},Hz={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},lg:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",kGuDYH:"xwsyq91",$$css:!0}},Pz={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},Uz={primary:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},secondary:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},destructive:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x1p73he7","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0}},Nb={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},id={horizontal:{krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g xbfdvlp",kT0f0o:"x16uus16 xajhecq",k2ei4v:"xgbv0en x1pjv70x",kVhnKS:"x1t7ytsu xyf0ibl",kGJrpR:"x1j92z86",$$css:!0},vertical:{krdFHd:"x15mokao x8eehn2",kfmiAY:"x1ga7v0g x2qxyot",kVL7Gh:"xbiv7yw x12tyzlf",kT0f0o:"x16uus16 xajhecq",kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20 x1d9v4yf",kLZC3w:"x1pc3f07",$$css:!0},onSolidHorizontal:{kGJrpR:"xrvmtm5",$$css:!0},onSolidVertical:{kLZC3w:"x11npmm7",$$css:!0}};function re({label:e,variant:t="secondary",size:n,type:s="button",isDisabled:r=!1,isLoading:i=!1,isInterruptible:a=!1,clickAction:l,icon:c,isIconOnly:u=!1,width:d,elevation:f="none",children:h,endContent:p,tooltip:m,href:b,as:y,target:g,rel:k,xstyle:v,className:w,style:j,ref:S,...C}){const E=be(),T=Pa(n,"md"),$=PT(),[N,A]=x.useTransition(),M=x.useRef(!1),I=i||N,R=N||a,z=($==null?void 0:$.isDisabled)??!1,_=r||z||I&&!a,O=Ri(y),D=b!=null&&!_,L=m!=null&&_,B=bs({placement:"above",isEnabled:m!=null}),P=ce=>{var Q;if(_||M.current&&!a){ce.preventDefault();return}(Q=C.onClick)==null||Q.call(C,ce),l&&!ce.defaultPrevented&&(M.current=!0,A(async()=>{try{await l(ce)}finally{M.current=!1}}))},X=L?ce=>{var Q;ce.key==="Enter"||ce.key===" "?ce.preventDefault():(Q=C.onKeyDown)==null||Q.call(C,ce)}:void 0,Z=t==="ghost"?{[Ff]:""}:null,ne=q(Gr.base,qz[T],Uz[t],u&&Gr.iconOnly,_&&Gr.disabled,L&&Gr.ariaDisabled,D&&Gr.link,!$&&Gr.pressable,$&&($.orientation==="horizontal"?id.horizontal:id.vertical),$&&(t==="primary"||t==="destructive")&&($.orientation==="horizontal"?id.onSolidHorizontal:id.onSolidVertical),!$&&Pz[f],d!=null&&Bz.width(d),v),J=F(U("button",{variant:t,size:T}),ne,w,j),K=o.jsxs(o.Fragment,{children:[I&&o.jsx("span",{...{0:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1"},1:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1 xqcmdr3 xb2rp9n xskzprw x17yabm6 x14q22ui"}}[!!R<<0],"aria-hidden":"true",children:o.jsx(on,{size:"sm",shade:"inherit"})}),o.jsxs("span",{...q(Gr.contentWrapper,I&&(R?Nb.hiddenContentDelayed:Nb.hiddenContent)),"aria-hidden":I||void 0,children:[c&&o.jsx("span",{...q(Gr.iconWrapper,Hz[T]),children:c}),u?null:o.jsx("span",{className:"xb3r6kr xlyipyv xeuugli",children:h??e}),!u&&p&&o.jsx("span",{className:"x3nfvp2 x6s0dn4 x1heor9g",children:p})]}),o.jsx(Mi,{role:"status","aria-live":"polite",children:I?E("@astryx.button.loading"):""})]}),le=u&&e!==""||I&&!u||h!=null&&h!==e?{"aria-label":e}:null,ve=m!=null?{"aria-describedby":[C["aria-describedby"],B.describedBy].filter(Boolean).join(" ")||void 0}:null,ge=it(S,m!=null?B.ref:void 0);let xe;return D?xe=o.jsx(O,{ref:ge,href:b,target:g,rel:k,...J,...C,...le,...ve,...Z,"aria-busy":I||void 0,onClick:P,children:K}):xe=o.jsx("button",{ref:ge,type:s,disabled:L?void 0:_,...J,...C,...le,...ve,...Z,"aria-busy":I||void 0,"aria-disabled":L||void 0,onClick:P,...X?{onKeyDown:X}:null,children:K}),m?o.jsxs(o.Fragment,{children:[xe,B.renderTooltip(m)]}):xe}re.displayName="Button";const ft={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",width:"1em",height:"1em","aria-hidden":!0},ro={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},Fz={close:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6"})}),chevronDown:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M6 9l6 6 6-6"})}),chevronLeft:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M15 6l-6 6 6 6"})}),chevronRight:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M9 6l6 6-6 6"})}),chevronsLeft:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M18 6l-6 6 6 6M11 6l-6 6 6 6"})}),chevronsRight:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M6 6l6 6-6 6M13 6l6 6-6 6"})}),check:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M5 13l4 4L19 7"})}),success:o.jsx("svg",{...ro,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm4.06 6.56a.75.75 0 00-1.12-1l-3.94 4.4-1.94-1.94a.75.75 0 00-1.06 1.06l2.5 2.5a.75.75 0 001.09-.03l4.47-5z"})}),error:o.jsx("svg",{...ro,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm-2.47 5.47a.75.75 0 00-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 101.06 1.06L12 13.06l2.47 2.47a.75.75 0 101.06-1.06L13.06 12l2.47-2.47a.75.75 0 00-1.06-1.06L12 10.94l-2.47-2.47z"})}),warning:o.jsx("svg",{...ro,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.29 3.86L2.07 19.05A2 2 0 003.78 22h16.44a2 2 0 001.71-2.95L13.71 3.86a2 2 0 00-3.42 0zM12 9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 9zm0 9a1 1 0 100-2 1 1 0 000 2z"})}),info:o.jsx("svg",{...ro,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 100 2 1 1 0 000-2zm-.75 3.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5z"})}),calendar:o.jsxs("svg",{...ft,children:[o.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),o.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),clock:o.jsxs("svg",{...ft,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"M12 7v5l3 3"})]}),externalLink:o.jsxs("svg",{...ft,children:[o.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),o.jsx("path",{d:"M15 3h6v6"}),o.jsx("path",{d:"M10 14L21 3"})]}),menu:o.jsx("svg",{...ft,strokeWidth:2,children:o.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),moreHorizontal:o.jsxs("svg",{...ro,children:[o.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),o.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),o.jsx("circle",{cx:"19",cy:"12",r:"1.5"})]}),search:o.jsxs("svg",{...ft,children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"M21 21l-4.35-4.35"})]}),arrowUp:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M12 19V5m0 0l-7 7m7-7l7 7"})}),arrowDown:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M12 5v14m0 0l7-7m-7 7l-7-7"})}),arrowsUpDown:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})}),funnel:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"})}),eyeSlash:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 001.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),viewColumns:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z"})}),copy:o.jsxs("svg",{...ft,children:[o.jsx("path",{d:"M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z"}),o.jsx("path",{d:"M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2"})]}),checkDouble:o.jsxs("svg",{...ft,children:[o.jsx("path",{d:"M2 13l4 4L14 7"}),o.jsx("path",{d:"M9 13l4 4L21 7"})]}),wrench:o.jsx("svg",{...ft,children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),stop:o.jsx("svg",{...ro,children:o.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),microphone:o.jsxs("svg",{...ft,children:[o.jsx("path",{d:"M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z"}),o.jsx("path",{d:"M19 10v1a7 7 0 01-14 0v-1"}),o.jsx("path",{d:"M12 18v4m-4 0h8"})]})};let Gz={};function Vz(e){var t;return e==null?null:typeof e=="string"?((t=a3(e))==null?void 0:t.icons)??null:e.icons??null}function F3(e,t){const n=Vz(t);return(n==null?void 0:n[e])??Gz[e]??Fz[e]}const G3={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},V3={primary:{kMwMTN:"xtbr613",$$css:!0},secondary:{kMwMTN:"xv9yike",$$css:!0},tertiary:{kMwMTN:"xv9yike",$$css:!0},disabled:{kMwMTN:"xqa6c3m",$$css:!0},accent:{kMwMTN:"xqwr325",$$css:!0},success:{kMwMTN:"xtjic6",$$css:!0},error:{kMwMTN:"xjt36v0",$$css:!0},warning:{kMwMTN:"xs3pv69",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0},blue:{kMwMTN:"x1fns2mt",$$css:!0},red:{kMwMTN:"xeffzf7",$$css:!0},green:{kMwMTN:"xmxeech",$$css:!0},gray:{kMwMTN:"x1eyinzz",$$css:!0},cyan:{kMwMTN:"x157w0xa",$$css:!0},teal:{kMwMTN:"x1f3zxcb",$$css:!0},yellow:{kMwMTN:"x1g6zdft",$$css:!0},orange:{kMwMTN:"xxu74a4",$$css:!0},pink:{kMwMTN:"x1kxxfg5",$$css:!0},purple:{kMwMTN:"xzdw94u",$$css:!0}},Wz={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",$$css:!0}},Kz={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",kGuDYH:"xboafo0",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",kGuDYH:"x1jchvi3",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",kGuDYH:"x1603h9y",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",kGuDYH:"xngnso2",$$css:!0}};function Xz(e){return e!=null&&e!==""?{role:"img","aria-label":e}:{"aria-hidden":"true"}}function Ce({icon:e,color:t="inherit",size:n="md",label:s,ref:r,className:i,style:a,xstyle:l,...c}){const u=Xz(s);if(typeof e=="string")return o.jsx(Zz,{name:e,color:t,size:n,a11yProps:u,className:i,style:a,xstyle:l,spanProps:c});const d=e;return o.jsx(d,{ref:r,...u,...F(U("icon",{size:n,color:t}),q(G3.root,V3[t],Wz[n],l),i??void 0,a),...c})}Ce.displayName="Icon";function Zz({name:e,color:t,size:n,a11yProps:s,className:r,style:i,xstyle:a,spanProps:l}){const c=g3(),u=F3(e,c);if(u==null)return null;const d=l??{};return o.jsx("span",{...s,...d,...F(U("icon",{size:n,color:t}),q(G3.span,V3[t],Kz[n],a),r??void 0,i),children:u})}function Hs(e,t){return typeof e=="string"?o.jsx(Ce,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?o.jsx(Ce,{icon:e,...t}):e}function Ea(e){const t=g3();return F3(e,t)}const Yz={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},S0=x.createContext(Yz);S0.displayName="AppShellMobileContext";function nx(){return x.use(S0)}function W3({ref:e,children:t,label:n,"data-testid":s,xstyle:r,className:i,style:a}){const l=be(),c=n??l("@astryx.mobileNav.toggle.open"),{isMobile:u,isMobileNavEnabled:d,isMobileNavOpen:f,mobileNavId:h,toggleMobileNav:p}=nx();return!u||!d?null:o.jsx(re,{ref:e,variant:"ghost",label:c,icon:t??o.jsx(Ce,{icon:"menu",color:"inherit"}),onClick:p,"aria-expanded":f,"aria-controls":h||void 0,"data-testid":s??"mobile-nav-toggle",xstyle:r,className:i,style:a,isIconOnly:!0})}W3.displayName="MobileNavToggle";const jo=x.createContext("default");jo.displayName="SideNavRenderContext";function K3(){return x.use(jo)}const Gp=x.createContext("default");Gp.displayName="TopNavRenderContext";const Vp=x.createContext(null);Vp.displayName="TopNavMobileContentContext";const Qz=typeof Kh.Activity<"u",Jz=Qz?({mode:e,children:t})=>o.jsx(Kh.Activity,{mode:e,children:t}):({children:e})=>o.jsx(o.Fragment,{children:e}),eA={sm:640,md:768,lg:1024,none:0},f1="astryx-app-shell-main",Nt={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVAEAm:"x1n2onr6",$$css:!0},variantWash:{kWkggS:"x1eiddq6",$$css:!0},variantSurface:{kWkggS:"x10xzikg",$$css:!0},variantSection:{kWkggS:"x10xzikg",$$css:!0},variantElevated:{kWkggS:"x1eiddq6",$$css:!0},rootFill:{kZKoxP:"xtdtrs8",$$css:!0},rootAuto:{kAzted:"x1ov3xa9",$$css:!0},mainFocusTarget:{kI3sdo:"x1uvtmcs",$$css:!0},contentBgSurface:{kWkggS:"x10xzikg",$$css:!0},contentBgWash:{kWkggS:"x1eiddq6",$$css:!0},contentBgTransparent:{kWkggS:"xjbqb8w",kHBbk8:"xc8icb0",$$css:!0},navAreaWash:{kWkggS:"x1eiddq6",$$css:!0},navAreaSurface:{kWkggS:"x10xzikg",$$css:!0},banner:{kmuXW:"x2lah0s",$$css:!0},headerSticky:{kVAEAm:"x7wzq59",k87sOh:"x13vifvy",kY2c9j:"x1vjfegm",$$css:!0},panelAutoFill:{kUk6DE:"x98rzlu",kVQacm:"xysyzu8",$$css:!0}};function X3({variant:e="elevated",banner:t,children:n,contentPadding:s,"data-testid":r,height:i="fill",mobileNav:a,sideNav:l,topNav:c,xstyle:u,className:d,style:f,ref:h,...p}){const m=be(),b=a===!1,y=a!=null&&a!==!1&&typeof a=="object"&&!x.isValidElement(a)?a:null,g=(y==null?void 0:y.breakpoint)??"md",k=a!=null&&a!==!1&&(x.isValidElement(a)||typeof a=="string")?a:null,v=(y==null?void 0:y.content)??null,w=(y==null?void 0:y.hasToggle)!==!1,j=(y==null?void 0:y.isOpen)!==void 0,S=g==="none"?"(max-width: 0px)":`(max-width: ${eA[g]}px)`,C=Ha(S,y==null?void 0:y.defaultIsMobile),[E,T]=x.useState(!1),$=(y==null?void 0:y.isOpen)??E,N=x.useCallback(Mn=>{var Rn;j||T(Mn),(Rn=y==null?void 0:y.onOpenChange)==null||Rn.call(y,Mn)},[j,y]),A=x.useCallback(()=>{var Mn;(Mn=document.getElementById(f1))==null||Mn.focus()},[]),M=i==="fill",I=i==="auto",R=i1(t),z=i1(c),_=i1(l),D=!b&&(z||_)&&k==null,L=e==="section",B=e==="elevated",P=e==="wash"||e==="elevated"?Nt.navAreaWash:e==="surface"?Nt.navAreaSurface:void 0,X=e==="wash"?Nt.contentBgWash:e==="elevated"&&z&&_&&!C?Nt.contentBgTransparent:e==="surface"||e==="elevated"?Nt.contentBgSurface:void 0,Y=P??Nt.navAreaSurface,Z=x.useRef(null),ne=x.useRef(null);x.useEffect(()=>{if(!I||!Z.current||!ne.current)return;const Mn=Z.current,Rn=ne.current,Zl=()=>{const no=Mn.getBoundingClientRect().height;Rn.style.setProperty("--appshell-header-height",`${no}px`)};return p0(Mn,()=>Zl()),()=>g0(Mn)},[I]);const J=_&&!C,K=k!=null,ie=D&&v!=null&&C,le=x.useId(),ve=x.useMemo(()=>({isMobile:C,isMobileNavOpen:$,mobileNavId:le,toggleMobileNav:()=>D&&N(!$),openMobileNav:()=>D&&N(!0),closeMobileNav:()=>N(!1),isMobileNavEnabled:D,hasAutoToggle:w}),[C,$,le,N,D,w]),ge=_&&w?o.jsx(jo,{value:"drawer-content",children:l}):null,xe=_?o.jsx(jo,{value:"drawer-content",children:l}):null,ce=z?C&&!b&&k==null?o.jsx(Vp,{value:ge,children:o.jsx(Gp,{value:"mobile-bar",children:c})}):c:null,Q=z||R?o.jsxs(Hf,{padding:0,hasDivider:L&&z,children:[R&&o.jsx("div",{...q(Nt.banner,P),children:t}),z&&ce]}):void 0,ye=Q!=null?o.jsx("div",{ref:Z,role:"banner",...F(U("app-shell-header",{variant:e}),q(P,I&&Nt.headerSticky)),children:Q}):void 0,ue=J?o.jsx(y0,{padding:0,hasDivider:L,isScrollable:M,...U("app-shell-sidenav",{variant:e}),xstyle:[P,I&&Y,I&&Nt.panelAutoFill],children:l}):void 0,pe=ue!=null&&I?o.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:ue}):ue,Le=B&&z&&J,se=o.jsx(es,{padding:s??0,role:"main",id:f1,tabIndex:-1,isScrollable:M,xstyle:[X,Nt.mainFocusTarget],children:n}),tn=Le?o.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[o.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),se]}):se,$s=!b&&w&&C&&!z&&_?o.jsx("div",{...F(U("app-shell-header",{variant:e}),q(P,I&&Nt.headerSticky)),children:o.jsx(Hf,{padding:0,hasDivider:L,children:o.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":m("@astryx.appShell.mobileNavigation"),children:[o.jsx(jo,{value:"topbar",children:l}),o.jsx(W3,{})]})})}):void 0;return o.jsx(S0,{value:ve,children:o.jsxs("div",{...p,ref:it(h,ne),"data-testid":r,...F(U("app-shell",{variant:e}),q(Nt.root,e==="wash"?Nt.variantWash:e==="surface"?Nt.variantSurface:e==="section"?Nt.variantSection:Nt.variantElevated,M?Nt.rootFill:Nt.rootAuto,u),d,f),children:[o.jsx("a",{href:`#${f1}`,onClick:A,className:"x10l6tqk x1xrnuwo x1i1rx1s x1jqxupm xjm9jq1 x15cytp8 xt970qd xh2mrf5 xnjsko4 x1cf3d6k xkdpibf x1y5lnwp xb3r6kr xomzh7y x1hyvwdk x1rsz1da xuxw1ft x1hbpcn8 xc342km x13vifvy x1rw3289 x1o0tod xodanix x10xzikg xjse4m1 x1q2oy4v x1hl2dhg x2mo6ok xjm74w1","data-testid":"skip-to-content",children:m("@astryx.appShell.skipToContent")}),o.jsx(Jn,{height:i,padding:0,header:o.jsxs(o.Fragment,{children:[ye,$s]}),start:pe,content:tn}),K&&k,ie&&v,C&&!b&&k==null&&!v&&o.jsxs(Jz,{mode:$?"visible":"hidden",children:[_&&!z&&o.jsx(jo,{value:"drawer",children:l}),z&&o.jsx(Vp,{value:xe,children:o.jsx(Gp,{value:"drawer",children:c})})]})]})})}X3.displayName="AppShell";function tA(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const ar=typeof window<"u"?x.useLayoutEffect:x.useEffect,nA=new Set(["text","search","url","tel","email","password","number"]);function sA(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function Mb(e,t){if(!(e instanceof HTMLElement))return!1;const n=sA(e);if(n){const u=typeof window<"u"?window.getSelection():null;return u&&u.rangeCount>0&&!u.isCollapsed?!0:(n.textContent??"").length>0}const s=e.tagName==="TEXTAREA",r=e.tagName==="INPUT"&&nA.has(e.type);if(!s&&!r)return!1;const i=e,{selectionStart:a,selectionEnd:l,value:c}=i;return a!==l||a==null?!0:t==="ArrowLeft"||t==="ArrowUp"||t==="Home"?a>0:t==="ArrowRight"||t==="ArrowDown"||t==="End"?a<c.length:!1}function Ua(e={}){const{itemSelector:t='[role="menuitem"]',boundarySelector:n,wrap:s=!0,onEscape:r,orientation:i="vertical",hasHomeEnd:a=!0,isRtl:l,hasRovingTabIndex:c=!1,hasCaretGuard:u=!1}=e,d=x.useRef(null),f=x.useCallback(E=>E.getAttribute("aria-disabled")==="true"||E.disabled===!0||E.hasAttribute("disabled"),[]),h=x.useCallback(()=>{const E=d.current;if(!E)return[];const T=Array.from(E.querySelectorAll(t));return n?T.filter($=>$.closest(n)===E):T},[t,n]),p=x.useCallback(E=>{const T=d.current;if(!T||!n)return!0;const $=E.target;return $?$.closest(n)===T:!0},[n]),m=x.useCallback((E,T,$,N)=>{const A=E.length;if(A===0)return-1;let M=T;for(let I=0;I<A;I++){if(M<0||M>=A){if(!N)return-1;M=(M+A)%A}const R=E[M];if(R&&!f(R))return M;M+=$}return-1},[f]),b=x.useCallback(()=>{const E=h(),T=document.activeElement;return E.findIndex($=>$===T||$.contains(T))},[h]),y=x.useCallback((E,T)=>{E.getAttribute("tabindex")!==String(T)&&E.setAttribute("tabindex",String(T))},[]),g=x.useCallback(()=>{const E=h(),T=E.filter(A=>!f(A));if(T.length===0)return;const N=T.find(A=>A.getAttribute("tabindex")==="0")??T[0];for(const A of E)y(A,A===N?0:-1)},[h,f,y]);ar(()=>{c&&g()});const k=x.useCallback((E,T)=>{const $=E[T];if($){if(c)for(const N of E)y(N,N===$?0:-1);$.focus()}},[c,y]),v=x.useCallback(E=>{const T=h();if(T.length===0)return;const $=Math.max(0,Math.min(E,T.length-1));k(T,$)},[h,k]),w=x.useCallback(()=>{const E=h(),T=m(E,0,1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),j=x.useCallback(()=>{const E=h(),T=m(E,E.length-1,-1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),S=x.useCallback(()=>{c&&g()},[c,g]),C=x.useCallback(E=>{if(E.ctrlKey||E.metaKey||E.altKey||!p(E))return;if(E.key==="Escape"){E.preventDefault(),r==null||r();return}const T=i==="horizontal"||i==="both",$=i==="vertical"||i==="both",N=[],A=[];if(T){const D=E.key==="ArrowLeft"||E.key==="ArrowRight"?l??tA(d.current):!1;N.push(D?"ArrowLeft":"ArrowRight"),A.push(D?"ArrowRight":"ArrowLeft")}$&&(N.push("ArrowDown"),A.push("ArrowUp"));const M=N.includes(E.key),I=A.includes(E.key),R=a&&E.key==="Home",z=a&&E.key==="End";if(!M&&!I&&!R&&!z||u&&(Mb(E.target,E.key)||Mb(document.activeElement,E.key)))return;const _=b(),O=h();if(M){const D=_===-1?0:_+1,L=m(O,D,1,s);L!==-1&&k(O,L)}else if(I){const D=_===-1?O.length-1:_-1,L=m(O,D,-1,s);L!==-1&&k(O,L)}else R?w():z&&j();E.preventDefault()},[b,h,s,i,l,a,u,m,k,w,j,r,p]);return{listRef:d,handleKeyDown:C,handleFocus:S,focusItem:v,focusFirst:w,focusLast:j,ownsEvent:p,getItems:h}}const rA={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kZKoxP:"x1grt7ep",k8WAf4:"xt970qd",kg3NbH:"xf314gf",kaIpWk:"xjspbzw",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",$$css:!0}},iA={neutral:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},info:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",$$css:!0},success:{kWkggS:"xdsz4j9",kMwMTN:"xri61p4",$$css:!0},warning:{kWkggS:"x1q8g9m5",kMwMTN:"xrebv38",$$css:!0},error:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0}};function Iu({variant:e="neutral",label:t,icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsxs("span",{ref:a,...F(U("badge",{variant:e}),q(rA.base,iA[e],s),r,i),...l,children:[n,t]})}Iu.displayName="Badge";const aA={info:"info",warning:"warning",error:"error",success:"success"},oA={info:"status",warning:"alert",error:"alert",success:"status"},lA={info:"accent",warning:"warning",error:"error",success:"success"},qi={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kMv6JI:"xjb2p0i",$$css:!0},rootElevatedCard:{kaIpWk:"x1hviunn",$$css:!0},header:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",kOIVth:"x1txdalj",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},headerCardStandalone:{kaIpWk:"x1hviunn",$$css:!0},headerCardWithContent:{krdFHd:"x81l70g",kfmiAY:"x7hs6f1",kVL7Gh:"xbiv7yw",kT0f0o:"x16uus16",$$css:!0},headerCentered:{kGNEyG:"x6s0dn4",$$css:!0},endArea:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kmuXW:"x2lah0s",keTefX:"xvc5jky",kqGvvJ:"x81ka23",$$css:!0}},cA={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},uA={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function yt({status:e,title:t,description:n,icon:s,isDismissable:r=!1,onDismiss:i,endContent:a,container:l="card",elevation:c="none",defaultIsExpanded:u=!1,children:d,xstyle:f,className:h,style:p,ref:m,...b}){const y=be(),[g,k]=x.useState(!1),[v,w]=x.useState(u),j=x.useId(),S=aA[e],C=oA[e],E=lA[e],T=d!=null;if(g)return null;const $=()=>{k(!0),i==null||i()},N=()=>{w(_=>!_)},A=a!=null||r||T,M=a!=null||r,I=n==null&&M,R=T&&v,z=l==="card";return o.jsxs("div",{ref:m,role:C,...F(q(qi.root,uA[c],z&&c!=="none"&&qi.rootElevatedCard,f),h,p),...b,children:[o.jsxs("div",{...F(U("banner",{container:l,status:e}),q(qi.header,I&&qi.headerCentered,cA[e],z&&(R?qi.headerCardWithContent:qi.headerCardStandalone))),children:[o.jsx("div",{...F(U("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:s??o.jsx(Ce,{icon:S,size:"md",color:E})}),o.jsxs("div",{className:"x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli",children:[o.jsx("div",{className:"x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0",children:t}),n!=null&&o.jsx("div",{className:"x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4",children:n})]}),A&&o.jsxs("div",{...q(qi.endArea,HT.inset(is["--spacing-2"])),children:[a,T&&o.jsx(re,{variant:"ghost",size:"sm",label:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),icon:o.jsx("span",{...{0:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"},1:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"}}[!!v<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:N,"aria-expanded":v,"aria-controls":R?j:void 0,isIconOnly:!0}),r&&o.jsx(re,{variant:"ghost",size:"sm",label:y("@astryx.banner.dismiss"),tooltip:y("@astryx.banner.dismiss"),icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),onClick:$,isIconOnly:!0})]})]}),R&&o.jsx("div",{id:j,...F(U("banner-content",{container:l,status:e}),{0:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh"},1:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x14k8p9y xiaxfje"}}[!!z<<0]),children:d})]})}yt.displayName="Banner";const dA={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function Z3({children:e,cite:t,xstyle:n,className:s,style:r,ref:i,...a}){return o.jsxs("blockquote",{ref:i,...F(U("blockquote"),q(dA.root,n),s,r),...a,children:[e,t!=null&&o.jsx("footer",{children:o.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}Z3.displayName="Blockquote";const $0=x.createContext({variant:"default",separator:"/"});$0.displayName="BreadcrumbContext";const fA={root:{k1xSpc:"x1lliihq",$$css:!0}};function Y3({children:e,separator:t="/",variant:n="default",xstyle:s,className:r,style:i,label:a,ref:l,...c}){const u=be(),d=a??u("@astryx.breadcrumbs.label"),f=x.useMemo(()=>({variant:n,separator:t}),[n,t]);return o.jsx($0,{value:f,children:o.jsx("nav",{ref:l,"aria-label":d,...F(U("breadcrumbs",{variant:n}),q(fA.root,s),r,i),...c,children:o.jsx("ol",{className:"x78zum5 x6s0dn4 x1a02dak xe8uvvx x1ghz6dp x1717udv xzye2dw",children:e})})})}Y3.displayName="Breadcrumbs";const hA='button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child',jr=[];function xA(e){jr.push(e)}function pA(e){for(let t=jr.length-1;t>=0;t--)if(jr[t].handler===e){jr.splice(t,1);return}}function gA(e){if(jr.length===0)return!1;let t=jr[0];for(let n=1;n<jr.length;n++){const s=jr[n],r=t.getContainer(),i=s.getContainer();r!=null&&i!=null&&i!==r&&i.contains(r)||(t=s)}return t.handler===e}function Rb(){return jr.length>0}function Q3(e){return e.isComposing===!0||e.keyCode===229}function mA(e){if(e.hasAttribute("inert")||e.closest("[inert]")||e.hidden||e.closest("[hidden]")||e.closest('[aria-hidden="true"]'))return!1;if(typeof window<"u"&&window.getComputedStyle){const t=window.getComputedStyle(e);if(t.visibility==="hidden"||t.display==="none")return!1}return!0}function C0(e){return Array.from(e.querySelectorAll(hA)).filter(mA)}function J3(e){try{e.focus()}catch{}return document.activeElement===e}function Ib(e){const t=C0(e);for(const n of t)if(J3(n))return!0;return!1}function yA(e){const t=C0(e);for(let n=t.length-1;n>=0;n--)if(J3(t[n]))return!0;return!1}function kA(e){const{isActive:t,onEscape:n}=e,s=x.useRef(null),r=x.useRef(null),i=x.useRef(!1),a=x.useCallback(()=>{s.current&&Ib(s.current)},[]);return x.useEffect(()=>{if(!t)return;const l=document.activeElement,c=s.current;return()=>{const u=document.activeElement;(u==null||u===document.body||u===document.documentElement||c!=null&&c.contains(u))&&l!=null&&l.isConnected&&typeof l.focus=="function"&&l.focus()}},[t]),x.useEffect(()=>{if(!t)return;const l=c=>{const u=s.current;if(!u)return;const d=c.target;u.contains(d)?r.current=d:i.current&&(Ib(u),r.current===document.activeElement&&yA(u),r.current=document.activeElement),i.current=!1};return document.addEventListener("focus",l,!0),()=>{document.removeEventListener("focus",l,!0)}},[t]),x.useEffect(()=>{if(!t)return;const l=()=>{n==null||n()};n&&xA({handler:l,getContainer:()=>s.current});const c=u=>{const d=s.current;if(d){if(u.key==="Escape"&&n){if(u.defaultPrevented||Q3(u)||!gA(l))return;u.preventDefault(),u.stopPropagation(),n();return}if(u.key==="Tab"){i.current=!0;const f=C0(d);if(f.length===0)return;const h=f[0],p=f[f.length-1];u.shiftKey?document.activeElement===h&&(u.preventDefault(),p.focus()):document.activeElement===p&&(u.preventDefault(),h.focus())}}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),n&&pA(l)}},[t,n]),{containerRef:s,focusFirst:a}}function _l(e,t,n=!0){const s=x.useRef(!1);x.useEffect(()=>{n&&!s.current&&(s.current=!0,ga())},[e,t,n])}const h1={surface:{kWkggS:"x1prclbq",kaIpWk:"x1hviunn",kGVxlE:"x1i5ehqx",$$css:!0},contentWrapper:{kVAEAm:"x1n2onr6",$$css:!0},closeButtonWrapper:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kY2c9j:"x1vjfegm",kzqmXN:"x1i1rx1s x10okhzq",kZKoxP:"xjm9jq1 x132qfvm",kVQacm:"xb3r6kr x1dordxg",kz4h6p:"x1hyvwdk x10wafsz",kfzvcC:"x47corl xbt4iw",kLKAdn:"xexx8yu x1kw28su",$$css:!0}};function Ol(e={}){const{onShow:t,onHide:n,xstyle:s,hasLightDismiss:r=!0,hasEscapeDismiss:i=!0,hasAutoFocus:a=!0,hasSurface:l=!0,hasCloseButton:c=!0,closeButtonLabel:u,dialogLabel:d,role:f="dialog",isModal:h=!0}=e,p=be(),m=u??p("@astryx.popover.close"),b=x.useRef(null),y=x.useRef(!1),g=Il({mode:"context",lightDismiss:r,onShow:t,onHide:n}),{containerRef:k,focusFirst:v}=kA({isActive:g.isOpen,onEscape:i||r?g.hide:void 0});x.useEffect(()=>{g.isOpen&&a&&!y.current&&requestAnimationFrame(()=>{v()}),g.isOpen||(y.current=!1)},[g.isOpen,a,v]);const w=x.useCallback(T=>{b.current=T,g.ref(T)},[g]),j=x.useCallback(T=>{y.current=(T==null?void 0:T.skipAutoFocus)??!1,g.show()},[g]),S=x.useCallback(()=>{g.isOpen?g.hide():j()},[g,j]),C={"aria-haspopup":f==="dialog"?"dialog":"true","aria-expanded":g.isOpen,"aria-controls":g.id};_l("usePopover",'role="dialog" without a `dialogLabel` renders an unnamed dialog. Pass `dialogLabel`, or use `role: "none"` for listbox/menu popups whose content already carries its own role.',f==="dialog"&&!d);const E=x.useCallback((T,$)=>g.render(o.jsxs("div",{ref:k,role:f==="dialog"?"dialog":void 0,"aria-modal":f==="dialog"&&h?!0:void 0,"aria-label":f==="dialog"?d:void 0,...q(h1.contentWrapper,l&&h1.surface,s),children:[T,c&&o.jsx("div",{...q(h1.closeButtonWrapper,dl.centerInline("100%")),children:o.jsx(re,{variant:"secondary",label:m,onClick:g.hide})})]}),{...$,xstyle:$==null?void 0:$.xstyle}),[g,c,l,m,k,d,f,h,s]);return{triggerRef:w,contentRef:k,anchorId:g.anchorId,show:j,hide:g.hide,toggle:S,isOpen:g.isOpen,id:g.id,render:E,triggerProps:C}}function bA(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function sx(e){const{getItemLabels:t,onMatch:n,getCurrentIndex:s,resetMs:r=750,isDisabled:i}=e,a=x.useRef(""),l=x.useRef(void 0),c=x.useCallback(()=>{a.current="",l.current&&(clearTimeout(l.current),l.current=void 0)},[]),u=x.useCallback(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a.current="",l.current=void 0},r)},[r]);return{onKeyDown:x.useCallback(f=>{const h=f.key===" "&&a.current.length>0;if(!bA(f)&&!h)return!1;const p=t();if(p.length===0)return!1;const m=f.key.toLowerCase(),b=a.current.length>0&&a.current.split("").every(w=>w===m),y=b?m:a.current+m;a.current=y,u();const g=(s==null?void 0:s())??-1,k=p.length,v=b?1:0;for(let w=0;w<k;w++){const j=(g+v+w+k)%k;if(i!=null&&i(j))continue;const S=p[j];if(S!=null&&S.trim().toLowerCase().startsWith(y))return n(j),!0}return!0},[t,n,s,u,i]),reset:c}}const _b={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},io={horizontalLine:{kZKoxP:"xsyqizj",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},verticalLine:{kzqmXN:"xjk4fl7",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},subtle:{kWkggS:"x1m4xfpy",$$css:!0},strong:{kWkggS:"x7njt3n",$$css:!0}},Ob={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function Kc({orientation:e="horizontal",label:t,variant:n="subtle",isFullBleed:s=!1,xstyle:r,className:i,style:a,ref:l,"aria-label":c,"aria-labelledby":u,...d}){const f=e==="horizontal",h=x.useId(),p=u??(t&&c==null?h:void 0);return o.jsxs("div",{ref:l,...d,role:"separator","aria-orientation":e,"aria-label":c,"aria-labelledby":p,...F(U("divider",{variant:n,orientation:e}),q(f?_b.horizontal:_b.vertical,s&&(f?Ob.horizontal:Ob.vertical),r),i,a),children:[o.jsx("div",{...q(f?io.horizontalLine:io.verticalLine,io[n])}),t&&o.jsx("div",{id:h,...{0:{className:"x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4"},1:{className:"x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82"}}[!f<<0],children:t}),t&&o.jsx("div",{...q(f?io.horizontalLine:io.verticalLine,io[n])})]})}Kc.displayName="Divider";const vA=["noopener","noreferrer"];function e4(e,t){if(e!=="_blank")return{target:e,rel:t};const n=(t==null?void 0:t.split(/\s+/).filter(Boolean))??[];for(const s of vA)n.includes(s)||n.push(s);return{target:e,rel:n.join(" ")}}const t4=["button","a","input","select","textarea",'[role="button"]','[role="link"]','[role="checkbox"]','[role="radio"]','[role="switch"]','[role="tab"]','[role="menuitem"]','[role="option"]','[role="combobox"]','[role="listbox"]','[role="slider"]','[role="spinbutton"]',"[data-pressable-container]"].join(","),wA='[aria-readonly="true"]';function Db(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(t4)&&!n.matches(wA))return!0;n=n.parentElement}return!1}function jA(e){if(typeof document>"u"||!("getSelection"in document))return!1;const t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function E0({containerRef:e,interactiveRef:t,onClick:n,href:s,target:r,disabled:i=!1}){x.useEffect(()=>{const c=e.current;c&&c.setAttribute("data-pressable-container","true")},[e]);const a=x.useCallback(c=>{if(i)return;const u=e.current;if(!u||jA(u))return;const d=c.target;if(d instanceof Element&&!(d!==c.currentTarget&&Db(d,u))&&(n==null||n(c),!c.defaultPrevented&&(s!=null&&(r==="_blank"||c.ctrlKey||c.metaKey?window.open(s,"_blank","noopener"):t!=null&&t.current?t.current.click():window.location.href=s),s==null&&n==null&&(t!=null&&t.current)))){const f=new MouseEvent("click",{bubbles:c.bubbles,cancelable:c.cancelable,ctrlKey:c.ctrlKey,metaKey:c.metaKey,shiftKey:c.shiftKey,altKey:c.altKey,button:c.button});t.current.dispatchEvent(f),c.stopPropagation()}},[e,t,n,s,r,i]),l=x.useCallback(c=>{if(i)return;const u=e.current;if(!u)return;const d=c.target;if(!(d instanceof Element))return;c.button===1&&s!=null&&(d===c.currentTarget||!Db(d,u))&&window.open(s,"_blank","noopener")},[e,s,i]);return{onClick:a,onMouseUp:l}}const SA=new Set(["option","tab","row","gridcell","columnheader","rowheader","treeitem"]),fn={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kg3NbH:"xf314gf",kVAEAm:"x1n2onr6",kB7OPa:"x9f619",k9WMMc:"x1yc453h",kaIpWk:"xh6dtrn",$$css:!0},alignStart:{kGNEyG:"x1cy8zhl",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x15406qy",kIyJzY:"xkvfbh3",kAMwcw:"xlr8y92",kWkggS:"xjbqb8w xe9uy6x xyxi2l3",$$css:!0},focusVisibleOutline:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0},highlighted:{kWkggS:"x1lmrjuc",$$css:!0},selected:{kWkggS:"xgcxg3y",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},label:{kMwMTN:"x1tgivj0",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},labelSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},labelMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0},description:{kMwMTN:"xv1l7n4",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},descriptionSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},descriptionMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},Lb={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},$A={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function Fa({as:e="div",marker:t,startContent:n,label:s,description:r,endContent:i,align:a="center",density:l="balanced",labelLines:c,descriptionLines:u,onClick:d,interactiveRef:f,href:h,target:p,rel:m,isHighlighted:b=!1,isSelected:y=!1,isDisabled:g=!1,xstyle:k,className:v,style:w,ref:j,role:S,...C}){const E=Ri(),T=f!=null,$=x.useRef(null),{onClick:N}=E0({containerRef:$,interactiveRef:f??void 0,disabled:g});_l("Item","`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",T&&(d!=null||h!=null));const A=d!=null||h!=null||T,{target:M,rel:I}=e4(p,m),R=S!=null,z=S!=null&&SA.has(S),_=typeof s=="string",O=typeof r=="string",D=c!=null?c===1?fn.labelSingleTruncate:fn.labelMultiTruncate:_?fn.labelSingleTruncate:null,L=u!=null?u===1?fn.descriptionSingleTruncate:fn.descriptionMultiTruncate:O?fn.descriptionSingleTruncate:null,B=o.jsxs(o.Fragment,{children:[o.jsx("span",{...q(fn.label,D,c!=null&&c>1&&Lb.lineClamp(c)),children:s}),r!=null&&o.jsx("span",{...q(fn.description,L,u!=null&&u>1&&Lb.lineClamp(u)),children:r})]}),P=Y=>{g||Y.target.closest("button, a, input, select, textarea")||d==null||d(Y)},X=o.jsxs(o.Fragment,{children:[t,n!=null&&o.jsx("span",{className:"x3psx0u x78zum5",children:n}),R||T?o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:B}):h!=null?o.jsx(E,{href:h,target:M,rel:I,"aria-disabled":g||void 0,tabIndex:g?-1:void 0,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo"}}[!!g<<0],children:B}):d!=null?o.jsx("button",{type:"button",onClick:d,disabled:g,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo"}}[!!g<<0],children:B}):o.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:B}),i!=null&&o.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!g<<0],children:i})]});return o.jsx(e,{ref:T?it(j,$):j,...C,"aria-selected":z&&y||void 0,"aria-current":C["aria-current"]??(y&&!z?!0:void 0),"aria-disabled":g||void 0,...F(U("item",{density:l,align:a}),q(fn.root,$A[l],a==="start"&&fn.alignStart,A&&fn.interactive,A&&fn.focusVisibleOutline,b&&fn.highlighted,y&&fn.selected,g&&!R&&fn.disabled,k),v,w),role:S,onClick:T?N:R?d:A?P:void 0,children:X})}Fa.displayName="Item";const Dl=x.createContext(null);Dl.displayName="DropdownMenuContext";function T0(){return x.use(Dl)}const z0=x.createContext(null);z0.displayName="DropdownMenuRadioGroupContext";function CA(){return x.use(z0)}function A0(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const Bb={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},EA={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Xc({icon:e,label:t,description:n,onClick:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c}){const u=T0(),d=(u==null?void 0:u.menuSize)??"md",f=x.useCallback(()=>{r||!s||(s(),u==null||u.closeMenu())},[r,s,u]),h=x.useCallback(p=>A0(p,r),[r]);return o.jsx(Fa,{role:"menuitem",tabIndex:r?void 0:-1,onPointerMove:h,startContent:e?Hs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:f,isDisabled:r,xstyle:[Bb.root,EA[d],r&&Bb.disabled,a],...F(U("dropdown-menu-item",{size:d}),{className:l,style:c})})}Xc.displayName="DropdownMenuItem";function TA(e){const{show:t,hide:n,isOpen:s,isEnabled:r,showDelay:i=150,hideDelay:a=200}=e,l=Ha("(hover: hover)"),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useRef(!1),p=x.useRef(s);p.current&&!s&&(f.current=!1),p.current=s;const m=x.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(clearTimeout(u.current),u.current=null)},[]),{listRef:b,handleKeyDown:y,focusFirst:g}=Ua({onEscape:()=>{m(),n()}});x.useEffect(()=>()=>m(),[m]);const k=x.useCallback(()=>{m(),s?(h.current=!0,n()):(h.current=!1,t(),requestAnimationFrame(()=>g()))},[s,m,t,n,g]),v=x.useCallback(()=>{if(l){if(h.current){h.current=!1;return}f.current=!0,m(),i>0?c.current=setTimeout(()=>{t({skipAutoFocus:!0})},i):t({skipAutoFocus:!0})}},[l,m,t,i]),w=x.useCallback(()=>{f.current&&(m(),u.current=setTimeout(()=>{n()},a))},[m,n,a]),j=x.useCallback(()=>{m()},[m]),S=x.useCallback($=>{d.current=$},[]),C=x.useCallback(()=>{},[]),E=x.useCallback($=>{},[]),T=x.useCallback($=>{},[]);return r?{triggerProps:{onClick:k,onMouseEnter:v,onMouseLeave:w},contentProps:{onMouseEnter:j,onMouseLeave:w,onKeyDown:y},menuRef:b,focusFirst:g,setTriggerEl:S}:{triggerProps:{onClick:C,onMouseEnter:C,onMouseLeave:C},contentProps:{onMouseEnter:C,onMouseLeave:C,onKeyDown:T},menuRef:b,focusFirst:g,setTriggerEl:E}}const _u=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),rx=[..._u].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),ix='[role="menu"]',x1={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},open:{kWkggS:"x1lmrjuc",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},zA={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},AA={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},qb={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[AA,{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function n4(e){const{icon:t,label:n,description:s,isDisabled:r=!1,hasSpinner:i=!1,menuWidth:a,onOpenChange:l,children:c,xstyle:u,className:d,style:f,"data-testid":h,menuDataTestId:p}=e,m=T0(),b=(m==null?void 0:m.menuSize)??"md",y=!r,g=x.useId(),k=x.useId(),v=x.useRef(null),[w,j]=x.useState(!1),S=Il({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{j(!0),l==null||l(!0)},[l]),onHide:x.useCallback(()=>{j(!1),l==null||l(!1)},[l])}),C=x.useCallback(()=>{y&&S.show()},[y,S]),E=x.useCallback(()=>{S.hide()},[S]),{listRef:T,handleKeyDown:$,focusFirst:N,focusItem:A,ownsEvent:M,getItems:I}=Ua({itemSelector:rx,boundarySelector:ix,wrap:!1,onEscape:()=>D({focusTrigger:!0})}),R=sx({getItemLabels:()=>I().map(K=>K.textContent),onMatch:A,getCurrentIndex:()=>I().findIndex(K=>K===document.activeElement||K.contains(document.activeElement))}),{triggerProps:z,contentProps:_}=TA({show:C,hide:E,isOpen:w,isEnabled:y}),O=x.useCallback(K=>{y&&(S.show(),K!=null&&K.focusFirst&&requestAnimationFrame(()=>{var le;N()||(le=T.current)==null||le.focus()}))},[y,S,N,T]),D=x.useCallback(K=>{var ie;S.hide(),(K==null?void 0:K.focusTrigger)!==!1&&((ie=v.current)==null||ie.focus())},[S]),L=x.useCallback(K=>{v.current=K,S.ref(K)},[S]),B=x.useCallback(()=>{r||(w?D({focusTrigger:!0}):O({focusFirst:!0}))},[r,w,O,D]),P=x.useCallback(K=>{if(r)return;const le=(typeof window<"u"&&v.current?window.getComputedStyle(v.current).direction==="rtl":!1)?"ArrowLeft":"ArrowRight";(K.key===le||K.key==="Enter"||K.key===" ")&&(K.preventDefault(),K.stopPropagation(),O({focusFirst:!0}))},[r,O]),X=x.useCallback(K=>A0(K,r),[r]),Y=x.useCallback(K=>{if(!M(K))return;if(K.key==="Escape"){K.preventDefault(),K.stopPropagation(),D({focusTrigger:!0});return}if(K.key==="Enter"||K.key===" "){K.preventDefault();const ve=document.activeElement;ve&&_u.has(ve.getAttribute("role")??"")&&ve.click();return}const le=(typeof window<"u"&&T.current?window.getComputedStyle(T.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(K.key===le){K.preventDefault(),D({focusTrigger:!0});return}if(R.onKeyDown(K)){K.preventDefault();return}$(K)},[M,D,$,R,T]),Z=x.useMemo(()=>({menuSize:b,closeMenu:()=>{D({focusTrigger:!1}),m==null||m.closeMenu()}}),[b,D,m]),ne=i?o.jsx("span",{...F(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx(on,{size:"sm"})}):o.jsx("span",{...F(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:o.jsx(Ce,{icon:"chevronRight",size:"sm",color:"secondary"})}),J=a?qb.popoverCustomWidth(a):qb.popover;return o.jsxs(o.Fragment,{children:[o.jsx(Fa,{ref:K=>L(K),id:k,role:"menuitem",tabIndex:r?void 0:-1,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":w?g:void 0,"aria-disabled":r||void 0,"data-testid":h,onMouseEnter:z.onMouseEnter,onMouseLeave:z.onMouseLeave,onPointerMove:X,startContent:t?Hs(t,{size:"sm",color:"secondary"}):void 0,label:n,description:s,endContent:ne,onClick:B,onKeyDown:P,isDisabled:r,xstyle:[x1.root,zA[b],w&&x1.open,r&&x1.disabled,u],...F(U("dropdown-menu-item",{size:b}),{className:d,style:f})}),S.render(o.jsx("div",{ref:T,id:g,role:"menu",tabIndex:-1,"aria-labelledby":k,onKeyDown:Y,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,"data-testid":p,...F(U("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:o.jsx(Dl,{value:Z,children:c})}),{placement:"end",alignment:"start",xstyle:[J,ir.end]})]})}n4.displayName="DropdownMenuSubMenu";const NA={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function p1(e){return`item-${e.label}`}function MA(e,t){return`section-${e.title??t}`}function ax(e){const t=[];for(let n=0;n<e.length;n++){const s=e[n];"type"in s&&s.type==="divider"?t.push(o.jsx(Kc,{xstyle:NA.divider,...U("dropdown-menu-divider")},`divider-${n}`)):"type"in s&&s.type==="section"?t.push(o.jsxs("div",{role:"group","aria-label":s.title,children:[s.title&&o.jsx("div",{"aria-hidden":"true",...F(U("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:s.title}),s.items.map(r=>o.jsx(Xc,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},p1(r)))]},MA(s,n))):"type"in s||(s.items&&s.items.length>0?t.push(o.jsx(n4,{icon:s.icon,label:s.label,isDisabled:s.isDisabled,children:ax(s.items)},p1(s))):t.push(o.jsx(Xc,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},p1(s))))}return t}const ao={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kogj98:"x1ghz6dp","--separator-display":"xkce8z9 x1ibt0lz",$$css:!0},defaultSize:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},supportingSize:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0}},RA={popover:{k7Eaqz:"x5w4yej",kqGvvJ:"xsq74q5",$$css:!0}};function s4({ref:e,as:t,children:n,href:s,onClick:r,isCurrent:i,startIcon:a,menu:l,menuSize:c,xstyle:u,className:d,style:f,"data-testid":h,...p}){const m=x.use($0),b=Ri(t),y=m.variant==="supporting",g=x.useRef(null),k=x.useRef(null),v=i===!0,w=i==null,j=l!=null,S=c??(y?"sm":"md");x.useEffect(()=>{},[j,s,r]),x.useEffect(()=>{if(!w)return;const E=g.current;if(!E)return;const T=E.parentElement;if(!T)return;const $=Array.from(T.children),N=$.length>0&&$[$.length-1]===E,A=T.querySelector('[aria-current="page"]');if(N&&!A){const M=k.current??E;return M.setAttribute("aria-current","page"),()=>{M.removeAttribute("aria-current")}}});const C=o.jsxs(o.Fragment,{children:[a&&o.jsx("span",{className:"x78zum5 x6s0dn4 x2lah0s",children:a}),n]});return v?o.jsxs("li",{ref:it(e,g),...F(U("breadcrumb-item"),q(ao.root,y?ao.supportingSize:ao.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?o.jsx(Wp,{ref:k,menu:l,menuSize:S,isSupporting:y,isCurrent:!0,label:n,children:C}):o.jsx("span",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],"aria-current":"page",children:C})]}):o.jsxs("li",{ref:it(e,g),...F(U("breadcrumb-item"),q(ao.root,y?ao.supportingSize:ao.defaultSize,u),d,f),"data-testid":h,...p,children:[o.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?o.jsx(Wp,{ref:k,menu:l,menuSize:S,isSupporting:y,label:n,children:C}):s!=null?o.jsx(b,{ref:k,href:s,onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"}}[!!y<<0],children:C}):r!=null?o.jsx("button",{ref:k,type:"button",onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!y<<0],children:C}):o.jsx("span",{ref:k,...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],children:C})]})}s4.displayName="BreadcrumbItem";function Wp({ref:e,children:t,label:n,menu:s,menuSize:r,isSupporting:i,isCurrent:a=!1}){const l=x.useId(),c=x.useRef(null),u=Ol({onHide:x.useCallback(()=>{var T;(T=c.current)==null||T.focus()},[]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),d=Ea("chevronDown"),f=x.useCallback(()=>{u.hide()},[u]),{listRef:h,handleKeyDown:p,focusFirst:m,focusItem:b,ownsEvent:y,getItems:g}=Ua({itemSelector:rx,boundarySelector:ix,wrap:!1,onEscape:f}),k=sx({getItemLabels:()=>g().map(T=>T.textContent),onMatch:b,getCurrentIndex:()=>g().findIndex(T=>T===document.activeElement||T.contains(document.activeElement))}),v=x.useCallback(T=>{if(y(T)){if(T.key==="Enter"||T.key===" "){T.preventDefault();const $=document.activeElement;$&&_u.has($.getAttribute("role")??"")&&$.click();return}if(T.key==="Tab"){f();return}if(k.onKeyDown(T)){T.preventDefault();return}p(T)}},[p,f,k,y]),w=x.useCallback(()=>{u.show(),requestAnimationFrame(()=>m())},[u,m]),j=x.useCallback(()=>{u.isOpen?u.hide():w()},[u,w]),S=x.useCallback(T=>{u.isOpen||(T.key==="ArrowDown"||T.key==="Enter"||T.key===" ")&&(T.preventDefault(),w())},[u.isOpen,w]),C=x.useMemo(()=>({closeMenu:f,menuSize:r}),[f,r]),E=Array.isArray(s)?ax(s):s;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:it(e,c,u.triggerRef),type:"button",onClick:j,onKeyDown:S,...F(U("breadcrumb-item-menu-trigger"),{...u.triggerProps,"aria-haspopup":"menu","aria-controls":l,"aria-current":a?"page":void 0}),...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!i<<0],children:[t,o.jsx("span",{"aria-hidden":"true",className:"x78zum5 x6s0dn4 x2lah0s x141an7d",children:d})]}),u.render(o.jsx("div",{ref:h,id:l,role:"menu","aria-label":typeof n=="string"?n:void 0,onKeyDown:v,...F(U("breadcrumb-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x87ps6o"}),children:o.jsx(Dl,{value:C,children:E})}),{placement:"below",alignment:"start",xstyle:[RA.popover,ir.below]})]})}Wp.displayName="BreadcrumbMenuTrigger";function IA(e){return typeof e=="string"||typeof e=="number"}function Hb(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Ga({children:e,anchorRef:t,content:n,placement:s="above",alignment:r="center",delay:i=200,hideDelay:a=0,focusTrigger:l="auto",isEnabled:c=!0,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h}){const p=x.useRef(null),m=e!=null?IA(e):!1,b=d===!0||d==="auto"&&m,y=x.useCallback(()=>{u==null||u(!0)},[u]),g=x.useCallback(()=>{u==null||u(!1)},[u]),k=bs({placement:s,alignment:r,delay:i,hideDelay:a,focusTrigger:l,isEnabled:c,isOpen:f,isDefaultOpen:h,onShow:y,onHide:g});return ar(()=>{if(!t)return;const v=t.current;if(!v)return;k.ref(v);const w=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",Hb(w,k.describedBy)??""),()=>{k.ref(null),w?v.setAttribute("aria-describedby",w):v.removeAttribute("aria-describedby")}},[t,k.ref,k.describedBy]),ar(()=>{if(t||m)return;const v=p.current;if(!v)return;const w=v.firstElementChild;if(!w)return;k.ref(w);const j=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",Hb(j,k.describedBy)??""),()=>{k.ref(null),j?w.setAttribute("aria-describedby",j):w.removeAttribute("aria-describedby")}},[t,m,k.ref,k.describedBy]),t&&e==null?o.jsx(o.Fragment,{children:k.renderTooltip(n)}):m?o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:k.ref,tabIndex:0,"aria-describedby":k.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 xrys4gj"}}[!!b<<0],children:e}),k.renderTooltip(n)]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:p,className:"xjp7ctv",children:e}),k.renderTooltip(n)]})}Ga.displayName="Tooltip";const r4=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Ga},Symbol.toStringTag,{value:"Module"})),_A="data-astryx-live-region",OA="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;inset-block-start:0;inset-inline-start:0;pointer-events:none;user-select:none;",DA=2e3,Gf={polite:null,assertive:null};function i4(e){const t=Gf[e];t!=null&&(clearTimeout(t),Gf[e]=null)}function LA(e,t){i4(e),Gf[e]=setTimeout(()=>{Gf[e]=null,t.textContent=""},DA)}let Ms=null;function Pb(e){const t=document.createElement("div");return t.setAttribute(_A,e),t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role",e==="assertive"?"alert":"status"),t.style.cssText=OA,document.body.appendChild(t),t}function BA(){return typeof document>"u"?null:Ms?(Ms.polite.isConnected||document.body.appendChild(Ms.polite),Ms.assertive.isConnected||document.body.appendChild(Ms.assertive),Ms):(Ms={polite:Pb("polite"),assertive:Pb("assertive")},Ms)}function qA(e,t){const n=BA();if(!n)return;const s=t==="assertive"?n.assertive:n.polite;s.textContent="",requestAnimationFrame(()=>{s.textContent=e}),LA(t,s)}function HA(e){if(i4(e),!Ms)return;const t=e==="assertive"?Ms.assertive:Ms.polite;t.textContent=""}function Ll(){return x.useCallback((e,t="polite")=>{if(!e){HA(t);return}qA(e,t)},[])}const PA={wrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kmuXW:"x2lah0s",$$css:!0}},UA={ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",escape:"Esc",tab:"⇥",up:"↑",down:"↓",left:"←",right:"→",plus:"+"};function FA(e,t){return e==="mod"?t?"⌘":"Ctrl":UA[e]??e.toUpperCase()}const GA={ctrl:"Control",alt:"Alt",shift:"Shift",enter:"Enter",backspace:"Backspace",escape:"Escape",tab:"Tab",up:"Up arrow",down:"Down arrow",left:"Left arrow",right:"Right arrow",plus:"Plus"};function VA(e,t){return e==="mod"?t?"Command":"Control":GA[e]??e.toUpperCase()}function WA(){return()=>{}}function KA(){return!1}function XA(){if(typeof navigator>"u")return!1;const e="userAgentData"in navigator?navigator.userAgentData:null;return e&&typeof e=="object"&&"platform"in e?/mac/i.test(e.platform??""):/Mac|iPhone|iPad|iPod/.test(navigator.platform??"")}function a4({keys:e,ref:t,xstyle:n,className:s,style:r,...i}){const a=x.useSyncExternalStore(WA,XA,KA),l=e.split("+").map(u=>u.trim().toLowerCase()),c=l.map(u=>VA(u,a)).join(" + ");return o.jsx("span",{...i,ref:t,role:"img","aria-label":c,...F(U("kbd"),q(PA.wrapper,n),s,r),children:l.map(u=>o.jsx("kbd",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o",children:FA(u,a)},u))})}a4.displayName="Kbd";const ZA=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),YA={horizontal:["left","right"],vertical:["up","down"],both:["left","right","up","down"]},QA={hint:{kVAEAm:"xixxii4",kpwlN0:"x1anvkwx",kogj98:"x1ghz6dp",kWkggS:"x1prclbq",kaIpWk:"xh6dtrn",kGVxlE:"x1i5ehqx",kLKAdn:"xfsso4q",kGO01o:"xy143xn",kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",khDVqt:"xuxw1ft",kSiTet:"xg01cxk xofkqq2",k1ekBW:"xsm4mo9",kIyJzY:"xx6bhzk",kzIqYQ:"xd00j3c",kfzvcC:"x47corl",$$css:!0}};function o4(e={}){const{orientation:t="horizontal",dismissAfterMs:n=3e3,isEnabled:s=!0}=e,r=be(),i=x.useRef(null),a=x.useRef(!1),l=x.useRef(!1),c=x.useRef(()=>{}),u=x.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),d=x.useCallback(()=>{l.current=!0},[]),f=x.useCallback(()=>{l.current=!1,u(),c.current(null)},[u]),h=Il({mode:"context",onShow:d,onHide:f});c.current=h.ref;const p=x.useCallback(()=>{a.current=!0,u(),h.hide(),l.current=!1,c.current(null)},[u,h]),m=x.useCallback(w=>{a.current||!s||(c.current(w),h.show(),u(),i.current=setTimeout(()=>{p()},n))},[u,p,n,s,h]);x.useEffect(()=>()=>{u(),c.current(null)},[u]);const b=x.useCallback(w=>{if(a.current||!s)return;const j=w.target;if(!j.matches(":focus-visible"))return;const S=w.currentTarget;w.relatedTarget instanceof Node&&S.contains(w.relatedTarget)||m(j)},[m,s]),y=x.useCallback(w=>{if(!l.current)return;const j=w.currentTarget;if(w.relatedTarget instanceof Node&&j.contains(w.relatedTarget)){!a.current&&w.relatedTarget instanceof HTMLElement&&c.current(w.relatedTarget);return}p()},[p]),g=x.useCallback(w=>{l.current&&ZA.has(w.key)&&p()},[p]),k=o.jsx("span",{className:"x3nfvp2 x6s0dn4 xzye2dw",children:YA[t].map(w=>o.jsx(a4,{keys:w},w))});return{hintElement:h.render(o.jsxs("span",{"aria-hidden":"true",children:[k,o.jsx("span",{className:"x11g1kdw",children:r("@astryx.keyboardHint.toNavigate")})]}),{placement:"below",alignment:"start",xstyle:QA.hint,style:{marginBlockStart:is["--spacing-2"]}}),onFocus:b,onBlur:y,onKeyDown:g}}function l4(e){x.useEffect(()=>{if(!e)return;const t=window.scrollX,n=window.scrollY,{body:s}=document,r=s.style.overflow,i=s.style.position,a=s.style.top,l=s.style.left,c=s.style.right;return s.style.overflow="hidden",s.style.position="fixed",s.style.top=`-${n}px`,s.style.left="0",s.style.right="0",()=>{s.style.overflow=r,s.style.position=i,s.style.top=a,s.style.left=l,s.style.right=c,window.scrollTo(t,n)}},[e])}let c4=!1;typeof window<"u"&&requestAnimationFrame(()=>{c4=!0});const JA={slideDown:{kKVMdj:"x1srr2gu x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},slideUp:{kKVMdj:"x1dvww92 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},fadeIn:{kKVMdj:"xqcmdr3 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},scaleIn:{kKVMdj:"x97zbip x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}};function eN(e="slideDown"){const[t]=x.useState(()=>c4);return t?JA[e]:null}const tN=50;function nN(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}const sN={natural:10,fast:4,instant:1/0};function rN(e,t,n){const s="natural",r=sN[s],{token:i}=ex(),a=x.useMemo(()=>{const y=nN(i("--duration-fast-min"));if(y==null)return tN;const g=y/10;return Math.max(4,Math.round(g))},[i,s]),[l,c]=x.useState(0),u=x.useRef(e),d=x.useRef(0),f=x.useRef(0),h=x.useRef(null);u.current=e;const p=x.useRef(e.length);e.length!==p.current&&(p.current=e.length,e.length===0&&l!==0&&(d.current=0,c(0)));const m=x.useRef(t);t!==m.current&&(m.current=t,!t&&e.length>0&&(d.current=e.length,c(e.length)));const b=Ha("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||s==="instant"||b)return;function y(g){if(g-f.current>=a){f.current=g;const v=u.current,w=d.current;if(w<v.length){const j=Math.min(w+r,v.length);d.current=j,c(j)}}h.current=requestAnimationFrame(y)}return h.current=requestAnimationFrame(y),()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null)}},[t,r,a,s,b]),!t||s==="instant"||b?e:e.slice(0,l)}const iN=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),aN=new Set(["true","menu","listbox","tree","grid","dialog"]);function oN(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&aN.has(t)}function N0({containerRef:e,inputRef:t,disabled:n=!1}){const s=x.useCallback(()=>{const r=t.current;r!=null&&(r instanceof HTMLElement&&oN(r)?r.click():r instanceof HTMLInputElement&&iN.has(r.type)||r instanceof HTMLTextAreaElement?r.focus():r instanceof HTMLElement?r.click():"focus"in r&&r.focus())},[t]);return E0({containerRef:e,interactiveRef:t,onClick:s,disabled:n})}const lN={warning:"warning",error:"error",success:"success"},cN={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function u4({status:e,statusVariant:t="attached",isInGroup:n=!1,size:s="md"}){const r=be(),a=t==="tooltip"&&!!(e!=null&&e.message),[l,c]=x.useState(void 0),u=bs({placement:"above",isEnabled:a,isOpen:l}),d=x.useCallback(()=>{c(void 0)},[]),f=x.useCallback(()=>{typeof window>"u"||typeof window.matchMedia!="function"||!window.matchMedia("(hover: none)").matches||c(m=>m!==!0)},[]);if(x.useEffect(()=>{if(l!==!0)return;const m=b=>{b.key==="Escape"&&c(void 0)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=o.jsx(Ce,{icon:lN[e.type],size:s,color:e.type,...U("input-status-icon",{size:s,status:e.type})});return a?{statusIcon:o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",ref:u.ref,"aria-label":r(cN[e.type]),"aria-describedby":u.describedBy,onClick:f,onBlur:d,className:"x3nfvp2 x6s0dn4 xl56j7k x1717udv x1ghz6dp x1heor9g x1ypdohk xjspbzw x784prv x9v5kkp xzunyri x7s97pk",children:p}),u.renderTooltip(e.message)]}),describedBy:u.describedBy}:{statusIcon:p,describedBy:void 0}}const M0=x.createContext(null);M0.displayName="InteractiveRoleContext";function uN(){return x.use(M0)}function d4({href:e,onClick:t,isDisabled:n=!1}){const s=uN();return e!=null&&!n?"link":t!=null?"button":s??"inert"}const dN=500,fN=10;function hN(e){const{onLongPress:t,disabled:n=!1,delayMs:s=dN,moveCancelPx:r=fN}=e,i=x.useRef(null),a=x.useRef(null),l=x.useRef(t);l.current=t;const c=x.useCallback(()=>{i.current!=null&&(clearTimeout(i.current),i.current=null),a.current=null},[]),u=x.useCallback(f=>{if(n||f.touches.length!==1)return;const h=f.touches[0];c(),a.current={x:h.clientX,y:h.clientY},i.current=setTimeout(()=>{const p=a.current;p!=null&&l.current({x:p.x,y:p.y})},s)},[n,s,c]),d=x.useCallback(f=>{const h=a.current;if(h==null||f.touches.length!==1)return;const p=f.touches[0];(Math.abs(p.clientX-h.x)>r||Math.abs(p.clientY-h.y)>r)&&c()},[r,c]);return x.useEffect(()=>c,[c]),{onTouchStart:u,onTouchMove:d,onTouchEnd:c,onTouchCancel:c}}const R0=6,xN={x177fznd:"x177fznd",$$css:!0},ad={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ue31p x134zogi x7so5qh x1eb35i0",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",kVAEAm:"x10l6tqk xd2i8i8 xw895rg x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0}},pN={x1e36hu2:"x1e36hu2",$$css:!0},od={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xqw8whb x1xhgmdq x7so5qh x1eb35i0",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",kVAEAm:"x10l6tqk x13sqjsa xxj8d0r x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0}},gN={x10zkftw:"x10zkftw",$$css:!0},ld={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xrhii57 xeozflw x7so5qh x1eb35i0",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",kVAEAm:"x10l6tqk x1k2a1sm xs5no71 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0}},mN={xbjq1vy:"xbjq1vy",$$css:!0},cd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xtj9ir3 x1okg2q x7so5qh x1eb35i0",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",kVAEAm:"x10l6tqk x1cuf62g x1qy2sty x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0}},yN={x3z7t8n:"x3z7t8n",$$css:!0},ud={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ybz0u4 x1fpm3bq x7so5qh x1eb35i0",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",kVAEAm:"x10l6tqk xeilikp x1xz04m3 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0}},kN={x6dglqq:"x6dglqq",$$css:!0},dd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x17lvmk x192eg1j x7so5qh x1eb35i0",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",kVAEAm:"x10l6tqk x8j1s1q x8gw32m x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0}},bN=[{marker:xN,reveal:ad.reveal,revealLayoutPreserved:ad.revealLayoutPreserved,conceal:ad.conceal,concealLayoutPreserved:ad.concealLayoutPreserved},{marker:pN,reveal:od.reveal,revealLayoutPreserved:od.revealLayoutPreserved,conceal:od.conceal,concealLayoutPreserved:od.concealLayoutPreserved},{marker:gN,reveal:ld.reveal,revealLayoutPreserved:ld.revealLayoutPreserved,conceal:ld.conceal,concealLayoutPreserved:ld.concealLayoutPreserved},{marker:mN,reveal:cd.reveal,revealLayoutPreserved:cd.revealLayoutPreserved,conceal:cd.conceal,concealLayoutPreserved:cd.concealLayoutPreserved},{marker:yN,reveal:ud.reveal,revealLayoutPreserved:ud.revealLayoutPreserved,conceal:ud.conceal,concealLayoutPreserved:ud.concealLayoutPreserved},{marker:kN,reveal:dd.reveal,revealLayoutPreserved:dd.revealLayoutPreserved,conceal:dd.conceal,concealLayoutPreserved:dd.concealLayoutPreserved}],Kp=new Array(R0).fill(!1);function vN(){for(let e=0;e<R0;e++)if(!Kp[e])return Kp[e]=!0,{index:e,isExhausted:!1};return{index:0,isExhausted:!0}}function wN(e,t){t||(Kp[e]=!1)}const Ub=Object.freeze({});function jN(e={}){const{isEnabled:t=!0}=e,[n]=x.useState(()=>t?vN():null);if(x.useEffect(()=>{if(n!=null)return()=>wN(n.index,n.isExhausted)},[n]),_l("useContainerReveal",`More than ${R0} reveal containers are mounted at once; nested containers beyond the pool may share a marker. Add markers to containerReveal.pool.stylex.ts and raise POOL_SIZE.`,(n==null?void 0:n.isExhausted)??!1),n==null)return{getContainerProps:()=>Ub,getContentRevealProps:()=>Ub};const s=bN[n.index];return{getContainerProps:()=>q(s.marker),getContentRevealProps:(r={})=>{const{isRevealInverted:i=!1,isLayoutPreserved:a=!1}=r,l=i?a?s.concealLayoutPreserved:s.conceal:a?s.revealLayoutPreserved:s.reveal;return q(l)}}}const g1={label:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",$$css:!0},labelDisabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",$$css:!0},srOnly:{ksu8eU:"xng3xce",kMcinP:"xzpqnlu",kZKoxP:"xjm9jq1",kLqNvP:"x1o0tod",kogj98:"xkdpibf",kVQacm:"xb3r6kr",kmVPX3:"x1717udv",kfzvcC:"x47corl",kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",kfSwDN:"x87ps6o",khDVqt:"xuxw1ft",kzqmXN:"x1i1rx1s",$$css:!0}};function ox({label:e,inputID:t,labelID:n,isGroupLabel:s=!1,isLabelHidden:r=!1,isDisabled:i=!1,isOptional:a=!1,isRequired:l=!1,labelIcon:c,labelTooltip:u,description:d,descriptionID:f,className:h,style:p,xstyle:m,ref:b,...y}){const g=be(),k=a?g("@astryx.field.optional"):l?g("@astryx.field.required"):null,v=s?"span":"label",w=!s&&t!=null,j=x.useRef(null),S=x.useMemo(()=>({get current(){var T;return t==null?null:((T=j.current)==null?void 0:T.ownerDocument.getElementById(t))??null},set current(T){}}),[t]),C=N0({containerRef:j,inputRef:S,disabled:!w}),E=o.jsxs(o.Fragment,{children:[c&&Hs(c,{size:"sm",color:"inherit"}),e,k&&o.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[o.jsx("span",{"aria-hidden":"true",children:" ∙ "}),k]}),u&&o.jsx(Ga,{content:u,placement:"above",children:o.jsx(Ce,{icon:"info",size:"sm",color:"inherit"})})]});return o.jsxs(o.Fragment,{children:[o.jsx(v,{ref:b,id:n,htmlFor:s?void 0:t,...y,...F(U("field-label"),q(g1.label,i&&g1.labelDisabled,r&&g1.srOnly,m),h,p),children:E}),d&&o.jsx("span",{ref:w?j:void 0,id:f,...w?C:void 0,...{0:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4"},2:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk"},1:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"},3:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"}}[!!w<<1|!!r<<0],children:d})]})}ox.displayName="FieldLabel";const SN={warning:"warning",error:"error",success:"success"},m1={base:{kMv6JI:"x9ynric",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},attached:{keoZOQ:"x1c40v9y",kLKAdn:"x1ak3mig",kGO01o:"x1wesfrj",kg3NbH:"xf314gf",kVL7Gh:"xquck67",kT0f0o:"x14i3lts",$$css:!0},detached:{keoZOQ:"xcsaf9d",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"xh6dtrn",$$css:!0}},$N={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function lx({ref:e,type:t,message:n,id:s,variant:r="attached",xstyle:i,className:a,style:l,...c}){const u=eN("slideDown"),d=Ll();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),o.jsx("div",{ref:e,id:s,...c,...F(U("field-status",{type:t,variant:r}),q(m1.base,u,r==="attached"?m1.attached:m1.detached,$N[t],i),a,l),children:r==="detached"?o.jsxs("span",{className:"x78zum5 x1cy8zhl xzye2dw",children:[o.jsx("span",{className:"x3nfvp2 x6s0dn4 x14o5nre x2lah0s",children:o.jsx(Ce,{icon:SN[t],size:"sm",color:"inherit",...U("field-status-icon",{type:t})})}),o.jsx("span",{children:n})]}):n})}lx.displayName="FieldStatus";const CN={x1tspnpo:"x1tspnpo",$$css:!0},cx=x.createContext(null);cx.displayName="CheckboxListContext";const hn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerLabelHidden:{kOIVth:"xxhr3t",$$css:!0},checkboxWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},checkbox:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"xx3sua9",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},checkboxFocus:{kI3sdo:"x1a2a7pz xkri23q",kInvED:"x81n7kt",$$css:!0},checkboxUnchecked:{kMwMTN:"xqwr325",kVAM5u:"xvy26l8 x1jtjlen",kWkggS:"x10xzikg xrsv7h",$$css:!0},checkboxChecked:{kMwMTN:"x17wrial",kVAM5u:"xad5do x1od6ugu",kWkggS:"x1ewilqj x6aeo4j",$$css:!0},checkboxDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s xmt8yqp",$$css:!0},checkboxDisabledUnchecked:{kWkggS:"xwmxj5m x1cjfj8k",$$css:!0},checkmark:{k1xSpc:"x1s85apg",kMwMTN:"x17wrial xs5hli",$$css:!0},checkmarkVisible:{k1xSpc:"x1lliihq",$$css:!0},indeterminateMark:{k1xSpc:"x1s85apg",kWkggS:"x1azo05 xwvh9j7",kaIpWk:"xjspbzw",$$css:!0},indeterminateMarkVisible:{k1xSpc:"x1lliihq",$$css:!0}},Fb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},EN={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},TN={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},zN={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},AN={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function f4({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:a,isDisabled:l=!1,htmlName:c,disabledMessage:u,isReadOnly:d=!1,isOptional:f=!1,isRequired:h=!1,size:p="md",onFocus:m,onBlur:b,labelIcon:y,status:g,width:k,xstyle:v,className:w,style:j,ref:S,...C}){const E=x.useId(),T=x.useId(),$=x.useId(),[,N]=x.useTransition(),[A,M]=x.useOptimistic(a),I=i||A!==a,R=l&&!!u,z=x.use(cx),_=l&&(R||((z==null?void 0:z.hasDisabledMessage)??!1)),O=bs({placement:"above",focusTrigger:"always",isEnabled:R}),D=A==="indeterminate",L=A===!0,B=L||D,P=x.useCallback(Z=>{Z&&(Z.indeterminate=D)},[D]),X=[];n&&X.push(T),g!=null&&g.message&&X.push($),R&&X.push(O.describedBy);const Y=X.length>0?X.join(" "):void 0;return o.jsxs("div",{...F(U("checkbox-input",{size:p}),q(k!=null&&AN.width(k),v),w,j),children:[o.jsxs("div",{ref:Z=>{O.interactionRef(Z)},...q(hn.container,t&&hn.containerLabelHidden,!l&&CN),children:[o.jsxs("div",{...q(hn.checkboxWrapper,Fb[p]),children:[o.jsx("input",{...C,ref:it(S,P,O.positionRef),id:E,type:"checkbox",name:l?void 0:c,checked:L,disabled:l&&!_,"aria-disabled":_?"true":void 0,readOnly:d,required:h,onChange:Z=>{if(l||I||d)return;const ne=Z.target.checked;s==null||s(ne,Z),r&&!Z.defaultPrevented&&N(async()=>{M(ne),await r(ne,Z)})},onFocus:m,onBlur:b,"aria-readonly":d||void 0,"aria-describedby":Y,"aria-invalid":(g==null?void 0:g.type)==="error"?!0:void 0,"aria-busy":I||void 0,...q(hn.input,Fb[p],l&&hn.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...F(U("checkbox",{size:p,checked:L?"checked":D?"indeterminate":null,disabled:l?"disabled":null}),q(hn.checkbox,EN[p],!l&&hn.checkboxFocus,B?hn.checkboxChecked:hn.checkboxUnchecked,l&&hn.checkboxDisabled,l&&!B&&hn.checkboxDisabledUnchecked)),children:I?o.jsx(on,{size:"sm",shade:"inherit"}):o.jsxs(o.Fragment,{children:[o.jsx("svg",{viewBox:"0 0 10 10",...q(hn.checkmark,TN[p],L&&hn.checkmarkVisible),children:o.jsx("path",{d:"M8.5 2.5L4 7.5L1.5 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),o.jsx("div",{...q(hn.indeterminateMark,zN[p],D&&hn.indeterminateMarkVisible)})]})})]}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:o.jsx(ox,{label:e,inputID:E,isLabelHidden:t,isDisabled:l,isOptional:f,isRequired:h,labelIcon:y,description:n,descriptionID:T})})]}),(g==null?void 0:g.message)&&o.jsx(lx,{type:g.type,message:g.message,id:$,variant:"detached"}),R&&O.renderTooltip(u)]})}f4.displayName="CheckboxInput";function h4({value:e,onChange:t,label:n,hasCloseOnSelect:s=!0,children:r,className:i,style:a,...l}){const c=x.useMemo(()=>({value:e,onChange:t,hasCloseOnSelect:s}),[e,t,s]);return o.jsx("div",{...l,role:"group","aria-label":n,...F({className:"x78zum5 xdt5ytf x1lsbc85"},{className:i,style:a}),children:o.jsx(z0,{value:c,children:r})})}h4.displayName="DropdownMenuRadioGroup";const oo={root:{kzqmXN:"xh8yej3",kaIpWk:"x1ws5lxm",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0},circle:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kB7OPa:"x9f619",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kayTVb:"x1g77sc7 xozvky",keTefX:"x1lziwak x1jymrmb",$$css:!0},unchecked:{kVAM5u:"xvy26l8",kWkggS:"x10xzikg",$$css:!0},checked:{kVAM5u:"xad5do",kWkggS:"x1ewilqj",$$css:!0},dot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05",$$css:!0}},NN={sm:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0},md:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",$$css:!0}},MN={sm:{kzqmXN:"x1v4s8kt",kZKoxP:"xols6we",$$css:!0},md:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0}};function x4({value:e,label:t,description:n,icon:s,isDisabled:r=!1,endContent:i,xstyle:a,className:l,style:c,...u}){const d=T0(),f=CA();if(!f)throw new Error("DropdownMenuRadioItem must be used within a DropdownMenuRadioGroup");const h=(d==null?void 0:d.menuSize)??"md",p=h==="sm"?"sm":"md",m=f.value===e,b=x.useCallback(()=>{r||(f.onChange(e),f.hasCloseOnSelect&&(d==null||d.closeMenu()))},[r,f,e,d]),y=x.useCallback(g=>A0(g,r),[r]);return o.jsx(Fa,{...u,role:"menuitemradio","aria-checked":m,tabIndex:r?void 0:-1,onPointerMove:y,marker:o.jsx("span",{"aria-hidden":"true",...F(U("dropdown-menu-radio",{size:p,checked:m?"checked":null,disabled:r?"disabled":null}),q(oo.circle,NN[p],m?oo.checked:oo.unchecked)),children:m&&o.jsx("span",{...F(U("dropdown-menu-radio-dot",{size:p,checked:"checked",disabled:r?"disabled":null}),q(oo.dot,MN[p]))})}),startContent:s?Hs(s,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:b,isDisabled:r,xstyle:[oo.root,r&&oo.disabled,a],...F(U("dropdown-menu-item",{size:h}),{className:l,style:c})})}x4.displayName="DropdownMenuRadioItem";function kn({icon:e,...t}){return o.jsx(re,{...t,icon:e,isIconOnly:!0})}kn.displayName="IconButton";const Gb={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},RN={containerPaddingInlineStart:{"--container-padding-inline-start":"xjmlhfd",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x1ihxwbr",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1rqz8me",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1omyuck",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x14rzhog",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xjej9fs",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x4poyjn",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"x1u1kw4e",$$css:!0}},IN={containerPaddingInlineStart:{"--container-padding-inline-start":"xrgx2ny",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"xyk0j9o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x876hks",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1u89lk7",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x12sptzx",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xo78phr",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x1we69p7",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xsdnkbz",$$css:!0}},_N={containerPaddingInlineStart:{"--container-padding-inline-start":"x1tewnwq",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x11h1f2o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1g2kccc",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1gvthzm",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x1hsjncj",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"x1pui4bz",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x2so38",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xinu7xd",$$css:!0}},ON={card:RN,section:IN,dialog:_N},DN={spacing0:{"--container-padding-inline-start":"x1gu2k80",$$css:!0},spacing0_5:{"--container-padding-inline-start":"x14ws0sr",$$css:!0},spacing1:{"--container-padding-inline-start":"x1cvlban",$$css:!0},spacing1_5:{"--container-padding-inline-start":"x176g23i",$$css:!0},spacing2:{"--container-padding-inline-start":"x1xlrr2o",$$css:!0},spacing3:{"--container-padding-inline-start":"xfdwxua",$$css:!0},spacing4:{"--container-padding-inline-start":"x1dlhslv",$$css:!0},spacing5:{"--container-padding-inline-start":"x1s81nki",$$css:!0},spacing6:{"--container-padding-inline-start":"x1ep0dkj",$$css:!0},spacing7:{"--container-padding-inline-start":"x157xojc",$$css:!0},spacing8:{"--container-padding-inline-start":"xw1diwv",$$css:!0},spacing9:{"--container-padding-inline-start":"xraca2a",$$css:!0},spacing10:{"--container-padding-inline-start":"xserb3f",$$css:!0},spacing11:{"--container-padding-inline-start":"xziclwo",$$css:!0},spacing12:{"--container-padding-inline-start":"x1iiwihq",$$css:!0}},LN={spacing0:{"--container-padding-inline-end":"x91ghl5",$$css:!0},spacing0_5:{"--container-padding-inline-end":"x1wz3t3y",$$css:!0},spacing1:{"--container-padding-inline-end":"x2oyxnl",$$css:!0},spacing1_5:{"--container-padding-inline-end":"xntetml",$$css:!0},spacing2:{"--container-padding-inline-end":"xcas3b9",$$css:!0},spacing3:{"--container-padding-inline-end":"xu0ipoa",$$css:!0},spacing4:{"--container-padding-inline-end":"xs0pscg",$$css:!0},spacing5:{"--container-padding-inline-end":"xgkj7vj",$$css:!0},spacing6:{"--container-padding-inline-end":"x94cj42",$$css:!0},spacing7:{"--container-padding-inline-end":"x11tj35w",$$css:!0},spacing8:{"--container-padding-inline-end":"x1b9k1pi",$$css:!0},spacing9:{"--container-padding-inline-end":"x19w02kr",$$css:!0},spacing10:{"--container-padding-inline-end":"xx5lg5w",$$css:!0},spacing11:{"--container-padding-inline-end":"x1nmgbqg",$$css:!0},spacing12:{"--container-padding-inline-end":"x1wsfsk2",$$css:!0}},BN={spacing0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},spacing0_5:{"--container-padding-block-start":"xvdf9ev",$$css:!0},spacing1:{"--container-padding-block-start":"xnsckjb",$$css:!0},spacing1_5:{"--container-padding-block-start":"x1kbx601",$$css:!0},spacing2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},spacing3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},spacing4:{"--container-padding-block-start":"xm01sq8",$$css:!0},spacing5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},spacing6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},spacing7:{"--container-padding-block-start":"x1c00sag",$$css:!0},spacing8:{"--container-padding-block-start":"xfv60at",$$css:!0},spacing9:{"--container-padding-block-start":"x14fzdu7",$$css:!0},spacing10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},spacing11:{"--container-padding-block-start":"x1rdjxae",$$css:!0},spacing12:{"--container-padding-block-start":"xecwdl6",$$css:!0}},qN={spacing0:{"--container-padding-block-end":"xkunwnr",$$css:!0},spacing0_5:{"--container-padding-block-end":"x1cao3zv",$$css:!0},spacing1:{"--container-padding-block-end":"x57a7ii",$$css:!0},spacing1_5:{"--container-padding-block-end":"xv53x8y",$$css:!0},spacing2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},spacing3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},spacing4:{"--container-padding-block-end":"x4hfsld",$$css:!0},spacing5:{"--container-padding-block-end":"xbib2ws",$$css:!0},spacing6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},spacing7:{"--container-padding-block-end":"x1yqogew",$$css:!0},spacing8:{"--container-padding-block-end":"x8lgq76",$$css:!0},spacing9:{"--container-padding-block-end":"x1f7f9rt",$$css:!0},spacing10:{"--container-padding-block-end":"x15vxphk",$$css:!0},spacing11:{"--container-padding-block-end":"x4bg2x9",$$css:!0},spacing12:{"--container-padding-block-end":"x186mjxr",$$css:!0}},HN={spacing0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},spacing0_5:{"--layout-padding-outer-x":"xihiwg7",$$css:!0},spacing1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},spacing1_5:{"--layout-padding-outer-x":"x1u93lgd",$$css:!0},spacing2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},spacing3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},spacing4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},spacing5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},spacing6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},spacing7:{"--layout-padding-outer-x":"x1gfiokx",$$css:!0},spacing8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},spacing9:{"--layout-padding-outer-x":"xzr4qsh",$$css:!0},spacing10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},spacing11:{"--layout-padding-outer-x":"x1hct0t0",$$css:!0},spacing12:{"--layout-padding-outer-x":"x11cyqoe",$$css:!0}},PN={spacing0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},spacing0_5:{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},spacing1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},spacing1_5:{"--layout-padding-outer-y":"xd3dqby",$$css:!0},spacing2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},spacing3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},spacing4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},spacing5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},spacing6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},spacing7:{"--layout-padding-outer-y":"x1q6rme1",$$css:!0},spacing8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},spacing9:{"--layout-padding-outer-y":"x1t5kicu",$$css:!0},spacing10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},spacing11:{"--layout-padding-outer-y":"x10zktp0",$$css:!0},spacing12:{"--layout-padding-outer-y":"x1yz3n6a",$$css:!0}},UN={spacing0:{"--layout-padding-inner-x":"xj1bl4l",$$css:!0},spacing0_5:{"--layout-padding-inner-x":"xlriy2h",$$css:!0},spacing1:{"--layout-padding-inner-x":"x6uuyak",$$css:!0},spacing1_5:{"--layout-padding-inner-x":"xd38f90",$$css:!0},spacing2:{"--layout-padding-inner-x":"xxqksqd",$$css:!0},spacing3:{"--layout-padding-inner-x":"x1fyui2f",$$css:!0},spacing4:{"--layout-padding-inner-x":"x1i2ajwi",$$css:!0},spacing5:{"--layout-padding-inner-x":"x1tac27u",$$css:!0},spacing6:{"--layout-padding-inner-x":"x1ntgf3t",$$css:!0},spacing7:{"--layout-padding-inner-x":"xhjd9tl",$$css:!0},spacing8:{"--layout-padding-inner-x":"xn7c84u",$$css:!0},spacing9:{"--layout-padding-inner-x":"xeqkbsz",$$css:!0},spacing10:{"--layout-padding-inner-x":"x1vf4qco",$$css:!0},spacing11:{"--layout-padding-inner-x":"xsmamsf",$$css:!0},spacing12:{"--layout-padding-inner-x":"x2xk2xj",$$css:!0}},FN={spacing0:{"--layout-padding-inner-y":"xwuefyo",$$css:!0},spacing0_5:{"--layout-padding-inner-y":"x180h0y5",$$css:!0},spacing1:{"--layout-padding-inner-y":"xmpug6m",$$css:!0},spacing1_5:{"--layout-padding-inner-y":"x1g8jpzm",$$css:!0},spacing2:{"--layout-padding-inner-y":"x1lksgje",$$css:!0},spacing3:{"--layout-padding-inner-y":"x4j7gld",$$css:!0},spacing4:{"--layout-padding-inner-y":"x1s3ehtl",$$css:!0},spacing5:{"--layout-padding-inner-y":"x1rj5eim",$$css:!0},spacing6:{"--layout-padding-inner-y":"x1ftgg6u",$$css:!0},spacing7:{"--layout-padding-inner-y":"x1ho74vh",$$css:!0},spacing8:{"--layout-padding-inner-y":"xm2cs6f",$$css:!0},spacing9:{"--layout-padding-inner-y":"x1vsq92b",$$css:!0},spacing10:{"--layout-padding-inner-y":"x18gbwmk",$$css:!0},spacing11:{"--layout-padding-inner-y":"x14zymzj",$$css:!0},spacing12:{"--layout-padding-inner-y":"xzfpkx9",$$css:!0}},GN={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function p4({padding:e="spacing4",paddingOuterX:t,paddingOuterY:n,paddingInnerX:s,paddingInnerY:r,useThemeDefault:i,maxHeight:a}){const l=t??e,c=n??e,u=s??e,d=r??e,f=a?GN.containerMaxHeight(a):null;if(i){const h=ON[i];return[Gb.container,h.containerPaddingInlineStart,h.containerPaddingInlineEnd,h.containerPaddingBlockStart,h.containerPaddingBlockEnd,h.layoutPaddingOuterX,h.layoutPaddingOuterY,h.layoutPaddingInnerX,h.layoutPaddingInnerY,f]}return[Gb.container,DN[l],LN[l],BN[c],qN[c],HN[l],PN[c],UN[u],FN[d],f]}const y1={card:{"--_card-radius":"x2kkz0m",kaIpWk:"x153u1i6",kVQacm:"x7giv3",kGVxlE:"x1p8z4y0",$$css:!0},withBorder:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kZCmMZ:"xs19ii7",kwRFfy:"x12frdag",kLKAdn:"x1nex4ik",kGO01o:"xbv1mwh",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0}},VN={default:{kWkggS:"x1de1mus",$$css:!0},transparent:{kWkggS:"xjbqb8w",$$css:!0},muted:{kWkggS:"xwmxj5m",$$css:!0},blue:{kWkggS:"x1o0wnni",$$css:!0},cyan:{kWkggS:"x1rgj867",$$css:!0},gray:{kWkggS:"xspzpui",$$css:!0},green:{kWkggS:"x1sqjeoo",$$css:!0},orange:{kWkggS:"x1e9xt6e",$$css:!0},pink:{kWkggS:"xnpoty2",$$css:!0},purple:{kWkggS:"x16i6n6f",$$css:!0},red:{kWkggS:"x1cibrc5",$$css:!0},teal:{kWkggS:"x1jtji5o",$$css:!0},yellow:{kWkggS:"x1bo7t0x",$$css:!0}},WN={none:{"--_card-elevation":"xw28qpl",$$css:!0},low:{"--_card-elevation":"x1nn8khe",$$css:!0},med:{"--_card-elevation":"x1ovzxg0",$$css:!0},high:{"--_card-elevation":"xnpe7fx",$$css:!0}},KN={sizing:(e,t,n,s)=>[{kzqmXN:e!=null?"x5lhr3w":e,kZKoxP:t!=null?"x16ye13r":t,ks0D6T:n!=null?"xf68679":n,kAzted:s!=null?"x82snj4":s,$$css:!0},{"--x-width":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-height":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-maxWidth":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-minHeight":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function ux({width:e,height:t,maxWidth:n,minHeight:s,children:r,padding:i,variant:a="default",elevation:l="none",xstyle:c,className:u,style:d,ref:f,...h}){const p=t!=null&&t!=="auto",m=i==null,b=i??4,y=n3[b];return o.jsx("div",{ref:f,...F(U("card",{variant:a}),q(y1.card,VN[a],WN[l],p&&y1.scrollable,KN.sizing(e??null,t??null,n??null,s??null),...p4(m?{useThemeDefault:"card"}:{paddingInnerX:y,paddingInnerY:y,paddingOuterX:y,paddingOuterY:y}),!m&&b!==4&&Al[b],!m&&b!==4&&Nl[b],!m&&b!==4&&Ml[b],!m&&b!==4&&Rl[b],a==="default"&&y1.withBorder,c),u,d),...h,children:r})}ux.displayName="Card";const fd={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},Xp=Kh.createContext(!1);Xp.displayName="ThemeNestingContext";const k1=new Set;function XN(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(k1.has(n))return;m0(`theme-injection:${e.name}`,"Theme",`"${e.name}" is using runtime style injection. For better performance, use the pre-built theme:
|
|
77
|
-
|
|
78
|
-
import {${e.name}Theme} from '@astryxdesign/theme-${e.name}/built';
|
|
79
|
-
import '@astryxdesign/theme-${e.name}/theme.css';
|
|
80
|
-
|
|
81
|
-
For custom themes, run \`npx @astryxdesign/cli theme build <file>\` to generate the built artifacts.`);const{prose:s,component:r}=pT(e);if(!(!s&&!r)){if(s){const i=document.createElement("style");i.setAttribute(Cn("theme-prose"),e.name),i.setAttribute(Cn("id"),t),i.textContent=`@layer reset {
|
|
82
|
-
${s}
|
|
83
|
-
}`,document.head.appendChild(i)}if(r){const i=document.createElement("style");i.setAttribute(Cn("theme"),e.name),i.setAttribute(Cn("id"),t),i.textContent=`@layer astryx-theme {
|
|
84
|
-
${r}
|
|
85
|
-
}`,document.head.appendChild(i)}return k1.add(n),()=>{const i=document.querySelector(`style[${Cn("theme-prose")}="${e.name}"][${Cn("id")}="${t}"]`),a=document.querySelector(`style[${Cn("theme")}="${e.name}"][${Cn("id")}="${t}"]`);i==null||i.remove(),a==null||a.remove(),k1.delete(n)}}},[e,t])}function ZN(e,t,n){ar(()=>{if(!e&&!(typeof document>"u"))return t==="light"||t==="dark"?document.documentElement.setAttribute("data-theme",t):document.documentElement.removeAttribute("data-theme"),document.documentElement.setAttribute(Cn("theme"),n),()=>{document.documentElement.removeAttribute("data-theme"),document.documentElement.removeAttribute(Cn("theme"))}},[e,t,n])}function g4({theme:e,mode:t="system",children:n}){const s=x.use(Xp);sT(e),XN(e),ZN(s,t,e.name);const r=t==="dark"?fd.dark:t==="light"?fd.light:fd.system,i=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return o.jsx(Jh,{value:i,children:o.jsx(Xp,{value:!0,children:o.jsx("div",{...q(fd.base,r),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}g4.displayName="Theme";function m4({mode:e,children:t}){return o.jsx("div",{[Cn("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}m4.displayName="MediaTheme";const y4="--color-syntax-";function YN(e){return y4+e}const QN=Object.keys(k0).map(e=>e.replace(y4,""));function JN(e){const t={};for(const n of QN)t[YN(n)]=e.tokens[n];return t}const k4=x.createContext(null);k4.displayName="SyntaxThemeContext";function b4({theme:e,children:t}){const n=x.useMemo(()=>JN(e),[e]),s=x.useMemo(()=>({theme:e}),[e]);return o.jsx(k4,{value:s,children:o.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}b4.displayName="SyntaxTheme";function v4({type:e,body:t,endContent:n,isAutoHide:s,autoHideDuration:r,isExiting:i=!1,onDismiss:a}){const l=be(),c=x.useRef(null),u=x.useRef(!1),d=x.useRef(r),f=x.useRef(null),h=x.useRef(a);h.current=a;const p=x.useCallback(()=>{!s||u.current||(c.current&&clearTimeout(c.current),f.current=Date.now(),c.current=setTimeout(()=>{h.current("auto")},d.current))},[s]),m=x.useCallback(()=>{if(!(!s||u.current)&&(u.current=!0,c.current&&(clearTimeout(c.current),c.current=null),f.current!=null)){const w=Date.now()-f.current;d.current=Math.max(d.current-w,1e3)}},[s]),b=x.useCallback(()=>{!s||!u.current||(u.current=!1,p())},[s,p]);x.useEffect(()=>(d.current=r,p(),()=>{c.current&&clearTimeout(c.current)}),[r,p]),x.useEffect(()=>{if(s)return window.addEventListener("blur",m),window.addEventListener("focus",b),()=>{window.removeEventListener("blur",m),window.removeEventListener("focus",b)}},[s,m,b]);const y=x.useCallback(()=>{a("manual")},[a]),g=e==="error",{mode:k}=ex(),v=g||k==="light"?"dark":"light";return o.jsx("div",{role:g?"alert":"status","aria-live":g?"assertive":"polite","aria-atomic":"true",onMouseEnter:m,onMouseLeave:b,onFocusCapture:m,onBlurCapture:b,...F(U("toast",{type:e}),{0:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7"},2:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3"},1:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7 xg01cxk x1lm5u"},3:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3 xg01cxk x1lm5u"}}[!!g<<1|!!i<<0]),children:o.jsx(m4,{mode:v,children:o.jsxs("div",{className:"x78zum5 x1cy8zhl xjcht0a xh8yej3",children:[o.jsx("div",{className:"x98rzlu xeuugli",children:t}),o.jsxs("div",{className:"x2lah0s x78zum5 x6s0dn4 x1txdalj xacfrgf xmequkd",children:[n,o.jsx(re,{variant:"ghost",size:"sm",icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:l("@astryx.toast.dismiss"),onClick:y,isIconOnly:!0})]})]})})})}v4.displayName="Toast";const dx=x.createContext(null);dx.displayName="ToastContext";const rc={viewport:{kVAEAm:"xixxii4",kY2c9j:"x6cuj84",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x1shk3sm",kfzvcC:"x47corl",kpwlN0:"xh3736h",kogj98:"x1ghz6dp",kWkggS:"xjbqb8w",kVQacm:"x1rea2x4",$$css:!0},bottomEnd:{krVfgx:"x1ey2m1c",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",$$css:!0},bottomStart:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",$$css:!0},topEnd:{k87sOh:"x13vifvy",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",kXwgrk:"x3ieub6",$$css:!0},topStart:{k87sOh:"x13vifvy",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",kXwgrk:"x3ieub6",$$css:!0}};function Zp(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Zp).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return Zp(t)}return""}function I0({position:e="bottomEnd",maxVisible:t=5,inset:n,isTopLayer:s=!0,children:r}){const i=be(),[a,l]=x.useState([]),[c,u]=x.useState(new Set),d=x.useRef(a);d.current=a;const f=x.useRef(null),h=x.useRef(new Set),p=x.useRef(null),m=x.useRef(null),b=x.useRef(null),y=x.useCallback(N=>{if(!N)return null;const A=N.querySelectorAll(t4);for(const M of A)if(!(M.getAttribute("tabindex")==="-1"||M.hasAttribute("disabled")||M.getAttribute("aria-disabled")==="true"))return M;return null},[]),g=Ll(),k=x.useCallback(N=>{const{uniqueID:A,collisionBehavior:M="overwrite"}=N.options;if(A&&M==="ignore"&&d.current.some(R=>R.options.uniqueID===A))return;const I=Zp(N.options.body);I&&g(I,N.options.type==="error"?"assertive":"polite"),l(R=>A&&R.find(_=>_.options.uniqueID===A)?R.map(_=>_.options.uniqueID===A?N:_):[...R,N])},[g]),v=x.useCallback((N,A)=>{var _,O;if(h.current.has(N))return;h.current.add(N);const M=d.current.find(D=>D.id===N);M&&((O=(_=M.options).onHide)==null||O.call(_,A));const I=f.current,R=document.activeElement,z=(I==null?void 0:I.querySelector(`[data-toast-id="${N}"]`))??null;if(z&&R instanceof Node&&z.contains(R))if(m.current=N,d.current.filter(L=>L.id!==N).length>0){const L=d.current.findIndex(P=>P.id===N),B=d.current[L+1]??d.current[L-1];b.current=B?B.id:"restore"}else b.current="restore";u(D=>D.has(N)?D:new Set(D).add(N))},[]),w=x.useCallback(N=>{h.current.delete(N),u(A=>{if(!A.has(N))return A;const M=new Set(A);return M.delete(N),M}),l(A=>A.filter(M=>M.id!==N))},[]);x.useLayoutEffect(()=>{const N=m.current,A=b.current;if(N==null||A==null||a.some(R=>R.id===N))return;m.current=null,b.current=null;const M=f.current;if(A!=="restore"&&M){const R=M.querySelector(`[data-toast-id="${A}"]`),z=y(R)??R;if(z){z.focus();return}}const I=p.current;p.current=null,I&&I.isConnected?I.focus():M&&M.focus()},[a,y]);const j=x.useCallback(N=>d.current.find(A=>A.options.uniqueID===N),[]),S=x.useMemo(()=>({addToast:k,removeToast:v,findByUniqueID:j}),[k,v,j]),C=a.slice(-t),E={};n!=null&&n.top&&(E.top=n.top),n!=null&&n.bottom&&(E.bottom=n.bottom),n!=null&&n.start&&(E.insetInlineStart=n.start),n!=null&&n.end&&(E.insetInlineEnd=n.end),x.useEffect(()=>{if(!s)return;const N=f.current;if(N&&typeof N.showPopover=="function")try{N.showPopover()}catch{}},[s]);const T=a.length>0;x.useEffect(()=>{if(!T)return;const N=A=>{if(A.key!=="F6")return;const M=f.current;if(!M)return;const I=document.activeElement;if(I instanceof Node&&M.contains(I))return;A.preventDefault(),I instanceof HTMLElement&&(p.current=I);const R=M.querySelectorAll("[data-toast-id]"),z=R[R.length-1]??null;(y(z)??z??M).focus()};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[T,y]);const $=e==="topEnd"?rc.topEnd:e==="topStart"?rc.topStart:e==="bottomStart"?rc.bottomStart:rc.bottomEnd;return o.jsxs(dx,{value:S,children:[r,o.jsx("div",{ref:f,role:"region","aria-label":i("@astryx.toast.viewport"),tabIndex:-1,popover:s?"manual":void 0,...F(q(rc.viewport,$),{style:Object.keys(E).length>0?E:void 0}),children:C.map(N=>{const A=N.options,M=A.type??"info",I=A.isAutoHide??M!=="error",R=A.autoHideDuration??5e3,z=c.has(N.id);return o.jsx("div",{"data-toast-id":N.id,...{0:{className:"x67bb7w xrvj5dj x1tu4anv xvmdzux xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7"},1:{className:"x67bb7w xrvj5dj xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7 xihq33y x18d9i69"}}[!!z<<0],onTransitionEnd:z?_=>{_.propertyName==="grid-template-rows"&&w(N.id)}:void 0,children:o.jsx("div",{className:"xb3r6kr",children:o.jsx(v4,{type:M,body:A.body,endContent:A.endContent,isAutoHide:I,autoHideDuration:R,isExiting:z,onDismiss:_=>v(N.id,_)})})},N.id)})})]})}I0.displayName="ToastViewport";const Vb='button, [role="button"]';function Wb(e){return e.matches(Vb)?e:e.querySelector(Vb)}const Vr={contentPadding:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},gap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},customWidth:e=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}],matchTrigger:{k7Eaqz:"xrzjruh",$$css:!0}};function _0({children:e,anchorRef:t,content:n,placement:s="below",alignment:r="start",isOpen:i,onOpenChange:a,isEnabled:l=!0,width:c,label:u,role:d="dialog",isModal:f,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,hasLightDismiss:b=!0,hasEscapeDismiss:y=!0,xstyle:g,className:k,style:v,"data-testid":w}){const j=x.useRef(null),S=i!==void 0,C=x.useRef(0),E=x.useCallback(()=>{a==null||a(!0)},[a]),T=x.useCallback(()=>{C.current=Date.now(),a==null||a(!1)},[a]),$=Ol({dialogLabel:u,role:d,isModal:f,hasLightDismiss:b,hasEscapeDismiss:y,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,onShow:E,onHide:T}),N=x.useCallback(()=>{l&&(Date.now()-C.current<50||$.toggle())},[l,$]),A=x.useCallback(z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),N())},[N]),M=x.useCallback(z=>{z.setAttribute("aria-haspopup",$.triggerProps["aria-haspopup"]),z.setAttribute("aria-expanded",String($.triggerProps["aria-expanded"])),z.setAttribute("aria-controls",$.triggerProps["aria-controls"]),z.addEventListener("click",N);const _=z.tagName!=="BUTTON"&&z.getAttribute("role")==="button";return _&&z.addEventListener("keydown",A),()=>{z.removeAttribute("aria-haspopup"),z.removeAttribute("aria-expanded"),z.removeAttribute("aria-controls"),z.removeEventListener("click",N),_&&z.removeEventListener("keydown",A)}},[$,N,A]);ar(()=>{if(!t)return;const z=t.current;if(!z)return;const _=Wb(z);if(_||ga(),!_)return;$.triggerRef(z);const O=M(_);return()=>{$.triggerRef(null),O()}},[t,$,M]),ar(()=>{if(t||typeof e=="function")return;const z=j.current;if(!z)return;$.triggerRef(z);const _=Wb(z);if(_||ga(),!_)return;const O=M(_);return()=>{$.triggerRef(null),O()}},[t,$,M]),ar(()=>{S&&(i&&!$.isOpen?$.show():!i&&$.isOpen&&$.hide())},[i,S,$]);const I=c?Vr.customWidth(c):Vr.matchTrigger;if(t&&e==null)return o.jsx(o.Fragment,{children:$.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Vr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[I,Vr.gap,ir[s]]})});if(typeof e=="function"){const z={ref:$.triggerRef,onClick:N,"aria-haspopup":"dialog","aria-expanded":$.isOpen,"aria-controls":$.id};return o.jsxs(o.Fragment,{children:[e(z),$.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Vr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[I,Vr.gap,ir[s]]})]})}return o.jsxs(o.Fragment,{children:[o.jsx(M0,{value:"button",children:o.jsx("div",{ref:j,className:"x3nfvp2",children:e})}),$.render(o.jsx("div",{"data-testid":w,...F(U("popover"),q(Vr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[I,Vr.gap,ir[s]]})]})}_0.displayName="Popover";const b1={container:{kWkggS:"x10xzikg","--_hovercard-radius":"xqwz7mz",kaIpWk:"x7a53xk",kGVxlE:"x14hfi27",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function eM(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function tM(e={}){const{placement:t="above",alignment:n="center",delay:s=300,hideDelay:r=200,focusTrigger:i="auto",isEnabled:a=!0,label:l,isOpen:c,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,h=t==="above"||t==="below"?b1.marginBlock:b1.marginInline,p=Il({mode:"context",onShow:d,onHide:f}),m=x.useMemo(()=>[b1.container,h],[h]),b=x.useRef(null),y=x.useRef(null),g=x.useRef(null),k=x.useRef(!1),v=x.useRef(!1),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),j=x.useCallback(()=>{!a||c===!1||(w(),b.current=setTimeout(()=>{p.show()},s))},[a,c,w,p,s]),S=x.useCallback(()=>{c!==!0&&(w(),y.current=setTimeout(()=>{k.current||p.hide()},r))},[c,w,p,r]),C=x.useCallback(()=>{j()},[j]),E=x.useCallback(()=>{S()},[S]),T=x.useCallback(()=>{if(a){if(v.current){v.current=!1;return}w(),p.show()}},[a,w,p]),$=x.useCallback(R=>{const z=R.relatedTarget,_=document.getElementById(p.id);_!=null&&_.contains(z)||S()},[p.id,S]),N=x.useCallback(R=>{R.key==="Escape"&&(R.stopPropagation(),w(),p.hide())},[w,p]),A=x.useCallback(R=>{g.current&&(g.current.removeEventListener("mouseenter",C),g.current.removeEventListener("mouseleave",E),g.current.removeEventListener("focusin",T),g.current.removeEventListener("focusout",$),g.current.removeEventListener("keydown",N)),R&&(R.addEventListener("mouseenter",C),R.addEventListener("mouseleave",E),(i==="always"||i==="auto"&&eM(R))&&(R.addEventListener("focusin",T),R.addEventListener("focusout",$)),R.addEventListener("keydown",N)),g.current=R},[i,C,E,T,$,N]),M=x.useCallback(R=>{p.ref(R),A(R)},[p,A]);x.useEffect(()=>()=>{w()},[w]),x.useEffect(()=>{u&&p.show()},[]),x.useEffect(()=>{c!==void 0&&(c?(w(),p.show()):(w(),p.hide()))},[c,w,p]);const I=x.useCallback((R,z)=>{const _=(z==null?void 0:z.placement)??t,O=U("hovercard").className,D={placement:_,alignment:(z==null?void 0:z.alignment)??n,role:l?"dialog":"group","aria-label":l||void 0,xstyle:[m,ir[_],z==null?void 0:z.xstyle],className:z!=null&&z.className?`${O} ${z.className}`:O,style:z==null?void 0:z.style,as:"span"};return p.render(o.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{k.current=!0,w()},onMouseLeave:()=>{k.current=!1,S()},onKeyDown:L=>{var B;L.key==="Escape"&&(L.stopPropagation(),v.current=!0,w(),p.hide(),(B=g.current)==null||B.focus())},onBlur:L=>{var X;const B=L.relatedTarget;L.currentTarget.contains(B)||(X=g.current)!=null&&X.contains(B)||S()},children:R}),D)},[p,t,n,l,w,S,m]);return{ref:M,positionRef:p.ref,interactionRef:A,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:I,show:p.show,hide:p.hide}}function nM(e){return typeof e=="string"||typeof e=="number"}function sM(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function w4({children:e,content:t,placement:n="above",alignment:s="center",delay:r=300,hideDelay:i=200,focusTrigger:a="auto",isEnabled:l=!0,label:c,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h,xstyle:p,className:m,style:b}){const y=x.useRef(null),g=nM(e),k=d===!0||d==="auto"&&g,v=x.useCallback(()=>{u==null||u(!0)},[u]),w=x.useCallback(()=>{u==null||u(!1)},[u]),j=tM({placement:n,alignment:s,delay:r,hideDelay:i,focusTrigger:a,isEnabled:l,label:c,isOpen:f,isDefaultOpen:h,onShow:v,onHide:w});ar(()=>{if(g)return;const C=y.current;if(!C)return;const E=C.firstElementChild;if(!E)return;j.ref(E);const T=E.getAttribute("aria-describedby");return E.setAttribute("aria-describedby",sM(T,j.describedBy)??""),()=>{j.ref(null),T?E.setAttribute("aria-describedby",T):E.removeAttribute("aria-describedby")}},[g,j.ref,j.describedBy]);const S=j.renderHoverCard(t,{xstyle:p,className:m,style:b});return g?o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:j.ref,tabIndex:0,"aria-describedby":j.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 x11b3rvo"}}[!!k<<0],children:e}),S]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:y,className:"xjp7ctv",children:e}),S]})}w4.displayName="HoverCard";const Kb=new Map,rM=/\b(const|let|var|function|class|if|else|for|while|return|import|export|from|default|async|await|try|catch|throw|new|typeof|instanceof|interface|type|enum|extends|implements|switch|case|break|continue|do|in|of|void|null|undefined|true|false|this|super|yield|delete|static|public|private|protected|readonly|abstract|as|is|keyof|declare|module|namespace|require)\b/,iM=/\b(def|class|if|elif|else|for|while|return|import|from|as|with|try|except|raise|True|False|None|and|or|not|in|is|lambda|yield|async|await|pass|break|continue|del|global|nonlocal|assert|finally|print|self|cls)\b/,aM=/\b(if|then|else|elif|fi|for|do|done|while|until|case|esac|function|in|select|return|exit|local|export|source|alias|unalias|readonly|shift|eval|exec|set|unset|trap|wait|read|echo|printf|test|true|false)\b/,oM=/\b(important|inherit|initial|unset|revert|auto|none)\b/,lM=/\b(function|class|if|else|elseif|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|require_once|include|include_once|extends|implements|interface|abstract|final|const|var|true|false|null|array|isset|unset|empty|list|match|enum|switch|case|break|continue|do|yield|fn)\b/,cM=/\b(function|class|if|else|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|include|extends|implements|interface|abstract|final|const|shape|vec|dict|keyset|async|await|concurrent|enum|type|newtype|tuple|inout)\b/;function j4(e){const t=Kb.get(e);if(t!==void 0)return t;const n=uM(e);return Kb.set(e,n),n}function uM(e){const t=dM(e);return t?{defaultType:t.defaultType,patterns:t.patterns.map(n=>{const s=n.regex.flags.replace(/[gy]/g,"")+"y";return{...n,anchored:new RegExp(n.regex.source,s)}})}:null}function dM(e){switch(e){case"typescript":case"javascript":case"tsx":case"jsx":case"ts":case"js":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/`(?:[^`\\]|\\.)*`/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:rM},{type:"function",regex:/\b[a-zA-Z_$][\w$]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_$][\w$]*\b/}]};case"json":return{defaultType:"punctuation",patterns:[{type:"property",regex:/"(?:[^"\\]|\\.)*"(?=\s*:)/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"number",regex:/-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"constant",regex:/\b(true|false|null)\b/},{type:"punctuation",regex:/[{}()\[\]:,]/}]};case"html":case"xml":case"svg":return{defaultType:"variable",patterns:[{type:"comment",regex:/<!--[\s\S]*?-->/},{type:"keyword",regex:/<!DOCTYPE[^>]*>/i},{type:"tag",regex:/<\/[a-zA-Z][\w-]*\s*>/},{type:"tag",regex:/<[a-zA-Z][\w-]*/},{type:"tag",regex:/\/?>/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"attribute",regex:/\b[a-zA-Z_:][\w:.-]*(?=\s*=)/},{type:"operator",regex:/=/}]};case"css":case"scss":case"less":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/--[a-zA-Z_-][\w-]*/},{type:"number",regex:/-?\b\d+\.?\d*(?:px|em|rem|%|vh|vw|vmin|vmax|ch|ex|deg|rad|turn|s|ms|fr)?\b/},{type:"constant",regex:/#[0-9a-fA-F]{3,8}\b/},{type:"keyword",regex:oM},{type:"keyword",regex:/@[a-zA-Z][\w-]*/},{type:"tag",regex:/[.#][a-zA-Z_-][\w-]*/},{type:"keyword",regex:/::?[a-zA-Z][\w-]*/},{type:"function",regex:/\b[a-zA-Z_-][\w-]*(?=\s*\()/},{type:"property",regex:/[a-zA-Z_-][\w-]*(?=\s*:)/},{type:"punctuation",regex:/[{}()\[\];:,]/},{type:"operator",regex:/[+~>*=|^$]/}]};case"python":case"py":return{defaultType:"variable",patterns:[{type:"string",regex:/"""[\s\S]*?"""/},{type:"string",regex:/'''[\s\S]*?'''/},{type:"string",regex:/f"(?:[^"\\]|\\.)*"/},{type:"string",regex:/f'(?:[^'\\]|\\.)*'/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w.]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?j?\b/},{type:"keyword",regex:iM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~@:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"bash":case"sh":case"zsh":case"shell":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'[^']*'/},{type:"variable",regex:/\$\{[^}]+\}/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"variable",regex:/\$[0-9@#?*!$-]/},{type:"number",regex:/\b\d+\b/},{type:"keyword",regex:aM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"operator",regex:/[|&<>;!]+/},{type:"punctuation",regex:/[{}()\[\]]/}]};case"php":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:lM},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/@[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"hack":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:cM},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"property",regex:new RegExp("(?<=->|::)\\b[a-zA-Z_][\\w]*\\b")},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/<<[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"yaml":case"yml":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/\b(true|false|yes|no|on|off|null|~)\b/i},{type:"variable",regex:/[&*][\w]+/},{type:"type",regex:/!!\w+/},{type:"number",regex:/\b-?\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"property",regex:/^[ \t]*[\w][\w ./-]*(?=\s*:)/m},{type:"keyword",regex:/---/},{type:"keyword",regex:/\.\.\./},{type:"operator",regex:/[:|>\-?]/},{type:"punctuation",regex:/[{}()\[\],]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"markdown":case"md":return{defaultType:"variable",patterns:[{type:"keyword",regex:/^```[\w]*$/m},{type:"keyword",regex:/^#{1,6}\s+.*/m},{type:"keyword",regex:/^---$/m},{type:"keyword",regex:/^\*\*\*$/m},{type:"string",regex:/\*\*(?:[^*]|\*(?!\*))+\*\*/},{type:"string",regex:/\*(?:[^*])+\*/},{type:"constant",regex:/`[^`]+`/},{type:"function",regex:/\[(?:[^\]])+\]\([^)]+\)/},{type:"comment",regex:/^>\s+.*/m},{type:"operator",regex:/^\s*[-*+]\s/m},{type:"number",regex:/^\s*\d+\.\s/m}]};default:return null}}const Xb=2e3,fM=800;async function hM(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function S4(e,t,n,s){const r=[];let i=n;const a=Math.min(s,e.length);for(;i<a;){let l=!1;for(const c of t.patterns){c.anchored.lastIndex=i;const u=c.anchored.exec(e);if(u&&u.index===i&&u[0].length>0){c.type!==t.defaultType&&r.push({type:c.type,start:i-n,end:i-n+u[0].length}),i+=u[0].length,l=!0;break}}l||i++}return r}function xM(e,t){const n=j4(t);if(!n)return[];const s=[];let r=0;for(let i=0;i<=e.length;i++)(i===e.length||e[i]===`
|
|
86
|
-
`)&&(s.push(S4(e,n,r,i)),r=i+1);return s}async function pM(e,t,n){const s=j4(t);if(!s)return[];const r=[];let i=0,a=0;for(let l=0;l<=e.length;l++)if((l===e.length||e[l]===`
|
|
87
|
-
`)&&(r.push(S4(e,s,i,l)),a+=l-i+1,i=l+1,a>=fM&&l<e.length)){if(n!=null&&n.aborted)return r;a=0,await hM()}return r}function gM(e,t){const n=[0];for(let i=0;i<t.length;i++)t[i]===`
|
|
88
|
-
`&&n.push(i+1);const s=Array.from({length:n.length},()=>[]);let r=0;for(const i of e){for(;r<n.length-1&&i.start>=n[r+1];)r++;const a=n[r];s[r].push({type:i.type,start:i.start-a,end:i.end-a})}return s}const mM=`:root {
|
|
89
|
-
${Object.entries(k0).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
}`,yM=`
|
|
92
|
-
${mM}
|
|
93
|
-
|
|
94
|
-
.astryx-codeblock code::highlight(astryx-keyword),
|
|
95
|
-
.astryx-codeeditor code::highlight(astryx-keyword) { color: var(--color-syntax-keyword); }
|
|
96
|
-
.astryx-codeblock code::highlight(astryx-string),
|
|
97
|
-
.astryx-codeeditor code::highlight(astryx-string) { color: var(--color-syntax-string); }
|
|
98
|
-
.astryx-codeblock code::highlight(astryx-comment),
|
|
99
|
-
.astryx-codeeditor code::highlight(astryx-comment) { color: var(--color-syntax-comment); }
|
|
100
|
-
.astryx-codeblock code::highlight(astryx-number),
|
|
101
|
-
.astryx-codeeditor code::highlight(astryx-number) { color: var(--color-syntax-number); }
|
|
102
|
-
.astryx-codeblock code::highlight(astryx-function),
|
|
103
|
-
.astryx-codeeditor code::highlight(astryx-function) { color: var(--color-syntax-function); }
|
|
104
|
-
.astryx-codeblock code::highlight(astryx-type),
|
|
105
|
-
.astryx-codeeditor code::highlight(astryx-type) { color: var(--color-syntax-type); }
|
|
106
|
-
.astryx-codeblock code::highlight(astryx-tag),
|
|
107
|
-
.astryx-codeeditor code::highlight(astryx-tag) { color: var(--color-syntax-tag); }
|
|
108
|
-
.astryx-codeblock code::highlight(astryx-attribute),
|
|
109
|
-
.astryx-codeeditor code::highlight(astryx-attribute) { color: var(--color-syntax-attribute); }
|
|
110
|
-
.astryx-codeblock code::highlight(astryx-property),
|
|
111
|
-
.astryx-codeeditor code::highlight(astryx-property) { color: var(--color-syntax-property); }
|
|
112
|
-
.astryx-codeblock code::highlight(astryx-operator),
|
|
113
|
-
.astryx-codeeditor code::highlight(astryx-operator) { color: var(--color-syntax-operator); }
|
|
114
|
-
.astryx-codeblock code::highlight(astryx-constant),
|
|
115
|
-
.astryx-codeeditor code::highlight(astryx-constant) { color: var(--color-syntax-constant); }
|
|
116
|
-
.astryx-codeblock code::highlight(astryx-punctuation),
|
|
117
|
-
.astryx-codeeditor code::highlight(astryx-punctuation) { color: var(--color-syntax-punctuation); }
|
|
118
|
-
.astryx-codeblock code::highlight(astryx-variable),
|
|
119
|
-
.astryx-codeeditor code::highlight(astryx-variable) { color: var(--color-syntax-variable); }
|
|
120
|
-
|
|
121
|
-
/* Span-based fallback classes — used when highlightMode='spans' or
|
|
122
|
-
when the CSS Custom Highlight API is not available. */
|
|
123
|
-
.astryx-token-keyword { color: var(--color-syntax-keyword); }
|
|
124
|
-
.astryx-token-string { color: var(--color-syntax-string); }
|
|
125
|
-
.astryx-token-comment { color: var(--color-syntax-comment); }
|
|
126
|
-
.astryx-token-number { color: var(--color-syntax-number); }
|
|
127
|
-
.astryx-token-function { color: var(--color-syntax-function); }
|
|
128
|
-
.astryx-token-type { color: var(--color-syntax-type); }
|
|
129
|
-
.astryx-token-tag { color: var(--color-syntax-tag); }
|
|
130
|
-
.astryx-token-attribute { color: var(--color-syntax-attribute); }
|
|
131
|
-
.astryx-token-property { color: var(--color-syntax-property); }
|
|
132
|
-
.astryx-token-operator { color: var(--color-syntax-operator); }
|
|
133
|
-
.astryx-token-constant { color: var(--color-syntax-constant); }
|
|
134
|
-
.astryx-token-punctuation { color: var(--color-syntax-punctuation); }
|
|
135
|
-
.astryx-token-variable { color: var(--color-syntax-variable); }
|
|
136
|
-
`;let Zb=!1;function fx(){if(Zb||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=yM,document.head.appendChild(e),Zb=!0}const kM=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],Yb=new Set(kM);let hd=null;function bM(e){if(Yb.has(e)||(Yb.add(e),fx(),typeof document>"u"))return;if(!hd){const s=document.createElement("style");if(s.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(s),hd=s.sheet??null,!hd)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;hd.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function vM(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;bM(t);const s=`astryx-${t}`;return n=CSS.highlights.get(s),n||(n=new Highlight,CSS.highlights.set(s,n)),e.set(t,n),n}}function $4(e,t,n,s){if(t.length===0)return;const r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE)return;const i=r.length;for(const a of t){if(a.start>=i||a.end<=0)continue;const l=Math.min(a.start,i),c=Math.min(a.end,i),u=s(a.type);try{const d=new Range;d.setStart(r,l),d.setEnd(r,c),u.add(d),n.push({range:d,highlight:u})}catch{}}}function v1(e){for(const{range:t,highlight:n}of e)n.delete(t)}function wM(e,t,n,s){const r=[],i=e.querySelectorAll("[data-line]");for(let a=0;a<i.length;a++){const l=n+a,c=t[l];c&&c.length>0&&$4(i[a],c,r,s)}return r}function jM(e,t){fx();const n=vM(),s=[],r=[];let i=0;for(let d=0;d<e.children.length;d++){const f=e.children[d],h=f.querySelectorAll("[data-line]");h.length>0&&f.tagName==="DIV"&&!f.hasAttribute("data-line")&&(s.push(f),r.push(i),i+=h.length)}if(s.length===0){const d=[],f=e.querySelectorAll("[data-line]");for(let h=0;h<f.length;h++){const p=t[h];p&&p.length>0&&$4(f[h],p,d,n)}return()=>v1(d)}const a=new Map,l=new Map;function c(d,f){if(a.has(d))return;const h=wM(d,t,r[f],n);a.set(d,h)}function u(d){const f=a.get(d);f&&(v1(f),a.delete(d))}for(let d=0;d<s.length;d++){const f=s[d],h=m=>{m.skipped?u(f):c(f,d)};f.addEventListener("contentvisibilityautostatechange",h),l.set(f,h);const p=f;typeof p.checkVisibility=="function"?p.checkVisibility({checkVisibilityCSS:!0,contentVisibilityAuto:!0})&&c(f,d):d<5&&c(f,d)}return function(){for(const[f,h]of l)f.removeEventListener("contentvisibilityautostatechange",h);l.clear();for(const f of a.values())v1(f);a.clear()}}const SM={card:{kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",$$css:!0},section:{kaIpWk:"x2u8bby",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVAM5u:"x9r1u3d","--color-syntax-background":"x1mtvhk1",$$css:!0}},$M={"--_codeblock-gutter-width":"xtk08jq",$$css:!0},O0={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,k7Eaqz:(e==="fit-content"?"min(100%, 400px)":null)!=null?"xkj4a21":e==="fit-content"?"min(100%, 400px)":null,ks0D6T:(e==="fit-content"?"100%":null)!=null?"xf68679":e==="fit-content"?"100%":null,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"min(100%, 400px)":null),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"100%":null)}],gutterWidth:e=>[$M,{"--x---_codeblock-gutter-width":`${e}ch`!=null?`${e}ch`:void 0}]},Tr={root:{kVAEAm:"x1n2onr6",kHBbk8:"xc8icb0",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kogj98:"x1ghz6dp",kWkggS:"xzyc27v",kVQacm:"xb3r6kr",$$css:!0},code:{k1xSpc:"x1lliihq",kUk6DE:"x98rzlu",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kogj98:"x1ghz6dp",kMv6JI:"x9m5x89",kMwMTN:"xdfisg",kKi2Bq:"xeq4nuv",khDVqt:"x1sdyfia",kTgw9:"x1lldw8n",kHjlTd:"x1h4wwuj",$$css:!0},codeWrapped:{khDVqt:"x126k92a",kTgw9:"x1yn0g08",kHjlTd:"x1mzt3pk",$$css:!0},codeNumbered:{kVAEAm:"x1n2onr6",k5JduY:"x1s928wv",kwXMNM:"x1j6awrg",kSy8m5:"xd54j2p",kc1e00:"x1km86hw",kkgrvl:"xkj6t0a",kQlJh0:"x1p96cux",k6vLHU:"xvsnedh",kkQ525:"xnnzo76",kloYau:"x2q1x1w",$$css:!0},sizeSm:{kGuDYH:"x141an7d",$$css:!0},sizeMd:{kGuDYH:"xp03k98",$$css:!0}},CM=20,EM=100,Qb=x.memo(function({lines:t,startIndex:n,highlightSet:s,renderLineContent:r,lineNumbers:i}){return o.jsx(o.Fragment,{children:t.map((a,l)=>{const c=n+l;return o.jsx("div",{"data-line":c+1,...{0:{className:"x17iicif"},2:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f"},1:{className:"x17iicif xgcxg3y x1ng9b9t x1pzlopt"},3:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f xgcxg3y x1ng9b9t x1pzlopt"}}[!!i<<1|!!((s==null?void 0:s.has(c+1))??!1)<<0],children:r(a,c)},c)})})});function C4(e,t,n,s,r=CM){if(r=Math.max(1,Math.floor(r)),e.length<EM)return o.jsx(Qb,{lines:e,startIndex:0,highlightSet:t,renderLineContent:n,lineNumbers:s});const i=[];for(let a=0;a<e.length;a+=r){const l=Math.min(a+r,e.length),c=e.slice(a,l),u=`${c.length}lh`;i.push(o.jsx("div",{...F({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${u}`}}),children:o.jsx(Qb,{lines:c,startIndex:a,highlightSet:t,renderLineContent:n,lineNumbers:s})},a))}return i}function E4(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function TM(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function zM(e,t,n){const[s,r]=x.useState(null),i=x.useMemo(()=>n?gM(n(e,t),e):e.length>=Xb?null:xM(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<Xb||n)return;const a=new AbortController;async function l(){try{const c=await pM(e,t,a.signal);a.signal.aborted||r({code:e,language:t,tokens:c})}catch{a.signal.aborted||r({code:e,language:t,tokens:[]})}}return l(),()=>{a.abort()}},[e,t,n]),i??((s==null?void 0:s.code)===e&&s.language===t?s.tokens:[])}function AM(e,t){if(t.length===0)return e||"";const n=[];let s=0;for(const r of t){r.start>s&&n.push(e.slice(s,r.start));const i=Math.min(r.end,e.length);n.push(o.jsx("span",{className:`astryx-token-${r.type} xds-token-${r.type}`,children:e.slice(r.start,i)},`${r.start}-${r.type}`)),s=i}return s<e.length&&n.push(e.slice(s)),n.length>0?n:""}function NM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){x.useInsertionEffect(()=>{fx()},[]);const l=x.useCallback((c,u)=>{const d=t[u]??[];return o.jsx("span",{className:"xeuugli",children:AM(c,d)})},[t]);return o.jsx("code",{...q(Tr.code,r,s&&Tr.codeWrapped,i&&Tr.codeNumbered,i&&O0.gutterWidth(a)),children:C4(e,n,l,i)})}function MM({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:a}){const l=x.useRef(null);x.useEffect(()=>{if(!E4())return;fx();const u=l.current;if(!(!u||t.length===0))return jM(u,t)},[t]);const c=x.useCallback(u=>u||"",[]);return o.jsx("code",{ref:l,...q(Tr.code,r,s&&Tr.codeWrapped,i&&Tr.codeNumbered,i&&O0.gutterWidth(a)),children:C4(e,n,c,i)})}function D0({code:e,language:t="plaintext",title:n,hasLanguageLabel:s=!0,hasLineNumbers:r=!1,highlightLines:i,hasCopyButton:a=!0,onCopy:l,isWrapped:c=!1,maxHeight:u,isCollapsible:d=!1,collapsibleThreshold:f=10,size:h="md",width:p="fit-content",container:m="card",tokenizer:b,highlightMode:y="auto",syntaxTheme:g,xstyle:k,className:v,style:w,ref:j,...S}){const C=be(),[E,T]=x.useState(!1),$=x.useRef(null),N=Ll();x.useEffect(()=>()=>{$.current!=null&&clearTimeout($.current)},[]);const A=y==="spans"||y==="auto"&&!E4()||y==="auto"&&TM(),M=x.useMemo(()=>{const ge=e.split(`
|
|
137
|
-
`);return ge.length>1&&ge[ge.length-1]===""&&ge.pop(),ge},[e]),I=zM(e,t,b),R=x.useMemo(()=>i?new Set(i):null,[i]),z=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),T(!0),N(C("@astryx.codeBlock.copied")),l==null||l(),$.current!=null&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,T(!1)},2e3)}catch{}},[e,l,N,C]),_=h==="sm"?Tr.sizeSm:Tr.sizeMd,O=String(M.length).length,D=s&&t!=="plaintext"?t:null,L=n!=null||D!=null,B=d&&M.length>=f,[P,X]=x.useState(!1),Y=x.useId(),Z=x.useRef(null),ne=u?{maxHeight:typeof u=="number"?`${u}px`:u}:void 0,J=o.jsx(Ce,{icon:E?"check":"copy",size:"sm",color:"inherit"}),K=a?o.jsx("button",{type:"button",onClick:ge=>{ge.stopPropagation(),z()},"aria-label":C(E?"@astryx.codeBlock.copied":"@astryx.codeBlock.copyCode"),...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556 x10l6tqk xctzyg x72tfeb"}}[!L<<0],children:J}):null,ie=L?o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1"},1:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1 x92x3c3 x1q0q8m5 xw8gpjh"}}[!!r<<0],children:[o.jsx("div",{role:B?"button":void 0,tabIndex:B?0:void 0,"aria-expanded":B?!P:void 0,"aria-controls":B?Y:void 0,onClick:B?()=>X(ge=>!ge):void 0,onKeyDown:B?ge=>{(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),X(xe=>!xe))}:void 0,...{0:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h"},1:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h x1ypdohk x87ps6o x17nn4n9 x1wfwxd8 x7s97pk"}}[!!B<<0],children:o.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[B&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92 x1iffjtl"}}[!P<<0],children:o.jsx(Ce,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&D?" — ":"",D]})}),K]}):null,le=o.jsx("div",{ref:Z,tabIndex:0,role:"group","aria-label":D??C("@astryx.codeBlock.code"),...F({className:"xw2csxc x1odjw0f"},{style:ne}),children:o.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(L&&!r)<<0],children:A?o.jsx(NM,{lines:M,tokenLines:I,highlightSet:R,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:O}):o.jsx(MM,{lines:M,tokenLines:I,highlightSet:R,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:O})})}),ve=o.jsxs("pre",{ref:j,...F(U("codeblock",{size:h,language:t,container:m}),q(Tr.root,O0.width(p),SM[m],k),v,w),...S,children:[ie,B?o.jsx("div",{id:Y,inert:P?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!P<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:le})}):le,!L&&K]});return g?o.jsx(b4,{theme:g,children:ve}):ve}D0.displayName="CodeBlock";const RM={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},IM={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},_M={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function L0({children:e,color:t="primary",size:n,xstyle:s,className:r,style:i,ref:a,...l}){return o.jsx("code",{ref:a,...l,...F(U("code",{color:t}),q(RM.base,IM[t],n&&_M[n],s),r,i),children:e})}L0.displayName="Code";const B0=x.createContext(null);B0.displayName="DialogContext";function OM(){return x.use(B0)}function DM(e,t=16){const n=e.getBoundingClientRect(),s=n.left+n.width/2-window.innerWidth/2,r=n.top+n.height/2-window.innerHeight/2,i=Math.sqrt(s*s+r*r)||1;return{x:Math.round(s/i*t),y:Math.round(r/i*t)}}const Hi={dialog:{kVAEAm:"xixxii4",kogj98:"x1bpp3o7",kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x1s85apg",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",kSiTet:"xg01cxk",k44tkh:"xqgcaz",kyAemX:"x128ha8g",kWV6AL:"xskzprw",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},open:{k1xSpc:"x78zum5",kSiTet:"x1hc1fzr",kKVMdj:"x1ewfqum x1aquc0h",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},fullscreen:{kzqmXN:"x1o6l61p",kZKoxP:"xtdtrs8",ks0D6T:"xlbgzzq",kskxy:"x1wj9ous",kaIpWk:"x2u8bby",kogj98:"x1ghz6dp",kpwlN0:"x10a8y8t",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x12lumcd",kAzted:"x2lwn1j",kVQacm:"xb3r6kr",kaIpWk:"x1pjcqnp",$$css:!0},inlineWrapper:{kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",$$css:!0}},LM={ks0D6T:"x95b5qq",$$css:!0},BM={kogj98:"x1ghz6dp",$$css:!0},w1={sizing:(e,t)=>[LM,{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kskxy:(typeof t=="number"?`${t}px`:t)!=null?"x1jols5v":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-maxHeight":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}],position:(e,t,n,s)=>[BM,{k87sOh:e!=null?"xjbys53":e,kLqNvP:t!=null?"x1lxsm33":t,kt4wiu:n!=null?"xqxgn94":n,krVfgx:s!=null?"x1nqzi6q":s,$$css:!0},{"--x-top":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-insetInlineStart":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-insetInlineEnd":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-bottom":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function xd(e){return typeof e=="number"?`${e}px`:e}function qM(e){const{top:t,bottom:n,start:s,end:r}=e;return{top:t!==void 0?xd(t):"auto",bottom:n!==void 0?xd(n):"auto",insetInlineStart:s!==void 0?xd(s):"auto",insetInlineEnd:r!==void 0?xd(r):"auto"}}function js({isOpen:e,isInline:t=!1,onOpenChange:n,width:s=400,maxHeight:r="75vh",position:i,variant:a="standard",purpose:l="info",padding:c,children:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=c==null,y=c??4,g=n3[y],k=a==="fullscreen",v=x.useId(),w=x.useMemo(()=>({isInline:t,titleId:v}),[t,v]),j=m["aria-label"]!=null||m["aria-labelledby"]!=null,S=x.useRef(null),C=x.useCallback(O=>{if(S.current=O,!O||j)return;O.querySelector(`#${CSS.escape(v)}`)!=null?O.setAttribute("aria-labelledby",v):O.removeAttribute("aria-labelledby")},[v,j]),E=x.useRef(null),T=l!=="required",$=l==="info";x.useEffect(()=>{var D;if(t)return;const O=S.current;if(O)if(e){E.current=document.activeElement;const L=E.current;if(L&&L!==document.body){const B=DM(L);O.style.setProperty("--dialog-dir-x",`${B.x}px`),O.style.setProperty("--dialog-dir-y",`${B.y}px`)}else O.style.setProperty("--dialog-dir-x","0px"),O.style.setProperty("--dialog-dir-y","16px");if(!O.open){O.showModal();const B=O.querySelector("[data-autofocus]");B&&B.focus()}}else O.open&&O.close(),(D=E.current)==null||D.focus(),E.current=null},[e,t]),l4(e&&!t),x.useEffect(()=>{if(t)return;const O=S.current;if(!O||!e)return;const D=L=>{if(L.key==="Escape"){if(Q3(L)||Rb())return;L.preventDefault(),T&&n(!1)}};return O.addEventListener("keydown",D),()=>O.removeEventListener("keydown",D)},[e,t,T,n]);const N=x.useRef(!1);x.useEffect(()=>{var D;const O=((D=S.current)==null?void 0:D.querySelector(`#${CSS.escape(v)}`))!=null;e&&!t&&!j&&!O&&!N.current&&(N.current=!0,ga())},[e,t,j,v]);const A=O=>{O.target===O.currentTarget&&$&&n(!1)},M=O=>{O.preventDefault(),!Rb()&&T&&n(!1)},I=o.jsx("div",{...q(Hi.inner,...p4(b?{useThemeDefault:"dialog",maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}:{paddingInnerX:g,paddingInnerY:g,paddingOuterX:g,paddingOuterY:g,maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}),!b&&y!==4&&Al[y],!b&&y!==4&&Nl[y],!b&&y!==4&&Ml[y],!b&&y!==4&&Rl[y]),children:o.jsx(B0,{value:w,children:u})}),R=i!=null&&!k,{open:z,..._}=m;return t?e?o.jsx("div",{..._,...F(U("dialog",{variant:a}),q(Hi.inlineWrapper,!k&&w1.sizing(s,r),k&&Hi.fullscreen,d),f,h),"data-testid":m["data-testid"],children:I}):null:o.jsx("dialog",{ref:it(p,C),..._,...F(U("dialog",{variant:a}),q(Hi.dialog,e&&Hi.open,Hi.backdrop,!k&&w1.sizing(s,r),R&&(()=>{const O=qM(i);return w1.position(O.top,O.insetInlineStart,O.insetInlineEnd,O.bottom)})(),k&&Hi.fullscreen,d),f,h),onClick:A,onCancel:M,"aria-modal":"true",...l==="required"?{role:"alertdialog"}:void 0,children:I})}js.displayName="Dialog";const HM=x.lazy(async()=>m3(()=>Promise.resolve().then(()=>r4),void 0).then(e=>({default:e.Tooltip}))),PM={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function Br({level:e,type:t,accessibilityLevel:n,color:s="primary",display:r="block",maxLines:i=0,hasTruncateTooltip:a=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,xstyle:h,className:p,style:m,children:b,ref:y,...g}){const k=PM[e],v=n&&n!==e?{"aria-level":n}:{},w=l??(i===1?"break-all":"break-word"),j=i>0||d?"block":r,S=C3({maxLines:i}),C=typeof a=="string"?a:"above",E=i>0&&a!==!1&&S.isTruncated,T=x.useRef(null),$=i>1?{WebkitLineClamp:i}:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(k,{ref:it(y,S.ref,T),...F(U("heading",{level:e,color:s,...t&&{type:t}}),q(v0[E3(s)],t?w0[t]:IT[e],t&&y3[t],i===1?Uf.singleLine:i>1?Uf.multiLine:k3[j],i>0&&b3[w],c&&v3[c],u!=="start"&&S3[u],d&&w3.enabled,f&&j3.strikethrough,h),p,{...m,...$}),title:E?S.fullText:void 0,...v,...g,children:b}),E&&o.jsx(x.Suspense,{fallback:null,children:o.jsx(HM,{anchorRef:T,content:o.jsx("span",{...q($3.content),children:S.fullText}),placement:C})})]})}Br.displayName="Heading";const UM={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function Ss({title:e,subtitle:t,onOpenChange:n,startContent:s,endContent:r,hasDivider:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=be(),h=x.useRef(null),p=OM(),m=(p==null?void 0:p.isInline)!==!0,b=p==null?void 0:p.titleId;return x.useEffect(()=>{m&&h.current&&h.current.focus()},[m]),o.jsx(Hf,{ref:u,hasDivider:i,xstyle:a,className:l,style:c,...d,children:o.jsxs("div",{className:"x78zum5 x1cy8zhl x1qughib xjcht0a",children:[s&&o.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s",children:s}),o.jsxs("div",{className:"x98rzlu xeuugli xqixskq",children:[o.jsx(Br,{ref:h,id:b,level:2,tabIndex:-1,xstyle:UM.titleFocusable,children:e}),t&&o.jsx(ee,{type:"body",size:"sm",color:"secondary",children:t})]}),(r||n)&&o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s"},1:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"}}[!!n<<0],children:[r,n&&o.jsx(re,{variant:"ghost",label:f("@astryx.dialog.close"),tooltip:f("@astryx.dialog.close"),icon:o.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}Ss.displayName="DialogHeader";const FM={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function q0({direction:e="vertical",hAlign:t,vAlign:n,justify:s,align:r,gap:i,padding:a,paddingInline:l,paddingBlock:c,isScrollable:u,width:d,height:f,maxWidth:h,minHeight:p,wrap:m,as:b="div",xstyle:y,className:g,style:k,children:v,ref:w,...j}){const S=t??(e==="horizontal"?s:r),C=n??(e==="horizontal"?r:s),E=e==="horizontal"?S:C,T=e==="horizontal"?C:S,$=l??a,N=c??a,A=q(...Lp({direction:e,crossAlign:T,mainAlign:E,gap:i,wrap:m}),$!=null&&UE[$],N!=null&&FE[N],u&&FM.scrollable,y),M={...d!=null&&{width:typeof d=="number"?`${d}px`:d},...f!=null&&{height:typeof f=="number"?`${f}px`:f},...h!=null&&{maxWidth:typeof h=="number"?`${h}px`:h},...p!=null&&{minHeight:typeof p=="number"?`${p}px`:p}};return x.createElement(b,{ref:w,...F(U("stack",{direction:e,gap:i,wrap:m}),A,g,{...k,...M}),...j},v)}q0.displayName="Stack";function we({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return o.jsx(q0,{...i,direction:"horizontal",hAlign:s??t,vAlign:r??n,ref:e})}we.displayName="HStack";function fe({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return o.jsx(q0,{...i,direction:"vertical",hAlign:s??n,vAlign:r??t,ref:e})}fe.displayName="VStack";const pd={footer:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"xqty4a",kGO01o:"xon7vh3","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"x1xjq73n",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},GM={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Va({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:a,className:l,style:c,ref:u,...d}){const f=x.use(Zh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return o.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":h||void 0,...F(U("layout-footer"),q(pd.footer,GM.sizing(n??null),h&&pd.divider,a),l,c),...d,children:o.jsx("div",{...q(pd.inner,p&&pd.fullBleed,r!=null&&Al[r],r!=null&&Nl[r],r!=null&&Ml[r],r!=null&&Rl[r]),children:e})})}Va.displayName="LayoutFooter";const T4=x.createContext({direction:"vertical"});T4.displayName="FormLayoutContext";const j1={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},VM={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Bl({label:e,isLabelHidden:t=!1,description:n,inputID:s,labelID:r,isGroupLabel:i=!1,descriptionID:a,isOptional:l=!1,isRequired:c=!1,isDisabled:u=!1,labelIcon:d,status:f,labelTooltip:h,statusVariant:p="attached",width:m,xstyle:b,children:y,className:g,style:k,ref:v,...w}){const{direction:j}=x.use(T4),S=j==="horizontal-labels",C=a??(n?`${s}-desc`:void 0),E=(f==null?void 0:f.messageID)??(f!=null&&f.message?`${s}-status`:void 0);_l("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",l&&c);const T=o.jsx(ox,{label:e,inputID:s,labelID:r,isGroupLabel:i,isLabelHidden:t,isDisabled:u,isOptional:l,isRequired:c,labelIcon:d,labelTooltip:h,description:S?void 0:n,descriptionID:S?void 0:C}),$=f!=null&&f.message&&p!=="tooltip"?o.jsx(lx,{type:f.type,message:f.message,id:E,variant:p}):null;return S?o.jsxs("div",{ref:v,...F(U("field",{layout:"horizontal-labels"}),q(j1.horizontalLabels,b),g,k),...w,children:[o.jsx("div",{className:"x1enrzb7",children:T}),o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&o.jsx(ee,{type:"supporting",display:"block",id:C,children:n}),y,$]})]}):o.jsxs("div",{ref:v,...F(U("field"),q(j1.container,!t&&j1.containerGap,m!=null&&VM.width(m),b),g,k),...w,children:[T,p==="attached"?o.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[y,$]}):o.jsxs(o.Fragment,{children:[y,$]})]})}Bl.displayName="Field";const fl={base:{kB7OPa:"x9f619",kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz","--_field-radius":"x1832zxr",kaIpWk:"xvdfih8",kWkggS:"x10xzikg",k1ekBW:"x12zzom9",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kVAM5u:"xvy26l8",kGVxlE:"x1gnnqk1",$$css:!0}},H0={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},P0={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},z4={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},A4={inGroup:{kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",kZKoxP:"x5yr21d",keTefX:"xd10s4z x1pwwqoy",krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g x11xp8u1 xpufgd0 x1ir7nn6",kT0f0o:"x16uus16 x747jw7 xxd14kb x1vej5at",kXnDq0:"x1rm9qnc",$$css:!0}},N4=x.createContext(null);N4.displayName="InputGroupContext";function M4(){return x.use(N4)}const WM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function gs({type:e="text",label:t,isLabelHidden:n=!1,description:s,isOptional:r=!1,isRequired:i=!1,isDisabled:a=!1,disabledMessage:l,startIcon:c,status:u,statusVariant:d="attached",size:f,onChange:h,changeAction:p,isLoading:m=!1,value:b,placeholder:y,labelTooltip:g,hasClear:k=!1,hasAutoFocus:v=!1,htmlName:w,onEnter:j,onKeyDown:S,width:C,xstyle:E,className:T,style:$,ref:N,...A}){const M=be(),I=Pa(f,"md"),R=x.useId(),z=x.useId(),_=x.useId(),O=x.useId(),D=x.useRef(null),L=x.useRef(null),B=M4(),[,P]=x.useTransition(),[X,Y]=x.useOptimistic(b),Z=m||X!==b,ne=a&&!!l,J=bs({placement:"above",focusTrigger:"always",isEnabled:ne}),{statusIcon:K,describedBy:ie}=u4({status:u,statusVariant:d,isInGroup:!!B}),{ariaLabelledBy:le,ariaDescribedBy:ve}=e3(z,[s?_:null,!B&&d!=="tooltip"&&(u!=null&&u.message)?O:null,ie,ne?J.describedBy:null],B),ge=ue=>{if(a)return;const pe=ue.target.value;h==null||h(pe,ue),p&&!ue.defaultPrevented&&P(async()=>{Y(pe),await p(pe,ue)})},xe=x.useCallback(()=>{var ue;h==null||h("",null),(ue=D.current)==null||ue.focus()},[h]),{onClick:ce,onMouseUp:Q}=N0({containerRef:L,inputRef:D,disabled:a}),ye=o.jsxs("div",{ref:ue=>{L.current=ue,J.ref(ue)},onClick:ce,onMouseUp:Q,...F(U("text-input",{size:I,status:(u==null?void 0:u.type)??null}),q(fl.base,WM[I],a&&fl.disabled,u&&H0[u.type],u&&!a&&P0[u.type],u&&z4[u.type],B&&A4.inGroup,E),T,$),children:[c&&Hs(c,{size:"sm",color:"secondary"}),B&&o.jsx(Mi,{id:z,children:t}),o.jsx("input",{...A,ref:it(N,D),id:R,name:w,type:e,value:X,onChange:ge,onKeyDown:j||S?ue=>{ue.key==="Enter"&&(j==null||j()),S==null||S(ue)}:void 0,placeholder:y,disabled:a&&!ne,"aria-disabled":ne?"true":void 0,readOnly:ne||void 0,autoFocus:v,"data-autofocus":v||void 0,"aria-describedby":ve,"aria-required":i===!0?"true":void 0,"aria-invalid":(u==null?void 0:u.type)==="error"?"true":void 0,"aria-busy":Z||void 0,"aria-labelledby":le,...{0:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5"},1:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 x1h6gzvc"}}[!!a<<0]}),k&&b!==""&&!a&&o.jsx("button",{type:"button",onClick:xe,"aria-label":M("@astryx.textInput.clearLabel",{label:t}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:"close",size:"sm",color:"secondary"})}),Z&&o.jsx(on,{size:"sm"}),K]});return B?o.jsxs(o.Fragment,{children:[ye,ne&&J.renderTooltip(l)]}):o.jsxs(Bl,{label:t,isLabelHidden:n,description:s,inputID:R,descriptionID:s?_:void 0,isOptional:r,isRequired:i,isDisabled:a,status:u?{type:u.type,message:u.message,messageID:u.message?O:void 0}:void 0,statusVariant:d,labelTooltip:g,width:C,children:[ye,ne&&J.renderTooltip(l)]})}gs.displayName="TextInput";function R4(e){return typeof e=="string"?!0:!("type"in e)}function KM(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function I4(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function Vf(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function XM(e){const t=[];for(const n of e)if(R4(n))t.push(Vf(n));else if(I4(n))for(const s of n.options)t.push(Vf(s));return t}function ZM({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:s,triggerRef:r}){const[i,a]=x.useState(0),[l,c]=x.useState(!1),u=x.useCallback((d,f)=>{a(d),c(f)},[]);return ar(()=>{if(!e){u(0,!1);return}if(!s.current||!r.current){u(0,!0);return}const d=t>=0?t:0,f=`${n}-item-${d}`,h=document.getElementById(f);if(!h){u(0,!0);return}const p=s.current.getBoundingClientRect(),m=h.getBoundingClientRect(),b=r.current.getBoundingClientRect(),y=p.height;if(y<=0){u(0,!0);return}const g=m.top-p.top+m.height/2,v=b.top+b.height/2-g,w=window.innerHeight,j=Math.max(0,w-y),S=Math.min(Math.max(v,0),j),C=Math.max(0,b.bottom-S);u(C,!0)},[e,t,n,s,r,u]),{offset:i,isPositioned:l}}function YM({selectableItems:e,value:t,isDisabled:n=!1,isOpen:s,hasSearch:r=!1,onOpen:i,onClose:a,onSelect:l,onClear:c,listboxId:u}){const[d,f]=x.useState(-1),[h,p]=x.useState(""),m=x.useRef(void 0),b=x.useCallback(C=>`${u}-item-${C}`,[u]),y=x.useCallback(()=>e.map((C,E)=>C.disabled?-1:E).filter(C=>C>=0),[e]),g=x.useCallback(()=>e.findIndex(C=>C.value===t),[e,t]),k=x.useCallback(()=>{f(-1),a()},[a]),v=x.useCallback(C=>{C.disabled||(l==null||l(C.value),k())},[l,k]),w=x.useCallback(()=>{if(!n){if(s)k();else if(i(),!r){const C=g();f(C>=0?C:0)}}},[n,s,i,k,g,r]),j=x.useCallback((C,E)=>{C.disabled||f(E)},[]),S=x.useCallback(C=>{if(n)return;const E=y();switch(C.key){case"ArrowDown":if(C.preventDefault(),!s)i(),f(0);else{const T=E.indexOf(d),$=Math.min(T+1,E.length-1);f(E[$]??d)}break;case"ArrowUp":if(C.preventDefault(),!s)i(),f(e.length-1);else{const T=E.indexOf(d),$=Math.max(T-1,0);f(E[$]??d)}break;case" ":if(r)break;case"Enter":if(C.preventDefault(),s&&d>=0){const T=e[d];T&&!T.disabled&&v(T)}else if(!s&&(i(),!r)){const T=g();f(T>=0?T:0)}break;case"Escape":s&&(C.preventDefault(),k());break;case"Tab":s&&k();break;case"Home":C.preventDefault(),s&&E.length>0&&f(E[0]);break;case"End":C.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"PageUp":C.preventDefault(),s&&E.length>0&&f(E[0]);break;case"PageDown":C.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"Delete":case"Backspace":!r&&!s&&c!=null&&t!=null&&(C.preventDefault(),c());break;default:if(!r&&C.key.length===1&&!C.ctrlKey&&!C.metaKey){const T=h+C.key.toLowerCase();p(T),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p("")},500);const $=e.findIndex(N=>{var A;return!N.disabled&&((A=N.label)==null?void 0:A.toLowerCase().startsWith(T))});$>=0&&(s||i(),f($))}break}},[n,s,i,k,e,d,v,g,y,h,r,c,t]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:b,onTriggerClick:w,onKeyDown:S,onItemSelect:v,onItemMouseEnter:j}}const QM={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function _4({icon:e,label:t,description:n,endContent:s,xstyle:r,className:i,style:a}){return o.jsx(Fa,{startContent:e?Hs(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:s,xstyle:[QM.root,r],...F(U("selector-option"),{className:i,style:a})})}_4.displayName="SelectorOption";const Es={triggerContainer:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMv6JI:"x9ynric",kGuDYH:"xcr08ib xdk3u5w",kLWn49:"x1kq96og",kMwMTN:"x1tgivj0",kkrTdU:"x1ypdohk",$$css:!0},triggerPlaceholder:{kMwMTN:"xv1l7n4",$$css:!0},triggerGhost:{kzqmXN:"x14atkfc",kMzoRj:"xc342km",kWkggS:"xjbqb8w",kKwaWg:"x1ilzqfv xq8i9tn",kGVxlE:"x1gnnqk1 x1irk71m x15ysqaf",k63SB2:"x1e4wzip",kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xscfbxq",k1ekBW:"xrafxwg",k3aq6I:"x3oybdh xk4oym4",$$css:!0},triggerGhostDisabled:{kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},sectionDivider:{kqGvvJ:"xsq74q5",$$css:!0},divider:{kqGvvJ:"xsq74q5",$$css:!0},item:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kmVPX3:"xlsj2fj",kaIpWk:"xh6dtrn",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},itemHighlighted:{kWkggS:"x1lmrjuc",$$css:!0},itemSelected:{k63SB2:"x1e4wzip",$$css:!0},itemDisabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},JM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},eR={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Jb={warning:"warning",error:"error",success:"success"},ev={warning:"warning",error:"error",success:"success"},tR={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function nR({option:e}){return o.jsx(_4,{icon:e.icon,label:e.label??e.value})}function Yp(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function tv(e,t){return t?e.filter(n=>Yp(n,t)):e}function Zc(e){const t=be(),{label:n,isLabelHidden:s=!1,description:r,isOptional:i=!1,isRequired:a=!1,isDisabled:l=!1,disabledMessage:c,options:u,value:d,onChange:f,changeAction:h,isLoading:p=!1,placeholder:m,size:b,variant:y="input",status:g,statusVariant:k="attached",labelTooltip:v,startIcon:w,htmlName:j,renderOption:S,hasSearch:C=!1,searchPlaceholder:E,placement:T,isDefaultOpen:$=!1,"data-testid":N,width:A,xstyle:M,className:I,style:R,hasClear:z,..._}=e,O=m??t("@astryx.selector.placeholder"),D=E??t("@astryx.selector.searchPlaceholder"),L=z===!0,B=Pa(b,"md"),P=y==="ghost"&&k==="attached"?"detached":k,X=d===null?void 0:d,Y=x.useId(),Z=x.useId(),ne=x.useId(),J=x.useId(),K=x.useId(),ie=x.useId(),le=x.useRef(null),ve=x.useRef(null),ge=M4(),[xe,ce]=x.useState(""),Q=xe.length>0,[,ye]=x.useTransition(),[ue,pe]=x.useOptimistic(X),Le=p||ue!==X,se=l&&!!c,tn=bs({placement:"above",focusTrigger:"always",isEnabled:se}),un=bs({placement:"above",isEnabled:P==="tooltip"&&!!(g!=null&&g.message)}),{ariaLabelledBy:$s,ariaDescribedBy:Mn}=e3(K,[r?ne:null,!ge&&P!=="tooltip"&&(g!=null&&g.message)?J:null,P==="tooltip"&&(g!=null&&g.message)?un.describedBy:null,se?tn.describedBy:null],ge),Rn=x.useMemo(()=>XM(u),[u]),Zl=x.useMemo(()=>tv(Rn,xe),[Rn,xe]),no=x.useMemo(()=>Rn.findIndex(de=>de.value===ue),[Rn,ue]),Ju=x.useMemo(()=>no>=0?Rn[no]:void 0,[Rn,no]),Qx=x.useRef(null),Yl=Ll(),wC=x.useCallback(()=>{var de;ce(""),Yl(""),(de=le.current)==null||de.focus()},[Yl]),Pt=Ol({onHide:wC,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{$&&Pt.show()},[]);const Zk=x.useCallback(de=>{if(ce(de),de.length===0){Yl("");return}const dn=tv(Rn,de).length;Yl(dn===0?"No results found":`${dn} result${dn===1?"":"s"}`)},[Yl,Rn]),Jx=T==null&&!C,{offset:jC,isPositioned:SC}=ZM({isOpen:Pt.isOpen&&Jx,selectedItemIndex:no,listboxId:Z,listboxRef:Qx,triggerRef:le}),Yk=Jx?jC:0,$C=Jx?SC:!0,Qk=T??"below",CC=Yk>0?{marginBlockStart:`-${Yk}px`}:void 0,e1=x.useCallback(()=>{f==null||f(null),h&&ye(async()=>{pe(void 0),await h(null)})},[f,h,ye,pe]),{highlightedIndex:Fs,getItemId:Di,onTriggerClick:EC,onKeyDown:Ql,onItemSelect:Jk,onItemMouseEnter:eb}=YM({selectableItems:Zl,value:X,isDisabled:l,isOpen:Pt.isOpen,hasSearch:C,onOpen:x.useCallback(()=>{Pt.show(),C&&requestAnimationFrame(()=>{var de;(de=ve.current)==null||de.focus()})},[Pt,C]),onClose:Pt.hide,onSelect:x.useCallback(de=>{f==null||f(de),h&&ye(async()=>{pe(de),await h(de)})},[f,h,ye,pe]),onClear:L?e1:void 0,listboxId:Z});x.useEffect(()=>{var de,dn;!Pt.isOpen||Fs<0||(dn=(de=document.getElementById(Di(Fs)))==null?void 0:de.scrollIntoView)==null||dn.call(de,{block:"nearest"})},[Pt.isOpen,Fs,Di]);const TC=x.useCallback(de=>{de.stopPropagation(),e1()},[e1]),zC=x.useCallback(()=>C?o.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:de=>{de.target!==ve.current&&de.key==="Tab"&&!de.shiftKey&&Ql(de)},children:o.jsx(gs,{ref:ve,id:ie,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":Pt.isOpen,"aria-controls":Z,"aria-autocomplete":"list","aria-activedescendant":Pt.isOpen&&Fs>=0?Di(Fs):void 0,value:xe,onChange:Zk,onKeyDown:de=>{if(de.key==="ArrowDown"||de.key==="ArrowUp"||de.key==="PageUp"||de.key==="PageDown"||de.key==="Enter"||de.key==="Escape"){Ql(de);return}de.key==="Tab"&&(de.shiftKey||!Q)&&Ql(de)},placeholder:D})}):null,[C,ie,Z,xe,Q,D,Zk,Ql,Pt.isOpen,Fs,Di,t]),t1=x.useCallback((de,dn)=>{const Li=dn===Fs,Gs=de.value===X;return o.jsxs("div",{id:Di(dn),role:"option","aria-selected":Gs,"aria-disabled":de.disabled,onClick:()=>Jk(de),onMouseEnter:()=>eb(de,dn),...q(Es.item,eR[B],Li&&Es.itemHighlighted,Gs&&Es.itemSelected,de.disabled&&Es.itemDisabled),children:[o.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:S?S(de):o.jsx(nR,{option:de})}),Gs&&o.jsx(Ce,{icon:"check",size:"sm",color:"accent"})]},de.value)},[S,Fs,B,X,Di,Jk,eb]),tb=x.useCallback(()=>{const de=C&&!!xe;if(de&&Zl.length===0)return[o.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let dn=0;const Li=[];for(let Gs=0;Gs<u.length;Gs++){const Ur=u[Gs];if(KM(Ur)){if(de)continue;Li.push(o.jsx(Kc,{xstyle:Es.divider},`divider-${Gs}`))}else if(I4(Ur)){const so=[];for(const AC of Ur.options){const rb=Vf(AC);de&&!Yp(rb,xe)||(so.push(t1(rb,dn)),dn++)}if(so.length===0)continue;Ur.title&&Li.push(o.jsx(Kc,{label:Ur.title,xstyle:Es.sectionDivider},`section-divider-${Gs}`)),Li.push(o.jsx("div",{role:"group","aria-label":Ur.title,children:so},`section-${Gs}`))}else if(R4(Ur)){const so=Vf(Ur);if(de&&!Yp(so,xe))continue;Li.push(t1(so,dn)),dn++}}return Li},[u,t1,C,xe,Zl]),n1=g!=null&&P!=="detached",nb=g!=null&&P==="tooltip"&&!!g.message,sb=o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:de=>{Pt.triggerRef(de),tn.ref(de)},onClick:EC,"data-testid":N,...F(U("selector",{variant:y,size:B,status:(g==null?void 0:g.type)??null}),q(fl.base,Es.triggerContainer,JM[B],y==="ghost"&&Es.triggerGhost,l&&fl.disabled,y==="ghost"&&l&&Es.triggerGhostDisabled,!Ju&&Es.triggerPlaceholder,y!=="ghost"&&g&&H0[g.type],y!=="ghost"&&g&&!l&&P0[g.type],y!=="ghost"&&ge&&A4.inGroup,M),I,R),children:[w&&Hs(w,{size:"sm",color:"secondary"}),ge&&o.jsx(Mi,{id:K,children:n}),o.jsx("button",{ref:le,id:Y,type:"button",role:C?void 0:"combobox",..._,"aria-haspopup":"listbox","aria-expanded":Pt.isOpen,"aria-controls":Z,"aria-activedescendant":!C&&Pt.isOpen&&Fs>=0?Di(Fs):void 0,"aria-describedby":Mn,"aria-labelledby":$s,"aria-required":a?"true":void 0,"aria-invalid":(g==null?void 0:g.type)==="error"?"true":void 0,"aria-busy":Le||void 0,disabled:l&&!se,"aria-disabled":se?"true":void 0,onKeyDown:Ql,tabIndex:l&&!se?-1:0,className:"x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x1a2a7pz",children:o.jsx("span",{className:"x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h",children:(Ju==null?void 0:Ju.label)??O})}),j!=null&&o.jsx("input",{type:"hidden",name:j,value:d??"",disabled:l}),Le&&o.jsx(on,{size:"sm"}),L&&d!=null&&!l&&o.jsx("button",{type:"button",onClick:TC,"aria-label":t("@astryx.selector.clearLabel",{label:n}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:"close",size:"sm",color:"secondary",...U("selector-clear-icon")})}),o.jsx("span",{...{0:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike"},2:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0"},1:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike xq2gx43"},3:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0 xq2gx43"}}[!!(!n1&&Pt.isOpen)<<1|!!n1<<0],children:n1?nb?o.jsx("button",{ref:un.ref,type:"button","aria-label":t(tR[g.type]),"aria-describedby":un.describedBy,onClick:de=>de.stopPropagation(),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:o.jsx(Ce,{icon:Jb[g.type],size:"sm",color:ev[g.type]})}):o.jsx(Ce,{icon:Jb[g.type],size:"sm",color:ev[g.type]}):o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit",...U("selector-indicator-icon",{state:Pt.isOpen?"expanded":"collapsed"})})})]}),Pt.render(C?o.jsxs("div",{children:[zC(),o.jsx("div",{ref:Qx,id:Z,role:"listbox","aria-labelledby":Y,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:tb()})]}):o.jsx("div",{ref:Qx,id:Z,role:"listbox","aria-labelledby":Y,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!$C<<0],children:tb()}),{placement:Qk,alignment:"start",xstyle:[Es.popover,ir[Qk]],style:CC}),nb&&un.renderTooltip((g==null?void 0:g.message)??""),se&&tn.renderTooltip(c)]});return ge?sb:o.jsx(Bl,{label:n,isLabelHidden:s,description:r,inputID:Y,descriptionID:r?ne:void 0,isOptional:i,isRequired:a,isDisabled:l,status:g?{type:g.type,message:g.message,messageID:g.message?J:void 0}:void 0,statusVariant:P,labelTooltip:v,width:A,children:sb})}Zc.displayName="Selector";var O4={exports:{}},cn={};/**
|
|
138
|
-
* @license React
|
|
139
|
-
* react-dom.production.js
|
|
140
|
-
*
|
|
141
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the MIT license found in the
|
|
144
|
-
* LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/var sR=x;function D4(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Wr(){}var bn={d:{f:Wr,r:function(){throw Error(D4(522))},D:Wr,C:Wr,L:Wr,m:Wr,X:Wr,S:Wr,M:Wr},p:0,findDOMNode:null},rR=Symbol.for("react.portal"),iR=Symbol.for("react.recoverable"),nv=Symbol.for("react.optimistic_key");function aR(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:rR,key:s==null?null:s===nv?nv:""+s,children:e,containerInfo:t,implementation:n}}var Ec=sR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function hx(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=bn;cn.browser=function(e){return{$$typeof:iR,_reason:e}};cn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(D4(299));return aR(e,t,null,n)};cn.flushSync=function(e){var t=Ec.T,n=bn.p;try{if(Ec.T=null,bn.p=2,e)return e()}finally{Ec.T=t,bn.p=n,bn.d.f()}};cn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,bn.d.C(e,t))};cn.prefetchDNS=function(e){typeof e=="string"&&bn.d.D(e)};cn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,s=hx(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?bn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:i}):n==="script"&&bn.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};cn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=hx(t.as,t.crossOrigin);bn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&bn.d.M(e)};cn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,s=hx(n,t.crossOrigin);bn.d.L(e,n,{crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};cn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=hx(t.as,t.crossOrigin);bn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else bn.d.m(e)};cn.requestFormReset=function(e){bn.d.r(e)};cn.unstable_batchedUpdates=function(e,t){return e(t)};cn.useFormState=function(e,t,n){return Ec.H.useFormState(e,t,n)};cn.useFormStatus=function(){return Ec.H.useHostTransitionStatus()};cn.version="19.3.0";function L4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L4)}catch(e){console.error(e)}}L4(),O4.exports=cn;var Yc=O4.exports;const sv={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function oR(e){const t=window.getSelection();if(!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!n.collapsed||!e.contains(n.startContainer))return null;const s=n.startContainer;return s.nodeType===Node.TEXT_NODE?(s.textContent??"").slice(0,n.startOffset):null}function lR(e,t){for(let n=e.length-1;n>=0;n--){const s=e[n];if(s===" "||s===`
|
|
146
|
-
`)return null;for(const r of t)if(s===r.character){const i=n>0?e[n-1]:null;if(i===null||i===" "||i===`
|
|
147
|
-
`){const a=e.slice(n+1);return{trigger:r,query:a,triggerStart:n}}}}return null}function cR(e,t){const n=window.getSelection();if(!n||n.rangeCount===0)return;const s=n.getRangeAt(0),r=s.startContainer;if(r.nodeType!==Node.TEXT_NODE)return;const i=r.textContent??"",a=s.startOffset,l=i.slice(0,t),c=i.slice(a);r.textContent=l+c;const u=document.createRange();u.setStart(r,t),u.collapse(!0),n.removeAllRanges(),n.addRange(u)}function uR(e){const t=be(),{triggers:n,editableRef:s,onInsertToken:r,onInsertText:i,onEmitChange:a,debounceMs:l=150}=e,c=x.useId(),[u,d]=x.useState({isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}),f=x.useRef(-1),h=x.useRef(null),p=x.useRef(null),m=x.useCallback(()=>{p.current&&(p.current.remove(),p.current=null)},[]),b=Ol({onHide:x.useCallback(()=>{m(),d($=>({...$,isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}))},[m]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>()=>{h.current&&clearTimeout(h.current),m()},[m]);const y=x.useCallback(()=>{var N,A;h.current&&(clearTimeout(h.current),h.current=null);const $=u.activeTrigger;$!=null&&$.searchSource&&((A=(N=$.searchSource).cancel)==null||A.call(N)),m(),b.hide(),f.current=-1},[b,u.activeTrigger,m]),g=x.useCallback(()=>{const $=s.current;if(!$)return;const N=window.getSelection();if(!N||N.rangeCount===0){b.triggerRef($);return}m();const A=N.getRangeAt(0).cloneRange();A.collapse(!0);const M=typeof A.getBoundingClientRect=="function"?A.getBoundingClientRect():null;if(!M||M.width===0&&M.height===0&&M.top===0&&M.left===0){b.triggerRef($);return}const I=document.createElement("span");I.setAttribute("aria-hidden","true"),I.setAttribute("data-astryx-trigger-anchor",""),I.style.position="fixed",I.style.left=`${M.left}px`,I.style.top=`${M.top}px`,I.style.width=`${Math.max(M.width,1)}px`,I.style.height=`${M.height}px`,I.style.pointerEvents="none",I.style.opacity="0",document.body.appendChild(I),p.current=I,b.triggerRef(I)},[s,b,m]),k=x.useCallback(($,N)=>{h.current&&(clearTimeout(h.current),h.current=null);const A=()=>{var M,I;if($.searchSource){(I=(M=$.searchSource).cancel)==null||I.call(M),d(z=>({...z,isLoading:!0}));const R=$.searchSource.search(N);Promise.resolve(R).then(z=>{d(_=>({..._,items:z,highlightedIndex:z.length>0?0:-1,isLoading:!1}))},()=>{d(z=>({...z,items:[],highlightedIndex:-1,isLoading:!1}))})}};$.searchSource&&($.searchSource.search("")instanceof Promise&&l>0?(d(R=>({...R,isLoading:!0})),h.current=setTimeout(A,l)):A())},[l]),v=x.useCallback($=>{const N=u.activeTrigger;if(!N)return;const A=s.current;if(!A)return;m(),cR(A,f.current);const M=N.onSelect($);typeof M=="string"?i(M):r(M),a(),y()},[u.activeTrigger,s,m,i,r,a,y]),w=x.useCallback(()=>{if(!n||n.length===0)return;const $=s.current;if(!$)return;const N=oR($);if(N===null){u.isActive&&y();return}const A=lR(N,n);if(!A){u.isActive&&y();return}const{trigger:M,query:I,triggerStart:R}=A;!u.isActive||u.activeTrigger!==M?(f.current=R,d(z=>({...z,isActive:!0,activeTrigger:M,query:I,highlightedIndex:0})),g(),k(M,I),b.show()):u.query!==I&&(d(z=>({...z,query:I})),k(M,I))},[n,s,u.isActive,u.activeTrigger,u.query,y,g,k,b]),j=x.useCallback($=>{if(!u.isActive||!b.isOpen)return!1;switch($.key){case"ArrowDown":return $.preventDefault(),d(N=>({...N,highlightedIndex:N.highlightedIndex<N.items.length-1?N.highlightedIndex+1:0})),!0;case"ArrowUp":return $.preventDefault(),d(N=>({...N,highlightedIndex:N.highlightedIndex>0?N.highlightedIndex-1:N.items.length-1})),!0;case"Enter":case"Tab":return u.highlightedIndex>=0&&u.highlightedIndex<u.items.length?($.preventDefault(),v(u.items[u.highlightedIndex]),!0):!1;case"Escape":return $.preventDefault(),y(),!0;default:return!1}},[u.isActive,u.highlightedIndex,u.items,b.isOpen,v,y]),S=x.useCallback($=>`${c}-option-${$}`,[c]);x.useEffect(()=>{if(!b.isOpen||u.highlightedIndex<0)return;const $=document.getElementById(S(u.highlightedIndex));$==null||$.scrollIntoView({block:"nearest"})},[u.highlightedIndex,b.isOpen,S]);const E=((n==null?void 0:n.length)??0)>0?u.isActive&&b.isOpen?{role:"combobox","aria-expanded":!0,"aria-controls":c,"aria-activedescendant":u.highlightedIndex>=0?S(u.highlightedIndex):void 0,"aria-haspopup":"listbox"}:{role:"combobox","aria-expanded":!1,"aria-haspopup":"listbox"}:{role:"textbox"},T=x.useCallback(()=>{const $=u.activeTrigger,N=($==null?void 0:$.emptySearchResultsText)??"No results",A=($==null?void 0:$.loadingText)??"Searching…";let M;if(u.isLoading)M=o.jsx("div",{role:"status",className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:A});else if(u.items.length===0&&u.isActive)M=o.jsx("div",{className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:N});else{const I=NE(u.items);let R=0;M=I.map(z=>{const _=z.items.map(O=>{const D=R++;return o.jsx("div",{id:S(D),role:"option","aria-selected":D===u.highlightedIndex,tabIndex:-1,onMouseDown:L=>{L.preventDefault(),v(O)},onMouseEnter:()=>d(L=>({...L,highlightedIndex:D})),...{0:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz xjbqb8w x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0"},1:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0 x1lmrjuc"}}[(D===u.highlightedIndex)<<0],children:$!=null&&$.renderItem?$.renderItem(O):o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:O.label})},O.id)});return z.heading?o.jsxs("div",{role:"group","aria-label":z.heading,children:[o.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:z.heading}),_]},`group-${z.heading}`):_})}return b.render(o.jsx("div",{id:c,role:"listbox","aria-label":($==null?void 0:$.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...F(U("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:M}),{placement:"above",alignment:"start",xstyle:[sv.popoverSurface,sv.popoverGap]})},[b,c,u,v,S,t]);return{state:u,handleInput:w,handleKeyDown:j,renderMenu:T,reset:y,ariaProps:E}}function Wf(e){const t=window.getSelection();if(!t)return null;if(t.rangeCount>0){const s=t.getRangeAt(0);if(e.contains(s.startContainer))return t}const n=document.createRange();return n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t}function Qp(e,t){const n=Wf(e);if(!n||n.rangeCount===0)return!1;const s=n.getRangeAt(0);s.deleteContents();const r=document.createTextNode(t);return s.insertNode(r),s.setStartAfter(r),s.collapse(!0),n.removeAllRanges(),n.addRange(s),!0}function dR(e){return"render"in e&&typeof e.render=="function"}function fR(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function hR({editableRef:e,onEmitChange:t}){const[n,s]=x.useState([]),r=x.useCallback(u=>{const d=e.current;if(!d)return;const f=Wf(d);if(!f||f.rangeCount===0)return;const h=f.getRangeAt(0),p=document.createElement("span"),m=`token-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;p.setAttribute("data-astryx-token",""),p.setAttribute("data-astryx-token-value",u.value),p.setAttribute("data-astryx-token-id",m),p.contentEditable="false",p.style.display="inline-flex",p.style.verticalAlign="baseline",h.deleteContents(),h.insertNode(p);const b=document.createTextNode(" ");p.after(b);const y=document.createRange();return y.setStartAfter(b),y.collapse(!0),f.removeAllRanges(),f.addRange(y),s(g=>[...g,{id:m,span:p,token:u}]),m},[e]),i=x.useCallback(u=>{if(u.key!=="Backspace")return!1;const d=window.getSelection();if(!d||!d.isCollapsed||d.rangeCount===0)return!1;const f=d.getRangeAt(0),{startContainer:h,startOffset:p}=f;if(h.nodeType===Node.TEXT_NODE&&p===0&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token"))return!1;if(h.nodeType===Node.TEXT_NODE&&h.textContent===" "&&p<=1&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token")){u.preventDefault();const m=h.previousSibling,b=h.parentNode;return b&&(b.removeChild(h),b.removeChild(m)),t(),!0}return!1},[t]),a=x.useCallback(u=>{const d=e.current;if(!d)return!1;const f=Wf(d);if(!f||f.rangeCount===0)return!1;const h=f.getRangeAt(0),p=fR(h.startContainer);if(p){u.preventDefault();const m=u.clipboardData.getData("text/plain"),b=p.nextSibling,y=document.createRange();return b&&b.nodeType===Node.TEXT_NODE?y.setStartAfter(b):y.setStartAfter(p),y.collapse(!0),f.removeAllRanges(),f.addRange(y),Qp(d,m),t(),!0}return!1},[e,t]),l=x.useCallback(u=>{if(!e.current)return;const f=n.find(g=>g.id===u);if(!f)return;const{span:h}=f,p=h.getAttribute("data-astryx-token-value")??"",m=document.createTextNode(p),b=h.nextSibling;(b==null?void 0:b.nodeType)===Node.TEXT_NODE&&b.textContent===" "&&b.remove(),h.replaceWith(m);const y=window.getSelection();if(y){const g=document.createRange();g.setStartAfter(m),g.collapse(!0),y.removeAllRanges(),y.addRange(g)}s(g=>g.filter(k=>k.id!==u)),t()},[e,n,t]),c=x.useCallback(()=>{s(u=>u.filter(d=>{var f;return(f=e.current)==null?void 0:f.contains(d.span)}))},[e]);return{tokenPortals:n,expandToken:l,insertToken:r,handleKeyDown:i,handlePaste:a,cleanupPortals:c}}function xR(e){const t=e.split(`
|
|
148
|
-
`).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function B4({text:e,onExpand:t}){const n=be(),s=xR(e),r=o.jsxs("div",{className:"x78zum5 xdt5ytf x1txdalj x17fpy1y",children:[o.jsx("div",{className:"x9m5x89 x141an7d x1ltkj2j x1tgivj0 x126k92a x13faqbe x1xiyphd x1odjw0f",children:e}),o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj",children:[o.jsx("span",{className:"x141an7d xv1l7n4",children:s}),t&&o.jsx(re,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return o.jsx(w4,{content:r,placement:"above",alignment:"start",hasHoverIndication:!1,children:o.jsx(Iu,{label:s,variant:"neutral"})})}B4.displayName="ChatPastedTextToken";function pR(e){const t=e.split(`
|
|
149
|
-
`).length,n=e.length,s=t>1?`${t} lines, ${n} chars`:`${n} chars`;return{value:e,label:s,variant:"neutral"}}function gR({inputRef:e,threshold:t=200,toToken:n=pR}){return{onPaste:x.useCallback((r,i)=>{var l;if(i.length<=t)return!1;const a=n(i);return(l=e.current)==null||l.insertToken(a),!0},[e,t,n])}}const U0=x.createContext(null);U0.displayName="ChatMessageContext";function mR(){return x.use(U0)}const F0=x.createContext(null);F0.displayName="ChatListContext";function yR(){return x.use(F0)}const G0=x.createContext(null);G0.displayName="ChatComposerContext";function q4(){return x.use(G0)}const V0=x.createContext(null);V0.displayName="ChatLayoutContext";function kR(){return x.use(V0)}const bR=22,rv={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function S1(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function ko(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE?t+=n.textContent??"":n instanceof HTMLElement&&(n.hasAttribute("data-astryx-token")?t+=n.getAttribute("data-astryx-token-value")??"":n.tagName==="BR"?t+=`
|
|
150
|
-
`:t+=ko(n));return t}function W0(e){const t=be(),n=q4(),s=e.value!==void 0,{ref:r,handleRef:i,value:a=n==null?void 0:n.value,onChange:l,placeholder:c,maxRows:u=8,triggers:d,debounceMs:f=150,hasHistory:h=!0,label:p,isDisabled:m=(n==null?void 0:n.isDisabled)??!1,onPaste:b,pasteAsToken:y,onFiles:g,onSubmit:k=n==null?void 0:n.onSubmit,onKeyDown:v,xstyle:w,className:j,style:S,...C}=e,E=p??t("@astryx.chat.composerInput.label"),T=c??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),$=n==null?void 0:n.onChange,N=x.useCallback(Q=>{if(s){l==null||l(Q);return}$==null||$(Q),l!==$&&(l==null||l(Q))},[$,s,l]),A=x.useRef(null),M=x.useRef(null),[I,R]=x.useState(!0),z=x.useRef([]),_=x.useRef(-1),O=x.useRef(""),D=x.useRef(void 0),L=x.useRef(()=>{}),B=x.useRef(()=>{}),P={insertToken:Q=>L.current(Q),expandToken:Q=>ne.expandToken(Q),insertText:Q=>B.current(Q),focus:()=>{var Q;return(Q=A.current)==null?void 0:Q.focus()},getValue:()=>ko(A.current??document.createElement("div"))};M.current=P,x.useImperativeHandle(i,()=>P);const X=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(X)return X.current={focus:()=>{var Q;return(Q=A.current)==null?void 0:Q.focus()}},()=>{X.current=null}},[X]),x.useEffect(()=>{if(a===void 0||!A.current)return;if(a===D.current){D.current=void 0;return}const Q=A.current;if(ko(Q)!==a){D.current=void 0;const ye=document.activeElement===Q;if(Q.textContent=a,ye){const ue=window.getSelection();if(ue){const pe=document.createRange();pe.selectNodeContents(Q),pe.collapse(!1),ue.removeAllRanges(),ue.addRange(pe)}}R(a.length===0)}else D.current=void 0},[a]);const Y=x.useRef(null),Z=x.useCallback(()=>{var Le;if(!A.current)return;const Q=ko(A.current),ye=A.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,ue=Q.trim().length===0&&!ye,pe=ue?"":Q;D.current=pe,R(ue),N==null||N(pe),(Le=Y.current)==null||Le.call(Y)},[N]),ne=hR({editableRef:A,onEmitChange:Z});Y.current=ne.cleanupPortals;const J=gR({inputRef:M}),K=y===!1?null:y??J,ie=x.useCallback(Q=>{const ye=A.current;ye&&Qp(ye,Q)},[]);L.current=ne.insertToken,B.current=ie;const le=uR({triggers:d,editableRef:A,onInsertToken:ne.insertToken,onInsertText:ie,onEmitChange:Z,debounceMs:f}),ve=x.useCallback(()=>{Z(),le.handleInput()},[Z,le]),ge=x.useCallback(Q=>{if(!le.handleKeyDown(Q)&&(v==null||v(Q),!Q.defaultPrevented)){if(Q.key==="Backspace"){const ye=window.getSelection();if(ye&&ye.isCollapsed&&ye.rangeCount>0){const ue=ye.getRangeAt(0),{startContainer:pe,startOffset:Le}=ue;if(!(pe.nodeType===Node.TEXT_NODE&&Le===0&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token"))){if(pe.nodeType===Node.TEXT_NODE&&pe.textContent===" "&&Le<=1&&pe.previousSibling instanceof HTMLElement&&pe.previousSibling.hasAttribute("data-astryx-token")){Q.preventDefault();const se=pe.previousSibling,tn=pe.parentNode;tn&&(tn.removeChild(pe),tn.removeChild(se)),Z();return}}}}if(Q.key==="Enter"&&!Q.shiftKey){if(Q.nativeEvent.isComposing||Q.nativeEvent.keyCode===229||(Q.preventDefault(),!A.current))return;const ye=ko(A.current).trim();if(!ye)return;h&&(z.current.push(ye),_.current=-1,O.current=""),k==null||k(ye),A.current.textContent="",R(!0),N==null||N("");return}if(h&&(Q.key==="ArrowUp"||Q.key==="ArrowDown")){if(!A.current)return;const ye=ko(A.current),ue=z.current;if(ue.length===0)return;if(Q.key==="ArrowUp"){_.current===-1&&(O.current=ye);const pe=_.current===-1?ue.length-1:Math.max(0,_.current-1);_.current=pe,A.current.textContent=ue[pe],S1(A.current),Z(),Q.preventDefault()}else if(Q.key==="ArrowDown"&&_.current!==-1){const pe=_.current+1;pe>=ue.length?(_.current=-1,A.current.textContent=O.current,O.current&&S1(A.current)):(_.current=pe,A.current.textContent=ue[pe],S1(A.current)),Z(),Q.preventDefault()}}}},[h,k,N,Z,le,v]),xe=x.useCallback(Q=>{const ye=A.current;if(!ye||(Wf(ye),ne.handlePaste(Q)))return;const ue=Array.from(Q.clipboardData.files);if(ue.length>0){Q.preventDefault(),g==null||g(ue);return}Q.preventDefault();const pe=Q.clipboardData.getData("text/plain");if(K!=null&&K.onPaste(Q,pe)){Z();return}if(b==null?void 0:b(Q,pe)){Z();return}Qp(ye,pe),Z()},[g,b,Z,ne,K]),ce=u*bR;return o.jsxs("div",{ref:r,...F(U("chat-composer-input"),q(rv.root,m&&rv.disabled,w),j,S),...C,children:[I&&o.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:T}),o.jsx("div",{ref:A,"aria-multiline":"true","aria-label":E,contentEditable:!m,suppressContentEditableWarning:!0,onInput:ve,onKeyDown:ge,onPaste:xe,...le.ariaProps,...F({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${ce}px`}})}),le.renderMenu(),ne.tokenPortals.filter(({span:Q})=>Q.isConnected).map(({id:Q,span:ye,token:ue})=>Yc.createPortal(dR(ue)?o.jsx("span",{children:ue.render()},Q):ue.value.length>(K===null?1/0:200)?o.jsx(B4,{text:ue.value,onExpand:()=>ne.expandToken(Q)},Q):o.jsx(Iu,{label:ue.label,variant:ue.variant,icon:ue.icon},Q),ye))]})}W0.displayName="ChatComposerInput";const vR={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function K0(e){const t=be(),n=q4(),{isStopShown:s=(n==null?void 0:n.isStopShown)??!1,isDisabled:r=!((n==null?void 0:n.canSend)??!1),onSend:i,onStop:a=n==null?void 0:n.onStop,sendIcon:l,stopIcon:c,size:u="md",xstyle:d,className:f,style:h,ref:p,...m}=e,b=i??(()=>n==null?void 0:n.onSubmit("")),y=Ea("stop"),g=Ea("arrowUp");return o.jsx(re,{ref:p,label:t(s?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:s?"secondary":"primary",size:u,icon:s?c??y:l??g,isIconOnly:!0,isDisabled:!s&&r,onClick:s?a:b,...m,...U("chat-send-button"),className:f,style:h,xstyle:[vR.root,d]})}K0.displayName="ChatSendButton";const iv={body:{kVAEAm:"x1n2onr6",kY2c9j:"xhtitgo",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x18oj4ui",kOIVth:"x1txdalj",kaIpWk:"x1xunbrq",kWkggS:"x1prclbq",kkrTdU:"x1ed109x",kmkexE:"xrg7dcy",$$css:!0},compact:{"--_chat-composer-padding":"x18zce08",kOIVth:"xzye2dw",$$css:!0}},wR={low:{kGVxlE:"x1i5ehqx xhouywz",knuKkz:"xyavpck",$$css:!0},none:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz",kmVPX3:"x1b50gpf",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",$$css:!0}};function H4(e){const t=be(),{ref:n,onSubmit:s,onStop:r,isStopShown:i=!1,value:a,onChange:l,placeholder:c,isDisabled:u=!1,density:d="balanced",elevation:f="low",drawer:h,headerActions:p,headerContext:m,input:b,footerActions:y,sendActions:g,sendButton:k,status:v,statusPosition:w="bottom",xstyle:j,className:S,style:C,...E}=e,T=c??t("@astryx.chat.composer.placeholder"),[$,N]=x.useState(""),A=a!==void 0,M=A?a:$,I=x.useCallback(P=>{A||N(P),l==null||l(P)},[A,l]),R=x.useCallback(()=>{const P=M.trim();!P||u||(s(P),I(""))},[M,u,s,I]),z=M.trim().length>0&&!u,_=x.useRef(null),O=x.useRef(null),D=x.useCallback(P=>{var Z;if(P.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(O.current){O.current.focus();return}const Y=(Z=_.current)==null?void 0:Z.querySelector('[contenteditable="true"], textarea');Y==null||Y.focus()},[]),L=v?o.jsxs("div",{role:v.type==="error"?"alert":"status",...{0:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c"},4:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz"},2:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x1pritpl x1joocv1"},6:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x1pritpl x1joocv1"},1:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},5:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"},3:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},7:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"}}[(w==="top")<<2|(v.type==="error")<<1|(v.type==="warning")<<0],children:[o.jsx(Ce,{icon:v.type==="error"?"error":"warning",size:"md",color:v.type==="error"?"error":"warning"}),v.message]}):null,B=x.useMemo(()=>({value:M,onChange:I,onSubmit:R,placeholder:T,isDisabled:u,isStopShown:i,canSend:z,onStop:r,inputControlRef:O}),[M,I,R,T,u,i,z,r]);return o.jsx(G0,{value:B,children:o.jsxs("div",{ref:n,...F(U("chat-composer",{density:d}),{0:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg"},1:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg x197sbye x47corl"}}[!!u<<0],S,C),...E,children:[w==="top"&&L,h,o.jsxs("div",{ref:_,onClick:D,...q(iv.body,wR[f],d==="compact"&&iv.compact,j),children:[(p||m)&&o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg",children:[o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:p}),o.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj xvc5jky x141an7d x1ltkj2j xv1l7n4",children:m})]}),o.jsx("div",{className:"x78zum5 xdt5ytf",children:b??o.jsx(W0,{})}),o.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:y}),o.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[g,k??o.jsx(K0,{})]})]})]}),w==="bottom"&&L]})})}H4.displayName="ChatComposer";const jR={root:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVQacm:"xb3r6kr",kg3NbH:"x1pzlopt",kLKAdn:"x1vlblms",kGO01o:"xxbfulo",k1K539:"x1cdrix3",kWkggS:"x10xzikg",kKwaWg:"x1vrk509",krdFHd:"x1n70msy",kfmiAY:"xg0tfu",$$css:!0}};function P4({ref:e,children:t,count:n,label:s,isCollapsed:r,defaultIsCollapsed:i=!1,onCollapsedChange:a,xstyle:l,className:c,style:u,"data-testid":d,...f}){const h=be(),p=s??h("@astryx.chat.composerDrawer.label"),[m,b]=x.useState(i),y=r!==void 0,g=y?r:m,k=n!=null,v=x.useId(),w=()=>{const j=!g;y||b(j),a==null||a(j)};return o.jsxs("div",{ref:e,"data-testid":d,...F(U("chat-composer-drawer",{collapsed:g?"collapsed":null}),q(jR.root,l),c,u),...f,children:[k&&o.jsxs("div",{...{0:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"},1:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"}}[!!g<<0],role:"button",tabIndex:0,"aria-expanded":!g,"aria-controls":v,"aria-label":g?h("@astryx.chatComposerDrawer.expand",{label:p}):h("@astryx.chatComposerDrawer.collapse",{label:p}),onClick:w,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),w())},children:[o.jsxs("div",{...{0:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x1hc1fzr x19991ni xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x19991ni xuedmi6 xlr8y92 xg01cxk x47corl"}}[!g<<0],children:[o.jsx(Iu,{variant:"neutral",label:n}),o.jsx("span",{className:"xv1l7n4 x1t9gxa6 xjm74w1 x7acx1w xt3l3uh xuedmi6 xlr8y92",children:p})]}),o.jsx("div",{...{0:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1hc1fzr x1e8aii2 xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1e8aii2 xuedmi6 xlr8y92 xg01cxk x47corl"}}[!!g<<0]})]}),o.jsx("div",{id:v,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!(k&&g)<<0],children:o.jsx("div",{...{0:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x1hc1fzr x19991ni x80gvsz x10b1n17 xlr8y92"},1:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x19991ni xlr8y92 xg01cxk x1ahifba xuedmi6"}}[!!(k&&g)<<0],children:t})})]})}P4.displayName="ChatComposerDrawer";const ic={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},gapCompact:{kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},gapBalanced:{kOIVth:"x18g69wz",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0},gapSpacious:{kOIVth:"x1qh66ti",k8WAf4:"xq6koh6",kg3NbH:"xm7rs69",$$css:!0}},SR={0:{kOIVth:"xsn7fz1",$$css:!0},1:{kOIVth:"xzye2dw",$$css:!0},2:{kOIVth:"x1txdalj",$$css:!0},3:{kOIVth:"xjcht0a",$$css:!0},4:{kOIVth:"x18g69wz",$$css:!0},5:{kOIVth:"x9mgr7n",$$css:!0},6:{kOIVth:"x1qh66ti",$$css:!0},8:{kOIVth:"x4t41sb",$$css:!0},10:{kOIVth:"x3hoi3v",$$css:!0},"0.5":{kOIVth:"x1lsbc85",$$css:!0},"1.5":{kOIVth:"x1s4dlld",$$css:!0}};function U4({children:e,emptyState:t,scrollToTopAction:n,density:s="balanced",gap:r,isStreaming:i=!1,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=kR(),p=x.useRef(null),m=x.useRef(null),[b,y]=x.useTransition();x.useEffect(()=>{if(h!=null&&h.contentRef&&m.current)return h.contentRef(m.current),()=>h.contentRef(null)},[h]);const g=e!=null&&e!==!1&&!(Array.isArray(e)&&e.length===0);x.useEffect(()=>{var C;const j=(C=h==null?void 0:h.scrollContainerRef)==null?void 0:C.current;if(!n||!p.current)return;const S=new IntersectionObserver(E=>{var T;(T=E[0])!=null&&T.isIntersecting&&y(async()=>{await n()})},{root:j??null,threshold:0});return S.observe(p.current),()=>S.disconnect()},[n,h]);const k=x.useMemo(()=>({density:s}),[s]),v=s==="compact"?ic.gapCompact:s==="spacious"?ic.gapSpacious:ic.gapBalanced,w=r==null?null:SR[r];return o.jsx(F0,{value:k,children:o.jsx("div",{...f,ref:d,role:"log","aria-live":"polite","aria-busy":i||void 0,tabIndex:0,"data-testid":u,...F(U("chat-message-list",{density:s}),q(ic.root,a),l,c),children:o.jsxs("div",{ref:m,...q(ic.inner,v,w),children:[n&&o.jsx("div",{ref:p,"aria-hidden":!0}),b&&o.jsx("div",{className:"x78zum5 xl56j7k x8o8v82",children:o.jsx(on,{size:"md"})}),o.jsx("div",{className:"x98rzlu x2lwn1j","aria-hidden":!0}),g?e:t?o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}U4.displayName="ChatMessageList";const Mt={root:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",ks0D6T:"x193iq5w",$$css:!0},rootGapCompact:{kOIVth:"x1s4dlld",$$css:!0},rootGapBalanced:{kOIVth:"x1txdalj",$$css:!0},rootGapSpacious:{kOIVth:"xjcht0a",$$css:!0},rootAssistant:{kXwgrk:"x1q0g3np",kjj79g:"x1nhvcw1",$$css:!0},rootUser:{kXwgrk:"x15zctf7",kjj79g:"x1nhvcw1",$$css:!0},rootSystem:{kXwgrk:"x1q0g3np",kjj79g:"xl56j7k",$$css:!0},contentColumn:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0},contentColumnSystem:{ks0D6T:"xq8v1hd",kGNEyG:"x6s0dn4",$$css:!0},contentColumnAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},contentColumnUser:{kGNEyG:"xuk3077",$$css:!0},childrenWrap:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",kzqmXN:"xh8yej3",$$css:!0},childrenAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},childrenUser:{kGNEyG:"xuk3077",$$css:!0},childrenSystem:{kGNEyG:"x6s0dn4",$$css:!0},childrenGapCompact:{kOIVth:"x1lsbc85",$$css:!0},childrenGapBalanced:{kOIVth:"xzye2dw",$$css:!0},childrenGapSpacious:{kOIVth:"x1s4dlld",$$css:!0}};function X0({sender:e,children:t,avatar:n,name:s,metadata:r,density:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=be(),p=yR(),m=i??(p==null?void 0:p.density)??"balanced",b=x.useMemo(()=>({sender:e,density:m}),[e,m]),y=m==="compact"?Mt.rootGapCompact:m==="spacious"?Mt.rootGapSpacious:Mt.rootGapBalanced,g=m==="compact"?Mt.childrenGapCompact:m==="spacious"?Mt.childrenGapSpacious:Mt.childrenGapBalanced,k=e==="system"?Mt.rootSystem:e==="user"?Mt.rootUser:Mt.rootAssistant,v=e==="system"?Mt.contentColumnSystem:e==="user"?Mt.contentColumnUser:Mt.contentColumnAssistant,w=e==="system"?Mt.childrenSystem:e==="user"?Mt.childrenUser:Mt.childrenAssistant,j=e==="system",S=n!=null&&!j,C=s!=null&&!j,E=x.useId();return o.jsx(U0,{value:b,children:o.jsxs("article",{...f,ref:d,"data-testid":u,"aria-label":C?void 0:h("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":C?E:void 0,...F(U("chat-message",{sender:e,density:m}),q(Mt.root,k,S&&y,a),l,c),children:[S&&o.jsx("div",{className:"x2lah0s x5du68j",children:n}),o.jsxs("div",{...q(Mt.contentColumn,v),children:[C&&o.jsx("div",{id:E,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:s}),o.jsx("div",{...q(Mt.childrenWrap,w,g),children:t}),r!=null&&!j&&o.jsx("div",{children:r})]})]})})}X0.displayName="ChatMessage";const at={content:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",ks0D6T:"xl6temz",kaIpWk:"xashgol",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0},radiusCompact:{kaIpWk:"x1hviunn",$$css:!0},paddingCompact:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingBalanced:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingSpacious:{k8WAf4:"x1na6nto",kg3NbH:"xzz68wx",$$css:!0},paddingBlockNone:{k8WAf4:"xt970qd",$$css:!0},metadataPaddingCompact:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingBalanced:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingSpacious:{kg3NbH:"xzz68wx",$$css:!0},metadataReducedGap:{keoZOQ:"x1c40v9y",$$css:!0},headerReducedGap:{k1K539:"xdrfirk",$$css:!0},nameRow:{kZKoxP:"x1grt7ep",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",$$css:!0},alignEnd:{k9WMMc:"xp4054r",$$css:!0},assistant:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},user:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",$$css:!0},groupFirstAssistant:{kVL7Gh:"xrfs2vl",$$css:!0},groupMiddleAssistant:{krdFHd:"x3qb8m",kVL7Gh:"xrfs2vl",$$css:!0},groupLastAssistant:{krdFHd:"x3qb8m",$$css:!0},groupFirstUser:{kT0f0o:"x1whkvtz",$$css:!0},groupMiddleUser:{kfmiAY:"x126per9",kT0f0o:"x1whkvtz",$$css:!0},groupLastUser:{kfmiAY:"x126per9",$$css:!0}};function F4({children:e,variant:t="filled",name:n,metadata:s,group:r,xstyle:i,className:a,style:l,"data-testid":c,ref:u,...d}){const f=mR(),h=(f==null?void 0:f.sender)??"assistant",p=(f==null?void 0:f.density)??"balanced",m=p==="compact"?at.paddingCompact:p==="spacious"?at.paddingSpacious:at.paddingBalanced,b=h==="user",y=t==="ghost"?at.ghost:b?at.user:at.assistant,g=r==="first"?b?at.groupFirstUser:at.groupFirstAssistant:r==="middle"?b?at.groupMiddleUser:at.groupMiddleAssistant:r==="last"?b?at.groupLastUser:at.groupLastAssistant:null,k=p==="compact"?at.metadataPaddingCompact:p==="spacious"?at.metadataPaddingSpacious:at.metadataPaddingBalanced;return o.jsxs(o.Fragment,{children:[n&&o.jsx("div",{"data-chat-name":!0,...q(k,at.nameRow,at.headerReducedGap,b&&at.alignEnd),children:n}),o.jsx("div",{...d,ref:u,"data-testid":c,...F(U("chat-message-bubble",{sender:h,variant:t,density:p}),q(at.content,p==="compact"&&at.radiusCompact,y,m,t==="ghost"&&at.paddingBlockNone,g,i),a,l),children:e}),s&&o.jsx("div",{...q(k,at.metadataReducedGap,b&&at.alignEnd),children:s})]})}F4.displayName="ChatMessageBubble";const av={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kMv6JI:"x9ynric",kGuDYH:"x141an7d",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",k9WMMc:"x2b8uid",$$css:!0},dividerWrap:{kzqmXN:"xh8yej3",$$css:!0}};function Kf({children:e,variant:t="default",icon:n,xstyle:s,className:r,style:i,ref:a,...l}){return t==="divider"?o.jsx("div",{ref:a,...F(U("chat-system-message",{variant:t}),q(av.dividerWrap,s),r,i),...l,role:"status",children:o.jsx(Kc,{label:e})}):o.jsx("div",{ref:a,...F(U("chat-system-message",{variant:t}),q(av.root,s),r,i),...l,role:"status",children:o.jsxs("span",{className:"x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft",children:[n!=null&&o.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:n}),e]})})}Kf.displayName="ChatSystemMessage";const $R=1e3/60;function CR({scrollRef:e,enabled:t=!0,lockThreshold:n=10,buttonThreshold:s=100,damping:r=.7,stiffness:i=.05,mass:a=1.25}){const[l,c]=x.useState(!1),[u,d]=x.useState(!0),f=x.useRef(!0),h=x.useRef(!0),p=x.useRef(0),m=x.useRef(!1),b=x.useRef(void 0),y=x.useRef(0),g=x.useRef(0),k=x.useRef(0),v=x.useCallback(()=>{const M=e.current;if(!M||!f.current){m.current=!1,b.current=void 0,p.current=0;return}if(M.scrollHeight<=M.clientHeight){m.current=!1,b.current=void 0,p.current=0;return}const I=M.scrollHeight-M.clientHeight,R=I-M.scrollTop;if(Math.abs(R)<.5&&Math.abs(p.current)<.1){M.scrollTop=I,m.current=!1,b.current=void 0,p.current=0;return}const z=performance.now(),_=b.current?(z-b.current)/$R:1;b.current=z,p.current=(r*p.current+i*R)/a,M.scrollTop+=p.current*_,requestAnimationFrame(v)},[e,r,i,a]),w=x.useCallback(()=>{const M=e.current;M&&(m.current=!1,p.current=0,b.current=void 0,M.scrollTop=M.scrollHeight-M.clientHeight,y.current=M.scrollTop)},[e]),j=Ha("(prefers-reduced-motion: reduce)"),S=x.useCallback(()=>{if(f.current){if(j){w();return}m.current||(m.current=!0,b.current=void 0,requestAnimationFrame(v))}},[v,w,j]),C=x.useCallback(M=>{if(f.current=!0,d(!0),c(!1),h.current=!1,(M==null?void 0:M.behavior)==="instant"){w();return}S()},[S,w]),E=x.useCallback(M=>{const I=e.current;if(!I)return;const R=I.getBoundingClientRect(),_=M.getBoundingClientRect().top-R.top+I.scrollTop;I.scrollTo({top:_,behavior:"instant"}),y.current=I.scrollTop},[e]),T=x.useCallback(()=>{const M=e.current;if(!M)return;const I=M.getElementsByClassName("astryx-chat-message"),R=I[I.length-1];R instanceof HTMLElement&&E(R)},[e,E]),$=x.useCallback(()=>{f.current=!0,d(!0),c(!1),S()},[S]),N=x.useCallback(()=>{f.current=!1,m.current=!1,d(!1)},[]),A=x.useCallback(()=>{if(!t||!f.current)return;const M=e.current;if(h.current&&M&&M.scrollHeight>M.clientHeight){h.current=!1,w();return}S()},[t,S,w,e]);return x.useEffect(()=>{const M=e.current;if(!M||!t)return;y.current=M.scrollTop,g.current=M.scrollHeight,k.current=M.offsetHeight;const I=()=>{const{scrollTop:O,scrollHeight:D,offsetHeight:L}=M,B=D-O-L;c(B>s);const P=D!==g.current,X=L!==k.current;if(g.current=D,k.current=L,P||X){y.current=O;return}const Y=O<y.current;y.current=O,Y&&f.current&&(f.current=!1,m.current=!1,d(!1))},R=()=>{M.scrollHeight-M.scrollTop-M.offsetHeight<=n&&(f.current=!0,d(!0))},z=O=>{O.deltaY<0&&m.current&&(f.current=!1,m.current=!1,d(!1))},_=()=>{m.current&&(f.current=!1,m.current=!1,d(!1))};return M.addEventListener("scroll",I,{passive:!0}),M.addEventListener("scrollend",R),M.addEventListener("wheel",z,{passive:!0}),M.addEventListener("touchmove",_,{passive:!0}),requestAnimationFrame(()=>{M.scrollHeight>M.clientHeight&&(M.scrollTop=M.scrollHeight-M.clientHeight,y.current=M.scrollTop,h.current=!1)}),()=>{M.removeEventListener("scroll",I),M.removeEventListener("scrollend",R),M.removeEventListener("wheel",z),M.removeEventListener("touchmove",_)}},[e,t,n,s]),{isScrolledUp:l,isLocked:u,scrollToBottom:C,scrollToMessage:E,lock:$,unlock:N,scrollIfLocked:A,scrollToLastMessage:T}}function ER({isLocked:e,onResize:t}){const[n,s]=x.useState(!1),r=x.useRef(null),i=x.useRef(e);i.current=e;const a=x.useRef(t);a.current=t;const l=x.useRef(null),c=x.useRef(null),u=x.useCallback(p=>{p0(p,()=>{var y;(y=a.current)==null||y.call(a);const m=p.getElementsByClassName("astryx-chat-message"),b=m.length>0?m[m.length-1]:null;b&&b!==r.current&&(r.current=b,i.current||s(!0))}),c.current=()=>g0(p)},[]),d=x.useCallback(()=>{var p;(p=c.current)==null||p.call(c),c.current=null},[]),f=x.useCallback(p=>{p!==l.current&&(d(),l.current=p,p&&u(p))},[u,d]);x.useEffect(()=>()=>d(),[d]);const h=x.useCallback(()=>{s(!1)},[]);return{hasNewMessages:n,dismiss:h,contentRef:f}}const Sr={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",keoZOQ:"xtbrsbv",$$css:!0},statusIcon:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kaIpWk:"xjspbzw",$$css:!0},nodePill:{kmuXW:"x2lah0s",$$css:!0},colorPending:{kMwMTN:"xnbbluu",$$css:!0},colorRunning:{kMwMTN:"xqwr325",$$css:!0},colorComplete:{kMwMTN:"xtjic6",$$css:!0},colorError:{kMwMTN:"xjt36v0",$$css:!0}},G4={pending:"clock",running:null,complete:"check",error:"close"},V4={pending:Sr.colorPending,running:Sr.colorRunning,complete:Sr.colorComplete,error:Sr.colorError};function TR(e){return SE(e.key,()=>{var t,n;return[e.name,e.status??"complete",e.target??"",e.node??"",e.duration??"",((t=e.additions)==null?void 0:t.toString())??"",((n=e.deletions)==null?void 0:n.toString())??"",e.errorMessage??""].join("")})}function ov({call:e}){const t=be(),n=e.status??"complete",s=e.resultDetail!=null,[r,i]=x.useState(!1),a=x.useId(),l=s?()=>i(u=>!u):void 0,c=o.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?r:void 0,"aria-controls":s&&r?a:void 0,onClick:l,onKeyDown:s?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),l==null||l())}:void 0,...{0:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw"},1:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk xh6dtrn x7a5moj xtedp8i xe9uy6x"}}[!!s<<0],children:[o.jsxs("span",{title:n==="error"?e.errorMessage:void 0,...q(Sr.statusIcon,V4[n]),children:[n==="running"?o.jsx(on,{size:"sm",shade:"subtle"}):n==="pending"?o.jsx(on,{size:"sm",shade:"subtle"}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),o.jsx("span",{className:"x1n2onr6 x3nfvp2",children:o.jsx(Ce,{icon:G4[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&o.jsx(Mi,{children:t("@astryx.chatToolCalls.error",{message:e.errorMessage??""})})]}),o.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:e.name}),e.node!=null&&o.jsx(Iu,{label:e.node,variant:"neutral",xstyle:Sr.nodePill}),e.target!=null&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:e.target}),(e.additions!=null||e.deletions!=null||e.stats!=null)&&o.jsxs("span",{className:"x78zum5 x6s0dn4 xzye2dw x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:[e.additions!=null&&o.jsxs("span",{className:"xtjic6",children:["+",e.additions]}),e.deletions!=null&&o.jsxs("span",{className:"xjt36v0",children:["-",e.deletions]}),e.stats]}),e.duration!=null&&n==="complete"&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s",children:e.duration}),s&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky x19jd1h0"}}[!!r<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]});return s?o.jsxs("div",{children:[c,r&&o.jsx("div",{id:a,className:"x1f43n9v x1wesfrj",children:e.resultDetail})]}):c}function W4(e){const t=be(),{calls:n,label:s,isExpanded:r,defaultIsExpanded:i,onExpandedChange:a,xstyle:l,className:c,style:u,ref:d,...f}=e,h=i??!1,[p,m]=x.useState(h),b=x.useId(),y=r!==void 0,g=y?r:p,k=x.useCallback(()=>{const j=!g;y||m(j),a==null||a(j)},[g,y,a]);if(n.length===0)return null;if(n.length===1)return o.jsx("div",{ref:d,...F(U("chat-tool-calls"),q(Sr.root,l),c,u),...f,children:o.jsx(ov,{call:n[0]})});const v=n[n.length-1],w=v.status??"complete";return o.jsxs("div",{ref:d,...F(U("chat-tool-calls"),q(Sr.root,l),c,u),...f,children:[o.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":g,"aria-controls":b,onClick:k,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),k())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:o.jsx(Ce,{icon:"wrench",size:"sm",color:"inherit"})}),o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4",children:t("@astryx.chatToolCalls.groupLabel",{count:n.length})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{...q(Sr.statusIcon,V4[w]),children:w==="running"?o.jsx(on,{size:"sm",shade:"subtle"}):w==="pending"?o.jsx(on,{size:"sm",shade:"subtle"}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),o.jsx("span",{className:"x1n2onr6 x3nfvp2",children:o.jsx(Ce,{icon:G4[w]??"check",size:"xsm",color:"inherit"})})]})}),o.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:v.name}),v.target!=null&&o.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:v.target})]}),o.jsx("span",{className:"x3nfvp2 x6s0dn4 x1lsbc85 x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:!g&&o.jsxs(o.Fragment,{children:[o.jsx(Ce,{icon:"wrench",size:"xsm",color:"inherit"}),n.length]})}),o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb x19jd1h0"}}[!!g<<0],children:o.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),o.jsx("div",{id:b,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!g<<0],children:o.jsx("div",{className:"xb3r6kr x2lwn1j",children:o.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(j=>o.jsx(ov,{call:j},TR(j)))})})})]})}W4.displayName="ChatToolCalls";const $1={wrapper:{k1xSpc:"x78zum5",kjj79g:"xl56j7k",kGO01o:"xvmdzux",$$css:!0},button:{"--radius-element":"xnpej1e",khDVqt:"xuxw1ft",kg3NbH:"xf314gf",$$css:!0},buttonWithLabel:{kwRFfy:"x1t818jl",$$css:!0}};function K4({ref:e,isVisible:t,label:n,onClick:s,xstyle:r,className:i,style:a,...l}){const c=be();return o.jsx("div",{ref:e,...F(q($1.wrapper,r),i,a),...l,children:o.jsx("div",{...{0:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1x67gh"},2:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1x67gh"},1:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1ncir08"},3:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1ncir08"}}[!!t<<1|!!n<<0],children:o.jsx(re,{label:n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:o.jsx(Ce,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:s,xstyle:[$1.button,n?$1.buttonWithLabel:null],children:n??void 0})})})}K4.displayName="ChatLayoutScrollButton";const Rt={root:{kVAEAm:"x1n2onr6",k9g6sI:"x12h1iku",kAzted:"x2lwn1j",kUk6DE:"x98rzlu",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},rootScrollable:{kORKVm:"x1odjw0f",kXHlph:"x6ikm8r",k5wCbM:"x1mqgsch",$$css:!0},messageArea:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUOVxO:"xvueqy4",kzQI83:"x1iyjqo2",kmuXW:"x2lah0s",kCS8Yb:"xdl72j9",kGO01o:"xjpqqx5",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},blurLayer:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kfzvcC:"x47corl",k6WDB:"xvn2z4z",keRtuK:"x67t5t6",kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},dock:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",kfzvcC:"x67bb7w",kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockInner:{kUOVxO:"xvueqy4",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",$$css:!0},messageAreaCompact:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaBalanced:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaSpacious:{ks0D6T:"x1ap80js",kg3NbH:"x1pzlopt",$$css:!0},blurLayerCompact:{kZKoxP:"xwzfr38",kX1K2I:"xkm2don",kAExgp:"xiy8rlo",$$css:!0},blurLayerBalanced:{kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},blurLayerSpacious:{kZKoxP:"x1wkxgih",kX1K2I:"xr5yg4x",kAExgp:"xo9xo30",$$css:!0},dockCompact:{kg3NbH:"xf314gf",kGO01o:"x1wesfrj",$$css:!0},dockBalanced:{kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockSpacious:{kg3NbH:"x1pzlopt",kGO01o:"xvmdzux",$$css:!0},dockInnerCompact:{ks0D6T:"x193iq5w",$$css:!0},dockInnerBalanced:{ks0D6T:"x193iq5w",$$css:!0},dockInnerSpacious:{ks0D6T:"x1ap80js",$$css:!0}};function zR(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function X4({children:e,composer:t,density:n="balanced",emptyState:s,scrollButton:r,scrollRef:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d,...f}){const h=be(),p=x.useRef(null),m=i??p,b=!i,y=CR({scrollRef:m}),g=ER({isLocked:y.isLocked,onResize:y.scrollIfLocked}),k=o.jsx(K4,{isVisible:y.isScrolledUp||g.hasNewMessages,label:g.hasNewMessages?h("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{g.dismiss(),y.scrollToBottom()}}),v=x.useMemo(()=>({scrollContainerRef:m,contentRef:g.contentRef}),[m,g.contentRef]),w=!zR(e),S={compact:{messageArea:Rt.messageAreaCompact,blurLayer:Rt.blurLayerCompact,dock:Rt.dockCompact,dockInner:Rt.dockInnerCompact},balanced:{messageArea:Rt.messageAreaBalanced,blurLayer:Rt.blurLayerBalanced,dock:Rt.dockBalanced,dockInner:Rt.dockInnerBalanced},spacious:{messageArea:Rt.messageAreaSpacious,blurLayer:Rt.blurLayerSpacious,dock:Rt.dockSpacious,dockInner:Rt.dockInnerSpacious}}[n];return o.jsx(V0,{value:v,children:o.jsxs("div",{...f,ref:it(d,p),"data-testid":u,...F(U("chat-layout",{density:n}),q(Rt.root,b&&Rt.rootScrollable,a),l,c),children:[o.jsx("div",{...q(Rt.messageArea,S.messageArea),children:w&&s?o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu xz65tgg",children:s}):e}),o.jsxs("div",{...{0:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s xixxii4"},1:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s x7wzq59"}}[!!b<<0],children:[r===void 0?k:r,o.jsx("div",{...q(Rt.blurLayer,S.blurLayer)}),o.jsx("div",{...q(Rt.dock,S.dock),children:o.jsx("div",{...q(Rt.dockInner,S.dockInner),children:t})})]})]})})}X4.displayName="ChatLayout";const Qc=x.createContext(null);Qc.displayName="ListContext";const C1={list:{kogj98:"x1ghz6dp",kZCmMZ:"x1c1uobl",kH6xsr:"x3ct3a4",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",$$css:!0},withDividers:{kOIVth:"xxhr3t",$$css:!0},withCounter:{kt6KFK:"xif0320",$$css:!0}},AR={kt6KFK:"x1khind5",$$css:!0},NR={counterStart:e=>[AR,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function ut({children:e,density:t="balanced",hasDividers:n=!1,header:s,listStyle:r="none",start:i,xstyle:a,className:l,style:c,"data-testid":u,ref:d}){const f=x.useId(),h=r==="decimal",p=h?"ol":"ul",m=x.useMemo(()=>({density:t,hasDividers:n,listStyle:r}),[t,n,r]),b=o.jsx(p,{ref:d,"data-testid":u,"aria-labelledby":s!=null?f:void 0,...h&&i!=null&&i!==1?{start:i}:{},role:"list",...F(U("list",{density:t,listStyle:r}),q(C1.list,n&&C1.withDividers,r!=="none"&&(i!=null&&i!==1?NR.counterStart(i-1):C1.withCounter),a),l,c),children:e});return s==null?o.jsx(Qc,{value:m,children:b}):o.jsx(Qc,{value:m,children:o.jsxs("div",{className:"x78zum5 xdt5ytf",children:[o.jsx("div",{id:f,className:"x1p37lm5",children:s}),b]})})}ut.displayName="List";const MR=[];function Z0({label:e,isLabelHidden:t=!1,description:n,status:s,value:r,onChange:i,changeAction:a,density:l="balanced",hasDividers:c=!1,isDisabled:u=!1,disabledMessage:d,isReadOnly:f=!1,children:h,ref:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,...v}){const w=x.useId(),j=x.useId(),S=x.useId(),C=x.useId(),[,E]=x.useTransition(),T=r!==void 0,$=r??MR,[N,A]=x.useOptimistic($),[M,I]=x.useOptimistic(null),R=u&&!!d,z=bs({placement:"above",focusTrigger:"always",isEnabled:R}),_=x.useCallback((D,L)=>{i==null||i(D),a&&E(async()=>{A(D),L!==void 0&&I(L),await a(D)})},[i,a,E,A,I]),O=x.useMemo(()=>({value:T?N:void 0,onChange:T?_:void 0,isDisabled:u,hasDisabledMessage:R,isReadOnly:f,loadingValue:M}),[T,N,_,u,R,f,M]);return o.jsxs(Bl,{...v,ref:p,"data-testid":k,label:e,isLabelHidden:t,description:n,inputID:w,labelID:j,isGroupLabel:!0,descriptionID:n?S:void 0,isDisabled:u,status:s?{type:s.type,message:s.message,messageID:s.message?C:void 0}:void 0,statusVariant:"detached",width:m,xstyle:b,...F(U("checkbox-list"),{className:y,style:g}),children:[o.jsx(cx,{value:O,children:o.jsx("div",{ref:D=>{z.ref(D)},role:"group","aria-labelledby":j,"aria-describedby":[n?S:null,s!=null&&s.message?C:null,R?z.describedBy:null].filter(Boolean).join(" ")||void 0,children:o.jsx(ut,{density:l,hasDividers:c,children:h})})}),R&&z.renderTooltip(d)]})}Z0.displayName="CheckboxList";const lv={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},RR={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function _e({label:e,description:t,startContent:n,endContent:s,onClick:r,interactiveRef:i,href:a,target:l,rel:c,isDisabled:u=!1,isSelected:d=!1,xstyle:f,className:h,style:p,ref:m,...b}){const y=x.use(Qc),g=(y==null?void 0:y.density)??"balanced",k=(y==null?void 0:y.hasDividers)??!1,v=(y==null?void 0:y.listStyle)??"none",w=v!=="none",j=v==="disc"?o.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:o.jsx("span",{className:"x1v4s8kt xols6we x16rqkct x19aspcf"})}):v==="circle"?o.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:o.jsx("span",{className:"x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w"})}):v==="decimal"?o.jsx("span",{className:"xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5"}):null;return o.jsx(Fa,{as:"li",ref:m,marker:j,startContent:n,label:e,description:t,endContent:s,onClick:r,interactiveRef:i,href:a,target:l,rel:c,isDisabled:u,isSelected:d,density:g,xstyle:[w&&lv.withCounter,k&&lv.withDivider,k&&RR.noRadius,f],...F(U("list-item"),{className:h,style:p}),...b})}_e.displayName="ListItem";const IR={selected:{kWkggS:"xgcxg3y",$$css:!0}};function Y0({label:e,"aria-label":t,value:n,description:s,endContent:r,isDisabled:i=!1,isLoading:a=!1,isChecked:l,onCheck:c,ref:u,xstyle:d,className:f,style:h,onClick:p,...m}){const b=be(),y=x.use(cx);if(y&&y.value!==void 0&&n===void 0)throw new Error("CheckboxListItem requires a `value` prop when used inside CheckboxList with a value array.");const g=t??(typeof e=="string"?e:b("@astryx.checkboxList.item.checkbox"));_l("CheckboxListItem",'`label` is a ReactNode, so the checkbox falls back to the generic accessible name "Checkbox". Pass `aria-label` with a concise string equivalent of the visible label so screen readers can tell items apart.',typeof e!="string"&&t==null);const k=x.use(Qc),w=((k==null?void 0:k.density)??"balanced")==="compact"?"sm":"md",j=((y==null?void 0:y.isDisabled)??!1)||i,S=(y==null?void 0:y.isReadOnly)??!1,C=a||((y==null?void 0:y.loadingValue)!=null&&n!==void 0?y.loadingValue===n:!1);let E=!1;y&&y.value!==void 0&&n!==void 0?E=y.value.includes(n):l!==void 0&&(E=l);const T=!S&&(y!=null||c!=null),$=x.useRef(null),N=T||p!=null,A=()=>{var M,I;if(!(j||S||C))if(y&&y.value!==void 0&&n!==void 0)y.value.includes(n)?(M=y.onChange)==null||M.call(y,y.value.filter(z=>z!==n),n):(I=y.onChange)==null||I.call(y,[...y.value,n],n);else{const R=E!==!0;c==null||c(R)}};return o.jsx(_e,{...m,ref:u,label:e,description:s,endContent:r,isDisabled:j,interactiveRef:N?$:void 0,"aria-busy":C||void 0,xstyle:[E===!0&&!j&&!S&&IR.selected,d],className:f,style:h,startContent:o.jsx(f4,{ref:$,label:g,isLabelHidden:!0,value:E,onChange:()=>A(),onClick:p,isDisabled:j,isReadOnly:S,isLoading:C,size:w})})}Y0.displayName="CheckboxListItem";const Jp=120;function _R(e){let t=0,n=0;const s=[];for(const l of e){const c=l.width;if((c==null?void 0:c.type)==="pixel")n+=c.value;else{const u=(c==null?void 0:c.value)??1,d=c!=null?c.minWidth??Jp:0;t+=u,s.push({key:l.key,proportion:u,minWidth:d})}}let r=0;if(t>0)for(const l of s){const c=l.minWidth*t/l.proportion;c>r&&(r=c)}const i=n+r,a=new Map;for(const l of e){const c=l.width,u={};if((c==null?void 0:c.type)==="pixel")u.width=`${c.value}px`,u.minWidth=`${c.value}px`;else{const d=(c==null?void 0:c.value)??1;if(t>0&&(u.width=`${d/t*100}%`),c!=null){const f=c.minWidth??Jp;u.minWidth=`${f}px`}}a.set(l.key,{style:u})}return{columns:a,tableMinWidth:i}}function OR(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??Jp}}function cv(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function DR(e,t){const n=e[t];return n==null?"":n instanceof Date?n.toISOString():typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="bigint"?String(n):""}function LR(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function BR(e){if(e==null||typeof e!="string"&&typeof e!="number"&&typeof e!="boolean")return 0;const t=String(e);let n=0,s=0;for(let r=0;r<=t.length;r++)r===t.length||t[r]===" "||t[r]===" "||t[r]===`
|
|
151
|
-
`?(s>n&&(n=s),s=0):s++;return n}const qR=60,HR=8;function PR(e){if(e.length===0)return[];const t=e[0],n=Object.keys(t),s=e.slice(0,Math.min(5,e.length));return n.map(i=>{const a=cv(i).length;let l=a,c=a;for(const u of s){const d=LR(u[i]);d>l&&(l=d);const f=BR(u[i]);f>c&&(c=f)}return{key:i,headerLen:a,maxContentLen:l,maxWordLen:c}}).map(i=>{const a=i.maxContentLen<=6?1:i.maxContentLen<=15?2:3,l=Math.max(Math.max(i.headerLen,i.maxWordLen)*HR,qR);return{key:i.key,header:cv(i.key),width:OR(a,{minWidth:l})}})}const uv={x139im0d:"x139im0d",$$css:!0},Z4={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},UR={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},Y4={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},xx=x.createContext(null);xx.displayName="TableContext";const FR={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},GR={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},VR={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function Xf({children:e,xstyle:t,ref:n,isHeaderRow:s=!1,...r}){const i=x.use(xx);if(!i)return o.jsx("tr",{ref:n,...r,...F(U("table-row"),q(uv,t)),children:e});const a=[];return s||(i.isStriped&&i.hasHover?a.push(VR.row):i.isStriped?a.push(FR.row):i.hasHover&&a.push(GR.row)),i.dividers==="rows"||i.dividers,t&&a.push(...t),o.jsx("tr",{ref:n,...r,...F(U("table-row"),q(uv,...a)),children:e})}Xf.displayName="TableRow";const gd={trigger:{kVAEAm:"x1n2onr6",k7VYTy:"xpdipgo",$$css:!0},menu:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kWkggS:"x1prclbq",kGVxlE:"x1i5ehqx",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kfSwDN:"x87ps6o",$$css:!0},popover:{k7Eaqz:"x5w4yej",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function Q0({children:e,menuWidth:t,size:n="md",label:s,isDisabled:r=!1,onOpenChange:i,ref:a,className:l,style:c,xstyle:u,triggerXstyle:d,"data-testid":f,...h}){const p=be(),m=s??p("@astryx.contextMenu.label"),{items:b,menuContent:y,...g}=h,k=b??[],v=y,w=x.useId(),j=x.useRef({x:0,y:0}),S=x.useRef(null),C=x.useRef(null),E=x.useRef(null),[T,$]=x.useState(!1),N=Il({mode:"context",onHide:x.useCallback(()=>{$(!1),i==null||i(!1);const J=E.current;E.current=null,J&&document.contains(J)&&J.focus()},[i]),onShow:x.useCallback(()=>{$(!0),i==null||i(!0)},[i]),lightDismiss:!1}),A=x.useCallback(()=>{N.hide()},[N]),{listRef:M,handleKeyDown:I,focusFirst:R,focusItem:z,ownsEvent:_,getItems:O}=Ua({itemSelector:rx,boundarySelector:ix,wrap:!1,onEscape:A}),D=sx({getItemLabels:()=>O().map(J=>J.textContent),onMatch:z,getCurrentIndex:()=>O().findIndex(J=>J===document.activeElement||J.contains(document.activeElement))});x.useEffect(()=>{if(!T)return;const J=K=>{const ie=M.current;ie&&!ie.contains(K.target)&&A()};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[T,A,M]),x.useEffect(()=>{if(!T)return;const J=K=>{K.key==="Escape"&&(K.isComposing||K.keyCode===229||(K.preventDefault(),A()))};return document.addEventListener("keydown",J),()=>{document.removeEventListener("keydown",J)}},[T,A]);const L=x.useCallback(J=>{if(_(J)){if(J.key==="Enter"||J.key===" "){J.preventDefault();const K=document.activeElement;K&&_u.has(K.getAttribute("role")??"")&&K.click();return}if(J.key==="Tab"){A();return}if(D.onKeyDown(J)){J.preventDefault();return}I(J)}},[I,A,D,_]),B=x.useCallback((J,K,ie)=>{j.current={x:J,y:K};const le=S.current;le&&(le.style.left=`${J}px`,le.style.top=`${K}px`),E.current=document.activeElement instanceof HTMLElement?document.activeElement:ie,N.show(),requestAnimationFrame(()=>R())},[N,R]),P=x.useCallback(J=>{if(r)return;J.preventDefault();const K=C.current,ie=K==null?void 0:K.getBoundingClientRect(),le=J.clientX===0&&J.clientY===0&&J.detail===0,ve=le||!ie?0:J.clientX-ie.left,ge=le||!ie?(ie==null?void 0:ie.height)??0:J.clientY-ie.top;B(ve,ge,J.currentTarget)},[r,B]),X=hN({disabled:r,onLongPress:x.useCallback(J=>{var ie;const K=(ie=C.current)==null?void 0:ie.getBoundingClientRect();B(K?J.x-K.left:J.x,K?J.y-K.top:J.y,C.current)},[B])}),Y=t?gd.popoverCustomWidth(t):gd.popover,Z=x.useMemo(()=>({closeMenu:A,menuSize:n}),[A,n]),ne=b!==void 0?ax(k):v;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:it(a,C),onContextMenu:P,...X,...g,"data-testid":f,...q(gd.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,o.jsx("span",{ref:it(S,N.ref),"aria-hidden":"true",...F({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${j.current.x}px`,top:`${j.current.y}px`}})})]}),N.render(o.jsx("div",{ref:M,id:w,role:"menu","aria-label":m,onKeyDown:L,onContextMenu:J=>J.preventDefault(),...F(U("context-menu"),q(gd.menu,u),l,c),children:o.jsx(Dl,{value:Z,children:ne})}),{placement:"below",alignment:"start",xstyle:[Y,ir.below]})]})}Q0.displayName="ContextMenu";function Q4(e){const t=[],n=new Map;for(const r of e){const i=r.group??"__ungrouped__";let a=n.get(i);a||(a=[],n.set(i,a),t.push(i)),a.push(r)}const s=[];return t.forEach((r,i)=>{i>0&&s.push({type:"divider"});for(const a of n.get(r)??[])s.push({label:typeof a.label=="string"?a.label:a.id,icon:a.checked?o.jsx(Ce,{icon:"check",size:"xsm","aria-hidden":!0}):a.icon,isDisabled:a.disabled,onClick:a.onSelect})}),s}function WR({element:e,getActions:t,triggerXstyle:n}){const[s,r]=x.useState(null);return o.jsx(Q0,{items:s??[],triggerXstyle:n,onOpenChange:i=>{r(i?Q4(t()):null)},children:e})}function J4(e,t,n){return typeof t=="function"?o.jsx(WR,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:o.jsx(Q0,{items:Q4(t),triggerXstyle:n,children:e})}function KR(e,t,n){const s=[];return(e.dividers==="rows"||e.dividers==="grid")&&s.push(t),(e.dividers==="columns"||e.dividers==="grid")&&s.push(n),s}function e6(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function t6(){return x.use(xx)}const XR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},ZR={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},YR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},dv={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},QR={cell:{kZKoxP:"x5yr21d",$$css:!0}},JR={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},eI={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},tI={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function J0({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=t6(),c=typeof i=="function"||Array.isArray(i)&&i.length>0,u=l?[c?ZR[l.density]:XR[l.density],l.textOverflow==="truncate"?Z4.cell:UR.cell,Y4[l.density],tI[l.verticalAlign],...KR(l,JR.cell,eI.cell),...c?[QR.cell]:[]]:[],d=c&&l?[dv.fill,YR[l.density]]:c?dv.fill:void 0,f=J4(e,i,d);return o.jsx("td",{ref:n,...a,...F(U("table-cell",{density:l==null?void 0:l.density}),q(...e6(u,t)),s,r),children:f})}J0.displayName="TableCell";const nI={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0}},sI={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},rI={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},iI={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function ey({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...a}){const l=t6(),c=[];l&&(c.push(sI.cell,nI[l.density],rI.cell,Z4.cell,Y4[l.density]),(l.dividers==="columns"||l.dividers==="grid")&&c.push(iI.cell));const u=J4(e,i);return o.jsx("th",{ref:n,...a,...F(U("table-header-cell",{density:l==null?void 0:l.density}),q(...e6(c,t)),s,r),children:u})}ey.displayName="TableHeaderCell";function ty({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("thead",{ref:e,...F(U("table-header"),q(n),s,r),...i,children:t})}ty.displayName="TableHeader";function ny({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return o.jsx("tbody",{ref:e,...F(U("table-body"),q(n),s,r),...i,children:t})}ny.displayName="TableBody";const fv={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",k9WMMc:"x2b8uid",kOIVth:"x18g69wz",k8WAf4:"xmfvnks",kg3NbH:"xm7rs69",$$css:!0},containerCompact:{kOIVth:"x1txdalj",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0}};function Si({title:e,description:t,icon:n,actions:s,headingLevel:r=3,isCompact:i=!1,xstyle:a,className:l,style:c,ref:u,...d}){const f=`h${r}`;return o.jsxs("div",{ref:u,role:"status",...F(U("empty-state",{variant:i?"compact":null}),q(fv.container,i&&fv.containerCompact,a),l,c),...d,children:[n!=null&&o.jsx("div",{"aria-hidden":"true",children:n}),o.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 xxc7z9f",children:[x.createElement(f,{0:{className:"x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0"},1:{className:"x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib"}}[!!i<<0],e),t!=null&&o.jsx("div",{...{0:{className:"x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4"},1:{className:"x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d"}}[!!i<<0],children:t})]}),s!=null&&o.jsx("div",{...{0:{className:"x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d"},1:{className:"x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf"}}[!!i<<0],children:s})]})}Si.displayName="EmptyState";const E1={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function ea(e,t,n,...s){return e.reduce((r,i,a)=>{const l=t(i);if(!l)return r;try{return l(r,...s)}catch(c){return t3("Table",`Plugin at index ${a} threw in transform:`,c),r}},n)}const aI=[];function oI(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function lI({item:e,rowIndex:t,rowKey:n,columns:s,plugins:r,textOverflow:i,RowComponent:a,CellComponent:l,ariaRowIndex:c}){const u=s.map((h,p)=>{var w;const m={};h.align&&(m.style={textAlign:h.align});const y=ea(r,j=>j.transformBodyCell,{htmlProps:m,xstyle:[],columnIndex:p,columns:s},h,e,p,s),g=!h.renderCell,k=g?DR(e,h.key):((w=h.renderCell)==null?void 0:w.call(h,e))??null;let v;return g&&i==="truncate"&&typeof k=="string"&&k.length>0?v=o.jsx(ee,{type:"body",maxLines:1,children:k}):v=k,o.jsx(l,{...y.htmlProps,contextMenuActions:y.contextMenuActions,xstyle:y.xstyle,children:v},h.key)}),d=ea(r,h=>h.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:o.jsx(o.Fragment,{children:u})},e,t);return o.jsx(a,{ref:d.ref,...d.htmlProps,xstyle:d.xstyle,children:d.children},n)}function cI(e,t){if(e.rowKey!==t.rowKey||e.rowIndex!==t.rowIndex||e.ariaRowIndex!==t.ariaRowIndex||e.columns!==t.columns||e.plugins!==t.plugins||e.textOverflow!==t.textOverflow||e.RowComponent!==t.RowComponent||e.CellComponent!==t.CellComponent)return!1;if(e.item===t.item)return!0;const n=e.item,s=t.item,r=Object.keys(s);if(Object.keys(n).length!==r.length)return!1;for(const i of r)if(n[i]!==s[i])return!1;return!0}const uI=x.memo(lI,cI);function dI({data:e,columns:t,idKey:n,plugins:s,children:r,textOverflow:i="wrap",scrollWrapper:a,emptyState:l,rowIndexStart:c,rowCount:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=be(),y=s??aI,g=c!=null||u!=null,k=c??1,v=g?u??-1:void 0,w=Xf,j=J0,S=ey,C=t??(e?PR(e):[]),E=ea(y,D=>D.transformColumns,C),T=x.useRef(E);oI(T.current,E)||(T.current=E);const $=T.current,N=_R($),A=ea(y,D=>D.transformTable,{htmlProps:{},xstyle:r?[E1.table,E1.tableAutoLayout]:[E1.table]}),M=$.map((D,L)=>{var ye;const B=D.header??D.key,P={"data-column-key":D.key,scope:"col"};D.align&&(P.style={textAlign:D.align});const Y=ea(y,ue=>ue.transformHeaderCell,{htmlProps:P,xstyle:[],content:B,columnIndex:L,columns:$},D,L,$),Z=((ye=N.columns.get(D.key))==null?void 0:ye.style)??{},ne=Y.htmlProps.style,J={...Y.htmlProps,style:ne?{...Z,...ne}:Z},K=Y.content??B,ie=typeof K=="string"&&K.length>0?{title:K}:{},{before:le,after:ve,overlay:ge,below:xe}=Y,Q=le!=null||ve!=null||ge!=null||xe!=null?o.jsxs(o.Fragment,{children:[le,ve!=null?o.jsxs("div",{className:"x3nfvp2 x6s0dn4 xzye2dw xeuugli",children:[K,ve]}):K,ge,xe]}):K;return o.jsx(S,{...J,...ie,contextMenuActions:Y.contextMenuActions,xstyle:Y.xstyle,children:Q},D.key)}),I=ea(y,D=>D.transformHeaderRow,{htmlProps:{},xstyle:[],children:o.jsx(o.Fragment,{children:M})}),R=e!=null&&e.length>0,z=$.length>0,_={...A.htmlProps.style,...h,...N.tableMinWidth>0?{minWidth:`${N.tableMinWidth}px`}:null};let O=o.jsx("table",{ref:p,...v!=null?{"aria-rowcount":v}:null,...A.htmlProps,...F(U("base-table"),q(...A.xstyle,d),[A.htmlProps.className,f].filter(Boolean).join(" ")||void 0,_),...m,children:r||o.jsxs(o.Fragment,{children:[z&&o.jsx(ty,{children:o.jsx(w,{...I.htmlProps,isHeaderRow:!0,xstyle:I.xstyle,children:I.children})}),o.jsx(ny,{children:R?e.map((D,L)=>{const B=n==null?L:typeof n=="function"?n(D):String(D[n]);return o.jsx(uI,{item:D,rowIndex:L,rowKey:B,columns:$,plugins:y,textOverflow:i,RowComponent:w,CellComponent:j,ariaRowIndex:g?k+L:void 0},B)}):e!=null&&l!==!1&&o.jsx("tr",{children:o.jsx("td",{colSpan:$.length,children:l??o.jsx(Si,{title:b("@astryx.table.noData"),isCompact:!0})})})})]})});if(a){const D=ea(y,L=>L.transformScrollWrapper,{htmlProps:{},xstyle:[]});O=o.jsx(a,{htmlProps:D.htmlProps,xstyle:D.xstyle,beforeTable:D.beforeTable,afterTable:D.afterTable,children:O})}for(let D=y.length-1;D>=0;D--){const L=y[D];if(L.transformTableContext)try{O=L.transformTableContext(O)}catch(B){t3("Table","Plugin threw in transformTableContext:",B)}}return O}const n6=dI;n6.displayName="BaseTable";const s6=["columnSettings","sort","tree","selection","pagination"],hv=new Map(s6.map((e,t)=>[e,t]));function fI(e){const t=s6.length;return e.sort(([n],[s])=>{const r=hv.get(n)??t,i=hv.get(s)??t;return r-i})}const md=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function hI(e,t){const n=Object.keys(t);for(const r of n)md.has(r)||ga("Table",`Plugin "${e}" has unknown key "${r}". Valid keys: ${[...md].join(", ")}. This key will be ignored.`);for(const r of n)if(md.has(r)){const i=t[r];i!=null&&typeof i!="function"&&ga()}n.some(r=>md.has(r)&&typeof t[r]=="function")||ga()}function xI(e,t){const n=x.useRef(null);if(n.current!=null){const i=n.current;if(i.basePlugins===e&&i.userPlugins===t)return i.result;if(i.basePlugins===e&&pI(i.userPlugins,t))return i.userPlugins=t,i.result}const s=t?fI(Object.entries(t)).map(([,i])=>i):[],r=[...e,...s];if(t)for(const[i,a]of Object.entries(t))hI(i,a);return n.current={basePlugins:e,userPlugins:t,result:r},r}function pI(e,t){if(e===t)return!0;if(e==null||t==null)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}const gI={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},xv={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function mI({children:e,htmlProps:t,xstyle:n,beforeTable:s,afterTable:r}){const i=be(),{ref:a,...l}=t??{};return o.jsxs("div",{ref:a,tabIndex:0,role:"group","aria-label":i("@astryx.table.label"),...l,...F(U("table-scroll-wrapper"),q(xv.base,xv.containerBleed,...n??[])),children:[s,e,r]})}function yI(){return{transformTable(e){const t=e.htmlProps.className??"",n=U("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,gI.base]}}}}function kI({density:e="balanced",dividers:t="rows",isStriped:n=!1,hasHover:s=!1,verticalAlign:r="middle",textOverflow:i="wrap",plugins:a,columns:l,data:c,ref:u,...d}){const f=x.useMemo(()=>yI(),[]),h=x.useMemo(()=>[f],[f]),p=xI(h,a),m=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:s,verticalAlign:r,textOverflow:i}),[e,t,n,s,r,i]);return o.jsx(xx,{value:m,children:o.jsx(n6,{ref:u,data:c,columns:l,plugins:p,textOverflow:i,scrollWrapper:mI,...d})})}const r6=kI;r6.displayName="Table";function bI(e,t,n){if(e.length===0||t>e[e.length-1]){const s=[...e,t];for(;s.length>n;)s.shift();return s}return e}function vI(e,t,n,s){const r=t+e.length;if(n.length===0)return null;const i=n[0];if(r<=i)return null;const a=[];let l=t;l<i&&i<r&&(a.push({key:`settled-${s}`,text:e.slice(0,i-t),fading:!1}),l=i);for(let c=0;c<n.length;c++){const u=n[c],d=c+1<n.length?n[c+1]:r;if(u>=r||d<=l)continue;const f=Math.max(u,l),h=Math.min(d,r);f>=h||(a.push({key:`fade-${s}-b${u}`,text:e.slice(f-t,h-t),fading:!0}),l=h)}return a.length>0?a:null}const Pi={label:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kXLuUW:"x11njtxf",kZKoxP:"x1grt7ep",kGuDYH:"x141an7d",k63SB2:"xv8on6e",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kg3NbH:"xf314gf",keTefX:"xladpz9",kybGjl:"x1hl2dhg",k1ekBW:"x1eaenvl",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",ks0D6T:"x55n99s",kVQacm:"xb3r6kr",$$css:!0},labelWithIcon:{kZCmMZ:"x138rykx",$$css:!0},labelInteractive:{kkrTdU:"x1ypdohk",$$css:!0},labelHover:{kWkggS:"xe9uy6x",kMwMTN:"xv1l7n4 x140uwzg",$$css:!0},number:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kXLuUW:"x1v0h343",kGuDYH:"x141an7d",k63SB2:"x2mo6ok",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kWkggS:"xgcxg3y",kaIpWk:"xjspbzw",k7Eaqz:"x16asifk",kZKoxP:"x1grt7ep",kg3NbH:"x7a5moj",kybGjl:"x1hl2dhg",k1ekBW:"x15406qy",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",$$css:!0},numberInteractive:{kkrTdU:"x1ypdohk",$$css:!0},numberHover:{kWkggS:"xgcxg3y xe9uy6x",$$css:!0}};function i6({ref:e,source:t,number:n,variant:s="label",xstyle:r,className:i,style:a,"data-testid":l,...c}){const u=be(),d=t.title??String(n),f=t.url,h=t.icon!=null&&typeof t.icon!="string"?t.icon:null,p=t.src??(typeof t.icon=="string"?t.icon:void 0),m=h!=null||p!=null,b=f?"a":"span",y=f?"doc-noteref":void 0,g=f?{href:f,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},k=e;return s==="number"?o.jsx(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...g,...F(U("citation",{variant:s}),q(Pi.number,f!=null&&Pi.numberHover,f!=null&&Pi.numberInteractive,r),i,a),children:n}):o.jsxs(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...g,...F(U("citation",{variant:s}),q(Pi.label,m&&Pi.labelWithIcon,f!=null&&Pi.labelHover,f!=null&&Pi.labelInteractive,r),i,a),children:[m&&o.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:h!=null?Hs(h,{size:"sm"}):o.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),o.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}i6.displayName="Citation";const wI={sourceIds:void 0,autolink:void 0};function sy(e){if(e==null)return wI;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const jI=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,SI=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function Jc(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function $I(e){const t=jI.exec(e);if(t==null)return null;const n=Jc(t[1]),s=t[2]!=null?t[2]:t[3];return n===""||s==null?null:{label:n,destination:s,hasTitle:t[4]!=null}}function a6(e){const t=e.split(`
|
|
152
|
-
`),n=new Map,s=new Array(t.length).fill(!0);let r=!0,i=!1,a="";for(let c=0;c<t.length;c++){const u=t[c];if(i){u.startsWith(a)?(i=!1,a="",r=!0):r=!1;continue}const d=u.match(/^(`{3,}|~{3,})/);if(d){i=!0,a=d[1],r=!1;continue}if(u.trim()===""){r=!0;continue}if(r){const f=$I(u);if(f!=null){n.has(f.label)||n.set(f.label,f.destination),s[c]=!1,!f.hasTitle&&c+1<t.length&&SI.test(t[c+1])&&(s[c+1]=!1,c++);continue}}r=/^ {0,3}#{1,6}(?: |\t|$)/.test(u)||ry(u)}if(n.size===0)return{defs:n,cleaned:e};const l=t.filter((c,u)=>s[u]).join(`
|
|
153
|
-
`);return{defs:n,cleaned:l}}function CI(e){return e.size===0?"":[...e].sort((t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0).map(([t,n])=>`${t}\0${n}`).join("")}function EI(e,t,n,s){const r=e.indexOf("]",t+1);if(r===-1)return null;const i=e.slice(t+1,r);if(e[r+1]==="["){const l=e.indexOf("]",r+2);if(l!==-1){const c=e.slice(r+2,l),u=c===""?i:c,d=n.get(Jc(u));if(d!=null)return{node:{type:"link",href:d,children:si(i,s)},end:l+1}}}if(i.trim()==="")return null;const a=n.get(Jc(i));return a==null?null:{node:{type:"link",href:a,children:si(i,s)},end:r+1}}function TI(e,t,n){const s=e.indexOf("]",t+2);if(s===-1)return null;const r=e.slice(t+2,s);if(e[s+1]==="["){const a=e.indexOf("]",s+2);if(a!==-1){const l=e.slice(s+2,a),c=l===""?r:l,u=n.get(Jc(c));if(u!=null)return{node:{type:"image",src:u,alt:r},end:a+1}}}if(r.trim()==="")return null;const i=n.get(Jc(r));return i==null?null:{node:{type:"image",src:i,alt:r},end:s+1}}function pv(e,t){let n=1;for(let s=t;s<e.length;s++)if(e[s]==="(")n++;else if(e[s]===")"&&(n--,n===0))return s;return-1}function lo(e){return e==null?!1:/\w/.test(e)}function zI(e,t,n){if(!n.sourceIds||e[t]!=="【")return null;const s=e.indexOf("】",t+1);if(s===-1)return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function AI(e,t,n){if(!n.sourceIds||e[t]!=="[")return null;const s=e.indexOf("]",t+1);if(s===-1||e[s+1]==="(")return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function NI(e,t){return eu(e,sy(t))}function eu(e,t){const n=si(e,t);return t.autolink==="gfm"?u6(n):n}function si(e,t){const n=[];let s=0;for(;s<e.length;){if(e[s]==="\\"&&s+1<e.length){n.push({type:"text",content:e[s+1]}),s+=2;continue}if(e[s]==="`"){const l=e[s+1]==="`"?e[s+2]==="`"?3:2:1,c=s+l,u=e.indexOf("`".repeat(l),c);if(u!==-1){n.push({type:"code",content:e.slice(c,u)}),s=u+l;continue}}{const l=zI(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="!"&&e[s+1]==="["){const l=e.indexOf("]",s+2);if(l!==-1&&e[l+1]==="("){const c=pv(e,l+2);if(c!==-1){n.push({type:"image",src:e.slice(l+2,c),alt:e.slice(s+2,l)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="!"&&e[s+1]==="["){const l=TI(e,s,t.linkDefs);if(l){n.push(l.node),s=l.end;continue}}{const l=AI(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="["){const l=e.indexOf("]",s+1);if(l!==-1&&e[l+1]==="("){const c=pv(e,l+2);if(c!==-1){n.push({type:"link",href:e.slice(l+2,c),children:si(e.slice(s+1,l),t)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="["){const l=EI(e,s,t.linkDefs,t);if(l){n.push(l.node),s=l.end;continue}}if(e[s]==="*"&&e[s+1]==="*"&&e[s+2]==="*"||e[s]==="_"&&e[s+1]==="_"&&e[s+2]==="_"){const l=e.slice(s,s+3),c=e[s]==="_";if(!(c&&lo(e[s-1]))){const u=e.indexOf(l,s+3);if(u!==-1&&(!c||!lo(e[u+3]))){n.push({type:"bold",children:[{type:"italic",children:si(e.slice(s+3,u),t)}]}),s=u+3;continue}}}if(e[s]==="*"&&e[s+1]==="*"||e[s]==="_"&&e[s+1]==="_"){const l=e.slice(s,s+2),c=e[s]==="_";if(!(c&&lo(e[s-1]))){const u=e.indexOf(l,s+2);if(u!==-1&&(!c||!lo(e[u+2]))){n.push({type:"bold",children:si(e.slice(s+2,u),t)}),s=u+2;continue}}}if(e[s]==="~"&&e[s+1]==="~"){const l=e.indexOf("~~",s+2);if(l!==-1){n.push({type:"strikethrough",children:si(e.slice(s+2,l),t)}),s=l+2;continue}}if(e[s]==="*"||e[s]==="_"){const l=e[s]==="_";if(!(l&&lo(e[s-1]))){const c=e.indexOf(e[s],s+1);if(c!==-1&&c>s+1&&(!l||!lo(e[c+1]))){n.push({type:"italic",children:si(e.slice(s+1,c),t)}),s=c+1;continue}}}let r=s+1;for(;r<e.length&&!"*_~`[!\\\n【".includes(e[r]);)r++;const i=e.slice(s,r);if(r<e.length&&e[r]===`
|
|
154
|
-
`){const l=i.replace(/ +$/,"");if(i.length-l.length>=2){if(l.length>0){const c=n[n.length-1];(c==null?void 0:c.type)==="text"?c.content+=l:n.push({type:"text",content:l})}n.push({type:"break"}),s=r+1;continue}}const a=n[n.length-1];(a==null?void 0:a.type)==="text"?a.content+=i:n.push({type:"text",content:i}),s=r}return n}const o6="[^\\s<]+",MI="https?:\\/\\/",l6="[A-Za-z0-9._%+-]+",gv="[A-Za-z0-9-]+",c6=`${gv}(?:\\.${gv})+`,RI="[a-zA-Z][a-zA-Z0-9+.-]*",II="[^<>\\s]*",_I=new RegExp(`${MI}${o6}`,"g"),OI=new RegExp(`www\\.${o6}`,"g"),DI=new RegExp(`${l6}@${c6}`,"g"),LI=new RegExp(`<(${RI}:${II})>`,"g"),BI=new RegExp(`<(${l6}@${c6})>`,"g"),mv=new Set("?!.,:*_~"),qI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function yv(e){let t=e;for(;t.length>0;){if(mv.has(t[t.length-1])){let n=t.length-1;for(;n>0&&mv.has(t[n-1]);)n--;t=t.slice(0,n);continue}if(t.endsWith(")")){let n=0,s=0;for(let r=0;r<t.length;r++)t[r]==="("?n++:t[r]===")"&&s++;if(s>n){t=t.slice(0,-1);continue}}break}return t}const HI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function kv(e){return e==null?!0:!HI.has(e)}function PI(e){const t=[];{const r=new RegExp(LI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=i[1];t.push({start:i.index,end:i.index+i[0].length,href:a,display:a})}}{const r=new RegExp(BI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=i[1];t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${a}`,display:a})}}{const r=new RegExp(_I.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];if(!kv(a)||e.slice(i.index-2,i.index)==="](")continue;const l=yv(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:l,display:l})}}{const r=new RegExp(OI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];if(!kv(a)||e.slice(i.index-3,i.index)==="://")continue;const l=yv(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:`http://${l}`,display:l})}}{const r=new RegExp(DI.source,"g");let i;for(;(i=r.exec(e))!==null;){const a=e[i.index-1];a!=null&&qI.has(a)||e.slice(Math.max(0,i.index-7),i.index)!=="mailto:"&&t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${i[0]}`,display:i[0]})}}t.sort((r,i)=>r.start-i.start);const n=[];let s=0;for(const r of t)r.start>=s&&(n.push(r),s=r.end);return n}function UI(e){const t=PI(e);if(t.length===0)return[{type:"text",content:e}];const n=[];let s=0;for(const r of t)r.start>s&&n.push({type:"text",content:e.slice(s,r.start)}),n.push({type:"link",href:r.href,children:[{type:"text",content:r.display}]}),s=r.end;return s<e.length&&n.push({type:"text",content:e.slice(s)}),n}function u6(e){const t=[];for(const n of e)if(n.type==="text"){const s=UI(n.content);for(const r of s){const i=t[t.length-1];r.type==="text"&&(i==null?void 0:i.type)==="text"?i.content+=r.content:t.push(r)}}else n.type==="bold"||n.type==="italic"||n.type==="strikethrough"?t.push({...n,children:u6(n.children)}):t.push(n);return t}function T1(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function ry(e){const t=e.trim();if(t.length<3)return!1;const n=t.replace(/ /g,"");if(n.length<3)return!1;const s=n[0];if(s!=="-"&&s!=="*"&&s!=="_")return!1;for(let r=1;r<n.length;r++)if(n[r]!==s)return!1;return!0}function rf(e){if(!e.includes("|"))return!1;const n=e.split("|").map(s=>s.trim()).filter(s=>s.length>0);return n.length>0&&n.every(s=>/^:?-+:?$/.test(s))}function FI(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||ry(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function z1(e){let t=0,n=e.length;if(e.startsWith("|"))for(t=1;t<n&&e[t]===" ";)t++;for(;n>t&&e[n-1]===" ";)n--;n>t&&e[n-1]==="|"&&n--;const s=e.slice(t,n),r=[];let i="";for(let a=0;a<s.length;a++)s[a]==="\\"&&a+1<s.length&&s[a+1]==="|"?(i+="\\|",a++):s[a]==="|"?(r.push(i.trim()),i=""):i+=s[a];return r.push(i.trim()),r}function GI(e,t,n){const s=z1(e[t]).map(l=>({children:eu(l,n)})),r=z1(e[t+1]).map(l=>{const c=l.trim(),u=c.startsWith(":"),d=c.endsWith(":");return u&&d?"center":d?"right":u?"left":null}),i=[];let a=t+2;for(;a<e.length&&e[a].includes("|")&&e[a].trim()!=="";)i.push(z1(e[a]).map(l=>({children:eu(l,n)}))),a++;return{node:{type:"table",headers:s,alignments:r,rows:i},nextIndex:a}}function bv(e,t,n,s){const r=[],i=T1(e[t]),a=n?e[t].match(/^ *(\d+)([.)]) /):null,l=a?a[2]:".",c=`\\${l}`,u=n?new RegExp(`^ {${i}}\\d+${c} `):new RegExp(`^ {${i}}[-*+] `),d=a?parseInt(a[1],10):void 0;let f=!1,h=t;for(;h<e.length&&u.test(e[h]);){const p=n?e[h].replace(new RegExp(`^ *\\d+${c} `),""):e[h].replace(/^ *[-*+] /,""),m=p.match(/^\[([ xX])\] (.*)/);let b,y;m?(b=m[1].toLowerCase()==="x",y=m[2]):y=p,h++;const g=[];for(;h<e.length&&e[h].trim()!==""&&T1(e[h])>i;)g.push(e[h]),h++;if(g.length>0){const v=Math.min(...g.map(j=>T1(j))),w=g.map(j=>j.slice(v));y+=`
|
|
155
|
-
`+w.join(`
|
|
156
|
-
`)}r.push({checked:b,children:aa(y,s)});let k=h;for(;k<e.length&&e[k].trim()==="";)k++;k>h&&k<e.length&&u.test(e[k])&&(f=!0,h=k)}return{node:{type:"list",ordered:n,start:d,delimiter:n?l:void 0,loose:f||void 0,items:r},nextIndex:h}}function VI(e,t){return aa(e,sy(t))}function aa(e,t){const{defs:n,cleaned:s}=a6(e),r=t.linkDefs;let i;n.size===0?i=r:r==null?i=n:i=new Map([...n,...r]);const a=i!=null?{...t,linkDefs:i}:t,l=s.split(`
|
|
157
|
-
`),c=[];let u=0;for(;u<l.length;){const d=l[u];if(d.trim()===""){u++;continue}const f=d.match(/^(`{3,}|~{3,})(\w*)/);if(f){const b=f[1],y=f[2]||"plaintext",g=[];for(u++;u<l.length&&!l[u].startsWith(b);)g.push(l[u]),u++;u++,c.push({type:"codeblock",language:y,content:g.join(`
|
|
158
|
-
`)});continue}const h=d.match(/^(#{1,6}) +(.*)/);if(h){c.push({type:"heading",level:h[1].length,children:eu(h[2],a)}),u++;continue}if(ry(d)){c.push({type:"hr"}),u++;continue}const p=d.match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(p&&d.trim()===p[0]){c.push({type:"image",alt:p[1],src:p[2]}),u++;continue}if(u+1<l.length&&d.includes("|")&&rf(l[u+1])){const b=GI(l,u,a);c.push(b.node),u=b.nextIndex;continue}if(d.startsWith("> ")||d===">"){const b=[];for(;u<l.length&&(l[u].startsWith("> ")||l[u]===">");)b.push(l[u].replace(/^> ?/,"")),u++;c.push({type:"blockquote",children:aa(b.join(`
|
|
159
|
-
`),a)});continue}if(/^ {0,9}[-*+] /.test(d)){const b=bv(l,u,!1,a);c.push(b.node),u=b.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const b=bv(l,u,!0,a);c.push(b.node),u=b.nextIndex;continue}const m=[d];for(u++;u<l.length&&!FI(l[u])&&l[u].trim()!=="";)m.push(l[u]),u++;c.push({type:"paragraph",children:eu(m.join(`
|
|
160
|
-
`),a)})}return c}function A1(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function WI(e){let t=!1,n="",s=-1;for(let r=0;r<e.length;r++){const i=e[r],a=i.match(/^(`{3,}|~{3,})/);a&&(t?a[1].startsWith(n[0])&&a[1].length>=n.length&&(t=!1,n=""):(t=!0,n=a[1])),!t&&i.trim()===""&&r>0&&(s=r)}return t?-1:s}function vv(e){const t=e.lastIndexOf(`
|
|
161
|
-
`),n=t===-1?"":e.slice(0,t+1);let s=t===-1?e:e.slice(t+1);const r=s.lastIndexOf("[");if(r!==-1){const a=s.slice(r);if(!(a.includes("](")&&a.includes(")"))){const c=r>0&&s[r-1]==="!"?r-1:r;s=s.slice(0,c)}}let i=s.length;for(;i>0&&s[i-1]==="`";)i--;if(i<s.length&&i>0){const a=s.length-i;s.lastIndexOf("`".repeat(a),i-1)===-1&&(s=s.slice(0,i))}for(i=s.length;i>0&&s[i-1]==="*";)i--;if(i<s.length&&i>0){const a=s.length-i;a<=3&&s.lastIndexOf("*".repeat(a),i-1)===-1&&(s=s.slice(0,i))}{let a=0;const l=[];for(;a<s.length;){const u=s.indexOf("*",a);if(u===-1)break;let d=1;for(;u+d<s.length&&s[u+d]==="*";)d++;if(d>3){a=u+d;continue}l.push({pos:u,len:d}),a=u+d}const c=new Set;for(let u=0;u<l.length;u++)if(!c.has(u)){for(let d=u+1;d<l.length;d++)if(!c.has(d)&&l[d].len===l[u].len){c.add(u),c.add(d);break}}for(let u=l.length-1;u>=0;u--)if(!c.has(u)){const d=l[u];d.pos+d.len<s.length?s=s+"*".repeat(d.len):s=s.slice(0,d.pos)}}if(s.length>=2&&s.endsWith("~~"))s.lastIndexOf("~~",s.length-3)===-1&&(s=s.slice(0,-2));else if(s.endsWith("~")){const a=s.length-2;a>=0&&s[a]!=="~"&&(s=s.slice(0,-1))}{let a=0,l=0;const c=[];for(;;){const u=s.indexOf("~~",l);if(u===-1)break;c.push(u),a++,l=u+2}a%2===1&&(s=s.slice(0,c[c.length-1]))}return n+s}function KI(e){const t=e.split(`
|
|
162
|
-
`);for(;t.length>0;){const n=t[t.length-1],s=n.trim();if(s===""){t.pop();continue}if(/^ {0,9}[-*+] $/.test(n)||/^ {0,9}\d+[.)] $/.test(n)){t.pop();continue}if(s.includes("|")&&!rf(n)){let r=!1;for(let i=t.length-2;i>=1;i--)if(rf(t[i])&&t[i-1].includes("|")){r=!0;break}if(!r){t.pop();continue}}if(rf(n)&&(t.length<2||!t[t.length-2].includes("|"))){t.pop();continue}break}return t.join(`
|
|
163
|
-
`)}function wv(e,t){if(e.length===0||t.length===0)return[...e,...t];const n=e[e.length-1],s=t[0];if(n.type==="list"&&s.type==="list"&&n.ordered===s.ordered&&n.delimiter===s.delimiter){const r={type:"list",ordered:n.ordered,start:n.start,delimiter:n.delimiter,loose:!0,items:[...n.items,...s.items]};return[...e.slice(0,-1),r,...t.slice(1)]}return[...e,...t]}function XI(e,t,n){const s=sy(n);if(t.autolink!==s.autolink&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.autolink=s.autolink),e==="")return t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=void 0,[];const{defs:r}=a6(e),i=CI(r);t.linkDefsKey!==i&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=i);const a=r.size>0?{...s,linkDefs:r}:s,l=e.split(`
|
|
164
|
-
`),c=WI(l);if(c<0)return t.prevInput=e,aa(e,a);const u=l.slice(0,c).join(`
|
|
165
|
-
`),d=l.slice(c).join(`
|
|
166
|
-
`).trim(),f=KI(d);let h;if(u===t.settledText)h=t.settledBlocks;else if(t.settledText.length>0&&u.startsWith(t.settledText)){const m=u.slice(t.settledText.length),b=aa(m,a);h=wv(t.settledBlocks,b)}else h=aa(u,a);const p=f?aa(f,a):[];return t.settledText=u,t.settledBlocks=h,t.settledUpTo=c,t.prevInput=e,wv(h,p)}const yd={start:"0",center:"auto"},N1={start:null,center:"auto"},ZI={k7Eaqz:"xkj4a21",$$css:!0},In={proseWidth:e=>[{ks0D6T:e!=null?"xf68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],proseAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],blockWidth:e=>[ZI,{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`min(${e}, 100%)`)}],blockAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],cellMinWidth:e=>[{k7Eaqz:e!=null?"xkj4a21":e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},kd={center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},he={root:{kMv6JI:"x9ynric",kMwMTN:"x1tgivj0",kLWn49:"xw6l6zx",kGuDYH:"xjm74w1",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:!0},inlineRoot:{k1xSpc:"xt0psk2",kzqmXN:"x14atkfc",ks0D6T:"x1x1rfll",kMv6JI:"xjb2p0i",kMwMTN:"x1heor9g",kLWn49:"x15bjb6t",kGuDYH:"x1qlqyl8",$$css:!0},headingBase:{kMv6JI:"x1g81bgm",kMwMTN:"x1tgivj0",$$css:!0},h1:{kGuDYH:"xcg7oai",k63SB2:"x1v68xuy",kLWn49:"xfmsba7",$$css:!0},h2:{kGuDYH:"x1xvnhcw",k63SB2:"x12yy4cs",kLWn49:"x1cpk1wn",$$css:!0},h3:{kGuDYH:"xii13ha",k63SB2:"x1jcxfy8",kLWn49:"xwjzt0u",$$css:!0},h4:{kGuDYH:"x8tkxat",k63SB2:"x2hcmsi",kLWn49:"xqerer",$$css:!0},h5:{kGuDYH:"xsgqta0",k63SB2:"xno150v",kLWn49:"xo3gurs",$$css:!0},h6:{kGuDYH:"xw5ohdf",k63SB2:"x1pw4frv",kLWn49:"xeixjfn",$$css:!0},spacingHeadingMajorDefault:{keoZOQ:"x13rv44w",k1K539:"xep27e5",$$css:!0},spacingHeadingMinorDefault:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingParagraphDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingCodeblockDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingBlockquoteDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingListDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingTableDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingHrDefault:{keoZOQ:"x13rv44w",k1K539:"x4d5cxa",$$css:!0},spacingImageDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingHeadingMajorCompact:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingHeadingMinorCompact:{keoZOQ:"xj6sv8s",k1K539:"x14cgwvg",$$css:!0},spacingParagraphCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingCodeblockCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingBlockquoteCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingListCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingTableCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingHrCompact:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingImageCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},noMarginBlockStart:{keoZOQ:"xdj266r",$$css:!0},noMarginBlockEnd:{k1K539:"xat24cr",$$css:!0},codeBlockWrapper:{ks0D6T:"x193iq5w",$$css:!0},tableWrapper:{kXHlph:"xw2csxc",ks0D6T:"x193iq5w","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},blockIndent:{kUOVxO:"x1ho7dyk",$$css:!0},hr:{kMzoRj:"xc342km",kEafiO:"x11xkdxz",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}};function jv(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}function ma(e){let t=0;for(const n of e)switch(n.type){case"text":t+=n.content.length;break;case"code":t+=n.content.length;break;case"image":t+=n.alt.length;break;case"bold":case"italic":case"strikethrough":case"link":t+=ma(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function eg(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=ma(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=eg(n.children);break;case"list":for(const s of n.items)t+=eg(s.children);break;case"table":for(const s of n.headers)t+=ma(s.children);for(const s of n.rows)for(const r of s)t+=ma(r.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const YI={1:he.h1,2:he.h2,3:he.h3,4:he.h4,5:he.h5,6:he.h6},QI=/^(javascript|data|vbscript):/i;function tg(e){const t=e.trim();return t.length===0||QI.test(t)?null:t}function JI(e,t){const n=[];for(const l of t){l.pattern.lastIndex=0;let c;for(;(c=l.pattern.exec(e))!==null;){let u;if(l.getEndIndex){const d=l.getEndIndex(e,c);if(d===!1)continue;u=d}else u=c.index+c[0].length;n.push({start:c.index,end:u,match:c,plugin:l})}}n.sort((l,c)=>l.start-c.start);const s=[];let r=0;for(const l of n)l.start>=r&&(s.push(l),r=l.end);if(s.length===0)return[{type:"text",content:e}];const i=[];let a=0;for(let l=0;l<s.length;l++){const c=s[l];c.start>a&&i.push({type:"text",content:e.slice(a,c.start)}),i.push({type:"plugin",element:c.plugin.render(c.match,`plugin-${l}`),matchLength:c.end-c.start}),a=c.end}return a<e.length&&i.push({type:"text",content:e.slice(a)}),i}function Sv(e,t,n){const s=t.offset;if(t.offset+=e.length,!t.active)return e;const r=vI(e,s,t.boundaries,n);if(r==null)return e;const i=r.map(a=>a.fading?o.jsx("span",{className:"x1hc1fzr x19991ni x80gvsz x12w9bfk xlr8y92 x4itv7f",children:a.text},a.key):o.jsx("span",{children:a.text},a.key));return o.jsx("span",{children:i},`wrap-${n}`)}function e_(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function qn(e,t,n,s,r,i="a",a,l){switch(e.type){case"text":{if(a&&a.length>0){const c=JI(e.content,a);if(!(c.length===1&&c[0].type==="text")){const u=[];for(let d=0;d<c.length;d++){const f=c[d];f.type==="text"?u.push(Sv(f.content,s,`${t}-seg-${d}`)):(s.offset+=f.matchLength,u.push(o.jsx(x.Fragment,{children:f.element},`plugin-${t}-${d}`)))}return o.jsx(x.Fragment,{children:u},t)}}return Sv(e.content,s,t)}case"bold":return o.jsx("strong",{className:"x2mo6ok",children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"italic":return o.jsx("em",{children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"strikethrough":return o.jsx("del",{className:"xv1l7n4",children:e.children.map((c,u)=>qn(c,u,n,s,r,i,a,l))},t);case"code":{s.offset+=e.content.length;const c=l==null?void 0:l.inlineCode;return c?o.jsx(c,{children:e.content},t):o.jsx(L0,{children:e.content},t)}case"link":{const c=tg(e.href);if(c==null)return o.jsx("span",{children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t);const u=l==null?void 0:l.link;if(u)return o.jsx(u,{href:c,children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t);const d=c.startsWith("https://")||c.startsWith("http://"),f=n?p=>{n(c,p)===!1&&p.preventDefault()}:void 0,h=d?"a":i;return o.jsx(h,{href:c,onClick:f,...d?{target:"_blank",rel:"noopener noreferrer"}:{},className:"xjse4m1 x1bvjpef",children:e.children.map((p,m)=>qn(p,m,n,s,r,i,a,l))},t)}case"image":{const c=tg(e.src);if(c==null)return o.jsxs("span",{children:["[",e.alt,"]"]},t);const u=l==null?void 0:l.image;return u?o.jsx(u,{src:c,alt:e.alt},t):o.jsx("img",{src:c,alt:e.alt,className:"x193iq5w xh6dtrn"},t)}case"break":return s.offset+=1,o.jsx("br",{},t);case"citation":{if(s.offset+=1,!r)return o.jsxs("span",{children:["[",e.sourceId,"]"]},t);const c=e_(r,e.sourceId),u=r.sources[e.sourceId]??{title:e.sourceId},d=r.style==="number"?"number":"label",f=l==null?void 0:l.citation;return f?o.jsx(f,{source:u,number:c,variant:d},t):o.jsx(i6,{source:u,number:c,variant:d},t)}}}function t_(e,t){const n=t==="compact";switch(e.type){case"heading":return e.level<=3?n?he.spacingHeadingMajorCompact:he.spacingHeadingMajorDefault:n?he.spacingHeadingMinorCompact:he.spacingHeadingMinorDefault;case"paragraph":return n?he.spacingParagraphCompact:he.spacingParagraphDefault;case"codeblock":return n?he.spacingCodeblockCompact:he.spacingCodeblockDefault;case"blockquote":return n?he.spacingBlockquoteCompact:he.spacingBlockquoteDefault;case"list":return n?he.spacingListCompact:he.spacingListDefault;case"table":return n?he.spacingTableCompact:he.spacingTableDefault;case"hr":return n?he.spacingHrCompact:he.spacingHrDefault;case"image":return n?he.spacingImageCompact:he.spacingImageDefault}}function n_(e){return e.headers.map((t,n)=>{let s=ma(t.children);for(const r of e.rows)if(r[n]){const i=ma(r[n].children);i>s&&(s=i)}return s<=6?60:s<=15?80:120})}function yc(e,t,n,s,r,i,a,l,c,u,d="a",f,h,p){const m=N1[u],b=m!=null?In.blockAlign(m):null,y=t_(e,s),g=t===0,k=t===n-1;switch(e.type){case"heading":{const v=Math.min(e.level+r-1,6),w=e.children.map((C,E)=>qn(C,E,i,a,l,d,f,h)),j=h==null?void 0:h.heading;if(j)return o.jsx(j,{level:v,children:w},t);const S=`h${v}`;return o.jsx(S,{...F(U("markdown-heading",{density:s,level:v}),q(he.headingBase,YI[v],y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(yd[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:w},t)}case"paragraph":{const v=e.children.map((j,S)=>qn(j,S,i,a,l,d,f,h)),w=h==null?void 0:h.paragraph;return w?o.jsx(w,{children:v},t):o.jsx("div",{role:"paragraph",...F(U("markdown-paragraph",{density:s}),q(y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(yd[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:v},t)}case"codeblock":{a.offset+=e.content.length;const v=h==null?void 0:h.code;return v?o.jsx(v,{code:e.content,language:e.language},t):o.jsx("div",{...F(U("markdown-codeblock",{density:s}),q(y,he.codeBlockWrapper,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(D0,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[c!=null?In.blockWidth(c):void 0,b]})},t)}case"blockquote":{const v=h==null?void 0:h.blockquote;if(v){const w=e.children.map((j,S)=>yc(j,S,e.children.length,s,r,i,a,l,c,u,d,f,h,p));return o.jsx(v,{children:w},t)}return o.jsx(Z3,{...U("markdown-blockquote",{density:s}),xstyle:[y,c!=null?In.proseWidth(c):void 0,u!=="start"?In.proseAlign(yd[u]):void 0,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd],children:e.children.map((w,j)=>yc(w,j,e.children.length,s,r,i,a,l,c,u,d,f,h,p))},t)}case"list":{if(e.items.length>0&&e.items.every(w=>w.checked!=null)){const w=e.items.map((j,S)=>({item:j,key:`task-${S}`})).filter(({item:j})=>j.checked).map(({key:j})=>j);return o.jsx("div",{...F(U("markdown-list",{density:s}),q(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(Z0,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:w,xstyle:he.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((j,S)=>{const C=j.children[0],T=j.children.length===1&&(C==null?void 0:C.type)==="paragraph"?o.jsx(o.Fragment,{children:C.children.map(($,N)=>qn($,N,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:j.children.map(($,N)=>yc($,N,j.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(Y0,{value:`task-${S}`,label:T},S)})})},t)}return o.jsx("div",{...F(U("markdown-list",{density:s}),q(y,c!=null?In.proseWidth(c):null,u!=="start"?In.proseAlign(yd[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx(ut,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:he.blockIndent,children:e.items.map((w,j)=>{const S=w.children[0],E=w.children.length===1&&(S==null?void 0:S.type)==="paragraph"?o.jsx(o.Fragment,{children:S.children.map((T,$)=>qn(T,$,i,a,l,d,f,h))}):o.jsx(o.Fragment,{children:w.children.map((T,$)=>yc(T,$,w.children.length,s,r,i,a,l,c,u,d,f,h,p))});return o.jsx(_e,{label:E},j)})})},t)}case"table":{const v=n_(e);return o.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...F(U("markdown-table",{density:s}),q(he.tableWrapper,y,c!=null?In.blockWidth(c):null,N1[u]!=null?In.blockAlign(N1[u]):null,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsxs(r6,{dividers:"rows",textOverflow:"wrap",children:[o.jsx(ty,{children:o.jsx(Xf,{children:e.headers.map((w,j)=>o.jsx(ey,{xstyle:[In.cellMinWidth(`${v[j]}px`),e.alignments[j]==="center"&&kd.center,e.alignments[j]==="right"&&kd.end],children:w.children.map((S,C)=>qn(S,C,i,a,l,d,f,h))},j))})}),o.jsx(ny,{children:e.rows.map((w,j)=>{const S=w.map((C,E)=>o.jsx(J0,{xstyle:[e.alignments[E]==="center"&&kd.center,e.alignments[E]==="right"&&kd.end],children:C.children.map((T,$)=>qn(T,$,i,a,l,d,f,h))},E));return o.jsx(Xf,{children:S},j)})})]})},t)}case"hr":{const v=h==null?void 0:h.hr;return v?o.jsx(v,{},t):o.jsx("hr",{...F(U("markdown-hr",{density:s}),q(he.hr,y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd))},t)}case"image":{const v=tg(e.src);if(v==null)return o.jsxs("div",{...F(U("markdown-image",{density:s}),q(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:["[",e.alt,"]"]},t);const w=h==null?void 0:h.image;return w?o.jsx(w,{src:v,alt:e.alt},t):o.jsx("div",{...F(U("markdown-image",{density:s}),q(y,g&&he.noMarginBlockStart,k&&he.noMarginBlockEnd)),children:o.jsx("img",{src:v,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function iy({ref:e,children:t,display:n="block",density:s="default",headingLevelStart:r=1,isStreaming:i=!1,onLinkClick:a,sources:l,citationStyle:c="label",contentWidth:u=680,contentAlign:d="start",components:f,inlinePlugins:h,autolink:p,xstyle:m,className:b,style:y,"data-testid":g}){const k=be(),v=Ri(),w=x.useMemo(()=>l?new Set(Object.keys(l)):void 0,[l]),j=x.useMemo(()=>({sourceIds:w,autolink:p}),[w,p]),S=rN(t,i),C=x.useRef(A1()),E=x.useRef(p);E.current!==p&&(C.current=A1(),E.current=p);const T=x.useMemo(()=>{if(n==="inline")return[];if(i){if(S==="")return C.current=A1(),[];const B=vv(S);return XI(B,C.current,j)}return VI(t,j)},[n,S,t,i,j]),$=x.useMemo(()=>{if(n!=="inline")return[];const B=i?vv(S):t;return NI(B,j)},[n,S,t,i,j]),{token:N}=ex(),A=x.useMemo(()=>{const B=jv(N("--duration-fast-max"))??230,P=jv(N("--duration-fast-min")),X=P!=null?Math.max(4,Math.round(P/10)):50;return Math.min(Math.ceil(B/X),12)},[N]),M=x.useRef([]),I=x.useRef([]),R=x.useRef([]),z=S.length,O={offset:0,boundaries:x.useMemo(()=>{const B=n==="inline"?ma(I.current):eg(M.current),P=bI(R.current,B,A);return R.current=P,P},[n,z,A]),active:i},D=l?{sources:l,numberMap:new Map,nextNumber:1,style:c}:null;if(n==="inline"){const B=o.jsx("span",{ref:e,"data-testid":g,...F(U("markdown",{density:s}),q(he.root,he.inlineRoot,m),b,y),children:$.map((P,X)=>qn(P,X,a,O,D,v,h,f))});return I.current=$,M.current=[],B}const L=o.jsx("div",{role:"document",ref:e,"data-testid":g,...F(U("markdown",{density:s}),q(he.root,m),b,y),children:T.map((B,P)=>yc(B,P,T.length,s,r,a,O,D,u?typeof u=="number"?`${u}px`:u:null,d,v,h,f,k))});return M.current=T,I.current=[],L}iy.displayName="Markdown";const d6=x.createContext(null);d6.displayName="CollapsibleGroupContext";const ng=x.createContext(null);ng.displayName="CollapsibleGroupPresentationContext";function s_(e){const{isCollapsible:t,value:n}=e,s=x.use(d6),r=s!=null&&n!=null,i=t===!0?{}:t||null,a=i!=null,[l,c]=x.useState(()=>r?!0:(i==null?void 0:i.isOpen)!==void 0?i.isOpen:(i==null?void 0:i.defaultIsOpen)??!0);let u;return r&&n!=null?u=s.isOpen(n):(i==null?void 0:i.isOpen)!==void 0?u=i.isOpen:u=l,{isEnabled:a,isOpen:u,toggle:()=>{var h;if(r&&n!=null){s.toggle(n);return}const f=!u;(i==null?void 0:i.isOpen)===void 0&&c(f),(h=i==null?void 0:i.onOpenChange)==null||h.call(i,f)}}}const co={root:{kzqmXN:"xh8yej3",$$css:!0},trigger:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kzqmXN:"xh8yej3",kkrTdU:"x1ypdohk",kMv6JI:"x9ynric",kGuDYH:"x18juvz8",k63SB2:"x2mo6ok",kMwMTN:"x1tgivj0",k9WMMc:"x1yc453h",k8WAf4:"xt970qd",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},triggerDisabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",$$css:!0},contentHidden:{k1xSpc:"x1s85apg",$$css:!0},content:{kLKAdn:"xfsso4q",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",k63SB2:"xxovm9e",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",$$css:!0},divided:{kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},Lo={triggerCompact:{k8WAf4:"xu0wf1k",$$css:!0},triggerBalanced:{k8WAf4:"xce4md1",$$css:!0},triggerSpacious:{k8WAf4:"x8o8v82",$$css:!0},contentCompact:{kGO01o:"xy143xn",$$css:!0},contentBalanced:{kGO01o:"x1wesfrj",$$css:!0},contentSpacious:{kGO01o:"xvmdzux",$$css:!0}},r_={compact:Lo.triggerCompact,balanced:Lo.triggerBalanced,spacious:Lo.triggerSpacious},i_={compact:Lo.contentCompact,balanced:Lo.contentBalanced,spacious:Lo.contentSpacious};function f6({trigger:e,children:t,defaultIsOpen:n,isOpen:s,isDisabled:r=!1,onOpenChange:i,value:a,ref:l,xstyle:c,className:u,style:d,...f}){const h=s!==void 0?{isOpen:s,onOpenChange:i}:{defaultIsOpen:n??!0,onOpenChange:i},{isOpen:p,toggle:m}=s_({isCollapsible:h,value:a}),b=()=>{r||m()},y=x.use(ng),g=(y==null?void 0:y.hasDividers)??!1,k=(y==null?void 0:y.density)??null,v=Ea("chevronDown"),w=x.useId();return o.jsxs("div",{ref:l,...F(U("collapsible",{density:k??void 0}),q(co.root,g&&co.divided,c),u,d),...f,children:[o.jsxs("button",{type:"button",onClick:b,"aria-disabled":r||void 0,"aria-expanded":p,"aria-controls":w,tabIndex:r?-1:void 0,...F(U("collapsible-trigger",{density:k??void 0}),q(co.trigger,k!=null&&r_[k],r&&co.triggerDisabled)),children:[o.jsx("span",{className:"x1b2iylo xwgcxoh",children:e}),o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x7p49u4"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x19jd1h0"}}[!!p<<0],children:v})]}),o.jsx("div",{id:w,...F(U("collapsible-content",{density:k??void 0}),q(co.content,k!=null&&i_[k],!p&&co.contentHidden)),children:y!=null?o.jsx(ng,{value:null,children:t}):t})]})}f6.displayName="Collapsible";const ay=x.createContext(null);ay.displayName="RadioListContext";function h6({ref:e,label:t,isLabelHidden:n=!1,description:s,value:r,onChange:i,orientation:a="vertical",isDisabled:l=!1,disabledMessage:c,isRequired:u=!1,isOptional:d=!1,size:f="md",status:h,labelTooltip:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,htmlName:v,children:w}){const j=x.useId(),S=v??j,C=x.useId(),E=x.useId(),T=x.useId(),$=x.useId(),N=x.useRef(null),A=l&&!!c,M=bs({placement:"above",focusTrigger:"always",isEnabled:A}),I=x.useMemo(()=>({name:S,value:r,onChange:i,isDisabled:l,hasDisabledMessage:A,isRequired:u,size:f,status:h}),[S,r,i,l,A,u,f,h]),R=x.useCallback(z=>{if(r!=="")return;const _=N.current;if(!_)return;const O=z.relatedTarget;if(O){if(_.contains(O))return}else if(document.activeElement&&document.activeElement!==z.target&&_.contains(document.activeElement))return;const D=Array.from(_.querySelectorAll('input[type="radio"]:not([disabled])'));if(D.length===0)return;const L=z.target,B=D.findIndex(Y=>Y===L);if(B===-1)return;const X=B===D.length-1?D[D.length-1]:D[0];L!==X&&X.focus()},[r]);return o.jsxs(Bl,{ref:e,"data-testid":k,label:t,isLabelHidden:n,description:s,inputID:C,labelID:E,isGroupLabel:!0,descriptionID:s?T:void 0,isOptional:d,isRequired:u,isDisabled:l,status:h?{type:h.type,message:h.message,messageID:h.message?$:void 0}:void 0,labelTooltip:p,statusVariant:"detached",width:m,xstyle:b,className:y,style:g,children:[o.jsx("div",{ref:z=>{N.current=z,M.ref(z)},role:"radiogroup","aria-labelledby":E,onFocus:R,"aria-describedby":[s?T:null,h!=null&&h.message?$:null,A?M.describedBy:null].filter(Boolean).join(" ")||void 0,"aria-invalid":(h==null?void 0:h.type)==="error"?!0:void 0,"aria-required":u||void 0,...F(U("radio-list",{orientation:a,size:f}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(a==="vertical")<<0]),children:o.jsx(ay,{value:I,children:w})}),A&&M.renderTooltip(c)]})}h6.displayName="RadioList";const a_={xklqth5:"xklqth5",$$css:!0},Ts={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},radioWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},radio:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kB7OPa:"x9f619",$$css:!0},radioUnchecked:{kVAM5u:"xvy26l8 x70talc",kWkggS:"x10xzikg xy1ay1n",$$css:!0},radioChecked:{kVAM5u:"xad5do xaq2ahg",kWkggS:"x1ewilqj xwnx32n",$$css:!0},radioWrapperFocus:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",kaIpWk:"x16rqkct",$$css:!0},radioDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s",$$css:!0},radioDisabledUnchecked:{kWkggS:"xwmxj5m",$$css:!0},innerDot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05 xwvh9j7",$$css:!0}},$v={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},o_={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},l_={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},c_={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function x6({ref:e,label:t,value:n,description:s,isDisabled:r=!1,startContent:i,endContent:a,xstyle:l,className:c,style:u,...d}){const f=x.use(ay);if(!f)throw new Error("RadioListItem must be used within an RadioList");const h=x.useId(),p=x.useId(),m=f.isDisabled||r,b=f.hasDisabledMessage&&!r,y=f.value===n,g=f.size,k=o.jsxs("div",{...q(Ts.radioWrapper,$v[g],!m&&Ts.radioWrapperFocus),children:[o.jsx("input",{id:h,type:"radio",name:f.name,value:n,checked:y,disabled:m&&!b,"aria-disabled":b?"true":void 0,form:b?"":void 0,required:f.isRequired,onChange:()=>{m||f.onChange(n)},"aria-describedby":s?p:void 0,...q(Ts.input,$v[g],m&&Ts.inputDisabled)}),o.jsx("div",{"aria-hidden":"true",...F(U("radio",{size:g,checked:y?"checked":null,disabled:m?"disabled":null}),q(Ts.radio,o_[g],y?Ts.radioChecked:Ts.radioUnchecked,m&&Ts.radioDisabled,m&&!y&&Ts.radioDisabledUnchecked)),children:y&&o.jsx("div",{...F(U("radio-dot",{size:g}),q(Ts.innerDot,l_[g]))})})]}),v=i!=null?o.jsxs(o.Fragment,{children:[k,i]}):k;return o.jsx("div",{ref:e,...F(U("radio-list-item"),q(Ts.container,!m&&a_,l),c,u),...d,children:o.jsx(Fa,{startContent:v,label:o.jsx("label",{htmlFor:h,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!m<<0],children:t}),description:s!=null?o.jsx("span",{id:p,children:s}):void 0,endContent:a,xstyle:c_.root})})}x6.displayName="RadioListItem";const u_=50,d_=40,p6="astryx-resizable:";function bd(e,t,n,s){const r=Math.min(n,Math.max(t,e));if(s.length>0){let i=s[0],a=Math.abs(r-i);for(let l=1;l<s.length;l++){const c=Math.abs(r-s[l]);c<a&&(i=s[l],a=c)}return Math.min(n,Math.max(t,i))}return r}function f_(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(p6+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function h_(e,t){if(!(typeof window>"u"))try{localStorage.setItem(p6+e,JSON.stringify(t))}catch{}}function x_(e){if(e==null)return 250;if(typeof e=="number")return e;if(e.endsWith("%")){const t=parseFloat(e);if(!isNaN(t)){const n=typeof window<"u"?window.innerWidth:1200;return Math.round(t/100*n)}}return 250}function g6(e){const{defaultSize:t,minSizePx:n=u_,maxSizePx:s=1/0,collapsible:r=!1,collapsedSize:i=d_,snaps:a=[],autoSaveId:l,onSizeChange:c,onCollapseChange:u}=e,d=x_(t),f=l?f_(l):null,h=f??d,[p,m]=x.useState(()=>bd(h,n,s,a)),[b,y]=x.useState(()=>f===0&&r),g=x.useRef(p),k=x.useRef(p);x.useEffect(()=>{l&&h_(l,b?0:p)},[p,b,l]);const v=x.useCallback(()=>{r&&(g.current=p,y(!0),m(0),u==null||u(!0),c==null||c(0))},[r,p,u,c]),w=x.useCallback(()=>{y(!1);const $=g.current||d,N=bd($,n,s,a);m(N),u==null||u(!1),c==null||c(N)},[d,n,s,a,u,c]),j=x.useCallback($=>{const N=bd($,n,s,a);m(N),y(!1),c==null||c(N)},[n,s,a,c]),S=x.useCallback(()=>{k.current=b?0:p},[p,b]),C=x.useCallback($=>{const N=k.current+$;if(r&&N<i){b||(g.current=p,u==null||u(!0)),y(!0),m(0),c==null||c(0);return}b&&N>=i&&(y(!1),u==null||u(!1));const A=bd(N,n,s,a);m(A),c==null||c(A)},[r,i,b,p,n,s,a,c,u]),E=x.useCallback(()=>{},[]);return{size:b?0:p,isCollapsed:b,collapse:v,expand:w,resize:j,props:{_size:b?0:p,_isCollapsed:b,_onResizeStart:S,_onResizeMove:C,_onResizeEnd:E,_minSizePx:n,_maxSizePx:s,_snaps:a,_collapsedSize:i,_collapsible:r,_isResizableProps:!0}}}function p_(e){const{regions:t,autoSaveId:n}=e,s=Object.entries(t),r=s.map(([a,l])=>g6({...l,autoSaveId:n?`${n}:${a}`:void 0})),i={};return s.forEach(([a],l)=>{i[a]=r[l]}),i}function m6(e){return"regions"in e?p_(e):g6(e)}const g_=10,m_=50;function y_(e,t,n){if(e!=="auto")return e;const s=t?"end":"start";return n?s==="start"?"end":"start":s}function k_(e){return e==="center"?null:e==="start"?-1:1}const ot={handle:{kVAEAm:"x1n2onr6",kmuXW:"x2lah0s",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kWkggS:"x1m4xfpy",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz x17nn4n9",kInvED:"xh2nty3",$$css:!0},overlay:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kWkggS:"xjbqb8w",$$css:!0},overlayHorizontal:{kt4wiu:"xtijo5x",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kzqmXN:"xkhob8h",$$css:!0},overlayVertical:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kZKoxP:"x5kfih4",$$css:!0},horizontal:{kzqmXN:"x1i1rx1s",kZKoxP:"x5yr21d",kkrTdU:"xicojor",$$css:!0},vertical:{kZKoxP:"xjm9jq1",kzqmXN:"xh8yej3",kkrTdU:"xyozgr7",$$css:!0},noDividerHorizontal:{kWkggS:"xjbqb8w",kzqmXN:"xnalus7",$$css:!0},noDividerVertical:{kWkggS:"xjbqb8w",kZKoxP:"xqtp20y",$$css:!0},handleHover:{kWkggS:"x1m4xfpy",$$css:!0},handleActive:{kWkggS:"x7njt3n",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kfzvcC:"x47corl",$$css:!0},hitArea:{kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",kFalU9:"x5ve5x3",kfSwDN:"x87ps6o",$$css:!0},hitAreaHorizontal:{kzqmXN:"x12xnipv",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kkrTdU:"xicojor",$$css:!0},hitAreaVertical:{kZKoxP:"x6b6gus",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kkrTdU:"xyozgr7",$$css:!0},hitAreaCenteredY:{k87sOh:"xwa60dl",k3aq6I:"x1cb1t30",$$css:!0},pill:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kfzvcC:"x47corl",kaIpWk:"xjspbzw",kWkggS:"x1m4xfpy",k1ekBW:"x1wbls7o",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",k87sOh:"xwa60dl",$$css:!0},pillHorizontal:{kzqmXN:"x1g8rjiy",kZKoxP:"x18to7ep",$$css:!0},pillVertical:{kzqmXN:"xgc8j7m",kZKoxP:"xuoj239",$$css:!0},pillHidden:{kSiTet:"xg01cxk",$$css:!0},pillVisible:{kSiTet:"x1hc1fzr",$$css:!0},pillHover:{kSiTet:"x1hc1fzr",kWkggS:"x1m4xfpy",$$css:!0},pillActive:{kSiTet:"x1hc1fzr",kWkggS:"x7njt3n",$$css:!0}},b_={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},v_={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},w_={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},j_={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},vd={hitAreaOffsetX:e=>[b_,{"--x-qthpiu":`translate(calc(${e} * (3px + ${is["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${is["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${is["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${is["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[v_,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${is["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${is["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[w_,{"--x-transform":`translate(calc(${e} * (100% + ${is["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${is["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[j_,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${is["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${is["--spacing-1"]})))`:void 0}]};function oy({direction:e="horizontal",position:t="inline",isReversed:n=!1,isDisabled:s=!1,hasDivider:r=!1,isAlwaysVisible:i=!0,pillPlacement:a="auto",label:l,resizable:c,children:u,xstyle:d,className:f,ref:h,...p}){const m=be(),b=l??m("@astryx.resizable.handle.label"),y=x.useRef(null),g=x.useRef(null),[k,v]=x.useState(!1),[w,j]=x.useState(!1),[S,C]=x.useState(!1),E=e==="horizontal",T=t==="overlay",$=n?-1:1,N=y_(a,n,(c==null?void 0:c._isCollapsed)??!1),A=k_(N),M=x.useCallback(()=>{const X=y.current;return X&&getComputedStyle(X).direction==="rtl"?-1:1},[]),I=w||S,R=x.useCallback(X=>{if(s||!c)return;X.preventDefault(),X.stopPropagation(),v(!0),c._onResizeStart();const Y=E?X.clientX:X.clientY,Z=E?M():1;document.body.style.cursor=E?"col-resize":"row-resize",document.body.style.userSelect="none";const ne=le=>{const ge=((E?le.clientX:le.clientY)-Y)*Z*$;c._onResizeMove(ge)},J=()=>{ie(),v(!1),c._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},K=()=>{ie(),v(!1),document.body.style.cursor="",document.body.style.userSelect=""};function ie(){window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",K),g.current=null}window.addEventListener("pointermove",ne),window.addEventListener("pointerup",J),window.addEventListener("pointercancel",K),g.current=ie},[s,c,E,M,$]),z=x.useCallback(X=>{if(s||!c)return;const Y=X.shiftKey?m_:g_,Z=E?M():1;switch(X.key){case"ArrowRight":case"ArrowDown":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(Y*(E?Z:1)*$),c._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(-Y*(E?Z:1)*$),c._onResizeEnd();break}case"Home":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(c._minSizePx-c._size),c._onResizeEnd();break}case"End":{X.preventDefault(),c._maxSizePx!==1/0&&(c._onResizeStart(),c._onResizeMove(c._maxSizePx-c._size),c._onResizeEnd());break}case"Enter":{X.preventDefault(),c._collapsible&&(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd());break}}},[s,c,E,M,$]),_=x.useCallback(()=>{s||!c||!c._collapsible||(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd())},[s,c]);x.useEffect(()=>()=>{g.current&&(g.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const O=(c==null?void 0:c._isCollapsed)??!1,D=c?O?Math.max(c._size,c._minSizePx):c._size:void 0,L=c?c._minSizePx:void 0,B=c&&c._maxSizePx!==1/0?c._maxSizePx:void 0,P=c&&O?m("@astryx.resizable.collapsed"):void 0;return o.jsxs("div",{ref:it(h,y),role:"separator","aria-orientation":E?"vertical":"horizontal","aria-valuenow":D,"aria-valuemin":L,"aria-valuemax":B,"aria-valuetext":P,"aria-label":b,"aria-disabled":s||void 0,tabIndex:s?-1:0,onDoubleClick:_,onFocus:()=>C(!0),onBlur:()=>C(!1),"data-resizing":k||void 0,...F(U("resize-handle"),q(ot.handle,T&&ot.overlay,T&&(E?ot.overlayHorizontal:ot.overlayVertical),!T&&(E?ot.horizontal:ot.vertical),!T&&!r&&(E?ot.noDividerHorizontal:ot.noDividerVertical),!T&&r&&I&&!k&&ot.handleHover,!T&&r&&k&&ot.handleActive,s&&ot.disabled,d),f),...p,onKeyDown:X=>{var Y;(Y=p.onKeyDown)==null||Y.call(p,X),z(X)},children:[o.jsx("div",{...q(ot.hitArea,E?ot.hitAreaHorizontal:ot.hitAreaVertical,A==null?E?dl.centerInline("0px"):ot.hitAreaCenteredY:E?vd.hitAreaOffsetX(A):vd.hitAreaOffsetY(A),s&&ot.disabled),onPointerDown:R,onPointerEnter:()=>j(!0),onPointerLeave:()=>{k||j(!1)}}),u??o.jsx("div",{...F(U("resize-handle-pill"),q(ot.pill,E?ot.pillHorizontal:ot.pillVertical,N==="center"?dl.centerInline("-50%"):E?vd.pillOffsetX(N==="start"?-1:1):vd.pillOffsetY(N==="start"?-1:1),i?ot.pillVisible:ot.pillHidden,I&&!k&&ot.pillHover,k&&ot.pillActive))})]})}oy.displayName="ResizeHandle";const uo={dialog:{kVAEAm:"xixxii4",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"x1dr59a3",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kI3sdo:"x1a2a7pz",kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},image:{ks0D6T:"x193iq5w",kskxy:"xmz0i5r",kVIFPx:"x19kjcj4",kfzvcC:"x47corl",k1ekBW:"x11xpdln",kIyJzY:"x13dflua x12w9bfk",kAMwcw:"x9lcvmn",$$css:!0},imageDragging:{k1ekBW:"x13b0p5u",$$css:!0},controlButton:{kMwMTN:"x9e3rv5",$$css:!0}},S_={imageTransform:e=>[{k3aq6I:e!=null?"xsqj5wx":e,$$css:!0},{"--x-transform":e??void 0}]},wd=50,Cv={ArrowLeft:[wd,0],ArrowRight:[-wd,0],ArrowUp:[0,wd],ArrowDown:[0,-wd]};function y6({isOpen:e,onOpenChange:t,media:n,index:s,defaultIndex:r=0,onIndexChange:i,hasZoom:a=!1,hasAutoPlay:l=!1,xstyle:c,className:u,style:d,ref:f,onClick:h,onKeyDown:p,...m}){const b=be(),y=x.useRef(null),g=x.useRef(null),k=x.useRef(null),v=x.useRef(null),w=s!==void 0,[j,S]=x.useState(r),C=w?s:j,E=x.useCallback(se=>{w||S(se),i==null||i(se)},[w,i,S]),[T,$]=x.useState(1),[N,A]=x.useState({x:0,y:0}),[M,I]=x.useState(!1),R=x.useRef({x:0,y:0,panX:0,panY:0}),z=x.useMemo(()=>Array.isArray(n)?n:[n],[n]),_=z.length>1,O=z.length>0?z[Math.min(C,z.length-1)]:null,L=((O==null?void 0:O.type)??"image")==="video",B=_&&C>0,P=_&&C<z.length-1;l4(e),x.useEffect(()=>{$(1),A({x:0,y:0})},[C,O==null?void 0:O.src]);const X=Ll(),Y=x.useRef(C),Z=x.useRef(e);x.useEffect(()=>{const se=Y.current!==C,tn=Z.current;if(Y.current=C,Z.current=e,!se||!e||!tn)return;const un=z[Math.min(C,z.length-1)],$s=`${C+1} of ${z.length}`;X(un!=null&&un.alt?`${un.alt}, ${$s}`:`Image ${$s}`)},[C,e,X,z]),ar(()=>{const se=y.current;se&&(e&&!se.open?(v.current=document.activeElement,se.showModal()):!e&&se.open&&(se.close(),v.current instanceof HTMLElement&&v.current.focus()))},[e]);const ne=x.useCallback(()=>{t(!1)},[t]),J=x.useCallback(se=>{se.preventDefault(),ne()},[ne]),K=x.useRef(!1),ie=x.useCallback(se=>{if(K.current){K.current=!1;return}(se.target===se.currentTarget||se.target===g.current)&&ne()},[ne]),le=x.useCallback(()=>{B&&E(C-1)},[B,C,E]),ve=x.useCallback(()=>{P&&E(C+1)},[P,C,E]),ge=x.useCallback(se=>{!a||L||se===T||($(se),A({x:0,y:0}),X(se>1?b("@astryx.lightbox.zoomedIn"):b("@astryx.lightbox.zoomedOut")))},[a,L,T,X,b]),xe=x.useCallback(()=>{ge(T===1?2:1)},[ge,T]),ce=x.useCallback(se=>{if(a&&!L){if(se.key==="+"||se.key==="="){se.preventDefault(),ge(2);return}if(se.key==="-"){se.preventDefault(),ge(1);return}if(T>1&&Cv[se.key]!==void 0){se.preventDefault();const[tn,un]=Cv[se.key];A($s=>({x:$s.x+tn,y:$s.y+un}));return}}se.key==="ArrowLeft"?(se.preventDefault(),le()):se.key==="ArrowRight"&&(se.preventDefault(),ve())},[a,L,T,ge,le,ve]),Q=x.useCallback(se=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),xe())},[xe]),ye=x.useCallback(se=>{T<=1||!a||(I(!0),K.current=!1,R.current={x:se.clientX,y:se.clientY,panX:N.x,panY:N.y})},[T,a,N]);x.useEffect(()=>{if(!M)return;const se=un=>{K.current=!0;const $s=un.clientX-R.current.x,Mn=un.clientY-R.current.y;A({x:R.current.panX+$s,y:R.current.panY+Mn})},tn=()=>{I(!1)};return window.addEventListener("pointermove",se),window.addEventListener("pointerup",tn),()=>{window.removeEventListener("pointermove",se),window.removeEventListener("pointerup",tn)}},[M]);const ue=T>1,pe=a&&!L,Le=T===1?null:`scale(${T}) translate(${N.x/T}px, ${N.y/T}px)`;return O?o.jsx("dialog",{ref:it(f,y),onCancel:J,onClick:se=>{ie(se),h==null||h(se)},onKeyDown:se=>{ce(se),p==null||p(se)},"aria-label":O.alt||b("@astryx.lightbox.mediaViewer"),...F(U("lightbox"),q(uo.dialog,c),u,d),...m,children:o.jsxs("div",{ref:g,className:"x78zum5 xdt5ytf x6s0dn4 xl56j7k xh8yej3 x5yr21d x1n2onr6",children:[o.jsx("div",{className:"x10l6tqk xyx6v2t x1mcfs9z x1vjfegm",children:o.jsx(kn,{icon:o.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:b("@astryx.lightbox.close"),variant:"ghost",onClick:ne,xstyle:uo.controlButton})}),_&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1ybfrjj",children:o.jsx(kn,{icon:o.jsx("span",{...q(dl.mirror),children:o.jsx(Ce,{icon:"chevronLeft",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.previous"),variant:"ghost",isDisabled:!B,onClick:le,xstyle:uo.controlButton})}),o.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 x193iq5w xmz0i5r xb3r6kr",children:[o.jsx("div",{ref:k,role:pe?"button":void 0,tabIndex:pe?0:void 0,"aria-pressed":pe?ue:void 0,"aria-label":pe?b("@astryx.lightbox.zoom"):void 0,...{0:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j"},8:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"},4:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1huxd7x x2dt3px"},12:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1huxd7x x2dt3px"},2:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},10:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},6:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},14:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},1:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},9:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},5:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},13:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},3:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},11:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},7:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},15:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"}}[!!pe<<3|!!(!L&&a&&!ue)<<2|!!(!L&&ue)<<1|!!(!L&&M)<<0],onDoubleClick:L?void 0:xe,onKeyDown:pe?Q:void 0,onPointerDown:L?void 0:ye,children:L?o.jsx("video",{src:O.src,"aria-label":O.alt,controls:!0,autoPlay:l,className:"x193iq5w xmz0i5r x19kjcj4 x1a2a7pz"}):o.jsx("img",{src:O.src,alt:O.alt,draggable:!1,...q(uo.image,M&&uo.imageDragging,Le!=null&&S_.imageTransform(Le))})}),O.caption&&o.jsx("div",{className:"x9e3rv5 x18juvz8 xf74fhv x2b8uid x1xye8es x18d9i69 xrrkdod xrlsmeg x2lah0s",children:O.caption})]}),_&&o.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1mcfs9z",children:o.jsx(kn,{icon:o.jsx("span",{...q(dl.mirror),children:o.jsx(Ce,{icon:"chevronRight",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.next"),variant:"ghost",isDisabled:!P,onClick:ve,xstyle:uo.controlButton})}),_&&z.length>1&&o.jsxs("div",{className:"x10l6tqk xyx6v2t x1ybfrjj x9e3rv5 xjm74w1 xw6l6zx x1vjfegm",children:[C+1," / ",z.length]})]})}):null}y6.displayName="Lightbox";const _n={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85",kMv6JI:"xjb2p0i",kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",k63SB2:"x1pd3egz",kybGjl:"x1hl2dhg x4ohgrr",kkrTdU:"x1ypdohk",k1ekBW:"x1mpt4pi",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},buttonReset:{kWkggS:"xjbqb8w",ksu8eU:"xng3xce",kmVPX3:"x1717udv",kfzvcC:"x67bb7w",kVAEAm:"x1n2onr6",$$css:!0},hasUnderline:{kybGjl:"x1bvjpef",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},standalone:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0}},M1={primary:{kMwMTN:"x1tgivj0 x4z56r7",$$css:!0},secondary:{kMwMTN:"xv1l7n4 x7ruf5d",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1 x17qfo7y",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}};function $_(e){e.preventDefault()}function k6({as:e,label:t,href:n,hasUnderline:s=!1,isDisabled:r=!1,isExternalLink:i=!1,newTabLabel:a,target:l,onClick:c,tooltip:u,isStandalone:d=!1,type:f="body",size:h,weight:p,color:m="accent",display:b="inline",maxLines:y=0,children:g,rel:k,xstyle:v,className:w,style:j,ref:S,...C}){const E=be(),T=a??E("@astryx.link.newTab"),$=Ri(e),N=d4({href:n,onClick:c,isDisabled:r}),{target:A,rel:M}=e4(i?"_blank":l,k),I=N==="button"||N==="inert"&&n==null,R=o.jsxs(o.Fragment,{children:[o.jsx(ee,{type:f,size:h,weight:p,color:m,display:b,maxLines:y,children:g}),i&&!I&&o.jsxs(o.Fragment,{children:[o.jsx(Ce,{icon:"externalLink",size:"xsm",color:"inherit"}),o.jsx(Mi,{children:T})]})]});let z;return I?z=o.jsx("button",{ref:S,type:"button",onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,disabled:r,...F(U("link",{color:m}),q(_n.base,_n.buttonReset,M1[m],s&&_n.hasUnderline,d&&_n.standalone,r&&_n.disabled,v),w,j),...C,children:R}):r?z=o.jsx("a",{ref:S,onClick:$_,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...F(U("link",{color:m}),q(_n.base,M1[m],s&&_n.hasUnderline,d&&_n.standalone,_n.disabled,v),w,j),...C,children:R}):z=o.jsx($,{ref:S,href:n,target:A,rel:M,onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,...F(U("link",{color:m}),q(_n.base,M1[m],s&&_n.hasUnderline,d&&_n.standalone,r&&_n.disabled,v),w,j),...C,children:R}),u?o.jsx(Ga,{content:u,placement:"above",children:z}):z}k6.displayName="Link";const C_={x1iwu4tg:"x1iwu4tg",$$css:!0},E_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},T_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},z_={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",kmVPX3:"x1i3ajwb",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",kmVPX3:"xfawy5m",$$css:!0}},A_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",k3aq6I:"xbryuvx",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xbryuvx",$$css:!0}},N_={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xv5t66b xi9aj42",$$css:!0},md:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",k3aq6I:"x15481yp x12xz5k6",$$css:!0}},M_={sm:{kAzted:"xisnujt",$$css:!0},md:{kAzted:"xjwf9q1",$$css:!0}},nn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerSpread:{kjj79g:"x1qughib",kzqmXN:"xh8yej3",$$css:!0},switchWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},inputBusy:{kfzvcC:"x47corl",$$css:!0},track:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kaIpWk:"xjspbzw",k1ekBW:"x15406qy",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kB7OPa:"x9f619",kMzoRj:"xc342km x13rsnn2",ksu8eU:"xng3xce xx61lck",kVAM5u:"x1w1tqly",$$css:!0},trackFocus:{kI3sdo:"x1a2a7pz x1gj1ihy",kInvED:"x1edzap1",$$css:!0},trackOff:{kWkggS:"xspzpui x1a8ae7b x9yvj25",$$css:!0},trackOn:{kWkggS:"x1ewilqj xcgwt1n x1jzqe4",$$css:!0},trackDisabled:{kSiTet:"xbyyjgo",kVAM5u:"xmnqt3w",$$css:!0},trackDisabledOff:{kWkggS:"xspzpui",$$css:!0},thumb:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xjspbzw",k1ekBW:"xh3q6i0",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},thumbOff:{kWkggS:"x10xzikg xwvh9j7",$$css:!0},thumbOn:{kWkggS:"x10xzikg x1sir5s4",$$css:!0},labelWrapper:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kjj79g:"xl56j7k",$$css:!0}},R_={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function b6({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:a,isDisabled:l=!1,htmlName:c,disabledMessage:u,isOptional:d=!1,isRequired:f=!1,onFocus:h,onBlur:p,labelIcon:m,labelTooltip:b,labelPosition:y="end",labelSpacing:g="hug",status:k,size:v="md",width:w,xstyle:j,className:S,style:C,ref:E,...T}){const $=x.useId(),N=x.useId(),A=x.useId(),[,M]=x.useTransition(),[I,R]=x.useOptimistic(a),z=i||I!==a,_=I===!0,O=l&&!!u,D=bs({placement:"above",focusTrigger:"always",isEnabled:O}),L=[];n&&L.push(N),k!=null&&k.message&&L.push(A),O&&L.push(D.describedBy);const B=L.length>0?L.join(" "):void 0,P=o.jsxs("div",{...q(nn.switchWrapper,E_[v]),children:[o.jsx("input",{ref:it(E,D.positionRef),id:$,type:"checkbox",role:"switch",name:l?void 0:c,checked:_,disabled:l&&!O,"aria-disabled":O?"true":void 0,required:f,onChange:Y=>{if(l||z)return;const Z=Y.target.checked;s==null||s(Z,Y),r&&!Y.defaultPrevented&&M(async()=>{R(Z),await r(Z,Y)})},onFocus:h,onBlur:p,"aria-describedby":B,"aria-invalid":(k==null?void 0:k.type)==="error"?!0:void 0,"aria-busy":z||void 0,...q(nn.input,T_[v],l&&nn.inputDisabled,z&&nn.inputBusy)}),o.jsx("div",{"aria-hidden":"true",...F(U("switch",{checked:_?"checked":null,disabled:l?"disabled":null,size:v}),q(nn.track,z_[v],_?nn.trackOn:nn.trackOff,!l&&nn.trackFocus,l&&nn.trackDisabled,l&&!_&&nn.trackDisabledOff)),children:o.jsx("div",{...F(U("switch-thumb",{checked:_?"checked":null,size:v}),q(nn.thumb,_?N_[v]:A_[v],_?nn.thumbOn:nn.thumbOff)),children:z&&o.jsx(on,{size:"sm"})})}),z&&o.jsx(Mi,{role:"status",children:"Loading"})]}),X=o.jsx("div",{...q(nn.labelWrapper,M_[v]),children:o.jsx(ox,{label:e,inputID:$,isLabelHidden:t,isDisabled:l,isOptional:d,isRequired:f,labelIcon:m,labelTooltip:b,description:n,descriptionID:N})});return o.jsxs("div",{...F(U("switch-field",{labelPosition:y!=="end"?y:void 0,labelSpacing:g!=="hug"?g:void 0}),q(w!=null&&R_.width(w),j),S,C),...T,children:[o.jsxs("div",{ref:Y=>{D.interactionRef(Y)},...q(nn.container,g==="spread"&&nn.containerSpread,!l&&C_),children:[" ",y==="start"?o.jsxs(o.Fragment,{children:[X,P]}):o.jsxs(o.Fragment,{children:[P,X]})]}),(k==null?void 0:k.message)&&o.jsx("div",{className:"xtbrsbv",children:o.jsx(lx,{type:k.type,message:k.message,id:A,variant:"detached"})}),O&&D.renderTooltip(u)]})}b6.displayName="Switch";const ly=x.createContext(null);ly.displayName="SegmentedControlContext";function I_(){const e=x.use(ly);if(e==null)throw new Error("useSegmentedControlContext must be used within SegmentedControl. Wrap your SegmentedControlItem in <SegmentedControl>.");return e}const jd={container:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85","--_segmented-control-padding":"x18jk3ff",kmVPX3:"xpoxszi",kWkggS:"x17x4s8c",$$css:!0},fill:{k1xSpc:"x78zum5",kzqmXN:"xh8yej3",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},disabledWithMessage:{kSiTet:"xbyyjgo",$$css:!0}},__={sm:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},md:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},lg:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0}};function v6({ref:e,value:t,onChange:n,label:s,size:r,layout:i="hug",isDisabled:a=!1,disabledMessage:l,children:c,xstyle:u,className:d,style:f,onKeyDown:h,onFocus:p,onBlur:m,...b}){const y=Pa(r,"md"),g=a&&!!l,k=bs({placement:"above",focusTrigger:"always",isEnabled:g}),{listRef:v,handleKeyDown:w,handleFocus:j}=Ua({itemSelector:'[role="radio"]:not([aria-disabled="true"])',hasRovingTabIndex:!0,wrap:!0,orientation:"horizontal"}),S=o4({orientation:"horizontal",isEnabled:!a}),C=x.useCallback($=>{h==null||h($),!$.defaultPrevented&&(S.onKeyDown($),w($))},[h,S,w]),E=x.useCallback($=>{var M;if(p==null||p($),$.defaultPrevented||(S.onFocus($),j($),a)||!$.currentTarget.contains($.relatedTarget))return;const N=(M=$.target)==null?void 0:M.closest('[role="radio"][data-value]');if(!N||N.getAttribute("aria-disabled")==="true")return;const A=N.dataset.value;A!=null&&A!==t&&n(A)},[p,S,j,a,n,t]),T=x.useMemo(()=>({value:t,onChange:n,size:y,layout:i,isDisabled:a,hasDisabledMessage:g}),[t,n,y,i,a,g]);return o.jsxs(ly,{value:T,children:[o.jsxs("div",{ref:it(e,v,k.ref),...b,role:"radiogroup","aria-label":s,"aria-disabled":a||void 0,"aria-describedby":g?k.describedBy:void 0,onKeyDown:C,onFocus:E,onBlur:Yh(m,S.onBlur),...F(U("segmented-control",{size:y}),q(jd.container,__[y],i==="fill"&&jd.fill,a&&(g?jd.disabledWithMessage:jd.disabled),u),d,f),children:[c,S.hintElement]}),g&&k.renderTooltip(l)]})}v6.displayName="SegmentedControl";const fo={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",k1ekBW:"x1vix5yk",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hover:{kWkggS:"xe9uy6x",$$css:!0},selected:{kAXs8y:"x1kzknox",kMwMTN:"x1tgivj0 x1k5gbb1",k63SB2:"x2mo6ok",kWkggS:"x10xzikg x1jzqe4",kGVxlE:"x1i5ehqx",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kMwMTN:"xnbbluu",$$css:!0},fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},O_={sm:{kZKoxP:"xzj98nu",kaIpWk:"xc910v0",kg3NbH:"xf314gf",kGuDYH:"x141an7d",$$css:!0},md:{kZKoxP:"x184gfjb",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0},lg:{kZKoxP:"x1uiybsj",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0}},D_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function sg({ref:e,value:t,label:n,isLabelHidden:s=!1,icon:r,isDisabled:i=!1,onClick:a,xstyle:l,...c}){const u=I_(),d=u.value===t,f=i||u.isDisabled,h=d&&(u.hasDisabledMessage??!1)&&!i,p=u.size,m=u.layout==="fill",b=Yh(a,()=>{!f&&!d&&u.onChange(t)}),y=r?o.jsx("span",{...q(fo.icon,D_[p]),children:r}):null;return o.jsxs("button",{ref:e,...c,type:"button",role:"radio","aria-checked":d,"aria-disabled":f||void 0,"aria-label":s?n:void 0,"data-value":t,tabIndex:d&&!f||h?0:-1,onClick:b,...F(U("segmented-control-item",{size:p,selected:d?"selected":null,disabled:f?"disabled":null}),q(fo.base,O_[p],m&&fo.fill,d&&fo.selected,!d&&!f&&fo.hover,f&&fo.disabled,l)),children:[y,!s&&o.jsx("span",{children:n})]})}sg.displayName="SegmentedControlItem";const cy=x.createContext(null);cy.displayName="TabListContext";function L_(){const e=x.use(cy);if(e==null)throw new Error("useTabListContext must be used within TabList. Wrap your Tab/TabMenu in <TabList>.");return e}const B_="[data-tab-value],[data-tab-menu]",R1={nav:{k1xSpc:"x78zum5",kGNEyG:"x1qjc9v5",kOIVth:"x1lsbc85",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",$$css:!0},fill:{kzqmXN:"xh8yej3",$$css:!0},divider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",kGO01o:"xy143xn","--_tab-indicator-bottom":"xficto1",$$css:!0}};function w6({ref:e,value:t,onChange:n,size:s,layout:r="hug",hasDivider:i=!1,xstyle:a,className:l,style:c,children:u,onKeyDown:d,onFocus:f,onBlur:h,"aria-label":p,"aria-orientation":m,[Ff]:b,...y}){const g=be(),k=p??g("@astryx.tabList.label"),v=Pa(s,"md"),{listRef:w,handleKeyDown:j,handleFocus:S}=Ua({itemSelector:B_,orientation:"both",hasRovingTabIndex:!0}),{hintElement:C,onKeyDown:E,onFocus:T,onBlur:$}=o4(),N=x.useMemo(()=>({value:t,onChange:n,size:v,layout:r}),[t,n,v,r]),A=x.useCallback(R=>{d==null||d(R),!R.defaultPrevented&&(E(R),j(R))},[d,E,j]),M=x.useCallback(R=>{f==null||f(R),!R.defaultPrevented&&(T(R),S(R))},[f,T,S]),I=x.useCallback(R=>{h==null||h(R),!R.defaultPrevented&&$(R)},[h,$]);return o.jsx(cy,{value:N,children:o.jsxs("nav",{ref:it(e,w),...y,"aria-label":k,onKeyDown:A,onFocus:M,onBlur:I,[Ff]:"",...F(U("tab-list",{size:v}),q(R1.nav,r==="fill"&&R1.fill,i&&R1.divider,a),l,c),children:[u,C]})})}w6.displayName="TabList";const q_={x1u3b27q:"x1u3b27q",$$css:!0},Sd={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xh6dtrn",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",kybGjl:"x1hl2dhg",khDVqt:"xuxw1ft",k1ekBW:"xt3l3uh",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hoverBg:{kVAEAm:"x10l6tqk",kpwlN0:"x10a8y8t",kogj98:"x1bpp3o7",kzqmXN:"xh8yej3",kaIpWk:"xh6dtrn",kfzvcC:"x47corl",kWkggS:"xjbqb8w x1a1zr74",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},selected:{kMwMTN:"x1tgivj0",k63SB2:"x2mo6ok",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},H_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},P_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},U_={fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0}},F_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function af({as:e,ref:t,value:n,label:s,isLabelHidden:r=!1,href:i,icon:a,selectedIcon:l,endContent:c,xstyle:u,className:d,style:f,...h}){const p=L_(),m=Ri(e),b=p.value===n,y=p.size,g=p.layout==="fill",k=b&&l?l:a,v=!r&&s!=="",w=x.useCallback(()=>{p.onChange(n)},[p,n]),j=k?o.jsx("span",{...q(Sd.icon,F_[y]),children:k}):null,S={...h,...r?{"aria-label":s}:{},[Ff]:"","data-tab-value":n,"aria-current":b?"page":void 0,tabIndex:b?0:-1,...F(U("tab",{selected:b?"selected":null}),q(Sd.base,H_[y],b&&Sd.selected,g&&U_.fill,q_,u),d,f)},C=o.jsx("span",{"aria-hidden":"true",...q(Sd.hoverBg,P_[y])}),E=o.jsx("span",{...F(U("tab-indicator",{selected:b?"selected":null}),{0:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 xjbqb8w xg01cxk"},1:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 x1ewilqj x1hc1fzr"}}[!!b<<0])}),T=v?o.jsxs("span",{className:"xwz0xwf",children:[o.jsx("span",{className:"x1agbcgv xcrlgei",children:s}),o.jsx("span",{"aria-hidden":"true",className:"x1agbcgv xcrlgei xlshs6z x47corl x2mo6ok",children:s})]}):null,$=c?o.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:c}):null;return i!=null?o.jsxs(m,{ref:t,href:i,onClick:w,...S,children:[C,j,T,$,E]}):o.jsxs("button",{ref:t,type:"button",onClick:w,...S,children:[C,j,T,$,E]})}af.displayName="Tab";const G_=.8,Ui={wrapper:{kY2c9j:"x1vjfegm",k1xSpc:"x1lliihq",kmVPX3:"x1717udv","--_textarea-inline-padding":"x1kdpo6e",$$css:!0},textarea:{k1xSpc:"x1lliihq",kzqmXN:"xh8yej3",kB7OPa:"x9f619",k7Eaqz:"xeuugli",kMzoRj:"xc342km",ksu8eU:"xng3xce",k8WAf4:"xu0wf1k",kg3NbH:"x1w6f3ag",kMv6JI:"x9ynric",kGuDYH:"xjm74w1 x6pjikd",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kI3sdo:"x1a2a7pz",k8Qsv1:"xeyghm5",kHenm0:"x288g5",$$css:!0},textareaDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},textareaWithStartIcon:{kZCmMZ:"x1b6te9z",$$css:!0},textareaWithStatus:{kwRFfy:"xp2dy4z",$$css:!0},textareaWithBusyStatus:{kwRFfy:"x1g2apga",$$css:!0},textareaWithCounter:{kGO01o:"xekm6fs",$$css:!0}},V_={sm:{$$css:!0},md:{$$css:!0},lg:{k8WAf4:"xce4md1",$$css:!0}};function j6({label:e,isLabelHidden:t=!1,description:n,isOptional:s=!1,isRequired:r=!1,onChange:i,changeAction:a,isLoading:l=!1,value:c,placeholder:u,rows:d=3,isDisabled:f=!1,disabledMessage:h,status:p,statusVariant:m="attached",labelTooltip:b,startIcon:y,hasSpellCheck:g=!0,onPaste:k,maxLength:v,hasAutoFocus:w=!1,size:j,htmlName:S,onFocus:C,onBlur:E,width:T,xstyle:$,className:N,style:A,ref:M,...I}){const R=Pa(j,"md"),z=be(),_=Ll(),O=x.useId(),D=x.useId(),L=x.useId(),B=x.useId(),P=x.useRef(null),X=x.useRef(null),Y=x.useRef(null),[,Z]=x.useTransition(),[ne,J]=x.useOptimistic(c),K=l||ne!==c,ie=f&&!!h,le=bs({placement:"above",focusTrigger:"always",isEnabled:ie}),{statusIcon:ve,describedBy:ge}=u4({status:p,statusVariant:m}),xe=[n?D:null,m!=="tooltip"&&(p!=null&&p.message)?L:null,ge,v!=null?B:null,ie?le.describedBy:null].filter(Boolean).join(" ")||void 0,ce=x.useCallback(Le=>{if(v==null)return;const se=Le>v?"over":Le>=v*G_?"near":"under";se!==Y.current&&(Y.current=se,se==="over"?_(z("@astryx.textArea.charactersOverLimit",{count:Le-v}),"assertive"):se==="near"&&_(z("@astryx.textArea.charactersRemaining",{count:v-Le})))},[_,z,v]),Q=Le=>{if(f)return;const se=Le.target.value;ce(se.length),i==null||i(se,Le),a&&!Le.defaultPrevented&&Z(async()=>{J(se),await a(se,Le)})},ye=f||K,{onClick:ue,onMouseUp:pe}=N0({containerRef:X,inputRef:P,disabled:ye});return o.jsxs(Bl,{label:e,isLabelHidden:t,description:n,inputID:O,descriptionID:n?D:void 0,isOptional:s,isRequired:r,isDisabled:f,status:p?{type:p.type,message:p.message,messageID:p.message?L:void 0}:void 0,statusVariant:m,labelTooltip:b,width:T,children:[o.jsxs("div",{ref:Le=>{X.current=Le,le.ref(Le)},onClick:ue,onMouseUp:pe,...F(U("textarea",{size:R,status:(p==null?void 0:p.type)??null}),q(fl.base,Ui.wrapper,f&&fl.disabled,p&&H0[p.type],p&&!f&&P0[p.type],p&&z4[p.type],$),N,A),children:[y&&o.jsx("span",{className:"x10l6tqk xctzyg x1kiyvbf x47corl x78zum5",children:Hs(y,{size:"sm",color:"secondary"})}),o.jsx("textarea",{...I,ref:it(M,P),id:O,name:S,value:ne,onChange:Q,onPaste:k,onFocus:C,onBlur:E,placeholder:u,rows:d,disabled:f&&!ie,"aria-disabled":ie?"true":void 0,readOnly:ie||void 0,spellCheck:g,autoFocus:w,"data-autofocus":w||void 0,"aria-describedby":xe,"aria-required":r&&!s?"true":void 0,"aria-invalid":(p==null?void 0:p.type)==="error"||v!=null&&ne.length>v?"true":void 0,"aria-busy":K||void 0,...q(Ui.textarea,V_[R],f&&Ui.textareaDisabled,!!y&&Ui.textareaWithStartIcon,(p||K)&&Ui.textareaWithStatus,K&&!!ve&&Ui.textareaWithBusyStatus,v!=null&&Ui.textareaWithCounter)}),(K||ve)&&o.jsxs("span",{className:"x10l6tqk xctzyg x13oyzgk x47corl x78zum5 x6s0dn4 x1txdalj",children:[K&&o.jsx(on,{size:"sm"}),ve]}),v!=null&&o.jsxs("div",{id:B,...{0:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xv1l7n4"},1:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xjt36v0"}}[(ne.length>v)<<0],children:[ne.length>v&&o.jsx(Ce,{icon:"warning",size:"sm"}),ne.length,"/",v]})]}),ie&&le.renderTooltip(h)]})}j6.displayName="TextArea";function S6({ref:e,href:t,isDisabled:n,LinkComponent:s,linkStyleProps:r,labelContent:i,icon:a,endContent:l,removeButton:c,...u}){const d=x.useRef(null),f=x.useRef(null),{onClick:h,onMouseUp:p}=E0({containerRef:d,interactiveRef:f,href:t,disabled:n});return o.jsxs("span",{ref:it(e,d),onClick:n?void 0:h,onMouseUp:n?void 0:p,...u,children:[a,o.jsx(s,{ref:f,href:t,"aria-disabled":n||void 0,...r,children:i}),l,c]})}S6.displayName="TokenLink";const On={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",k8WAf4:"xt970qd",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xx3sua9",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kybGjl:"x1hl2dhg",ks0D6T:"x193iq5w",kVQacm:"xb3r6kr",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x12qzo2w",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},focusVisibleOutline:{kI3sdo:"x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0}},$d={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},Cd={default:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},gray:{kWkggS:"xspzpui",kMwMTN:"xru1t7f",$$css:!0}};function vn({label:e,size:t="md",color:n="default",icon:s,isDisabled:r=!1,onRemove:i,onClick:a,href:l,description:c,endContent:u,isLabelHidden:d=!1,xstyle:f,className:h,style:p,"data-testid":m,ref:b}){const y=be(),g=Ri(),k=d4({href:l,onClick:a,isDisabled:r}),v=a??(k==="button"?()=>{}:null),w=i!=null&&o.jsx("button",{type:"button","aria-label":y("@astryx.token.remove",{label:e}),onClick:C=>{C.stopPropagation(),i(C)},disabled:r,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:o.jsx(Ce,{icon:"close",size:"xsm",color:"inherit"})}),j=o.jsxs(o.Fragment,{children:[s,o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),u,w]}),S={"data-testid":m,"aria-label":d?e:void 0,"aria-description":c};if(k==="link")return i==null?o.jsx(g,{ref:b,href:l,"aria-disabled":r||void 0,...S,...F(U("token",{color:n,size:t}),q(On.base,$d[t],Cd[n],On.interactive,r&&On.disabled,f),h,p),children:j}):o.jsx(S6,{ref:b,href:l,isDisabled:r,LinkComponent:g,icon:s,endContent:u,removeButton:w,linkStyleProps:{className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli"},labelContent:o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),...S,...F(U("token",{color:n,size:t}),q(On.base,$d[t],Cd[n],On.interactive,On.focusVisibleOutline,r&&On.disabled,f),h,p)});if(v!=null){const C=E=>{E.target.closest("button, a")||v(E)};return o.jsxs("span",{ref:b,onClick:r?void 0:C,...S,...F(U("token",{color:n,size:t}),q(On.base,$d[t],Cd[n],On.interactive,On.focusVisibleOutline,r&&On.disabled,f),h,p),children:[s,o.jsx("button",{type:"button",onClick:v,disabled:r,className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli",children:o.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e})}),u,w]})}return o.jsx("span",{ref:b,...S,...F(U("token",{color:n,size:t}),q(On.base,$d[t],Cd[n],r&&On.disabled,f),h,p),children:j})}vn.displayName="Token";const W_=1e3,K_=100,Ev={root:{kWkggS:"xprdx6m x1j0df82 x1o55y2u",kSiTet:"xvpkmg4 x1tbh5bv",$$css:!0},animate:{kILWW9:"xpz12be",k44tkh:"xqgcaz",ko0y90:"xa4qsjk",kKVMdj:"xeuoslp x1aquc0h",kyAemX:"x193epu2",$$css:!0}},X_={0:{kaIpWk:"xwksslw",$$css:!0},1:{kaIpWk:"xx3sua9",$$css:!0},2:{kaIpWk:"xh6dtrn",$$css:!0},3:{kaIpWk:"x1hviunn",$$css:!0},4:{kaIpWk:"x1hviunn",$$css:!0},none:{kaIpWk:"x2u8bby",$$css:!0},rounded:{kaIpWk:"xjspbzw",$$css:!0}},Z_={kKxzle:"xvo38ju",$$css:!0},Tv={animationDelay:e=>[Z_,{"--x-animationDelay":(t=>typeof t=="number"?t+"ms":t??void 0)(`${W_+K_*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kZKoxP:(typeof t=="number"?`${t}px`:t)!=null?"x16ye13r":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-height":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}]};function $6({width:e="100%",height:t="100%",radius:n=3,index:s=0,"data-testid":r,xstyle:i,className:a,style:l,ref:c,...u}){return o.jsx("div",{ref:c,"aria-hidden":"true","data-testid":r,...F(U("skeleton"),q(Ev.root,Ev.animate,X_[n],Tv.dimensions(e,t),Tv.animationDelay(s),i),a,l),...u})}$6.displayName="Skeleton";const I1={root:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kzqmXN:"x1fu8urw",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},removeButtonOverrides:{"--_button-radius":"xh8ntw8",kZKoxP:"x1qx5ct2",k7Eaqz:"xt4ypqs",kWkggS:"x1u4601x",kMwMTN:"x9e3rv5",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function Y_(){return o.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-5.5z"})})}function Zf({src:e,alt:t,label:n,onRemove:s,onClick:r,isLoading:i=!1,isDisabled:a=!1,showRemoveOn:l="hover",xstyle:c,className:u,style:d,"data-testid":f,ref:h,...p}){const m=be(),[b,y]=x.useState(void 0),g=e!=null,k=g&&b===e,v=i&&!g,w=g&&!v&&!k,j=i&&g,S=!i&&!g||k,C=r!=null&&!a&&!i,E=s!=null&&!a,T=E&&l==="hover",{getContainerProps:$,getContentRevealProps:N}=jN({isEnabled:T}),A=n&&t?`${n} — ${t}`:n??t??m("@astryx.thumbnail.fallbackName"),M=!t,I=t!=null||n!=null||p["aria-label"]!=null||p["aria-labelledby"]!=null;_l("Thumbnail",'`src` is set without `alt` or `label`. The image is treated as decorative and hidden from assistive technology, and the thumbnail falls back to a generic "thumbnail" name. Pass `alt` to describe the image content, or `label` (file name) to name the thumbnail.',g&&!I);const R=o.jsxs(o.Fragment,{children:[w&&o.jsx("img",{src:e,alt:t??"",role:M?"presentation":void 0,"aria-hidden":M||void 0,onError:()=>y(e),className:"xh8yej3 x5yr21d xl1xv1r x1lliihq"}),v&&o.jsx($6,{radius:2}),S&&o.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xv9yike",children:o.jsx(Y_,{})})]}),z=E?o.jsx("div",{...F({className:"x10l6tqk x8d4r5l xy3asu9 x1vjfegm x14ju556"},T?N({isLayoutPreserved:!0}):{}),children:o.jsx(re,{icon:o.jsx(Ce,{icon:"close",size:"xsm"}),label:m("@astryx.thumbnail.remove",{accessibleName:A}),variant:"secondary",size:"sm",isIconOnly:!0,onClick:O=>{O.stopPropagation(),s(O)},xstyle:I1.removeButtonOverrides})}):null,_=o.jsx("div",{ref:h,"data-testid":f,role:"group","aria-label":A,...F(U("thumbnail"),q(I1.root,a&&I1.disabled,c),u,d),...p,children:o.jsxs("div",{...F({0:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c"},4:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3"},2:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},6:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},1:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c xi14tyy"},5:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 xi14tyy"},3:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"},7:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"}}[!!C<<2|!!C<<1|!!C<<0],T?$():{}),children:[C?o.jsx("button",{type:"button",onClick:r,"aria-label":m("@astryx.thumbnail.open",{accessibleName:A}),className:"x1ypdohk x1lliihq xh8yej3 x5yr21d xh6dtrn xb3r6kr",children:R}):R,w&&o.jsx("div",{className:"x10l6tqk x10a8y8t x1pjcqnp x1er153n x47corl"}),j&&o.jsx("div",{className:"x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k x1u4601x x1pjcqnp x1vjfegm x14ju556",children:o.jsx(on,{size:"sm",shade:"onMedia"})}),z]})});return n!=null?o.jsx(Ga,{content:n,children:_}):_}Zf.displayName="Thumbnail";const ac={dropdown:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},popoverBlockGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},popoverInlineGap:{keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]},Q_="@astryx.dropdownMenu.label";function Wa({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:s,onClick:r,hasChevron:i=!0,placement:a="below",alignment:l="start",className:c,style:u,xstyle:d,"data-testid":f,...h}){const p=be(),m=e??{label:p(Q_)},b=("items"in h?h.items:void 0)??[],y=h.children,{items:g,children:k,...v}=h,w=x.useId(),j=m.size??"md",S=x.useRef(null),[C,E]=x.useState(!1),T=t!==void 0,$=T?t:C,N=x.useRef(0),A=x.useCallback(()=>{var ce;N.current=Date.now(),n==null||n(!1),T||E(!1),(ce=S.current)==null||ce.focus()},[T,n]),M=x.useRef(!1),I=x.useCallback(()=>{n==null||n(!0),T||E(!0)},[T,n]),R=Ol({onHide:A,onShow:I,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),z=x.useCallback(()=>{R.hide()},[R]),{listRef:_,handleKeyDown:O,focusFirst:D,focusItem:L,ownsEvent:B,getItems:P}=Ua({itemSelector:rx,boundarySelector:ix,wrap:!1,onEscape:z}),X=sx({getItemLabels:()=>P().map(ce=>ce.textContent),onMatch:L,getCurrentIndex:()=>P().findIndex(ce=>ce===document.activeElement||ce.contains(document.activeElement))});x.useEffect(()=>{T&&(t&&!R.isOpen?(M.current=!0,R.show()):!t&&R.isOpen&&R.hide())},[t,T,R]),x.useEffect(()=>{!R.isOpen||!M.current||(M.current=!1,requestAnimationFrame(()=>D()))},[R.isOpen,D]);const Y=x.useCallback(ce=>{if(B(ce)){if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();const Q=document.activeElement;Q&&_u.has(Q.getAttribute("role")??"")&&Q.click();return}if(ce.key==="Tab"){z();return}if(X.onKeyDown(ce)){ce.preventDefault();return}O(ce)}},[O,z,X,B]),Z=x.useCallback(()=>{M.current=!0,R.show()},[R]),ne=x.useCallback(()=>{Date.now()-N.current<50||(r==null||r(),T?n==null||n(!t):R.isOpen?R.hide():Z())},[r,T,n,t,R,Z]),J=x.useCallback(ce=>{R.isOpen||(ce.key==="ArrowDown"||ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),Z())},[R.isOpen,Z]),K=m.isIconOnly===!0,ie=m.endContent??(i&&!K?o.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),le=s?ac.popoverCustomWidth(s):ac.popover,ve=a==="above"||a==="below"?ac.popoverBlockGap:ac.popoverInlineGap,ge=x.useMemo(()=>({closeMenu:z,menuSize:j}),[z,j]),xe=h.items!==void 0?ax(b):y;return o.jsxs(o.Fragment,{children:[o.jsx(re,{...m,ref:ce=>{S.current=ce,R.triggerRef(ce);const Q=m.ref;typeof Q=="function"?Q(ce):Q&&(Q.current=ce)},tooltip:$?void 0:m.tooltip,endContent:ie,onClick:ne,onKeyDown:J,"aria-haspopup":"menu","aria-expanded":$,"aria-controls":w,"data-testid":f}),R.render(o.jsx("div",{...v,ref:_,id:w,role:"menu","aria-label":m.label,onKeyDown:Y,...F(U("dropdown-menu"),q(ac.dropdown,d),c,u),children:o.jsx(Dl,{value:ge,children:xe})}),{placement:a,alignment:l,xstyle:[le,ve,ir[a]]})]})}Wa.displayName="DropdownMenu";function px({items:e,label:t,variant:n="ghost",size:s,icon:r,isDisabled:i=!1,isMenuOpen:a,onOpenChange:l,xstyle:c,className:u,style:d,"data-testid":f,ref:h}){const p=be(),m=t??p("@astryx.moreMenu.label"),b=Pa(s,"md"),y=Ea("moreHorizontal");return o.jsx(Wa,{className:u?`${Bp("more-menu")} ${u}`:Bp("more-menu"),xstyle:c,style:d,isMenuOpen:a,onOpenChange:l,button:{label:m,icon:r??y,variant:n,size:b,isDisabled:i,tooltip:m,isIconOnly:!0,ref:h},items:e,hasChevron:!1,"data-testid":f})}px.displayName="MoreMenu";const hr={dialog:{kVAEAm:"xixxii4",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"xtdtrs8",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kZeWKH:"xish69e",kFalU9:"x5ve5x3",kI3sdo:"x1a2a7pz",k1xSpc:"x1s85apg",$$css:!0},open:{k1xSpc:"x78zum5",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",k5sjJv:"xph5o2a",kND0Po:"x167zut7",k9an0g:"xft5bk6",kb4ib:"x15h3t91",kA5Tbj:"x1viac0w",$$css:!0},backdropOpen:{k5sjJv:"xb3n6bw",$$css:!0},drawer:{kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kWkggS:"x10xzikg",kB7OPa:"x9f619",kVQacm:"xb3r6kr",k1ekBW:"x11xpdln",kIyJzY:"x80gvsz",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz",k6CgDc:"xzg1mie",$$css:!0},drawerStart:{kLqNvP:"x1o0tod",ke9TFa:"xw8tdv1",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",k3aq6I:"x5i6ehr xttggg",$$css:!0},drawerStartOpen:{k3aq6I:"xbryuvx",$$css:!0},drawerEnd:{kt4wiu:"xtijo5x",k2ei4v:"xgbv0en",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",k3aq6I:"xumwmo6 x1df3fe5",$$css:!0},drawerEndOpen:{k3aq6I:"xbryuvx",$$css:!0}},J_={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},eO={width:e=>[J_,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function uy({isOpen:e,onOpenChange:t,children:n,header:s,width:r=320,side:i="auto",label:a,"data-testid":l,xstyle:c,className:u,style:d,onClick:f,ref:h,...p}){const m=be(),b=nx(),y=e??b.isMobileNavOpen,g=x.useId(),k=b.mobileNavId||g,v=x.useMemo(()=>t??(N=>{N?b.openMobileNav():b.closeMobileNav()}),[t,b]),w=x.useRef(null),j=x.useRef(null),[S,C]=x.useState(i==="auto"?"end":i);x.useEffect(()=>{const N=w.current;if(N){if(j.current&&(clearTimeout(j.current),j.current=null),y){if(i==="auto"){const A=document.activeElement;if(A&&A!==document.body){const M=A.getBoundingClientRect(),I=M.left+M.width/2;C(I<window.innerWidth/2?"start":"end")}}else C(i);N.open||N.showModal(),document.documentElement.style.overflow="clip"}else if(N.open){document.documentElement.style.overflow="";const A=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;j.current=setTimeout(()=>{N.close()},A)}return()=>{j.current&&(clearTimeout(j.current),j.current=null),document.documentElement.style.overflow="",N.open&&N.close()}}},[y,i]);const E=x.useCallback(N=>{N.preventDefault(),v(!1)},[v]),T=x.useCallback(N=>{N.target===N.currentTarget&&v(!1)},[v]),$=S==="start";return o.jsx("dialog",{ref:it(h,w),id:k,...F(U("mobile-nav",{side:S}),q(hr.dialog,y&&hr.open,hr.backdrop,y&&hr.backdropOpen,c),u,d),...p,"data-testid":l,"aria-label":a??(typeof s=="string"?s:m("@astryx.mobileNav.navigation")),onClick:Yh(f,T),onCancel:E,children:o.jsxs("div",{tabIndex:-1,...q(hr.drawer,eO.width(r),$&&hr.drawerStart,$&&y&&hr.drawerStartOpen,!$&&hr.drawerEnd,!$&&y&&hr.drawerEndOpen),children:[o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh"},1:{className:"x78zum5 x6s0dn4 x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh x13a6bvl"}}[!s<<0],children:[typeof s=="string"?o.jsx("span",{className:"x11g1kdw",children:o.jsx(Br,{level:2,children:s})}):s??null,o.jsx(re,{variant:"ghost",label:m("@astryx.mobileNav.closeNavigation"),icon:o.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>v(!1),isIconOnly:!0})]}),o.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}uy.displayName="MobileNav";const Kr={item:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kZKoxP:"x1ueg155",kg3NbH:"xf314gf",k8WAf4:"xt970qd",kaIpWk:"xh6dtrn",kMzoRj:"xc342km",ksu8eU:"xng3xce",kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kybGjl:"x1hl2dhg",kkrTdU:"x1ypdohk",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",k63SB2:"x1sodnla",kLWn49:"x1kq96og",k9WMMc:"x1yc453h",kB7OPa:"x9f619",kHE3J0:"xe9uy6x",kSReZ0:"xyxi2l3",$$css:!0},selected:{kWkggS:"x17x4s8c",k63SB2:"x1e4wzip",kHE3J0:"x1sua13m",kSReZ0:"xjtnuge",$$css:!0},disabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},sm:{kZKoxP:"x6k0iem",kg3NbH:"x7a5moj",$$css:!0},md:{kZKoxP:"x1ueg155",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"xssyfek",kg3NbH:"xf314gf",$$css:!0}},gx=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});gx.displayName="SideNavCollapseContext";function dy(){return x.use(gx)}function C6({ref:e,handleRef:t,label:n,children:s,onClick:r,...i}){const a=be(),l=Ea("chevronLeft"),{isCollapsed:c,toggle:u,isCollapsible:d}=tO(t),{isMobile:f}=nx();return!d||f?null:o.jsx(re,{ref:e,label:n??a(c?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...i,onClick:Yh(r,u),icon:s??o.jsx("span",{...q(dl.mirror),children:o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"}}[!!c<<0],children:l})}),isIconOnly:!0})}C6.displayName="SideNavCollapseButton";function tO(e){var s;const t=dy();if(e==null)return t;const n=((s=e.current)==null?void 0:s.getCollapseState())??null;return{isCollapsed:(n==null?void 0:n.isCollapsed)??!1,toggle:()=>{var r,i;(i=(r=e.current)==null?void 0:r.getCollapseState())==null||i.toggle()},isCollapsible:(n==null?void 0:n.isCollapsible)??!0}}const nO=160,_1={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"x5yr21d",kzqmXN:"x1hfn5x7",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0},rootCollapsed:{kzqmXN:"xhgvbfk",$$css:!0},topbar:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kZKoxP:"xsdox4t",kzqmXN:"xh8yej3",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0}};function fy({header:e,topContent:t,children:n,footer:s,footerIcons:r,collapsible:i=!1,resizable:a=!1,xstyle:l,className:c,style:u,"data-testid":d,ref:f,handleRef:h,...p}){const m=be(),b=typeof i=="object"?i:{},y=!!i,g=b.hasButton??!0,k=b.defaultIsCollapsed??!1,v=b.isCollapsed,w=b.onCollapsedChange,j=typeof a=="object"?a:{},S=!!a,C=v!==void 0,[E,T]=x.useState(k),$=C?v:E,N=x.useRef(null),A=x.useRef({isCollapsed:$,toggle:()=>{},isCollapsible:y}),M=x.useCallback(ne=>{C||T(ne),w==null||w(ne)},[C,w]),I=m6({defaultSize:j.defaultWidth??260,minSizePx:j.minWidth??180,maxSizePx:j.maxWidth??480,collapsible:y,collapsedSize:nO,autoSaveId:j.autoSaveId,onSizeChange:j.onWidthChange,onCollapseChange:y?M:void 0}),R=x.useCallback(()=>{const ne=!$;A.current={...A.current,isCollapsed:ne},M(ne),S&&(ne?I.collapse():I.expand())},[$,M,S,I]),z=S&&!$;A.current={isCollapsed:$,toggle:R,isCollapsible:y};const _={isCollapsed:$,toggle:R,isCollapsible:y};x.useImperativeHandle(h,()=>({getCollapseState:()=>A.current}),[]);const O=K3();if(O==="topbar")return o.jsxs("div",{"data-testid":d,...F(U("side-nav",{mode:"topbar"}),q(_1.topbar,l),c,u),children:[e,o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:r})]});const D=!!(s||r);if(O==="drawer")return o.jsxs(uy,{header:e,"data-testid":d,children:[t,n,D&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});if(O==="drawer-content")return o.jsxs(o.Fragment,{children:[t,n,D&&o.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&o.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});const L=!!(e||t),B=!!(s||r),P=y&&g,X=S?{...u??{},width:$?void 0:I.size}:u,Y=o.jsxs("nav",{ref:it(f,N),role:"navigation","aria-label":m("@astryx.sideNav.label"),"data-testid":d,...F(U("side-nav"),q(_1.root,$&&_1.rootCollapsed,l),c,X),...p,children:[L&&o.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj"},1:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj x6s0dn4"}}[!!$<<0],children:[e,t&&o.jsx("div",{children:t})]}),o.jsx("div",{...{0:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es x1wesfrj"},4:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es x1wesfrj"},2:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q x1wesfrj"},6:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q x1wesfrj"},1:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es xy143xn"},5:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es xy143xn"},3:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q xy143xn"},7:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q xy143xn"}}[!!$<<2|!!L<<1|!!B<<0],children:n}),(B||P)&&o.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf xfsso4q x1wesfrj"},1:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu"}}[!!$<<0],children:[s,o.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw"},1:{className:"x78zum5 x6s0dn4 xzye2dw x3ieub6"}}[!!$<<0],children:[P&&o.jsx(C6,{}),r]})]})]}),Z=z?o.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[Y,o.jsx(oy,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:I.props,label:m("@astryx.sideNav.resizeSidebar")})]}):Y;return y?o.jsx(gx,{value:_,children:Z}):Z}fy.displayName="SideNav";const ho={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kzqmXN:"xh8yej3",$$css:!0},itemCollapsed:{kjj79g:"xl56j7k",kzqmXN:"x805d0l",kg3NbH:"xnjsko4",$$css:!0},itemCollapsedSm:{kzqmXN:"x1fvqzum",$$css:!0},itemCollapsedLg:{kzqmXN:"x1m747yf",$$css:!0}},sO={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function O1({href:e,as:t,isDisabled:n,onClick:s,ref:r,children:i,...a}){const l=Ri(t);return e&&!n?o.jsx(l,{ref:r,href:e,onClick:s,...a,children:i}):o.jsx("button",{ref:r,type:"button",onClick:s,disabled:n,...a,children:i})}function Ds({as:e,label:t,icon:n,selectedIcon:s,isSelected:r=!1,isDisabled:i=!1,href:a,onClick:l,endContent:c,children:u,collapsible:d,size:f="md","data-testid":h,ref:p,xstyle:m}){const b=be(),y=Ea("chevronDown"),{isCollapsed:g}=dy(),k=K3(),{closeMobileNav:v}=nx(),w=k==="drawer"||k==="drawer-content",j=x.useId(),S=!!u,C=x.useRef(null),E=Ol({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),T=x.useMemo(()=>typeof d=="object"?d:{},[d]),$=S&&d!==!1,N=T.isCollapsed,A=N!==void 0,[M,I]=x.useState(T.defaultIsCollapsed??!1),R=A?N:M,z=x.useCallback(()=>{var ce;const xe=!R;A||I(xe),(ce=T.onCollapsedChange)==null||ce.call(T,xe)},[R,A,T]),_=r&&s?s:n,D=$&&(!!a||!!l)&&!g,L=xe=>{if(i){xe.preventDefault();return}if($&&!D&&!g){xe.preventDefault(),z();return}l==null||l(xe),w&&v()},B=xe=>{xe.preventDefault(),xe.stopPropagation(),z()},P=x.useRef(null),X=x.useRef(null),Y=x.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=null),X.current&&(clearTimeout(X.current),X.current=null)},[]),Z=x.useCallback(()=>{Y(),P.current=setTimeout(()=>{E.show({skipAutoFocus:!0})},150)},[Y,E]),ne=x.useCallback(()=>{Y(),X.current=setTimeout(()=>{E.hide()},200)},[Y,E]),J=x.useCallback(()=>{Z()},[Z]),K=x.useCallback(()=>{ne()},[ne]);if(g&&!n)return null;if(g){const xe=_&&Hs(_,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),ce=F(U("side-nav-item",{size:f,selected:r?"selected":null}),q(Kr.item,Kr[f],ho.itemCollapsed,f==="sm"&&ho.itemCollapsedSm,f==="lg"&&ho.itemCollapsedLg,r&&Kr.selected,i&&Kr.disabled));if(S)return o.jsxs("div",{...q(ho.root,m),children:[o.jsx("button",{ref:it(p,E.triggerRef),type:"button",onClick:E.toggle,onMouseEnter:J,onMouseLeave:K,"aria-label":t,"data-testid":h,...E.triggerProps,...ce,children:xe}),E.render(o.jsxs("div",{className:"x1litavf x1y0btm7 x14i3s5s xu0wf1k x7a5moj x11g1kdw xfb3i0g",onMouseEnter:J,onMouseLeave:K,onClick:()=>E.hide(),children:[o.jsx("div",{className:"xf314gf xu0wf1k x141an7d x2mo6ok xv1l7n4 x1ltkj2j",children:t}),o.jsx(gx,{value:sO,children:u})]}),{placement:"end",alignment:"start"})]});const Q={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-label":t,"data-testid":h},ye=o.jsx(O1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,...Q,...ce,children:xe});return o.jsxs("div",{ref:C,...q(ho.root,m),children:[ye,o.jsx(Ga,{content:t,placement:"end",anchorRef:C})]})}const ie=o.jsxs(o.Fragment,{children:[_&&Hs(_,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),!g&&o.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!g&&c&&o.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:c}),!g&&$&&!D&&o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!R<<0],children:y})]}),le=F(U("side-nav-item",{size:f,selected:r?"selected":null}),q(Kr.item,Kr[f],r&&Kr.selected,i&&Kr.disabled));let ve;if(D)ve=o.jsxs("div",{"data-testid":h,...le,children:[o.jsx(O1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,"aria-current":r?"page":void 0,className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli x1heor9g x1hl2dhg x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1yc453h x1ypdohk",children:ie}),o.jsx("button",{type:"button",onClick:B,"aria-label":R?b("@astryx.sideNavItem.expand",{label:t}):b("@astryx.sideNavItem.collapse",{label:t}),"aria-expanded":!R,"aria-controls":`${j}-children`,className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn xe9uy6x xyxi2l3",children:o.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!R<<0],children:y})})]});else{const xe={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-expanded":$?!R:void 0,"aria-controls":$?`${j}-children`:void 0,"data-testid":h};ve=o.jsx(O1,{ref:p,href:a,as:e,isDisabled:i,onClick:L,...xe,...le,children:ie})}return o.jsxs("div",{ref:C,...q(ho.root,m),children:[ve,S&&!g&&o.jsx("div",{id:`${j}-children`,role:"group","aria-labelledby":`${j}-label`,"aria-hidden":R,inert:R?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!R<<0],children:o.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[o.jsx("span",{id:`${j}-label`,hidden:!0,children:t}),u]})})]})}Ds.displayName="SideNavItem";const rO={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function of({ref:e,title:t,subtitle:n,children:s,endContent:r,isHeaderHidden:i=!1,xstyle:a,className:l,style:c,"data-testid":u,...d}){const{isCollapsed:f}=dy(),p=`${x.useId()}-title`,m=o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"x78zum5 xdt5ytf x98rzlu xeuugli",children:[o.jsx("span",{id:p,className:"x141an7d x2mo6ok x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:t}),n&&o.jsx("span",{className:"x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:n})]}),r&&o.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:r})]}),b=i||f,y=b?{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0}:{};return o.jsxs("div",{ref:e,...F(U("side-nav-section"),q(rO.root,a),l,c),...d,role:"group","aria-labelledby":p,"data-testid":u,children:[o.jsx("div",{...F({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:b?y:void 0}),children:m}),o.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:s})]})}of.displayName="SideNavSection";var E6={exports:{}},mx={},T6={exports:{}},z6={};/**
|
|
167
|
-
* @license React
|
|
168
|
-
* scheduler.production.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/(function(e){function t(z,_){var O=z.length;z.push(_);e:for(;0<O;){var D=O-1>>>1,L=z[D];if(0<r(L,_))z[D]=_,z[O]=L,O=D;else break e}}function n(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var _=z[0],O=z.pop();if(O!==_){z[0]=O;e:for(var D=0,L=z.length,B=L>>>1;D<B;){var P=2*(D+1)-1,X=z[P],Y=P+1,Z=z[Y];if(0>r(X,O))Y<L&&0>r(Z,X)?(z[D]=Z,z[Y]=O,D=Y):(z[D]=X,z[P]=O,D=P);else if(Y<L&&0>r(Z,O))z[D]=Z,z[Y]=O,D=Y;else break e}}return _}function r(z,_){var O=z.sortIndex-_.sortIndex;return O!==0?O:z.id-_.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,m=!1,b=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(z){for(var _=n(u);_!==null;){if(_.callback===null)s(u);else if(_.startTime<=z)s(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function j(z){if(b=!1,w(z),!m)if(n(c)!==null)m=!0,S||(S=!0,A());else{var _=n(u);_!==null&&R(j,_.startTime-z)}}var S=!1,C=-1,E=5,T=-1;function $(){return y?!0:!(e.unstable_now()-T<E)}function N(){if(y=!1,S){var z=e.unstable_now();T=z;var _=!0;try{e:{m=!1,b&&(b=!1,k(C),C=-1),p=!0;var O=h;try{t:{for(w(z),f=n(c);f!==null&&!(f.expirationTime>z&&$());){var D=f.callback;if(typeof D=="function"){f.callback=null,h=f.priorityLevel;var L=D(f.expirationTime<=z);if(z=e.unstable_now(),typeof L=="function"){f.callback=L,w(z),_=!0;break t}f===n(c)&&s(c),w(z)}else s(c);f=n(c)}if(f!==null)_=!0;else{var B=n(u);B!==null&&R(j,B.startTime-z),_=!1}}break e}finally{f=null,h=O,p=!1}_=void 0}}finally{_?A():S=!1}}}var A;if(typeof v=="function")A=function(){v(N)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,I=M.port2;M.port1.onmessage=N,A=function(){I.postMessage(null)}}else A=function(){g(N,0)};function R(z,_){C=g(function(){z(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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(z){switch(h){case 1:case 2:case 3:var _=3;break;default:_=h}var O=h;h=_;try{return z()}finally{h=O}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(z,_){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var O=h;h=z;try{return _()}finally{h=O}},e.unstable_scheduleCallback=function(z,_,O){var D=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?D+O:D):O=D,z){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=O+L,z={id:d++,callback:_,priorityLevel:z,startTime:O,expirationTime:L,sortIndex:-1},O>D?(z.sortIndex=O,t(u,z),n(c)===null&&z===n(u)&&(b?(k(C),C=-1):b=!0,R(j,O-D))):(z.sortIndex=L,t(c,z),m||p||(m=!0,S||(S=!0,A()))),z},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(z){var _=h;return function(){var O=h;h=_;try{return z.apply(this,arguments)}finally{h=O}}}})(z6);T6.exports=z6;var iO=T6.exports;/**
|
|
175
|
-
* @license React
|
|
176
|
-
* react-dom-client.production.js
|
|
177
|
-
*
|
|
178
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the MIT license found in the
|
|
181
|
-
* LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/var Et=iO,A6=x,aO=Yc;function W(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function N6(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ou(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function M6(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 R6(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function zv(e){if(Ou(e)!==e)throw Error(W(188))}function oO(e){var t=e.alternate;if(!t){if(t=Ou(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return zv(r),e;if(i===s)return zv(r),t;i=i.sibling}throw Error(W(188))}if(n.return!==s.return)n=r,s=i;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,s=i;break}if(l===s){a=!0,s=r,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,s=r;break}if(l===s){a=!0,s=i,n=r;break}l=l.sibling}if(!a)throw Error(W(189))}}if(n.alternate!==s)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function I6(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=I6(e),t!==null)return t;e=e.sibling}return null}function An(e,t,n,s,r,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,s,r,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&An(e.child,t,n,s,r,i))return!0;e=e.sibling}return!1}function Ka(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function Av(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function _6(e){var t=[null,null],n=Ka(e);return n===null||O6(t,e,n.child,{foundSelf:!1}),t}function O6(e,t,n,s){for(;n!==null;){if(n===t)s.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(s.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&O6(e,t,n.child,s))return!0;n=n.sibling}return!1}function Ct(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(W(559))}}var So=null,rg=null;function lO(e,t,n){return e===n?!0:e===t?(So=e,!0):!1}function cO(e,t,n){return e===n?(rg=e,!1):e===t?(rg!==null&&(So=e),!0):!1}function Nv(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ig(e,t,n){for(var s=0,r=e;r;r=n(r))s++;r=0;for(var i=t;i;i=n(i))r++;for(;0<s-r;)e=n(e),s--;for(;0<r-s;)t=n(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Xe=Object.assign,uO=Symbol.for("react.element"),Ed=Symbol.for("react.transitional.element"),kc=Symbol.for("react.portal"),$o=Symbol.for("react.fragment"),D6=Symbol.for("react.strict_mode"),ag=Symbol.for("react.profiler"),L6=Symbol.for("react.consumer"),tr=Symbol.for("react.context"),hy=Symbol.for("react.forward_ref"),og=Symbol.for("react.suspense"),lg=Symbol.for("react.suspense_list"),xy=Symbol.for("react.memo"),ti=Symbol.for("react.lazy"),cg=Symbol.for("react.activity"),dO=Symbol.for("react.legacy_hidden"),fO=Symbol.for("react.memo_cache_sentinel"),ug=Symbol.for("react.view_transition"),hO=Symbol.for("react.recoverable"),Mv=Symbol.iterator;function oc(e){return e===null||typeof e!="object"?null:(e=Mv&&e[Mv]||e["@@iterator"],typeof e=="function"?e:null)}var xO=Symbol.for("react.client.reference");function dg(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xO?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $o:return"Fragment";case ag:return"Profiler";case D6:return"StrictMode";case og:return"Suspense";case lg:return"SuspenseList";case cg:return"Activity";case ug:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case kc:return"Portal";case tr:return e.displayName||"Context";case L6:return(e._context.displayName||"Context")+".Consumer";case hy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xy:return t=e.displayName||null,t!==null?t:dg(e.type)||"Memo";case ti:t=e._payload,e=e._init;try{return dg(e(t))}catch{}}return null}var bc=Array.isArray,me=A6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=aO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ya={pending:!1,data:null,method:null,action:null},fg=[],Co=-1;function dr(e){return{current:e}}function Zt(e){0>Co||(e.current=fg[Co],fg[Co]=null,Co--)}function Je(e,t){Co++,fg[Co]=e.current,e.current=t}var or=dr(null),tu=dr(null),hi=dr(null),Yf=dr(null);function Qf(e,t){switch(Je(hi,t),Je(tu,e),Je(or,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?G2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=G2(t),e=aS(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Zt(or),Je(or,e)}function hl(){Zt(or),Zt(tu),Zt(hi)}function hg(e){var t=e.memoizedState;t!==null&&(jl._currentValue=t.memoizedState,Je(Yf,e)),t=or.current;var n=aS(t,e.type);t!==n&&(Je(tu,e),Je(or,n))}function Jf(e){tu.current===e&&(Zt(or),Zt(tu)),Yf.current===e&&(Zt(Yf),jl._currentValue=ya)}var D1,Rv;function Qr(e){if(D1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D1=t&&t[1]||"",Rv=-1<n.stack.indexOf(`
|
|
183
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
184
|
-
`+D1+e+Rv}var L1=!1;function B1(e,t){if(!e||L1)return"";L1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(m){var h=m}Reflect.construct(e,[],f)}else{try{f.call()}catch(m){h=m}f=!1;try{var p=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),f=!0,new e}finally{f&&(p!==void 0?Object.defineProperty(e.prototype,"props",p):delete e.prototype.props)}}}else{try{throw Error()}catch(m){h=m}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=s.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var c=a.split(`
|
|
185
|
-
`),u=l.split(`
|
|
186
|
-
`);for(r=s=0;s<c.length&&!c[s].includes("DetermineComponentFrameRoot");)s++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(s===c.length||r===u.length)for(s=c.length-1,r=u.length-1;1<=s&&0<=r&&c[s]!==u[r];)r--;for(;1<=s&&0<=r;s--,r--)if(c[s]!==u[r]){if(s!==1||r!==1)do if(s--,r--,0>r||c[s]!==u[r]){var d=`
|
|
187
|
-
`+c[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=s&&0<=r);break}}}finally{L1=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qr(n):""}function pO(e,t){switch(e.tag){case 26:case 27:case 5:return Qr(e.type);case 16:return Qr("Lazy");case 13:return e.child!==t&&t!==null?Qr("Suspense Fallback"):Qr("Suspense");case 19:return Qr("SuspenseList");case 0:case 15:return B1(e.type,!1);case 11:return B1(e.type.render,!1);case 1:return B1(e.type,!0);case 31:return Qr("Activity");case 30:return Qr("ViewTransition");default:return""}}function Iv(e){try{var t="",n=null;do t+=pO(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
|
|
188
|
-
Error generating stack: `+s.message+`
|
|
189
|
-
`+s.stack}}var xg=Object.prototype.hasOwnProperty,py=Et.unstable_scheduleCallback,q1=Et.unstable_cancelCallback,gO=Et.unstable_shouldYield,mO=Et.unstable_requestPaint,Vn=Et.unstable_now,yO=Et.unstable_getCurrentPriorityLevel,B6=Et.unstable_ImmediatePriority,q6=Et.unstable_UserBlockingPriority,eh=Et.unstable_NormalPriority,kO=Et.unstable_LowPriority,H6=Et.unstable_IdlePriority,bO=Et.log,vO=Et.unstable_setDisableYieldValue,Du=null,Wn=null;function oi(e){if(typeof bO=="function"&&vO(e),Wn&&typeof Wn.setStrictMode=="function")try{Wn.setStrictMode(Du,e)}catch{}}var Kn=Math.clz32?Math.clz32:SO,wO=Math.log,jO=Math.LN2;function SO(e){return e>>>=0,e===0?32:31-(wO(e)/jO|0)|0}var Td=256,zd=262144,Ad=4194304;function Xi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function yx(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=s&134217727;return l!==0?(s=l&~i,s!==0?r=Xi(s):(a&=l,a!==0?r=Xi(a):n||(n=l&~e,n!==0&&(r=Xi(n))))):(l=s&~i,l!==0?r=Xi(l):a!==0?r=Xi(a):n||(n=s&~e,n!==0&&(r=Xi(n)))),r===0?0:t!==0&&t!==r&&!(t&i)&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Lu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function P6(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-Kn(n),r=1<<s;t|=e[s],n&=~r}return t}function $O(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U6(){var e=Ad;return Ad<<=1,!(Ad&62914560)&&(Ad=4194304),e}function H1(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function CO(e,t,n,s,r,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var d=31-Kn(n),f=1<<d;l[d]=0,c[d]=-1;var h=u[d];if(h!==null)for(u[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}s!==0&&F6(e,s,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function F6(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Kn(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function G6(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-Kn(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}function V6(e,t){var n=t&-t;return n=n&42?1:gy(n),n&(e.suspendedLanes|t)?0:n}function gy(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function my(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function W6(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:ES(e.type))}function _v(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var qr=Math.random().toString(36).slice(2),Kt="__reactFiber$"+qr,Nn="__reactProps$"+qr,ql="__reactContainer$"+qr,Ov="__reactEvents$"+qr,EO="__reactListeners$"+qr,TO="__reactHandles$"+qr,Dv="__reactResources$"+qr,qu="__reactMarker$"+qr,th="__reactLoad$"+qr;function kx(e){delete e[Kt],delete e[Nn],delete e[EO],delete e[TO]}function oa(e){var t;if(t=e[Kt])return t;for(var n=e.parentNode;n;){if(t=n[ql]||n[Kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=J2(e);e!==null;){if(n=e[Kt])return n;e=J2(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){if(e=e[Kt]||e[ql]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(W(33))}function Bo(e){var t=e[Dv];return t||(t=e[Dv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Dt(e){e[qu]=!0}function K6(e){e[th]=void 0}var X6=new Set,Z6={};function Xa(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(Z6[e]=t,e=0;e<t.length;e++)X6.add(t[e])}var zO=RegExp("^[: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]*$"),Lv={},Bv={};function AO(e){return xg.call(Bv,e)?!0:xg.call(Lv,e)?!1:zO.test(e)?Bv[e]=!0:(Lv[e]=!0,!1)}var Ie=!1;function qv(){var e=Ie;return Ie=!1,e}function lf(e,t,n){if(AO(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Nd(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function xr(e,t,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,s)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y6(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function NO(e,t,n){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pg(e){if(!e._valueTracker){var t=Y6(e)?"checked":"value";e._valueTracker=NO(e,t,""+e[t])}}function Q6(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Y6(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}var MO=/[\n"\\]/g;function fs(e){return e.replace(MO,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function gg(e,t,n,s,r,i,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?a==="number"&&e.value==t?P1(e,Bn(e.value)):P1(e,Bn(t)):n!=null?P1(e,Bn(n)):s!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Bn(l):e.removeAttribute("name")}function J6(e,t,n,s,r,i,a,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){pg(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=l?e.checked:!!s,e.defaultChecked=!!s,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),pg(e)}function P1(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function qo(e,t,n,s){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&s&&(e[n].defaultSelected=!0)}else{for(n=""+Bn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function ej(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function tj(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(W(92));if(bc(s)){if(1<s.length)throw Error(W(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),pg(e)}function pl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var RO=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hv(e,t,n){var s=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,n):typeof n!="number"||n===0||RO.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function nj(e,t,n){if(t!=null&&typeof t!="object")throw Error(W(62));if(e=e.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Ie=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&n[r]!==s&&(Hv(e,r,s),Ie=!0)}else for(var i in t)t.hasOwnProperty(i)&&Hv(e,i,t[i])}function yy(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var IO=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_O=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function cf(e){return _O.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function nr(){}var mg=null;function ky(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eo=null,Ho=null;function Pv(e){var t=Hl(e);if(t&&(e=t.stateNode)){var n=e[Nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(gg(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+fs(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var r=s[Nn]||null;if(!r)throw Error(W(90));gg(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)s=n[t],s.form===e.form&&Q6(s)}break e;case"textarea":ej(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&qo(e,!!n.multiple,t,!1)}}}var U1=!1;function sj(e,t,n){if(U1)return e(t,n);U1=!0;try{var s=e(t);return s}finally{if(U1=!1,(Eo!==null||Ho!==null)&&(Rx(),Eo&&(t=Eo,e=Ho,Ho=Eo=null,Pv(t),e)))for(t=0;t<e.length;t++)Pv(e[t])}}function nu(e,t){var n=e.stateNode;if(n===null)return null;var s=n[Nn]||null;if(s===null)return null;n=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yg=!1;if(Mr)try{var lc={};Object.defineProperty(lc,"passive",{get:function(){yg=!0}}),window.addEventListener("test",lc,lc),window.removeEventListener("test",lc,lc)}catch{yg=!1}var li=null,by=null,uf=null;function rj(){if(uf)return uf;var e,t=by,n=t.length,s,r="value"in li?li.value:li.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var a=n-e;for(s=1;s<=a&&t[n-s]===r[i-s];s++);return uf=r.slice(e,1<s?1-s:void 0)}function df(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 Md(){return!0}function Uv(){return!1}function jn(e){function t(n,s,r,i,a){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Md:Uv,this.isPropagationStopped=Uv,this}return Xe(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=Md)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Md)},persist:function(){},isPersistent:Md}),t}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bx=jn(Ii),Hu=Xe({},Ii,{view:0,detail:0}),OO=jn(Hu),F1,G1,cc,vx=Xe({},Hu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vy,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!==cc&&(cc&&e.type==="mousemove"?(F1=e.screenX-cc.screenX,G1=e.screenY-cc.screenY):G1=F1=0,cc=e),F1)},movementY:function(e){return"movementY"in e?e.movementY:G1}}),Fv=jn(vx),DO=Xe({},vx,{dataTransfer:0}),LO=jn(DO),BO=Xe({},Hu,{relatedTarget:0}),V1=jn(BO),qO=Xe({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),HO=jn(qO),PO=Xe({},Ii,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),UO=jn(PO),FO=Xe({},Ii,{data:0}),Gv=jn(FO),GO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VO={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"},WO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=WO[e])?!!t[e]:!1}function vy(){return KO}var XO=Xe({},Hu,{key:function(e){if(e.key){var t=GO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=df(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?VO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vy,charCode:function(e){return e.type==="keypress"?df(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?df(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ZO=jn(XO),YO=Xe({},vx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vv=jn(YO),QO=Xe({},Ii,{submitter:0}),JO=jn(QO),eD=Xe({},Hu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vy}),tD=jn(eD),nD=Xe({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),sD=jn(nD),rD=Xe({},vx,{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}),iD=jn(rD),aD=Xe({},Ii,{newState:0,oldState:0,source:0}),oD=jn(aD),lD=[9,13,27,32],wy=Mr&&"CompositionEvent"in window,Tc=null;Mr&&"documentMode"in document&&(Tc=document.documentMode);var cD=Mr&&"TextEvent"in window&&!Tc,ij=Mr&&(!wy||Tc&&8<Tc&&11>=Tc),Wv=" ",Kv=!1;function aj(e,t){switch(e){case"keyup":return lD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var To=!1;function uD(e,t){switch(e){case"compositionend":return oj(t);case"keypress":return t.which!==32?null:(Kv=!0,Wv);case"textInput":return e=t.data,e===Wv&&Kv?null:e;default:return null}}function dD(e,t){if(To)return e==="compositionend"||!wy&&aj(e,t)?(e=rj(),uf=by=li=null,To=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ij&&t.locale!=="ko"?null:t.data;default:return null}}var fD={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 Xv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fD[e.type]:t==="textarea"}function lj(e,t,n,s){Eo?Ho?Ho.push(s):Ho=[s]:Eo=s,t=jh(t,"onChange"),0<t.length&&(n=new bx("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var zc=null,su=null;function hD(e){sS(e,0)}function wx(e){var t=vc(e);if(Q6(t))return e}function Zv(e,t){if(e==="change")return t}var cj=!1;if(Mr){var W1;if(Mr){var K1="oninput"in document;if(!K1){var Yv=document.createElement("div");Yv.setAttribute("oninput","return;"),K1=typeof Yv.oninput=="function"}W1=K1}else W1=!1;cj=W1&&(!document.documentMode||9<document.documentMode)}function Qv(){zc&&(zc.detachEvent("onpropertychange",uj),su=zc=null)}function uj(e){if(e.propertyName==="value"&&wx(su)){var t=[];lj(t,su,e,ky(e)),sj(hD,t)}}function xD(e,t,n){e==="focusin"?(Qv(),zc=t,su=n,zc.attachEvent("onpropertychange",uj)):e==="focusout"&&Qv()}function pD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wx(su)}function gD(e,t){if(e==="click")return wx(t)}function mD(e,t){if(e==="input"||e==="change")return wx(t)}function yD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:yD;function ru(e,t){if(Zn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!xg.call(t,r)||!Zn(e[r],t[r]))return!1}return!0}function kg(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 Jv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function e2(e,t){var n=Jv(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jv(n)}}function dj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fj(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kg(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kg(e.document)}return t}function jy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var kD=Mr&&"documentMode"in document&&11>=document.documentMode,zo=null,bg=null,Ac=null,vg=!1;function t2(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vg||zo==null||zo!==kg(s)||(s=zo,"selectionStart"in s&&jy(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ac&&ru(Ac,s)||(Ac=s,s=jh(bg,"onSelect"),0<s.length&&(t=new bx("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=zo)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ao={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},X1={},hj={};Mr&&(hj=document.createElement("div").style,"AnimationEvent"in window||(delete Ao.animationend.animation,delete Ao.animationiteration.animation,delete Ao.animationstart.animation),"TransitionEvent"in window||delete Ao.transitionend.transition);function Za(e){if(X1[e])return X1[e];if(!Ao[e])return e;var t=Ao[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hj)return X1[e]=t[n];return e}var xj=Za("animationend"),pj=Za("animationiteration"),gj=Za("animationstart"),bD=Za("transitionrun"),vD=Za("transitionstart"),wD=Za("transitioncancel"),mj=Za("transitionend"),yj=new Map,wg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wg.push("scrollEnd");function Us(e,t){yj.set(e,t),Xa(t,[e])}var jD=0;function Rr(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=qs.identifierPrefix;var n=jD++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function n2(e){if(e==null||typeof e=="string")return e;var t=null,n=Ko;if(n!==null)for(var s=0;s<n.length;s++){var r=e[n[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function Hr(e,t){return e=n2(e),t=n2(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var nh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},cs=[],No=0,Sy=0;function jx(){for(var e=No,t=Sy=No=0;t<e;){var n=cs[t];cs[t++]=null;var s=cs[t];cs[t++]=null;var r=cs[t];cs[t++]=null;var i=cs[t];if(cs[t++]=null,s!==null&&r!==null){var a=s.pending;a===null?r.next=r:(r.next=a.next,a.next=r),s.pending=r}i!==0&&kj(n,r,i)}}function Sx(e,t,n,s){cs[No++]=e,cs[No++]=t,cs[No++]=n,cs[No++]=s,Sy|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function $y(e,t,n,s){return Sx(e,t,n,s),sh(e)}function Ya(e,t){return Sx(e,null,null,t),sh(e)}function kj(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,s=i.alternate,s!==null&&(s.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-Kn(n),e=i.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=n|536870912),i):null}function sh(e){if(50<qc)throw qc=0,vf=null,Error(W(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Mo={};function SD(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(e,t,n,s){return new SD(e,t,n,s)}function Cy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zr(e,t){var n=e.alternate;return n===null?(n=Tn(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&1206910976,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.refCleanup=e.refCleanup,n}function bj(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ff(e,t,n,s,r,i){var a=0;if(s=e,typeof s=="function")Cy(s)&&(a=1);else if(typeof s=="string")a=QL(e,n,or.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case cg:return e=Tn(31,n,t,r),e.elementType=cg,e.lanes=i,e;case $o:return ka(n.children,r,i,t);case D6:a=8,r|=24;break;case ag:return e=Tn(12,n,t,r|2),e.elementType=ag,e.lanes=i,e;case og:return e=Tn(13,n,t,r),e.elementType=og,e.lanes=i,e;case lg:return e=Tn(19,n,t,r),e.elementType=lg,e.lanes=i,e;case dO:case ug:return e=r|32,e=Tn(30,n,t,e),e.elementType=ug,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case tr:a=10;break e;case L6:a=9;break e;case hy:a=11;break e;case xy:a=14;break e;case ti:a=16,s=null;break e}a=29,n=Error(W(130,e===null?"null":typeof e,"")),s=null}return t=Tn(a,n,t,r),t.elementType=e,t.type=s,t.lanes=i,t}function ka(e,t,n,s){return e=Tn(7,e,s,t),e.lanes=n,e}function Z1(e,t,n){return e=Tn(6,e,null,t),e.lanes=n,e}function vj(e){var t=Tn(18,null,null,0);return t.stateNode=e,t}function Y1(e,t,n){return t=Tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var s2=new WeakMap;function hs(e,t){if(typeof e=="object"&&e!==null){var n=s2.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Iv(t)},s2.set(e,t),t)}return{value:e,source:t,stack:Iv(t)}}var Ro=[],Io=0,rh=null,iu=0,us=[],ds=0,$i=null,sr=1,rr="";function kr(e,t){Ro[Io++]=iu,Ro[Io++]=rh,rh=e,iu=t}function wj(e,t,n){us[ds++]=sr,us[ds++]=rr,us[ds++]=$i,$i=e;var s=sr;e=rr;var r=32-Kn(s)-1;s&=~(1<<r),n+=1;var i=32-Kn(t)+r;if(30<i){var a=r-r%5;i=(s&(1<<a)-1).toString(32),s>>=a,r-=a,sr=1<<32-Kn(t)+r|n<<r|s,rr=i+e}else sr=1<<i|n<<r|s,rr=e}function $x(e){e.return!==null&&(kr(e,1),wj(e,1,0))}function Ey(e){for(;e===rh;)rh=Ro[--Io],Ro[Io]=null,iu=Ro[--Io],Ro[Io]=null;for(;e===$i;)$i=us[--ds],us[ds]=null,rr=us[--ds],us[ds]=null,sr=us[--ds],us[ds]=null}function jj(e,t){us[ds++]=sr,us[ds++]=rr,us[ds++]=$i,sr=t.id,rr=t.overflow,$i=e}var Bt=null,Ye=null,$e=!1,xi=null,xs=!1,jg=Error(W(519));function Ci(e){var t=Error(W(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw au(hs(t,e)),jg}function r2(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[Kt]=e,t[Nn]=s,n){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(n=0;n<uu.length;n++)Ee(uu[n],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),J6(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),tj(t,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||s.suppressHydrationWarning===!0||iS(t.textContent,n)?(s.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),s.onScroll!=null&&Ee("scroll",t),s.onScrollEnd!=null&&Ee("scrollend",t),s.onClick!=null&&(t.onclick=nr),t=!0):t=!1,t||Ci(e,!0)}function ih(e){for(Bt=e.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:xs=!1;return;case 27:case 3:xs=!0;return;default:Bt=Bt.return}}function xo(e){if(e!==Bt)return!1;if(!$e)return ih(e),$e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||om(e.type,e.memoizedProps)),n=!n),n&&Ye&&Ci(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=Q2(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=Q2(e)}else t===27?(t=Ye,_i(e.type)?(e=dm,dm=null,Ye=e):Ye=t):Ye=Bt?ms(e.stateNode.nextSibling):null;return!0}function Ta(){Ye=Bt=null,$e=!1}function Q1(){var e=xi;return e!==null&&($n===null?$n=e:$n.push.apply($n,e),xi=null),e}function au(e){xi===null?xi=[e]:xi.push(e)}var Sg=dr(null),Qa=null,$r=null;function ci(e,t,n){Je(Sg,t._currentValue),t._currentValue=n}function Ar(e){e._currentValue=Sg.current,Zt(Sg)}function hf(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function $g(e,t,n,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var a=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),hf(i.return,n,e),s||(a=null);break e}i=l.next}}else if(r.tag===18){if(a=r.return,a===null)throw Error(W(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),hf(a,n,e),a=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=n,a=r.alternate,a!==null&&(a.lanes|=n),hf(r.return,n,e),a=r.child,a=a!==null?a.sibling:null):a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}}function za(e,t,n,s){e=null;for(var r=t,i=!1;r!==null;){if(!i){if(r.flags&524288)i=!0;else if(r.flags&262144)break}if(r.tag===10){var a=r.alternate;if(a===null)throw Error(W(387));if(a=a.memoizedProps,a!==null){var l=r.type;Zn(r.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(r===Yf.current){if(a=r.alternate,a===null)throw Error(W(387));a.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(jl):e=[jl])}r=r.return}return e!==null&&$g(t,e,n,s),t.flags|=262144,e!==null}function ah(e){for(e=e.firstContext;e!==null;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Qa=e,$r=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return Sj(Qa,e)}function Rd(e,t){return Qa===null&&Aa(e),Sj(e,t)}function Sj(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$r===null){if(e===null)throw Error(W(308));$r=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $r=$r.next=t;return n}var $D=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},CD=Et.unstable_scheduleCallback,ED=Et.unstable_NormalPriority,bt={$$typeof:tr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ty(){return{controller:new $D,data:new Map,refCount:0}}function Pu(e){e.refCount--,e.refCount===0&&CD(ED,function(){e.controller.abort()})}function i2(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];n.indexOf(s)===-1&&n.push(s)}}}var wc=null;function TD(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Nc=null,Cg=0,Na=0,Po=null;function zD(e,t){if(Nc===null){var n=Nc=[];Cg=0,Na=nk(),Po={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Cg++,t.then(a2,a2),t}function a2(){if(--Cg===0&&(wc=null,Nc!==null)){Po!==null&&(Po.status="fulfilled");var e=Nc;Nc=null,Na=0,Po=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function AD(e,t){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var o2=me.S;me.S=function(e,t){if(P8=Vn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zD(e,t),wc!==null)for(var n=bl;n!==null;)i2(n,wc),n=n.next;if(n=e.types,n!==null){for(var s=bl;s!==null;)i2(s,n),s=s.next;if(Na!==0){s=wc,s===null&&(s=wc=[]);for(var r=0;r<n.length;r++){var i=n[r];s.indexOf(i)===-1&&s.push(i)}}}o2!==null&&o2(e,t)};var ba=dr(null);function zy(){var e=ba.current;return e!==null?e:Ke.pooledCache}function xf(e,t){t===null?Je(ba,ba.current):Je(ba,t.pool)}function $j(){var e=zy();return e===null?null:{parent:bt._currentValue,pool:e}}var Pl=Error(W(460)),Ay=Error(W(474)),Cx=Error(W(542)),oh={then:function(){}};function l2(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Cj(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nr,nr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,u2(e),e===void 0&&!("reason"in t)?Error(W(600)):e;default:if(typeof t.status=="string")t.then(nr,nr);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(W(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,u2(e),e}throw va=t,Pl}}function Zi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(va=n,Pl):n}}var va=null;function c2(){if(va===null)throw Error(W(459));var e=va;return va=null,e}function u2(e){if(e===Pl||e===Cx)throw Error(W(483))}var Uo=null,ou=0;function Id(e){var t=ou;return ou+=1,Uo===null&&(Uo=[]),Cj(Uo,e,t)}function Xr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _d(e,t){throw t.$$typeof===uO?Error(W(525)):(e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ej(e){function t(g,k){if(e){var v=g.deletions;v===null?(g.deletions=[k],g.flags|=16):v.push(k)}}function n(g,k){if(!e)return null;for(;k!==null;)t(g,k),k=k.sibling;return null}function s(g){for(var k=new Map;g!==null;)g.key===null?k.set(g.index,g):k.set(g.key,g),g=g.sibling;return k}function r(g,k){return g=zr(g,k),g.index=0,g.sibling=null,g}function i(g,k,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<k?(g.flags|=2,k):v):(g.flags|=134217730,k)):(g.flags|=1048576,k)}function a(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function l(g,k,v,w){return k===null||k.tag!==6?(k=Z1(v,g.mode,w),k.return=g,k):(k=r(k,v),k.return=g,k)}function c(g,k,v,w){var j=v.type;return j===$o?(g=d(g,k,v.props.children,w,v.key),Xr(g,v),g):k!==null&&(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ti&&Zi(j)===k.type)?(k=r(k,v.props),Xr(k,v),k.return=g,k):(k=ff(v.type,v.key,v.props,null,g.mode,w),Xr(k,v),k.return=g,k)}function u(g,k,v,w){return k===null||k.tag!==4||k.stateNode.containerInfo!==v.containerInfo||k.stateNode.implementation!==v.implementation?(k=Y1(v,g.mode,w),k.return=g,k):(k=r(k,v.children||[]),k.return=g,k)}function d(g,k,v,w,j){return k===null||k.tag!==7?(k=ka(v,g.mode,w,j),k.return=g,k):(k=r(k,v),k.return=g,k)}function f(g,k,v){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Z1(""+k,g.mode,v),k.return=g,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Ed:return v=ff(k.type,k.key,k.props,null,g.mode,v),Xr(v,k),v.return=g,v;case kc:return k=Y1(k,g.mode,v),k.return=g,k;case ti:return k=Zi(k),f(g,k,v)}if(bc(k)||oc(k))return k=ka(k,g.mode,v,null),k.return=g,k;if(typeof k.then=="function")return f(g,Id(k),v);if(k.$$typeof===tr)return f(g,Rd(g,k),v);_d(g,k)}return null}function h(g,k,v,w){var j=k!==null?k.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return j!==null?null:l(g,k,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ed:return v.key===j?c(g,k,v,w):null;case kc:return v.key===j?u(g,k,v,w):null;case ti:return v=Zi(v),h(g,k,v,w)}if(bc(v)||oc(v))return j!==null?null:d(g,k,v,w,null);if(typeof v.then=="function")return h(g,k,Id(v),w);if(v.$$typeof===tr)return h(g,k,Rd(g,v),w);_d(g,v)}return null}function p(g,k,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return g=g.get(v)||null,l(k,g,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ed:return g=g.get(w.key===null?v:w.key)||null,c(k,g,w,j);case kc:return g=g.get(w.key===null?v:w.key)||null,u(k,g,w,j);case ti:return w=Zi(w),p(g,k,v,w,j)}if(bc(w)||oc(w))return g=g.get(v)||null,d(k,g,w,j,null);if(typeof w.then=="function")return p(g,k,v,Id(w),j);if(w.$$typeof===tr)return p(g,k,v,Rd(k,w),j);_d(k,w)}return null}function m(g,k,v,w){for(var j=null,S=null,C=k,E=k=0,T=null;C!==null&&E<v.length;E++){C.index>E?(T=C,C=null):T=C.sibling;var $=h(g,C,v[E],w);if($===null){C===null&&(C=T);break}e&&C&&$.alternate===null&&t(g,C),k=i($,k,E),S===null?j=$:S.sibling=$,S=$,C=T}if(E===v.length)return n(g,C),$e&&kr(g,E),j;if(C===null){for(;E<v.length;E++)C=f(g,v[E],w),C!==null&&(k=i(C,k,E),S===null?j=C:S.sibling=C,S=C);return $e&&kr(g,E),j}for(C=s(C);E<v.length;E++)T=p(C,g,E,v[E],w),T!==null&&(e&&($=T.alternate,$!==null&&C.delete($.key===null?E:$.key)),k=i(T,k,E),S===null?j=T:S.sibling=T,S=T);return e&&C.forEach(function(N){return t(g,N)}),$e&&kr(g,E),j}function b(g,k,v,w){if(v==null)throw Error(W(151));for(var j=null,S=null,C=k,E=k=0,T=null,$=v.next();C!==null&&!$.done;E++,$=v.next()){C.index>E?(T=C,C=null):T=C.sibling;var N=h(g,C,$.value,w);if(N===null){C===null&&(C=T);break}e&&C&&N.alternate===null&&t(g,C),k=i(N,k,E),S===null?j=N:S.sibling=N,S=N,C=T}if($.done)return n(g,C),$e&&kr(g,E),j;if(C===null){for(;!$.done;E++,$=v.next())$=f(g,$.value,w),$!==null&&(k=i($,k,E),S===null?j=$:S.sibling=$,S=$);return $e&&kr(g,E),j}for(C=s(C);!$.done;E++,$=v.next())$=p(C,g,E,$.value,w),$!==null&&(e&&(T=$.alternate,T!==null&&C.delete(T.key===null?E:T.key)),k=i($,k,E),S===null?j=$:S.sibling=$,S=$);return e&&C.forEach(function(A){return t(g,A)}),$e&&kr(g,E),j}function y(g,k,v,w){if(typeof v=="object"&&v!==null&&v.type===$o&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ed:e:{for(var j=v.key;k!==null;){if(k.key===j){if(j=v.type,j===$o){if(k.tag===7){n(g,k.sibling),w=r(k,v.props.children),Xr(w,v),w.return=g,g=w;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ti&&Zi(j)===k.type){n(g,k.sibling),w=r(k,v.props),Xr(w,v),w.return=g,g=w;break e}n(g,k);break}else t(g,k);k=k.sibling}v.type===$o?(w=ka(v.props.children,g.mode,w,v.key),Xr(w,v),w.return=g,g=w):(w=ff(v.type,v.key,v.props,null,g.mode,w),Xr(w,v),w.return=g,g=w)}return a(g);case kc:e:{for(j=v.key;k!==null;){if(k.key===j)if(k.tag===4&&k.stateNode.containerInfo===v.containerInfo&&k.stateNode.implementation===v.implementation){n(g,k.sibling),w=r(k,v.children||[]),w.return=g,g=w;break e}else{n(g,k);break}else t(g,k);k=k.sibling}w=Y1(v,g.mode,w),w.return=g,g=w}return a(g);case ti:return v=Zi(v),y(g,k,v,w)}if(bc(v))return m(g,k,v,w);if(oc(v)){if(j=oc(v),typeof j!="function")throw Error(W(150));return v=j.call(v),b(g,k,v,w)}if(typeof v.then=="function")return y(g,k,Id(v),w);if(v.$$typeof===tr)return y(g,k,Rd(g,v),w);_d(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,k!==null&&k.tag===6?(n(g,k.sibling),w=r(k,v),w.return=g,g=w):(n(g,k),w=Z1(v,g.mode,w),w.return=g,g=w),a(g)):n(g,k)}return function(g,k,v,w){try{ou=0;var j=y(g,k,v,w);return Uo=null,j}catch(C){if(C===Pl||C===Cx)throw C;var S=Tn(29,C,null,g.mode);return S.lanes=w,S.return=g,S}finally{}}}var Ma=Ej(!0),Tj=Ej(!1),ni=!1;function Ny(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gi(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Oe&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=sh(e),kj(e,null,n),t}return Sx(e,s,t,n),sh(e)}function Mc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,G6(e,n)}}function J1(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Tg=!1;function Rc(){if(Tg){var e=Po;if(e!==null)throw e}}function Ic(e,t,n,s){Tg=!1;var r=e.updateQueue;ni=!1;var i=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=r.baseState;a=0,d=u=c=null,l=i;do{var h=l.lane&-536870913,p=h!==l.lane;if(p?(Ae&h)===h:(s&h)===h){h!==0&&h===Na&&(Tg=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var m=e,b=l;h=t;var y=n;switch(b.tag){case 1:if(m=b.payload,typeof m=="function"){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=b.payload,h=typeof m=="function"?m.call(y,f,h):m,h==null)break e;f=Xe({},f,h);break e;case 2:ni=!0}}h=l.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,i===null&&(r.shared.lanes=0),zi|=a,e.lanes=a,e.memoizedState=f}}function zj(e,t){if(typeof e!="function")throw Error(W(191,e));e.call(t)}function Aj(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)zj(n[e],t)}var Ei=dr(null),lh=dr(0);function d2(e,t){e=Dr,Je(lh,e),Je(Ei,t),Dr=e|t.baseLanes}function zg(){Je(lh,Dr),Je(Ei,Ei.current)}function My(){Dr=lh.current,Zt(Ei),Zt(lh)}var Jt=dr(null),rn=null;function mi(e){var t=e.alternate;Je(Yt,Yt.current&1),Je(Jt,e),rn===null&&(t===null||Ei.current!==null||t.memoizedState!==null)&&(rn=e)}function Ag(e){Je(Yt,Yt.current),Je(Jt,e),rn===null&&(rn=e)}function Nj(e){e.tag===22?(Je(Yt,Yt.current),Je(Jt,e),rn===null&&(rn=e)):yi()}function yi(){Je(Yt,Yt.current),Je(Jt,Jt.current)}function Hn(e){Zt(Jt),rn===e&&(rn=null),Zt(Yt)}var Yt=dr(0);function lu(e,t){Je(Jt,Jt.current),Je(Yt,t)}function Ry(e){Zt(Yt),Zt(Jt),rn===e&&(rn=null)}function ch(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||um(n)||ak(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ir=0,je=null,Ge=null,kt=null,uh=!1,Fo=!1,Ra=!1,dh=0,cu=0,Go=null,ND=0;function ht(){throw Error(W(321))}function Iy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function _y(e,t,n,s,r,i){return Ir=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,me.H=e===null||e.memoizedState===null?l8:c8,Ra=!1,i=n(s,r),Ra=!1,Fo&&(i=Rj(t,n,s,r)),Mj(e),i}function Mj(e){me.H=fh;var t=Ge!==null&&Ge.next!==null;if(Ir=0,kt=Ge=je=null,uh=!1,cu=0,Go=null,t)throw Error(W(300));e===null||vt||(e=e.dependencies,e!==null&&ah(e)&&(vt=!0))}function Rj(e,t,n,s){je=e;var r=0;do{if(Fo&&(Go=null),cu=0,Fo=!1,25<=r)throw Error(W(301));if(r+=1,kt=Ge=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}me.H=BD,i=t(n,s)}while(Fo);return i}function MD(){var e=me.H,t=e.useState()[0];return t=typeof t.then=="function"?Uu(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(je.flags|=1024),t}function Oy(){var e=dh!==0;return dh=0,e}function Dy(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ly(e){if(uh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uh=!1}Ir=0,kt=Ge=je=null,Fo=!1,cu=dh=0,Go=null}function yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?je.memoizedState=kt=e:kt=kt.next=e,kt}function mt(){if(Ge===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=kt===null?je.memoizedState:kt.next;if(t!==null)kt=t,Ge=e;else{if(e===null)throw je.alternate===null?Error(W(467)):Error(W(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},kt===null?je.memoizedState=kt=e:kt=kt.next=e}return kt}function Ex(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Uu(e){var t=cu;return cu+=1,Go===null&&(Go=[]),e=Cj(Go,e,t),t=je,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,me.H=t===null||t.memoizedState===null?l8:c8),e}function Tx(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Uu(e);if(e.$$typeof===hO)return;if(e.$$typeof===tr)return Xt(e)}throw Error(W(438,String(e)))}function By(e){var t=null,n=je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=je.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ex(),je.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),s=0;s<e;s++)n[s]=fO;return t.index++,n}function _r(e,t){return typeof t=="function"?t(e):t}function pf(e){var t=mt();return qy(t,Ge,e)}function qy(e,t,n){var s=e.queue;if(s===null)throw Error(W(311));s.lastRenderedReducer=n;var r=e.baseQueue,i=s.pending;if(i!==null){if(r!==null){var a=r.next;r.next=i.next,i.next=a}t.baseQueue=r=i,s.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=a=null,c=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Ae&f)===f:(Ir&f)===f){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Na&&(d=!0);else if((Ir&h)===h){u=u.next,h===Na&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=f,a=i):c=c.next=f,je.lanes|=h,zi|=h;f=u.action,Ra&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=h,a=i):c=c.next=h,je.lanes|=f,zi|=f;u=u.next}while(u!==null&&u!==t);if(c===null?a=i:c.next=l,!Zn(i,e.memoizedState)&&(vt=!0,d&&(n=Po,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=c,s.lastRenderedState=i}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ep(e){var t=mt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do i=e(i,a.action),a=a.next;while(a!==r);Zn(i,t.memoizedState)||(vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,s]}function Ij(e,t,n){var s=je,r=mt(),i=$e;if(i){if(n===void 0)throw Error(W(407));n=n()}else n=t();var a=!Zn((Ge||r).memoizedState,n);if(a&&(r.memoizedState=n,vt=!0),r=r.queue,Hy(Dj.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||a||kt!==null&&(kt.memoizedState.tag&1)!==0,gl(e?9:8,{destroy:void 0},Oj.bind(null,s,r,n,t),null),e){if(s.flags|=2048,Ke===null)throw Error(W(349));i||Ir&127||_j(s,t,n)}return n}function _j(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t=Ex(),je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Oj(e,t,n,s){t.value=n,t.getSnapshot=s,Lj(t)&&Bj(e)}function Dj(e,t,n){return n(function(){Lj(t)&&Bj(e)})}function Lj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch{return!0}}function Bj(e){var t=Ya(e,2);t!==null&&zn(t,e,2)}function Ng(e){var t=yn();if(typeof e=="function"){var n=e;if(e=n(),Ra){oi(!0);try{n()}finally{oi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:e},t}function qj(e,t,n,s){return e.baseState=n,qy(e,Ge,typeof s=="function"?s:_r)}function RD(e,t,n,s,r){if(Ax(e))throw Error(W(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};me.T!==null?n(!0):i.isTransition=!1,s(i),n=t.pending,n===null?(i.next=t.pending=i,Hj(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Hj(e,t){var n=t.action,s=t.payload,r=e.state;if(t.isTransition){var i=me.T,a={};a.types=i!==null?i.types:null,me.T=a;try{var l=n(r,s),c=me.S;c!==null&&c(a,l),f2(e,t,l)}catch(u){Mg(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),me.T=i}}else try{i=n(r,s),f2(e,t,i)}catch(u){Mg(e,t,u)}}function f2(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){h2(e,t,s)},function(s){return Mg(e,t,s)}):h2(e,t,n)}function h2(e,t,n){t.status="fulfilled",t.value=n,Pj(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Hj(e,n)))}function Mg(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,Pj(t),t=t.next;while(t!==s)}e.action=null}function Pj(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uj(e,t){return t}function x2(e,t){if($e){var n=Ke.formState;if(n!==null){e:{var s=je;if($e){if(Ye){t:{for(var r=Ye,i=xs;r.nodeType!==8;){if(!i){r=null;break t}if(r=ms(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){Ye=ms(r.nextSibling),s=r.data==="F!";break e}}Ci(s)}s=!1}s&&(t=n[0])}}return n=yn(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uj,lastRenderedState:t},n.queue=s,n=i8.bind(null,je,s),s.dispatch=n,s=Ng(!1),i=Gy.bind(null,je,!1,s.queue),s=yn(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,n=RD.bind(null,je,r,i,n),r.dispatch=n,s.memoizedState=e,[t,n,!1]}function p2(e){var t=mt();return Fj(t,Ge,e)}function Fj(e,t,n){if(t=qy(e,t,Uj)[0],e=pf(_r)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Uu(t)}catch(a){throw a===Pl?Cx:a}else s=t;t=mt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(je.flags|=2048,gl(9,{destroy:void 0},ID.bind(null,r,n),null)),[s,i,e]}function ID(e,t){e.action=t}function g2(e){var t=mt(),n=Ge;if(n!==null)return Fj(t,n,e);mt(),t=t.memoizedState,n=mt();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function gl(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=je.updateQueue,t===null&&(t=Ex(),je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function Gj(){return mt().memoizedState}function gf(e,t,n,s){var r=yn();je.flags|=e,r.memoizedState=gl(1|t,{destroy:void 0},n,s===void 0?null:s)}function zx(e,t,n,s){var r=mt();s=s===void 0?null:s;var i=r.memoizedState.inst;Ge!==null&&s!==null&&Iy(s,Ge.memoizedState.deps)?r.memoizedState=gl(t,i,n,s):(je.flags|=e,r.memoizedState=gl(1|t,i,n,s))}function m2(e,t){gf(8390656,8,e,t)}function Hy(e,t){zx(2048,8,e,t)}function _D(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Ex(),je.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Vj(e){var t=mt().memoizedState;return _D({ref:t,nextImpl:e}),function(){if(Oe&2)throw Error(W(440));return t.impl.apply(void 0,arguments)}}function Wj(e,t){return zx(4,2,e,t)}function Kj(e,t){return zx(4,4,e,t)}function Xj(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zj(e,t,n){n=n!=null?n.concat([e]):null,zx(4,4,Xj.bind(null,t,e),n)}function Py(){}function Yj(e,t){var n=mt();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&Iy(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Qj(e,t){var n=mt();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&Iy(t,s[1]))return s[0];if(s=e(),Ra){oi(!0);try{e()}finally{oi(!1)}}return n.memoizedState=[s,t],s}function Uy(e,t,n){return n===void 0||Ir&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=F8(),je.lanes|=e,zi|=e,n)}function Jj(e,t,n,s){return Zn(n,t)?n:Ei.current!==null?(e=Uy(e,n,s),Zn(e,t)||(vt=!0),e):!(Ir&106)||Ir&1073741824&&!(Ae&261930)?(vt=!0,e.memoizedState=n):(e=F8(),je.lanes|=e,zi|=e,t)}function e8(e,t,n,s,r){var i=De.p;De.p=i!==0&&8>i?i:8;var a=me.T,l={};l.types=a!==null?a.types:null,me.T=l,Gy(e,!1,t,n);try{var c=r(),u=me.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=AD(c,s);_c(e,t,d,Xn(e))}else _c(e,t,s,Xn(e))}catch(f){_c(e,t,{then:function(){},status:"rejected",reason:f},Xn())}finally{De.p=i,a!==null&&l.types!==null&&(a.types=l.types),me.T=a}}function OD(){}function Rg(e,t,n,s){if(e.tag!==5)throw Error(W(476));var r=t8(e).queue;e8(e,r,t,ya,n===null?OD:function(){return n8(e),n(s)})}function t8(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ya,baseState:ya,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:ya},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function n8(e){var t=t8(e);t.next===null&&(t=e.alternate.memoizedState),_c(e,t.next.queue,{},Xn())}function Fy(){return Xt(jl)}function s8(){return mt().memoizedState}function r8(){return mt().memoizedState}function DD(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xn();e=pi(n);var s=gi(t,e,n);s!==null&&(zn(s,t,n),Mc(s,t,n)),t={cache:Ty()},e.payload=t;return}t=t.return}}function LD(e,t,n){var s=Xn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ax(e)?a8(t,n):(n=$y(e,t,n,s),n!==null&&(zn(n,e,s),o8(n,t,s)))}function i8(e,t,n){var s=Xn();_c(e,t,n,s)}function _c(e,t,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ax(e))a8(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(r.hasEagerState=!0,r.eagerState=l,Zn(l,a))return Sx(e,t,r,0),Ke===null&&jx(),!1}catch{}finally{}if(n=$y(e,t,r,s),n!==null)return zn(n,e,s),o8(n,t,s),!0}return!1}function Gy(e,t,n,s){if(s={lane:2,revertLane:nk(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ax(e)){if(t)throw Error(W(479))}else t=$y(e,n,s,2),t!==null&&zn(t,e,2)}function Ax(e){var t=e.alternate;return e===je||t!==null&&t===je}function a8(e,t){Fo=uh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function o8(e,t,n){if(n&4194048){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,G6(e,n)}}var fh={readContext:Xt,use:Tx,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht,useEffectEvent:ht},l8={readContext:Xt,use:Tx,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:m2,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,gf(4194308,4,Xj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gf(4194308,4,e,t)},useInsertionEffect:function(e,t){gf(4,2,e,t)},useMemo:function(e,t){var n=yn();t=t===void 0?null:t;var s=e();if(Ra){oi(!0);try{e()}finally{oi(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=yn();if(n!==void 0){var r=n(t);if(Ra){oi(!0);try{n(t)}finally{oi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=LD.bind(null,je,e),[s.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:function(e){e=Ng(e);var t=e.queue,n=i8.bind(null,je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Py,useDeferredValue:function(e,t){var n=yn();return Uy(n,e,t)},useTransition:function(){var e=Ng(!1);return e=e8.bind(null,je,e.queue,!0,!1),yn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=je,r=yn();if($e){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ke===null)throw Error(W(349));Ae&127||_j(s,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,m2(Dj.bind(null,s,i,e),[e]),s.flags|=2048,gl(9,{destroy:void 0},Oj.bind(null,s,i,n,t),null),n},useId:function(){var e=yn(),t=Ke.identifierPrefix;if($e){var n=rr,s=sr;n=(s&~(1<<32-Kn(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=dh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ND++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Fy,useFormState:x2,useActionState:x2,useOptimistic:function(e){var t=yn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Gy.bind(null,je,!0,n),n.dispatch=t,[e,t]},useMemoCache:By,useCacheRefresh:function(){return yn().memoizedState=DD.bind(null,je)},useEffectEvent:function(e){var t=yn(),n={impl:e};return t.memoizedState=n,function(){if(Oe&2)throw Error(W(440));return n.impl.apply(void 0,arguments)}}},c8={readContext:Xt,use:Tx,useCallback:Yj,useContext:Xt,useEffect:Hy,useImperativeHandle:Zj,useInsertionEffect:Wj,useLayoutEffect:Kj,useMemo:Qj,useReducer:pf,useRef:Gj,useState:function(){return pf(_r)},useDebugValue:Py,useDeferredValue:function(e,t){var n=mt();return Jj(n,Ge.memoizedState,e,t)},useTransition:function(){var e=pf(_r)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Uu(e),t]},useSyncExternalStore:Ij,useId:s8,useHostTransitionStatus:Fy,useFormState:p2,useActionState:p2,useOptimistic:function(e,t){var n=mt();return qj(n,Ge,e,t)},useMemoCache:By,useCacheRefresh:r8,useEffectEvent:Vj},BD={readContext:Xt,use:Tx,useCallback:Yj,useContext:Xt,useEffect:Hy,useImperativeHandle:Zj,useInsertionEffect:Wj,useLayoutEffect:Kj,useMemo:Qj,useReducer:ep,useRef:Gj,useState:function(){return ep(_r)},useDebugValue:Py,useDeferredValue:function(e,t){var n=mt();return Ge===null?Uy(n,e,t):Jj(n,Ge.memoizedState,e,t)},useTransition:function(){var e=ep(_r)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Uu(e),t]},useSyncExternalStore:Ij,useId:s8,useHostTransitionStatus:Fy,useFormState:g2,useActionState:g2,useOptimistic:function(e,t){var n=mt();return Ge!==null?qj(n,Ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:By,useCacheRefresh:r8,useEffectEvent:Vj};function tp(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ig={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Xn(),r=pi(s);r.payload=t,n!=null&&(r.callback=n),t=gi(e,r,s),t!==null&&(zn(t,e,s),Mc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Xn(),r=pi(s);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=gi(e,r,s),t!==null&&(zn(t,e,s),Mc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xn(),s=pi(n);s.tag=2,t!=null&&(s.callback=t),t=gi(e,s,n),t!==null&&(zn(t,e,n),Mc(t,e,n))}};function y2(e,t,n,s,r,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,i,a):t.prototype&&t.prototype.isPureReactComponent?!ru(n,s)||!ru(r,i):!0}function k2(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Ig.enqueueReplaceState(t,t.state,null)}function Ia(e,t){var n=t;if("ref"in t){n={};for(var s in t)s!=="ref"&&(n[s]=t[s])}if(e=e.defaultProps){n===t&&(n=Xe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function u8(e){nh(e)}function d8(e){console.error(e)}function f8(e){nh(e)}function hh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function b2(e,t,n){try{var s=e.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function _g(e,t,n){return n=pi(n),n.tag=3,n.payload={element:null},n.callback=function(){hh(e,t)},n}function h8(e){return e=pi(e),e.tag=3,e}function x8(e,t,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=s.value;e.payload=function(){return r(i)},e.callback=function(){b2(t,n,s)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){b2(t,n,s),typeof r!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var l=s.stack;this.componentDidCatch(s.value,{componentStack:l!==null?l:""})})}function qD(e,t,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&za(t,n,r,!0),n=Jt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return rn===null?vh():n.alternate===null&&xt===0&&(xt=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===oh?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),lp(e,s,r)),!1;case 22:return n.flags|=65536,s===oh?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([s]):n.add(s)),lp(e,s,r)),!1}throw Error(W(435,n.tag))}return lp(e,s,r),vh(),!1}if($e)return t=Jt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==jg&&(e=Error(W(422),{cause:s}),au(hs(e,n)))):(s!==jg&&(t=Error(W(423),{cause:s}),au(hs(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=hs(s,n),r=_g(e.stateNode,s,r),J1(e,r),xt!==4&&(xt=2)),!1;var i=Error(W(520),{cause:s});if(i=hs(i,n),Bc===null?Bc=[i]:Bc.push(i),xt!==4&&(xt=2),t===null)return!0;s=hs(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=_g(n.stateNode,s,e),J1(n,e),!1;case 1:if(t=n.type,i=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ki===null||!ki.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=h8(r),x8(r,e,n,s),J1(n,r),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Vy=Error(W(461)),vt=!1;function $t(e,t,n,s){t.child=e===null?Tj(t,null,n,s):Ma(t,e.child,n,s)}function v2(e,t,n,s,r){n=n.render;var i=t.ref;if("ref"in s){var a={};for(var l in s)l!=="ref"&&(a[l]=s[l])}else a=s;return Aa(t),s=_y(e,t,n,a,i,r),l=Oy(),e!==null&&!vt?(Dy(e,t,r),Or(e,t,r)):($e&&l&&$x(t),t.flags|=1,$t(e,t,s,r),t.child)}function w2(e,t,n,s,r){if(e===null){var i=n.type;return typeof i=="function"&&!Cy(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,p8(e,t,i,s,r)):(e=ff(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Ky(e,r)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:ru,n(a,s)&&e.ref===t.ref)return Or(e,t,r)}return t.flags|=1,e=zr(i,s),e.ref=t.ref,e.return=t,t.child=e}function p8(e,t,n,s,r){if(e!==null){var i=e.memoizedProps;if(ru(i,s)&&e.ref===t.ref)if(vt=!1,t.pendingProps=s=i,Ky(e,r))e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,Or(e,t,r)}return Og(e,t,n,s,r)}function g8(e,t,n,s){var r=s.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~i}else s=0,t.child=null;return j2(e,t,i,n,s)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xf(t,i!==null?i.cachePool:null),i!==null?d2(t,i):zg(),Nj(t);else return s=t.lanes=536870912,j2(e,t,i!==null?i.baseLanes|n:n,n,s)}else i!==null?(xf(t,i.cachePool),d2(t,i),yi(),t.memoizedState=null):(e!==null&&xf(t,null),zg(),yi());return $t(e,t,r,n),t.child}function Oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function j2(e,t,n,s,r){var i=zy();return i=i===null?null:{parent:bt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&xf(t,null),zg(),Nj(t),e!==null&&za(e,t,s,!0),t.childLanes=r,null}function mf(e,t){return t=Nx({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function S2(e,t,n){return Ma(t,e.child,null,n),e=mf(t,t.pendingProps),e.flags|=2,Hn(t),t.memoizedState=null,e}function HD(e,t,n){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=mf(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Oc(null,e);if(Ag(t),(e=Ye)?(e=pS(e,xs),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$i!==null?{id:sr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},n=vj(e),n.return=t,t.child=n,Bt=t,Ye=null)):e=null,e===null)throw Ci(t);return t.lanes=536870912,null}return mf(t,s)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(Ag(t),r)if(t.flags&256)t.flags&=-257,t=S2(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(W(558));else if(vt||za(e,t,n,!1),r=(n&e.childLanes)!==0,vt||r){if(Ei.current===null){if(s=Ke,s!==null&&(a=V6(s,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,Ya(e,a),zn(s,e,a),Vy;vh()}t=S2(e,t,n)}else e=i.treeContext,Ye=ms(a.nextSibling),Bt=t,$e=!0,xi=null,xs=!1,e!==null&&jj(t,e),t=mf(t,s),t.flags|=134221824;return t}return e=zr(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(W(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Og(e,t,n,s,r){return Aa(t),n=_y(e,t,n,s,void 0,r),s=Oy(),e!==null&&!vt?(Dy(e,t,r),Or(e,t,r)):($e&&s&&$x(t),t.flags|=1,$t(e,t,n,r),t.child)}function $2(e,t,n,s,r,i){return Aa(t),t.updateQueue=null,n=Rj(t,s,n,r),Mj(e),s=Oy(),e!==null&&!vt?(Dy(e,t,i),Or(e,t,i)):($e&&s&&$x(t),t.flags|=1,$t(e,t,n,i),t.child)}function C2(e,t,n,s,r){if(Aa(t),t.stateNode===null){var i=Mo,a=n.contextType;typeof a=="object"&&a!==null&&(i=Xt(a)),i=new n(s,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ig,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=s,i.state=t.memoizedState,i.refs={},Ny(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Xt(a):Mo,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(tp(t,n,a,s),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&Ig.enqueueReplaceState(i,i.state,null),Ic(t,s,i,r),Rc(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,c=Ia(n,l);i.props=c;var u=i.context,d=n.contextType;a=Mo,typeof d=="object"&&d!==null&&(a=Xt(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==a)&&k2(t,i,s,a),ni=!1;var h=t.memoizedState;i.state=h,Ic(t,s,i,r),Rc(),u=t.memoizedState,l||h!==u||ni?(typeof f=="function"&&(tp(t,n,f,s),u=t.memoizedState),(c=ni||y2(t,n,c,s,h,u,a))?(d||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=s,t.memoizedState=u),i.props=s,i.state=u,i.context=a,s=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{i=t.stateNode,Eg(e,t),a=t.memoizedProps,d=Ia(n,a),i.props=d,f=t.pendingProps,h=i.context,u=n.contextType,c=Mo,typeof u=="object"&&u!==null&&(c=Xt(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&k2(t,i,s,c),ni=!1,h=t.memoizedState,i.state=h,Ic(t,s,i,r),Rc();var p=t.memoizedState;a!==f||h!==p||ni||e!==null&&e.dependencies!==null&&ah(e.dependencies)?(typeof l=="function"&&(tp(t,n,l,s),p=t.memoizedState),(d=ni||y2(t,n,d,s,h,p,c)||e!==null&&e.dependencies!==null&&ah(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(s,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(s,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=p),i.props=s,i.state=p,i.context=c,s=d):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return i=s,bo(e,t),s=(t.flags&128)!==0,i||s?(i=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&s?(t.child=Ma(t,e.child,null,r),t.child=Ma(t,null,n,r)):$t(e,t,n,r),t.memoizedState=i.state,e=t.child):e=Or(e,t,r),e}function E2(e,t,n,s){return Ta(),t.flags|=256,$t(e,t,n,s),t.child}var Dg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lg(e){return{baseLanes:e,cachePool:$j()}}function Bg(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Un),e}function m8(e,t,n){var s=t.pendingProps,r=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(Yt.current&2)!==0),a&&(r=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(r?mi(t):yi(),(e=Ye)?(e=pS(e,xs),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$i!==null?{id:sr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},n=vj(e),n.return=t,t.child=n,Bt=t,Ye=null)):e=null,e===null)throw Ci(t);return ak(e)?t.lanes=32:t.lanes=536870912,null}return i=s.children,s=s.fallback,r?(yi(),r=t.mode,i=Nx({mode:"hidden",children:i},r),s=ka(s,r,n,null),i.return=t,s.return=t,i.sibling=s,t.child=i,s=t.child,s.memoizedState=Lg(n),s.childLanes=Bg(e,a,n),t.memoizedState=Dg,Oc(null,s)):(mi(t),Wy(t,i))}var l=e.memoizedState;if(l!==null){var c=l.dehydrated;if(c!==null)return PD(e,t,i,a,s,c,l,n)}return r?(yi(),r=s.fallback,i=t.mode,l=e.child,c=l.sibling,s=zr(l,{mode:"hidden",children:s.children}),s.subtreeFlags=l.subtreeFlags&1206910976,c!==null?r=zr(c,r):(r=ka(r,i,n,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,Oc(null,s),s=t.child,r=e.child.memoizedState,r===null?r=Lg(n):(i=r.cachePool,i!==null?(l=bt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=$j(),r={baseLanes:r.baseLanes|n,cachePool:i}),s.memoizedState=r,s.childLanes=Bg(e,a,n),t.memoizedState=Dg,Oc(e.child,s)):(mi(t),n=e.child,e=n.sibling,n=zr(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Wy(e,t){return t=Nx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Nx(e,t){return e=Tn(22,e,null,t),e.lanes=0,e}function Od(e,t,n){return Ma(t,e.child,null,n),e=Wy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PD(e,t,n,s,r,i,a,l){if(n)return t.flags&256?(mi(t),t.flags&=-257,Od(e,t,l)):t.memoizedState!==null?(yi(),t.child=e.child,t.flags|=128,null):(yi(),i=r.fallback,a=t.mode,r=Nx({mode:"visible",children:r.children},a),i=ka(i,a,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,Ma(t,e.child,null,l),r=t.child,r.memoizedState=Lg(l),r.childLanes=Bg(e,s,l),t.memoizedState=Dg,Oc(null,r));if(mi(t),ak(i)){if(s=i.nextSibling&&i.nextSibling.dataset,s)var c=s.dgst;return s=c,s!==""&&(r=Error(W(419)),r.stack="",r.digest=s,au({value:r,source:null,stack:null})),Od(e,t,l)}if(vt||za(e,t,l,!1),s=(l&e.childLanes)!==0,vt||s){if(Ei.current!==null)return Od(e,t,l);if(s=Ke,s!==null&&(r=V6(s,l),r!==0&&r!==a.retryLane))throw a.retryLane=r,Ya(e,r),zn(s,e,r),Vy;return um(i)||vh(),Od(e,t,l)}return um(i)?(t.flags|=192,t.child=e.child,null):(e=a.treeContext,Ye=ms(i.nextSibling),Bt=t,$e=!0,xi=null,xs=!1,e!==null&&jj(t,e),t=Wy(t,r.children),t.flags|=134221824,t)}function T2(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),hf(e.return,t,n)}function z2(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&ch(n)===null&&(t=e),e=e.sibling}return t}function Dd(e,t,n,s,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=s,a.tail=n,a.tailMode=r,a.treeForkCount=i)}function np(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function qg(e,t,n){var s=t.pendingProps,r=s.revealOrder,i=s.tail;s=s.children;var a=Yt.current;if(t.flags&128)return lu(t,a),null;var l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,lu(t,a),r==="backwards"&&e!==null?(np(e),$t(e,t,s,n),np(e)):$t(e,t,s,n),s=$e?iu:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&T2(e,n,t);else if(e.tag===19)T2(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}switch(r){case"backwards":n=z2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null,np(t)),Dd(t,!0,r,null,i,s);break;case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ch(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Dd(t,!0,n,null,i,s);break;case"together":Dd(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:n=z2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Dd(t,!1,r,n,i,s)}return t.child}function A2(e,t,n){var s=t.pendingProps;return ci(t,t.type,s.value),$t(e,t,s.children,n),t.child}function Or(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zi|=t.lanes,!(n&t.childLanes))if(e!==null){if(za(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ky(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&ah(e)))}function UD(e,t,n){switch(t.tag){case 3:Qf(t,t.stateNode.containerInfo),ci(t,bt,e.memoizedState.cache),Ta();break;case 27:case 5:hg(t);break;case 4:Qf(t,t.stateNode.containerInfo);break;case 10:ci(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ag(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return mi(t),t.flags|=128,null;s=za(e,t,n,!1);var r=t.child.childLanes;return s||n&r?m8(e,t,n):(mi(t),e=Or(e,t,n),e!==null?e.sibling:null)}mi(t);break;case 19:if(t.flags&128)return qg(e,t,n);if(r=(e.flags&128)!==0,s=(n&t.childLanes)!==0,s||(za(e,t,n,!1),s=(n&t.childLanes)!==0),r){if(s)return qg(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),lu(t,Yt.current),s)break;return null;case 22:return t.lanes=0,g8(e,t,n,t.pendingProps);case 24:ci(t,bt,e.memoizedState.cache)}return Or(e,t,n)}function y8(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Ky(e,n)&&!(t.flags&128))return vt=!1,UD(e,t,n);vt=!!(e.flags&131072)}else vt=!1,$e&&t.flags&1048576&&wj(t,iu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Zi(t.elementType),t.type=e,typeof e=="function")Cy(e)?(s=Ia(e,s),t.tag=1,t=C2(null,t,e,s,n)):(t.tag=0,t=Og(null,t,e,s,n));else{if(e!=null){var r=e.$$typeof;if(r===hy){t.tag=11,t=v2(null,t,e,s,n);break e}else if(r===xy){t.tag=14,t=w2(null,t,e,s,n);break e}else if(r===tr){t.tag=10,t.type=e,t=A2(null,t,n);break e}}throw t=dg(e)||e,Error(W(306,t,""))}}return t;case 0:return Og(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,r=Ia(s,t.pendingProps),C2(e,t,s,r,n);case 3:e:{if(Qf(t,t.stateNode.containerInfo),e===null)throw Error(W(387));s=t.pendingProps;var i=t.memoizedState;r=i.element,Eg(e,t),Ic(t,s,null,n);var a=t.memoizedState;if(s=a.cache,ci(t,bt,s),s!==i.cache&&$g(t,[bt],n,!0),Rc(),s=a.element,i.isDehydrated)if(i={element:s,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=E2(e,t,s,n);break e}else if(s!==r){r=hs(Error(W(424)),t),au(r),t=E2(e,t,s,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=ms(e.firstChild),Bt=t,$e=!0,xi=null,xs=!0,n=Tj(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ta(),s===r){t=Or(e,t,n);break e}$t(e,t,s,n)}t=t.child}return t;case 26:return bo(e,t),e===null?(n=tw(t.type,null,t.pendingProps,null))?t.memoizedState=n:$e||(t.stateNode=oS(t.type,t.pendingProps,hi.current,t)):t.memoizedState=tw(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return hg(t),e===null&&$e&&(s=t.stateNode=gS(t.type,t.pendingProps,hi.current),Bt=t,xs=!0,r=Ye,_i(t.type)?(dm=r,Ye=ms(s.firstChild)):Ye=r),$t(e,t,t.pendingProps.children,n),bo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((r=s=Ye)&&(s=DL(s,t.type,t.pendingProps,xs),s!==null?(t.stateNode=s,Bt=t,Ye=ms(s.firstChild),xs=!1,r=!0):r=!1),r||Ci(t)),hg(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,om(r,i)?s=null:a!==null&&om(r,a)&&(t.flags|=32),t.memoizedState!==null&&(r=_y(e,t,MD,null,null,n),jl._currentValue=r),bo(e,t),$t(e,t,s,n),t.child;case 6:return e===null&&$e&&((e=n=Ye)&&(n=LL(n,t.pendingProps,xs),n!==null?(t.stateNode=n,Bt=t,Ye=null,e=!0):e=!1),e||Ci(t)),null;case 13:return m8(e,t,n);case 4:return Qf(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ma(t,null,s,n):$t(e,t,s,n),t.child;case 11:return v2(e,t,t.type,t.pendingProps,n);case 7:return s=t.pendingProps,bo(e,t),$t(e,t,s,n),t.child;case 8:return $t(e,t,t.pendingProps.children,n),t.child;case 12:return $t(e,t,t.pendingProps.children,n),t.child;case 10:return A2(e,t,n);case 9:return r=t.type._context,s=t.pendingProps.children,Aa(t),r=Xt(r),s=s(r),t.flags|=1,$t(e,t,s,n),t.child;case 14:return w2(e,t,t.type,t.pendingProps,n);case 15:return p8(e,t,t.type,t.pendingProps,n);case 19:return qg(e,t,n);case 31:return HD(e,t,n);case 22:return g8(e,t,n,t.pendingProps);case 24:return Aa(t),s=Xt(bt),e===null?(r=zy(),r===null&&(r=Ke,i=Ty(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:s,cache:r},Ny(t),ci(t,bt,r)):(e.lanes&n&&(Eg(e,t),Ic(t,null,null,n),Rc()),r=e.memoizedState,i=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),ci(t,bt,s)):(s=i.cache,ci(t,bt,s),s!==r.cache&&$g(t,[bt],n,!0))),$t(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:$e&&$x(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:bo(e,t),$t(e,t,s.children,n),t.child;case 29:throw t.pendingProps}throw Error(W(156,t.tag))}function pr(e){e.flags|=4}function sp(e,t,n,s,r){var i;if((i=(e.mode&32)!==0)&&(i=n===null?rw(t,s):rw(t,s)&&(s.src!==n.src||s.srcSet!==n.srcSet)),i){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(W8())e.flags|=8192;else throw va=oh,Ay}else e.flags&=-16777217}function N2(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!bS(t))if(W8())e.flags|=8192;else throw va=oh,Ay}function Ld(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?U6():536870912,e.lanes|=t,ml|=t)}function uc(e,t){if(!$e)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function FD(e,t,n){var s=t.pendingProps;switch(Ey(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ar(bt),hl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xo(t)?pr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Q1())),Ze(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(pr(t),i!==null?(Ze(t),N2(t,i)):(Ze(t),sp(t,r,null,s,n))):i?i!==e.memoizedState?(pr(t),Ze(t),N2(t,i)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&pr(t),Ze(t),sp(t,r,e,s,n)),null;case 27:if(Jf(t),n=hi.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&pr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}e=or.current,xo(t)?r2(t):(e=gS(r,s,n),t.stateNode=e,pr(t))}return Ze(t),t.subtreeFlags&=-33554433,null;case 5:if(Jf(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&pr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}if(i=or.current,xo(t))r2(t);else{var a=fu(hi.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":i=a.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof s.is=="string"?a.createElement("select",{is:s.is}):a.createElement("select"),s.multiple?i.multiple=!0:s.size&&(i.size=s.size);break;default:i=typeof s.is=="string"?a.createElement(r,{is:s.is}):a.createElement(r)}}i[Kt]=t,i[Nn]=s;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(Qt(i,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&pr(t)}}return Ze(t),t.subtreeFlags&=-33554433,sp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&pr(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(W(166));if(e=hi.current,xo(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,r=Bt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Kt]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||iS(e.nodeValue,n)),e||Ci(t,!0)}else e=fu(e).createTextNode(s),e[Kt]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=xo(t),n!==null){if(e===null){if(!s)throw Error(W(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(557));e[Kt]=t}else Ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=Q1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Hn(t),t):(Hn(t),null);if(t.flags&128)throw Error(W(558))}return Ze(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=xo(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(W(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(W(317));r[Kt]=t}else Ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=Q1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Hn(t),t):(Hn(t),null)}return Hn(t),t.flags&128?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==r&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ld(t,t.updateQueue),Ze(t),null);case 4:return hl(),e===null&&sk(t.stateNode.containerInfo),t.flags|=67108864,Ze(t),null;case 10:return Ar(t.type),Ze(t),null;case 19:if(Ry(t),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)uc(s,!1);else{if(xt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ch(e),i!==null){for(t.flags|=128,uc(s,!1),e=i.updateQueue,t.updateQueue=e,Ld(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bj(n,e),n=n.sibling;return lu(t,Yt.current&1|2),$e&&kr(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Vn()>kh&&(t.flags|=128,r=!0,uc(s,!1),t.lanes=4194304)}else{if(!r)if(e=ch(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Ld(t,e),uc(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!i.alternate&&!$e)return Ze(t),null}else 2*Vn()-s.renderingStartTime>kh&&n!==536870912&&(t.flags|=128,r=!0,uc(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}if(s.tail!==null){e=s.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Vn(),e.sibling=null,i=Yt.current,i=r?i&1|2:i&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!n||$e?lu(t,i):(n=i,Je(Jt,t),Je(Yt,n),rn===null&&(rn=t)),$e&&kr(t,s.treeForkCount),e}return Ze(t),null;case 22:case 23:return Hn(t),My(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?n&536870912&&!(t.flags&128)&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&Ld(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&Zt(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ar(bt),Ze(t),null;case 25:return null;case 30:return t.flags|=33554432,Ze(t),null}throw Error(W(156,t.tag))}function GD(e,t){switch(Ey(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ar(bt),hl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jf(t),null;case 31:if(t.memoizedState!==null){if(Hn(t),t.alternate===null)throw Error(W(340));Ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ry(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return hl(),null;case 10:return Ar(t.type),null;case 22:case 23:return Hn(t),My(),e!==null&&Zt(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ar(bt),null;case 25:return null;default:return null}}function k8(e,t){switch(Ey(t),t.tag){case 3:Ar(bt),hl();break;case 26:case 27:case 5:Jf(t);break;case 4:hl();break;case 31:t.memoizedState!==null&&Hn(t);break;case 13:Hn(t);break;case 19:Ry(t);break;case 10:Ar(t.type);break;case 22:case 23:Hn(t),My(),e!==null&&Zt(ba);break;case 24:Ar(bt)}}function Fu(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&e)===e){s=void 0;var i=n.create,a=n.inst;s=i(),a.destroy=s}n=n.next}while(n!==r)}}catch(l){Pe(t,t.return,l)}}function Ti(e,t,n){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var i=r.next;s=i;do{if((s.tag&e)===e){var a=s.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,r=t;var c=n,u=l;try{u()}catch(d){Pe(r,c,d)}}}s=s.next}while(s!==i)}}catch(d){Pe(t,t.return,d)}}function b8(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Aj(t,n)}catch(s){Pe(e,e.return,s)}}}function v8(e,t,n){n.props=Ia(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){Pe(e,t,s)}}function Js(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,i=Rr(e.memoizedProps,r);(r.ref===null||r.ref.name!==i)&&(r.ref=uS(i)),s=r.ref;break;case 7:if(e.stateNode===null){var a=new ts(e);An(e.child,!1,_L,a,void 0,void 0),e.stateNode=a}s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(l){Pe(e,t,l)}}function Wt(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function xh(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)xS(e.stateNode,t[n])}function M2(e){for(var t=e.return;t!==null&&(Zy(t)&&xS(e.stateNode,t.stateNode),!Xy(t));)t=t.return}function Dc(e){for(var t=e.return;t!==null&&(Zy(t)&&OL(e.stateNode,t.stateNode),!Xy(t));)t=t.return}function Xy(e){return e.tag===5||e.tag===3||e.tag===27}function Zy(e){return e&&e.tag===7&&e.stateNode!==null}function Hg(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){Pe(e,e.return,r)}}function rp(e,t,n){try{var s=e.stateNode;mL(s,e.type,n,t),s[Nn]=t}catch(r){Pe(e,e.return,r)}}function w8(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_i(e.type)||e.tag===4}function ip(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&_i(e.type)||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 Pg(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(r,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(r),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nr)),xh(e,s),Ie=!0;else if(r!==4&&(r===27&&(xh(e,s),s=null,_i(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Pg(e,t,n,s),e=e.sibling;e!==null;)Pg(e,t,n,s),e=e.sibling}function ph(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?n.insertBefore(r,t):n.appendChild(r),xh(e,s),Ie=!0;else if(r!==4&&(r===27&&(xh(e,s),s=null,_i(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(ph(e,t,n,s),e=e.sibling;e!==null;)ph(e,t,n,s),e=e.sibling}function j8(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Qt(t,s,n),t[Kt]=e,t[Nn]=n}catch(i){Pe(e,e.return,i)}}var gh=!1,Pn=null;function R2(e){(e.tag===30||e.subtreeFlags&33554432)&&(gh=!0)}var er=null;function I2(){var e=er;return er=null,e}var En=0;function Ul(e,t,n,s,r){return En=0,S8(e.child,t,n,s,r)}function S8(e,t,n,s,r){for(var i=!1;e!==null;){if(e.tag===5){var a=e.stateNode;if(s!==null){var l=lm(a);s.push(l),l.view&&(i=!0)}else i||lm(a).view&&(i=!0);gh=!0,lS(a,En===0?t:t+"_"+En,n),En++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||S8(e.child,t,n,s,r)&&(i=!0));e=e.sibling}return i}function cr(e,t){for(;e!==null;)e.tag===5?cS(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||cr(e.child,t)),e=e.sibling}function yf(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(yf(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(W(544));var n=t.name;t=Hr(t.default,t.share),t!=="none"&&(Ul(e,n,t,null,!1)||cr(e.child,!1))}e=e.sibling}}function Ug(e,t){if(e.tag===30){var n=e.stateNode,s=e.memoizedProps,r=Rr(s,n),i=Hr(s.default,n.paired?s.share:s.enter);i!=="none"?Ul(e,r,i,null,!1)?(yf(e),n.paired||t||yl(e,s.onEnter)):cr(e.child,!1):yf(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ug(e,t),e=e.sibling;else yf(e)}function Fg(e){if(Pn!==null&&Pn.size!==0){var t=Pn;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,s=n.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var i=Hr(n.default,n.share);if(i!=="none"&&(Ul(e,s,i,null,!1)?(i=e.stateNode,r.paired=i,i.paired=r,yl(e,n.onShare)):cr(e.child,!1)),t.delete(s),t.size===0)break}}}Fg(e)}e=e.sibling}}}function Gg(e){if(e.tag===30){var t=e.memoizedProps,n=Rr(t,e.stateNode),s=Pn!==null?Pn.get(n):void 0,r=Hr(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Ul(e,n,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,Pn.delete(n),yl(e,t.onShare)):yl(e,t.onExit):cr(e.child,!1)),Pn!==null&&Fg(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gg(e),e=e.sibling;else Pn!==null&&Fg(e)}function $8(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Rr(t,e.stateNode);t=Hr(t.default,t.update),e.flags&=-5,t!=="none"&&Ul(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$8(e);e=e.sibling}}function Vg(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,cr(e.child,!1))}Vg(e)}e=e.sibling}}function kf(e){if(e.tag===30)e.stateNode.paired=null,cr(e.child,!1),Vg(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)kf(e),e=e.sibling;else Vg(e)}function C8(e){for(e=e.child;e!==null;)e.tag===30?cr(e.child,!1):e.subtreeFlags&33554432&&C8(e),e=e.sibling}function Yy(e,t,n,s,r,i,a){for(var l=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(i!==null&&En<i.length){var u=i[En],d=lm(c);(u.view||d.view)&&(l=!0);var f;if(f=(e.flags&4)===0)if(d.clip)f=!0;else{f=u.rect;var h=d.rect;f=f.y!==h.y||f.x!==h.x||f.height!==h.height||f.width!==h.width}f&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&lS(c,En===0?n:n+"_"+En,r),l&&e.flags&4||(er===null&&(er=[]),er.push(c,En===0?s:s+"_"+En,t.memoizedProps)),En++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a?e.flags|=t.flags&32:Yy(e,t.child,n,s,r,i,a)&&(l=!0));t=t.sibling}return l}function E8(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,s=e.stateNode,r=Rr(n,s),i=Hr(n.default,n.update),a;a=e.memoizedState,e.memoizedState=null,s=e;var l=e.child;En=0,r=Yy(s,l,r,r,i,a,!1),e.flags&4&&r&&yl(e,n.onUpdate)}else e.subtreeFlags&33554432&&E8(e);e=e.sibling}}var _t=!1,Be=!1,Vs=!1,ap=!1,_2=typeof WeakSet=="function"?WeakSet:Set,Ot=null,Ws=!1,jc=!1,mh=!1,Wg=!1;function VD(e,t,n){if(e=e.containerInfo,im=Sl,e=fj(e),jy(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{s.nodeType,a.nodeType}catch{s=null;break e}var l=0,c=-1,u=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==s||i!==0&&h.nodeType!==3||(c=l+i),h!==a||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===s&&++d===i&&(c=l),p===a&&++f===r&&(u=l),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}s=c===-1||u===-1?null:{start:c,end:u}}else s=null}s=s||{start:0,end:0}}else s=null;for(am={focusedElem:e,selectionRange:s},Sl=!1,n=(n&335544064)===n,Ot=t,t=n?9270:1024;Ot!==null;){if(e=Ot,n&&(s=e.deletions,s!==null))for(i=0;i<s.length;i++)n&&Gg(s[i]);if(e.alternate===null&&e.flags&2)n&&R2(e),Bd(n);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&n&&Gg(s),Bd(n);continue}else if(s!==null&&s.memoizedState!==null){n&&R2(e),Bd(n);continue}}s=e.child,e.subtreeFlags&t&&s!==null?(s.return=e,Ot=s):(n&&$8(e),Bd(n))}}Pn=null}function Bd(e){for(;Ot!==null;){var t=Ot,n=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(r&1024&&s!==null){n=void 0,r=s.memoizedProps,s=s.memoizedState;var i=t.stateNode;try{var a=Ia(t.type,r);n=i.getSnapshotBeforeUpdate(a,s),i.__reactInternalSnapshotBeforeUpdate=n}catch(l){Pe(t,t.return,l)}}break;case 3:if(r&1024){if(s=t.stateNode.containerInfo,n=s.nodeType,n===9)cm(s);else if(n===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":cm(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&s!==null&&(n=Rr(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=Hr(r.default,r.update),r!=="none"&&Ul(s,n,r,s.memoizedState=[],!0));break;default:if(r&1024)throw Error(W(163))}if(s=t.sibling,s!==null){s.return=t.return,Ot=s;break}Ot=t.return}}function T8(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Ks(e,n),s&4&&Fu(5,n);break;case 1:if(Ks(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){Pe(n,n.return,a)}else{var r=Ia(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Pe(n,n.return,a)}}s&64&&b8(n),s&512&&Js(n,n.return);break;case 3:if(Ks(e,n),s&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Aj(e,t)}catch(a){Pe(n,n.return,a)}}break;case 27:t===null&&s&4&&j8(n);case 26:case 5:Ks(e,n),t===null&&s&4&&Hg(n),s&512&&Js(n,n.return);break;case 12:Ks(e,n);break;case 31:Ks(e,n),s&4&&M8(e,n);break;case 13:Ks(e,n),s&4&&R8(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rL.bind(null,n),BL(e,n))));break;case 22:if(s=n.memoizedState!==null||_t,!s){var i=t!==null&&t.memoizedState!==null||Be;t=_t,r=Be,_t=s,(Be=i)&&!r?(s=2,n.subtreeFlags&8772&&(s|=1),As(e,n,s)):Ks(e,n),_t=t,Be=r}break;case 30:Ks(e,n),s&512&&Js(n,n.return);break;case 7:s&512&&Js(n,n.return);default:Ks(e,n)}}function Kg(e,t){for(e=e.child;e!==null;)z8(e,t),e=e.sibling}function z8(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var s=n.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,i=e.memoizedProps.style,a=i!=null&&i.hasOwnProperty("display")?i.display:null;r.style.display=a==null||typeof a=="boolean"?"":(""+a).trim()}}catch(c){Pe(e,e.return,c)}Xg(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ie=!0}catch(c){Pe(e,e.return,c)}break;case 18:try{var l=e.stateNode;t?X2(l,!0):X2(e.stateNode,!1)}catch(c){Pe(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&Kg(e,t);break;default:Kg(e,t)}}function Xg(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,s=t;switch(n.tag){case 4:z8(n,s);break e;case 22:n.memoizedState===null&&Xg(n,s);break e;default:Xg(n,s)}}e=e.sibling}}function A8(e){var t=e.alternate;t!==null&&(e.alternate=null,A8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&kx(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var nt=null,Sn=!1;function zs(e,t,n){for(n=n.child;n!==null;)N8(e,t,n),n=n.sibling}function N8(e,t,n){if(Wn&&typeof Wn.onCommitFiberUnmount=="function")try{Wn.onCommitFiberUnmount(Du,n)}catch{}switch(n.tag){case 26:Be||Wt(n,t),zs(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Be&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Be||Wt(n,t),Dc(n);var s=nt,r=Sn;_i(n.type)&&(nt=n.stateNode,Sn=!1),zs(e,t,n),mS(n.stateNode,n.type,n.memoizedProps),nt=s,Sn=r;break;case 5:Be||Wt(n,t),Dc(n);case 6:if(n.tag===6&&Dc(n),s=nt,r=Sn,nt=null,zs(e,t,n),nt=s,Sn=r,nt!==null)if(Sn)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(n.stateNode),Ie=!0}catch(i){Pe(n,t,i)}else try{nt.removeChild(n.stateNode),Ie=!0}catch(i){Pe(n,t,i)}break;case 18:nt!==null&&(Sn?(e=nt,K2(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),$l(e)):K2(nt,n.stateNode));break;case 4:s=nt,r=Sn,nt=n.stateNode.containerInfo,Sn=!0,zs(e,t,n),nt=s,Sn=r;break;case 0:case 11:case 14:case 15:Ti(2,n,t),Be||Ti(4,n,t),zs(e,t,n);break;case 1:Be||(Wt(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&v8(n,t,s)),zs(e,t,n);break;case 21:zs(e,t,n);break;case 22:Be=(s=Be)||n.memoizedState!==null,zs(e,t,n),Be=s;break;case 30:Wt(n,t),zs(e,t,n);break;case 7:Be||Wt(n,t),zs(e,t,n);break;default:zs(e,t,n)}}function M8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$l(e)}catch(n){Pe(t,t.return,n)}}}function R8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$l(e)}catch(n){Pe(t,t.return,n)}}function WD(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _2),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _2),t;default:throw Error(W(435,e.tag))}}function qd(e,t){var n=WD(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var r=iL.bind(null,e,s);s.then(r,r)}})}function xn(e,t,n){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var i=s[r],a=e,l=t,c=l;e:for(;c!==null;){switch(c.tag){case 27:if(_i(c.type)){nt=c.stateNode,Sn=!1;break e}break;case 5:nt=c.stateNode,Sn=!1;break e;case 3:case 4:nt=c.stateNode.containerInfo,Sn=!0;break e}c=c.return}if(nt===null)throw Error(W(160));N8(a,l,i),nt=null,Sn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)I8(t,e,n),t=t.sibling}var Os=null;function I8(e,t,n){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var i=0;i<s.length;i++){var a=s[i];a.ref.impl=a.nextImpl}xn(t,e,n),pn(e),r&4&&(Ti(3,e,e.return),Fu(3,e),Ti(5,e,e.return));break;case 1:xn(t,e,n),pn(e),r&512&&(Be||s===null||Wt(s,s.return)),r&64&&_t&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(i=Os,xn(t,e,n),pn(e),r&512&&(Be||s===null||Wt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,n=e.memoizedState,s===null)if(n===null)if(e.stateNode===null)if(_t)e.stateNode=oS(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,r=i.ownerDocument||i;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[qu]||s[Kt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Qt(s,t,n),s[Kt]=e,Dt(s),t=s;break e;case"link":if(i=sw("link","href",r).get(t+(n.href||""))){for(a=0;a<i.length;a++)if(s=i[a],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(a,1);break t}}s=r.createElement(t),Qt(s,t,n),r.head.appendChild(s);break;case"meta":if(i=sw("meta","content",r).get(t+(n.content||""))){for(a=0;a<i.length;a++)if(s=i[a],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(a,1);break t}}s=r.createElement(t),Qt(s,t,n),r.head.appendChild(s);break;default:throw Error(W(468,t))}s[Kt]=e,Dt(s),t=s}e.stateNode=t}else _t||fm(i,e.type,e.stateNode);else e.stateNode=nw(i,n,e.memoizedProps);else r!==n?(r===null?(t=s.stateNode,t===null||Be||t.parentNode.removeChild(t)):r.count--,n===null?_t||fm(i,e.type,e.stateNode):nw(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&rp(e,e.memoizedProps,s.memoizedProps);break;case 27:xn(t,e,n),pn(e),r&512&&(Be||s===null||Wt(s,s.return)),s!==null&&r&4&&rp(e,e.memoizedProps,s.memoizedProps);break;case 5:if(i=Vs,Vs=!1,xn(t,e,n),Vs=i,pn(e),r&512&&(Be||s===null||Wt(s,s.return)),e.flags&32){t=e.stateNode;try{pl(t,""),Ie=!0}catch(d){Pe(e,e.return,d)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,rp(e,t,s!==null?s.memoizedProps:t)),r&1024&&(ap=!0);break;case 6:if(xn(t,e,n),pn(e),r&4){if(e.stateNode===null)throw Error(W(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ie=!0}catch(d){Pe(e,e.return,d)}}break;case 3:if(Ie=!1,jf=null,i=Os,Os=hu(t.containerInfo),xn(t,e,n),Os=i,pn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{$l(t.containerInfo)}catch(d){Pe(e,e.return,d)}ap&&(ap=!1,_8(e)),Ie=!1;break;case 4:r=Vs,Vs=_t,s=qv(),i=Os,Os=hu(e.stateNode.containerInfo),xn(t,e,n),pn(e),Os=i,Ie&&jc&&(mh=!0),Ie=s,Vs=r;break;case 12:xn(t,e,n),pn(e);break;case 31:xn(t,e,n),pn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,qd(e,t)));break;case 13:xn(t,e,n),pn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Mx=Vn()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,qd(e,t)));break;case 22:i=e.memoizedState!==null,a=s!==null&&s.memoizedState!==null;var l=_t,c=Be,u=Vs;_t=l||i,Vs=u||i,Be=c||a,xn(t,e,n),Be=c,Vs=u,_t=l,pn(e),r&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||s===null||a||_t||Be||(t=a||Be,n=_t,s=Be,_t=i||_t,Be=t,Jr(e,2),_t=n,Be=s),!i&&Vs||Kg(e,i)),r&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,qd(e,n))));break;case 19:xn(t,e,n),pn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,qd(e,t)));break;case 30:r&512&&(Be||s===null||Wt(s,s.return)),r=qv(),i=jc,a=(n&335544064)===n,l=e.memoizedProps,jc=a&&Hr(l.default,l.update)!=="none",xn(t,e,n),pn(e),a&&s!==null&&Ie&&(e.flags|=4),jc=i,Ie=r;break;case 21:break;case 7:r&512&&(Be||s===null||Wt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:xn(t,e,n),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(w8(s)){n=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Zy(r)){var i=r.stateNode;s===null?s=[i]:s.push(i)}if(Xy(r))break;r=r.return}var a=s;if(n==null)throw Error(W(160));switch(n.tag){case 27:var l=n.stateNode,c=ip(e);ph(e,c,l,a);break;case 5:var u=n.stateNode;n.flags&32&&(pl(u,""),n.flags&=-33);var d=ip(e);ph(e,d,u,a);break;case 3:case 4:var f=n.stateNode.containerInfo,h=ip(e);Pg(e,h,f,a);break;default:throw Error(W(161))}}catch(p){Pe(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _8(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_8(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Sl=!0,t.reset(),Sl=!1),e=e.sibling}}function po(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)O8(t,e),t=t.sibling;else E8(t)}function O8(e,t){var n=e.alternate;if(n===null)Ug(e,!1);else switch(e.tag){case 3:if(Wg=Ws=!1,I2(),po(t,e),!Ws&&!mh){if(e=er,e!==null)for(var s=0;s<e.length;s+=3){n=e[s];var r=e[s+1];cS(n,e[s+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Wg=!0}er=null;break;case 5:po(t,e);break;case 4:s=Ws,Ws=!1,po(t,e),Ws&&(mh=!0),Ws=s;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Ug(e,!1):po(t,e));break;case 30:s=Ws,r=I2(),Ws=!1,po(t,e),Ws&&(e.flags|=4);var i=e.memoizedProps,a=e.stateNode;t=Rr(i,a),a=Rr(n.memoizedProps,a);var l=Hr(i.default,i.update);l==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,En=0,t=Yy(e,n,t,a,l,i,!0),En!==(i===null?0:i.length)&&(e.flags|=32)),e.flags&4&&t?(yl(e,e.memoizedProps.onUpdate),er=r):r!==null&&(r.push.apply(r,er),er=r),Ws=e.flags&32?!0:s;break;default:po(t,e)}}function Ks(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)T8(e,t.alternate,t),t=t.sibling}function Jr(e,t){for(e=e.child;e!==null;){var n=e,s=t;switch(n.tag){case 0:case 11:case 14:case 15:Ti(4,n,n.return),Jr(n,s);break;case 1:Wt(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&v8(n,n.return,r),Jr(n,s);break;case 27:s&2&&mS(n.stateNode,n.type,n.memoizedProps);case 5:Wt(n,n.return),n.tag!==5&&n.tag!==27||Dc(n),Jr(n,s);break;case 6:Dc(n);break;case 26:Wt(n,n.return),r=n.stateNode,n.memoizedState!==null||r===null||Be||r.parentNode.removeChild(r),Jr(n,s);break;case 22:n.memoizedState===null&&Jr(n,s);break;case 30:Wt(n,n.return),Jr(n,s);break;case 7:Wt(n,n.return);default:Jr(n,s)}e=e.sibling}}function As(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var s=t.alternate,r=e,i=t,a=i.flags,l=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:As(r,i,n),Fu(4,i);break;case 1:if(As(r,i,n),s=i,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(d){Pe(s,s.return,d)}if(s=i,r=s.updateQueue,r!==null){var c=s.stateNode;try{var u=r.shared.hiddenCallbacks;if(u!==null)for(r.shared.hiddenCallbacks=null,r=0;r<u.length;r++)zj(u[r],c)}catch(d){Pe(s,s.return,d)}}l&&a&64&&b8(i),Js(i,i.return);break;case 27:n&2&&j8(i);case 5:i.tag!==5&&i.tag!==27||M2(i),As(r,i,n),l&&s===null&&a&4&&Hg(i),Js(i,i.return);break;case 6:M2(i);break;case 26:c=i.stateNode,i.memoizedState!==null||c===null||_t||fm(hu(c.ownerDocument),i.type,c),As(r,i,n),l&&s===null&&a&4&&Hg(i),Js(i,i.return);break;case 12:As(r,i,n);break;case 31:As(r,i,n),l&&a&4&&M8(r,i);break;case 13:As(r,i,n),l&&a&4&&R8(r,i);break;case 22:i.memoizedState===null&&As(r,i,n),Js(i,i.return);break;case 30:As(r,i,n),Js(i,i.return);break;case 7:Js(i,i.return);default:As(r,i,n)}t=t.sibling}}function Qy(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Pu(n))}function Jy(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pu(e))}function ns(e,t,n,s){var r=(n&335544064)===n;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)D8(e,t,n,s),t=t.sibling;else r&&C8(t)}function D8(e,t,n,s){var r=(n&335544064)===n;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&kf(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:ns(e,t,n,s),i&2048&&Fu(9,t);break;case 1:ns(e,t,n,s);break;case 3:ns(e,t,n,s),r&&Wg&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&Pu(i)));break;case 12:if(i&2048){ns(e,t,n,s),i=t.stateNode;try{var a=t.memoizedProps,l=a.id,c=a.onPostCommit;typeof c=="function"&&c(l,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(u){Pe(t,t.return,u)}}else ns(e,t,n,s);break;case 31:ns(e,t,n,s);break;case 13:ns(e,t,n,s);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?(r&&l!==null&&l.memoizedState===null&&kf(l),a._visibility&2?ns(e,t,n,s):Lc(e,t)):(r&&l!==null&&l.memoizedState!==null&&kf(t),a._visibility&2?ns(e,t,n,s):(a._visibility|=2,vo(e,t,n,s,(t.subtreeFlags&10256)!==0||!1))),i&2048&&Qy(l,t);break;case 24:ns(e,t,n,s),i&2048&&Jy(t.alternate,t);break;case 30:r&&(i=t.alternate,i!==null&&(cr(i.child,!0),cr(t.child,!0))),ns(e,t,n,s);break;default:ns(e,t,n,s)}}function vo(e,t,n,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,a=t,l=n,c=s,u=a.flags;switch(a.tag){case 0:case 11:case 15:vo(i,a,l,c,r),Fu(8,a);break;case 23:break;case 22:var d=a.stateNode;a.memoizedState!==null?d._visibility&2?vo(i,a,l,c,r):Lc(i,a):(d._visibility|=2,vo(i,a,l,c,r)),r&&u&2048&&Qy(a.alternate,a);break;case 24:vo(i,a,l,c,r),r&&u&2048&&Jy(a.alternate,a);break;default:vo(i,a,l,c,r)}t=t.sibling}}function Lc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,s=t,r=s.flags;switch(s.tag){case 22:Lc(n,s),r&2048&&Qy(s.alternate,s);break;case 24:Lc(n,s),r&2048&&Jy(s.alternate,s);break;default:Lc(n,s)}t=t.sibling}}var Yi=8192;function Gi(e,t,n){if(e.subtreeFlags&Yi)for(e=e.child;e!==null;)L8(e,t,n),e=e.sibling}function L8(e,t,n){switch(e.tag){case 26:Gi(e,t,n),e.flags&Yi&&(e.memoizedState!==null?JL(n,Os,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&iw(n,e)));break;case 5:Gi(e,t,n),e.flags&Yi&&(e=e.stateNode,(t&335544128)===t&&iw(n,e));break;case 3:case 4:var s=Os;Os=hu(e.stateNode.containerInfo),Gi(e,t,n),Os=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Yi,Yi=16777216,Gi(e,t,n),Yi=s):Gi(e,t,n));break;case 30:if(e.flags&Yi&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,Pn===null&&(Pn=new Map),Pn.set(s,r)}Gi(e,t,n);break;default:Gi(e,t,n)}}function B8(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function dc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Ot=s,H8(s,e)}B8(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)q8(e),e=e.sibling}function q8(e){switch(e.tag){case 0:case 11:case 15:dc(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:dc(e);break;case 12:dc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bf(e)):dc(e);break;default:dc(e)}}function bf(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Ot=s,H8(s,e)}B8(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ti(8,t,t.return),bf(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,bf(t));break;default:bf(t)}e=e.sibling}}function H8(e,t){for(;Ot!==null;){var n=Ot;switch(n.tag){case 0:case 11:case 15:Ti(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Pu(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Ot=s;else e:for(n=e;Ot!==null;){s=Ot;var r=s.sibling,i=s.return;if(A8(s),s===n){Ot=null;break e}if(r!==null){r.return=i,Ot=r;break e}Ot=i}}}var KD={getCacheForType:function(e){var t=Xt(bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xt(bt).controller.signal}},XD=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Ke=null,Te=null,Ae=0,qe=0,Ln=null,ui=!1,Fl=!1,ek=!1,Dr=0,xt=0,zi=0,wa=0,yh=0,Un=0,ml=0,Bc=null,$n=null,Zg=!1,Mx=0,P8=0,kh=1/0,bh=null,ki=null,ct=0,qs=null,_a=null,lr=0,Yg=0,Qg=null,U8=null,Vo=null,Wo=null,Ko=null,qc=0,vf=null;function Xn(){return Oe&2&&Ae!==0?Ae&-Ae:me.T!==null?nk():W6()}function F8(){if(Un===0)if(!(Ae&536870912)||$e){var e=zd;zd<<=1,!(zd&3932160)&&(zd=262144),Un=e}else Un=536870912;return e=Jt.current,e!==null&&(e.flags|=32),Un}function yl(e,t){if(t!=null){var n=e.stateNode,s=n.ref;s===null&&(s=n.ref=uS(Rr(e.memoizedProps,n))),Wo===null&&(Wo=[]),Wo.push(t.bind(null,s))}}function zn(e,t,n){(e===Ke&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(kl(e,0),di(e,Ae,Un,!1)),Bu(e,n),(!(Oe&2)||e!==Ke)&&(e===Ke&&(!(Oe&2)&&(wa|=n),xt===4&&di(e,Ae,Un,!1)),fr(e))}function G8(e,t,n){if(Oe&6)throw Error(W(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Lu(e,t),r=s?QD(e,t):op(e,t,!0),i=s;do{if(r===0){Fl&&!s&&di(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!ZD(n)){r=op(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;r=Bc;var c=l.current.memoizedState.isDehydrated;if(c&&(kl(l,a).flags|=256),a=op(l,a,!1),a!==2&&a!==6){if(ek&&!c){l.errorRecoveryDisabledLanes|=i,wa|=i,r=4;break e}i=$n,$n=r,i!==null&&($n===null?$n=i:$n.push.apply($n,i))}r=a}if(i=!1,r!==2)continue}}if(r===1){kl(e,0),di(e,t,0,!0);break}e:{switch(s=e,i=r,i){case 0:case 1:throw Error(W(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:di(s,t,Un,!ui);break e;case 2:$n=null;break;case 3:case 5:break;default:throw Error(W(329))}if((t&62914560)===t&&(r=Mx+300-Vn(),10<r)){if(di(s,t,Un,!ui),yx(s,0,!0)!==0)break e;lr=t,s.timeoutHandle=rk(O2.bind(null,s,n,$n,bh,Zg,t,Un,wa,ml,ui,i,"Throttled",-0,0),r);break e}O2(s,n,$n,bh,Zg,t,Un,wa,ml,ui,i,null,-0,0)}}break}while(!0);fr(e)}function O2(e,t,n,s,r,i,a,l,c,u,d,f,h,p){e.timeoutHandle=-1;var m=t.subtreeFlags,b=(i&335544064)===i;if(f=null,(b||m&8192||(m&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nr},Pn=null,L8(t,i,f),b&&(m=f,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(m.count++,m.waitingForViewTransition=!0,m=xu.bind(m),b.finished.then(m,m))),m=(i&62914560)===i?Mx-Vn():(i&4194048)===i?P8-Vn():0,m=eB(f,m),m!==null)){lr=i,e.cancelPendingCommit=m(L2.bind(null,e,t,i,n,s,r,a,l,c,u,d,f,null,h,p)),di(e,i,a,!u);return}L2(e,t,i,n,s,r,a,l,c,u,d,f)}function ZD(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var r=n[s],i=r.getSnapshot;r=r.value;try{if(!Zn(i(),r))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 di(e,t,n,s){t=P6(e,t),t&=~yh,t&=~wa,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var i=31-Kn(r),a=1<<i;s[i]=-1,r&=~a}n!==0&&F6(e,n,t)}function Rx(){return Oe&6?!0:(Gu(0),!1)}function tk(){if(Te!==null){if(qe===0)var e=Te.return;else e=Te,$r=Qa=null,Ly(e),Uo=null,ou=0,e=Te;for(;e!==null;)k8(e.alternate,e),e=e.return;Te=null}}function kl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bL(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lr=0,tk(),Ke=e,Te=n=zr(e.current,null),Ae=t,qe=0,Ln=null,ui=!1,Fl=Lu(e,t),ek=!1,ml=Un=yh=wa=zi=xt=0,$n=Bc=null,Zg=!1,Dr=P6(e,t),jx(),n}function V8(e,t){je=null,me.H=fh,t===Pl||t===Cx?(t=c2(),qe=3):t===Ay?(t=c2(),qe=4):qe=t===Vy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ln=t,Te===null&&(xt=1,hh(e,hs(t,e.current)))}function W8(){var e=Jt.current;return e===null?!0:(Ae&4194048)===Ae?rn===null:(Ae&62914560)===Ae||Ae&536870912?e===rn:!1}function K8(){var e=me.H;return me.H=fh,e===null?fh:e}function X8(){var e=me.A;return me.A=KD,e}function vh(){xt=4,ui||(Ae&4194048)!==Ae&&Jt.current!==null||(Fl=!0),!(zi&134217727)&&!(wa&134217727)||Ke===null||di(Ke,Ae,Un,!1)}function op(e,t,n){var s=Oe;Oe|=2;var r=K8(),i=X8();(Ke!==e||Ae!==t)&&(bh=null,kl(e,t)),t=!1;var a=xt;e:do try{if(qe!==0&&Te!==null){var l=Te,c=Ln;switch(qe){case 8:tk(),a=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var u=qe;if(qe=0,Ln=null,_o(e,l,c,u),n&&Fl){a=0;break e}break;default:u=qe,qe=0,Ln=null,_o(e,l,c,u)}}YD(),a=xt;break}catch(d){V8(e,d)}while(!0);return t&&e.shellSuspendCounter++,$r=Qa=null,Oe=s,me.H=r,me.A=i,Te===null&&(Ke=null,Ae=0,jx()),a}function YD(){for(;Te!==null;)Z8(Te)}function QD(e,t){var n=Oe;Oe|=2;var s=K8(),r=X8();Ke!==e||Ae!==t?(bh=null,kh=Vn()+500,kl(e,t)):Fl=Lu(e,t);e:do try{if(qe!==0&&Te!==null){t=Te;var i=Ln;t:switch(qe){case 1:qe=0,Ln=null,_o(e,t,i,1);break;case 2:case 9:if(l2(i)){qe=0,Ln=null,D2(t);break}t=function(){qe!==2&&qe!==9||Ke!==e||(qe=7),fr(e)},i.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:l2(i)?(qe=0,Ln=null,D2(t)):(qe=0,Ln=null,_o(e,t,i,7));break;case 5:var a=null;switch(Te.tag){case 26:a=Te.memoizedState;case 5:case 27:var l=Te;if(a?bS(a):l.stateNode.complete){qe=0,Ln=null;var c=l.sibling;if(c!==null)Te=c;else{var u=l.return;u!==null?(Te=u,Ix(u)):Te=null}break t}}qe=0,Ln=null,_o(e,t,i,5);break;case 6:qe=0,Ln=null,_o(e,t,i,6);break;case 8:tk(),xt=6;break e;default:throw Error(W(462))}}JD();break}catch(d){V8(e,d)}while(!0);return $r=Qa=null,me.H=s,me.A=r,Oe=n,Te!==null?0:(Ke=null,Ae=0,jx(),xt)}function JD(){for(;Te!==null&&!gO();)Z8(Te)}function Z8(e){var t=y8(e.alternate,e,Dr);e.memoizedProps=e.pendingProps,t===null?Ix(e):Te=t}function D2(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$2(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=$2(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Ly(t);var s=t;s===Bt&&($e?(ih(s),s.tag===5&&s.stateNode!=null&&(Ye=s.stateNode)):(ih(s),$e=!0));default:k8(n,t),t=Te=bj(t,Dr),t=y8(n,t,Dr)}e.memoizedProps=e.pendingProps,t===null?Ix(e):Te=t}function _o(e,t,n,s){$r=Qa=null,Ly(t),Uo=null,ou=0;var r=t.return;try{if(qD(e,r,t,n,Ae)){xt=1,hh(e,hs(n,e.current)),Te=null;return}}catch(i){if(r!==null)throw Te=r,i;xt=1,hh(e,hs(n,e.current)),Te=null;return}t.flags&32768?($e||s===1?e=!0:Fl||Ae&536870912?e=!1:(ui=e=!0,(s===2||s===9||s===3||s===6)&&(s=Jt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Y8(t,e)):Ix(t)}function Ix(e){var t=e;do{if(t.flags&32768){Y8(t,ui);return}e=t.return;var n=FD(t.alternate,t,Dr);if(n!==null){Te=n;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);xt===0&&(xt=5)}function Y8(e,t){do{var n=GD(e.alternate,e);if(n!==null){n.flags&=32767,Te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=n}while(e!==null);xt=6,Te=null}function L2(e,t,n,s,r,i,a,l,c,u,d,f){e.cancelPendingCommit=null;do _x();while(ct!==0);if(Oe&6)throw Error(W(327));if(t!==null){if(t===e.current)throw Error(W(177));e===Ke&&(Te=Ke=null,Ae=0),_a=t,qs=e,lr=n,Qg=r,U8=s,eL(e,t,n,a,l,c,f)}}function eL(e,t,n,s,r,i,a){var l=t.lanes|t.childLanes;if(Yg=l,l|=Sy,CO(e,n,l,s,r,i),Wo=null,(n&335544064)===n?(Ko=TD(e),s=10262):(Ko=null,s=10256),t.subtreeFlags&s||t.flags&s?(e.callbackNode=null,e.callbackPriority=0,aL(eh,function(){return nm(),null})):(e.callbackNode=null,e.callbackPriority=0),gh=!1,s=(t.flags&13878)!==0,t.subtreeFlags&13878||s){s=me.T,me.T=null,r=De.p,De.p=2,i=Oe,Oe|=4;try{VD(e,t,n)}finally{Oe=i,De.p=r,me.T=s}}ct=1,gh?Vo=CL(a,e.containerInfo,Ko,Jg,em,nL,tm,nm,tL):(Jg(),em(),tm())}function tL(e){if(ct!==0){var t=qs.onRecoverableError;t(e,{componentStack:null})}}function nL(){ct===3&&(ct=0,O8(_a,qs),ct=4)}function Jg(){if(ct===1){ct=0;var e=qs,t=_a,n=lr,s=(t.flags&13878)!==0;if(t.subtreeFlags&13878||s){s=me.T,me.T=null;var r=De.p;De.p=2;var i=Oe;Oe|=4;try{jc=mh=!1,I8(t,e,n),n=am;var a=fj(e.containerInfo),l=n.focusedElem,c=n.selectionRange;if(a!==l&&l&&l.ownerDocument&&dj(l.ownerDocument.documentElement,l)){if(c!==null&&jy(l)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(d,l.value.length);else{var f=l.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),m=l.textContent.length,b=Math.min(c.start,m),y=c.end===void 0?b:Math.min(c.end,m);!p.extend&&b>y&&(a=y,y=b,b=a);var g=e2(l,b),k=e2(l,y);if(g&&k&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==k.node||p.focusOffset!==k.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),b>y?(p.addRange(v),p.extend(k.node,k.offset)):(v.setEnd(k.node,k.offset),p.addRange(v))}}}}for(f=[],p=l;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<f.length;l++){var w=f[l];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Sl=!!im,am=im=null}finally{Oe=i,De.p=r,me.T=s}}e.current=t,ct=2}}function em(){if(ct===2){ct=0;var e=qs,t=_a,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=me.T,me.T=null;var s=De.p;De.p=2;var r=Oe;Oe|=4;try{T8(e,t.alternate,t)}finally{Oe=r,De.p=s,me.T=n}}ct=3}}function tm(){if(ct===4||ct===3){ct=0;var e=Vo;Vo=null,mO();var t=qs,n=_a,s=lr,r=U8,i=(s&335544064)===s?10262:10256;if(n.subtreeFlags&i||n.flags&i?ct=5:(ct=0,_a=qs=null,Q8(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(ki=null),my(s),n=n.stateNode,Wn&&typeof Wn.onCommitFiberRoot=="function")try{Wn.onCommitFiberRoot(Du,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=me.T,i=De.p,De.p=2,me.T=null;try{for(var a=t.onRecoverableError,l=0;l<r.length;l++){var c=r[l];a(c.value,{componentStack:c.stack})}}finally{me.T=n,De.p=i}}if(r=Wo,a=Ko,Ko=null,r!==null&&(Wo=null,a===null&&(a=[]),e!==null))for(c=0;c<r.length;c++)n=(0,r[c])(a),n!==void 0&&e.finished.finally(n);lr&3&&_x(),fr(t),i=t.pendingLanes,s&261930&&i&42?t===vf?qc++:(qc=0,vf=t):(qc=0,vf=null),Gu(0)}}function Q8(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pu(t)))}function _x(){return Vo!==null&&(Vo.skipTransition(),Vo=null),Jg(),em(),tm(),nm()}function nm(){if(ct!==5)return!1;var e=qs,t=Yg;Yg=0;var n=my(lr),s=me.T,r=De.p;try{De.p=32>n?32:n,me.T=null,n=Qg,Qg=null;var i=qs,a=lr;if(ct=0,_a=qs=null,lr=0,Oe&6)throw Error(W(331));var l=Oe;if(Oe|=4,q8(i.current),D8(i,i.current,a,n),Oe=l,Gu(0,!1),Wn&&typeof Wn.onPostCommitFiberRoot=="function")try{Wn.onPostCommitFiberRoot(Du,i)}catch{}return!0}finally{De.p=r,me.T=s,Q8(e,t)}}function B2(e,t,n){t=hs(n,t),t=_g(e.stateNode,t,2),e=gi(e,t,2),e!==null&&(Bu(e,2),fr(e))}function Pe(e,t,n){if(e.tag===3)B2(e,e,n);else for(;t!==null;){if(t.tag===3){B2(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ki===null||!ki.has(s))){e=hs(n,e),n=h8(2),s=gi(t,n,2),s!==null&&(x8(n,s,t,e),Bu(s,2),fr(s));break}}t=t.return}}function lp(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new XD;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(n)||(ek=!0,r.add(n),e=sL.bind(null,e,t,n),t.then(e,e))}function sL(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Ae&n)===n&&(xt===4||xt===3&&(Ae&62914560)===Ae&&300>Vn()-Mx?Oe&2?yh|=n:kl(e,0):yh|=n,ml===Ae&&(ml=0)),fr(e)}function J8(e,t){t===0&&(t=U6()),e=Ya(e,t),e!==null&&(Bu(e,t),fr(e))}function rL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),J8(e,n)}function iL(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(W(314))}s!==null&&s.delete(t),J8(e,n)}function aL(e,t){return py(e,t)}var bl=null,wo=null,sm=!1,wh=!1,cp=!1,fi=0;function fr(e){e!==wo&&e.next===null&&(wo===null?bl=wo=e:wo=wo.next=e),wh=!0,sm||(sm=!0,lL())}function Gu(e,t){if(!cp&&wh){cp=!0;do for(var n=!1,s=bl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var i=0;else{var a=s.suspendedLanes,l=s.pingedLanes;i=(1<<31-Kn(42|e)+1)-1,i&=r&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,q2(s,i))}else i=Ae,i=yx(s,s===Ke?i:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),!(i&3)||Lu(s,i)||(n=!0,q2(s,i));s=s.next}while(n);cp=!1}}function oL(){eS()}function eS(){wh=sm=!1;var e=0;fi!==0&&kL()&&(e=fi);for(var t=Vn(),n=null,s=bl;s!==null;){var r=s.next,i=tS(s,t);i===0?(s.next=null,n===null?bl=r:n.next=r,r===null&&(wo=n)):(n=s,(e!==0||i&3)&&(wh=!0)),s=r}ct!==0&&ct!==5||Gu(e),fi!==0&&(fi=0)}function tS(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-Kn(i),l=1<<a,c=r[a];c===-1?(!(l&n)||l&s)&&(r[a]=$O(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ke,n=Ae,n=yx(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&q1(s),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Lu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&q1(s),my(n)){case 2:case 8:n=q6;break;case 32:n=eh;break;case 268435456:n=H6;break;default:n=eh}return s=nS.bind(null,e),n=py(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&q1(s),e.callbackPriority=2,e.callbackNode=null,2}function nS(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(_x()&&e.callbackNode!==n)return null;var s=Ae;return s=yx(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(G8(e,s,t),tS(e,Vn()),e.callbackNode!=null&&e.callbackNode===n?nS.bind(null,e):null)}function q2(e,t){if(_x())return null;G8(e,t,!0)}function lL(){vL(function(){Oe&6?py(B6,oL):eS()})}function nk(){if(fi===0){var e=Na;e===0&&(e=Td,Td<<=1,!(Td&261888)&&(Td=256)),fi=e}return fi}function H2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cf(e)}function cL(e,t,n,s,r){if(t==="submit"&&n&&n.stateNode===r){var i=H2((r[Nn]||null).action),a=s.submitter;a&&(t=(t=a[Nn]||null)?H2(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new bx("action","action",null,s,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(fi!==0){var c=new FormData(r,a);Rg(n,{pending:!0,data:c,method:r.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=new FormData(r,a),Rg(n,{pending:!0,data:c,method:r.method,action:i},i,c))},currentTarget:r}]})}}for(var up=0;up<wg.length;up++){var dp=wg[up],uL=dp.toLowerCase(),dL=dp[0].toUpperCase()+dp.slice(1);Us(uL,"on"+dL)}Us(xj,"onAnimationEnd");Us(pj,"onAnimationIteration");Us(gj,"onAnimationStart");Us("dblclick","onDoubleClick");Us("focusin","onFocus");Us("focusout","onBlur");Us(bD,"onTransitionRun");Us(vD,"onTransitionStart");Us(wD,"onTransitionCancel");Us(mj,"onTransitionEnd");xl("onMouseEnter",["mouseout","mouseover"]);xl("onMouseLeave",["mouseout","mouseover"]);xl("onPointerEnter",["pointerout","pointerover"]);xl("onPointerLeave",["pointerout","pointerover"]);Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="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(" "),fL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(uu));function sS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],r=s.event;s=s.listeners;e:{var i=void 0;if(t)for(var a=s.length-1;0<=a;a--){var l=s[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){nh(d)}r.currentTarget=null,i=c}else for(a=0;a<s.length;a++){if(l=s[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){nh(d)}r.currentTarget=null,i=c}}}}function Ee(e,t){var n=t[Ov];n===void 0&&(n=t[Ov]=new Set);var s=e+"__bubble";n.has(s)||(rS(t,e,2,!1),n.add(s))}function fp(e,t,n){var s=0;t&&(s|=4),rS(n,e,s,t)}var Hd="_reactListening"+Math.random().toString(36).slice(2);function sk(e){if(!e[Hd]){e[Hd]=!0,X6.forEach(function(n){n!=="selectionchange"&&(fL.has(n)||fp(n,!1,e),fp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hd]||(t[Hd]=!0,fp("selectionchange",!1,t))}}function rS(e,t,n,s){switch(ES(t)){case 2:var r=rB;break;case 8:r=iB;break;default:r=uk}n=r.bind(null,t,n,e),r=void 0,!yg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function hp(e,t,n,s,r){var i=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var a=s.tag;if(a===3||a===4){var l=s.stateNode.containerInfo;if(l===r)break;if(a===4)for(a=s.return;a!==null;){var c=a.tag;if((c===3||c===4)&&a.stateNode.containerInfo===r)return;a=a.return}for(;l!==null;){if(a=oa(l),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){s=i=a;continue e}l=l.parentNode}}s=s.return}sj(function(){var u=i,d=ky(n),f=[];e:{var h=yj.get(e);if(h!==void 0){var p=bx,m=e;switch(e){case"keypress":if(df(n)===0)break e;case"keydown":case"keyup":p=ZO;break;case"focusin":m="focus",p=V1;break;case"focusout":m="blur",p=V1;break;case"beforeblur":case"afterblur":p=V1;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=Fv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=LO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=tD;break;case xj:case pj:case gj:p=HO;break;case mj:p=sD;break;case"scroll":case"scrollend":p=OO;break;case"wheel":p=iD;break;case"copy":case"cut":case"paste":p=UO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Vv;break;case"submit":p=JO;break;case"toggle":case"beforetoggle":p=oD}var b=(t&4)!==0,y=!b&&(e==="scroll"||e==="scrollend"),g=b?h!==null?h+"Capture":null:h;b=[];for(var k=u,v;k!==null;){var w=k;if(v=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||v===null||g===null||(w=nu(k,g),w!=null&&b.push(du(k,w,v))),y)break;k=k.return}0<b.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:b}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==mg&&(m=n.relatedTarget||n.fromElement)&&(oa(m)||m[ql]))break e;(h||p)&&(m=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?oa(p):null,p!==null&&(y=Ou(p),b=p.tag,p!==y||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=u),h!==p&&(b=Fv,w="onMouseLeave",g="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(b=Vv,w="onPointerLeave",g="onPointerEnter",k="pointer"),y=h==null?m:vc(h),v=p==null?m:vc(p),m=new b(w,k+"leave",h,n,d),m.target=y,m.relatedTarget=v,w=null,oa(d)===u&&(b=new b(g,k+"enter",p,n,d),b.target=v,b.relatedTarget=y,w=b),y=w,b=h&&p?ig(h,p,hL):null,h!==null&&P2(f,m,h,b,!1),p!==null&&y!==null&&P2(f,y,p,b,!0)))}e:{if(h=u?vc(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=Zv;else if(Xv(h))if(cj)j=mD;else{j=pD;var S=xD}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&yy(u.elementType)&&(j=Zv):j=gD;if(j&&(j=j(e,u))){lj(f,j,n,d);break e}S&&S(e,h,u)}switch(S=u?vc(u):window,e){case"focusin":(Xv(S)||S.contentEditable==="true")&&(zo=S,bg=u,Ac=null);break;case"focusout":Ac=bg=zo=null;break;case"mousedown":vg=!0;break;case"contextmenu":case"mouseup":case"dragend":vg=!1,t2(f,n,d);break;case"selectionchange":if(kD)break;case"keydown":case"keyup":t2(f,n,d)}var C;if(wy)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else To?aj(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(ij&&n.locale!=="ko"&&(To||E!=="onCompositionStart"?E==="onCompositionEnd"&&To&&(C=rj()):(li=d,by="value"in li?li.value:li.textContent,To=!0)),S=jh(u,E),0<S.length&&(E=new Gv(E,e,null,n,d),f.push({event:E,listeners:S}),C?E.data=C:(C=oj(n),C!==null&&(E.data=C)))),(C=cD?uD(e,n):dD(e,n))&&(E=jh(u,"onBeforeInput"),0<E.length&&(S=new Gv("onBeforeInput","beforeinput",null,n,d),f.push({event:S,listeners:E}),S.data=C)),cL(f,e,u,n,d)}sS(f,t)})}function du(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jh(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=nu(e,n),r!=null&&s.unshift(du(e,r,i)),r=nu(e,t),r!=null&&s.push(du(e,r,i))),e.tag===3)return s;e=e.return}return[]}function hL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function P2(e,t,n,s,r){for(var i=t._reactName,a=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===s)break;l!==5&&l!==26&&l!==27||u===null||(c=u,r?(u=nu(n,i),u!=null&&a.unshift(du(n,u,c))):r||(u=nu(n,i),u!=null&&a.push(du(n,u,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var xL=/\r\n?/g,pL=/\u0000|\uFFFD/g;function U2(e){return(typeof e=="string"?e:""+e).replace(xL,`
|
|
190
|
-
`).replace(pL,"")}function iS(e,t){return t=U2(t),U2(e)===t}function He(e,t,n,s,r,i){switch(n){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||pl(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&pl(e,""+s);else return;break;case"className":Nd(e,"class",s);break;case"tabIndex":Nd(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Nd(e,n,s);break;case"style":nj(e,s,i);return;case"data":if(t!=="object"){Nd(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=cf(s),e.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&He(e,t,"name",r.name,r,null),He(e,t,"formEncType",r.formEncType,r,null),He(e,t,"formMethod",r.formMethod,r,null),He(e,t,"formTarget",r.formTarget,r,null)):(He(e,t,"encType",r.encType,r,null),He(e,t,"method",r.method,r,null),He(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=cf(s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=nr);return;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}n=cf(s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":s===!0?e.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(n,s):e.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(n):e.setAttribute(n,s);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),lf(e,"popover",s);break;case"xlinkActuate":xr(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":xr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":xr(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":xr(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":xr(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":xr(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":xr(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":xr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":xr(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":lf(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=IO.get(n)||n,lf(e,n,s);else return}Ie=!0}function rm(e,t,n,s,r,i){switch(n){case"style":nj(e,s,i);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof s=="string")pl(e,s);else if(typeof s=="number"||typeof s=="bigint")pl(e,""+s);else return;break;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"onClick":s!=null&&(e.onclick=nr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Z6.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),i=n.slice(2,r?n.length-7:void 0),t=e[Nn]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(i,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,s,r);break e}Ie=!0,n in e?e[n]=s:s===!0?e.setAttribute(n,""):lf(e,n,s)}return}Ie=!0}function Qt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var s=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(W(137,t));default:He(e,t,i,a,n,null)}}r&&He(e,t,"srcSet",n.srcSet,n,null),s&&He(e,t,"src",n.src,n,null);return;case"input":Ee("invalid",e);var l=i=a=r=null,c=null,u=null;for(s in n)if(n.hasOwnProperty(s)){var d=n[s];if(d!=null)switch(s){case"name":r=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":i=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(W(137,t));break;default:He(e,t,s,d,n,null)}}J6(e,i,l,c,u,a,r,!1);return;case"select":Ee("invalid",e),s=a=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":a=l;break;case"multiple":s=l;default:He(e,t,r,l,n,null)}t=i,n=a,e.multiple=!!s,t!=null?qo(e,!!s,t,!1):n!=null&&qo(e,!!s,n,!0);return;case"textarea":Ee("invalid",e),i=r=s=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":s=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(W(91));break;default:He(e,t,a,l,n,null)}tj(e,s,r,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(s=n[c],s!=null))switch(c){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:He(e,t,c,s,n,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(s=0;s<uu.length;s++)Ee(uu[s],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(s=n[u],s!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(W(137,t));default:He(e,t,u,s,n,null)}return;default:if(yy(t)){for(d in n)n.hasOwnProperty(d)&&(s=n[d],s!==void 0&&rm(e,t,d,s,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(s=n[l],s!=null&&He(e,t,l,s,n,null))}var gL={};function mL(e,t,n,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,a=null,l=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=f;default:s.hasOwnProperty(p)||He(e,t,p,null,s,f)}}for(var h in s){var p=s[h];if(f=n[h],s.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":p!==f&&(Ie=!0),i=p;break;case"name":p!==f&&(Ie=!0),r=p;break;case"checked":p!==f&&(Ie=!0),u=p;break;case"defaultChecked":p!==f&&(Ie=!0),d=p;break;case"value":p!==f&&(Ie=!0),a=p;break;case"defaultValue":p!==f&&(Ie=!0),l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(W(137,t));break;default:p!==f&&He(e,t,h,p,s,f)}}gg(e,a,l,c,u,d,i,r);return;case"select":p=a=l=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:s.hasOwnProperty(i)||He(e,t,i,null,s,c)}for(r in s)if(i=s[r],c=n[r],s.hasOwnProperty(r)&&(i!=null||c!=null))switch(r){case"value":i!==c&&(Ie=!0),h=i;break;case"defaultValue":i!==c&&(Ie=!0),l=i;break;case"multiple":i!==c&&(Ie=!0),a=i;default:i!==c&&He(e,t,r,i,s,c)}t=l,n=a,s=p,h!=null?qo(e,!!n,h,!1):!!s!=!!n&&(t!=null?qo(e,!!n,t,!0):qo(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!s.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:He(e,t,l,null,s,r)}for(a in s)if(r=s[a],i=n[a],s.hasOwnProperty(a)&&(r!=null||i!=null))switch(a){case"value":r!==i&&(Ie=!0),h=r;break;case"defaultValue":r!==i&&(Ie=!0),p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(W(91));break;default:r!==i&&He(e,t,a,r,s,i)}ej(e,h,p);return;case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&h!=null&&!s.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:He(e,t,m,null,s,h)}for(c in s)if(h=s[c],p=n[c],s.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"selected":h!==p&&(Ie=!0),e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:He(e,t,c,h,s,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)h=n[b],n.hasOwnProperty(b)&&h!=null&&!s.hasOwnProperty(b)&&He(e,t,b,null,s,h);for(u in s)if(h=s[u],p=n[u],s.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(W(137,t));break;default:He(e,t,u,h,s,p)}return;default:if(yy(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!==void 0&&!s.hasOwnProperty(y)&&rm(e,t,y,void 0,s,h);for(d in s)h=s[d],p=n[d],!s.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||rm(e,t,d,h,s,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!s.hasOwnProperty(g)&&He(e,t,g,null,s,h);for(f in s)h=s[f],p=n[f],!s.hasOwnProperty(f)||h===p||h==null&&p==null||He(e,t,f,h,s,p)}function F2(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yL(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],i=r.transferSize,a=r.initiatorType,l=r.duration;if(i&&l&&F2(a)){for(a=0,l=r.responseEnd,s+=1;s<n.length;s++){var c=n[s],u=c.startTime;if(u>l)break;var d=c.transferSize,f=c.initiatorType;d&&F2(f)&&(c=c.responseEnd,a+=d*(c<l?1:(l-u)/(c-u)))}if(--s,t+=8*(i+a)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var im=null,am=null;function fu(e){return e.nodeType===9?e:e.ownerDocument}function G2(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function aS(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function oS(e,t,n,s){return n=fu(n).createElement(e),n[Kt]=s,n[Nn]=t,Qt(n,e,t),Dt(n),n}function om(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xp=null;function kL(){var e=window.event;return e&&e.type==="popstate"?e===xp?!1:(xp=e,!0):(xp=null,!1)}var rk=typeof setTimeout=="function"?setTimeout:void 0,bL=typeof clearTimeout=="function"?clearTimeout:void 0,V2=typeof Promise=="function"?Promise:void 0,W2=typeof requestAnimationFrame=="function"?requestAnimationFrame:rk,vL=typeof queueMicrotask=="function"?queueMicrotask:typeof V2<"u"?function(e){return V2.resolve(null).then(e).catch(wL)}:rk;function wL(e){setTimeout(function(){throw e})}function _i(e){return e==="head"}function K2(e,t){var n=t,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){e.removeChild(r),$l(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")gp(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,gp(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[qu]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&gp(e.ownerDocument.body);n=r}while(n);$l(t)}function X2(e,t){var n=e;e=0;do{var s=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=s}while(n)}function lS(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var i=t[r];0<i.width&&0<i.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function cS(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function jL(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function lm(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return jL(t,n,e)}function SL(e){return e.documentElement.clientHeight}function $L(e){this.addEventListener("load",e),this.addEventListener("error",e)}function CL(e,t,n,s,r,i,a,l,c){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var h=u.defaultView,p=h.navigation&&h.navigation.transition,m=u.fonts.status;s();var b=[];if(m==="loaded"&&(SL(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),m=b.length,e!==null)for(var y=e.suspenseyImages,g=0,k=0;k<y.length;k++){var v=y[k];if(!v.complete){var w=v.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<h.innerHeight&&w.left<h.innerWidth){if(g+=vS(v),g>Sf){b.length=m;break}v=new Promise($L.bind(v)),b.push(v)}}}if(0<b.length)return h=Promise.race([Promise.all(b),new Promise(function(j){return setTimeout(j,500)})]).then(r,r),(p?Promise.allSettled([p.finished,h]):h).then(i,i);if(r(),p)return p.finished.then(i,i);i()},types:n});u.__reactViewTransition=d;var f=[];return d.ready.then(function(){for(var h=u.documentElement.getAnimations({subtree:!0}),p=0;p<h.length;p++){var m=h[p],b=m.effect,y=b.pseudoElement;if(y!=null&&y.startsWith("::view-transition")){f.push(m),m=b.getKeyframes();for(var g=y=void 0,k=!0,v=0;v<m.length;v++){var w=m[v],j=w.width;if(y===void 0)y=j;else if(y!==j){k=!1;break}if(j=w.height,g===void 0)g=j;else if(g!==j){k=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}k&&y!==void 0&&g!==void 0&&(b.setKeyframes(m),k=getComputedStyle(b.target,b.pseudoElement),k.width!==y||k.height!==g)&&(k=m[0],k.width=y,k.height=g,k=m[m.length-1],k.width=y,k.height=g,b.setKeyframes(m))}}a()},function(h){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof h=="object"&&h!==null)switch(h.name){case"InvalidStateError":(h.message==="View transition was skipped because document visibility state is hidden."||h.message==="Skipping view transition because document visibility state has become hidden."||h.message==="Skipping view transition because viewport size changed."||h.message==="Transition was aborted because of invalid state")&&(h=null)}h!==null&&c(h)}finally{s(),r(),a()}}),d.finished.finally(function(){for(var h=0;h<f.length;h++)f[h].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),l()}),d}catch{return s(),r(),a(),null}}function la(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}la.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Xe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};la.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),s=[],r=0;r<n.length;r++){var i=n[r].effect;i!==null&&i.target===e&&i.pseudoElement===t&&s.push(n[r])}return s};la.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function uS(e){return{name:e,group:new la("group",e),imagePair:new la("image-pair",e),old:new la("old",e),new:new la("new",e)}}function ts(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ts.prototype.addEventListener=function(e,t,n){var s=null,r=null;if(!(n!=null&&typeof n!="boolean"&&(s=n.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(dS(i,e,t,n)===-1){var a=this,l=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(l=function(c){a.removeEventListener(e,t,n),typeof t=="function"?t.call(this,c):t.handleEvent(c)}),s!==null&&(r=a.removeEventListener.bind(a,e,t,n),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=vl(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:l,cleanup:r}),An(this._fragmentFiber.child,!1,EL,e,l,s)}this._eventListeners=i}};function EL(e,t,n,s){return Ct(e).addEventListener(t,n,s),!1}ts.prototype.removeEventListener=function(e,t,n){var s=this._eventListeners;if(s!==null&&(t=dS(s,e,t,n),t!==-1)){var r=s[t];n=r.attachedListener;var i=r.cleanup;r=vl(r.optionsOrUseCapture),An(this._fragmentFiber.child,!1,TL,e,n,r),s.splice(t,1),i!==null&&i()}};function TL(e,t,n,s){return Ct(e).removeEventListener(t,n,s),!1}function vl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Z2(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function dS(e,t,n,s){if(e.length===0)return-1;s=Z2(s);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t&&i.listener===n&&Z2(i.optionsOrUseCapture)===s)return r}return-1}ts.prototype.dispatchEvent=function(e){var t=Ka(this._fragmentFiber);if(t===null)return!0;t=Ct(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var r=0;r<n.length;r++){var i=n[r];s.addEventListener(i.type,i.attachedListener,vl(i.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),n)for(r=0;r<n.length;r++)i=n[r],s.removeEventListener(i.type,i.attachedListener,vl(i.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};ts.prototype.focus=function(e){An(this._fragmentFiber.child,!0,fS,e,void 0,void 0)};function fS(e,t){return e.tag===6?!1:(e=Ct(e),qL(e,t))}ts.prototype.focusLast=function(e){var t=[];An(this._fragmentFiber.child,!0,ik,t,void 0,void 0);for(var n=t.length-1;0<=n&&!fS(t[n],e);n--);};function ik(e,t){return t.push(e),!1}ts.prototype.blur=function(){var e=Ka(this._fragmentFiber);e!==null&&(e=Ct(e),e=fu(e).activeElement,e!==null&&An(this._fragmentFiber.child,!1,zL,e,void 0,void 0))};function zL(e,t){return e.tag===6?!1:(e=Ct(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ts.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),An(this._fragmentFiber.child,!1,AL,e,void 0,void 0)};function AL(e,t){return e.tag===6||(e=Ct(e),t.observe(e)),!1}ts.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),An(this._fragmentFiber.child,!1,NL,e,void 0,void 0);for(var n=t=0;n<Ls.length;n++){var s=Ls[n];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Ls[t++]=s}Ls.length=t}};function NL(e,t){return e.tag===6||(e=Ct(e),t.unobserve(e)),!1}var Ls=[],pp=!1;function ML(e,t,n){Ls.push({fragmentInstance:e,observer:t,instance:n}),pp||(pp=!0,HL(function(){pp=!1;var s=Ls;Ls=[];for(var r=0;r<s.length;r++){var i=s[r];i.observer.unobserve(i.instance)}}))}ts.prototype.getClientRects=function(){var e=[];return An(this._fragmentFiber.child,!1,RL,e,void 0,void 0),e};function RL(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=Ct(e),t.push.apply(t,e.getClientRects());return!1}ts.prototype.getRootNode=function(e){var t=Ka(this._fragmentFiber);return t===null?this:Ct(t).getRootNode(e)};ts.prototype.compareDocumentPosition=function(e){var t=Ka(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];An(this._fragmentFiber.child,!1,ik,n,void 0,void 0);var s=Ct(t);if(n.length===0){if(n=s,Av(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var r=s=n.compareDocumentPosition(e);return n===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=_6(t)[1],n===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=Ct(n).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=Ct(n[0]),r=Ct(n[n.length-1]);var i=Av(this._fragmentFiber)?t.parentElement:s;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var a=t.compareDocumentPosition(e),l=r.compareDocumentPosition(e),c=a&Node.DOCUMENT_POSITION_CONTAINED_BY||l&Node.DOCUMENT_POSITION_CONTAINED_BY;return l=s&&i&&a&Node.DOCUMENT_POSITION_FOLLOWING&&l&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||i&&r===e||c||l?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!i&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:a,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||IL(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function IL(e,t,n,s,r){var i=oa(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=r.ownerDocument,r===i||r===i.documentElement||r===i.body;e:{for(i=t,t=Ka(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=ig(n,i,Nv),t===null?t=!1:(An(t,!0,lO,i,n),i=So,So=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===s)&&(t=ig(s,i,Nv),t===null?t=!1:(An(t,!0,cO,i,s),i=So,rg=So=null,t=i!==null)),t):!1}function Y2(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ts.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(W(566));var t=[];An(this._fragmentFiber.child,!1,ik,t,void 0,void 0);var n=e!==!1;if(t.length===0){var s=_6(this._fragmentFiber);if(s=n?s[1]||s[0]||Ka(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=Ct(s),Y2(e,n);return}if(s=Ct(s),s.nodeType!==9){if(s.nodeType===11){n="host"in s?s.host:null,n!==null&&n.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=n?t.length-1:0;s!==(n?-1:t.length);){var r=t[s];r.tag===6?(r=Ct(r),Y2(r,n)):Ct(r).scrollIntoView(e),s+=n?-1:1}};function _L(e,t){return e=Ct(e),hS(e,t),!1}function hS(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function xS(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.addEventListener(r.type,r.attachedListener,vl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var a=0,l=0;l<Ls.length;l++){var c=Ls[l];(c.fragmentInstance!==t||c.observer!==i||c.instance!==e)&&(Ls[a++]=c)}Ls.length=a,i.observe(e)}),hS(e,t))}function OL(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.removeEventListener(r.type,r.attachedListener,vl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?ML(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function cm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cm(n),kx(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function DL(e,t,n,s){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[qu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ms(e.nextSibling),e===null)break}return null}function LL(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ms(e.nextSibling),e===null))return null;return e}function pS(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ms(e.nextSibling),e===null))return null;return e}function um(e){return e.data==="$?"||e.data==="$~"}function ak(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function BL(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var s=function(){t(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ms(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var dm=null;function Q2(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ms(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function J2(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function qL(e,t){function n(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return s}function HL(e){W2(function(){W2(function(t){return e(t)})})}function gS(e,t,n){switch(t=fu(n),e){case"html":if(e=t.documentElement,!e)throw Error(W(452));return e;case"head":if(e=t.head,!e)throw Error(W(453));return e;case"body":if(e=t.body,!e)throw Error(W(454));return e;default:throw Error(W(451))}}function mS(e,t,n){for(var s in n){var r=n[s];n.hasOwnProperty(s)&&r!=null&&He(e,t,s,null,gL,r)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===nr&&(e.onclick=null),kx(e)}function gp(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);kx(e)}var vs=new Map,ew=new Set;function hu(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Pr=De.d;De.d={f:PL,r:UL,D:FL,C:GL,L:VL,m:WL,X:XL,S:KL,M:ZL};function PL(){var e=Pr.f(),t=Rx();return e||t}function UL(e){var t=Hl(e);t!==null&&t.tag===5&&t.type==="form"?n8(t):Pr.r(e)}var Gl=typeof document>"u"?null:document;function yS(e,t,n){var s=Gl;if(s&&typeof t=="string"&&t){var r=fs(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),ew.has(r)||(ew.add(r),e={rel:e,crossOrigin:n,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Qt(t,"link",e),Dt(t),s.head.appendChild(t)))}}function FL(e){Pr.D(e),yS("dns-prefetch",e,null)}function GL(e,t){Pr.C(e,t),yS("preconnect",e,t)}function VL(e,t,n){Pr.L(e,t,n);var s=Gl;if(s&&e&&t){var r='link[rel="preload"][as="'+fs(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+fs(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+fs(n.imageSizes)+'"]')):r+='[href="'+fs(e)+'"]';var i=r;switch(t){case"style":i=wl(e);break;case"script":i=Vl(e)}if(!(vs.has(i)||(e=Xe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),vs.set(i,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Vu(i))||t==="script"&&s.querySelector(Wu(i))))){var a=s.createElement("link");Qt(a,"link",e),t==="style"&&(a[th]=!0,a.onload=a.onerror=function(){K6(a)}),Dt(a),s.head.appendChild(a)}}}function WL(e,t){Pr.m(e,t);var n=Gl;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+fs(s)+'"][href="'+fs(e)+'"]',i=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Vl(e)}if(!vs.has(i)&&(e=Xe({rel:"modulepreload",href:e},t),vs.set(i,e),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Wu(i)))return}s=n.createElement("link"),Qt(s,"link",e),Dt(s),n.head.appendChild(s)}}}function KL(e,t,n){Pr.S(e,t,n);var s=Gl;if(s&&e){var r=Bo(s).hoistableStyles,i=wl(e);t=t||"default";var a=r.get(i);if(!a){var l={loading:0,preload:null};if(a=s.querySelector(Vu(i)))l.loading=5;else{e=Xe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=vs.get(i))&&ok(e,n);var c=a=s.createElement("link");Dt(c),Qt(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,wf(a,t,s)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(i,a)}}}function XL(e,t){Pr.X(e,t);var n=Gl;if(n&&e){var s=Bo(n).hoistableScripts,r=Vl(e),i=s.get(r);i||(i=n.querySelector(Wu(r)),i||(e=Xe({src:e,async:!0},t),(t=vs.get(r))&&lk(e,t),i=n.createElement("script"),Dt(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function ZL(e,t){Pr.M(e,t);var n=Gl;if(n&&e){var s=Bo(n).hoistableScripts,r=Vl(e),i=s.get(r);i||(i=n.querySelector(Wu(r)),i||(e=Xe({src:e,async:!0,type:"module"},t),(t=vs.get(r))&&lk(e,t),i=n.createElement("script"),Dt(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function tw(e,t,n,s){var r=(r=hi.current)?hu(r):null;if(!r)throw Error(W(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=wl(n.href),t=Bo(r).hoistableStyles,s=t.get(n),s||(s={type:"style",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=wl(n.href);var i=Bo(r).hoistableStyles,a=i.get(e);if(a||(r=r.ownerDocument||r,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=r.querySelector(Vu(e)))?i._p||(a.instance=i,a.state.loading=5):(i=vs.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vs.set(e,i)),YL(r,e,i,a.state))),t&&s===null)throw Error(W(528,""));return a}if(t&&s!==null)throw Error(W(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Vl(n),t=Bo(r).hoistableScripts,s=t.get(n),s||(s={type:"script",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(W(444,e))}}function wl(e){return'href="'+fs(e)+'"'}function Vu(e){return'link[rel="stylesheet"]['+e+"]"}function kS(e){return Xe({},e,{"data-precedence":e.precedence,precedence:null})}function YL(e,t,n,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[th]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[th]=!0,t.onload=t.onerror=K6.bind(null,t),Qt(t,"link",n),Dt(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function Vl(e){return'[src="'+fs(e)+'"]'}function Wu(e){return"script[async]"+e}function nw(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+fs(n.href)+'"]');if(s)return t.instance=s,Dt(s),s;var r=Xe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Dt(s),Qt(s,"style",r),wf(s,n.precedence,e),t.instance=s;case"stylesheet":r=wl(n.href);var i=e.querySelector(Vu(r));if(i)return t.state.loading|=4,t.instance=i,Dt(i),i;s=kS(n),(r=vs.get(r))&&ok(s,r),i=(e.ownerDocument||e).createElement("link"),Dt(i);var a=i;return a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),Qt(i,"link",s),t.state.loading|=4,wf(i,n.precedence,e),t.instance=i;case"script":return i=Vl(n.src),(r=e.querySelector(Wu(i)))?(t.instance=r,Dt(r),r):(s=n,(r=vs.get(i))&&(s=Xe({},n),lk(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),Dt(r),Qt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(W(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,wf(s,n.precedence,e));return t.instance}function wf(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,i=r,a=0;a<s.length;a++){var l=s[a];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ok(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function lk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var jf=null;function sw(e,t,n){if(jf===null){var s=new Map,r=jf=new Map;r.set(n,s)}else r=jf,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(e))return s;for(s.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[qu]||i[Kt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var l=s.get(a);l?l.push(i):s.set(a,[i])}}return s}function fm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function QL(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function rw(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function bS(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function vS(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function iw(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=vS(t),e.suspenseyImages.push(t)),e=tB.bind(e),t.decode().then(e,e))}function JL(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=wl(s.href),i=t.querySelector(Vu(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Dt(i);return}i=t.ownerDocument||t,s=kS(s),(r=vs.get(r))&&ok(s,r),i=i.createElement("link"),Dt(i);var a=i;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),Qt(i,"link",s),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=xu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Sf=0;function eB(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Sf===0&&(Sf=62500*yL());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Sf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function wS(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)$f(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function xu(){this.count--,wS(this)}function tB(){this.imgCount--,wS(this)}var Sh=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Sh=new Map,t.forEach(nB,e),Sh=null,xu.call(e))}function nB(e,t){if(!(t.state.loading&4)){var n=Sh.get(e);if(n)var s=n.get(null);else{n=new Map,Sh.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var a=r[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),s=a)}s&&n.set(null,s)}r=t.instance,a=r.getAttribute("data-precedence"),i=n.get(a)||s,i===s&&n.set(null,r),n.set(a,r),this.count++,s=xu.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var jl={$$typeof:tr,Provider:null,Consumer:null,_currentValue:ya,_currentValue2:ya,_threadCount:0};function sB(e,t,n,s,r,i,a,l,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=H1(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=H1(0),this.hiddenUpdates=H1(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function jS(e,t,n,s,r,i,a,l,c,u,d,f){return e=new sB(e,t,n,a,c,u,d,f,l),t=1,i===!0&&(t|=24),i=Tn(3,null,null,t),e.current=i,i.stateNode=e,t=Ty(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:s,isDehydrated:n,cache:t},Ny(i),e}function SS(e){return e?(e=Mo,e):Mo}function $S(e,t,n,s,r,i){r=SS(r),s.context===null?s.context=r:s.pendingContext=r,s=pi(t),s.payload={element:n},i=i===void 0?null:i,i!==null&&(s.callback=i),n=gi(e,s,t),n!==null&&(zn(n,e,t),Mc(n,e,t))}function aw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ck(e,t){aw(e,t),(e=e.alternate)&&aw(e,t)}function CS(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&zn(t,e,67108864),ck(e,67108864)}}function ow(e){if(e.tag===13||e.tag===31){var t=Xn();t=gy(t);var n=Ya(e,t);n!==null&&zn(n,e,t),ck(e,t)}}var Sl=!0;function rB(e,t,n,s){var r=me.T;me.T=null;var i=De.p;try{De.p=2,uk(e,t,n,s)}finally{De.p=i,me.T=r}}function iB(e,t,n,s){var r=me.T;me.T=null;var i=De.p;try{De.p=8,uk(e,t,n,s)}finally{De.p=i,me.T=r}}function uk(e,t,n,s){if(Sl){var r=hm(s);if(r===null)hp(e,t,s,$h,n),lw(e,s);else if(oB(r,e,t,n,s))s.stopPropagation();else if(lw(e,s),t&4&&-1<aB.indexOf(e)){for(;r!==null;){var i=Hl(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=Xi(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var c=1<<31-Kn(a);l.entanglements[1]|=c,a&=~c}fr(i),!(Oe&6)&&(kh=Vn()+500,Gu(0))}}break;case 31:case 13:l=Ya(i,2),l!==null&&zn(l,i,2),Rx(),ck(i,2)}if(i=hm(s),i===null&&hp(e,t,s,$h,n),i===r)break;r=i}r!==null&&s.stopPropagation()}else hp(e,t,s,null,n)}}function hm(e){return e=ky(e),dk(e)}var $h=null;function dk(e){if($h=null,e=oa(e),e!==null){var t=Ou(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=M6(t),e!==null)return e;e=null}else if(n===31){if(e=R6(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 $h=e,null}function ES(e){switch(e){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yO()){case B6:return 2;case q6:return 8;case eh:case kO:return 32;case H6:return 268435456;default:return 32}default:return 32}}var xm=!1,bi=null,vi=null,wi=null,pu=new Map,gu=new Map,ri=[],aB="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".split(" ");function lw(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":pu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gu.delete(t.pointerId)}}function fc(e,t,n,s,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:i,targetContainers:[r]},t!==null&&(t=Hl(t),t!==null&&CS(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function oB(e,t,n,s,r){switch(t){case"focusin":return bi=fc(bi,e,t,n,s,r),!0;case"dragenter":return vi=fc(vi,e,t,n,s,r),!0;case"mouseover":return wi=fc(wi,e,t,n,s,r),!0;case"pointerover":var i=r.pointerId;return pu.set(i,fc(pu.get(i)||null,e,t,n,s,r)),!0;case"gotpointercapture":return i=r.pointerId,gu.set(i,fc(gu.get(i)||null,e,t,n,s,r)),!0}return!1}function TS(e){var t=oa(e.target);if(t!==null){var n=Ou(t);if(n!==null){if(t=n.tag,t===13){if(t=M6(n),t!==null){e.blockedOn=t,_v(e.priority,function(){ow(n)});return}}else if(t===31){if(t=R6(n),t!==null){e.blockedOn=t,_v(e.priority,function(){ow(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 Cf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hm(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);mg=s,n.target.dispatchEvent(s),mg=null}else return t=Hl(n),t!==null&&CS(t),e.blockedOn=n,!1;t.shift()}return!0}function cw(e,t,n){Cf(e)&&n.delete(t)}function lB(){xm=!1,bi!==null&&Cf(bi)&&(bi=null),vi!==null&&Cf(vi)&&(vi=null),wi!==null&&Cf(wi)&&(wi=null),pu.forEach(cw),gu.forEach(cw)}function Pd(e,t){e.blockedOn===t&&(e.blockedOn=null,xm||(xm=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,lB)))}var Ud=null;function uw(e){Ud!==e&&(Ud=e,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,function(){Ud===e&&(Ud=null);for(var t=0;t<e.length;t+=3){var n=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(dk(s||n)===null)continue;break}var i=Hl(n);i!==null&&(e.splice(t,3),t-=3,Rg(i,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function $l(e){function t(c){return Pd(c,e)}bi!==null&&Pd(bi,e),vi!==null&&Pd(vi,e),wi!==null&&Pd(wi,e),pu.forEach(t),gu.forEach(t);for(var n=0;n<ri.length;n++){var s=ri[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ri.length&&(n=ri[0],n.blockedOn===null);)TS(n),n.blockedOn===null&&ri.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],i=n[s+1],a=r[Nn]||null;if(typeof i=="function")a||uw(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,a=i[Nn]||null)l=a.formAction;else if(dk(r)!==null)continue}else l=a.action;typeof l=="function"?n[s+1]=l:(n.splice(s,3),s-=3),uw(n)}}}function zS(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(a){return r=a})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function fk(e){this._internalRoot=e}Ox.prototype.render=fk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));var n=t.current,s=Xn();$S(n,s,e,t,null,null)};Ox.prototype.unmount=fk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$S(e.current,2,null,e,null,null),Rx(),t[ql]=null}};function Ox(e){this._internalRoot=e}Ox.prototype.unstable_scheduleHydration=function(e){if(e){var t=W6();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ri.length&&t!==0&&t<ri[n].priority;n++);ri.splice(n,0,e),n===0&&TS(e)}};var dw=A6.version;if(dw!=="19.3.0")throw Error(W(527,dw,"19.3.0"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=oO(t),e=e!==null?I6(e):null,e=e===null?null:e.stateNode,e};var cB={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:me,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fd.isDisabled&&Fd.supportsFiber)try{Du=Fd.inject(cB),Wn=Fd}catch{}}mx.createRoot=function(e,t){if(!N6(e))throw Error(W(299));var n=!1,s="",r=u8,i=d8,a=f8;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=jS(e,1,!1,null,null,n,s,null,r,i,a,zS),e[ql]=t.current,sk(e),new fk(t)};mx.hydrateRoot=function(e,t,n){if(!N6(e))throw Error(W(299));var s=!1,r="",i=u8,a=d8,l=f8,c=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=jS(e,1,!0,t,n??null,s,r,c,i,a,l,zS),t.context=SS(null),n=t.current,s=Xn(),s=gy(s),r=pi(s),r.callback=null,gi(n,r,s),n=s,t.current.lanes=n,Bu(t,n),fr(t),e[ql]=t.current,sk(e),new Ox(t)};mx.version="19.3.0";function AS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AS)}catch(e){console.error(e)}}AS(),E6.exports=mx;var NS=E6.exports;let Dn=null,fw=null;const hw=["data-theme",Cn("theme")];function uB(e){const t=()=>{let s=null;for(const r of hw){const i=document.documentElement.getAttribute(r);i==null?e.removeAttribute(r):(e.setAttribute(r,i),r==="data-theme"&&(s=i))}s==="light"||s==="dark"?e.style.colorScheme=s:e.style.removeProperty("color-scheme")};t(),new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:[...hw]})}function dB(){if(Dn)return Dn;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");m0();const e=document.createElement("div");e.setAttribute("data-astryx-toast-fallback",""),document.body.appendChild(e),uB(e);let t;const n=new Promise(a=>{t=a}),s=()=>{const a=x.use(dx),l=x.useRef(!1);return x.useEffect(()=>{a&&!l.current&&(l.current=!0,Dn=a,t==null||t(a))},[a]),null};fw=NS.createRoot(e),fw.render(o.jsx(I0,{children:o.jsx(s,{})}));const r=[],i={addToast:a=>{Dn&&Dn!==i?Dn.addToast(a):(r.push(a),n.then(l=>{for(const c of r)l.addToast(c);r.length=0}))},removeToast:(a,l)=>{Dn&&Dn!==i&&Dn.removeToast(a,l)},findByUniqueID:a=>{if(Dn&&Dn!==i)return Dn.findByUniqueID(a)}};return Dn=i,i}let fB=0;function hB(){return`astryx-toast-${++fB}`}function xB(){const e=x.use(dx);return x.useCallback(n=>{const s=e??dB(),r=hB(),i={id:r,options:n,createdAt:Date.now()};return s.addToast(i),()=>s.removeToast(r,"manual")},[e])}const mp={base:{k1xSpc:"x1rg5ohu",kaIpWk:"x16rqkct",kmuXW:"x2lah0s",kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},pulsing:{kKVMdj:"x1mta51n",k44tkh:"x1c74tu6",kyAemX:"x4hg4is",ko0y90:"xa4qsjk",$$css:!0},reducedMotion:{kjO2d4:"x1aquc0h",$$css:!0}},pB={success:{kWkggS:"xdsz4j9",$$css:!0},warning:{kWkggS:"x1q8g9m5",$$css:!0},error:{kWkggS:"x1pjz0fi",$$css:!0},accent:{kWkggS:"x1ewilqj",$$css:!0},neutral:{kWkggS:"x1q5y3ey",$$css:!0}};function ur({variant:e,label:t,isPulsing:n=!1,tooltip:s,xstyle:r,className:i,style:a,ref:l,...c}){const u=o.jsx("span",{ref:l,role:"img","aria-label":t,...F(U("statusdot",{variant:e}),q(mp.base,pB[e],n&&mp.pulsing,n&&mp.reducedMotion,r),i,a),...c});return s?o.jsx(Ga,{content:s,children:u}):u}ur.displayName="StatusDot";/**
|
|
191
|
-
* @license lucide-react v1.52.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const gB=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
196
|
-
* @license lucide-react v1.52.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/function mB(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:gB(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/**
|
|
201
|
-
* @license lucide-react v1.52.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const yB=e=>{let t="",n=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){n=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=n?s.toUpperCase():s,n=!1}return t};/**
|
|
206
|
-
* @license lucide-react v1.52.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const kB=e=>{const t=yB(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
211
|
-
* @license lucide-react v1.52.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const pm=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
216
|
-
* @license lucide-react v1.52.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const Vi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
221
|
-
* @license lucide-react v1.52.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/function yp(e){return e!=null}function bB(e,t={}){var h,p;const n=t.attributeNames??{},s=m=>n[m]??m,r=e.size??e.width??Vi.width,i=e.size??e.height??Vi.height,a=((h=e.aliases)==null?void 0:h.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...a],c=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?pm(...c):pm("lucide",...l,...c),d=t.absoluteStrokeWidth?Number(t.strokeWidth??Vi["stroke-width"])*Number(e.size??e.width??Vi.width)/Number(t.size??t.width??Vi.width):t.strokeWidth??Vi["stroke-width"];return["svg",{...Object.entries(Vi).reduce((m,[b,y])=>(m[s(b)]=y,m),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&yp(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&yp(t.width)&&{[s("width")]:t.width},..."height"in t&&yp(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:d,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${r} ${i}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[b,y,g]=m,k=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...y}:y;return g?[b,k,g]:[b,k]})]}/**
|
|
226
|
-
* @license lucide-react v1.52.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/function vB(e,t={}){return bB(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
231
|
-
* @license lucide-react v1.52.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const wB=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},jB=x.createContext({}),SB=()=>x.useContext(jB),$B=x.forwardRef(({color:e,size:t,width:n,height:s,strokeWidth:r,absoluteStrokeWidth:i,nonScalingStroke:a,className:l="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},h)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:g="currentColor",className:k=""}=SB()??{},v=!!c||wB(f),[w,j,S=[]]=vB(d,{color:e??g,width:n??t??p,height:s??t??p,strokeWidth:r??m,absoluteStrokeWidth:i??b,nonScalingStroke:a??y,className:pm(k,l),hasA11yProp:v,attributes:f});return x.createElement(w,{ref:h,...j},[...S.map(([C,E])=>x.createElement(C,E)),...Array.isArray(c)?c:[c]])});/**
|
|
236
|
-
* @license lucide-react v1.52.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/function Ve(e,t=[],n=[]){const s=typeof e=="string"?mB(e,t,n):e,r=x.forwardRef(({className:i,...a},l)=>x.createElement($B,{ref:l,icon:s,className:i,...a}));return s.name&&(r.displayName=kB(s.name)),r}/**
|
|
241
|
-
* @license lucide-react v1.52.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const MS={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};MS.node;const CB=Ve(MS);/**
|
|
246
|
-
* @license lucide-react v1.52.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const RS={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};RS.node;const EB=Ve(RS);/**
|
|
251
|
-
* @license lucide-react v1.52.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const IS={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};IS.node;const TB=Ve(IS);/**
|
|
256
|
-
* @license lucide-react v1.52.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const _S={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};_S.node;const zB=Ve(_S);/**
|
|
261
|
-
* @license lucide-react v1.52.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const OS={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};OS.node;const AB=Ve(OS);/**
|
|
266
|
-
* @license lucide-react v1.52.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const DS={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};DS.node;const NB=Ve(DS);/**
|
|
271
|
-
* @license lucide-react v1.52.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const LS={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};LS.node;const MB=Ve(LS);/**
|
|
276
|
-
* @license lucide-react v1.52.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const BS={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};BS.node;const RB=Ve(BS);/**
|
|
281
|
-
* @license lucide-react v1.52.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const qS={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};qS.node;const IB=Ve(qS);/**
|
|
286
|
-
* @license lucide-react v1.52.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const HS={name:"chevrons-left",size:24,node:[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]};HS.node;const _B=Ve(HS);/**
|
|
291
|
-
* @license lucide-react v1.52.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const PS={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};PS.node;const OB=Ve(PS);/**
|
|
296
|
-
* @license lucide-react v1.52.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const US={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};US.node;const DB=Ve(US);/**
|
|
301
|
-
* @license lucide-react v1.52.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const FS={name:"circle-x",size:24,node:[["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"}]],aliases:["x-circle"]};FS.node;const LB=Ve(FS);/**
|
|
306
|
-
* @license lucide-react v1.52.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const GS={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};GS.node;const BB=Ve(GS);/**
|
|
311
|
-
* @license lucide-react v1.52.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const VS={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};VS.node;const qB=Ve(VS);/**
|
|
316
|
-
* @license lucide-react v1.52.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const WS={name:"copy",size:24,node:[["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"}]]};WS.node;const HB=Ve(WS);/**
|
|
321
|
-
* @license lucide-react v1.52.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const KS={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};KS.node;const PB=Ve(KS);/**
|
|
326
|
-
* @license lucide-react v1.52.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const XS={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};XS.node;const UB=Ve(XS);/**
|
|
331
|
-
* @license lucide-react v1.52.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const ZS={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};ZS.node;const FB=Ve(ZS);/**
|
|
336
|
-
* @license lucide-react v1.52.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const YS={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};YS.node;const GB=Ve(YS);/**
|
|
341
|
-
* @license lucide-react v1.52.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const QS={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};QS.node;const VB=Ve(QS);/**
|
|
346
|
-
* @license lucide-react v1.52.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const JS={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};JS.node;const WB=Ve(JS);/**
|
|
351
|
-
* @license lucide-react v1.52.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const e7={name:"mic",size:24,node:[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]};e7.node;const KB=Ve(e7);/**
|
|
356
|
-
* @license lucide-react v1.52.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const t7={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t7.node;const XB=Ve(t7);/**
|
|
361
|
-
* @license lucide-react v1.52.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const n7={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};n7.node;const ZB=Ve(n7);/**
|
|
366
|
-
* @license lucide-react v1.52.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const s7={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};s7.node;const YB=Ve(s7);/**
|
|
371
|
-
* @license lucide-react v1.52.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const r7={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};r7.node;const QB=Ve(r7);/**
|
|
376
|
-
* @license lucide-react v1.52.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const i7={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};i7.node;const JB=Ve(i7);var Fe={size:"1em","aria-hidden":!0},eq={close:o.jsx(JB,{...Fe}),chevronDown:o.jsx(MB,{...Fe}),chevronLeft:o.jsx(RB,{...Fe}),chevronRight:o.jsx(IB,{...Fe}),chevronsLeft:o.jsx(_B,{...Fe}),chevronsRight:o.jsx(OB,{...Fe}),check:o.jsx(NB,{...Fe}),success:o.jsx(DB,{...Fe}),error:o.jsx(LB,{...Fe}),warning:o.jsx(YB,{...Fe}),info:o.jsx(VB,{...Fe}),calendar:o.jsx(zB,{...Fe}),clock:o.jsx(BB,{...Fe}),externalLink:o.jsx(UB,{...Fe}),menu:o.jsx(WB,{...Fe}),moreHorizontal:o.jsx(PB,{...Fe}),search:o.jsx(XB,{...Fe}),arrowUp:o.jsx(TB,{...Fe}),arrowDown:o.jsx(CB,{...Fe}),arrowsUpDown:o.jsx(EB,{...Fe}),funnel:o.jsx(GB,{...Fe}),eyeSlash:o.jsx(FB,{...Fe}),viewColumns:o.jsx(qB,{...Fe}),copy:o.jsx(HB,{...Fe}),checkDouble:o.jsx(AB,{...Fe}),wrench:o.jsx(QB,{...Fe}),stop:o.jsx(ZB,{...Fe}),microphone:o.jsx(KB,{...Fe})};const tq={name:"neutral",__built:!0,tokens:{"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem","--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-bold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-bold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.3793","--duration-fast-min":"95ms","--duration-fast":"125ms","--duration-fast-max":"165ms","--duration-medium-min":"225ms","--duration-medium":"300ms","--duration-medium-max":"400ms","--duration-slow-min":"525ms","--duration-slow":"700ms","--duration-slow-max":"935ms","--font-family-body":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-heading":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace',"--color-syntax-keyword":"light-dark(#700084, #efa8ff)","--color-syntax-string":"light-dark(#005600, #a6d2a2)","--color-syntax-comment":"light-dark(#737373, #a3a3a3)","--color-syntax-number":"light-dark(#6e3500, #ffb37f)","--color-syntax-function":"light-dark(#00458c, #a0caff)","--color-syntax-type":"light-dark(#700084, #efa8ff)","--color-syntax-variable":"light-dark(#171717, #e5e5e5)","--color-syntax-operator":"light-dark(#737373, #a3a3a3)","--color-syntax-constant":"light-dark(#6e3500, #ffb37f)","--color-syntax-tag":"light-dark(#89001a, #ffaeaa)","--color-syntax-attribute":"light-dark(#584400, #eec12f)","--color-syntax-property":"light-dark(#005348, #83dac9)","--color-syntax-punctuation":"light-dark(#a3a3a3, #525252)","--color-syntax-background":"light-dark(#fafafa, #0a0a0a)","--color-background-surface":"light-dark(#ffffff, #262626)","--color-background-body":"light-dark(#f1f1f1, #1b1b1b)","--color-background-card":"light-dark(#ffffff, #1b1b1b)","--color-background-popover":"light-dark(#ffffff, #1b1b1b)","--color-background-muted":"light-dark(#f1f1f1, #1b1b1b)","--color-accent":"light-dark(#262626, #ebebeb)","--color-accent-muted":"light-dark(#f1f1f1, #262626)","--color-neutral":"light-dark(#0000000F, #FFFFFF1A)","--color-overlay":"light-dark(#00000080, #000000CC)","--color-overlay-hover":"light-dark(#0000000D, #FFFFFF0D)","--color-overlay-pressed":"light-dark(#0000001A, #FFFFFF1A)","--color-text-primary":"light-dark(#171717, #fafafa)","--color-text-secondary":"light-dark(#525252, #a3a3a3)","--color-text-disabled":"light-dark(#a3a3a3, #525252)","--color-text-accent":"light-dark(#262626, #ebebeb)","--color-on-dark":"#ffffff","--color-on-light":"#171717","--color-on-accent":"light-dark(#ffffff, #171717)","--color-on-success":"light-dark(#ffffff, #171717)","--color-on-error":"light-dark(#ffffff, #171717)","--color-on-warning":"#171717","--color-icon-accent":"light-dark(#262626, #ebebeb)","--color-icon-primary":"light-dark(#171717, #fafafa)","--color-icon-secondary":"light-dark(#737373, #a3a3a3)","--color-icon-disabled":"light-dark(#a3a3a3, #525252)","--color-success":"light-dark(#007004, #9fe59b)","--color-error":"light-dark(#a50c25, #ffc6c1)","--color-warning":"light-dark(#745b00, #fdcf4f)","--color-success-muted":"light-dark(#c5e5c0, #84c9803D)","--color-error-muted":"light-dark(#facecb, #ff9e973D)","--color-warning-muted":"light-dark(#f8da9d, #deb4333D)","--color-border":"light-dark(#00000014, #FFFFFF1A)","--color-border-emphasized":"light-dark(#d4d4d4, #525252)","--color-skeleton":"light-dark(#ebebeb, #525252)","--color-shadow":"light-dark(#0000001A, #0000004D)","--color-tint-hover":"light-dark(black, white)","--color-background-red":"light-dark(#facecb, #ff9e973D)","--color-border-red":"light-dark(#e6bab8, #ff6f6c)","--color-icon-red":"light-dark(#89001a, #ff9e97)","--color-text-red":"light-dark(#89001a, #ffc6c1)","--color-background-orange":"light-dark(#fad0b5, #ffa2583D)","--color-border-orange":"light-dark(#e6bda2, #e2883e)","--color-icon-orange":"light-dark(#6e3500, #ffa258)","--color-text-orange":"light-dark(#6e3500, #ffc9a2)","--color-background-yellow":"light-dark(#f8da9d, #deb4333D)","--color-border-yellow":"light-dark(#e4c279, #c0990e)","--color-icon-yellow":"light-dark(#584400, #deb433)","--color-text-yellow":"light-dark(#584400, #fdcf4f)","--color-background-green":"light-dark(#c5e5c0, #84c9803D)","--color-border-green":"light-dark(#b2d1ac, #69ad67)","--color-icon-green":"light-dark(#0c5700, #84c980)","--color-text-green":"light-dark(#0c5700, #9fe59b)","--color-background-teal":"light-dark(#a5e3d6, #7ec6b83D)","--color-border-teal":"light-dark(#94d6c8, #63ab9d)","--color-icon-teal":"light-dark(#005348, #7ec6b8)","--color-text-teal":"light-dark(#005348, #99e2d3)","--color-background-cyan":"light-dark(#a3e0ef, #83c2d43D)","--color-border-cyan":"light-dark(#91d3e3, #67a7b8)","--color-icon-cyan":"light-dark(#00505f, #83c2d4)","--color-text-cyan":"light-dark(#00505f, #9edef0)","--color-background-blue":"light-dark(#c4ddfb, #9eb7ff3D)","--color-border-blue":"light-dark(#b1c9e7, #6d9cfe)","--color-icon-blue":"light-dark(#00458c, #9eb7ff)","--color-text-blue":"light-dark(#00458c, #c7d3ff)","--color-background-purple":"light-dark(#eccef3, #f297ff3D)","--color-border-purple":"light-dark(#d8bbdf, #dd74f0)","--color-icon-purple":"light-dark(#700084, #f297ff)","--color-text-purple":"light-dark(#700084, #fac1ff)","--color-background-pink":"light-dark(#fccadc, #ff99c33D)","--color-border-pink":"light-dark(#e7b7c8, #f273aa)","--color-icon-pink":"light-dark(#83004b, #ff99c3)","--color-text-pink":"light-dark(#83004b, #ffc3da)","--color-background-gray":"light-dark(#e5e5e5, var(--color-neutral))","--color-border-gray":"light-dark(#d4d4d4, #262626)","--color-icon-gray":"light-dark(#525252, #a3a3a3)","--color-text-gray":"light-dark(#262626, #e5e5e5)","--radius-none":"0.25rem","--radius-inner":"0.375rem","--radius-element":"0.625rem","--radius-container":"0.75rem","--radius-page":"1.75rem","--radius-full":"9999px","--shadow-low":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 25%)), 0 4px 8px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 40%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 8%))","--shadow-med":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 35%)), 0 4px 12px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 12%))","--shadow-high":"0 4px 6px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), 0 12px 24px light-dark(oklch(0 0 0 / 15%), oklch(0 0 0 / 70%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 15%))","--shadow-inset-hover":"inset 0px 0px 0px 2px #0074e24D","--shadow-inset-selected":"inset 0px 0px 0px 2px #0074e280","--shadow-inset-success":"inset 0px 0px 0px 2px #1981004D","--shadow-inset-warning":"inset 0px 0px 0px 2px #ffce2f4D","--shadow-inset-error":"inset 0px 0px 0px 2px #e33f4a4D"},icons:eq};function nq(e,t){const n=new Map(t.map(d=>[d.id,d])),s=new Map,r=new Map;for(const d of e.conversations){const f=d.home;if(f.kind==="project"&&!e.projects.some(p=>p.path===f.path))continue;const h=n.get(d.id);h!==void 0&&(r.set(d.id,d),s.set(d.id,{summary:h,children:[]}))}for(const d of t){const f=[d];let h=d;for(;!r.has(h.id);){const p=h.parent===void 0?void 0:n.get(h.parent);if(p===void 0||f.includes(p))break;f.push(p),h=p}if(r.has(h.id))for(let p=f.length-1;p>=0;p--){const m=f[p];if(s.has(m.id)||s.set(m.id,{summary:m,children:[]}),p<f.length-1){const b=s.get(f[p+1].id),y=s.get(m.id);b.children.includes(y)||b.children.push(y)}}}const i=(d,f)=>d.summary.id-f.summary.id,a=d=>l(s.get(d.id)),l=d=>({summary:d.summary,children:[...d.children].sort(i).map(l)}),c=[...r.values()].sort((d,f)=>f.createdAt-d.createdAt),u=c.filter(d=>d.archived!==!0);return{chats:u.filter(d=>d.home.kind==="chat").map(a),projects:[...e.projects].sort((d,f)=>f.addedAt-d.addedAt).map(d=>({project:d,conversations:u.filter(f=>f.home.kind==="project"&&f.home.path===d.path).map(a)})),archived:c.filter(d=>d.archived===!0).map(d=>{const f=d.home,h=f.kind==="project"?e.projects.find(p=>p.path===f.path):void 0;return{node:a(d),...h===void 0?{}:{project:h}}})}}function Nr(e,t){const n=s=>{for(const r of s){if(r.summary.id===t)return r;const i=n(r.children);if(i!==void 0)return i}};return n([...e.chats,...e.projects.flatMap(s=>s.conversations)])}function sq(e,t,n){var l,c;const s=(l=e.checkouts)==null?void 0:l.find(u=>u.conversationId===n);if(s!==void 0)return s;const r=new Map(t.map(u=>[u.id,u])),i=new Set;let a=r.get(n);for(;a!==void 0&&!i.has(a.id);){i.add(a.id);const u=(c=e.checkouts)==null?void 0:c.find(d=>d.conversationId===a.id);if(u!==void 0)return u;a=a.parent===void 0?void 0:r.get(a.parent)}}function rq(e,t,n){const s=e.conversations.find(l=>l.id===n);if(s!==void 0)return s.home;const r=new Map(t.map(l=>[l.id,l])),i=new Set;let a=r.get(n);for(;a!==void 0&&!i.has(a.id);){i.add(a.id);const l=e.conversations.find(c=>c.id===a.id);if(l!==void 0)return l.home;a=a.parent===void 0?void 0:r.get(a.parent)}}const xw={"needs-answer":3,failed:2,running:1};function iq(e){let t;const n=s=>{const r=s.summary.status;r!==void 0&&(t===void 0||xw[r]>xw[t])&&(t=r);for(const i of s.children)n(i)};return n(e),t}function a7(e){let t;const n=s=>{const r=s.summary.updatedAt;r!==void 0&&(t===void 0||r>t)&&(t=r);for(const i of s.children)n(i)};return n(e),t}function Dx(e,t){const n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return"now";const s=Math.floor(n/60);if(s<60)return`${s}m`;const r=Math.floor(s/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}const aq=/^\s*in the working directory\s+\S+,\s*/i;function Yn(e){var n;if(e===void 0)return"Conversation";if(e.kind!=="subagent")return e.title??"New conversation";if(e.label!==void 0)return e.label;const t=(n=e.title)==null?void 0:n.replace(aq,"").trim();return t===void 0||t===""?"Subagent":t}function o7(e,t){let n=Nr(e,t);for(let s=0;n!==void 0&&n.summary.parent!==void 0&&s<4;s++)n=Nr(e,n.summary.parent);return n}function l7(e){const t=[],n=s=>{for(const r of s.children)r.summary.kind==="fork"&&(t.push(r),n(r))};return n(e),t}function oq(e){const t=[],n=e.children.filter(s=>s.summary.kind==="subagent");n.length>0&&t.push({owner:e.summary,label:"This conversation",tasks:[...n]});for(const s of l7(e)){const r=s.children.filter(i=>i.summary.kind==="subagent");r.length>0&&t.push({owner:s.summary,label:Yn(s.summary),tasks:[...r]})}return t}function c7(e,t,n){var s;return(((s=Nr(e,t))==null?void 0:s.children)??[]).filter(r=>r.summary.forkedAt===n).map(r=>r.summary.id)}function Cl(){typeof Notification>"u"||Notification.permission!=="default"||Notification.requestPermission()}const lq=e=>{const t=[],n=s=>{t.push(s.summary);for(const r of s.children)n(r)};for(const s of[...e.chats,...e.projects.flatMap(r=>r.conversations)])n(s);return t};function cq(e,t){const n=[],s=[],r=new Map;for(const i of lq(t)){if(r.set(i.id,i.status),e===void 0)continue;const a=e.get(i.id);if(a!==i.status&&s.push(i.id),i.status==="needs-answer"&&a!=="needs-answer"){n.push({id:i.id,title:Yn(i),body:"Waiting for your answer"});continue}(a==="running"||a==="needs-answer")&&(i.status===void 0||i.status==="failed")&&i.kind!=="subagent"&&n.push({id:i.id,title:Yn(i),body:i.status==="failed"?"Failed":"Finished"})}if(e!==void 0)for(const i of e.keys())r.has(i)||s.push(i);return{notices:n,changed:s,baseline:r}}function uq(e,t){const n=x.useRef(void 0),s=x.useRef(new Map),r=x.useRef(t);r.current=t,x.useEffect(()=>{var c;if(e.connection!=="connected")return;const{notices:i,changed:a,baseline:l}=cq(n.current,e.organized);n.current=l;for(const u of a)(c=s.current.get(u))==null||c.close(),s.current.delete(u);if(!(typeof Notification>"u"||Notification.permission!=="granted"))for(const u of i){if(document.visibilityState==="visible"&&document.hasFocus())continue;const d=new Notification(u.title,{body:u.body,tag:`pinomad-conversation-${u.id}`});s.current.set(u.id,d),d.onclose=()=>{s.current.get(u.id)===d&&s.current.delete(u.id)},d.onclick=()=>{window.focus(),r.current(u.id),d.close(),s.current.get(u.id)===d&&s.current.delete(u.id)}}},[e.connection,e.organized])}function dq(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function fq(e){return typeof e=="string"||!Array.isArray(e)?0:e.filter(t=>t.type==="image").length}const hq=e=>e.docs["pi.live"]??{},u7=e=>e.docs["pi.agent"]??{};function xq(e){var r;const t=hq(e),n=t.generation,s=(r=t.compactions)==null?void 0:r[0];return(n==null?void 0:n.retry)!==void 0?`Retrying (attempt ${n.attempt+1}): ${n.retry.error}`:(n==null?void 0:n.deferred)!==void 0?"Waiting for deferred response...":s!==void 0?s.retry?`Retrying ${s.reason} compaction (attempt ${s.attempt+1})...`:`Compacting (${s.reason})...`:""}function pq(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>({id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:dq(n.content),imageCount:n.mode==="write"?0:fq(n.content)}))}function gq(e){const t=e.state,n=t.status==="waiting"?`waiting on ${t.on.join(", ")}`:t.status==="completing"?`completing (${t.outcome})`:`${t.status} ${t.phase}`,s=[e.background?"background":"",e.abortRequested?"aborting":""].filter(Boolean),r=e.conversations.length>0?` owns conversation ${e.conversations.join(", ")}`:"";return`${e.kind} #${e.id}: ${n}${s.length>0?` [${s.join(", ")}]`:""}${r}`}function mq(e){const t=e.docs["pi.usage"];return t===void 0?[]:[...Object.entries(t.models),...Object.entries(t.tools)].map(([n,s])=>({key:n,input:s.input,output:s.output,cost:s.cost.total}))}function d7(e){const t=Object.values(e.tasks),n=new Set(t.flatMap(a=>a.conversations)),s=a=>t.filter(l=>l.owner===a.id||l.owner===void 0&&a.conversations.includes(l.conversationId)),r=[],i=(a,l)=>{r.push({id:a.id,depth:l,label:gq(a)});for(const c of s(a))i(c,l+1)};for(const a of t)a.owner===void 0&&!n.has(a.conversationId)&&i(a,0);return r}const yq="92px";function kq(e){var n;return(typeof document>"u"||(n=document.documentElement)==null?void 0:n.dataset.pinomadPlatform)==="darwin"?"darwin":"other"}function f7(e=kq()){return e==="darwin"?{platform:e,reserveMacTrafficLights:!0,safeLeft:yq}:{platform:e,reserveMacTrafficLights:!1,safeLeft:"0px"}}const bq={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},h7=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:s=!1,className:r="",altIcon:i,showAlt:a=!1,icon:l,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:d=!1,...f},h)=>{const p=n!==void 0?s?Number(n)*24/Number(t):n:void 0,m=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},b={ref:h,...bq,width:t,height:t,color:c||e,className:r,...m,...f},g=[...a&&i?i:l].sort(([,k],[,v])=>{const w=k.opacity!==void 0;return v.opacity!==void 0?1:w?-1:0}).map(([k,v])=>{const w=v.opacity!==void 0,j=w&&!d?v.opacity:void 0,S=u?{...v.stroke!==void 0?{stroke:w?u:c||e}:{fill:w?u:c||e}}:{};return x.createElement(k,{...v,...m,...S,opacity:j,key:v.key})});return x.createElement("svg",b,g)});h7.displayName="HugeiconsIcon";const vq=[["path",{d:"M12.001 5.00003V19.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.002 12.002L4.99998 12.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],wq=[["path",{d:"M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21 12H3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 7H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15 17H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],jq=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Sq=[["path",{d:"M12 5.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],$q=[["path",{d:"M21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C10.3719 21.5 8.8394 21.0904 7.5 20.3687C5.63177 19.362 4.37462 20.2979 3.26592 20.4658C3.09774 20.4913 2.93024 20.4302 2.80997 20.31C2.62741 20.1274 2.59266 19.8451 2.6935 19.6074C3.12865 18.5818 3.5282 16.6382 2.98341 15C2.6698 14.057 2.5 13.0483 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5C17.2467 2.5 21.5 6.75329 21.5 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.1257 12H12.0007M8.125 12H8M16.125 12H16M12.2507 12C12.2507 12.1381 12.1388 12.25 12.0007 12.25C11.8627 12.25 11.7507 12.1381 11.7507 12C11.7507 11.8619 11.8627 11.75 12.0007 11.75C12.1388 11.75 12.2507 11.8619 12.2507 12ZM8.25 12C8.25 12.1381 8.13807 12.25 8 12.25C7.86193 12.25 7.75 12.1381 7.75 12C7.75 11.8619 7.86193 11.75 8 11.75C8.13807 11.75 8.25 11.8619 8.25 12ZM16.25 12C16.25 12.1381 16.1381 12.25 16 12.25C15.8619 12.25 15.75 12.1381 15.75 12C15.75 11.8619 15.8619 11.75 16 11.75C16.1381 11.75 16.25 11.8619 16.25 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Cq=[["path",{d:"M2 10.5C2 9.72921 2.01346 8.97679 2.03909 8.2503C2.12282 5.87683 2.16469 4.69009 3.13007 3.71745C4.09545 2.74481 5.3157 2.6926 7.7562 2.58819C9.09517 2.5309 10.5209 2.5 12 2.5C13.4791 2.5 14.9048 2.5309 16.2438 2.58819C18.6843 2.6926 19.9046 2.74481 20.8699 3.71745C21.8353 4.69009 21.8772 5.87683 21.9609 8.2503C21.9865 8.97679 22 9.72921 22 10.5C22 11.2708 21.9865 12.0232 21.9609 12.7497C21.8772 15.1232 21.8353 16.3099 20.8699 17.2826C19.9046 18.2552 18.6843 18.3074 16.2437 18.4118C15.5098 18.4432 14.7498 18.4667 13.9693 18.4815C13.2282 18.4955 12.8576 18.5026 12.532 18.6266C12.2064 18.7506 11.9325 18.9855 11.3845 19.4553L9.20503 21.3242C9.07273 21.4376 8.90419 21.5 8.72991 21.5C8.32679 21.5 8 21.1732 8 20.7701V18.4219C7.91842 18.4186 7.83715 18.4153 7.75619 18.4118C5.31569 18.3074 4.09545 18.2552 3.13007 17.2825C2.16469 16.3099 2.12282 15.1232 2.03909 12.7497C2.01346 12.0232 2 11.2708 2 10.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5 10.5H8.5M12 7V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Eq=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Tq=[["path",{d:"M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],zq=[["path",{d:"M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Aq=[["path",{d:"M7.5 7.5L8.72654 8.55719C9.24218 9.00163 9.5 9.22386 9.5 9.5C9.5 9.77614 9.24218 9.99836 8.72654 10.4428L7.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.5 12.5H15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 21C15.7497 21 17.6246 21 18.9389 20.0451C19.3634 19.7367 19.7367 19.3634 20.0451 18.9389C21 17.6246 21 15.7497 21 12C21 8.25027 21 6.3754 20.0451 5.06107C19.7367 4.6366 19.3634 4.26331 18.9389 3.95491C17.6246 3 15.7497 3 12 3C8.25027 3 6.3754 3 5.06107 3.95491C4.6366 4.26331 4.26331 4.6366 3.95491 5.06107C3 6.3754 3 8.25027 3 12C3 15.7497 3 17.6246 3.95491 18.9389C4.26331 19.3634 4.6366 19.7367 5.06107 20.0451C6.3754 21 8.25027 21 12 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Nq=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Mq=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],Rq=[["path",{d:"M8 7L16 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 11L12 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Iq=[["path",{d:"M5.9925 12V18M9 14.9925L3 14.9925",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 22H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 22C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10.6569C21 9.83935 21 9.4306 20.8478 9.06306C20.6955 8.69552 20.4065 8.40649 19.8284 7.82843L15.0919 3.09188C14.593 2.593 14.3436 2.34355 14.0345 2.19575C13.9702 2.165 13.9044 2.13772 13.8372 2.11401C13.5141 2 13.1614 2 12.4558 2C9.21082 2 7.58831 2 6.48933 2.88607C6.26732 3.06508 6.06508 3.26731 5.88608 3.48933C5.14374 4.41003 5.02332 5.69818 5.00378 8M14 2.5V3C14 5.82843 14 7.24264 14.8787 8.12132C15.7574 9 17.1716 9 20 9H20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],_q=[["path",{d:"M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],Oq=[["path",{d:"M2 19V7.54902C2 6.10516 2 5.38322 2.24332 4.81647C2.5467 4.10985 3.10985 3.5467 3.81647 3.24332C4.38322 3 5.09805 3 6.54902 3H7.04311C7.64819 3 8.22075 3.27394 8.60041 3.74509L10.4175 6M10.4175 6H16C17.4001 6 18.1002 6 18.635 6.27248C19.1054 6.51217 19.4878 6.89462 19.7275 7.36502C20 7.8998 20 8.59987 20 10V11M10.4175 6H7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3.15802 15.5144L3.45643 14.7717C4.19029 12.9449 4.55723 12.0316 5.3224 11.5158C6.08757 11 7.07557 11 9.05157 11H17.1119C19.8004 11 21.1446 11 21.7422 11.8787C22.3397 12.7575 21.8405 14.0002 20.842 16.4856L20.5436 17.2283C19.8097 19.0551 19.4428 19.9684 18.6776 20.4842C17.9124 21 16.9244 21 14.9484 21H6.88812C4.19961 21 2.85535 21 2.25782 20.1213C1.66029 19.2425 2.15953 17.9998 3.15802 15.5144Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Dq=[["path",{d:"M16.2627 10.5H7.73725C5.15571 10.5 3.86494 10.5 3.27143 11.3526C2.67793 12.2052 3.11904 13.4258 4.00126 15.867L5.08545 18.867C5.54545 20.1398 5.77545 20.7763 6.2889 21.1381C6.80235 21.5 7.47538 21.5 8.82143 21.5H15.1786C16.5246 21.5 17.1976 21.5 17.7111 21.1381C18.2245 20.7763 18.4545 20.1398 18.9146 18.867L19.9987 15.867C20.881 13.4258 21.3221 12.2052 20.7286 11.3526C20.1351 10.5 18.8443 10.5 16.2627 10.5Z",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 8C19 7.53406 19 7.30109 18.9239 7.11732C18.8224 6.87229 18.6277 6.67761 18.3827 6.57612C18.1989 6.5 17.9659 6.5 17.5 6.5H6.5C6.03406 6.5 5.80109 6.5 5.61732 6.57612C5.37229 6.67761 5.17761 6.87229 5.07612 7.11732C5 7.30109 5 7.53406 5 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M16.5 4C16.5 3.53406 16.5 3.30109 16.4239 3.11732C16.3224 2.87229 16.1277 2.67761 15.8827 2.57612C15.6989 2.5 15.4659 2.5 15 2.5H9C8.53406 2.5 8.30109 2.5 8.11732 2.57612C7.87229 2.67761 7.67761 2.87229 7.57612 3.11732C7.5 3.30109 7.5 3.53406 7.5 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Lq=[["path",{d:"M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 7L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"5",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"5",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],Bq=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12C8 18 12 22 12 22C12 22 16 18 16 12C16 6 12 2 12 2C12 2 8 6 8 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 15H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],qq=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Hq=[["path",{d:"M15.5 14.5C18.8137 14.5 21.5 11.8137 21.5 8.5C21.5 5.18629 18.8137 2.5 15.5 2.5C12.1863 2.5 9.5 5.18629 9.5 8.5C9.5 9.38041 9.68962 10.2165 10.0303 10.9697L2.5 18.5V21.5H5.5V19.5H7.5V17.5H9.5L13.0303 13.9697C13.7835 14.3104 14.6196 14.5 15.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.5 6.5L16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Pq=[["path",{d:"M12 8H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 12H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 20H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 16H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3 4V11C3 12.8692 3 13.8038 3.40192 14.5C3.66523 14.9561 4.04394 15.3348 4.5 15.5981C5.19615 16 6.13077 16 8 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M8 8H7C6.07003 8 5.60504 8 5.22354 7.89778C4.18827 7.62038 3.37962 6.81173 3.10222 5.77646C3 5.39496 3 4.92997 3 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Uq=[["path",{d:"M6.00449 12.5V12M18.0045 12.5V12M12.0045 12.5V12M7.00449 12.5C7.00449 11.9477 6.55677 11.5 6.00449 11.5C5.4522 11.5 5.00449 11.9477 5.00449 12.5C5.00449 13.0523 5.4522 13.5 6.00449 13.5C6.55677 13.5 7.00449 13.0523 7.00449 12.5ZM19.0045 12.5C19.0045 11.9477 18.5568 11.5 18.0045 11.5C17.4522 11.5 17.0045 11.9477 17.0045 12.5C17.0045 13.0523 17.4522 13.5 18.0045 13.5C18.5568 13.5 19.0045 13.0523 19.0045 12.5ZM13.0045 12.5C13.0045 11.9477 12.5568 11.5 12.0045 11.5C11.4522 11.5 11.0045 11.9477 11.0045 12.5C11.0045 13.0523 11.4522 13.5 12.0045 13.5C12.5568 13.5 13.0045 13.0523 13.0045 12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Fq=[["path",{d:"M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 20H17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],Gq=[["path",{d:"M12.828 6.00096C12.9388 5.68791 12.999 5.35099 12.999 5C12.999 3.34315 11.6559 2 9.99904 2C8.34219 2 6.99904 3.34315 6.99904 5C6.99904 5.35099 7.05932 5.68791 7.17008 6.00096C4.88532 6.0093 3.66601 6.09039 2.87772 6.87868C2.08951 7.66689 2.00836 8.88603 2 11.1704C2.31251 11.06 2.64876 11 2.99904 11C4.6559 11 5.99904 12.3431 5.99904 14C5.99904 15.6569 4.6559 17 2.99904 17C2.64876 17 2.31251 16.94 2 16.8296C2.00836 19.114 2.08951 20.3331 2.87772 21.1213C3.66593 21.9095 4.88508 21.9907 7.16941 21.999C7.05908 21.6865 6.99904 21.3503 6.99904 21C6.99904 19.3431 8.34219 18 9.99904 18C11.6559 18 12.999 19.3431 12.999 21C12.999 21.3503 12.939 21.6865 12.8287 21.999C15.113 21.9907 16.3322 21.9095 17.1204 21.1213C17.9086 20.333 17.9897 19.1137 17.9981 16.829C18.3111 16.9397 18.648 17 18.999 17C20.6559 17 21.999 15.6569 21.999 14C21.999 12.3431 20.6559 11 18.999 11C18.648 11 18.3111 11.0603 17.9981 11.171C17.9897 8.88627 17.9086 7.66697 17.1204 6.87868C16.3321 6.09039 15.1128 6.0093 12.828 6.00096Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Vq=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Wq=[["path",{d:"M12 4V2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],Kq=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Xq=[["path",{d:"M21.3175 7.14139L20.8239 6.28479C20.4506 5.63696 20.264 5.31305 19.9464 5.18388C19.6288 5.05472 19.2696 5.15664 18.5513 5.36048L17.3311 5.70418C16.8725 5.80994 16.3913 5.74994 15.9726 5.53479L15.6357 5.34042C15.2766 5.11043 15.0004 4.77133 14.8475 4.37274L14.5136 3.37536C14.294 2.71534 14.1842 2.38533 13.9228 2.19657C13.6615 2.00781 13.3143 2.00781 12.6199 2.00781H11.5051C10.8108 2.00781 10.4636 2.00781 10.2022 2.19657C9.94085 2.38533 9.83106 2.71534 9.61149 3.37536L9.27753 4.37274C9.12465 4.77133 8.84845 5.11043 8.48937 5.34042L8.15249 5.53479C7.73374 5.74994 7.25259 5.80994 6.79398 5.70418L5.57375 5.36048C4.85541 5.15664 4.49625 5.05472 4.17867 5.18388C3.86109 5.31305 3.67445 5.63696 3.30115 6.28479L2.80757 7.14139C2.45766 7.74864 2.2827 8.05227 2.31666 8.37549C2.35061 8.69871 2.58483 8.95918 3.05326 9.48012L4.0843 10.6328C4.3363 10.9518 4.51521 11.5078 4.51521 12.0077C4.51521 12.5078 4.33636 13.0636 4.08433 13.3827L3.05326 14.5354C2.58483 15.0564 2.35062 15.3168 2.31666 15.6401C2.2827 15.9633 2.45766 16.2669 2.80757 16.8741L3.30114 17.7307C3.67443 18.3785 3.86109 18.7025 4.17867 18.8316C4.49625 18.9608 4.85542 18.8589 5.57377 18.655L6.79394 18.3113C7.25263 18.2055 7.73387 18.2656 8.15267 18.4808L8.4895 18.6752C8.84851 18.9052 9.12464 19.2442 9.2775 19.6428L9.61149 20.6403C9.83106 21.3003 9.94085 21.6303 10.2022 21.8191C10.4636 22.0078 10.8108 22.0078 11.5051 22.0078H12.6199C13.3143 22.0078 13.6615 22.0078 13.9228 21.8191C14.1842 21.6303 14.294 21.3003 14.5136 20.6403L14.8476 19.6428C15.0004 19.2442 15.2765 18.9052 15.6356 18.6752L15.9724 18.4808C16.3912 18.2656 16.8724 18.2055 17.3311 18.3113L18.5513 18.655C19.2696 18.8589 19.6288 18.9608 19.9464 18.8316C20.264 18.7025 20.4506 18.3785 20.8239 17.7307L21.3175 16.8741C21.6674 16.2669 21.8423 15.9633 21.8084 15.6401C21.7744 15.3168 21.5402 15.0564 21.0718 14.5354L20.0407 13.3827C19.7887 13.0636 19.6098 12.5078 19.6098 12.0077C19.6098 11.5078 19.7888 10.9518 20.0407 10.6328L21.0718 9.48012C21.5402 8.95918 21.7744 8.69871 21.8084 8.37549C21.8423 8.05227 21.6674 7.74864 21.3175 7.14139Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5195 12C15.5195 13.933 13.9525 15.5 12.0195 15.5C10.0865 15.5 8.51953 13.933 8.51953 12C8.51953 10.067 10.0865 8.5 12.0195 8.5C13.9525 8.5 15.5195 10.067 15.5195 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],Zq=[["path",{d:"M15 2L15.5387 4.39157C15.9957 6.42015 17.5798 8.00431 19.6084 8.46127L22 9L19.6084 9.53873C17.5798 9.99569 15.9957 11.5798 15.5387 13.6084L15 16L14.4613 13.6084C14.0043 11.5798 12.4202 9.99569 10.3916 9.53873L8 9L10.3916 8.46127C12.4201 8.00431 14.0043 6.42015 14.4613 4.39158L15 2Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 12L7.38481 13.7083C7.71121 15.1572 8.84275 16.2888 10.2917 16.6152L12 17L10.2917 17.3848C8.84275 17.7112 7.71121 18.8427 7.38481 20.2917L7 22L6.61519 20.2917C6.28879 18.8427 5.15725 17.7112 3.70827 17.3848L2 17L3.70827 16.6152C5.15725 16.2888 6.28879 15.1573 6.61519 13.7083L7 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Yq=[["path",{d:"M2 11.5C2 12.6046 2.89543 13.5 4 13.5C5.65685 13.5 7 12.1569 7 10.5V6.5C7 4.84315 5.65685 3.5 4 3.5C2.89543 3.5 2 4.39543 2 5.5V11.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 16.1937L15.2124 15.3337C14.9942 14.6289 14.8851 14.2765 14.969 13.9982C15.0369 13.7731 15.1859 13.579 15.389 13.4513C15.64 13.2935 16.0197 13.2935 16.7791 13.2935H17.1831C19.7532 13.2935 21.0382 13.2935 21.6452 12.5327C21.7145 12.4458 21.7762 12.3533 21.8296 12.2563C22.2965 11.4079 21.7657 10.2649 20.704 7.9789C19.7297 5.88111 19.2425 4.83222 18.338 4.21485C18.2505 4.15508 18.1605 4.0987 18.0683 4.04586C17.116 3.5 15.9362 3.5 13.5764 3.5H13.0646C10.2057 3.5 8.77628 3.5 7.88814 4.36053C7 5.22106 7 6.60607 7 9.37607V10.3497C7 11.8054 7 12.5332 7.25834 13.1994C7.51668 13.8656 8.01135 14.4134 9.00069 15.5089L13.0921 20.0394C13.1947 20.1531 13.246 20.2099 13.2913 20.2493C13.7135 20.6167 14.3652 20.5754 14.7344 20.1577C14.774 20.1129 14.8172 20.0501 14.9036 19.9245C15.0388 19.728 15.1064 19.6297 15.1654 19.5323C15.6928 18.6609 15.8524 17.6256 15.6108 16.6429C15.5838 16.5331 15.5488 16.4199 15.4787 16.1937Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Qq=[["path",{d:"M2 12.5C2 11.3954 2.89543 10.5 4 10.5C5.65685 10.5 7 11.8431 7 13.5V17.5C7 19.1569 5.65685 20.5 4 20.5C2.89543 20.5 2 19.6046 2 18.5V12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 7.80626L15.2124 8.66634C14.9942 9.37111 14.8851 9.72349 14.969 10.0018C15.0369 10.2269 15.1859 10.421 15.389 10.5487C15.64 10.7065 16.0197 10.7065 16.7791 10.7065H17.1831C19.7532 10.7065 21.0382 10.7065 21.6452 11.4673C21.7145 11.5542 21.7762 11.6467 21.8296 11.7437C22.2965 12.5921 21.7657 13.7351 20.704 16.0211C19.7297 18.1189 19.2425 19.1678 18.338 19.7852C18.2505 19.8449 18.1605 19.9013 18.0683 19.9541C17.116 20.5 15.9362 20.5 13.5764 20.5H13.0646C10.2057 20.5 8.77628 20.5 7.88814 19.6395C7 18.7789 7 17.3939 7 14.6239V13.6503C7 12.1946 7 11.4668 7.25834 10.8006C7.51668 10.1344 8.01135 9.58664 9.00069 8.49112L13.0921 3.96056C13.1947 3.84694 13.246 3.79012 13.2913 3.75075C13.7135 3.38328 14.3652 3.42464 14.7344 3.84235C14.774 3.8871 14.8172 3.94991 14.9036 4.07554C15.0388 4.27205 15.1064 4.37031 15.1654 4.46765C15.6928 5.33913 15.8524 6.37436 15.6108 7.35715C15.5838 7.46692 15.5488 7.5801 15.4787 7.80626Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Jq=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],eH=[["path",{d:"M17 8.5C17 5.73858 14.7614 3.5 12 3.5C9.23858 3.5 7 5.73858 7 8.5C7 11.2614 9.23858 13.5 12 13.5C14.7614 13.5 17 11.2614 17 8.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 20.5C19 16.634 15.866 13.5 12 13.5C8.13401 13.5 5 16.634 5 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],tH=[["path",{d:"M20.3584 13.3567C19.1689 14.546 16.9308 14.4998 13.4992 14.4998C11.2914 14.4998 9.50138 12.7071 9.50024 10.4993C9.50024 7.07001 9.454 4.83065 10.6435 3.64138C11.8329 2.45212 12.3583 2.50027 17.6274 2.50027C18.1366 2.49809 18.3929 3.11389 18.0329 3.47394L15.3199 6.18714C14.6313 6.87582 14.6294 7.99233 15.3181 8.68092C16.0068 9.36952 17.1234 9.36959 17.8122 8.68109L20.5259 5.96855C20.886 5.60859 21.5019 5.86483 21.4997 6.37395C21.4997 11.6422 21.5479 12.1675 20.3584 13.3567Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M13.5 14.5L7.32842 20.6716C6.22386 21.7761 4.433 21.7761 3.32843 20.6716C2.22386 19.567 2.22386 17.7761 3.32843 16.6716L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.50896 18.5H5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}]],nH=1.5;function Me(e){return function(n){return o.jsx(h7,{color:"currentColor",icon:e,strokeWidth:nH,...n})}}const x7=Me(wq),p7=Me(jq),g7=Me(Sq),hk=Me(Wq),Ef=Me(Cq),sH=Me($q),xk=Me(Eq),Ai=Me(Tq),Ch=Me(Jq),mu=Me(zq),rH=Me(Nq),pk=Me(Rq),m7=Me(Iq),yu=Me(_q),gm=Me(Dq),iH=Me(Oq),mm=Me(Lq),aH=Me(Bq),oH=Me(qq),lH=Me(Hq),cH=Me(Pq),Ku=Me(Uq),y7=Me(Fq),Xo=Me(vq),uH=Me(Gq),dH=Me(Vq),fH=Me(Kq),hH=Me(Xq),xH=Me(Zq),k7=Me(Aq),pH=Me(Yq),gH=Me(Qq),mH=Me(Mq),yH=Me(eH),b7=Me(tH);function gk(e,t){return function({size:s=24,isAnimated:r=!0,className:i,ref:a,...l}){const c=x.useRef(null);return x.useImperativeHandle(a,()=>c.current,[]),x.useLayoutEffect(()=>{const u=c.current,d=u==null?void 0:u.closest("button, a, [role='menuitem']");if(!r||!u||!d)return;let f=d.matches(":hover");const h=b=>{b.relatedTarget instanceof Node&&!b.relatedTarget.isConnected&&(f=!0)},p=b=>{f||b.pointerType!=="mouse"||b.buttons!==0||d.matches(":disabled, [aria-disabled='true']")||(f=!0,u.setAttribute("data-icon-hover",""))},m=()=>{f=!1,u.removeAttribute("data-icon-hover")};return d.addEventListener("pointerenter",h),d.addEventListener("pointermove",p),d.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerenter",h),d.removeEventListener("pointermove",p),d.removeEventListener("pointerleave",m),u.removeAttribute("data-icon-hover")}},[r]),o.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:`pigui-animated-icon ${i??""}`.trim(),"data-icon-motion":r?e:void 0,...l,children:t})}}const kH=gk("new-chat",o.jsxs(o.Fragment,{children:[o.jsxs("g",{"data-icon-part":"bubble",children:[o.jsx("path",{d:"M12.5 3.00372C11.6049 2.99039 10.7047 3.01289 9.8294 3.07107C5.64639 3.34913 2.31441 6.72838 2.04024 10.9707C1.98659 11.8009 1.98659 12.6607 2.04024 13.4909C2.1401 15.036 2.82343 16.4666 3.62791 17.6746C4.09501 18.5203 3.78674 19.5758 3.30021 20.4978C2.94941 21.1626 2.77401 21.495 2.91484 21.7351C3.05568 21.9752 3.37026 21.9829 3.99943 21.9982C5.24367 22.0285 6.08268 21.6757 6.74868 21.1846C7.1264 20.9061 7.31527 20.7668 7.44544 20.7508C7.5756 20.7348 7.83177 20.8403 8.34401 21.0513C8.8044 21.2409 9.33896 21.3579 9.8294 21.3905C11.2536 21.4852 12.7435 21.4854 14.1706 21.3905C18.3536 21.1125 21.6856 17.7332 21.9598 13.4909C22.0021 12.836 22.011 12.1627 21.9866 11.5"}),o.jsx("path",{d:"M8.5 15H15.5M8.5 10H12"})]}),o.jsx("path",{"data-icon-part":"add",d:"M15 5.5H22M18.5 2L18.5 9"})]})),v7=o.jsxs(o.Fragment,{children:[o.jsx("path",{d:"M13 3H11C7.22876 3 5.34315 3 4.17157 4.17157C3 5.34315 3 7.22876 3 11V13C3 16.7712 3 18.6569 4.17157 19.8284C5.34315 21 7.22876 21 11 21H13C16.7712 21 18.6569 21 19.8284 19.8284C21 18.6569 21 16.7712 21 13V11C21 7.22876 21 5.34315 19.8284 4.17157C18.6569 3 16.7712 3 13 3Z"}),o.jsx("path",{"data-icon-part":"divider",d:"M9 3V21"})]}),ym=gk("sidebar",v7),bH=gk("sidebar",o.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:v7}));function w7(){var s;const e=(s=window.pinomadDesktop)==null?void 0:s.updates,[t,n]=x.useState();if(x.useEffect(()=>{if(e===void 0)return;let r=!0;e.status().then(a=>{r&&n(a)});const i=e.onStatus(a=>{r&&n(a)});return()=>{r=!1,i()}},[e]),!(e===void 0||t===void 0))return{status:t,check:()=>void e.check(),install:()=>void e.install()}}function Wl(e){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}function vH(e,t){const n=t!=="/"&&(e===t||e.startsWith(`${t}/`)),s=n?t:"/",r=[{label:n?"~":"/",path:s}];let i=s==="/"?"":s;for(const a of e.slice(s.length).split("/"))a!==""&&(i=`${i}/${a}`,r.push({label:a,path:i}));return r}function wH(e){if(e==="/")return;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}const pw=e=>e instanceof Error?e.message:String(e);function jH({remote:e,connected:t,onAdded:n,onClose:s}){const[r,i]=x.useState(void 0),[a,l]=x.useState(!0),[c,u]=x.useState(void 0),[d,f]=x.useState(void 0),[h,p]=x.useState(!1),m=x.useRef(!1);x.useEffect(()=>(m.current=!0,()=>{m.current=!1}),[]);const b=x.useRef(0),y=x.useRef(void 0),g=x.useCallback(j=>{const S=++b.current;y.current=j,l(!0),u(void 0),f(void 0),e.controller.listFolders(j).then(C=>{!m.current||S!==b.current||(i(C),l(!1))},C=>{!m.current||S!==b.current||(u(pw(C)),l(!1))})},[e]);x.useEffect(()=>g(),[g]);const k=()=>{r!==void 0&&(p(!0),f(void 0),e.controller.addProject(r.path).then(j=>{m.current&&n(j)},j=>{m.current&&(p(!1),f(pw(j)))}))},v=r===void 0?[]:vH(r.path,r.home),w=r===void 0?void 0:wH(r.path);return o.jsx(js,{isOpen:!0,onOpenChange:j=>j?void 0:s(),purpose:"form",width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Add project",subtitle:"Choose a folder on the host.",onOpenChange:()=>s()}),content:o.jsxs(es,{children:[o.jsxs(we,{gap:1,vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(g7,{"aria-hidden":"true"}),label:"Parent folder",tooltip:"Parent folder",size:"sm",variant:"ghost",isDisabled:w===void 0||h,onClick:()=>g(w)}),v.length===0?null:o.jsx(Y3,{variant:"supporting",label:"Folders",separator:o.jsx(Ai,{"aria-hidden":"true",className:"size-3"}),children:v.map((j,S)=>o.jsx(s4,{isCurrent:S===v.length-1,onClick:S===v.length-1||h?void 0:()=>g(j.path),children:j.label},j.path))})]}),o.jsx("div",{className:"flex h-80 flex-col overflow-y-auto",children:a?o.jsx("div",{className:"flex flex-1 items-center justify-center",children:o.jsx(on,{"aria-label":"Loading folders"})}):c!==void 0?o.jsxs(fe,{gap:2,hAlign:"start",children:[o.jsx(ee,{type:"supporting",children:c}),o.jsx(re,{label:"Try again",variant:"secondary",isDisabled:h,onClick:()=>g(y.current)})]}):r===void 0?null:r.folders.length===0?o.jsx(ee,{type:"supporting",children:"No subfolders"}):o.jsx(ut,{density:"compact",children:r.folders.map(j=>o.jsx(_e,{label:j.name,startContent:o.jsx(yu,{"aria-hidden":"true"}),endContent:o.jsx(Ai,{"aria-hidden":"true"}),isDisabled:h,onClick:()=>g(j.path)},j.path))})})]}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[d===void 0?o.jsx(ee,{type:"supporting",maxLines:1,wordBreak:"break-all","data-testid":"picker-path",children:r==null?void 0:r.path}):o.jsx(ee,{type:"supporting",role:"alert",maxLines:1,style:{color:"var(--danger)"},children:d}),o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Add project",variant:"primary",isDisabled:!t||r===void 0||a||h,onClick:k})]})]})})})})}function SH({project:e,remote:t,connected:n,onClose:s}){const r=()=>{t.controller.removeProject(e.path),s()};return o.jsx(js,{isOpen:!0,onOpenChange:i=>i?void 0:s(),purpose:"form",width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>s()}),content:o.jsx(es,{}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:r})]})})})})}function $H({summary:e,remote:t,connected:n,onClose:s}){const r=Yn(e),[i,a]=x.useState(r),[l,c]=x.useState(!1),[u,d]=x.useState(void 0),f=x.useRef(null);x.useEffect(()=>{var m;return(m=f.current)==null?void 0:m.select()},[]);const h=i.trim(),p=()=>{h===""||h===r||l||(c(!0),d(void 0),t.controller.renameConversation(e.id,h).then(()=>s(),m=>{c(!1),d(m instanceof Error?m.message:String(m))}))};return o.jsx(js,{isOpen:!0,onOpenChange:m=>m?void 0:s(),purpose:"form",width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Rename conversation",onOpenChange:()=>s()}),content:o.jsxs(es,{children:[o.jsx(gs,{ref:f,label:"Title",value:i,onChange:a,onEnter:p,hasAutoFocus:!0,isDisabled:l}),u===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:u})]}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Save",variant:"primary",isDisabled:!n||l||h===""||h===r,onClick:p})]})})})})}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function km(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Eh=e=>e?`"${e}" `:"";function bm(e,t=""){if(typeof e!="boolean")throw new TypeError(Eh(t)+"expected boolean, got type="+typeof e);return e}function Zo(e,t=""){if(typeof e!="number")throw new TypeError(Eh(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Eh(t)+"expected integer >= 0, got "+e);return e}function Lt(e,t,n=""){if(km(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Zo(t,"length");const s=km(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=Eh(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}const gw=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`)};function mw(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function CH(e,t){Lt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Cr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ji(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function EH(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Yo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function TH(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function zH(e){for(let t=0;t<e.length;t++)e[t]=TH(e[t]);return e}const ca=Yo?e=>e:zH;function AH(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function NH(e,t){if(AH(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function MH(e,t){return gw(e,"defaults"),gw(t,"opts"),Object.assign(e,t)}function RH(e,t){if(e=Lt(e),t=Lt(t),e.length!==t.length)return!1;let n=0;for(let s=0;s<e.length;s++)n|=e[s]^t[s];return n===0}function IH(e,t,n){const s=t,r=()=>[],i=(l,c)=>s(c,...r(l)).update(l).digest(),a=s(new Uint8Array(e),...r(new Uint8Array(0)));return i.outputLen=a.outputLen,i.blockLen=a.blockLen,i.create=(l,...c)=>s(l,...c),i}const _H=(e,t)=>{function n(s,...r){if(Lt(s,void 0,"key"),e.nonceLength!==void 0){const f=r[0];Lt(f,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const i=e.tagLength,a=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let f=a;f<r.length;f++)if(km(r[f]))throw new Error("AAD not supported")}e.withAAD&&r[a]!==void 0&&Lt(r[a],void 0,"AAD");const l=t(s,...r),c=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");Lt(h,void 0,"output")}};let u=!1;return{encrypt(f,h){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,Lt(f,void 0,"data"),c(l.encrypt.length,h),l.encrypt(f,h)},decrypt(f,h){if(Lt(f,void 0,"data"),i&&f.length<i)throw new Error('"ciphertext" expected length >= tagLength='+i);return c(l.decrypt.length,h),l.decrypt(f,h)}}}return Object.assign(n,e),n};function vm(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Lt(t,e,"output"),n&&!Th(t))throw new Error("invalid output, must be aligned");return t}function OH(e,t,n){Zo(e),Zo(t),bm(n);const s=new Uint8Array(16),r=EH(s);return r.setBigUint64(0,BigInt(t),n),r.setBigUint64(8,BigInt(e),n),s}function Th(e){return e.byteOffset%4===0}function zh(e){return Uint8Array.from(Lt(e))}const j7=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),DH=ca(Cr(j7("expand 16-byte k"))),LH=ca(Cr(j7("expand 32-byte k")));function Re(e,t){return e<<t|e>>>32-t}const hc=64,BH=16,wm=2**32-1,yw=Uint32Array.of();function qH(e,t,n,s,r,i,a,l){const c=r.length,u=new Uint8Array(hc),d=Cr(u),f=Yo&&Th(r)&&Th(i),h=f?Cr(r):yw,p=f?Cr(i):yw;if(!Yo){for(let m=0;m<c;a++){if(e(t,n,s,d,a,l),ca(d),a>=wm)throw new Error("arx: counter overflow");const b=Math.min(hc,c-m);for(let y=0,g;y<b;y++)g=m+y,i[g]=r[g]^u[y];m+=b}return}for(let m=0;m<c;a++){if(e(t,n,s,d,a,l),a>=wm)throw new Error("arx: counter overflow");const b=Math.min(hc,c-m);if(f&&b===hc){const y=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let g=0,k;g<BH;g++)k=y+g,p[k]=h[k]^d[g];m+=hc;continue}for(let y=0,g;y<b;y++)g=m+y,i[g]=r[g]^u[y];m+=b}}function HH(e,t){const{allowShortKeys:n,extendNonceFn:s,counterLength:r,counterRight:i,rounds:a}=MH({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Zo(r),Zo(a),bm(i),bm(n),(l,c,u,d,f=0)=>{Lt(l,void 0,"key"),Lt(c,void 0,"nonce"),Lt(u,void 0,"data");const h=u.length,p=d!==void 0;if(d=vm(h,d,!1),p&&NH(u,d),Zo(f),f<0||f>=wm)throw new Error("arx: counter overflow");const m=[];let b=l.length,y,g;if(b===32)m.push(y=zh(l)),g=LH;else if(b===16&&n)y=new Uint8Array(32),y.set(l),y.set(l,16),g=DH,m.push(y);else throw Lt(l,32,"arx key"),new Error("invalid key size");(!Yo||!Th(c))&&m.push(c=zh(c));let k=Cr(y);if(s){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const j=c.subarray(0,16);if(Yo)s(g,k,Cr(j),k);else{const S=ca(Uint32Array.from(g));s(S,k,Cr(j),k),ji(S),ca(k)}c=c.subarray(16)}else Yo||ca(k);const v=16-r;if(v!==c.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const j=new Uint8Array(12);j.set(c,i?0:12-c.length),c=j,m.push(c)}const w=ca(Cr(c));try{return qH(e,g,k,w,u,d,f,a),d}finally{ji(...m)}}}function Ut(e,t){return e[t++]&255|(e[t++]&255)<<8}class PH{constructor(t){te(this,"blockLen",16);te(this,"outputLen",16);te(this,"buffer",new Uint8Array(16));te(this,"r",new Uint16Array(10));te(this,"h",new Uint16Array(10));te(this,"pad",new Uint16Array(8));te(this,"pos",0);te(this,"finished",!1);te(this,"destroyed",!1);t=zh(Lt(t,32,"key"));const n=Ut(t,0),s=Ut(t,2),r=Ut(t,4),i=Ut(t,6),a=Ut(t,8),l=Ut(t,10),c=Ut(t,12),u=Ut(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|s<<3)&8191,this.r[2]=(s>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|l<<2)&8191,this.r[7]=(l>>>11|c<<5)&8065,this.r[8]=(c>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Ut(t,16+2*d)}process(t,n,s=!1){const r=s?0:2048,{h:i,r:a}=this,l=a[0],c=a[1],u=a[2],d=a[3],f=a[4],h=a[5],p=a[6],m=a[7],b=a[8],y=a[9],g=Ut(t,n+0),k=Ut(t,n+2),v=Ut(t,n+4),w=Ut(t,n+6),j=Ut(t,n+8),S=Ut(t,n+10),C=Ut(t,n+12),E=Ut(t,n+14);let T=i[0]+(g&8191),$=i[1]+((g>>>13|k<<3)&8191),N=i[2]+((k>>>10|v<<6)&8191),A=i[3]+((v>>>7|w<<9)&8191),M=i[4]+((w>>>4|j<<12)&8191),I=i[5]+(j>>>1&8191),R=i[6]+((j>>>14|S<<2)&8191),z=i[7]+((S>>>11|C<<5)&8191),_=i[8]+((C>>>8|E<<8)&8191),O=i[9]+(E>>>5|r),D=0,L=D+T*l+$*(5*y)+N*(5*b)+A*(5*m)+M*(5*p);D=L>>>13,L&=8191,L+=I*(5*h)+R*(5*f)+z*(5*d)+_*(5*u)+O*(5*c),D+=L>>>13,L&=8191;let B=D+T*c+$*l+N*(5*y)+A*(5*b)+M*(5*m);D=B>>>13,B&=8191,B+=I*(5*p)+R*(5*h)+z*(5*f)+_*(5*d)+O*(5*u),D+=B>>>13,B&=8191;let P=D+T*u+$*c+N*l+A*(5*y)+M*(5*b);D=P>>>13,P&=8191,P+=I*(5*m)+R*(5*p)+z*(5*h)+_*(5*f)+O*(5*d),D+=P>>>13,P&=8191;let X=D+T*d+$*u+N*c+A*l+M*(5*y);D=X>>>13,X&=8191,X+=I*(5*b)+R*(5*m)+z*(5*p)+_*(5*h)+O*(5*f),D+=X>>>13,X&=8191;let Y=D+T*f+$*d+N*u+A*c+M*l;D=Y>>>13,Y&=8191,Y+=I*(5*y)+R*(5*b)+z*(5*m)+_*(5*p)+O*(5*h),D+=Y>>>13,Y&=8191;let Z=D+T*h+$*f+N*d+A*u+M*c;D=Z>>>13,Z&=8191,Z+=I*l+R*(5*y)+z*(5*b)+_*(5*m)+O*(5*p),D+=Z>>>13,Z&=8191;let ne=D+T*p+$*h+N*f+A*d+M*u;D=ne>>>13,ne&=8191,ne+=I*c+R*l+z*(5*y)+_*(5*b)+O*(5*m),D+=ne>>>13,ne&=8191;let J=D+T*m+$*p+N*h+A*f+M*d;D=J>>>13,J&=8191,J+=I*u+R*c+z*l+_*(5*y)+O*(5*b),D+=J>>>13,J&=8191;let K=D+T*b+$*m+N*p+A*h+M*f;D=K>>>13,K&=8191,K+=I*d+R*u+z*c+_*l+O*(5*y),D+=K>>>13,K&=8191;let ie=D+T*y+$*b+N*m+A*p+M*h;D=ie>>>13,ie&=8191,ie+=I*f+R*d+z*u+_*c+O*l,D+=ie>>>13,ie&=8191,D=(D<<2)+D|0,D=D+L|0,L=D&8191,D=D>>>13,B+=D,i[0]=L,i[1]=B,i[2]=P,i[3]=X,i[4]=Y,i[5]=Z,i[6]=ne,i[7]=J,i[8]=K,i[9]=ie}finalize(){const{h:t,pad:n}=this,s=new Uint16Array(10);let r=t[1]>>>13;t[1]&=8191;for(let l=2;l<10;l++)t[l]+=r,r=t[l]>>>13,t[l]&=8191;t[0]+=r*5,r=t[0]>>>13,t[0]&=8191,t[1]+=r,r=t[1]>>>13,t[1]&=8191,t[2]+=r,s[0]=t[0]+5,r=s[0]>>>13,s[0]&=8191;for(let l=1;l<10;l++)s[l]=t[l]+r,r=s[l]>>>13,s[l]&=8191;s[9]-=8192;let i=(r^1)-1;for(let l=0;l<10;l++)s[l]&=i;i=~i;for(let l=0;l<10;l++)t[l]=t[l]&i|s[l];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let a=t[0]+n[0];t[0]=a&65535;for(let l=1;l<8;l++)a=(t[l]+n[l]|0)+(a>>>16)|0,t[l]=a&65535;ji(s)}update(t){mw(this),Lt(t),t=zh(t);const{buffer:n,blockLen:s}=this,r=t.length;for(let i=0;i<r;){const a=Math.min(s-this.pos,r-i);if(a===s){for(;s<=r-i;i+=s)this.process(t,i);continue}n.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===s&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,ji(this.h,this.r,this.buffer,this.pad)}digestInto(t){mw(this),CH(t,this),this.finished=!0;const{buffer:n,h:s}=this;let{pos:r}=this;if(r){for(n[r++]=1;r<16;r++)n[r]=0;this.process(n,0,!0)}this.finalize();let i=0;for(let a=0;a<8;a++)t[i++]=s[a]>>>0,t[i++]=s[a]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}}const UH=IH(32,e=>new PH(e));function FH(e,t,n,s,r,i=20){let a=e[0],l=e[1],c=e[2],u=e[3],d=t[0],f=t[1],h=t[2],p=t[3],m=t[4],b=t[5],y=t[6],g=t[7],k=r,v=n[0],w=n[1],j=n[2],S=a,C=l,E=c,T=u,$=d,N=f,A=h,M=p,I=m,R=b,z=y,_=g,O=k,D=v,L=w,B=j;for(let X=0;X<i;X+=2)S=S+$|0,O=Re(O^S,16),I=I+O|0,$=Re($^I,12),S=S+$|0,O=Re(O^S,8),I=I+O|0,$=Re($^I,7),C=C+N|0,D=Re(D^C,16),R=R+D|0,N=Re(N^R,12),C=C+N|0,D=Re(D^C,8),R=R+D|0,N=Re(N^R,7),E=E+A|0,L=Re(L^E,16),z=z+L|0,A=Re(A^z,12),E=E+A|0,L=Re(L^E,8),z=z+L|0,A=Re(A^z,7),T=T+M|0,B=Re(B^T,16),_=_+B|0,M=Re(M^_,12),T=T+M|0,B=Re(B^T,8),_=_+B|0,M=Re(M^_,7),S=S+N|0,B=Re(B^S,16),z=z+B|0,N=Re(N^z,12),S=S+N|0,B=Re(B^S,8),z=z+B|0,N=Re(N^z,7),C=C+A|0,O=Re(O^C,16),_=_+O|0,A=Re(A^_,12),C=C+A|0,O=Re(O^C,8),_=_+O|0,A=Re(A^_,7),E=E+M|0,D=Re(D^E,16),I=I+D|0,M=Re(M^I,12),E=E+M|0,D=Re(D^E,8),I=I+D|0,M=Re(M^I,7),T=T+$|0,L=Re(L^T,16),R=R+L|0,$=Re($^R,12),T=T+$|0,L=Re(L^T,8),R=R+L|0,$=Re($^R,7);let P=0;s[P++]=a+S|0,s[P++]=l+C|0,s[P++]=c+E|0,s[P++]=u+T|0,s[P++]=d+$|0,s[P++]=f+N|0,s[P++]=h+A|0,s[P++]=p+M|0,s[P++]=m+I|0,s[P++]=b+R|0,s[P++]=y+z|0,s[P++]=g+_|0,s[P++]=k+O|0,s[P++]=v+D|0,s[P++]=w+L|0,s[P++]=j+B|0}const GH=HH(FH,{counterRight:!1,counterLength:4,allowShortKeys:!1}),VH=new Uint8Array(16),kw=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(VH.subarray(n))},WH=new Uint8Array(32);function bw(e,t,n,s,r){r!==void 0&&Lt(r,void 0,"AAD");const i=e(t,n,WH),a=OH(s.length,r?r.length:0,!0),l=UH.create(i);r&&kw(l,r),kw(l,s),l.update(a);const c=l.digest();return ji(i,a),c}const KH=e=>(t,n,s)=>({encrypt(i,a){const l=i.length;a=vm(l+16,a,!1),a.set(i);const c=a.subarray(0,-16);e(t,n,c,c,1);const u=bw(e,t,n,c,s);return a.set(u,l),ji(u),a},decrypt(i,a){a=vm(i.length-16,a,!1);const l=i.subarray(0,-16),c=i.subarray(-16),u=bw(e,t,n,l,s);if(!RH(c,u))throw ji(u),new Error("invalid tag");return a.set(i.subarray(0,-16)),e(t,n,a,a,1),ji(u),a}}),vw=_H({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},KH(GH)),XH=e=>e/2**32|0,ZH=e=>e>>>0;function jm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Sm=e=>e?`"${e}" `:"";function Lr(e,t=""){if(typeof e!="number")throw new TypeError(Sm(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Sm(t)+"expected integer >= 0, got "+e);return e}function ys(e,t,n=""){if(jm(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Lr(t,"length");const s=jm(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,a=Sm(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(a):new TypeError(a)}function ww(e){return Uint8Array.from(ys(e))}function YH(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Lr(e.outputLen),Lr(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const QH=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},jw=(e,t)=>{QH(e,t);const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function Ah(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function S7(e,t){ys(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Nh(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function $m(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Mh(e,t){return e<<32-t|e>>>t}const $7=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function C7(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Sc=$7?e=>e:e=>C7(e)>>>0;function JH(e){for(let t=0;t<e.length;t++)e[t]=C7(e[t]);return e}const go=$7?e=>e:JH,E7=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",eP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function mk(e){if(ys(e),E7)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=eP[e[n]];return t}function Sw(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function T7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(E7)try{return Uint8Array.fromHex(e)}catch(r){throw r instanceof SyntaxError?new RangeError(r.message):r}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const s=new Uint8Array(n);for(let r=0,i=0;r<n;r++,i+=2){const a=Sw(e.charCodeAt(i)),l=Sw(e.charCodeAt(i+1));if(a===void 0||l===void 0){const c=e[i]+e[i+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+i)}s[r]=a*16+l}return s}function z7(e,t,n="opts"){return jw(e,"defaults"),t!==void 0&&jw(t,n),Object.assign(Object.create(null),e,t)}function tP(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=z7({},t,"info");const n=(r,i)=>e(i).update(r).digest(),s=e(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.canXOF=s.canXOF,n.create=r=>e(r),Object.assign(n,t),Object.freeze(n)}function nP(e=32){Lr(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const sP=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function A7(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let s=0;s<e.length;s++)n(e[s],`${t}[${s}]`);return e}const Qo=(e,t,n)=>ys(e,t,n),N7=Lr;function Jo(e,t="object"){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`);return e}function Hc(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const rP=mk,iP=e=>T7(e),M7=jm,R7=e=>nP(e),Rh=BigInt(0),$w=BigInt(1),aP=e=>e?`"${e}" `:"";function Lx(e,t=""){if(typeof e!="boolean")throw new TypeError(aP(t)+"expected boolean, got type="+typeof e);return e}function oP(e){if(typeof e=="bigint"){if(!ja(e))throw new RangeError("positive bigint expected, got "+e)}else N7(e);return e}function Cm(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(n+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){const n=t&&`"${t}" `;throw new RangeError(n+"expected safe integer, got "+e)}}function I7(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Rh:BigInt("0x"+e)}function _7(e){return I7(mk(e))}function Ih(e){return I7(mk(ku(ys(e)).reverse()))}function O7(e,t){if(Lr(t),t===0)throw new Error("zero output length is invalid");e=oP(e);const n=t*2,s=e.toString(16);if(s.length>n)throw new RangeError("number is too large");return T7(s.padStart(n,"0"))}function D7(e,t){return O7(e,t).reverse()}function ku(e){return Uint8Array.from(Qo(e))}function ja(e){return typeof e=="bigint"&&Rh<=e}function L7(e,t,n){return ja(e)&&ja(t)&&ja(n)&&t<=e&&e<n}function Pc(e,t,n,s){if(!L7(t,n,s))throw new RangeError("expected valid "+e+": "+n+" <= n < "+s+", got "+t)}function lP(e){if(e<Rh)throw new Error("expected non-negative bigint, got "+e);return e===Rh?0:e.toString(2).length}const cP=e=>(Cm(e,"n"),($w<<BigInt(e))-$w);function _h(e,t={},n={},s="object"){Jo(e,s),Jo(t,"fields"),Jo(n,"optFields");function r(a,l,c){const u=s==="object"?`param "${String(a)}"`:`"${s}.${String(a)}"`,d=e[a];if(!Object.hasOwn(e,a)&&(c?d!==void 0:l!=="function"))throw new TypeError(`${u} is invalid: expected own property`);if(c&&d===void 0)return;const f=typeof d;if(f!==l||d===null)throw new TypeError(`${u} is invalid: expected ${l}, got ${f}`)}const i=(a,l)=>Object.entries(a).forEach(([c,u])=>r(c,u,l));i(t,!1),i(n,!0)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qt=BigInt(0),rt=BigInt(1),ua=BigInt(2),B7=BigInt(3),yk=BigInt(4),q7=BigInt(5),uP=BigInt(7),H7=BigInt(8),dP=BigInt(9),fP=BigInt(15),P7=BigInt(16),hP=BigInt("0x10000000000000000");function st(e,t){if(t<=qt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=qt?n:t+n}function xP(e,t,n){if(n<=rt)throw new Error("pow: expected modulus > 1, got "+n);if(typeof t!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof t);if(t<qt)throw new Error("invalid exponent, negatives unsupported");if(t===qt)return rt;if(t===rt)return e;let s=e%n;if(s<qt&&(s+=n),t<hP){let l=rt;for(;t>qt;)t&rt&&(l=l*s%n),s=s*s%n,t>>=rt;return l}const r=[];for(;t>qt;)r.push(Number(t&fP)),t>>=yk;const i=new Array(16);i[0]=rt,i[1]=s;for(let l=2;l<16;l++)i[l]=i[l-1]*s%n;let a=i[r[r.length-1]];for(let l=r.length-2;l>=0;l--){a=a*a%n,a=a*a%n,a=a*a%n,a=a*a%n;const c=r[l];c!==0&&(a=a*i[c]%n)}return a}function Ns(e,t,n){if(n<=rt)throw new Error("pow2: expected modulus > 1, got "+n);if(t<qt)throw new Error("pow2: expected non-negative exponent, got "+t);let s=e;for(;t-- >qt;)s*=s,s%=n;return s}function Cw(e,t){if(e===qt)throw new Error("invert: expected non-zero number");if(t<=rt)throw new Error("invert: expected modulus > 1, got "+t);let n=st(e,t),s=t,r=qt,i=rt;for(;n!==qt;){const l=s/n,c=s-n*l,u=r-i*l;s=n,n=c,r=i,i=u}if(s!==rt)throw new Error("invert: does not exist");return st(r,t)}function kk(e,t,n){const s=e;if(!s.eql(s.sqr(t),n))throw new Error("Cannot find square root")}function bk(e,t){if((e&rt)===qt)throw new Error(t+": expected odd modulus, got "+e)}function U7(e,t){const n=e,s=(n.ORDER+rt)/yk,r=n.pow(t,s);return kk(n,r,t),r}function pP(e,t){const n=e,s=(n.ORDER-q7)/H7,r=n.mul(t,ua),i=n.pow(r,s),a=n.mul(t,i),l=n.mul(n.mul(a,ua),i),c=n.mul(a,n.sub(l,n.ONE));return kk(n,c,t),c}function gP(e){const t=vk(e),n=F7(e),s=n(t,t.neg(t.ONE)),r=n(t,s),i=n(t,t.neg(s)),a=(e+uP)/P7;return(l,c)=>{const u=l;let d=u.pow(c,a),f=u.mul(d,s);const h=u.mul(d,r),p=u.mul(d,i),m=u.eql(u.sqr(f),c),b=u.eql(u.sqr(h),c);d=u.cmov(d,f,m),f=u.cmov(p,h,b);const y=u.eql(u.sqr(f),c),g=u.cmov(d,f,y);return kk(u,g,c),g}}function F7(e){if(e<B7)throw new Error("sqrt is not defined for small field");bk(e,"tonelliShanks");let t=e-rt,n=0;for(;t%ua===qt;)t/=ua,n++;let s=ua;const r=vk(e);for(;Oh(r,s)===1;)if(s++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return U7;let i=r.pow(s,t);const a=(t+rt)/ua;return function(c,u){const d=c;if(d.is0(u))return u;if(Oh(d,u)!==1)throw new Error("Cannot find square root");let f=n,h=d.mul(d.ONE,i),p=d.pow(u,t),m=d.pow(u,a);for(;!d.eql(p,d.ONE);){if(d.is0(p))throw new Error("Cannot find square root: probably non-prime P");let b=1,y=d.sqr(p);for(;!d.eql(y,d.ONE);)if(b++,y=d.sqr(y),b===f)throw new Error("Cannot find square root");const g=rt<<BigInt(f-b-1),k=d.pow(h,g);f=b,h=d.sqr(k),p=d.mul(p,h),m=d.mul(m,k)}return m}}function mP(e){return bk(e,"Fp.sqrt"),e%yk===B7?U7:e%H7===q7?pP:e%P7===dP?gP(e):F7(e)}const yP=(e,t)=>(st(e,t)&rt)===rt,kP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function bu(e){if(Jo(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);Cm(e.BYTES,"BYTES"),Cm(e.BITS,"BITS");for(const t of kP)Hc(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=rt)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function G7(e,t,n=!1){bu(e),A7(t,"nums"),Lx(n,"passZero");const s=e,r=new Array(t.length).fill(n?s.ZERO:void 0),i=t.reduce((l,c,u)=>s.is0(c)?l:(r[u]=l,s.mul(l,c)),s.ONE),a=s.inv(i);return t.reduceRight((l,c,u)=>s.is0(c)?l:(r[u]=s.mul(l,r[u]),s.mul(l,c)),a),r}function Oh(e,t){bu(e);const n=e;bk(n.ORDER,"FpLegendre");const s=(n.ORDER-rt)/ua,r=n.pow(t,s),i=n.eql(r,n.ONE),a=n.eql(r,n.ZERO),l=n.eql(r,n.neg(n.ONE));if(!i&&!a&&!l)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function bP(e,t){if(t!==void 0&&N7(t),e<=qt)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);const n=lP(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const s=t!==void 0?t:n,r=Math.ceil(s/8);return{nBitLength:s,nByteLength:r}}const Ew=new WeakMap;class Tw{constructor(t,n={}){te(this,"ORDER");te(this,"BITS");te(this,"BYTES");te(this,"isLE");te(this,"ZERO",qt);te(this,"ONE",rt);te(this,"_lengths");te(this,"_mod");if(t<=rt)throw new Error("invalid field: expected ORDER > 1, got "+t);let s;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(s=n.BITS),typeof n.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:n.sqrt,enumerable:!0}),typeof n.isLE=="boolean"&&(this.isLE=n.isLE),n.allowedLengths&&(this._lengths=Object.freeze(n.allowedLengths.slice())),typeof n.modFromBytes=="boolean"&&(this._mod=n.modFromBytes));const{nBitLength:r,nByteLength:i}=bP(t,s);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(t){return st(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return qt<=t&&t<this.ORDER}is0(t){return t===qt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&rt)===rt}neg(t){return st(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return st(t*t,this.ORDER)}add(t,n){return st(t+n,this.ORDER)}sub(t,n){return st(t-n,this.ORDER)}mul(t,n){return st(t*n,this.ORDER)}pow(t,n){return xP(t,n,this.ORDER)}div(t,n){return st(t*Cw(n,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,n){return t+n}subN(t,n){return t-n}mulN(t,n){return t*n}inv(t){return Cw(t,this.ORDER)}sqrt(t){let n=Ew.get(this);return n||Ew.set(this,n=mP(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?D7(t,this.BYTES):O7(t,this.BYTES)}fromBytes(t,n=!1){Qo(t);const{_lengths:s,BYTES:r,isLE:i,ORDER:a,_mod:l}=this;if(s){if(t.length<1||!s.includes(t.length)||t.length>r)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+t.length);const u=new Uint8Array(r);u.set(t,i?0:u.length-t.length),t=u}if(t.length!==r)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);let c=i?Ih(t):_7(t);if(l&&(c=st(c,a)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return G7(this,t,!0)}cmov(t,n,s){return Lx(s,"condition"),s?n:t}}function vk(e,t={}){return Object.freeze(Tw.prototype),new Tw(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wk=BigInt(0),vu=BigInt(1),vP=BigInt(4),kp=16,zw=128,wP=5,Aw=2**31;function jk(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Hc(t.fromAffine,"Point.fromAffine"),Hc(t.fromBytes,"Point.fromBytes"),Hc(t.fromHex,"Point.fromHex"),Jo(t.BASE,"Point.BASE"),Jo(t.ZERO,"Point.ZERO"),bu(t.Fp),bu(t.Fn)}function jP(e,t){jk(e),V7(t,e);const n=G7(e.Fp,t.map(s=>s.Z));return t.map((s,r)=>e.fromAffine(s.toAffine(n[r])))}function SP(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw new Error("invalid window size, expected ["+n+".."+t+"], got W="+e)}function $P(e,t){const n=e*(4*t+128);if(n>Aw)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+Aw/2**20+" MiB")}function CP(e,t){if(e!==void 0){Hc(e,"randomBytes");try{const n=e(t);if(!M7(n)||n.length!==t)return}catch{return}return e}}function V7(e,t){A7(e,"points"),e.forEach((n,s)=>{if(!(n instanceof t))throw new Error("invalid point at index "+s)})}function EP(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((s,r)=>{if(!(n===void 0?t.isValid(s):ja(s)&&s<n))throw new Error("invalid scalar at index "+r)})}const W7=new WeakMap;function bp(e){return W7.get(e)||1}function TP(e,t){const n=e.double(),s=[e];for(let r=1;r<t;r++)s.push(s[r-1].add(n));return s}function zP(e,t){const n=2**t,s=n/2,r=BigInt(n-1),i=[];for(;e>wk;){let a=0;e&vu&&(a=Number(e&r),a>=s&&(a-=n),e-=BigInt(a)),i.push(a),e>>=vu}return i}function AP(e,t,n){const s=2**t,r=s/2,i=BigInt(s-1),a=BigInt(t),l=[];for(let c=0;c<n;c++){let u=Number(e&i);e>>=a,u>r&&(u-=s,e+=vu),l.push(u)}if(e!==wk)throw new Error("invalid wnaf");return l}function NP(e,t,n){let s=0;for(const i of n)s=Math.max(s,i.length);let r=e;for(let i=s-1;i>=0;i--){i!==s-1&&(r=r.double());for(let a=0;a<n.length;a++){const l=n[a][i];if(l){const c=t[a][Math.abs(l)-1>>1];r=r.add(l<0?c.negate():c)}}}return r}class MP{constructor(t,n){te(this,"Point");te(this,"BASE");te(this,"ZERO");te(this,"randomBytes");te(this,"wnafPrecomputes",new WeakMap);te(this,"baseCanBeBlinded");te(this,"bits");jk(t),this.randomBytes=CP(n,kp),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,s){const r=Math.ceil(s/n)+1,i=2**(n-1),a=[];let l=t;for(let c=0;c<r;c++){let u=l;for(let d=0;d<i;d++)a.push(u),u=u.add(l);l=a[a.length-1].double()}return{W:n,bits:s,windows:r,comp:a}}wnafCachedCT(t,n){const{W:s,windows:r,comp:i}=t,a=2**(s-1),l=AP(n,s,r);let c=this.ZERO,u=this.BASE;for(let d=0;d<r;d++){const f=l[d],h=d*a,p=Math.abs(f)-1;let m=i[h];for(let y=1;y<a;y++)m=y===p?i[h+y]:m;const b=m.negate();f===0?u=u.add(i[h]):c=c.add(f<0?b:m)}return{p:c,f:u}}getWnafPrecomputes(t,n,s,r){let i=this.wnafPrecomputes.get(n),a=i==null?void 0:i.find(l=>l.W===t&&l.bits===s);return a||(a=this.buildWnafTable(n,t,s),typeof r=="function"&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(n,i)),i.push(a)),a}assertPoint(t){if(!(t instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof t)}validateMulInput(t,n){if(this.assertPoint(t),!L7(n,vu,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,s,r){const i=bp(t);return i===1?this.fixedWindowCT(t,n,s):this.wnafCachedCT(this.getWnafPrecomputes(i,t,s,r),n)}mulCT(t,n,s){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,s)}mulCTBlinded(t,n,s){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const r=this.Point.Fn.BITS+zw,i=this.randomBytes(kp);if(!M7(i)||i.length!==kp)throw new Error("randomBytes returned invalid byte array");i[0]=i[0]&63|128;const a=n+_7(i)*this.Point.Fn.ORDER;return this.runCT(t,a,r,s)}fixedWindowCT(t,n,s){const r=wP,i=1<<r,a=cP(r),l=new Array(i);l[0]=this.ZERO;for(let d=1;d<i;d++)l[d]=l[d-1].add(t);const c=Math.ceil(s/r);let u=this.ZERO;for(let d=c-1;d>=0;d--){if(d!==c-1)for(let p=0;p<r;p++)u=u.double();const f=Number(n>>BigInt(d*r)&a);let h=l[0];for(let p=1;p<i;p++)h=p===f?l[p]:h;u=u.add(h)}return{p:u,f:u}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===vu?!0:t!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(t,n,s,r){return this.shouldBlind(t,s)?this.mulCTBlinded(t,n,r):this.mulCT(t,n,r)}mulUnsafe(t,n,s){if(this.assertPoint(t),!ja(n))throw new Error("invalid scalar");const r=bp(t);if(r===1||n>=this.Point.Fn.ORDER)return RP(this.Point,[t],[n],!0);const i=this.getWnafPrecomputes(r,t,this.bits,s);return this.wnafCachedCT(i,n).p}setWindowSize(t,n){this.assertPoint(t),SP(n,this.bits);const s=Math.ceil((this.bits+zw)/n)+1;$P(s*2**(n-1),this.Point.Fp.BYTES),W7.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return bp(t)!==1}}function RP(e,t,n,s=!1){if(jk(e),V7(t,e),Lx(s,"allowOversized"),EP(n,e.Fn,s?e.Fn.ORDER**vP:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const r=t.map(a=>TP(a,4)),i=n.map(a=>zP(a,4));return NP(e.ZERO,r,i)}function Nw(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return bu(t),t}else return vk(e,{isLE:n})}function IP(e,t,n={},s){if(s===void 0&&(s=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);_h(n);for(const c of["p","n","h"]){const u=t[c];if(!(ja(u)&&u!==wk))throw new Error(`CURVE.${c} must be positive bigint`)}const r=Nw(t.p,n.Fp,s),i=Nw(t.n,n.Fn,s),l=["Gx","Gy","a","d"];for(const c of l)if(!r.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:r,Fn:i}}function _P(e,t){return function(s){const r=e(s);return{secretKey:r,publicKey:t(r)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Gd=BigInt(0),Vd=BigInt(1),Wd=BigInt(2),OP=BigInt(4),Mw=BigInt(8);function DP(e,t,n,s){const r=e.sqr(n),i=e.sqr(s),a=e.add(e.mul(t.a,r),i),l=e.add(e.ONE,e.mul(t.d,e.mul(r,i)));return e.eql(a,l)}function LP(e,t={}){_h(t,{},{},"extraOpts");const n=t,s=IP("edwards",e,n,n.FpFnLE),{Fp:r,Fn:i}=s;let a=s.CURVE;const{h:l}=a;if(Oh(r,a.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Oh(r,a.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");_h(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?R7:n.randomBytes,u=Wd<<BigInt(r.BYTES*8)-Vd;function d(v){if(!r.isOdd)throw new Error("Field does not have .isOdd()");return r.isOdd(v)}const f=n.uvRatio===void 0?(v,w)=>{try{return{isValid:!0,value:r.sqrt(r.div(v,w))}}catch{return{isValid:!1,value:Gd}}}:n.uvRatio;if(!DP(r,a,a.Gx,a.Gy))throw new Error("bad curve params: generator point");const h=r.eql(a.a,r.neg(r.ONE))?v=>r.neg(v):r.eql(a.a,r.ONE)?v=>v:v=>r.mul(a.a,v);function p(v,w,j=!1){const S=j?Vd:Gd;return Pc("coordinate "+v,w,S,u),w}function m(v){if(!(v instanceof b))throw new Error("EdwardsPoint expected")}const k=class k{constructor(w,j,S,C){te(this,"X");te(this,"Y");te(this,"Z");te(this,"T");this.X=p("x",w),this.Y=p("y",j),this.Z=p("z",S,!0),this.T=p("t",C),Object.freeze(this)}static CURVE(){return a}static fromAffine(w){if(w instanceof k)throw new Error("extended point not allowed");const{x:j,y:S}=w||{};return p("x",j),p("y",S),new k(j,S,r.ONE,r.mul(j,S))}static fromBytes(w,j=!1){const S=r.BYTES,{a:C,d:E}=a;w=ku(Qo(w,S,"point")),Lx(j,"zip215");const T=ku(w),$=w[S-1];T[S-1]=$&-129;const N=Ih(T),A=j?u:r.ORDER;Pc("point.y",N,Gd,A);const M=r.sqr(N),I=r.sub(M,r.ONE),R=r.sub(r.mulN(E,M),C);let{isValid:z,value:_}=f(I,R);if(!z)throw new Error("bad point: invalid y coordinate");const O=d(_),D=($&128)!==0;if(!j&&r.is0(_)&&D)throw new Error("bad point: x=0 and x_0=1");return D!==O&&(_=r.neg(_)),k.fromAffine({x:_,y:N})}static fromHex(w,j=!1){return k.fromBytes(iP(w),j)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=6,j=!0){return g.setWindowSize(this,w),j||this.multiply(Wd),this}assertValidity(){const w=this,{a:j,d:S}=a;if(w.is0())throw new Error("bad point: ZERO");const{X:C,Y:E,Z:T,T:$}=w,N=r.sqr(C),A=r.sqr(E),M=r.sqr(T),I=r.sqr(M),R=r.mul(N,j),z=r.mul(r.add(R,A),M),_=r.add(I,r.mul(S,r.mul(N,A)));if(!r.eql(z,_))throw new Error("bad point: equation left != right (1)");const O=r.mul(C,E),D=r.mul(T,$);if(!r.eql(O,D))throw new Error("bad point: equation left != right (2)")}equals(w){m(w);const{X:j,Y:S,Z:C}=this,{X:E,Y:T,Z:$}=w,N=r.mul(j,$),A=r.mul(E,C),M=r.mul(S,$),I=r.mul(T,C);return r.eql(N,A)&&r.eql(M,I)}is0(){return this.equals(k.ZERO)}negate(){return new k(r.neg(this.X),this.Y,this.Z,r.neg(this.T))}double(){const{X:w,Y:j,Z:S}=this,C=r.sqr(w),E=r.sqr(j),T=r.mul(r.sqr(S),Wd),$=h(C),N=r.addN(w,j),A=r.sub(r.subN(r.sqr(N),C),E),M=r.addN($,E),I=r.subN(M,T),R=r.subN($,E),z=r.mul(A,I),_=r.mul(M,R),O=r.mul(A,R),D=r.mul(I,M);return new k(z,_,D,O)}add(w){m(w);const{d:j}=a,{X:S,Y:C,Z:E,T}=this,{X:$,Y:N,Z:A,T:M}=w,I=r.mul(S,$),R=r.mul(C,N),z=r.mul(r.mulN(T,j),M),_=r.mul(E,A),O=r.sub(r.subN(r.mulN(r.addN(S,C),r.addN($,N)),I),R),D=r.subN(_,z),L=r.addN(_,z),B=r.sub(R,h(I)),P=r.mul(O,D),X=r.mul(L,B),Y=r.mul(O,B),Z=r.mul(D,L);return new k(P,X,Z,Y)}subtract(w){return m(w),this.add(w.negate())}multiply(w){if(!i.isValidNot0(w))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:j,f:S}=g.mulSecret(this,w,l,y);return y([j,S])[0]}multiplyUnsafe(w){if(!i.isValid(w))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return w===Gd?k.ZERO:this.is0()||w===Vd?this:g.mulUnsafe(this,w,y)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return g.mulUnsafe(this,a.n).is0()}toAffine(w){const j=this;let S=w;if(S!=null&&typeof S!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof S);const{X:C,Y:E,Z:T}=j,$=j.is0();S==null&&(S=$?r.create(Mw):r.inv(T));const N=r.mul(C,S),A=r.mul(E,S),M=r.mul(T,S);if($)return{x:r.ZERO,y:r.ONE};if(!r.eql(M,r.ONE))throw new Error("invZ was invalid");return{x:N,y:A}}clearCofactor(){return l===Vd?this:l===Wd?this.double():l===OP?this.double().double():l===Mw?this.double().double().double():this.multiplyUnsafe(l)}toBytes(){const{x:w,y:j}=this.toAffine(),S=r.toBytes(j);return S[S.length-1]|=d(w)?128:0,S}toHex(){return rP(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};te(k,"BASE",new k(a.Gx,a.Gy,r.ONE,r.mul(a.Gx,a.Gy))),te(k,"ZERO",new k(r.ZERO,r.ONE,r.ONE,r.ZERO)),te(k,"Fp",r),te(k,"Fn",i);let b=k;const y=v=>jP(b,v),g=new MP(b,c);return g.bits>=6&&b.BASE.precompute(6),Object.freeze(b.prototype),Object.freeze(b),b}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wi=BigInt(0),as=BigInt(1),Kd=BigInt(2);function Rw(e,t){return e+t-(t>>as<<as)}function BP(e){const t=BigInt(6)*e;return(n,s,r)=>{const i=s+r,l=((t+r-s)*n+s)%e;return{x_2:l,x_3:i-l}}}function qP(e){return _h(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function HP(e){const t=qP(e),{P:n,type:s,adjustScalarBytes:r,powPminus2:i,randomBytes:a}=t,l=t.scalarMultBase,c=s==="x25519";if(!c&&s!=="x448")throw new Error("invalid type");const u=a===void 0?R7:a,d=c?255:448,f=BP(n),h=c?32:56,p=BigInt(c?9:5),m=BigInt(c?121665:39081),b=c?Kd**BigInt(254):Kd**BigInt(447),y=c?BigInt(8)*(Kd**BigInt(251)-as):BigInt(4)*(Kd**BigInt(445)-as),g=b+y+as,k=z=>st(z,n),v=w(p);function w(z){return D7(k(z),h)}function j(z){const _=ku(Qo(z,h,"uCoordinate"));return c&&(_[31]&=127),k(Ih(_))}function S(z){return Ih(r(ku(Qo(z,h,"scalar"))))}const C=new Set(c?[Wi,as,n-as,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[Wi,as,n-as]);function E(z,_){const O=j(_);if(C.has(O))throw new Error("invalid private or public key received");const D=A(O,S(z));if(D===Wi)throw new Error("invalid private or public key received");return w(D)}function T(z){if(l===void 0)return E(z,v);const _=S(z);Pc("scalar",_,b,g);const O=k(l(_));if(O===Wi)throw new Error("invalid private or public key received");return w(O)}const $=T,N=E;function A(z,_){Pc("u",z,Wi,n),Pc("scalar",_,b,g);const O=_,D=z;let L=as,B=Wi,P=z,X=as;const Y=O^O>>as;for(let J=BigInt(d-1);J>=Wi;J--){const K=Rw(n,Y>>J);({x_2:L,x_3:P}=f(K,L,P)),{x_2:B,x_3:X}=f(K,B,X);const ie=L+B,le=k(ie*ie),ve=L-B,ge=k(ve*ve),xe=le-ge,ce=P+X,Q=P-X,ye=k(Q*ie),ue=k(ce*ve),pe=ye+ue,Le=ye-ue;P=k(pe*pe),X=k(D*k(Le*Le)),L=k(le*ge),B=k(xe*(le+k(m*xe)))}const Z=Rw(n,O);({x_2:L,x_3:P}=f(Z,L,P)),{x_2:B,x_3:X}=f(Z,B,X);const ne=i(B);return k(L*ne)}const M={secretKey:h,publicKey:h,seed:h},I=z=>(z=z===void 0?u(h):z,Qo(z,M.seed,"seed"),z),R={randomSecretKey:I};return Object.freeze(M),Object.freeze(R),Object.freeze({keygen:_P(I,$),getSharedSecret:N,getPublicKey:$,scalarMult:E,scalarMultBase:T,utils:R,GuBytes:v.slice(),lengths:M})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Iw=BigInt(0),PP=BigInt(1),_w=BigInt(2),UP=BigInt(3),FP=BigInt(5),GP=BigInt(8),Bx=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),VP={p:Bx,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:GP,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function K7(e){const t=BigInt(10),n=BigInt(20),s=BigInt(40),r=BigInt(80),i=Bx,l=e*e%i*e%i,c=Ns(l,_w,i)*l%i,u=Ns(c,PP,i)*e%i,d=Ns(u,FP,i)*u%i,f=Ns(d,t,i)*d%i,h=Ns(f,n,i)*f%i,p=Ns(h,s,i)*h%i,m=Ns(p,r,i)*p%i,b=Ns(m,r,i)*p%i,y=Ns(b,t,i)*d%i;return{pow_p_5_8:Ns(y,_w,i)*e%i,b2:l}}function WP(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ow=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function KP(e,t){const n=Bx,s=st(t*t*t,n),r=st(s*s*t,n),i=K7(e*r).pow_p_5_8;let a=st(e*s*i,n);const l=st(t*a*a,n),c=a,u=st(a*Ow,n),d=l===e,f=l===st(-e,n),h=l===st(-e*Ow,n);return d&&(a=c),(f||h)&&(a=u),yP(a,n)&&(a=st(-a,n)),{isValid:d||f,value:a}}const Dw=LP(VP,{uvRatio:KP}),Sk=(()=>{const e=Bx,t=n=>{const{pow_p_5_8:s,b2:r}=K7(n);return st(Ns(s,UP,e)*r,e)};return HP({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:WP,scalarMultBase:n=>{const s=st(n,Dw.Fn.ORDER);if(s===Iw)return Iw;const r=Dw.BASE.multiply(s);return st((r.Z+r.Y)*t(st(r.Z-r.Y,e)),e)}})})(),XP=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);function Zr(e,t,n,s,r){return e=e+t+r|0,s=Mh(s^e,16),n=n+s|0,t=Mh(t^n,12),{a:e,b:t,c:n,d:s}}function Yr(e,t,n,s,r){return e=e+t+r|0,s=Mh(s^e,8),n=n+s|0,t=Mh(t^n,7),{a:e,b:t,c:n,d:s}}function ZP(e,t={},n,s,r){if(Lr(n),e<=0||e>n)throw new Error('"dkLen" must be 1..'+n+", got "+e);const{key:i,salt:a,personalization:l}=t;if(i!==void 0&&(i.length<1||i.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);a!==void 0&&ys(a,s,"salt"),l!==void 0&&ys(l,r,"personalization")}class YP{constructor(t,n){te(this,"buffer");te(this,"buffer32");te(this,"finished",!1);te(this,"destroyed",!1);te(this,"length",0);te(this,"pos",0);te(this,"blockLen");te(this,"outputLen");te(this,"canXOF",!1);Lr(t),Lr(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Nh(this.buffer)}update(t){Ah(this),ys(t);const{blockLen:n,buffer:s,buffer32:r}=this,i=t.length,a=t.byteOffset,l=t.buffer;for(let c=0;c<i;){this.pos===n&&(go(r),this.compress(r,0,!1),go(r),this.pos=0);const u=Math.min(n-this.pos,i-c),d=a+c;if(u===n&&!(d%4)&&c+u<i){const f=new Uint32Array(l,d,Math.floor((i-c)/4));go(f);for(let h=0;c+n<i;h+=r.length,c+=n)this.length+=n,this.compress(f,h,!1);go(f);continue}s.set(c===0&&u===i?t:t.subarray(c,c+u),this.pos),this.pos+=u,this.length+=u,c+=u}return this}digestInto(t){if(Ah(this),S7(t,this),t.byteOffset&3)throw new RangeError('"output" expected 4-byte aligned byteOffset, got '+t.byteOffset);const{pos:n,buffer32:s}=this;this.finished=!0,this.buffer.fill(0,n),go(s),this.compress(s,0,!0),go(s);const r=this.get(),i=t===this.buffer?s:Nh(t),a=Math.floor(this.outputLen/4);for(let d=0;d<a;d++)i[d]=Sc(r[d]);const l=this.outputLen%4;if(!l)return;const c=a*4,u=r[a];for(let d=0;d<l;d++)t[c+d]=u>>>8*d}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){const{buffer:n,length:s,finished:r,destroyed:i,outputLen:a,pos:l}=this;return t||(t=new this.constructor({dkLen:a})),t.set(...this.get()),t.buffer.set(n),t.destroyed=i,t.finished=r,t.length=s,t.pos=l,t.outputLen=a,t}clone(){return this._cloneInto()}}function QP(e,t,n,s,r,i,a,l,c,u,d,f,h,p,m,b,y,g,k,v){let w=0;for(let j=0;j<s;j++)({a:r,b:c,c:h,d:y}=Zr(r,c,h,y,n[t+e[w++]])),{a:r,b:c,c:h,d:y}=Yr(r,c,h,y,n[t+e[w++]]),{a:i,b:u,c:p,d:g}=Zr(i,u,p,g,n[t+e[w++]]),{a:i,b:u,c:p,d:g}=Yr(i,u,p,g,n[t+e[w++]]),{a,b:d,c:m,d:k}=Zr(a,d,m,k,n[t+e[w++]]),{a,b:d,c:m,d:k}=Yr(a,d,m,k,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=Zr(l,f,b,v,n[t+e[w++]]),{a:l,b:f,c:b,d:v}=Yr(l,f,b,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Zr(r,u,m,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Yr(r,u,m,v,n[t+e[w++]]),{a:i,b:d,c:b,d:y}=Zr(i,d,b,y,n[t+e[w++]]),{a:i,b:d,c:b,d:y}=Yr(i,d,b,y,n[t+e[w++]]),{a,b:f,c:h,d:g}=Zr(a,f,h,g,n[t+e[w++]]),{a,b:f,c:h,d:g}=Yr(a,f,h,g,n[t+e[w++]]),{a:l,b:c,c:p,d:k}=Zr(l,c,p,k,n[t+e[w++]]),{a:l,b:c,c:p,d:k}=Yr(l,c,p,k,n[t+e[w++]]);return{v0:r,v1:i,v2:a,v3:l,v4:c,v5:u,v6:d,v7:f,v8:h,v9:p,v10:m,v11:b,v12:y,v13:g,v14:k,v15:v}}const Ft=sP.slice();class JP extends YP{constructor(n={}){n=z7({},n);const s=n.dkLen===void 0?32:n.dkLen;super(64,s);te(this,"v0",Ft[0]|0);te(this,"v1",Ft[1]|0);te(this,"v2",Ft[2]|0);te(this,"v3",Ft[3]|0);te(this,"v4",Ft[4]|0);te(this,"v5",Ft[5]|0);te(this,"v6",Ft[6]|0);te(this,"v7",Ft[7]|0);ZP(s,n,32,8,8);let{key:r,personalization:i,salt:a}=n,l=0;if(r!==void 0&&(ys(r,void 0,"key"),l=r.length),this.v0^=this.outputLen|l<<8|65536|1<<24,a!==void 0){ys(a,void 0,"salt");const c=Nh(ww(a));this.v4^=Sc(c[0]),this.v5^=Sc(c[1])}if(i!==void 0){ys(i,void 0,"personalization");const c=Nh(ww(i));this.v6^=Sc(c[0]),this.v7^=Sc(c[1])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c),$m(c)}}get(){const{v0:n,v1:s,v2:r,v3:i,v4:a,v5:l,v6:c,v7:u}=this;return[n,s,r,i,a,l,c,u]}set(n,s,r,i,a,l,c,u){this.v0=n|0,this.v1=s|0,this.v2=r|0,this.v3=i|0,this.v4=a|0,this.v5=l|0,this.v6=c|0,this.v7=u|0}compress(n,s,r){const i=ZH(this.length),a=XH(this.length),{v0:l,v1:c,v2:u,v3:d,v4:f,v5:h,v6:p,v7:m,v8:b,v9:y,v10:g,v11:k,v12:v,v13:w,v14:j,v15:S}=QP(XP,s,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Ft[0],Ft[1],Ft[2],Ft[3],i^Ft[4],a^Ft[5],r?~Ft[6]:Ft[6],Ft[7]);this.v0^=l^b,this.v1^=c^y,this.v2^=u^g,this.v3^=d^k,this.v4^=f^v,this.v5^=h^w,this.v6^=p^j,this.v7^=m^S}destroy(){this.destroyed=!0,$m(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const Tf=tP(e=>new JP(e));class Lw{constructor(t,n){te(this,"oHash");te(this,"iHash");te(this,"blockLen");te(this,"outputLen");te(this,"canXOF",!1);te(this,"finished",!1);te(this,"destroyed",!1);if(YH(t),ys(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,r=new Uint8Array(s);r.set(n.length>s?t.create().update(n).digest():n);for(let i=0;i<r.length;i++)r[i]^=54;this.iHash.update(r),this.oHash=t.create();for(let i=0;i<r.length;i++)r[i]^=106;this.oHash.update(r),$m(r)}update(t){return Ah(this),this.iHash.update(t),this}digestInto(t){Ah(this),S7(t,this),this.finished=!0;const n=t.subarray(0,this.outputLen);this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:s,finished:r,destroyed:i,blockLen:a,outputLen:l,canXOF:c}=this;return t=t,t.finished=r,t.destroyed=i,t.blockLen=a,t.outputLen=l,t.canXOF=c,t.oHash=n._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const vp=(()=>{const e=(t,n,s)=>new Lw(t,n).update(s).digest();return e.create=(t,n)=>new Lw(t,n),e})(),eU=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),vr=32,Bw=65535,tU=2n**64n-1n,qw=e=>Tf(e,{dkLen:vr}),Dh=(...e)=>{const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t};function Hw(e,t,n){const s=vp(Tf,e,t),r=vp(Tf,s,new Uint8Array([1])),i=vp(Tf,s,Dh(r,new Uint8Array([2])));return[r,i]}function $k(){return Em(Sk.utils.randomSecretKey())}function Em(e){if(e.length!==vr)throw new Error(`X25519 private key must be ${vr} bytes`);return{publicKey:Sk.getPublicKey(e),privateKey:e}}const Lh=(e,t)=>Sk.getSharedSecret(e.privateKey,t);var sl,ha,Cu,Tm;class wp{constructor(){ze(this,Cu);ze(this,sl);ze(this,ha,0n)}setKey(t){Se(this,sl,t),Se(this,ha,0n)}encrypt(t,n=new Uint8Array(0)){const s=G(this,sl);return s===void 0?t:vw(s,V(this,Cu,Tm).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const s=G(this,sl);return s===void 0?t:vw(s,V(this,Cu,Tm).call(this),n).decrypt(t)}}sl=new WeakMap,ha=new WeakMap,Cu=new WeakSet,Tm=function(){if(G(this,ha)===tU)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,G(this,ha),!0),Se(this,ha,G(this,ha)+1n),t};var xa,Qs;class nU{constructor(){ze(this,xa);ze(this,Qs);te(this,"cipher",new wp);const t=eU;Se(this,Qs,t.length<=vr?Dh(t,new Uint8Array(vr-t.length)):qw(t)),Se(this,xa,G(this,Qs).slice())}mixKey(t){const[n,s]=Hw(G(this,xa),t);Se(this,xa,n),this.cipher.setKey(s.subarray(0,vr))}mixHash(t){Se(this,Qs,qw(Dh(G(this,Qs),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,G(this,Qs));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,G(this,Qs));return this.mixHash(t),n}get handshakeHash(){return G(this,Qs)}split(){const[t,n]=Hw(G(this,xa),new Uint8Array(0)),s=new wp;s.setKey(t.subarray(0,vr));const r=new wp;return r.setKey(n.subarray(0,vr)),[s,r]}}xa=new WeakMap,Qs=new WeakMap;function X7(e,t){if(e.offset+t>e.buffer.length)throw new Error("malformed Noise message");const n=e.buffer.subarray(e.offset,e.offset+t);return e.offset+=t,n}function sU(e,t,n,s){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey(Lh(n.ephemeral,s)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey(Lh(n.static,s))}function rU(e,t,n){const s=X7(t,vr).slice();return e.mixHash(s),e.mixKey(Lh(n.ephemeral,s)),e.mixKey(Lh(n.static,s)),s}const Pw=(e,t)=>{if(e.length>Bw)throw new Error(`${t} exceeds ${Bw} bytes`)};function iU(e,t){const n=new nU;return n.mixHash(e),n.mixHash(t),n}function aU(e){const t=e.ephemeral??$k(),n=iU(e.prologue,e.remoteStatic);return{writeMessage1(s){const r=[];sU(n,r,{static:e.static,ephemeral:t},e.remoteStatic),r.push(n.encryptAndHash(s));const i=Dh(...r);return Pw(i,"handshake message"),i},readMessage2(s){Pw(s,"handshake message");const r={buffer:s,offset:0};rU(n,r,{ephemeral:t,static:e.static});const i=n.decryptAndHash(X7(r,s.length-r.offset)),[a,l]=n.split();return{payload:i,result:{send:a,receive:l,handshakeHash:n.handshakeHash}}}}}const oU=new TextEncoder().encode("pinomad/1"),Z7=new TextEncoder,Y7=new TextDecoder("utf-8",{fatal:!0}),lU=e=>Z7.encode(JSON.stringify(e));function cU(e){try{return JSON.parse(Y7.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function uU(e){const t=cU(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const $c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function Ck(e){let t="";for(let n=0;n<e.length;n+=3){const s=e[n],r=e[n+1],i=e[n+2];t+=$c[s>>2]+$c[(s&3)<<4|(r??0)>>4],r!==void 0&&(t+=$c[(r&15)<<2|(i??0)>>6]),i!==void 0&&(t+=$c[i&63])}return t}function Sa(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from($c,(s,r)=>[s,r])),n=[];for(let s=0;s<e.length;s+=4){const i=[...e.slice(s,s+4)].map(l=>{const c=t.get(l);if(c===void 0)throw new Error("invalid base64url");return c}),a=i.reduce((l,c,u)=>l|c<<18-u*6,0);n.push(a>>16&255),i.length>2&&n.push(a>>8&255),i.length>3&&n.push(a&255)}return new Uint8Array(n)}const Xd=65518;var Eu,Tu,rl;class dU{constructor(t){ze(this,Eu);ze(this,Tu);ze(this,rl,[]);Se(this,Eu,t.send),Se(this,Tu,t.receive)}seal(t){const n=Z7.encode(t),s=[];for(let r=0;r<=n.length;r+=Xd){const i=r+Xd>=n.length,a=new Uint8Array(1+Math.min(Xd,n.length-r));if(a[0]=i?0:1,a.set(n.subarray(r,r+Xd),1),s.push(G(this,Eu).encrypt(a)),i)break}return s}open(t){const n=G(this,Tu).decrypt(t),s=n[0];if(s!==0&&s!==1)throw new Error("bad record flag");if(G(this,rl).push(n.subarray(1)),s===1)return;const r=fU(G(this,rl));return Se(this,rl,[]),Y7.decode(r)}}Eu=new WeakMap,Tu=new WeakMap,rl=new WeakMap;function fU(e){const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t}function Q7(e){let t=e.pairing;return{label:e.url,open(n){const s=new WebSocket(e.url);s.binaryType="arraybuffer";const r=aU({prologue:oU,static:e.device,remoteStatic:e.hostKey});let i,a=[],l=!1;const c=(d,f)=>{l||(l=!0,n.closed(d,f))},u=d=>{s.close(),c(1008,d)};return s.onopen=()=>{const d=t===void 0?{v:1}:{v:1,pair:t};s.send(r.writeMessage1(lU(d)))},s.onmessage=d=>{var f;try{const h=d.data instanceof ArrayBuffer?new Uint8Array(d.data):new Uint8Array(d.data);if(i===void 0){const{payload:p,result:m}=r.readMessage2(h);uU(p),i=new dU(m),t!==void 0&&(t=void 0,(f=e.onPaired)==null||f.call(e));const b=a;a=[];for(const y of b)for(const g of i.seal(y))s.send(g)}else{const p=i.open(h);p!==void 0&&n.message(p)}}catch(h){u(h instanceof Error?h.message:"secure channel failure")}},s.onclose=d=>c(d.code,d.reason===""?void 0:d.reason),s.onerror=()=>{},{send(d){if(i===void 0){a.push(d);return}for(const f of i.seal(d))s.send(f)},close(){s.close()}}}}}const zm=e=>{if(typeof e!="string")return!1;try{return Sa(e).length===32}catch{return!1}},hU=e=>{if(typeof e!="string")return!1;try{const t=new URL(e).protocol;return t==="ws:"||t==="wss:"}catch{return!1}},xU=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.serverOrigin=="string"&&t.serverOrigin!==""&&zm(t.hostId)};function J7(e){if(typeof e!="object"||e===null)return;const t=e;if(!hU(t.url)||!zm(t.hostKey)||!zm(t.privateKey))return;const n=xU(t.account)?t.account:void 0;return{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey,...n===void 0?{}:{account:n}}}function pU(e){const t=r=>{try{return new URL(r.url).host}catch{return r.url}},n=new Map;for(const r of e)n.set(t(r),(n.get(t(r))??0)+1);const s=new Map;for(const r of e){const i=t(r);s.set(r.hostKey,n.get(i)>1?`${i} · ${r.hostKey.slice(0,6)}`:i)}return s}function Ek(e){const t=e.indexOf(".");if(t<=0||e.indexOf(".",t+1)!==-1)return;const n=e.slice(0,t),s=e.slice(t+1);try{if(Sa(n).length!==32||Sa(s).length===0)return}catch{return}return{hostKey:n,secret:s}}function e9(e){let t;try{t=new URL(e.trim())}catch{return}const n=new URLSearchParams(t.hash.replace(/^#/,"")),s=n.get("pair");if(s===null||s===""||Ek(s)===void 0)return;let r=n.get("url");if(r===null||r==="")if(t.protocol==="http:")r=`ws://${t.host}/`;else if(t.protocol==="https:")r=`wss://${t.host}/`;else return;else try{const i=new URL(r).protocol;if(i!=="ws:"&&i!=="wss:")return}catch{return}return`pair=${s}&url=${encodeURIComponent(r)}`}const t9=(e,t)=>fetch(e,t),mr=e=>({ok:!0,value:e}),Rs=(e,t)=>({ok:!1,error:{code:e,...t===void 0?{}:{status:t}}}),Zd=e=>e.code==="unauthenticated";async function gU(e,t=t9){const n=new AbortController,s=setTimeout(()=>n.abort(),5e3);try{const r=await t(`${e.replace(/\/+$/,"")}/api/me`,{signal:n.signal});if(r.status===401)return"enabled";if(r.status===200){const i=await r.text();let a;try{a=JSON.parse(i)}catch{return"disabled"}return typeof(a==null?void 0:a.user)=="object"&&a.user!==null?"enabled":"disabled"}return r.status===404?"disabled":"unreachable"}catch{return"unreachable"}finally{clearTimeout(s)}}function mU(e){let t;try{t=new URL(e)}catch{return!1}const n=t.hostname,s=n==="localhost"||n.endsWith(".localhost")||n.startsWith("127.")||n==="::1"||n==="[::1]";return t.protocol==="https:"||t.protocol==="http:"&&s}function Bh(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,"")}}const ta=e=>typeof e=="object"&&e!==null,Uw=e=>{if(!(!ta(e)||!ta(e.user)||typeof e.user.username!="string"))return{user:{username:e.user.username}}};function xc(e){const t=e.fetch??t9,n=Bh(e.origin),s=e.credentials.mode==="bearer"?e.credentials.token:void 0,r=e.credentials.mode==="cookie"?{credentials:"same-origin"}:{},i=async(a,l,c)=>{let u;try{u=await t(`${n}${a}`,{...r,method:l,headers:{...s===void 0?{}:{authorization:`Bearer ${s}`},...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}})}catch{return Rs("network")}const d=await u.json().catch(()=>{});if(u.status>=200&&u.status<300)return mr(d);const f=ta(d)&&typeof d.error=="string"?d.error:u.status===401?"unauthenticated":"unknown";return Rs(f,u.status)};return{origin:n,login:async(a,l)=>{const c=await i("/api/login","POST",{username:a,password:l});if(!c.ok)return c;const u=Uw(c.value);if(u===void 0||!ta(c.value)||typeof c.value.expiresAt!="number")return Rs("invalid_response");const d=c.value.token;return mr({...u,expiresAt:c.value.expiresAt,...typeof d=="string"?{token:d}:{}})},me:async()=>{const a=await i("/api/me","GET");if(!a.ok)return a;const l=Uw(a.value);return l===void 0?Rs("invalid_response"):mr(l)},logout:async()=>{const a=await i("/api/logout","POST");return a.ok?mr(void 0):a},revokeAllSessions:async()=>{const a=await i("/api/sessions/revoke-all","POST");return a.ok?mr(void 0):a},createJoinToken:async()=>{const a=await i("/api/join-tokens","POST");if(!a.ok)return a;const l=a.value;return!ta(l)||typeof l.token!="string"||typeof l.expiresAt!="number"||typeof l.command!="string"?Rs("invalid_response"):mr({token:l.token,expiresAt:l.expiresAt,command:l.command})},listHosts:async()=>{const a=await i("/api/hosts","GET");if(!a.ok)return a;if(!Array.isArray(a.value))return Rs("invalid_response");const l=[];for(const c of a.value){if(!ta(c)||typeof c.hostId!="string"||typeof c.name!="string"||typeof c.noisePublicKey!="string"||typeof c.online!="boolean"||typeof c.lastSeenAt!="number"||c.pairing!=="available"&&c.pairing!=="offline"&&c.pairing!=="host_too_old"&&c.pairing!=="key_mismatch")return Rs("invalid_response");l.push({hostId:c.hostId,name:c.name,noisePublicKey:c.noisePublicKey,online:c.online,lastSeenAt:c.lastSeenAt,pairing:c.pairing})}return mr(l)},requestPairing:async a=>{const l=await i(`/api/hosts/${encodeURIComponent(a)}/pairing`,"POST");if(!l.ok)return l;const c=l.value;return!ta(c)||typeof c.url!="string"||typeof c.hostKey!="string"||typeof c.secret!="string"||typeof c.expiresAt!="number"?Rs("invalid_response"):mr({url:c.url,hostKey:c.hostKey,secret:c.secret,expiresAt:c.expiresAt})}}}function yU(e){return e9(`https://server.invalid/#pair=${e.hostKey}.${e.secret}&url=${encodeURIComponent(e.url)}`)}function kU(e,t,n){const s=Bh(e);return t.map(r=>{const i=n.filter(c=>c.account!==void 0&&Bh(c.account.serverOrigin)===s&&c.account.hostId===r.hostId),a=i.find(c=>c.hostKey===r.noisePublicKey);if(a!==void 0)return{host:r,status:"paired",stored:a,linkable:!1};if(i.length>0)return{host:r,status:"key_changed",stored:i[0],linkable:!1};const l=n.find(c=>c.hostKey===r.noisePublicKey);return l!==void 0?{host:r,status:"paired",stored:l,linkable:l.account===void 0}:{host:r,status:"unpaired",linkable:!1}})}function bU(e){return new Promise((t,n)=>{let s;s=Q7({url:e.url,hostKey:e.hostKey,device:e.device,pairing:{secret:e.secret,name:e.name},onPaired:()=>{t(),s==null||s.close()}}).open({message:()=>{},closed:i=>n(new Error(`pairing connection closed (${i})`))})})}async function vU(e,t,n,s=bU){const r=await e.requestPairing(t);if(!r.ok)return r;const i=yU(r.value);if(i===void 0)return Rs("invalid_offer");const a=new URLSearchParams(i),l=Ek(a.get("pair")),c=a.get("url");if(l===void 0||c===null)return Rs("invalid_offer");const u=$k();try{await s({url:c,hostKey:Sa(l.hostKey),device:u,secret:l.secret,name:n})}catch{return Rs("pair_rejected")}return mr({url:c,hostKey:l.hostKey,privateKey:Ck(u.privateKey),account:{serverOrigin:e.origin,hostId:t}})}const wU="ws://127.0.0.1:7420",$a="pinomad.device";function Tk(e){if(e!==null)try{return J7(JSON.parse(e))}catch{return}}function jU(e,t,n,s){const r=new URLSearchParams(e.replace(/^#/,"")),i=r.get("token");if(i!==null&&i!=="")return{kind:"token",url:r.get("url")??wU,token:i};const a=r.get("pair");if(a!==null){const c=Ek(a);return c===void 0?void 0:{kind:"pair",url:r.get("url")??`${t.protocol==="https:"?"wss":"ws"}://${t.host}/`,hostKey:c.hostKey,secret:c.secret}}if(e.replace(/^#/,"")!=="")return;const l=n.find(c=>c.hostKey===s)??n[0];return l===void 0?void 0:{kind:"device",...l}}function SU(e,t){return new URL(e).host===t.host}function n9(e){const t=/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Mac/.test(e)?"Mac":/Linux/.test(e)?"Linux":void 0,n=/Edg(?:e|A|iOS)?\//.test(e)?"Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)||/HeadlessChrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0,s=[t,n].filter(r=>r!==void 0).join(" ");return s===""?"Browser":s}const wu="pinomad.activeHost",s9="pinomad.hosts",$U=()=>{const e=localStorage.getItem(s9);if(e===null)return[];let t;try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?t.flatMap(n=>{const s=J7(n);return s===void 0?[]:[s]}):[]},Am=e=>{localStorage.setItem(s9,JSON.stringify(e))};function jp(){const e=$U(),t=Tk(localStorage.getItem($a));if(t===void 0)return e;if(e.some(n=>n.hostKey===t.hostKey))return localStorage.removeItem($a),e;try{Am([...e,t]),localStorage.removeItem($a)}catch{}return[...e,t]}const Nm={list:()=>Promise.resolve(jp()),save:e=>(Am([...jp().filter(t=>t.hostKey!==e.hostKey),e]),Promise.resolve()),remove:e=>{Am(jp().filter(n=>n.hostKey!==e));const t=Tk(localStorage.getItem($a));return t!==void 0&&t.hostKey===e&&localStorage.removeItem($a),Promise.resolve()}};function CU(e){let t;const n=async()=>{const s=Tk(localStorage.getItem($a));if(s!==void 0)try{(await e.hosts.list()).some(i=>i.hostKey===s.hostKey)||await e.hosts.save(s),localStorage.removeItem($a);return}catch(r){return console.error("Could not migrate the stored device into the desktop host list",r),s}};return{list:async()=>{const s=await(t??(t=n())),r=await e.hosts.list();return s===void 0||r.some(i=>i.hostKey===s.hostKey)?r:[...r,s]},save:s=>e.hosts.save(s),remove:s=>e.hosts.remove(s)}}function EU(){const e=window.pinomadDesktop;return e===void 0?Nm:CU(e)}const TU={store:Nm,hosts:[],activeHostKey:null,paired:e=>Nm.save(e)},r9=x.createContext(TU),qx=()=>x.useContext(r9);function Xu(e){localStorage.setItem(wu,e),history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}const Xs=e=>({ok:!1,error:{code:e}});function zU(e){const t=new Set;let n={status:"checking"},s,r=e.bridge===void 0?"cookie":"bearer",i;const a=new Set,l=f=>{n=f;for(const h of t)h()},c=()=>{s=void 0,l({status:"signed-out",mode:r,...i===void 0?{}:{serverOrigin:i}})},u=async(f,h)=>{var y,g;const p=await f.listHosts();if(s!==f)return{ok:!1,error:{code:"stale"}};if(!p.ok){if(Zd(p.error))return r==="bearer"&&((g=(y=e.bridge)==null?void 0:y.account)==null||g.clear().catch(()=>{})),c(),p;const k=n.status==="signed-in"?n.hosts:[];return l({status:"signed-in",mode:r,user:h,serverOrigin:f.origin,hosts:k,hostsError:p.error,rejectedHostKeys:[...a]}),p}const m=await e.hosts.list().catch(()=>[]);if(s!==f)return{ok:!1,error:{code:"stale"}};const b=kU(f.origin,p.value,m);for(const k of b)if(k.linkable&&k.stored!==void 0){const v=k.stored;e.hosts.save({...v,account:{serverOrigin:f.origin,hostId:k.host.hostId}}).catch(()=>{})}return l({status:"signed-in",mode:r,user:h,serverOrigin:f.origin,hosts:b,rejectedHostKeys:[...a]}),{ok:!0,value:b}};return(async()=>{var m,b;const f=e.bridge;if(f!==void 0){const y=await((m=f.account)==null?void 0:m.get().catch(()=>{}));if(y===void 0){c();return}i=y.serverOrigin;const g=xc({origin:y.serverOrigin,credentials:{mode:"bearer",token:y.token},fetch:e.fetch}),k=await g.me();if(!k.ok){Zd(k.error)&&((b=f.account)==null||b.clear().catch(()=>{})),c();return}s=g,await u(g,k.value.user.username);return}if(await gU(e.origin,e.fetch)!=="enabled"){l({status:"unavailable"});return}const h=xc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch}),p=await h.me();if(!p.ok){i=e.origin,c();return}s=h,i=e.origin,await u(h,p.value.user.username)})(),{get state(){return n},subscribe:f=>(t.add(f),()=>{t.delete(f)}),login:async({username:f,password:h,serverOrigin:p})=>{var y,g;let m;if(r==="cookie")m=xc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch});else{const k=p??i;if(k===void 0)return Xs("origin_required");if(!mU(k))return Xs("insecure_origin");m=xc({origin:k,credentials:{mode:"bearer"},fetch:e.fetch})}const b=await m.login(f,h);if(!b.ok)return b;if(r==="bearer"){if(b.value.token===void 0)return Xs("invalid_response");m=xc({origin:m.origin,credentials:{mode:"bearer",token:b.value.token},fetch:e.fetch}),i=m.origin,(g=(y=e.bridge)==null?void 0:y.account)==null||g.save({serverOrigin:m.origin,token:b.value.token}).catch(k=>console.error("Could not persist the account session",k))}return s=m,await u(m,b.value.user.username),{ok:!0,value:void 0}},logout:async()=>{var h,p;if(s===void 0)return Xs("unauthenticated");const f=await s.logout();return r==="bearer"&&((p=(h=e.bridge)==null?void 0:h.account)==null||p.clear().catch(()=>{})),c(),f.ok?{ok:!0,value:void 0}:f},revokeAll:async()=>{var h,p;if(s===void 0)return Xs("unauthenticated");const f=await s.revokeAllSessions();return r==="bearer"&&((p=(h=e.bridge)==null?void 0:h.account)==null||p.clear().catch(()=>{})),c(),f.ok?{ok:!0,value:void 0}:f},refreshHosts:async()=>s===void 0||n.status!=="signed-in"?Xs("unauthenticated"):u(s,n.user),createJoinToken:async()=>{if(s===void 0)return Xs("unauthenticated");const f=await s.createJoinToken();return!f.ok&&Zd(f.error)&&c(),f},pairHost:async f=>{if(s===void 0)return Xs("unauthenticated");const h=e.name??(()=>"This device"),p=await vU(s,f,h(),e.connect);if(!p.ok)return Zd(p.error)&&c(),p;a.delete(p.value.hostKey);try{await e.paired(p.value)}catch{return n.status==="signed-in"&&l({...n,unsavedHost:p.value}),{ok:!1,error:{code:"pairing_not_saved"}}}const m=await e.hosts.list().catch(()=>[]);for(const b of m)b.account!==void 0&&Bh(b.account.serverOrigin)===s.origin&&b.account.hostId===f&&b.hostKey!==p.value.hostKey&&e.hosts.remove(b.hostKey).catch(()=>{});return n.status==="signed-in"&&s!==void 0&&await u(s,n.user),p},retryUnsavedHost:async()=>{const f=n.status==="signed-in"?n.unsavedHost:void 0;if(f===void 0)return Xs("nothing_pending");try{await e.paired(f)}catch{return Xs("pairing_not_saved")}return n.status==="signed-in"&&l({...n,unsavedHost:void 0}),{ok:!0,value:void 0}},hostRejected:f=>{a.add(f),n.status==="signed-in"&&l({...n,rejectedHostKeys:[...a]})}}}function AU(){const{store:e,paired:t}=qx(),[n]=x.useState(()=>zU({origin:window.location.origin,bridge:window.pinomadDesktop,hosts:e,paired:t,name:()=>n9(navigator.userAgent)}));return x.useSyncExternalStore(n.subscribe,()=>n.state),n}const Ki=()=>Promise.reject(new Error("no AccountProvider")),NU={state:{status:"unavailable"},subscribe:()=>()=>{},login:Ki,logout:Ki,revokeAll:Ki,refreshHosts:Ki,createJoinToken:Ki,pairHost:Ki,retryUnsavedHost:Ki,hostRejected:()=>{}},i9=x.createContext(NU);function MU({children:e}){const t=AU();return o.jsx(i9.Provider,{value:t,children:e})}function Hx(){const e=x.useContext(i9);return x.useSyncExternalStore(e.subscribe,()=>e.state),e}function Mm(){const[e,t]=x.useState(""),[n,s]=x.useState(),r=()=>{const i=e9(e);if(i===void 0){s(/[#?&]token=/.test(e)?"Token links can't pair a device — paste a pairing link instead (pinomad pair, or Devices → Pair a device).":"That isn't a pairing link — paste one like http://<host>/#pair=… or pinomad://pair#pair=…");return}window.location.hash=i,window.location.reload()};return o.jsxs(o.Fragment,{children:[o.jsxs(we,{gap:2,vAlign:"end",style:{width:"100%"},children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(gs,{label:"Pairing link",isLabelHidden:!0,placeholder:"http://…/#pair=… or pinomad://pair#…",value:e,onChange:i=>{s(void 0),t(i)},onEnter:r,width:"100%"})}),o.jsx(re,{label:"Connect",variant:"primary",isDisabled:e.trim()==="",onClick:r})]}),n===void 0?null:o.jsx(yt,{status:"error",title:"Not a pairing link",description:n})]})}function Zu(e){switch(e.code){case"invalid_credentials":return"Wrong username or password.";case"rate_limited":return"Too many attempts. Wait a few minutes and try again.";case"network":return"Can't reach the server. Check the address and your connection.";case"origin_required":return"Enter the server address.";case"insecure_origin":return"The server address must start with https://.";case"unauthenticated":return"You were signed out. Sign in again.";case"accounts_disabled":return"This server doesn't have accounts turned on.";case"host_offline":return"The host is offline.";case"host_too_old":return"The host needs an update (run pinomad upgrade on it).";case"key_mismatch":return"The host's key doesn't match its account record. Run pinomad join on it again.";case"disabled":return"The host doesn't accept account devices. Turn it on in Devices, or pair with a QR code.";case"not_joined":case"rebinding":return"The host is moving between servers. Try again after it restarts.";case"host_timeout":return"The host didn't answer in time. Try again.";case"pair_rejected":return"The host refused this device. If you revoked it before, pair it with a QR code instead.";case"pairing_not_saved":return"Paired, but this device couldn't save the pairing.";default:return`Something went wrong (${e.code}).`}}function a9(){const e=Hx(),{state:t}=e,[n,s]=x.useState();switch(t.status){case"unavailable":return null;case"checking":return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(on,{size:"sm"}),o.jsx(ee,{type:"supporting",children:"Checking for an account…"})]});case"signed-out":return o.jsxs(fe,{gap:3,style:{width:"100%"},children:[n===void 0?null:o.jsx(yt,{status:"warning",title:"Sign-out not confirmed",description:n}),o.jsx(RU,{account:e,state:t})]});case"signed-in":return o.jsx(IU,{account:e,state:t,onSignOutWarning:s})}}function RU({account:e,state:t}){const n=t.mode==="bearer",[s,r]=x.useState(t.serverOrigin??""),[i,a]=x.useState(""),[l,c]=x.useState(""),[u,d]=x.useState(!1),[f,h]=x.useState(),p=i.trim()!==""&&l!==""&&(!n||s.trim()!==""),m=()=>{!p||u||(d(!0),h(void 0),e.login({username:i.trim(),password:l,...n?{serverOrigin:s.trim()}:{}}).then(b=>{d(!1),b.ok||h(b.error)}))};return o.jsxs(fe,{gap:3,style:{width:"100%"},children:[o.jsxs(fe,{gap:1,children:[o.jsx(Br,{level:3,children:"Sign in"}),o.jsx(ee,{type:"supporting",children:"See the hosts on your account and connect without a QR code."})]}),n?o.jsx(gs,{label:"Server",placeholder:"https://nomad.example.com",value:s,onChange:r,onEnter:m,width:"100%"}):null,o.jsx(gs,{label:"Username",value:i,onChange:a,onEnter:m,width:"100%"}),o.jsx(gs,{label:"Password",type:"password",value:l,onChange:c,onEnter:m,width:"100%"}),f===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't sign in",description:Zu(f)}),o.jsx(re,{label:"Sign in",variant:"primary",isLoading:u,isDisabled:!p,onClick:m})]})}function IU({account:e,state:t,onSignOutWarning:n}){const[s,r]=x.useState(),i=new URL(t.serverOrigin).host,a=l=>{r(void 0),e.retryUnsavedHost().then(c=>{c.ok?Xu(l.hostKey):r(c.error)})};return o.jsxs(fe,{gap:4,style:{width:"100%"},children:[o.jsxs(fe,{gap:1,children:[o.jsx(Br,{level:3,children:t.user}),o.jsxs(ee,{type:"supporting",children:["Signed in to ",i]})]}),t.unsavedHost===void 0?null:o.jsx(yt,{status:"warning",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(re,{label:"Retry",variant:"ghost",onClick:()=>a(t.unsavedHost)})}),o.jsx(_U,{account:e,state:t,onError:r}),s===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't pair",description:Zu(s)}),o.jsx(LU,{account:e}),o.jsx(qU,{account:e,onWarning:n})]})}function _U({account:e,state:t,onError:n}){const s=Wl(3e4),{activeHostKey:r}=qx(),[i,a]=x.useState(),l=c=>{a(c),n(void 0),e.pairHost(c).then(u=>{a(void 0),u.ok?Xu(u.value.hostKey):n(u.error)})};return o.jsxs(fe,{gap:2,children:[o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[o.jsx(ee,{weight:"semibold",children:"Hosts"}),o.jsx(re,{label:"Refresh",variant:"ghost",size:"sm",onClick:()=>void e.refreshHosts()})]}),t.hostsError===void 0?null:o.jsx(yt,{status:"warning",title:"Couldn't refresh hosts",description:Zu(t.hostsError)}),t.hosts.length===0?o.jsx(ee,{type:"supporting",children:"No hosts yet. Add one below."}):o.jsx(ut,{density:"compact",children:t.hosts.map(c=>{var u;return o.jsx(DU,{match:c,now:s,isCurrent:c.status==="paired"&&((u=c.stored)==null?void 0:u.hostKey)===r,isRevoked:c.stored!==void 0&&t.rejectedHostKeys.includes(c.stored.hostKey),isPairing:i===c.host.hostId,isBusy:i!==void 0,onPair:()=>l(c.host.hostId)},c.host.hostId)})})]})}const OU={offline:"Offline",host_too_old:"Needs pinomad upgrade",key_mismatch:"Run pinomad join again"};function DU({match:e,now:t,isCurrent:n,isRevoked:s,isPairing:r,isBusy:i,onPair:a}){const{host:l,status:c,stored:u}=e,d=l.online?"Online":`Last seen ${Dx(l.lastSeenAt,t)}`,f=l.pairing==="available",h=b=>o.jsx(re,{label:b,variant:"secondary",size:"sm",isLoading:r,isDisabled:!f||i,onClick:a});let p=d,m;return s?(p="This device was refused by the host",m=h("Pair again")):c==="key_changed"?(p="The host's identity changed. Pair again only if you reinstalled it.",m=o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(vn,{label:"Key changed",color:"orange",size:"sm"}),h("Pair again")]})):c==="paired"?m=n?o.jsx(vn,{label:"Connected",size:"sm"}):o.jsx(re,{label:"Connect",variant:"secondary",size:"sm",onClick:()=>Xu(u.hostKey)}):(f||(p=`${d} · ${OU[l.pairing]}`),m=h("Pair")),o.jsx(_e,{label:l.name,description:p,startContent:o.jsx(ur,{variant:l.online?"success":"neutral",label:l.online?"Online":"Offline"}),endContent:m})}function LU({account:e}){const[t,n]=x.useState(),[s,r]=x.useState(),[i,a]=x.useState(!1),l=()=>{a(!0),r(void 0),e.createJoinToken().then(c=>{a(!1),c.ok?n(c.value):r(c.error)})};return o.jsxs(fe,{gap:2,children:[t===void 0?o.jsx(re,{label:"Add a host",variant:"secondary",isLoading:i,onClick:l}):o.jsx(BU,{token:t,onRenew:l,onDone:()=>{n(void 0),e.refreshHosts()}}),s===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't create a join command",description:Zu(s)})]})}function BU({token:e,onRenew:t,onDone:n}){const s=Wl(1e3),r=Math.max(0,Math.ceil((e.expiresAt-s)/1e3));return o.jsxs(fe,{gap:2,children:[o.jsx(ee,{weight:"semibold",children:"Add a host"}),o.jsx(ee,{type:"supporting",children:"Run this on the machine you want to add. It installs PiNomad and joins it to your account."}),o.jsx(D0,{code:e.command,hasCopyButton:!0,isWrapped:!0}),o.jsxs(we,{gap:2,vAlign:"center",hAlign:"between",children:[r===0?o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:"Expired"}),o.jsx(re,{label:"New command",variant:"secondary",size:"sm",onClick:t})]}):o.jsxs(ee,{type:"supporting",children:["Works once · expires in ",Math.floor(r/60),":",String(r%60).padStart(2,"0")]}),o.jsx(re,{label:"Done",variant:"ghost",size:"sm",onClick:n})]})]})}function qU({account:e,onWarning:t}){const[n,s]=x.useState(!1);return x.useEffect(()=>{if(!n)return;const r=setTimeout(()=>s(!1),5e3);return()=>clearTimeout(r)},[n]),o.jsxs(fe,{gap:1,children:[o.jsxs(we,{gap:2,children:[o.jsx(re,{label:"Sign out",variant:"ghost",onClick:()=>{t(void 0),e.logout().then(r=>{r.ok||t("Signed out on this device, but the server didn't confirm. The session ends on its own within 30 days.")})}}),o.jsx(re,{label:n?"Sign out everywhere?":"Sign out everywhere",variant:n?"destructive":"ghost",onClick:()=>{if(!n){s(!0);return}t(void 0),e.revokeAll().then(r=>{r.ok||t("Other devices may still be signed in. Sign in and try Sign out everywhere again.")})}})]}),o.jsx(ee,{type:"supporting",children:"Signing out doesn't unpair this device from its hosts. Revoke it in Devices."})]})}function o9({onClose:e}){return o.jsx(js,{isOpen:!0,onOpenChange:t=>t?void 0:e(),width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Account",onOpenChange:()=>e()}),content:o.jsx(es,{children:o.jsx("div",{style:{padding:"var(--spacing-2)"},children:o.jsx(a9,{})})})})})}function l9({onPairAnother:e,onOpenAccount:t}){const{hosts:n,activeHostKey:s}=qx(),r=Hx(),i=pU(n),a=n.find(l=>l.hostKey===s)??n[0];return o.jsxs(Wa,{placement:"above",button:{label:a===void 0?"Hosts":i.get(a.hostKey)??"Hosts",icon:o.jsx(mu,{"aria-hidden":"true"}),variant:"ghost",size:"sm",width:"100%"},children:[o.jsx(h4,{label:"Hosts",value:a==null?void 0:a.hostKey,onChange:Xu,children:n.map(l=>o.jsx(x4,{value:l.hostKey,label:i.get(l.hostKey)},l.hostKey))}),o.jsx(Xc,{label:"Pair another host…",icon:o.jsx(Xo,{"aria-hidden":"true"}),onClick:e}),r.state.status==="unavailable"?null:o.jsx(Xc,{label:"Account…",icon:o.jsx(yH,{"aria-hidden":"true"}),onClick:t})]})}function c9({onClose:e}){return o.jsx(js,{isOpen:!0,onOpenChange:t=>t?void 0:e(),purpose:"form",width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Pair another host",subtitle:"Paste a pairing link from pinomad pair or Devices → Pair a device.",onOpenChange:()=>e()}),content:o.jsx(es,{children:o.jsx(Mm,{})})})})}function u9(){const[e,t]=x.useState(!1),[n,s]=x.useState(!1);return o.jsxs("div",{className:"mt-4 w-80",children:[o.jsx(l9,{onPairAnother:()=>t(!0),onOpenAccount:()=>s(!0)}),e?o.jsx(c9,{onClose:()=>t(!1)}):null,n?o.jsx(o9,{onClose:()=>s(!1)}):null]})}const d9="pinomad.projectSidebar.expanded",HU=()=>{const e=window.localStorage.getItem(d9);if(e===null)return{};try{const t=JSON.parse(e);return Object.fromEntries(Object.entries(t).filter(n=>typeof n[0]=="string"&&typeof n[1]=="boolean"))}catch{return{}}},Fw=e=>{window.localStorage.setItem(d9,JSON.stringify(e))},zk=e=>e.flatMap(t=>[t,...zk(t.children)]);function Gw(e){const t=`pinomad.sidebarSection.${e}.expanded`,[n,s]=x.useState(()=>typeof window>"u"||window.localStorage.getItem(t)!=="false"),r=x.useId();return{expanded:n,contentId:r,toggle:()=>{const a=!n;window.localStorage.setItem(t,String(a)),s(a)}}}function f9({connection:e}){return e==="connected"?o.jsx(ur,{variant:"success",label:"Connected",tooltip:"Connected to the host"}):o.jsx(ur,{variant:e==="closed"?"error":"warning",label:e,tooltip:e,isPulsing:!0})}function PU({connection:e,onCollapse:t,safeLeft:n}){return o.jsxs("div",{className:"pinomad-drag flex h-6 items-center justify-between px-2",style:n===void 0?void 0:{paddingLeft:n},children:[o.jsx(kn,{icon:o.jsx(ym,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:t}),o.jsx(f9,{connection:e})]})}function Vw({view:e,onOpenDevices:t,onOpenSettings:n,onPairHost:s,onOpenAccount:r,onSelect:i}){const a=w7();return o.jsxs(o.Fragment,{children:[(a==null?void 0:a.status.state)==="ready"?o.jsx(Ds,{icon:o.jsx(dH,{"aria-hidden":"true"}),label:"Restart to update","aria-label":`Restart to update${a.status.availableVersion===void 0?"":` to PiNomad ${a.status.availableVersion}`}`,onClick:()=>a.install()}):null,o.jsx(l9,{onPairAnother:()=>{i==null||i(),s()},onOpenAccount:()=>{i==null||i(),r()}}),o.jsx(Ds,{icon:o.jsx(mu,{"aria-hidden":"true"}),label:"Devices",isDisabled:e.connection!=="connected",onClick:()=>{t(),i==null||i()}}),o.jsx(Ds,{icon:o.jsx(hH,{"aria-hidden":"true"}),label:"Settings",isDisabled:e.connection!=="connected",onClick:()=>{n(),i==null||i()}})]})}function Ww({title:e,expanded:t,contentId:n,onToggle:s,actions:r,pinnedActions:i=!1}){return o.jsxs("div",{className:"pigui-sidenav-section-header",children:[o.jsxs("button",{type:"button",className:"pigui-sidenav-section-toggle","aria-label":t?`Collapse ${e}`:`Expand ${e}`,"aria-expanded":t,"aria-controls":n,onClick:s,children:[o.jsx("span",{className:"pigui-sidenav-section-toggle__title",children:e}),o.jsx(Ai,{"aria-hidden":"true",className:"pigui-sidenav-section-toggle__chevron","data-expanded":t?"true":"false"})]}),o.jsx(we,{className:i?void 0:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:r})]})}function Rm(){return o.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}const h9={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function UU({status:e}){const t=e==="needs-answer"?"warning":e==="failed"?"error":"success",n=h9[e];return o.jsx("span",{className:"pigui-session-glyph","aria-hidden":"true",children:o.jsx(ur,{variant:t,label:n,tooltip:n,isPulsing:e!=="failed"})})}function FU({expanded:e}){const t=e?iH:yu;return o.jsxs("span",{"aria-hidden":"true",className:"pigui-project-expansion-indicator","data-expanded":e?"true":"false",children:[o.jsx(t,{className:"pigui-project-expansion-indicator__state"}),o.jsx(Ai,{className:"pigui-project-expansion-indicator__chevron"})]})}function Kw({node:e,shown:t,disabled:n,remote:s,now:r,onSelect:i}){const{summary:a}=e,l=iq(e),c=a7(e),[u,d]=x.useState(!1),f=t!==void 0&&zk([e]).some(p=>p.summary.id===t),h=o.jsx(Ds,{icon:l===void 0?o.jsx(Rm,{}):o.jsx(UU,{status:l}),label:a.title??"New conversation",isSelected:f,isDisabled:n,endContent:o.jsxs(o.Fragment,{children:[c===void 0?null:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-session-meta ms-2 text-xs text-muted",children:Dx(c,r)}),o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"})]}),onClick:()=>{s.controller.switchConversation(a.id),i==null||i()}});return o.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",...l===void 0?{}:{"data-status":l},children:[h,l===void 0?null:o.jsx(Mi,{children:h9[l]}),o.jsx(we,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:o.jsx(Wa,{hasChevron:!1,button:{icon:o.jsx(Ku,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:n},items:[{label:"Rename",icon:o.jsx(y7,{"aria-hidden":"true",size:16}),onClick:()=>d(!0)},{label:"Archive",icon:o.jsx(x7,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(a.id,!0)}]})}),u?o.jsx($H,{summary:a,remote:s,connected:!n,onClose:()=>d(!1)}):null]})}function GU({view:e,remote:t,draftingChat:n,shownId:s,onDraft:r,onSelect:i}){const a=e.connection!=="connected",l=Wl(6e4),[c,u]=x.useState(!1),[d,f]=x.useState(),[h,p]=x.useState(HU),m=Gw("chats"),b=Gw("projects"),y=v=>{r(v),i==null||i()},g=x.useMemo(()=>{var v;return s===void 0||(v=e.organized.projects.find(({conversations:w})=>zk(w).some(j=>j.summary.id===s)))==null?void 0:v.project.path},[s,e.organized.projects]);x.useEffect(()=>{g!==void 0&&p(v=>{if(v[g]!==!1)return v;const w={...v,[g]:!0};return Fw(w),w})},[g]);const k=v=>p(w=>{const j={...w,[v]:!(w[v]??!0)};return Fw(j),j});return o.jsxs(o.Fragment,{children:[o.jsx(of,{isHeaderHidden:!0,title:"New chat",children:o.jsx(Ds,{icon:o.jsx(kH,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:a,onClick:()=>y({kind:"chat"})})}),o.jsxs(of,{isHeaderHidden:!0,title:"Chats",children:[o.jsx(Ww,{title:"Chats",expanded:m.expanded,contentId:m.contentId,onToggle:m.toggle,actions:o.jsx(kn,{icon:o.jsx(Xo,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>y({kind:"chat"})})}),o.jsx(fe,{id:m.contentId,gap:.5,children:m.expanded?e.organized.chats.length===0?o.jsx(Ds,{icon:o.jsx(Rm,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(v=>o.jsx(Kw,{node:v,shown:s,disabled:a,remote:t,now:l,onSelect:i},v.summary.id)):null})]}),o.jsxs(of,{isHeaderHidden:!0,title:"Projects",children:[o.jsx(Ww,{title:"Projects",expanded:b.expanded,contentId:b.contentId,onToggle:b.toggle,pinnedActions:!0,actions:o.jsx(kn,{icon:o.jsx(Xo,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:a,onClick:()=>u(!0)})}),o.jsx(fe,{id:b.contentId,gap:.5,children:b.expanded?e.organized.projects.length===0?o.jsx(Ds,{icon:o.jsx(yu,{"aria-hidden":"true"}),label:"Add project",isDisabled:a,onClick:()=>u(!0)}):e.organized.projects.map(({project:v,conversations:w})=>{const j=h[v.path]??!0;return o.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[o.jsx(Ds,{collapsible:{isCollapsed:!j,onCollapsedChange:()=>k(v.path)},icon:o.jsx(FU,{expanded:j}),label:v.name,isDisabled:a,endContent:o.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:w.length===0?o.jsx(Ds,{icon:o.jsx(Rm,{}),isDisabled:!0,label:"No conversations"}):w.map(S=>o.jsx(Kw,{node:S,shown:s,disabled:a,remote:t,now:l,onSelect:i},S.summary.id))}),o.jsx(we,{className:"pigui-sidenav-row-actions",gap:.5,vAlign:"center",children:o.jsxs(we,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(Xo,{"aria-hidden":"true"}),label:`New conversation in ${v.name}`,size:"sm",variant:"ghost",isDisabled:a,onClick:()=>y({kind:"project",path:v.path})}),o.jsx(Wa,{hasChevron:!1,button:{icon:o.jsx(Ku,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${v.name}`,size:"sm",variant:"ghost",isDisabled:a},items:[{label:"Remove project",icon:o.jsx(mH,{"aria-hidden":"true",size:16}),onClick:()=>f(v)}]})]})})]},v.path)}):null})]}),c?o.jsx(jH,{remote:t,connected:!a,onAdded:v=>{u(!1),y({kind:"project",path:v.path})},onClose:()=>u(!1)}):null,d===void 0?null:o.jsx(SH,{project:d,remote:t,connected:!a,onClose:()=>f(void 0)})]})}var na=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(na||{});const VU=[0,1],x9=[1,0],p9=[2,3],g9=[3,2],WU={L:VU,M:x9,Q:p9,H:g9},KU=/^\d*$/,XU=/^[A-Z0-9 $%*+./:-]*$/,Sp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Ak=1,Nk=40,Xw=3,ZU=3,Yd=40,YU=10,m9=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],y9=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class QU{constructor(t,n,s,r){te(this,"size");te(this,"mask");te(this,"modules",[]);te(this,"types",[]);if(this.version=t,this.ecc=n,t<Ak||t>Nk)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),r===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);const u=this.getPenaltyScore();u<l&&(r=c,l=u),this.applyMask(c)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let s=0;s<this.size;s++)this.setFunctionModule(6,s,s%2===0,na.Timing),this.setFunctionModule(s,6,s%2===0,na.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let s=0;s<n;s++)for(let r=0;r<n;r++)s===0&&r===0||s===0&&r===n-1||s===n-1&&r===0||this.drawAlignmentPattern(t[s],t[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.ecc[1]<<3|t;let s=n;for(let i=0;i<10;i++)s=s<<1^(s>>>9)*1335;const r=(n<<10|s)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,gr(r,i));this.setFunctionModule(8,7,gr(r,6)),this.setFunctionModule(8,8,gr(r,7)),this.setFunctionModule(7,8,gr(r,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,gr(r,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,gr(r,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,gr(r,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let s=0;s<12;s++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let s=0;s<18;s++){const r=gr(n,s),i=this.size-11+s%3,a=Math.floor(s/3);this.setFunctionModule(i,a,r),this.setFunctionModule(a,i,r)}}drawFinderPattern(t,n){for(let s=-4;s<=4;s++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(s)),a=t+r,l=n+s;a>=0&&a<this.size&&l>=0&&l<this.size&&this.setFunctionModule(a,l,i!==2&&i!==4,na.Position)}}drawAlignmentPattern(t,n){for(let s=-2;s<=2;s++)for(let r=-2;r<=2;r++)this.setFunctionModule(t+r,n+s,Math.max(Math.abs(r),Math.abs(s))!==1,na.Alignment)}setFunctionModule(t,n,s,r=na.Function){this.modules[n][t]=s,this.types[n][t]=r}addEccAndInterleave(t){const n=this.version,s=this.ecc;if(t.length!==zf(n,s))throw new RangeError("Invalid argument");const r=y9[s[0]][n],i=m9[s[0]][n],a=Math.floor(Im(n)/8),l=r-a%r,c=Math.floor(a/r),u=[],d=oF(i);for(let h=0,p=0;h<r;h++){const m=t.slice(p,p+c-i+(h<l?0:1));p+=m.length;const b=lF(m,d);h<l&&m.push(0),u.push(m.concat(b))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==c-i||m>=l)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(Im(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let s=this.size-1;s>=1;s-=2){s===6&&(s=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const a=s-i,c=(s+1&2)===0?this.size-1-r:r;!this.types[c][a]&&n<t.length*8&&(this.modules[c][a]=gr(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let s=0;s<this.size;s++){let r;switch(t){case 0:r=(s+n)%2===0;break;case 1:r=n%2===0;break;case 2:r=s%3===0;break;case 3:r=(s+n)%3===0;break;case 4:r=(Math.floor(s/3)+Math.floor(n/2))%2===0;break;case 5:r=s*n%2+s*n%3===0;break;case 6:r=(s*n%2+s*n%3)%2===0;break;case 7:r=((s+n)%2+s*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][s]&&r&&(this.modules[n][s]=!this.modules[n][s])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let a=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[i][u]===a?(l++,l===5?t+=Xw:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*Yd),a=this.modules[i][u],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*Yd}for(let i=0;i<this.size;i++){let a=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][i]===a?(l++,l===5?t+=Xw:l>5&&t++):(this.finderPenaltyAddHistory(l,c),a||(t+=this.finderPenaltyCountPatterns(c)*Yd),a=this.modules[u][i],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,c)*Yd}for(let i=0;i<this.size-1;i++)for(let a=0;a<this.size-1;a++){const l=this.modules[i][a];l===this.modules[i][a+1]&&l===this.modules[i+1][a]&&l===this.modules[i+1][a+1]&&(t+=ZU)}let n=0;for(const i of this.modules)n=i.reduce((a,l)=>a+(l?1:0),n);const s=this.size*this.size,r=Math.ceil(Math.abs(n*20-s*10)/s)-1;return t+=r*YU,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,s=[6];for(let r=this.size-7;s.length<t;r-=n)s.splice(1,0,r);return s}}finderPenaltyCountPatterns(t){const n=t[1],s=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(s&&t[0]>=n*4&&t[6]>=n?1:0)+(s&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,s){return t&&(this.finderPenaltyAddHistory(n,s),n=0),n+=this.size,this.finderPenaltyAddHistory(n,s),this.finderPenaltyCountPatterns(s)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function wr(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function gr(e,t){return(e>>>t&1)!==0}class Mk{constructor(t,n,s){if(this.mode=t,this.numChars=n,this.bitData=s,n<0)throw new RangeError("Invalid argument");this.bitData=s.slice()}getData(){return this.bitData.slice()}}const JU=[1,10,12,14],eF=[2,9,11,13],tF=[4,8,16,16];function k9(e,t){return e[Math.floor((t+7)/17)+1]}function b9(e){const t=[];for(const n of e)wr(n,8,t);return new Mk(tF,e.length,t)}function nF(e){if(!v9(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n<e.length;){const s=Math.min(e.length-n,3);wr(Number.parseInt(e.substring(n,n+s),10),s*3+1,t),n+=s}return new Mk(JU,e.length,t)}function sF(e){if(!w9(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let n;for(n=0;n+2<=e.length;n+=2){let s=Sp.indexOf(e.charAt(n))*45;s+=Sp.indexOf(e.charAt(n+1)),wr(s,11,t)}return n<e.length&&wr(Sp.indexOf(e.charAt(n)),6,t),new Mk(eF,e.length,t)}function rF(e){return e===""?[]:v9(e)?[nF(e)]:w9(e)?[sF(e)]:[b9(aF(e))]}function v9(e){return KU.test(e)}function w9(e){return XU.test(e)}function iF(e,t){let n=0;for(const s of e){const r=k9(s.mode,t);if(s.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+s.bitData.length}return n}function aF(e){e=encodeURI(e);const t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function Im(e){if(e<Ak||e>Nk)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function zf(e,t){return Math.floor(Im(e)/8)-m9[t[0]][e]*y9[t[0]][e]}function oF(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let s=0;s<e-1;s++)t.push(0);t.push(1);let n=1;for(let s=0;s<e;s++){for(let r=0;r<t.length;r++)t[r]=_m(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=_m(n,2)}return t}function lF(e,t){const n=t.map(s=>0);for(const s of e){const r=s^n.shift();n.push(0),t.forEach((i,a)=>n[a]^=_m(i,r))}return n}function _m(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^(n>>>7)*285,n^=(t>>>s&1)*e;return n}function cF(e,t,n=1,s=40,r=-1,i=!0){if(!(Ak<=n&&n<=s&&s<=Nk)||r<-1||r>7)throw new RangeError("Invalid value");let a,l;for(a=n;;a++){const f=zf(a,t)*8,h=iF(e,a);if(h<=f){l=h;break}if(a>=s)throw new RangeError("Data too long")}for(const f of[x9,p9,g9])i&&l<=zf(a,f)*8&&(t=f);const c=[];for(const f of e){wr(f.mode[0],4,c),wr(f.numChars,k9(f.mode,a),c);for(const h of f.getData())c.push(h)}const u=zf(a,t)*8;wr(0,Math.min(4,u-c.length),c),wr(0,(8-c.length%8)%8,c);for(let f=236;c.length<u;f^=253)wr(f,8,c);const d=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new QU(a,t,d,r)}function uF(e,t){var f;const{ecc:n="L",boostEcc:s=!1,minVersion:r=1,maxVersion:i=40,maskPattern:a=-1,border:l=1}=t||{},c=typeof e=="string"?rF(e):Array.isArray(e)?[b9(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=cF(c,WU[n],r,i,a,s),d=dF({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return t!=null&&t.invert&&(d.data=d.data.map(h=>h.map(p=>!p))),(f=t==null?void 0:t.onEncoded)==null||f.call(t,d),d}function dF(e,t=1){if(!t)return e;const{size:n}=e,s=n+t*2;e.size=s,e.data.forEach(i=>{for(let a=0;a<t;a++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:s},a=>!1)),e.data.push(Array.from({length:s},a=>!1));const r=na.Border;e.types.forEach(i=>{for(let a=0;a<t;a++)i.unshift(r),i.push(r)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:s},a=>r)),e.types.push(Array.from({length:s},a=>r));return e}const j9={off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0},Om=Object.keys(j9),fF=e=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(j9,e),S9={conversations:0,index:0,devices:0,mcp:0,models:1,auth:1,settings:2,agents:6},Rk=Object.keys(S9);function Zw(e){return Rk.filter(t=>S9[t]<=e)}const $p=e=>`conversation:${e}`,Yw=(e,t)=>`doc:${e}:${t}`,Qw=4401,hF=4400,Cp={major:5},xF={logout:1,updateSettings:2,listFolders:3,renameConversation:4,createAgent:6,updateAgent:6,deleteAgent:6,setPushToken:7,listFiles:10};function os(e,t){return e>=(xF[t]??0)}const pF={images:5,acceptAccountDevices:8,apnsPush:9,agentConversations:10};function sa(e,t){return e>=pF[t]}[...Rk];function gF({view:e,remote:t,self:n,onClose:s}){const r=e.connection==="connected",i=n===void 0?void 0:Ck(n.publicKey),[a,l]=x.useState(),[c,u]=x.useState(),d=()=>{u(void 0),t.controller.createPairing().then(l,f=>{u(f instanceof Error?f.message:String(f))})};return o.jsx(js,{isOpen:!0,onOpenChange:f=>f?void 0:s(),width:440,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Devices",subtitle:"Paired devices can reach this host over the secure channel.",onOpenChange:()=>s()}),content:o.jsx(es,{children:o.jsxs(fe,{gap:4,padding:2,children:[e.devices.length===0?o.jsx(ee,{type:"supporting",children:"No paired devices."}):o.jsx(ut,{density:"compact",children:e.devices.map(f=>o.jsx(kF,{device:f,isSelf:f.publicKey===i,connected:r,remote:t},f.publicKey))}),o.jsx(mF,{view:e,remote:t}),c===void 0?null:o.jsx(yt,{status:"error",title:"Could not create a pairing offer",description:c}),a===void 0?o.jsx(re,{label:"Pair a device",variant:"secondary",isDisabled:!r,onClick:d}):o.jsx(bF,{url:a.url,expiresAt:a.expiresAt,onRenew:d})]})})})})}function mF({view:e,remote:t}){var s;const n=(s=e.host)==null?void 0:s.protocol.minor;return e.settings===null||n===void 0||!sa(n,"acceptAccountDevices")?null:o.jsx(b6,{label:"Accept devices from your account",description:"Devices signed in to the server this host joined can pair without a QR code. Turn off to allow QR codes only.",value:e.settings.acceptAccountDevices,isDisabled:e.connection!=="connected",onChange:r=>void t.controller.updateSettings({acceptAccountDevices:r})})}const yF={account:"via account",qr:"via QR code",local:"on this machine"};function kF({device:e,isSelf:t,connected:n,remote:s}){const r=e.source===void 0?"":` ${yF[e.source]}`;return o.jsx(_e,{label:e.name,description:`Paired${r} · ${new Date(e.pairedAt).toLocaleDateString()}`,endContent:o.jsxs(we,{gap:2,vAlign:"center",children:[t?o.jsx(vn,{label:"This device",size:"sm"}):null,o.jsx(re,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void s.controller.revokeDevice(e.publicKey)})]})})}function bF({url:e,expiresAt:t,onRenew:n}){const[s,r]=x.useState(Date.now());x.useEffect(()=>{const l=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(l)},[]);const i=Math.max(0,Math.ceil((t-s)/1e3));if(i===0)return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:"Expired"}),o.jsx(re,{label:"New code",variant:"secondary",size:"sm",onClick:n})]});const a=new URL(e).hostname==="127.0.0.1";return o.jsxs(fe,{gap:3,hAlign:"center",children:[a?null:o.jsx(vF,{text:e}),o.jsx(ee,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),a?o.jsx(ee,{type:"supporting",children:"This link only works on this machine — paste it into the desktop app. To pair a phone, start the host with --remote-port or --relay."}):null,o.jsxs(ee,{type:"supporting",children:["Expires in ",Math.floor(i/60),":",String(i%60).padStart(2,"0")]})]})}const Ep=2;function vF({text:e}){const t=x.useMemo(()=>uF(e,{border:0}),[e]),n=t.size+Ep*2;return o.jsxs("svg",{role:"img","aria-label":"Pairing QR code",viewBox:`0 0 ${n} ${n}`,width:200,height:200,style:{display:"block"},children:[o.jsx("rect",{width:n,height:n,fill:"#ffffff"}),o.jsx("path",{shapeRendering:"crispEdges",fill:"#000000",d:t.data.flatMap((s,r)=>s.map((i,a)=>i?`M${a+Ep} ${r+Ep}h1v1h-1z`:"")).filter(s=>s!=="").join("")})]})}const Jw=32,e5=1024,wF=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function $9(e){return e.length>Jw||!wF.test(e)?`Name must be lowercase letters, digits and hyphens (max ${Jw})`:void 0}function jF(e){const t=$9(e.name);if(t!==void 0)return t;const n=e.description.trim();if(n==="")return"description is required";if(n.length>e5)return`description is too long (max ${e5})`;if(e.model!==void 0){const s=e.model.indexOf("/");if(s<=0||s===e.model.length-1)return"model must be provider/modelId"}if(e.thinkingLevel!==void 0&&!fF(e.thinkingLevel))return`thinkingLevel must be one of ${Om.join(", ")}`}const ju={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},Tp=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId,t5=["off","minimal","low","medium","high","xhigh","max"],qh=(e,t)=>{if(e.includes(t))return t;const n=t5.indexOf(t);return e.filter(s=>t5.indexOf(s)<=n).at(-1)??"off"},ks=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function SF(e,t){var i;const n=ks(e,t.model),s=(n==null?void 0:n.thinkingLevels)??["off"],r=(n==null?void 0:n.name)??((i=t.model)==null?void 0:i.modelId)??"No model";return s.length>1?`${r} · ${ju[t.level]}`:r}function $F(e,t){const n=t.trim().toLowerCase();return n===""?e:e.filter(s=>s.name.toLowerCase().includes(n)||`${s.provider}/${s.modelId}`.toLowerCase().includes(n))}function CF(e,t,n){var i;const s=n.model!==void 0&&ks(e,n.model)!==void 0?n.model:ks(e,t.model)!==void 0?t.model:e[0]===void 0?void 0:{provider:e[0].provider,modelId:e[0].modelId},r=qh(((i=ks(e,s))==null?void 0:i.thinkingLevels)??["off"],n.level);return{model:s,level:r}}const EF=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function TF(e,t,n,s,r){var b;const i=t==null?void 0:t.roles.find(y=>y.name===e),a=i===void 0||i.model===void 0?void 0:EF(i.model),l=r.model??a??s.model,c=r.model!==void 0?"override":a!==void 0?"agent":s.model!==void 0?"default":void 0,u=r.level!==void 0?"override":(i==null?void 0:i.thinkingLevel)!==void 0?"agent":"default",d=r.level??(i==null?void 0:i.thinkingLevel)??s.thinkingLevel??"off",f=ks(n,l),h=f===void 0?d:qh(f.thinkingLevels,d),p=(b=t==null?void 0:t.problems.find(y=>y.file===`${e}.md`))==null?void 0:b.reason,m=i===void 0?{kind:"agent-missing",agent:e,...p===void 0?{}:{reason:p}}:l===void 0?{kind:"model-missing",agent:e}:f===void 0?{kind:"model-unavailable",agent:e,model:l,source:c}:void 0;return{...l===void 0?{}:{model:l},level:h,...c===void 0?{}:{modelFrom:c},levelFrom:u,send:{agent:e,...r.model===void 0?{}:{model:r.model},...r.level===void 0?{}:{thinkingLevel:r.level}},...m===void 0?{}:{problem:m}}}function Ik({models:e,selected:t,isDisabled:n=!1,sourceHint:s,problem:r,onModelChange:i,onLevelChange:a}){const[l,c]=x.useState(""),u=e.find(h=>Tp(h,t.model)),d=(u==null?void 0:u.thinkingLevels)??["off"],f=$F(e,l);return o.jsx(_0,{alignment:"start",label:"Model and Thinking",placement:"above",width:236,content:o.jsxs("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"model-thinking-popover",onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),onPointerDown:h=>h.stopPropagation(),children:[o.jsx(gs,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",size:"sm",value:l,width:"100%",onChange:h=>c(h)}),o.jsx(ut,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:f.map(h=>o.jsx(_e,{description:h.provider,endContent:Tp(h,t.model)?o.jsx(Ch,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:Tp(h,t.model),label:h.name,onClick:()=>i({provider:h.provider,modelId:h.modelId})},`${h.provider}/${h.modelId}`))}),d.length>1?o.jsxs("div",{"aria-label":"Thinking",role:"group",children:[o.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:"Thinking"}),o.jsx(ut,{density:"compact",children:d.map(h=>o.jsx(_e,{endContent:h===t.level?o.jsx(Ch,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:ju[h],onClick:()=>a(h)},h))})]}):null]}),children:o.jsx(re,{className:"min-w-0 max-w-[19rem] flex-nowrap gap-1.5 px-2 text-muted","data-testid":"model-thinking-trigger",isDisabled:n||e.length===0,label:"Model and Thinking",size:"sm",variant:"ghost",...r===void 0?{}:{tooltip:r.title},children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[r===void 0?o.jsx("span",{className:"truncate",children:SF(e,t)}):o.jsx("span",{className:"truncate text-danger",children:r.label}),s===void 0||r!==void 0?null:o.jsx("span",{className:"shrink-0 truncate text-xs text-muted",children:s}),o.jsx(xk,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}const ss="",n5=e=>`${e.provider}/${e.modelId}`,s5=e=>{const t=e.indexOf("/");if(!(t<=0||t===e.length-1))return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function zF({view:e,remote:t,connected:n,role:s,onClose:r}){const i=s!==void 0,[a,l]=x.useState((s==null?void 0:s.name)??""),[c,u]=x.useState((s==null?void 0:s.description)??""),[d,f]=x.useState((s==null?void 0:s.model)??ss),[h,p]=x.useState((s==null?void 0:s.thinkingLevel)??ss),[m,b]=x.useState((s==null?void 0:s.prompt)??""),[y,g]=x.useState(!1),[k,v]=x.useState(void 0),w=d===ss?void 0:ks(e.models,s5(d)),j=[{value:ss,label:"Don't pin — use the caller's model"},...e.models.map($=>({value:n5($),label:`${$.name} (${n5($)})`})),...d!==ss&&w===void 0?[{value:d,label:`${d} (not available)`}]:[]],S=w===void 0?Om:w.thinkingLevels,C=[{value:ss,label:"Don't pin"},...S.map($=>({value:$,label:ju[$]})),...h!==ss&&!S.includes(h)?[{value:h,label:`${ju[h]} (not supported by this model)`}]:[]],E=$=>{f($);const N=$===ss?void 0:ks(e.models,s5($)),A=N===void 0?Om:N.thinkingLevels;h!==ss&&!A.includes(h)&&p(ss)},T=()=>{const $={name:a.trim(),description:c.trim(),...d===ss?{}:{model:d},...h===ss?{}:{thinkingLevel:h},prompt:m.trim()},N=jF($);if(N!==void 0){v(N);return}g(!0),v(void 0),(i?t.controller.updateAgent($):t.controller.createAgent($)).then(()=>r(),A=>{g(!1),v(A instanceof Error?A.message:String(A))})};return o.jsx(js,{isOpen:!0,onOpenChange:$=>$?void 0:r(),purpose:"form",width:480,"aria-label":i?`Edit ${s.name}`:"New agent",children:o.jsx(Jn,{header:o.jsx(Ss,{title:i?`Edit ${s.name}`:"New agent",onOpenChange:()=>r()}),content:o.jsx(es,{children:o.jsxs(fe,{gap:4,children:[o.jsx(fe,{gap:1,children:o.jsx(gs,{label:"Name",value:a,onChange:l,isDisabled:y||i,hasAutoFocus:!i,description:i?"The name is the file name and can't be changed.":void 0})}),o.jsx(gs,{label:"Description",value:c,onChange:u,isDisabled:y}),o.jsx(Zc,{label:"Model",value:d,options:j,onChange:E,isDisabled:y}),o.jsx(Zc,{label:"Thinking level",value:h,options:C,onChange:$=>p($),isDisabled:y}),o.jsx(j6,{label:"Prompt",value:m,onChange:b,isDisabled:y,rows:4}),k===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:k})]})}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:r}),o.jsx(re,{label:"Save",variant:"primary",isDisabled:!n||y,onClick:T})]})})})})}const Dm=[{id:"providers",title:"Providers",icon:lH},{id:"models",title:"Models",icon:xH},{id:"agents",title:"Agents",icon:hk},{id:"mcp",title:"MCP",icon:uH},{id:"chats",title:"Chats",icon:sH},{id:"archived",title:"Archived",icon:x7},{id:"about",title:"About",icon:oH}],AF=e=>Dm.find(t=>t.id===e).title,r5=e=>o.jsx(e,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}});function NF({view:e,remote:t,onClose:n}){const s=Ha("(max-width: 640px)"),[r,i]=x.useState(void 0),a=e.connection==="connected",l=r??"providers",c=o.jsx(y0,{padding:2,width:"calc(var(--spacing-10) * 7)",hasDivider:!0,children:o.jsx(fy,{"aria-label":"Settings sections",style:{width:"100%"},children:o.jsx(fe,{gap:1,children:Dm.map(d=>o.jsx(Ds,{label:d.title,icon:r5(d.icon),isSelected:d.id===l,onClick:()=>i(d.id)},d.id))})})}),u=o.jsx(ut,{density:"compact",children:Dm.map(d=>o.jsx(_e,{label:d.title,startContent:r5(d.icon),endContent:o.jsx(Ai,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}}),onClick:()=>i(d.id)},d.id))});return o.jsx(js,{"aria-label":"Settings",isOpen:!0,onOpenChange:d=>d?void 0:n(),purpose:"form",width:"calc(var(--spacing-10) * 22)",maxHeight:"90dvh",variant:s?"fullscreen":"standard",padding:4,children:o.jsx(Jn,{padding:4,style:{height:s?"100dvh":"min(85dvh, calc(var(--spacing-10) * 17))"},header:o.jsx(Ss,{title:s&&r!==void 0?AF(r):"Settings",startContent:s&&r!==void 0?o.jsx(kn,{label:"Back",icon:o.jsx(p7,{}),variant:"ghost",style:{marginBlock:"calc(-1 * var(--spacing-2))"},onClick:()=>i(void 0)}):void 0,onOpenChange:()=>n(),hasDivider:!0}),start:s?void 0:c,content:o.jsx(es,{padding:s?4:6,children:s&&r===void 0?u:o.jsx(MF,{view:e,remote:t,connected:a,section:l,showTitle:!s})})})})}function MF({view:e,remote:t,connected:n,section:s,showTitle:r}){const{title:i,supporting:a,body:l}=RF(e,t,n,s),c=`settings-${s}-heading`;return o.jsxs(fe,{as:"section",...r?{"aria-labelledby":c}:{"aria-label":i},gap:3,children:[o.jsxs(fe,{gap:2,children:[r?o.jsx(Br,{level:2,id:c,children:i}):null,a]}),l]})}function RF(e,t,n,s){switch(s){case"providers":return{title:"Providers",supporting:o.jsxs(ee,{as:"p",type:"supporting",children:["Logins are stored on the host in Pi's ",o.jsx("code",{children:"auth.json"}),". Log in with the Pi CLI on the host — logging out here signs the Pi CLI out too. Every device connected to this host sees the same logins."]}),body:o.jsx(IF,{view:e,remote:t,connected:n})};case"models":return{title:"Models",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"Used when a new conversation doesn't pick its own model."}),body:o.jsx(_F,{view:e,remote:t,connected:n})};case"agents":return{title:"Agents",supporting:o.jsxs(ee,{as:"p",type:"supporting",children:["Named agents the model can delegate to with ",o.jsx("code",{children:"subagent"})," — mention one with ",o.jsx("code",{children:"@name"}),"."," ","Each is a Markdown file in"," ",o.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/agents/"]}),"; edits to those files apply immediately."]}),body:o.jsx(qF,{view:e,remote:t,connected:n})};case"mcp":return{title:"MCP",body:o.jsx(LF,{view:e})};case"chats":return{title:"Chats",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"How queued messages are delivered when the agent reaches the next turn."}),body:o.jsx(OF,{view:e,remote:t,connected:n})};case"archived":return{title:"Archived",supporting:o.jsx(ee,{as:"p",type:"supporting",children:"Archived conversations are hidden from the sidebar. Restoring one brings it back with its forks and subagents; a worktree removed on archive is checked out again from its branch."}),body:o.jsx(DF,{view:e,remote:t,connected:n})};case"about":return{title:"About",body:o.jsx(BF,{view:e})}}}function IF({view:e,remote:t,connected:n}){const s=e.auth;if(s===null)return o.jsx(yt,{status:"warning",title:"This host is too old for logins",description:"Run `pinomad upgrade` on the host."});const r=s.logins;return o.jsx(fe,{gap:3,children:r.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No stored logins. Log in with the Pi CLI on the host."}):o.jsxs(o.Fragment,{children:[o.jsx(ee,{as:"p",type:"supporting",children:`${r.length} provider${r.length===1?"":"s"} logged in`}),r.map(i=>o.jsx(GF,{login:i,connected:n,remote:t},i.providerId))]})})}function _F({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):o.jsxs(we,{gap:2,vAlign:"center",wrap:"wrap",children:[o.jsx(Ik,{models:e.models,selected:{model:s.defaultModel??void 0,level:s.defaultThinkingLevel??"off"},isDisabled:!n,onModelChange:r=>void t.controller.updateSettings({defaultModel:r}),onLevelChange:r=>void t.controller.updateSettings({defaultThinkingLevel:r})}),s.custom.includes("defaultModel")||s.custom.includes("defaultThinkingLevel")?o.jsx(re,{label:"Use pi's defaults",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({defaultModel:null,defaultThinkingLevel:null})}):null]})}function OF({view:e,remote:t,connected:n}){const s=e.settings;return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):o.jsxs(fe,{gap:4,children:[o.jsx(i5,{title:"Steer messages",value:s.steeringMode,customized:s.custom.includes("steeringMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({steeringMode:r}),onReset:()=>void t.controller.updateSettings({steeringMode:null})}),o.jsx(i5,{title:"Follow-up messages",value:s.followUpMode,customized:s.custom.includes("followUpMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({followUpMode:r}),onReset:()=>void t.controller.updateSettings({followUpMode:null})})]})}function DF({view:e,remote:t,connected:n}){const s=Wl(6e4),r=e.organized.archived;return r.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No archived conversations."}):o.jsx(ut,{density:"compact",children:r.map(({node:i,project:a})=>{const l=i.summary.title??"New conversation",c=a7(i);return o.jsx(_e,{label:l,description:[(a==null?void 0:a.name)??"Chat",c===void 0?void 0:Dx(c,s)].filter(u=>u!==void 0).join(" · "),endContent:o.jsx(re,{label:`Restore ${l}`,variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>void t.controller.archive(i.summary.id,!1),children:"Restore"})},i.summary.id)})})}function LF({view:e}){const t=e.mcp;return t===null?o.jsx(ee,{as:"p",type:"supporting",children:"Loading…"}):o.jsxs(fe,{gap:3,children:[o.jsx(ee,{as:"p",type:"supporting",style:{userSelect:"all"},children:t.configPath}),t.servers.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No servers configured."}):o.jsx(ut,{density:"compact",children:t.servers.map(n=>o.jsx(_e,{label:n.name,endContent:o.jsx(vn,{label:n.state,size:"sm"})},n.name))})]})}function BF({view:e}){const t=e.host;return o.jsxs(fe,{gap:3,children:[o.jsxs(ut,{density:"compact",children:[o.jsx(_e,{label:"Host version",description:(t==null?void 0:t.version)??"Source checkout"}),o.jsx(_e,{label:"Protocol",description:t===void 0?"—":`${t.protocol.major}.${t.protocol.minor}`}),o.jsx(_e,{label:"Data directory",description:o.jsx("span",{style:{wordBreak:"break-all",userSelect:"all"},children:e.session.directory})}),o.jsx(_e,{label:"Settings file",description:o.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/settings.json"]})})]}),o.jsx(ee,{as:"p",type:"supporting",children:"Edit the settings file by hand only while the host is stopped."})]})}function i5({title:e,value:t,customized:n,disabled:s,onChange:r,onReset:i}){return o.jsxs(fe,{gap:1,children:[o.jsx(ee,{children:e}),o.jsxs(we,{gap:2,vAlign:"center",wrap:"wrap",children:[o.jsxs(v6,{className:"shrink-0",value:t,onChange:a=>r(a),label:e,size:"sm",isDisabled:s,children:[o.jsx(sg,{value:"one-at-a-time",label:"One at a time"}),o.jsx(sg,{value:"all",label:"All at once"})]}),n?o.jsx(re,{label:"Use pi's default",variant:"ghost",size:"sm",isDisabled:s,onClick:i}):null]})]})}function qF({view:e,remote:t,connected:n}){const s=e.agents,[r,i]=x.useState(void 0);return s===null?o.jsx(yt,{status:"warning",title:"This host is too old for named agents",description:"Run `pinomad upgrade` on the host."}):o.jsxs(fe,{gap:3,children:[o.jsx(we,{gap:2,vAlign:"center",children:o.jsx(re,{label:"New agent",variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>i({mode:"create"})})}),s.roles.length===0&&s.problems.length===0?o.jsx(ee,{as:"p",type:"supporting",children:"No named agents yet."}):null,s.roles.map(a=>o.jsx(PF,{role:a,view:e,remote:t,connected:n,onEdit:()=>i({mode:"edit",role:a})},a.name)),s.problems.map(a=>o.jsx(UF,{problem:a,remote:t,connected:n},a.file)),r===void 0?null:o.jsx(zF,{view:e,remote:t,connected:n,...r.mode==="edit"?{role:r.role}:{},onClose:()=>i(void 0)})]})}const HF=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function PF({role:e,view:t,remote:n,connected:s,onEdit:r}){const[i,a]=x.useState(!1),[l,c]=x.useState(void 0),u=e.model===void 0?void 0:ks(t.models,HF(e.model)),d=()=>{n.controller.deleteAgent(e.name).catch(f=>{c(f instanceof Error?f.message:String(f))})};return o.jsxs(ux,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Br,{level:3,children:e.name}),o.jsx(ee,{as:"p",type:"supporting",children:e.description}),e.model===void 0&&e.thinkingLevel===void 0?null:o.jsxs(we,{gap:1,wrap:"wrap",children:[e.model===void 0?null:o.jsx(vn,{label:(u==null?void 0:u.name)??e.model,size:"sm"}),e.thinkingLevel===void 0?null:o.jsx(vn,{label:ju[e.thinkingLevel],size:"sm"}),e.model!==void 0&&u===void 0?o.jsx(vn,{label:"Model not available",color:"orange",size:"sm"}):null]})]}),i?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(px,{icon:o.jsx(Ku,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!s,items:[{label:"Edit…",onClick:r},{label:"Delete…",onClick:()=>a(!0)}]})})]}),i?o.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[o.jsx(ee,{as:"p",type:"supporting",children:"Conversations already using this agent keep their copy."}),o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!s,onClick:d}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>a(!1)})]})]}):null,l===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:l})]})}function UF({problem:e,remote:t,connected:n}){const[s,r]=x.useState(!1),[i,a]=x.useState(void 0),l=$9(e.file.slice(0,-3))===void 0,c=()=>{t.controller.deleteAgent(e.file.slice(0,-3)).catch(u=>{a(u instanceof Error?u.message:String(u))})};return o.jsxs(ux,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Br,{level:3,children:e.file}),o.jsx(we,{gap:1,wrap:"wrap",children:o.jsx(vn,{label:"Not loaded",color:"orange",size:"sm"})}),o.jsx(ee,{as:"p",type:"supporting",children:e.reason}),o.jsx(ee,{as:"p",type:"supporting",children:"Fix this file on the host."})]}),s||!l?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(px,{icon:o.jsx(Ku,{"aria-hidden":"true"}),label:`${e.file} actions`,size:"sm",variant:"ghost",isDisabled:!n,items:[{label:"Delete…",onClick:()=>r(!0)}]})})]}),s?o.jsx(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!n,onClick:c}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})}):null,i===void 0?null:o.jsx(ee,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:i})]})}const FF=e=>e.subscription?"Subscription connected":e.kind==="api_key"?"API key configured":"OAuth connected";function GF({login:e,connected:t,remote:n}){const[s,r]=x.useState(!1);return o.jsxs(ux,{padding:4,children:[o.jsxs(we,{gap:3,vAlign:"start",children:[o.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[o.jsx(Br,{level:3,children:e.name}),o.jsx(ee,{as:"p",type:"supporting",children:FF(e)})]}),s?null:o.jsx(we,{gap:1,vAlign:"center",children:o.jsx(px,{icon:o.jsx(Ku,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!t,items:[{label:"Log out…",onClick:()=>r(!0)}]})})]}),s?o.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[o.jsx(ee,{as:"p",type:"supporting",children:`This also signs the Pi CLI on the host out of ${e.name}.`}),o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(re,{label:"Log out",variant:"destructive",size:"sm",isDisabled:!t,onClick:()=>void n.controller.logout(e.providerId)}),o.jsx(re,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})]}):null]})}function _k(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}function da(e,t,n){return e>=t&&e<=n}function C9(e){return e===8205}function VF(e){return da(e,55296,56319)}function a5(e){return da(e,127462,127487)}function E9(e){return da(e,65024,65039)}function T9(e){return da(e,768,879)||da(e,6832,6911)||da(e,7616,7679)||da(e,65056,65071)}function Af(e){return e>65535?2:1}function o5(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(T9(n)||E9(n))t+=Af(n);else break}return t}function z9(e,t){const n=e.codePointAt(t);let s=t+Af(n);for(s=o5(e,s);s<e.length-1&&C9(e.codePointAt(s));){const r=e.codePointAt(s+1);s+=1+Af(r),s=o5(e,s)}return a5(n)&&s<e.length&&a5(e.codePointAt(s))&&(s+=Af(e.codePointAt(s))),s}function A9(e){return e>=768&&(VF(e)||T9(e)||E9(e)||C9(e))}function WF(e,t){let n=0,s=0;for(;s<e.length;)if(s=z9(e,s),++n>=t)return!0;return!1}function KF(e,t){let n=0,s=0;for(;s<e.length;)if(s=z9(e,s),++n>t)return!1;return!0}function XF(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(A9(e.charCodeAt(n)))return WF(e,t);if(++n>=t)return!0}}function ZF(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(A9(e.charCodeAt(n)))return KF(e,t);if(++n>t)return!1}}function Ue(e){return Array.isArray(e)}function ws(e){return oe(typeof e,"bigint")}function Ja(e){return oe(typeof e,"boolean")}function N9(e){if(wt(e)||!Su(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Su(e){return oe(typeof e,"function")}function M9(e){return Number.isInteger(e)}function Yu(e){return oe(e,null)}function Ht(e){return Number.isFinite(e)}function YF(e){return pt(e)&&!Ue(e)}function pt(e){return oe(typeof e,"object")&&!Yu(e)}function Tt(e){return oe(typeof e,"string")}function R9(e){return oe(typeof e,"symbol")}function wt(e){return oe(e,void 0)}function oe(e,t){return e===t}function I9(e,t){return e>t}function _9(e,t){return e<t}function Kl(e,t){return e<=t}function Px(e,t){return e>=t}function QF(e,t){if(ws(e)||ws(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!Ht(e)||M9(e)&&1/t%1===0)return!0;const s=e%t;return Math.min(Math.abs(s),Math.abs(s-t),Math.abs(s+t))<n}function JF(e){if(!pt(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return Yu(t)?!1:oe(typeof t.constructor,"function")&&!(oe(t.constructor,globalThis.Object)||oe(t.constructor.name,"Object"))}function O9(e){return ws(e)||Ja(e)||Yu(e)||Ht(e)||Tt(e)||wt(e)}function eG(e,t){return ZF(e,t)}function tG(e,t){return XF(e,t)}function en(e,t,n){return e.every((s,r)=>r<t||n(s,r))}function D9(e,t){return e.some((n,s)=>t(n,s))}function nG(e,t){let n=!1;return e.forEach((s,r)=>{t(s,r)&&(n=!0)}),n}function L9(e,t){return e.reduce((n,s,r)=>t(s,r)?++n:n,0)}function Ux(e){return oe(e,"__proto__")||oe(e,"constructor")||oe(e,"prototype")}function ae(e,t){return Ux(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Oa(e){return Object.entries(e)}function zt(e){return Object.getOwnPropertyNames(e)}function sG(e){return Object.getOwnPropertySymbols(e)}function rG(e,t){if(!pt(t))return!1;const n=zt(e);return oe(n.length,zt(t).length)&&n.every(s=>Fx(e[s],t[s]))}function iG(e,t){return Ue(t)&&oe(e.length,t.length)&&e.every((n,s)=>Fx(e[s],t[s]))}function Fx(e,t){return Ue(e)?iG(e,t):pt(e)?rG(e,t):oe(e,t)}function aG(e){return e instanceof Boolean}function oG(e){return e instanceof Number}function lG(e){return e instanceof String}function B9(e){return globalThis.ArrayBuffer.isView(e)}function q9(e){return e instanceof globalThis.RegExp}function cG(e){return e instanceof globalThis.Date}function uG(e){return e instanceof globalThis.Set}function dG(e){return e instanceof globalThis.Map}const fG={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function H9(){return fG}function hG(e){return ae(e,"~kind")||ae(e,"~unsafe")}function xG(e){const t={};for(const n of zt(e)){if(Ux(n))continue;const s=Object.getOwnPropertyDescriptor(e,n);s.value=Da(s.value),oe(s.enumerable,!0)?t[n]=s.value:Object.defineProperty(t,n,s)}return t}function pG(e){const t={};for(const n of zt(e))Ux(n)||(t[n]=Da(e[n]));for(const n of sG(e))t[n]=Da(e[n]);return t}function gG(e){return JF(e)?e:hG(e)?xG(e):pG(e)}function mG(e){return e.map(t=>Da(t))}function yG(e){return e.slice()}function kG(e){return new RegExp(e.source,e.flags)}function bG(e){return new Map(Da([...e.entries()]))}function vG(e){return new Set(Da([...e.values()]))}function Da(e){return B9(e)?yG(e):q9(e)?kG(e):dG(e)?bG(e):uG(e)?vG(e):Ue(e)?mG(e):pt(e)?gG(e):e}function wG(e){return Da(e)}function jG(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function SG(e,t){return{...e,...t}}function Oi(e,t,n={}){const s=SG(t,n),r=jG(s,e);return r}function P9(e,t,n){const s=H9(),r=wG(e);for(const i of Object.keys(t))Object.defineProperty(r,i,{configurable:!0,writable:!0,enumerable:s.enumerableKind,value:t[i]});for(const i of Object.keys(n))Object.defineProperty(r,i,{configurable:!0,enumerable:!0,writable:!0,value:n[i]});return r}function $G(e){return pt(e)}function CG(e){return P9(e,{"~optional":!0},{})}function EG(e,t){return P9(CG(e),{},t)}function eo(e,t){return Oi({"~kind":"Array"},{type:"array",items:e},t)}function TG(e,t={}){return EG(e,t)}function Er(e){return TG(e)}function zG(e){return $G(e)&&ae(e,"~optional")}function AG(e){return zt(e).filter(t=>!zG(e[t]))}function wn(e,t={}){const n=AG(e),s=n.length>0?{required:n}:{};return Oi({"~kind":"Object"},{type:"object",...s,properties:e},t)}function Ok(e){return Oi({"~kind":"Unknown"},{},e)}function U9(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function NG(){throw new Error("Unreachable")}function MG(e){const t=new Set;let n=e;for(;n&&n!==Object.prototype;){for(const s of Reflect.ownKeys(n))s!=="constructor"&&typeof s!="symbol"&&t.add(s);n=Object.getPrototypeOf(n)}return[...t]}function RG(e){return typeof e=="number"}var ln;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(ln||(ln={}));let Oo=BigInt("14695981039346656037");const[IG,_G]=[BigInt("1099511628211"),BigInt("18446744073709551616")],OG=Array.from({length:256}).map((e,t)=>BigInt(t)),F9=new Float64Array(1),G9=new DataView(F9.buffer),V9=new Uint8Array(F9.buffer);function At(e){Oo=Oo^OG[e],Oo=Oo*IG%_G}function DG(e){At(ln.Array);for(const t of e)Ni(t)}function LG(e){At(ln.BigInt),G9.setBigInt64(0,e);for(const t of V9)At(t)}function l5(e){At(ln.Boolean),At(e?1:0)}function BG(e){At(ln.Constructor),Ni(e.toString())}function qG(e){At(ln.Date),Ni(e.getTime())}function HG(e){At(ln.Function),Ni(e.toString())}function PG(e){At(ln.Null)}function c5(e){At(ln.Number),G9.setFloat64(0,e,!0);for(const t of V9)At(t)}function UG(e){At(ln.Object);for(const t of MG(e).sort())Ni(t),Ni(e[t])}function FG(e){At(ln.RegExp),Lm(e.toString())}const GG=new TextEncoder;function Lm(e){At(ln.String);for(const t of GG.encode(e))At(t)}function VG(e){At(ln.Symbol),Ni(e.toString())}function WG(e){At(ln.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)At(t[n])}function KG(e){return At(ln.Undefined)}function Ni(e){return B9(e)?WG(e):cG(e)?qG(e):q9(e)?FG(e):aG(e)?l5(e.valueOf()):lG(e)?Lm(e.valueOf()):oG(e)?c5(e.valueOf()):RG(e)?c5(e):Ue(e)?DG(e):Ja(e)?l5(e):ws(e)?LG(e):N9(e)?BG(e):Yu(e)?PG():pt(e)?UG(e):Tt(e)?Lm(e):R9(e)?VG(e):wt(e)?KG():Su(e)?HG(e):NG()}function XG(e){return Oo=BigInt("14695981039346656037"),Ni(e),Oo}function ZG(e){return XG(e).toString(16).padStart(16,"0")}function YG(e){return Oi({"~kind":"Boolean"},{type:"boolean"},e)}class QG extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function JG(e){return ws(e)?"bigint":Ja(e)?"boolean":Ht(e)?"number":Tt(e)?"string":(()=>{throw new QG(e)})()}function Fn(e,t){return Oi({"~kind":"Literal"},{type:JG(e),const:e},t)}function el(e){return Oi({"~kind":"Number"},{type:"number"},e)}function an(e){return Oi({"~kind":"String"},{type:"string"},e)}function Gx(e,t={}){return Oi({"~kind":"Union"},{anyOf:e},t)}function Bm(e,t){return Array.from({length:t-e+1},(n,s)=>String.fromCharCode(e+s))}[...Bm(97,122),...Bm(65,90)];const eV="0",tV=Bm(49,57);[...tV];function nV(e){return ae(e,"~refine")&&Ue(e["~refine"])&&en(e["~refine"],0,t=>pt(t)&&ae(t,"check")&&ae(t,"error")&&Su(t.check)&&Su(t.error))}function Qn(e){return pt(e)&&!Ue(e)}function Hh(e){return Ja(e)}function dt(e){return Qn(e)||Hh(e)}function sV(e){return ae(e,"additionalItems")&&dt(e.additionalItems)}function rV(e){return ae(e,"additionalProperties")&&dt(e.additionalProperties)}function iV(e){return ae(e,"allOf")&&Ue(e.allOf)&&e.allOf.every(t=>dt(t))}function qm(e){return ae(e,"$anchor")&&Tt(e.$anchor)}function aV(e){return ae(e,"anyOf")&&Ue(e.anyOf)&&e.anyOf.every(t=>dt(t))}function oV(e){return ae(e,"const")}function Dk(e){return ae(e,"contains")&&dt(e.contains)}function lV(e){return ae(e,"dependencies")&&pt(e.dependencies)&&Object.values(e.dependencies).every(t=>dt(t)||Ue(t)&&t.every(n=>Tt(n)))}function cV(e){return ae(e,"dependentRequired")&&pt(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Ue(t)&&t.every(n=>Tt(n)))}function uV(e){return ae(e,"dependentSchemas")&&pt(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>dt(t))}function La(e){return ae(e,"$dynamicAnchor")&&Tt(e.$dynamicAnchor)}function dV(e){return ae(e,"$dynamicRef")&&Tt(e.$dynamicRef)}function fV(e){return ae(e,"else")&&dt(e.else)}function hV(e){return ae(e,"enum")&&Ue(e.enum)}function xV(e){return ae(e,"exclusiveMaximum")&&(Ht(e.exclusiveMaximum)||ws(e.exclusiveMaximum))}function pV(e){return ae(e,"exclusiveMinimum")&&(Ht(e.exclusiveMinimum)||ws(e.exclusiveMinimum))}function gV(e){return ae(e,"format")&&Tt(e.format)}function Ps(e){return ae(e,"$id")&&Tt(e.$id)}function mV(e){return ae(e,"if")&&dt(e.if)}function Lk(e){return ae(e,"items")&&(dt(e.items)||Ue(e.items)&&e.items.every(t=>dt(t)))}function yV(e){return Lk(e)&&Ue(e.items)}function kV(e){return ae(e,"maximum")&&(Ht(e.maximum)||ws(e.maximum))}function bV(e){return ae(e,"maxContains")&&Ht(e.maxContains)}function vV(e){return ae(e,"maxItems")&&Ht(e.maxItems)}function wV(e){return ae(e,"maxLength")&&Ht(e.maxLength)}function jV(e){return ae(e,"maxProperties")&&Ht(e.maxProperties)}function SV(e){return ae(e,"minimum")&&(Ht(e.minimum)||ws(e.minimum))}function W9(e){return ae(e,"minContains")&&Ht(e.minContains)}function $V(e){return ae(e,"minItems")&&Ht(e.minItems)}function CV(e){return ae(e,"minLength")&&Ht(e.minLength)}function EV(e){return ae(e,"minProperties")&&Ht(e.minProperties)}function TV(e){return ae(e,"multipleOf")&&(Ht(e.multipleOf)||ws(e.multipleOf))}function zV(e){return ae(e,"not")&&dt(e.not)}function AV(e){return ae(e,"oneOf")&&Ue(e.oneOf)&&e.oneOf.every(t=>dt(t))}function NV(e){return ae(e,"pattern")&&(Tt(e.pattern)||e.pattern instanceof RegExp)}function K9(e){return ae(e,"patternProperties")&&pt(e.patternProperties)&&Object.values(e.patternProperties).every(t=>dt(t))}function X9(e){return ae(e,"prefixItems")&&Ue(e.prefixItems)&&e.prefixItems.every(t=>dt(t))}function Z9(e){return ae(e,"properties")&&pt(e.properties)&&Object.values(e.properties).every(t=>dt(t))}function MV(e){return ae(e,"propertyNames")&&(pt(e.propertyNames)||dt(e.propertyNames))}function RV(e){return ae(e,"$recursiveAnchor")&&Ja(e.$recursiveAnchor)}function Hm(e){return RV(e)&&oe(e.$recursiveAnchor,!0)}function IV(e){return ae(e,"$recursiveRef")&&Tt(e.$recursiveRef)}function _V(e){return ae(e,"$ref")&&Tt(e.$ref)}function Y9(e){return ae(e,"required")&&Ue(e.required)&&e.required.every(t=>Tt(t))}function OV(e){return ae(e,"then")&&dt(e.then)}function DV(e){return ae(e,"type")&&(Tt(e.type)||Ue(e.type)&&e.type.every(t=>Tt(t)))}function LV(e){return ae(e,"uniqueItems")&&Ja(e.uniqueItems)}function BV(e){return ae(e,"unevaluatedItems")&&dt(e.unevaluatedItems)}function qV(e){return ae(e,"unevaluatedProperties")&&dt(e.unevaluatedProperties)}class Xl{constructor(){const t=new Set,n=new Set;this.stack=[{indices:t,keys:n}]}Push(){const t=new Set,n=new Set;return this.stack.push({indices:t,keys:n}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(const n of t)n.GetIndices().forEach(s=>this.GetIndices().add(s)),n.GetKeys().forEach(s=>this.GetKeys().add(s));return!0}}function HV(e,t,n,s){return en(n["~refine"],0,(r,i)=>r.check(s))}function PV(e){return Lk(e)&&Ue(e.items)}function UV(e,t,n,s){return PV(n)?en(s,0,(i,a)=>_9(a,n.items.length)||to(e,t,n.additionalItems,i)&&t.AddIndex(a)):!0}function Bk(e){return new RegExp(e,"u")}function FV(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function GV(e){const t=[];return K9(e)&&t.push(...zt(e.patternProperties)),Z9(e)&&t.push(...zt(e.properties).map(FV)),oe(t.length,0)?"(?!)":`(${t.join("|")})`}function VV(e,t,n,s){const r=Bk(GV(n));return en(zt(s),0,(a,l)=>r.test(a)||to(e,t,n.additionalProperties,s[a])&&t.AddKey(a))}function WV(e,t,n,s){const r=n.allOf.reduce((i,a)=>{const l=new Xl;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,n.allOf.length)&&t.Merge(r)}function KV(e,t,n,s){const r=n.anyOf.reduce((i,a)=>{const l=new Xl;return jt(e,l,a,s)?[...i,l]:i},[]);return I9(r.length,0)&&t.Merge(r)}function XV(e,t,n,s){return n}function ZV(e,t,n,s){return O9(n.const)?oe(s,n.const):Fx(s,n.const)}function YV(e){return!(W9(e)&&oe(e.minContains,0))}function QV(e,t,n,s){return YV(n)?!oe(s.length,0)&&nG(s,(r,i)=>jt(e,t,n.contains,r)&&t.AddIndex(i)):!0}function JV(e,t,n,s){const r=oe(zt(s).length,0),i=en(Oa(n.dependencies),0,([a,l])=>!ae(s,a)||(Ue(l)?l.every(c=>ae(s,c)):jt(e,t,l,s)));return r||i}function eW(e,t,n,s){const r=oe(zt(s).length,0),i=en(Oa(n.dependentRequired),0,([a,l])=>!ae(s,a)||l.every(c=>ae(s,c)));return r||i}function tW(e,t,n,s){const r=oe(zt(s).length,0),i=en(Oa(n.dependentSchemas),0,([a,l])=>!ae(s,a)||jt(e,t,l,s));return r||i}function nW(e,t,n,s){const r=e.DynamicRef(n)??!1;return dt(r)&&jt(e,t,r,s)}function sW(e,t,n,s){return D9(n.enum,r=>O9(r)?oe(s,r):Fx(s,r))}function rW(e,t,n,s){return _9(s,n.exclusiveMaximum)}function iW(e,t,n,s){return I9(s,n.exclusiveMinimum)}const aW=[0,31,28,31,30,31,30,31,31,30,31,30,31],oW=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function lW(e){return e%4===0&&(e%100!==0||e%400===0)}function Q9(e){const t=oW.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],r=+t[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&lW(n)?29:aW[s])}const cW=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function J9(e,t=!0){const n=cW.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;const s=+n[1],r=+n[2],i=+n[3];if(s>23||r>59||i>60)return!1;if(n[5]){const d=+n[6],f=+n[7];if(d>23||f>59)return!1}if(i<60)return!0;const a=n[5]==="-"?-1:1,l=+(n[6]||0),c=+(n[7]||0);return((s*60+r-a*(l*60+c))%1440+1440)%1440===1439}function uW(e){const t=e.split(/T/i);return t.length===2&&Q9(t[0])&&J9(t[1])}const dW=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function fW(e){return dW.test(e)}const hW=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function xW(e){return hW.test(e)}const pW=new RegExp("^(?!-).*(?<!-)$"),gW=/^(?!..--)/,mW=/^[a-zA-Z0-9-]*$/,qk=/[^\p{ASCII}]/u,yW=/[0-9]/,kW=/[\u{0660}-\u{0669}]/u,bW=/[\u{06f0}-\u{06f9}]/u,vW=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,wW=/[\u{002d}\u{002b}]/u,e$=new RegExp("\\p{Mn}","u"),jW=new RegExp("\\p{Mc}","u"),SW=/[\p{Mn}\p{Mc}\p{Me}]/u,t$=new RegExp("\\p{L}","u"),$W=new RegExp("\\p{Nd}","u"),CW=new RegExp("\\p{Script=Greek}","u"),n$=new RegExp("\\p{Script=Hebrew}","u"),EW=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,TW=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,u5=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,zW=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,AW=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,NW=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,MW=new RegExp([yW,bW].map(e=>e.source).join("|"),"u"),RW=new RegExp([t$,wW,vW,$W,e$,jW,AW,NW].map(e=>e.source).join("|"),"u");function IW(e){return pW.test(e)&&gW.test(e)&&mW.test(e)}const Bs=36,Uc=1,$u=26,_W=38,OW=700,s$=72,r$=128;function zp(){throw null}function i$(e){return e.toLowerCase().startsWith("xn--")}function a$(e,t,n){e=n?Math.floor(e/OW):e>>1,e+=Math.floor(e/t);let s=0;for(;e>(Bs-Uc)*$u>>1;)e=Math.floor(e/(Bs-Uc)),s+=Bs;return s+Math.floor((Bs-Uc+1)*e/(e+_W))}function o$(e){const t=[];let n=r$,s=0,r=s$;const i=e.lastIndexOf("-");if(i>0)for(let l=0;l<i;l++){const c=e.charCodeAt(l);c>=128&&zp(),t.push(c)}let a=i<0?0:i+1;for(;a<e.length;){const l=s;let c=1,u=Bs;for(;;){a>=e.length&&zp();const f=e.charCodeAt(a++);let h;f>=97&&f<=122?h=f-97:f>=48&&f<=57?h=f-48+26:zp(),s+=h*c;const p=u<=r?Uc:u>=r+$u?$u:u-r;if(h<p)break;c*=Bs-p,u+=Bs}const d=t.length+1;r=a$(s-l,d,l===0),n+=Math.floor(s/d),s%=d,t.splice(s,0,n),s++}return String.fromCodePoint(...t)}function d5(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const DW=new RegExp(qk.source,"gu");function LW(e){const t=e.replace(DW,""),n=t.length,s=n>0?[t,"-"]:[],r=Array.from(e,u=>u.codePointAt(0));let i=r$,a=0,l=s$,c=n;for(;c<r.length;){let u=1/0;for(const d of r)d>=i&&d<u&&(u=d);a+=(u-i)*(c+1),i=u;for(const d of r)if(d<i&&a++,d===i){let f=a;for(let h=Bs;;h+=Bs){const p=h<=l?Uc:h>=l+$u?$u:h-l;if(f<p)break;const m=p+(f-p)%(Bs-p);s.push(d5(m)),f=Math.floor((f-p)/(Bs-p))}s.push(d5(f)),l=a$(a,c+1,c===n),a=0,c++}a++,i++}return s.join("")}const BW=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,f5=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,qW=/^(?:R|AL|AN)$/;function HW(e){if(i$(e))try{return Pm(o$(e.slice(4).toLowerCase()))}catch{return!1}return Pm(e)}function l$(e){const t=String.fromCodePoint(e);return MW.test(t)?"EN":kW.test(t)?"AN":e$.test(t)?"NSM":n$.test(t)?"R":TW.test(t)?"AL":t$.test(t)?"L":"ON"}function Pm(e){for(const t of e)if(qW.test(l$(t.codePointAt(0))))return!0;return!1}function c$(e){let t=!1,n=f5,s=!1,r=!1,i=!0;for(const a of e){const l=l$(a.codePointAt(0));if(i){if(l!=="L"&&l!=="R"&&l!=="AL")return!1;t=l==="R"||l==="AL",n=t?BW:f5,i=!1}if(!n.test(l))return!1;l==="EN"?s=!0:l==="AN"&&(r=!0)}return!(t&&s&&r)}function PW(e){return qk.test(e)&&LW(e).length+4>63}function UW(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function u$(e){if(PW(e)||Pm(e)&&!c$(e))return!1;const t=[...e],n=t.map(i=>i.codePointAt(0)),s=n.length;if(UW(t)||SW.test(t[0]))return!1;let r=!1;for(let i=0;i<s;i++){const a=n[i],l=t[i];if(zW.test(l)||!RW.test(l))return!1;EW.test(l)&&(r=!0);const c=n[i-1],u=n[i+1];switch(a){case 183:if(c!==108||u!==108)return!1;break;case 885:if(!u||!CW.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!n$.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!u5.test(t[i-1]))return!1;break;case 8205:if(!c||!u5.test(t[i-1]))return!1;break}}return!(e.includes("・")&&!r)}function d$(e){if(!i$(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=o$(t);return qk.test(n)?u$(n):!1}catch{return!1}}function FW(e){return e.length>0&&e.length<=63}function GW(e){return FW(e)&&(d$(e)||IW(e))}function VW(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>GW(t))}function WW(e){return e.length>0&&e.length<=63}function KW(e){return WW(e)&&(d$(e)||u$(e))}function XW(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function ZW(e){if(e.length===0||e.includes(" "))return!1;const t=XW(e);if(t.length>253)return!1;const n=t.split("."),s=n.some(r=>HW(r));return n.every(r=>KW(r)&&(!s||c$(r)))}function YW(e){return VW(e)}const QW=new RegExp('^(?:[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+(?:\\.[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+)*|"(?:[^"\\\\]|\\\\.)*")@[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-)(?:\\.[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-))*$',"iu");function JW(e){return QW.test(e.normalize("NFC"))}function eK(e){return ZW(e)}const tK=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function nK(e){return tK.test(e)}const sK=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function rK(e){return sK.test(e)}const iK=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,aK=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function oK(e){return!iK.test(e)&&!aK.test(e)&&URL.canParse(e,"http://example.com")}const lK=2048,cK=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,uK=/[\x00-\x20<>\^`{|}\\]/,dK=/%(?![0-9a-fA-F]{2})/;function fK(e){return e.length<lK?e.replace(cK,"[::1]"):e}function hK(e){return uK.test(e)||dK.test(e)?!1:URL.canParse(fK(e))}const xK=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function pK(e){return xK.test(e)}const gK=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function mK(e){return gK.test(e)}function yK(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const kK=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function bK(e){return kK.test(e)}const vK=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wK(e){return vK.test(e)}const jK=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function SK(e){return jK.test(e)}const $K=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function CK(e){return $K.test(e)}function EK(e){return URL.canParse(e)}const TK=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function zK(e){return TK.test(e)}const lt=new Map;function AK(){lt.clear()}function NK(e,t){var n;return((n=lt.get(e))==null?void 0:n(t))??!0}function MK(){AK(),lt.set("date-time",uW),lt.set("date",Q9),lt.set("duration",fW),lt.set("email",xW),lt.set("hostname",YW),lt.set("idn-email",JW),lt.set("idn-hostname",eK),lt.set("ipv4",nK),lt.set("ipv6",rK),lt.set("iri-reference",oK),lt.set("iri",hK),lt.set("json-pointer-uri-fragment",pK),lt.set("json-pointer",mK),lt.set("regex",yK),lt.set("relative-json-pointer",bK),lt.set("time",J9),lt.set("uri-reference",wK),lt.set("uri-template",SK),lt.set("uri",CK),lt.set("url",EK),lt.set("uuid",zK)}MK();function RK(e,t,n,s){return NK(n.format,s)}function IK(e,t,n,s){const r=OV(n)?n.then:!0,i=fV(n)?n.else:!0;return jt(e,t,n.if,s)?jt(e,t,r,s):jt(e,t,i,s)}function _K(e,t,n,s){return en(n.items,0,(r,i)=>Kl(s.length,i)||to(e,t,r,s[i])&&t.AddIndex(i))}function OK(e,t,n,s){const r=X9(n)?n.prefixItems.length:0;return en(s,r,(i,a)=>to(e,t,n.items,i)&&t.AddIndex(a))}function DK(e,t,n,s){return yV(n)?_K(e,t,n,s):OK(e,t,n,s)}function LK(e){return Dk(e)}function BK(e,t,n,s){if(!LK(n))return!0;const r=L9(s,i=>jt(e,t,n.contains,i));return Kl(r,n.maxContains)}function qK(e,t,n,s){return Kl(s,n.maximum)}function HK(e,t,n,s){return Kl(s.length,n.maxItems)}function PK(e,t,n,s){return eG(s,n.maxLength)}function UK(e,t,n,s){return Kl(zt(s).length,n.maxProperties)}function FK(e){return Dk(e)}function GK(e,t,n,s){if(!FK(n))return!0;const r=L9(s,(i,a)=>jt(e,t,n.contains,i)&&t.AddIndex(a));return Px(r,n.minContains)}function VK(e,t,n,s){return Px(s,n.minimum)}function WK(e,t,n,s){return Px(s.length,n.minItems)}function KK(e,t,n,s){return tG(s,n.minLength)}function XK(e,t,n,s){return Px(zt(s).length,n.minProperties)}function ZK(e,t,n,s){return QF(s,n.multipleOf)}function YK(e,t,n,s){const r=new Xl;return!jt(e,r,n.not,s)&&t.Merge([r])}function QK(e,t,n,s){const r=n.oneOf.reduce((i,a)=>{const l=new Xl;return jt(e,l,a,s)?[...i,l]:i},[]);return oe(r.length,1)&&t.Merge(r)}function JK(e,t,n,s){return(Tt(n.pattern)?Bk(n.pattern):n.pattern).test(s)}function eX(e,t,n,s){return en(Oa(n.patternProperties),0,([r,i])=>{const a=Bk(r);return en(Oa(s),0,([l,c])=>!a.test(l)||to(e,t,i,c)&&t.AddKey(l))})}function tX(e,t,n,s){return oe(s.length,0)||en(n.prefixItems,0,(r,i)=>Kl(s.length,i)||to(e,t,r,s[i])&&t.AddIndex(i))}function nX(e,t){return e.includes(t)||H9().exactOptionalPropertyTypes}function sX(e,t){return wt(e[t])}function rX(e,t,n,s){const r=Y9(n)?n.required:[];return en(Oa(n.properties),0,([a,l])=>{const c=!ae(s,a)||to(e,t,l,s[a])&&t.AddKey(a);return nX(r,a)?c:sX(s,a)||c})}function iX(e,t,n,s){return en(zt(s),0,(r,i)=>jt(e,t,n.propertyNames,r))}function aX(e,t,n,s){const r=e.RecursiveRef(n)??!1;return dt(r)&&jt(e,t,r,s)}function oX(e,t,n,s){const r=e.Ref(n)??!1,i=new Xl,a=dt(r)&&jt(e,i,r,s);return a&&t.Merge([i]),a}function lX(e,t,n,s){return en(n.required,0,r=>ae(s,r))}function f$(e,t,n,s,r){return oe(n,"object")?YF(r):oe(n,"array")?Ue(r):oe(n,"boolean")?Ja(r):oe(n,"integer")?M9(r):oe(n,"number")?Ht(r):oe(n,"null")?Yu(r):oe(n,"string")?Tt(r):oe(n,"bigint")?ws(r):oe(n,"constructor")?N9(r):oe(n,"function")?Su(r):oe(n,"symbol")?R9(r):oe(n,"undefined")||oe(n,"void")?wt(r):!0}function cX(e,t,n,s,r){return D9(n,i=>f$(e,t,i,s,r))}function uX(e,t,n,s){return Ue(n.type)?cX(e,t,n.type,n,s):f$(e,t,n.type,n,s)}function dX(e,t,n,s){const r=t.GetIndices();return en(s,0,(i,a)=>(r.has(a)||jt(e,t,n.unevaluatedItems,i))&&t.AddIndex(a))}function fX(e,t,n,s){const r=t.GetKeys();return en(Oa(s),0,([i,a])=>r.has(i)||jt(e,t,n.unevaluatedProperties,a)&&t.AddKey(i))}function hX(e){return!oe(e.uniqueItems,!1)}function xX(e,t,n,s){if(!hX(n))return!0;const r=new Set(s.map(ZG)).size,i=s.length;return oe(r,i)}function to(e,t,n,s){return t.Push()&&jt(e,t,n,s)&&t.Pop()}function jt(e,t,n,s){e.Push(n);const r=Hh(n)?XV(e,t,n):(!DV(n)||uX(e,t,n,s))&&(!(pt(s)&&!Ue(s))||(!Y9(n)||lX(e,t,n,s))&&(!rV(n)||VV(e,t,n,s))&&(!lV(n)||JV(e,t,n,s))&&(!cV(n)||eW(e,t,n,s))&&(!uV(n)||tW(e,t,n,s))&&(!K9(n)||eX(e,t,n,s))&&(!Z9(n)||rX(e,t,n,s))&&(!MV(n)||iX(e,t,n,s))&&(!EV(n)||XK(e,t,n,s))&&(!jV(n)||UK(e,t,n,s)))&&(!Ue(s)||(!sV(n)||UV(e,t,n,s))&&(!Dk(n)||QV(e,t,n,s))&&(!Lk(n)||DK(e,t,n,s))&&(!bV(n)||BK(e,t,n,s))&&(!vV(n)||HK(e,t,n,s))&&(!W9(n)||GK(e,t,n,s))&&(!$V(n)||WK(e,t,n,s))&&(!X9(n)||tX(e,t,n,s))&&(!LV(n)||xX(e,t,n,s)))&&(!Tt(s)||(!wV(n)||PK(e,t,n,s))&&(!CV(n)||KK(e,t,n,s))&&(!gV(n)||RK(e,t,n,s))&&(!NV(n)||JK(e,t,n,s)))&&(!(Ht(s)||ws(s))||(!xV(n)||rW(e,t,n,s))&&(!pV(n)||iW(e,t,n,s))&&(!kV(n)||qK(e,t,n,s))&&(!SV(n)||VK(e,t,n,s))&&(!TV(n)||ZK(e,t,n,s)))&&(!_V(n)||oX(e,t,n,s))&&(!IV(n)||aX(e,t,n,s))&&(!dV(n)||nW(e,t,n,s))&&(!oV(n)||ZV(e,t,n,s))&&(!hV(n)||sW(e,t,n,s))&&(!mV(n)||IK(e,t,n,s))&&(!zV(n)||YK(e,t,n,s))&&(!iV(n)||WV(e,t,n,s))&&(!aV(n)||KV(e,t,n,s))&&(!AV(n)||QK(e,t,n,s))&&(!BV(n)||!Ue(s)||dX(e,t,n,s))&&(!qV(n)||!pt(s)||fX(e,t,n,s))&&(!nV(n)||HV(e,t,n,s));return e.Pop(n),r}function pX(e,t){return pt(t)&&!Ux(e)?t[e]:void 0}function gX(e,t){return e.reduce((n,s)=>pX(s,n),t)}function mX(e){if(oe(e.length,0))return[];const t=e.split("/").map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function yX(e,t){const n=mX(t);return gX(n,e)}const Vx="https://json-schema.org";function h$(e,t){if(pt(e)&&La(e)&&oe(e.$dynamicAnchor,t))return e;if(pt(e))for(const n of zt(e)){const s=h$(e[n],t);if(s)return s}}function Um(e,t,n){if(oe(e,n))return t.href;const s=Qn(e)&&Ps(e)?new URL(e.$id,t.href):t;if(Ue(e))for(const r of e){const i=Um(r,s,n);if(!wt(i))return i}else if(pt(e))for(const r of zt(e)){const i=Um(e[r],s,n);if(!wt(i))return i}}function kX(e,t,n){if(oe(e.$id,n.hash))return e;const s=new URL(n.href,t.href);if(oe(t.pathname,s.pathname))return n.hash.startsWith("#")?x$(e,n):e}function bX(e,t,n){const s=new URL(`#${e.$anchor}`,t.href),r=new URL(n.href,t.href);return oe(s.href,r.href)?e:void 0}function vX(e,t,n){const s=new URL(`#${e.$dynamicAnchor}`,t.href),r=new URL(n.href,t.href);return oe(s.href,r.href)?e:void 0}function x$(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?yX(e,n):void 0}function wX(e,t,n){if(Ps(e)){const s=kX(e,t,n);if(!wt(s))return s}if(qm(e)){const s=bX(e,t,n);if(!wt(s))return s}if(La(e)){const s=vX(e,t,n);if(!wt(s))return s}return x$(e,n)}function jX(e,t,n){return e.reduce((s,r)=>{const i=Wx(r,t,n);return wt(i)?s:i},void 0)}function SX(e){return oe(e,"const")||oe(e,"enum")}function $X(e,t,n){return zt(e).reduce((s,r)=>{if(SX(r))return s;const i=Wx(e[r],t,n);return wt(i)?s:i},void 0)}function Wx(e,t,n){const s=Qn(e)&&Ps(e)?new URL(e.$id,t.href):t;if(Qn(e)){const r=wX(e,s,n);if(!wt(r))return r}if(Ue(e))return jX(e,s,n);if(pt(e))return $X(e,s,n)}function CX(e,t,n){return Um(e,new URL(t||".",Vx),n)}function EX(e,t,n,s){const r=Kx(e,t,n,s,!1);return Qn(r)&&Ps(r)?r:void 0}function h5(e){return e.href.split("#")[0]}function TX(e,t){return ae(e,t)?e[t]:void 0}function zX(e,t,n){return Wx(e,t,n)}function AX(e,t,n){const s=h5(n);if(oe(s,h5(t))||!ae(e,s))return;const r=e[s],i=Qn(r)&&Ps(r)?new URL(r.$id,s):new URL(s);return oe(n.hash,"")?r:Wx(r,i,n)}function NX(e,t,n,s,r){if(!s.$ref.startsWith("#")||ae(e,"$schema"))return;const i=CX(t,n,r);if(!(wt(i)||oe(i,n)))return{target:r,base:i,root:t}}function MX(e,t,n){const s=e[t];if(Qn(s))return{target:n,base:t,root:s}}function RX(e,t,n,s,r){const i=r?MX(e.context,s,n):void 0;return wt(i)?NX(e.root,e.lexicalSchema,e.referenceBase,t,n):i}function IX(e,t,n,s,r,i){if(Ps(r))return;const a=EX(e,t,n,s);if(!(!a||i.includes(a)))return{target:r,resource:a}}function Kx(e,t,n,s,r=!0){const i=new URL(n||".",Vx),a=r&&Ps(t)?new URL(t.$id,i):i,l=new URL(s,a.href);return TX(e,s)??zX(t,a,l)??AX(e,a,l)}function _X(e,t,n,s,r,i){const a=new URL(n||".",Vx),l=r.$dynamicRef.startsWith("#")?s:t,c=Kx(e,l,n,r.$dynamicRef,!1);if(wt(c)){const f=new URL(r.$dynamicRef,a).hash;if(!f.startsWith("#/")&&f.startsWith("#")){const h=decodeURIComponent(f.slice(1));return i.find(m=>oe(m.$dynamicAnchor,h))??h$(t,h)}return}return!Qn(c)||!La(c)||new URL(r.$dynamicRef,a).hash.startsWith("#/")?c:i.find(f=>oe(f.$dynamicAnchor,c.$dynamicAnchor))??c}function OX(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,s=t.$ref.startsWith("#")?e.lexicalSchema:n,r=Kx(e.context,s,e.referenceBase,t.$ref,!1);if(!r||!Qn(r))return{schema:r};const i=new URL(t.$ref,e.referenceBase).href.split("#")[0],a=!oe(i,e.resourceBase),l=RX(e,t,r,i,a),c=a?IX(e.context,e.root,e.referenceBase,i,r,e.ids):void 0;return{schema:r,retrievedResource:l,resolvedResource:c}}function DX(e,t){const n=Hm(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return Kx(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function LX(e,t){return _X(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var tt=function(e,t,n,s){if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?s:n==="a"?s.call(e):s?s.value:t.get(e)},We,Nf,p$,Fm,Qd,x5,p5,g5,m5,Ap,Np,Gm,Vm,y5,g$;class BX{constructor(t,n){We.add(this),this.context=t,this.schema=n,this.ids=[],this.resourceIds=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[],this.retrievedResources=new Map,this.retrievedFrames=[],this.resolvedResources=new Map,this.pendingResource=!0}LexicalBaseURL(){return tt(this,We,"m",Fm).call(this,this.ids)}Push(t){if(!Qn(t))return;Ps(t)&&tt(this,We,"m",Gm).call(this,t),qm(t)&&this.anchors.push(t),Hm(t)&&this.recursiveAnchors.push(t),La(t)&&this.dynamicAnchors.push(t);const n=this.retrievedResources.get(t);n&&this.retrievedFrames.push({schema:n.root,base:n.base,idDepth:this.ids.length,resourceDepth:this.resourceIds.length})}Pop(t){Qn(t)&&(Ps(t)&&tt(this,We,"m",Vm).call(this,t),qm(t)&&this.anchors.pop(),Hm(t)&&this.recursiveAnchors.pop(),La(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),tt(this,We,"m",g$).call(this,t))}Ref(t){const n=OX(tt(this,We,"m",Nf).call(this),t);return tt(this,We,"m",p$).call(this,n),n.schema}RecursiveRef(t){const n=DX(tt(this,We,"m",Nf).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=LX(tt(this,We,"m",Nf).call(this),t);return n&&(this.pendingResource=!0),n}}We=new WeakSet,Nf=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:tt(this,We,"m",p5).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:tt(this,We,"m",x5).call(this),resourceBase:tt(this,We,"m",Qd).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},p$=function(t){wt(t.schema)||(this.pendingResource=!0),wt(t.resolvedResource)||tt(this,We,"m",y5).call(this,t.resolvedResource.target,t.resolvedResource.resource),wt(t.retrievedResource)||this.retrievedResources.set(t.retrievedResource.target,{base:t.retrievedResource.base,root:t.retrievedResource.root})},Fm=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],s=n?new URL(n.base):new URL(Vx);return(n?t.slice(n.idDepth):t).reduce((i,a)=>new URL(a.$id,i),s).href},Qd=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.resourceIds.slice(t.resourceDepth).reduce((n,s)=>new URL(s.$id,n),new URL(t.base)).href:tt(this,We,"m",Fm).call(this,this.resourceIds)},x5=function(){if(this.retrievedFrames.length>0)return tt(this,We,"m",Qd).call(this);const t=this.ids[this.ids.length-1];return t&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t.$id)?this.LexicalBaseURL():tt(this,We,"m",Qd).call(this)},p5=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.ids.length>t.idDepth?this.ids[this.ids.length-1]:t.schema:this.ids.length>0?this.ids[this.ids.length-1]:this.schema},g5=function(t){t.forEach(n=>tt(this,We,"m",Ap).call(this,n,!1))},m5=function(t){t.forEach(n=>tt(this,We,"m",Np).call(this,n,!1))},Ap=function e(t,n=!0){if(Hh(t))return;if(Ue(t))return tt(this,We,"m",g5).call(this,t);if(!Qn(t))return;const s=t;if(!(!n&&Ps(s))){!n&&La(s)&&this.dynamicAnchors.push(s);for(const r of zt(s))tt(this,We,"m",e).call(this,s[r],!1)}},Np=function e(t,n=!0){if(Hh(t))return;if(Ue(t))return tt(this,We,"m",m5).call(this,t);if(!Qn(t))return;const s=t;if(!(!n&&Ps(s))){!n&&La(s)&&this.dynamicAnchors.pop();for(const r of zt(s))tt(this,We,"m",e).call(this,s[r],!1)}},Gm=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),tt(this,We,"m",Ap).call(this,t,!0)},Vm=function(t){this.ids.pop(),this.resourceIds.length>0&&oe(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),tt(this,We,"m",Np).call(this,t,!0)},y5=function(t,n){tt(this,We,"m",Gm).call(this,n),this.resolvedResources.set(t,n)},g$=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);tt(this,We,"m",Vm).call(this,n),this.resolvedResources.delete(t)};function qX(...e){const[t,n,s]=U9(e,{3:(a,l,c)=>[a,l,c],2:(a,l)=>[{},a,l]}),r=new BX(t,n),i=new Xl;return jt(r,i,n,s)}function Jd(...e){const[t,n,s]=U9(e,{3:(r,i,a)=>[r,i,a],2:(r,i)=>[{},r,i]});return qX(t,n,s)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const HX=wn({type:Fn("insert"),path:an(),value:Ok()}),PX=Object({type:Fn("update"),path:an(),value:Ok()}),UX=wn({type:Fn("delete"),path:an()});Gx([HX,PX,UX]);const FX=wn({text:an({minLength:1}),status:Gx([Fn("pending"),Fn("in_progress"),Fn("completed")])}),GX=wn({items:eo(FX)}),VX=wn({label:an({minLength:1}),description:Er(an())}),WX=wn({question:an({minLength:1}),header:an({minLength:1,maxLength:16}),options:eo(VX,{minItems:2,maxItems:4}),multiSelect:Er(YG())}),KX=wn({selected:eo(an()),other:Er(an())}),XX=Gx([wn({outcome:Fn("answered"),answers:eo(KX),at:el()}),wn({outcome:Fn("dismissed"),at:el()}),wn({outcome:Fn("cancelled"),at:el()})]),ZX=wn({id:an({minLength:1}),questions:eo(WX,{minItems:1,maxItems:4}),askedAt:el(),resolution:Er(XX)}),YX=wn({requests:eo(ZX)}),QX=wn({patch:an()}),JX=wn({id:Er(el()),name:an(),args:an(),status:Gx([Fn("running"),Fn("ok"),Fn("error"),Fn("cancelled")]),durationMs:Er(el()),error:Er(an()),details:Er(Ok())}),eZ=wn({code:Er(an()),calls:eo(JX)});function Xx(e,t){return e==="pinomad.todo"&&Jd(GX,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&Jd(YX,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&Jd(QX,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&Jd(eZ,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}function tZ(e){return e.flatMap(t=>{const n=Xx(t.presentation,t.value);return n.type!=="pinomad.question"?[]:n.value.requests.filter(s=>s.resolution===void 0).map(s=>({kind:t.kind,request:s}))})}function nZ(e,t,n){return Array.from({length:e},(s,r)=>({selected:t[r]??[],...n[r]===void 0||n[r].trim()===""?{}:{other:n[r]}}))}const sZ={border:"1px solid var(--color-border-primary, var(--color-background-muted))",borderRadius:"var(--radius-md, 8px)",padding:"var(--space-3, 12px)",backgroundColor:"var(--color-background-surface)"};function m$({docs:e,remote:t,connected:n,target:s}){const r=tZ(e);return r.length===0?null:o.jsx(fe,{gap:2,padding:2,"data-testid":"pending-questions",children:r.map(({kind:i,request:a})=>o.jsx(rZ,{kind:i,request:a,remote:t,connected:n,target:s},a.id))})}function rZ({kind:e,request:t,remote:n,connected:s,target:r}){const[i,a]=x.useState(()=>t.questions.map(()=>[])),[l,c]=x.useState(()=>t.questions.map(()=>"")),u=(h,p)=>a(m=>m.map((b,y)=>y===h?p:b)),d=(h,p)=>c(m=>m.map((b,y)=>y===h?p:b)),f=()=>{const h=nZ(t.questions.length,i,l);n.controller.answer(e,t.id,h,r)};return o.jsxs(fe,{gap:3,style:sZ,children:[o.jsx(ee,{type:"label",weight:"semibold",children:"The agent asks"}),t.questions.map((h,p)=>{var m;return o.jsxs(fe,{gap:1,children:[o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(vn,{label:h.header,size:"sm"}),o.jsx(ee,{type:"body",children:h.question})]}),h.multiSelect===!0?o.jsx(Z0,{label:h.header,isLabelHidden:!0,value:i[p]??[],onChange:b=>u(p,b),children:h.options.map(b=>o.jsx(Y0,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}):o.jsx(h6,{label:h.header,isLabelHidden:!0,value:((m=i[p])==null?void 0:m[0])??"",onChange:b=>u(p,[b]),children:h.options.map(b=>o.jsx(x6,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}),o.jsx(gs,{label:"Other",value:l[p]??"",onChange:b=>d(p,b),placeholder:"Type a custom answer…"})]},p)}),o.jsx(we,{hAlign:"end",children:o.jsx(re,{label:"Submit",variant:"primary",isDisabled:!s,onClick:f})})]})}const iZ=150,aZ=(e,t)=>`${e}${t}`;function oZ(e){let t=0,n;const s=new Map,r=a=>s.get(a)===t,i=(a,l)=>{s.get(a)===l&&s.delete(a)};return{request(a,l,c){if(n!==void 0&&(clearTimeout(n.timer),n=void 0),r(a))return;const u=t;n={cacheKey:a,timer:setTimeout(()=>{n=void 0,!(u!==t||r(a))&&(s.set(a,u),c().then(d=>{i(a,u),u===t&&e(a,l,d.files)},()=>{i(a,u)}))},iZ)}},cancel(){t+=1,n!==void 0&&(clearTimeout(n.timer),n=void 0)}}}const k5=5e3,lZ=e=>({id:`agent:${e.name}`,label:e.name,auxiliaryData:{kind:"agent",group:"Agents",description:e.description,insert:`@${e.name} `}}),b5=e=>({id:`file:${e}`,label:e,auxiliaryData:{kind:"file",group:"Files",insert:`@./${e} `}}),v5=e=>e.auxiliaryData;function Hk(e,t,n){const s=(e==null?void 0:e.roles)??[],[r,i]=x.useState({byKey:{}}),a=x.useRef(n);a.current=n;const l=x.useRef(void 0);l.current??(l.current=oZ((u,d,f)=>{i(h=>{const p=Date.now(),m={};for(const[b,y]of Object.entries(h.byKey))p-y.at<k5&&(m[b]=y);return m[u]={files:f,at:p},{byKey:m,latest:{scope:d,files:f}}})})),x.useEffect(()=>()=>{var u;return(u=l.current)==null?void 0:u.cancel()},[]),x.useEffect(()=>{var u;r.latest!==void 0&&((u=t.current)==null||u.emitInput())},[r]);const c=n!==void 0;return x.useMemo(()=>{if(s.length===0&&!c)return;const u=l.current,d={bootstrap:()=>[],search:h=>{const p=h.toLowerCase(),m=s.filter(v=>v.name.includes(p)).map(lZ),b=a.current;if(b===void 0)return m;const y=h.startsWith("./")?h.slice(2):h,g=aZ(b.key,y),k=r.byKey[g];return k!==void 0&&Date.now()-k.at<k5?[...m,...k.files.map(b5)]:(u.request(g,b.key,()=>b.list(y)),r.latest!==void 0&&r.latest.scope===b.key?[...m,...r.latest.files.map(b5)]:m)},cancel:()=>u.cancel()},f=s.length>0&&c?"Agents and files":s.length>0?"Named agents":"Files";return[{character:"@",searchSource:d,menuLabel:f,emptySearchResultsText:`No matching ${s.length>0&&c?"agents or files":s.length>0?"agents":"files"}`,renderItem:h=>{const p=v5(h),m=(p==null?void 0:p.kind)==="file"?pk:hk;return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(m,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate",children:h.label}),(p==null?void 0:p.description)===void 0?null:o.jsx("span",{className:"block truncate text-xs text-muted",children:p.description})]})]})},onSelect:h=>{var p;return((p=v5(h))==null?void 0:p.insert)??""}}]},[s,r,c])}function Mp(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function cZ({disabled:e=!1,placeholder:t,inputRef:n,onSubmitRequest:s,value:r,onValueChange:i,onFiles:a,triggers:l}){const c=x.useRef(null),u=x.useRef(null);x.useEffect(()=>{if(n)return n.current={focus:()=>{var f;return(f=u.current)==null?void 0:f.focus()},focusAtEnd:()=>{const f=Mp(c.current);if(!f)return;f.focus();const h=window.getSelection();if(!h)return;const p=document.createRange();p.selectNodeContents(f),p.collapse(!1),h.removeAllRanges(),h.addRange(p)},emitInput:()=>{const f=Mp(c.current);f!==null&&(document.activeElement===f||f.contains(document.activeElement))&&f.dispatchEvent(new Event("input",{bubbles:!0}))}},()=>{n.current=null}},[n]),x.useEffect(()=>{const f=Mp(c.current);f&&(t?f.setAttribute("aria-placeholder",t):f.removeAttribute("aria-placeholder"),e?f.setAttribute("aria-disabled","true"):f.removeAttribute("aria-disabled"))},[t,e]);const d=f=>{f.nativeEvent.isComposing||f.nativeEvent.keyCode===229||f.key==="Enter"&&(f.shiftKey||(f.preventDefault(),s()))};return o.jsx(W0,{ref:c,className:"prompt-input__input",handleRef:u,hasHistory:!1,isDisabled:e,label:"Prompt",pasteAsToken:!1,placeholder:t,value:r,onChange:f=>i==null?void 0:i(f),onKeyDown:d,...a===void 0?{}:{onFiles:a},...l===void 0?{}:{triggers:[...l]}})}function Pk({value:e,status:t="ready",className:n="",placeholder:s,inputRef:r,isDisabled:i=!1,submitDisabled:a=!1,attachments:l,hasAttachments:c,onFiles:u,triggers:d,startActions:f,endActions:h,footer:p,error:m,accent:b,accentFocusRing:y=!1,onSubmit:g,onStop:k,onValueChange:v,...w}){const S=(t==="streaming"||t==="submitted")&&!e.trim()&&c!==!0&&!!k,C=!a&&(!!e.trim()||c===!0),E=()=>{C&&(g==null||g())},T=N=>{u===void 0||!N.dataTransfer.types.includes("Files")||N.preventDefault()},$=N=>{if(u===void 0||!N.dataTransfer.types.includes("Files"))return;N.preventDefault();const A=[...N.dataTransfer.files];A.length>0&&u(A)};return o.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-accent":b,"data-accent-focus":b&&y?"":void 0,"data-slot":"prompt-input","data-status":t,onDragOver:T,onDrop:$,...w,children:[o.jsx(H4,{elevation:"low",...l===void 0?{}:{drawer:o.jsx(P4,{children:l})},footerActions:f,input:o.jsx(cZ,{disabled:i,inputRef:r,placeholder:s,value:e,onValueChange:v,onSubmitRequest:E,onFiles:u,triggers:d}),isStopShown:S&&!i,placeholder:s,sendActions:h,sendButton:o.jsx(K0,{className:"pigui-pressable",isDisabled:i||!S&&!C,onSend:E}),status:m?{type:"error",message:m}:void 0,value:e,onChange:N=>v==null?void 0:v(N),onStop:k,onSubmit:E}),p?o.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:p}):null]})}const uZ=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],w5=120;function dZ(e){if(!(typeof e!="object"||e===null))for(const t of uZ){const n=e[t];if(typeof n=="string"&&n.length>0)return n.length>w5?`${n.slice(0,w5)}…`:n}}function Ca(e){if(!(e!=null&&e.startsWith("mcp__")))return e;const t=e.slice(5),n=t.indexOf("__");return n===-1?t:`${t.slice(0,n)}/${t.slice(n+2)}`}function Uk(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}return dZ(t)}function y$(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}const fZ={bash:"shell",shell:"shell",sh:"shell",terminal:"shell",cmd:"shell",grep:"search",find:"search",glob:"search",ls:"search",search:"search",web_search:"web",websearch:"web",webfetch:"web",web_fetch:"web",web:"web",browser:"web",read:"file",read_file:"file",cat:"file",edit:"edit",write:"edit",write_file:"edit",str_replace:"edit"};function k$(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function Ph(e){return fZ[k$(e)]??"tool"}function hZ(e){const t=new Set(e.map(n=>Ph(n.toolName)));return t.size===1?[...t][0]:"tool"}const xZ=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,pZ=/^\+\s*\d+ /,gZ=/^-\s*\d+ /;function mZ(e){let t=0,n=0,s=0,r=0,i=!1;for(const a of e.split(`
|
|
381
|
-
`)){const l=xZ.exec(a);if(l){s=Number.parseInt(l[2]??"1",10),r=Number.parseInt(l[4]??"1",10),i=!0;continue}if(!i)continue;if(s===0&&r===0){i=!1;continue}const c=a.charAt(0);c===" "?(s-=1,r-=1):c==="-"?(s-=1,n+=1):c==="+"&&(r-=1,t+=1)}return{additions:t,deletions:n}}function yZ(e){let t=0,n=0;for(const s of e.split(`
|
|
382
|
-
`))pZ.test(s)?t+=1:gZ.test(s)&&(n+=1);return{additions:t,deletions:n}}function kZ(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return}if(typeof t!="object"||t===null)return;const n=t.details;if(typeof n!="object"||n===null)return;const{patch:s,diff:r}=n,i=typeof s=="string"?mZ(s):typeof r=="string"?yZ(r):void 0;return i!==void 0&&(i.additions>0||i.deletions>0)?i:void 0}function Fk(e){return e.pinomad}function b$(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function v$(e){return typeof e=="string"?[]:e.flatMap(t=>t.type==="image"&&t.data!==void 0&&t.mimeType!==void 0?[{data:t.data,mimeType:t.mimeType}]:[])}const tl=e=>e.type==="toolCall"&&e.id!==void 0;function bZ(e,t){if(e!==void 0){if(t==="codemode"&&typeof e=="object"&&e!==null){const n=e.code;if(typeof n=="string")return n}return JSON.stringify(e)}}function vZ(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function wZ(e,t){const n=e.status==="ok"?"output-available":(e.status==="error","output-error"),s=e.status==="error"?e.error:n==="output-error"?"Cancelled":void 0,r=e.details===void 0?void 0:Xx(t[e.name],e.details),i=(r==null?void 0:r.type)==="pinomad.diff"?{kind:"diff",patch:r.value.patch}:void 0;return{state:n,toolName:e.name,argsText:e.args,...s===void 0?{}:{output:s},...e.durationMs===void 0?{}:{durationMs:e.durationMs},...i===void 0?{}:{pinomad:i}}}function jZ(e){const t=e.summary;return{state:e.status!=="done"?"input-available":t===void 0||t.isError?"output-error":"output-available",toolCallId:e.callId,toolName:e.name,argsText:JSON.stringify(e.arguments),...(t==null?void 0:t.error)===void 0?{}:{output:t.error},...(t==null?void 0:t.durationMs)===void 0?{}:{durationMs:t.durationMs}}}function SZ(e,t,n,s,r){const i=e.id,a=t.results.get(i),l=t.partial?void 0:n.get(i),c=(l==null?void 0:l.name)??e.name,u=bZ(e.arguments,c);let d,f;a!==void 0?(d=a.isError===!0?"output-error":"output-available",f=b$(a.content)):(l==null?void 0:l.status)==="running"?(d="input-available",f=l.output):t.partial===!0?d="input-streaming":t.msg.stopReason!=="toolUse"?(d="output-error",f="Not run: the answer was interrupted."):(d="input-available",f=l==null?void 0:l.output);const h=(a==null?void 0:a.details)??(l==null?void 0:l.details),p=h===void 0?void 0:Xx(r[c??""],h),m=a!==void 0&&a.isError!==!0?kZ({details:a.details}):void 0,b=a===void 0?[]:v$(a.content),y=vZ(h);let g,k;if((p==null?void 0:p.type)==="pinomad.diff")g={kind:"diff",patch:p.value.patch};else if(y!==void 0){const v=h;g={kind:"subagent",conversationId:y,...f===void 0?{}:{output:f},...typeof v.model=="string"?{model:v.model}:{},...typeof v.startedAt=="number"?{startedAt:v.startedAt}:{},...typeof(a==null?void 0:a.timestamp)=="number"?{endedAt:a.timestamp}:{}}}return c==="codemode"&&a===void 0?k=(s.get(i)??[]).map(jZ):(p==null?void 0:p.type)==="pinomad.codemode"&&(k=p.value.calls.map(v=>wZ(v,r))),{state:d,toolCallId:i,...c===void 0?{}:{toolName:c},...u===void 0?{}:{argsText:u},...f===void 0?{}:{output:f},...m===void 0?{}:{diffStat:m},...b.length===0?{}:{images:b},...k===void 0||k.length===0?{}:{children:k},...g===void 0?{}:{pinomad:g}}}function $Z(e){const t=[];for(const n of e)if(tl(n)){const s=t[t.length-1];(s==null?void 0:s.kind)==="tools"?s.blocks.push(n):t.push({kind:"tools",blocks:[n]})}else n.type==="thinking"?t.push({kind:"thinking",block:n}):n.type==="text"&&t.push({kind:"text",block:n});return t}function CZ(e,t,n,s,r){var N,A,M;const i=new Map(((N=s?n.tools:void 0)==null?void 0:N.map(I=>[I.callId,I]))??[]),a=new Map;if(s)for(const I of n.nestedTools??[]){if(I.name.startsWith("pi."))continue;const R=a.get(I.parentCallId);R===void 0?a.set(I.parentCallId,[I]):R.push(I)}const l=s?(A=n.generation)==null?void 0:A.message:void 0,c=new Map,u=[...t.assistants.map(({id:I,msg:R,results:z})=>({id:I,msg:R,results:z})),...l===void 0?[]:[{id:"live",msg:l,partial:!0,results:c}]],d=u[u.length-1],f=t.assistants[t.assistants.length-1],h=!s,m=(d===void 0?[]:d.msg.content.filter(I=>I.type==="text")).map(I=>I.text??"").join(""),b=(d==null?void 0:d.msg.content.some(tl))===!0,y=m!==""&&(h||!b),g=(I,R)=>tl(R)&&!I.results.has(R.id)&&(I.partial===!0||I.msg.stopReason==="toolUse"),k=u.some(I=>I.msg.content.some(R=>g(I,R))),v=d==null?void 0:d.msg.content[d.msg.content.length-1];let w;h?w="settled":y?w="answering":k||v!==void 0&&tl(v)?w="acting":u.length>0?w="thinking":w="hidden";const j=w==="thinking"||w==="acting",S=[];for(const I of u){const R=I===d,z=I.msg.content;$Z(z).forEach((_,O)=>{if(_.kind==="tools"){const L=_.blocks.filter(P=>g(I,P)),B=j&&L.length>0;S.push({kind:"tools",id:`${I.id}-tools-${O}`,tools:_.blocks.map(P=>SZ(P,I,i,a,r)),live:B,...B&&L[0]!==void 0?{activeToolCallId:L[0].id}:{}});return}if(_.kind==="text"){R&&y||S.push({kind:"interim",id:`${I.id}-text-${O}`,text:_.block.text??""});return}const D=z.indexOf(_.block);S.push({kind:"thinking",id:`${I.id}-thinking-${O}`,text:_.block.thinking??"",live:j&&I.partial===!0&&D===z.length-1})})}const C=(f==null?void 0:f.msg.stopReason)==="aborted",E=h&&(f==null?void 0:f.msg.stopReason)==="error",T=(M=u[0])==null?void 0:M.msg.timestamp;let $;if(h&&T!==void 0){const I=y?d==null?void 0:d.msg.timestamp:t.lastTs??(d==null?void 0:d.msg.timestamp);$=I===void 0?void 0:I-T}return{kind:"run",id:e,cot:{phase:w,...E===!0?{outcome:"failed"}:{},...T===void 0?{}:{anchorMs:T},...$===void 0?{}:{elapsedMs:$},steps:S,...y?{answer:{text:m,streaming:(d==null?void 0:d.partial)===!0}}:{}},interrupted:C,...h&&!C&&E!==!0&&f!==void 0?{forkEntryId:f.id}:{},...E===!0?{failure:(f==null?void 0:f.msg.errorMessage)??"The run failed."}:{}}}function EZ(e,t,n){var c;const s=[],r=e.docs["pi.live"]??{};let i,a=0;const l=u=>{var d;if(i!==void 0){if(i.assistants.length>0||i.orphans.size>0||u){const f=((d=i.assistants[0])==null?void 0:d.id)??`open-${a++}`;s.push(CZ(`run-${f}`,i,r,u,t))}i=void 0}};for(const u of e.entries){const d=(c=u.model)==null?void 0:c[0],f=String(u.id);if(u.kind==="pi.user"&&(d==null?void 0:d.role)==="user")l(!1),s.push({kind:"user",id:f,text:b$(d.content),images:v$(d.content)});else if(u.kind==="pi.compaction")l(!1),s.push({kind:"compaction",id:f});else if(u.kind==="pi.reset")l(!1),s.push({kind:"reset",id:f});else if(u.kind==="pi.assistant"&&(d==null?void 0:d.role)==="assistant"){i??(i={assistants:[],orphans:new Map});const h=new Map;for(const p of d.content){if(!tl(p))continue;const m=i.orphans.get(p.id);m!==void 0&&(i.orphans.delete(p.id),h.set(p.id,m))}i.assistants.push({id:f,msg:d,results:h}),i.lastTs=d.timestamp??i.lastTs}else if(u.kind==="pi.tool-result"&&(d==null?void 0:d.role)==="toolResult"&&d.toolCallId!==void 0){i??(i={assistants:[],orphans:new Map});const h=i.assistants.findLast(p=>!p.results.has(d.toolCallId)&&p.msg.content.some(m=>tl(m)&&m.id===d.toolCallId));h===void 0?i.orphans.set(d.toolCallId,d):h.results.set(d.toolCallId,d),i.lastTs=d.timestamp??i.lastTs}}return i??(i=n?{assistants:[],orphans:new Map}:void 0),l(n),s}function TZ(e){const t=e[e.length-1];if(!((t==null?void 0:t.kind)!=="run"||t.failure===void 0))for(let n=e.length-2;n>=0;n--){const s=e[n];if(s.kind!=="compaction")return s.kind!=="user"||s.text.trim()===""&&s.images.length===0?void 0:{text:s.text,images:s.images,requestId:`retry:${t.id}`}}}function zZ(e){const t=[],n=[];for(const s of e.steps){if(s.kind!=="tools"){n.push(s);continue}const r=[];if(s.tools.forEach((i,a)=>{if(i.toolName!=="subagent"){r.push(i);return}t.push({key:`${s.id}/${i.toolCallId??a}`,tool:i})}),r.length!==0)if(s.activeToolCallId!==void 0&&!r.some(i=>i.toolCallId===s.activeToolCallId)){const i=r.find(a=>a.state==="input-streaming"||a.state==="input-available");if(i===void 0){const{activeToolCallId:a,...l}=s;n.push({...l,tools:r,live:!1})}else n.push({...s,tools:r,...i.toolCallId===void 0?{}:{activeToolCallId:i.toolCallId}})}else n.push({...s,tools:r})}return{view:{...e,steps:n},subagents:t}}const j5={};function Qu(e,t){const n=x.useRef(j5);return n.current===j5&&(n.current=e(t)),n}const Rp=Q5[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],AZ=Rp&&Rp!==x.useLayoutEffect?Rp:e=>e();function Ba(e){const t=Qu(NZ).current;return t.next=e,AZ(t.effect),t.trampoline}function NZ(){const e={next:void 0,callback:MZ,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function MZ(){}function Gk(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function Wm(e,t,n,s){const r=Qu(w$).current;return IZ(r,e,t,n,s)&&j$(r,[e,t,n,s]),r.callback}function RZ(e){const t=Qu(w$).current;return _Z(t,e)&&j$(t,e),t.callback}function w$(){return{callback:null,cleanup:null,refs:[]}}function IZ(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function _Z(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function j$(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(s[r]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=s[r];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const OZ=parseInt(x.version,10);function DZ(e){return OZ>=e}function S5(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(DZ(19)?n==null?void 0:n.ref:t.ref)??null}function Km(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function LZ(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const i=t[s](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function BZ(e,t){return typeof e=="function"?e(t):e}function qZ(e,t){return typeof e=="function"?e(t):e}const Fc={};function S$(e,t,n,s,r){let i={...Xm(e,Fc)};return t&&(i=Mf(i,t)),n&&(i=Mf(i,n)),s&&(i=Mf(i,s)),i}function HZ(e){if(e.length===0)return Fc;if(e.length===1)return Xm(e[0],Fc);let t={...Xm(e[0],Fc)};for(let n=1;n<e.length;n+=1)t=Mf(t,e[n]);return t}function Mf(e,t){return $$(t)?t(e):PZ(e,t)}function PZ(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=Km(e.style,s);break}case"className":{e[n]=C$(e.className,s);break}default:UZ(n,s)?e[n]=FZ(e[n],s):e[n]=s}}return e}function UZ(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function $$(e){return typeof e=="function"}function Xm(e,t){return $$(e)?e(t):e??Fc}function FZ(e,t){return t?e?n=>{if(GZ(n)){const r=n;Zm(r);const i=t(r);return r.baseUIHandlerPrevented||e==null||e(r),i}const s=t(n);return e==null||e(n),s}:t:e}function Zm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function C$(e,t){return t?e?t+" "+e:t:e}function GZ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const ra=Object.freeze({});function Vk(e,t,n={}){const s=t.render,r=VZ(t,n);if(n.enabled===!1)return null;const i=n.state??ra;return WZ(e,s,r,i)}function VZ(e,t={}){const{className:n,style:s,render:r}=e,{state:i=ra,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?BZ(n,i):void 0,f=u?qZ(s,i):void 0,h=u?LZ(i,c):ra,p=u?Km(h,Array.isArray(l)?HZ(l):l)??ra:ra;return typeof document<"u"&&(u?Array.isArray(a)?p.ref=RZ([p.ref,S5(r),...a]):p.ref=Wm(p.ref,S5(r),a):Wm(null,null)),u?(d!==void 0&&(p.className=C$(p.className,d)),f!==void 0&&(p.style=Km(p.style,f)),p):ra}function WZ(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=S$(n,t.props);return r.ref=n.ref,x.cloneElement(t,r)}if(e&&typeof e=="string")return KZ(e,n);throw new Error(Gk(8))}function KZ(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}function XZ({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=x.useRef(e!==void 0),[i,a]=x.useState(t),l=r?e:i,c=x.useCallback(u=>{r||a(u)},[]);return[l,c]}const ZZ=()=>{},Gn=typeof document<"u"?x.useLayoutEffect:ZZ,YZ={...Q5};let $5=0;function QZ(e,t="mui"){const[n,s]=x.useState(e),r=e||n;return x.useEffect(()=>{n==null&&($5+=1,s(`${t}-${$5}`))},[n,t]),r}const C5=YZ.useId;function JZ(e,t){if(C5!==void 0){const n=C5();return`${t}-${n}`}return QZ(e,t)}function eY(e){return JZ(e,"base-ui")}const tY="none",nY="trigger-press";function E$(e,t,n,s){let r=!1,i=!1;const a=ra;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...a}}const sY=[];function T$(e){x.useEffect(e,sY)}const ef=null;class rY{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let i=0;i<n.length;i+=1)(r=n[i])==null||r.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const tf=new rY;class gt{constructor(){te(this,"currentId",ef);te(this,"cancel",()=>{this.currentId!==ef&&(tf.cancel(this.currentId),this.currentId=ef)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new gt}static request(t){return tf.request(t)}static cancel(t){return tf.cancel(t)}request(t){this.cancel(),this.currentId=tf.request(()=>{this.currentId=ef,t()})}}function z$(){const e=Qu(gt.create).current;return T$(e.disposeEffect),e}function iY(e){return e==null?e:"current"in e?e.current:e}function A$(e,t=!1,n=!0){const s=z$();return Ba((r,i=null)=>{s.cancel();const a=iY(e);a!=null&&(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?r():s.request(()=>{function l(){a&&Promise.all(a.getAnimations().map(c=>c.finished)).then(()=>{i!=null&&i.aborted||Yc.flushSync(r)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;Yc.flushSync(r)}else a.getAnimations().length>0&&a.getAnimations().some(c=>c.pending||c.playState!=="finished")&&l()})}t?s.request(l):l()}))})}function aY(e,t=!1,n=!1){const[s,r]=x.useState(e&&t?"idle":void 0),[i,a]=x.useState(e);return e&&!i&&(a(!0),r("starting")),!e&&i&&s!=="ending"&&!n&&r("ending"),!e&&!i&&s==="ending"&&r(void 0),Gn(()=>{if(!e&&i&&s!=="ending"&&n){const l=gt.request(()=>{r("ending")});return()=>{gt.cancel(l)}}},[e,i,s,n]),Gn(()=>{if(!e||t)return;const l=gt.request(()=>{Yc.flushSync(()=>{r(void 0)})});return()=>{gt.cancel(l)}},[t,e]),Gn(()=>{if(!e||!t)return;e&&i&&s!=="idle"&&r("starting");const l=gt.request(()=>{r("idle")});return()=>{gt.cancel(l)}},[t,e,i,r,s]),x.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:s}),[i,s])}function oY(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,i=t!==void 0,[a,l]=XZ({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=aY(a,!0,!0),[f,h]=x.useState(a),[{height:p,width:m},b]=x.useState({height:void 0,width:void 0}),y=eY(),[g,k]=x.useState(),v=g??y,[w,j]=x.useState(!1),[S,C]=x.useState(!1),E=x.useRef(null),T=x.useRef(null),$=x.useRef(null),N=x.useRef(null),A=A$(N,!1),M=Ba(I=>{const R=!a,z=E$(nY,I.nativeEvent);if(s(R,z),z.isCanceled)return;const _=N.current;T.current==="css-animation"&&_!=null&&_.style.removeProperty("animation-name"),!w&&!S&&(T.current!=null&&T.current!=="css-animation"&&!c&&R&&u(!0),T.current==="css-animation"&&(!f&&R&&h(!0),!c&&R&&u(!0))),l(R),T.current==="none"&&c&&!R&&u(!1)});return Gn(()=>{i&&T.current==="none"&&!S&&!a&&u(!1)},[i,S,a,t,u]),x.useMemo(()=>({abortControllerRef:E,animationTypeRef:T,disabled:r,handleTrigger:M,height:p,mounted:c,open:a,panelId:v,panelRef:N,runOnceAnimationsFinish:A,setDimensions:b,setHiddenUntilFound:j,setKeepMounted:C,setMounted:u,setOpen:l,setPanelIdState:k,setVisible:h,transitionDimensionRef:$,transitionStatus:d,visible:f,width:m}),[E,T,r,M,p,c,a,v,N,A,b,j,C,u,l,h,$,d,f,m])}const N$=x.createContext(void 0);function M$(){const e=x.useContext(N$);if(e===void 0)throw new Error(Gk(15));return e}let Uh=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const lY={[Uh.startingStyle]:""},cY={[Uh.endingStyle]:""},R$={transitionStatus(e){return e==="starting"?lY:e==="ending"?cY:null}};let Gc=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Uh.startingStyle]="startingStyle",e[e.endingStyle=Uh.endingStyle]="endingStyle",e}({}),uY=function(e){return e.panelOpen="data-panel-open",e}({});const dY={[Gc.open]:""},fY={[Gc.closed]:""},hY={open(e){return e?{[uY.panelOpen]:""}:null}},xY={open(e){return e?dY:fY}},I$={...xY,...R$},Wk=x.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:l,open:c,...u}=t,d=Ba(l),f=oY({open:c,defaultOpen:i,onOpenChange:d,disabled:a}),h=x.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),p=x.useMemo(()=>({...f,onOpenChange:d,state:h}),[f,d,h]),m=Vk("div",t,{state:h,ref:n,props:u,stateAttributesMapping:I$});return o.jsx(N$.Provider,{value:p,children:m})});function pY(){return typeof window<"u"}function gY(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mY(e){return pY()?e instanceof HTMLElement||e instanceof gY(e).HTMLElement:!1}const yY=x.createContext(void 0);function kY(e=!1){const t=x.useContext(yY);if(t===void 0&&!e)throw new Error(Gk(16));return t}function bY(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:i}=e,a=s&&t!==!1,l=s&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(u.tabIndex=r,!i&&n&&(u.tabIndex=t?r:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||l)&&(u.disabled=n),u},[s,n,t,a,l,i,r])}}function vY(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,i=x.useRef(null),a=kY(!0)!==void 0,l=Ba(()=>{const h=i.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:c}=bY({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:s,isNativeButton:r}),u=x.useCallback(()=>{const h=i.current;wY(h)&&a&&t&&c.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,c.disabled,a]);Gn(u,[u]);const d=x.useCallback((h={})=>{const{onClick:p,onMouseDown:m,onKeyUp:b,onKeyDown:y,onPointerDown:g,...k}=h;return S$({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}p==null||p(w)},onMouseDown(w){t||m==null||m(w)},onKeyDown(w){if(t||(Zm(w),y==null||y(w)),w.baseUIHandlerPrevented)return;const j=w.target===w.currentTarget&&!r&&!l()&&!t,S=w.key==="Enter",C=w.key===" ";j&&((C||S)&&w.preventDefault(),S&&(p==null||p(w)))},onKeyUp(w){t||(Zm(w),b==null||b(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!r&&!t&&w.key===" "&&(p==null||p(w))},onPointerDown(w){if(t){w.preventDefault();return}g==null||g(w)}},r?void 0:{role:"button"},c,k)},[t,c,r,l]),f=Ba(h=>{i.current=h,u()});return{getButtonProps:d,buttonRef:f}}function wY(e){return mY(e)&&e.tagName==="BUTTON"}const jY={...hY,...R$},Kk=x.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:i,state:a,disabled:l}=M$(),{className:c,disabled:u=l,id:d,render:f,nativeButton:h=!0,...p}=t,{getButtonProps:m,buttonRef:b}=vY({disabled:u,focusableWhenDisabled:!0,native:h}),y=x.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,disabled:u,onClick:i}),[s,u,r,i]);return Vk("button",t,{state:a,ref:[n,b],props:[y,p,m],stateAttributesMapping:jY})});let SY=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function $Y(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:i,keepMounted:a,id:l,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:h,setDimensions:p,setMounted:m,setOpen:b,setVisible:y,transitionDimensionRef:g,visible:k,width:v}=e,w=x.useRef(!1),j=x.useRef(null),S=x.useRef(d),C=x.useRef(d),E=z$(),T=x.useMemo(()=>n.current==="css-animation"?!k:!d&&!c,[d,c,k,n]),$=Ba(A=>{if(!A)return;if(n.current==null||g.current==null){const R=getComputedStyle(A),z=R.animationName!=="none"&&R.animationName!=="",_=R.transitionDuration!=="0s"&&R.transitionDuration!=="";z&&_||(R.animationName==="none"&&R.transitionDuration!=="0s"?n.current="css-transition":R.animationName!=="none"&&R.transitionDuration==="0s"?n.current="css-animation":n.current="none"),A.getAttribute(SY.orientation)==="horizontal"||R.transitionProperty.indexOf("width")>-1?g.current="width":g.current="height"}if(n.current!=="css-transition")return;(r===void 0||v===void 0)&&(p({height:A.scrollHeight,width:A.scrollWidth}),C.current&&A.style.setProperty("transition-duration","0s"));let M=-1,I=-1;return M=gt.request(()=>{C.current=!1,I=gt.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})}),()=>{gt.cancel(M),gt.cancel(I)}}),N=Wm(s,f,$);return Gn(()=>{if(n.current!=="css-transition")return;const A=f.current;if(!A)return;let M=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const I={"justify-content":A.style.justifyContent,"align-items":A.style.alignItems,"align-content":A.style.alignContent,"justify-items":A.style.justifyItems};Object.keys(I).forEach(R=>{A.style.setProperty(R,"initial","important")}),!C.current&&!a&&A.setAttribute(Gc.startingStyle,""),p({height:A.scrollHeight,width:A.scrollWidth}),M=gt.request(()=>{Object.entries(I).forEach(([R,z])=>{z===""?A.style.removeProperty(R):A.style.setProperty(R,z)})})}else{if(A.scrollHeight===0&&A.scrollWidth===0)return;p({height:A.scrollHeight,width:A.scrollWidth});const I=new AbortController;t.current=I;const R=I.signal;let z=null;const _=Gc.endingStyle;return z=new MutationObserver(O=>{O.some(L=>L.type==="attributes"&&L.attributeName===_)&&(z==null||z.disconnect(),z=null,h(()=>{p({height:0,width:0}),A.style.removeProperty("content-visibility"),m(!1),t.current===I&&(t.current=null)},R))}),z.observe(A,{attributes:!0,attributeFilter:[_]}),()=>{z==null||z.disconnect(),E.cancel(),t.current===I&&(I.abort(),t.current=null)}}return()=>{gt.cancel(M)}},[t,n,E,i,a,c,d,f,h,p,m]),Gn(()=>{if(n.current!=="css-animation")return;const A=f.current;A&&(j.current=A.style.animationName||j.current,A.style.setProperty("animation-name","none"),p({height:A.scrollHeight,width:A.scrollWidth}),!S.current&&!w.current&&A.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),y(!0)):(t.current=new AbortController,h(()=>{m(!1),y(!1),t.current=null},t.current.signal)))},[t,n,d,f,h,p,m,y,k]),T$(()=>{const A=gt.request(()=>{S.current=!1});return()=>gt.cancel(A)}),Gn(()=>{if(!i)return;const A=f.current;if(!A)return;let M=-1,I=-1;return d&&w.current&&(A.style.transitionDuration="0s",p({height:A.scrollHeight,width:A.scrollWidth}),M=gt.request(()=>{w.current=!1,I=gt.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})})),()=>{gt.cancel(M),gt.cancel(I)}},[i,d,f,p]),Gn(()=>{const A=f.current;A&&i&&T&&(A.setAttribute("hidden","until-found"),n.current==="css-transition"&&A.setAttribute(Gc.startingStyle,""))},[i,T,n,f]),x.useEffect(function(){const M=f.current;if(!M)return;function I(R){w.current=!0,b(!0),u(!0,E$(tY,R))}return M.addEventListener("beforematch",I),()=>{M.removeEventListener("beforematch",I)}},[u,f,b]),x.useMemo(()=>({props:{hidden:T,id:l,ref:N}}),[T,l,N])}let E5=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function CY(e){const t=Qu(EY,e).current;return t.next=e,Gn(t.effect),t}function EY(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function TY(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,i=CY(n),a=Ba(r),l=A$(s,n);x.useEffect(()=>{t&&l(()=>{n===i.current&&a()})},[t,n,a,l,i])}const Xk=x.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:i,render:a,id:l,...c}=t,{abortControllerRef:u,animationTypeRef:d,height:f,mounted:h,onOpenChange:p,open:m,panelId:b,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setHiddenUntilFound:v,setKeepMounted:w,setMounted:j,setPanelIdState:S,setOpen:C,setVisible:E,state:T,transitionDimensionRef:$,visible:N,width:A,transitionStatus:M}=M$(),I=r??!1,R=i??!1;Gn(()=>{if(l)return S(l),()=>{S(void 0)}},[l,S]),Gn(()=>{v(I)},[v,I]),Gn(()=>{w(R)},[w,R]);const{props:z}=$Y({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:I,id:b,keepMounted:R,mounted:h,onOpenChange:p,open:m,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setMounted:j,setOpen:C,setVisible:E,transitionDimensionRef:$,visible:N,width:A});TY({open:m&&M==="idle",ref:y,onComplete(){m&&k({height:void 0,width:void 0})}});const _=x.useMemo(()=>({...T,transitionStatus:M}),[T,M]),O=Vk("div",t,{state:_,ref:[n,y],props:[z,{style:{[E5.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[E5.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},c],stateAttributesMapping:I$});return R||I||!R&&h?O:null}),zY=860,AY=Array.from({length:9},(e,t)=>{const n=Math.floor(t/3);return(t%3+Math.abs(n-1))*90});function NY({className:e="",periodMs:t=zY,style:n,...s}){return o.jsx("span",{"aria-hidden":"true",className:`chat-pixel-loader ${e}`.trim(),"data-slot":"chat-pixel-loader",style:{"--chat-pixel-period":`${t}ms`,...n},...s,children:AY.map((r,i)=>o.jsx("span",{className:"chat-pixel-loader__cell",style:{animationDelay:`${r}ms`}},i))})}function Zx({children:e,className:t="",tone:n="default",...s}){const r=n==="brand"?" text-shimmer--brand":"";return o.jsx("span",{className:`text-shimmer${r} ${t}`.trim(),"data-slot":"text-shimmer","data-tone":n,...s,children:e})}function MY(e){const t=Math.max(0,e)/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(1)}s`}const RY=["Thinking","Pondering","Mulling","Reasoning","Exploring","Connecting dots","Weighing options","Sketching a plan"],IY=["Working","Digging in","Checking","Poking around","Running things","Reading the room","Following the trail"],_Y=4e3;function OY(e,t){const n=e==="thinking"?RY:IY,r=Math.floor(Math.max(0,t)/_Y)*1103515245+12345>>>0;return n[r%n.length]}function DY({className:e="",elapsedMs:t,phase:n,...s}){return o.jsxs("p",{className:`chat-status-line ${e}`.trim(),"data-slot":"chat-status-line",role:"status",...s,children:[o.jsx(NY,{}),o.jsxs(Zx,{className:"chat-status-line__word",children:[OY(n,t??0),"…"]}),t===void 0?null:o.jsx("span",{className:"chat-status-line__clock",children:MY(t)})]})}function LY(e){if(e===void 0||!Number.isFinite(e)||e<0)return"Worked";const t=Math.max(1,Math.round(e/1e3));if(t<60)return`Worked for ${t}s`;if(t<3600){const i=Math.floor(t/60),a=t%60;return`Worked for ${i}m ${a}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return`Worked for ${n}h ${s}m ${r}s`}function BY(e,t){const[n,s]=x.useState(()=>Date.now());if(x.useEffect(()=>{if(!t)return;const r=window.setInterval(()=>s(Date.now()),100);return()=>window.clearInterval(r)},[t]),e!==void 0)return Math.max(0,n-e)}function Vc({children:e,className:t="",defaultOpen:n=!1,elapsedMs:s,hasSteps:r=!0,phase:i,outcome:a,startedAtMs:l,...c}){const[u,d]=x.useState(n),f=i==="thinking"||i==="acting",h=BY(l,f&&s===void 0);if(i==="hidden")return null;const p=i==="settled",m=LY(s),b=a==="failed"?m.replace("Worked for","Failed after").replace("Worked","Failed"):m;return o.jsxs("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":i,"data-slot":"chain-of-thought",...c,children:[o.jsxs(Wk,{open:p?u:!0,onOpenChange:d,children:[p?r?o.jsxs(Kk,{className:"chain-of-thought__trigger","data-slot":"chain-of-thought-trigger",children:[b,o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}):o.jsx("p",{className:"chain-of-thought__label","data-slot":"chain-of-thought-label",children:b}):null,o.jsx(Xk,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:e})]}),f?o.jsx(DY,{elapsedMs:s??h,phase:i}):null]})}function qY({children:e,className:t="",...n}){return o.jsx("ol",{className:`chain-of-thought__steps ${t}`.trim(),"data-slot":"chain-of-thought-steps",...n,children:e})}function HY({children:e,className:t="",...n}){return o.jsx("li",{className:`chain-of-thought__step ${t}`.trim(),"data-slot":"chain-of-thought-step",...n,children:e})}Vc.Steps=qY;Vc.Step=HY;const Ym=x.createContext(!1);function PY(e){var l;if(!e||/^[#?]/.test(e)||e.startsWith("//")||e.includes("\\")||/^(mailto|tel|data|javascript):/i.test(e)||/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(e))return null;const[t,n=""]=e.split("#",2),s=/:(\d+)(?::\d+)?$/.exec(t??""),r=s?t.slice(0,s.index):t??"";if(!r||r.endsWith("/"))return null;const i=Number(((l=/^L(\d+)(?:-L?\d+)?$/.exec(n))==null?void 0:l[1])??(s==null?void 0:s[1])),a=r.slice(r.lastIndexOf("/")+1);return{path:r,name:a,...Number.isSafeInteger(i)&&i>0?{line:i}:{}}}function UY(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function FY({href:e,children:t}){const n=PY(e);if(!n){const i=/^https?:\/\//.test(e);return o.jsx(k6,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...i?{target:"_blank",rel:"noopener noreferrer"}:{},children:o.jsx(Ym.Provider,{value:!0,children:t})})}const s=UY(t),r=s!==null&&(s===e||s===n.path||n.line!==void 0&&s===`${n.path}:${n.line}`);return o.jsxs("a",{className:"chat-file-link","data-slot":"chat-file-link",href:e,title:n.line?`${n.path}:${n.line}`:n.path,children:[o.jsx(pk,{"aria-hidden":!0,className:"chat-file-link__icon"}),o.jsx(Ym.Provider,{value:!0,children:r?n.line?`${n.name}:${n.line}`:n.name:t})]})}const _$=3,O$=x.createContext(void 0);function D$({children:e}){const t=x.useContext(O$),n=x.useContext(Ym),s=o.jsx(L0,{className:"chat-inline-code","data-slot":"chat-inline-code",children:e}),r=typeof e=="string"?e.trim():e;return!n&&typeof r=="string"&&(t!=null&&t.has(r))?o.jsx("a",{href:r,className:"chat-inline-code-link","data-slot":"chat-inline-code-link",title:r,children:s}):s}const L$={inlineCode:D$},B$={inlineCode:D$,link:FY};function GY({children:e,fileLinks:t=!1,linkedInlineCode:n,className:s="",...r}){return o.jsx("div",{className:`chat-markdown ${s}`.trim(),"data-slot":"chat-markdown","data-testid":"markdown-renderer",...r,children:o.jsx(O$.Provider,{value:t?n:void 0,children:o.jsx(iy,{components:t?B$:L$,density:"compact",headingLevelStart:_$,children:e})})})}function VY({children:e,isStreaming:t=!1,fileLinks:n=!1,className:s="",...r}){return o.jsx("div",{className:`chat-markdown chat-markdown--stream ${s}`.trim(),"data-is-streaming":String(!!t),"data-slot":"chat-stream-markdown","data-testid":"stream-markdown-renderer",...r,children:o.jsx(iy,{components:n?B$:L$,density:"compact",headingLevelStart:_$,isStreaming:t,children:e})})}function WY({children:e,className:t="",...n}){return o.jsx(X0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function KY({children:e,className:t="",...n}){return o.jsx(X0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function XY({children:e,className:t="",...n}){return o.jsx(F4,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function ZY({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function YY({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function Yx({"aria-label":e,tooltip:t,onPress:n,children:s,className:r="",...i}){return o.jsx("button",{"aria-label":e,className:`chat-message__action ${r}`.trim(),"data-slot":"chat-message-action",title:t,type:"button",onClick:n,...i,children:s})}function qa({children:e,className:t="",...n}){return o.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function QY(e){return o.jsx(Yx,{...e,children:o.jsx(rH,{"aria-hidden":"true",size:16})})}function JY(e){return o.jsx(Yx,{...e,children:o.jsx(gH,{"aria-hidden":"true",size:16})})}function eQ(e){return o.jsx(Yx,{...e,children:o.jsx(pH,{"aria-hidden":"true",size:16})})}qa.Copy=QY;qa.ThumbsUp=JY;qa.ThumbsDown=eQ;const fa={User:WY,Assistant:KY,Bubble:XY,Body:ZY,Content:YY,Action:Yx},tQ=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function nQ(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;if(e&&typeof e=="object"&&"message"in e){const t=e.message;if(typeof t=="string")return t}return""}function q$(e,t=0){if(t>4)return{message:""};const n=nQ(e);if(!e||typeof e!="object")return{message:n};const s=e,r=sQ(s),i=typeof s.code=="string"&&tQ.has(s.code)?s.code:void 0,a=q$(s.cause,t+1),l=a.message&&!n.includes(a.message)?a.message:"";return{status:r??a.status,networkCode:i??a.networkCode,message:[n,l].filter(Boolean).join(" ")}}function sQ(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(T5(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(T5(n)&&typeof n.statusCode=="number")return n.statusCode}function T5(e){return typeof e=="object"&&e!==null}const rQ=/network.?error|connection.?error|connection.?refused|connection.?lost|other side closed|fetch failed|getaddrinfo|ENOTFOUND|EAI_AGAIN|upstream.?connect|reset before headers|socket hang up|socket connection was closed|timed? out|timeout|terminated|websocket.?closed|websocket.?error|ended without|stream ended before message_stop|stream ended before a terminal response event|http2 request did not get a response|ECONNREFUSED|ETIMEDOUT|ECONNRESET|UND_ERR_/i,iQ=/invalid_grant|oauth refresh failed|refresh.?token/i;function aQ(e){return e.status===401||/\b401\b/.test(e.message)?"auth":e.status===403||/\b403\b/.test(e.message)||/\b(?:plan|subscription|entitlement)\b/i.test(e.message)?"entitlement":e.networkCode||rQ.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||iQ.test(e.message)?"auth":"unknown"}function oQ(e){return aQ(q$(e))}function lQ(e){const t=oQ(e);return t==="auth"?{title:"Provider authentication failed",description:"The provider rejected the credentials. Sign in again or update them in Provider settings, then retry. You can also choose another model."}:t==="entitlement"?{title:"This model is not included in your subscription plan",description:"Test the connection in Settings → Providers."}:/\b429\b|rate.?limit|quota.?exceeded/i.test(e)?{title:"Provider limit reached",description:"Wait a moment, or choose another model and retry."}:{title:"Run failed",description:/[{}\n]/.test(e)?"The provider could not complete this request. Check the error details, then retry or choose another model.":e}}function cQ({error:e,onRetry:t,onOpenProviderSettings:n,modelControl:s,className:r,...i}){const[a,l]=x.useState(!1),[c,u]=x.useState(!1),d=x.useRef(!1),[f,h]=x.useState(null),p=lQ(e),m=async()=>{if(!(!t||d.current)){d.current=!0,l(!0),h(null);try{await t()}catch(b){h(b instanceof Error?b.message:"Retry could not start.")}finally{d.current=!1,l(!1)}}};return o.jsxs(fe,{className:r,gap:2,...i,children:[o.jsx(yt,{status:"error",title:p.title,description:p.description}),o.jsxs(we,{gap:2,wrap:"wrap",children:[n?o.jsx(re,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,s,t?o.jsx(re,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:a,onClick:()=>void m()}):null]}),f?o.jsx(ee,{role:"alert",style:{color:"var(--danger)"},children:f}):null,o.jsx(f6,{trigger:o.jsx(ee,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:c,onOpenChange:u,children:c?o.jsx(ee,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}const Qm=e=>`data:${e.mimeType};base64,${e.data}`;function uQ({images:e}){const[t,n]=x.useState(void 0);return e.length===0?null:o.jsxs("div",{className:"flex flex-wrap justify-end gap-2","data-testid":"message-images",children:[e.map((s,r)=>o.jsx(Zf,{src:Qm(s),alt:`Image ${r+1}`,onClick:()=>n(r)},r)),t===void 0?null:o.jsx(y6,{isOpen:!0,media:e.map((s,r)=>({src:Qm(s),alt:`Image ${r+1}`})),index:t,onIndexChange:n,onOpenChange:s=>{s||n(void 0)}})]})}const dQ=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function fQ(e){if(/^\*{1,2}$/.test(e))return"";const t=e.split("**");return t.length%2===0?t.slice(0,-1).join("**")+t[t.length-1]:e}function hQ(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function xQ(e){return e.split(dQ).map((t,n)=>t.startsWith("**")&&t.endsWith("**")&&t.length>4?o.jsx("strong",{children:t.slice(2,-2)},n):t.startsWith("*")&&t.endsWith("*")&&t.length>2&&!t.startsWith("**")?o.jsx("em",{children:t.slice(1,-1)},n):t.startsWith("`")&&t.endsWith("`")&&t.length>2?o.jsx("code",{children:t.slice(1,-1)},n):t)}function H$({text:e,unwrapLines:t=!1,className:n,...s}){let r=fQ(e);return t&&(r=hQ(r)),o.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...s,children:xQ(r)})}const pQ=300,gQ=700;function mQ(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function P$({children:e,className:t="",dwellMs:n=gQ,pageKey:s="",...r}){const i=Math.max(n,pQ),[a,l]=x.useState({key:s,node:e}),[c,u]=x.useState(null),d=x.useRef({key:s,node:e}),f=x.useRef({key:s,node:e}),h=x.useRef(Date.now()),p=x.useRef(null);return x.useEffect(()=>{if(f.current={key:s,node:e},s===d.current.key){d.current=f.current;return}const m=()=>{const y=d.current;d.current=f.current,h.current=Date.now(),l(f.current),u(mQ()?null:y.node)};if(p.current!==null)return;const b=i-(Date.now()-h.current);if(b<=0){m();return}p.current=window.setTimeout(()=>{p.current=null,f.current.key!==d.current.key&&m()},b)},[e,i,s]),x.useEffect(()=>()=>{p.current!==null&&window.clearTimeout(p.current)},[]),o.jsx("span",{className:`chat-inline-pager ${t}`.trim(),"data-slot":"chat-inline-pager",...r,children:o.jsxs("span",{className:"chat-inline-pager__flip",children:[c?o.jsx("span",{className:"chat-inline-pager__page","data-motion":"out",children:c}):null,o.jsx("span",{className:"chat-inline-pager__page","data-motion":c?"in":void 0,onAnimationEnd:m=>{m.target===m.currentTarget&&u(null)},children:s===a.key?e:a.node})]})})}function yQ(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function kQ({className:e="",dwellMs:t,step:n,...s}){const r=n.text.trim(),i=yQ(n.durationMs),a=o.jsx(P$,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?o.jsx(Zx,{className:"chat-step__label",children:"Thinking…"}):o.jsx("span",{className:"chat-step__label",children:i?o.jsxs(o.Fragment,{children:["Thought ",o.jsx("span",{className:"chat-step__meta",children:i})]}):"Thought"})});return r?o.jsxs(Wk,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:[o.jsxs(Kk,{className:"chat-step__trigger",children:[a,o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(Xk,{keepMounted:!0,className:"chat-step__panel",children:o.jsx("div",{className:"chat-step__body",children:o.jsx(H$,{text:n.text})})})]}):o.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:a})}const bQ={shell:k7,search:fH,web:aH,file:pk,edit:y7,tool:b7};function Rf({className:e="",kind:t,...n}){const s=bQ[t];return o.jsx("span",{"aria-hidden":"true",className:`chat-tool-kind ${e}`.trim(),"data-kind":t,"data-slot":"chat-tool-kind",...n,children:o.jsx(s,{})})}const vQ={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"};function U$(e){var t,n;return e.argsText!=null||e.output!=null||(((t=e.children)==null?void 0:t.length)??0)>0||e.detail!=null||(((n=e.images)==null?void 0:n.length)??0)>0}function F$({tool:e,className:t,...n}){var s,r;return o.jsxs("div",{className:t,...n,children:[e.detail!==void 0&&e.detail!==null?e.detail:o.jsxs(o.Fragment,{children:[e.argsText!=null?o.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-args",children:e.argsText}):null,e.output!==void 0?o.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-result",children:e.output}):null]}),(s=e.children)!=null&&s.length?o.jsx("ol",{className:"chat-tool-step__list","data-slot":"chat-tool-children",children:e.children.map((i,a)=>o.jsxs("li",{className:"chat-tool-step__item",children:[o.jsx(Rf,{kind:Ph(i.toolName)}),o.jsx(G$,{tools:[i]})]},i.toolCallId??a))}):null,(r=e.images)==null?void 0:r.map((i,a)=>o.jsx("img",{src:`data:${i.mimeType};base64,${i.data}`,alt:"",style:{maxWidth:"100%"}},a))]})}function wQ(e,t){const n=U$(e)?o.jsx(F$,{tool:e}):void 0;return{name:Ca(e.toolName)??"tool",status:vQ[e.state],target:Uk(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:y$(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function G$({tools:e,className:t="",...n}){return e.length?o.jsx("div",{className:`chat-tool ${t}`.trim(),"data-slot":"chat-tool-group","data-tool-count":e.length,"data-state":e.length===1?e[0].state:void 0,...n,children:o.jsx(W4,{calls:e.map(wQ)})}):null}const pc={past:"Ran",noun:["command","commands"]},Ip={past:"Read",noun:["file","files"]},z5={past:"Edited",noun:["file","files"]},A5={past:"Wrote",noun:["file","files"]},N5={past:"Searched",noun:["pattern","patterns"]},M5={past:"Searched",noun:["path","paths"]},jQ={past:"Listed",noun:["directory","directories"]},R5={past:"Searched",noun:["web page","web pages"]},nf={past:"Fetched",noun:["page","pages"]},SQ={bash:pc,shell:pc,sh:pc,terminal:pc,cmd:pc,read:Ip,read_file:Ip,cat:Ip,edit:z5,str_replace:z5,write:A5,write_file:A5,grep:N5,find:M5,glob:M5,ls:jQ,search:N5,web_search:R5,websearch:R5,webfetch:nf,web_fetch:nf,web:nf,browser:nf},V$={past:"Used",noun:["tool","tools"]};function I5(e){return SQ[k$(e)]??V$}const _5=72;function $Q(e){return e.length<=_5?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,_5-1)}…`}function O5(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function CQ(e){if(e.length===1){const[n]=e,s=I5(n.toolName),r=Uk(n.argsText);return r?`${s.past} ${$Q(r)}`:s===V$?`Used ${Ca(n.toolName)??"a tool"}`:`${s.past} ${O5(1,s.noun)}`}const t=new Map;for(const n of e){const s=I5(n.toolName),r=`${s.past}:${s.noun[1]}`,i=t.get(r)??{verb:s,count:0};i.count+=1,t.set(r,i)}return[...t.values()].map(({verb:n,count:s},r)=>{const i=`${n.past} ${O5(s,n.noun)}`;return r===0?i:i.charAt(0).toLowerCase()+i.slice(1)}).join(", ")}function W$(e){const t=[];for(const n of e.children??[])t.push(n,...W$(n));return t}function EQ({className:e="",dwellMs:t,step:n,...s}){const{tools:r}=n,i=r.filter(y=>y.state==="output-error").length,a=r.flatMap(W$),l=a.length,c=a.filter(y=>y.state==="output-error").length,u=r.reduce((y,g)=>y+(g.durationMs??0),0),d=r.reduce((y,g)=>g.diffStat?{additions:((y==null?void 0:y.additions)??0)+g.diffStat.additions,deletions:((y==null?void 0:y.deletions)??0)+g.diffStat.deletions}:y,void 0),f=r.find(y=>y.toolCallId===n.activeToolCallId)??r[r.length-1];let h,p=f;for(;p;){const y=(p.children??[]).filter(k=>k.state==="input-available"),g=y[y.length-1];if(!g)break;h=g,p=g}const m=n.live?Ph(f==null?void 0:f.toolName):hZ(r),b=n.live?`running:${(f==null?void 0:f.toolCallId)??"none"}`:"settled";return o.jsxs(Wk,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...s,children:[o.jsxs(Kk,{className:"chat-step__trigger",children:[o.jsx(P$,{dwellMs:t,pageKey:b,children:n.live?o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Rf,{kind:m}),o.jsx(Zx,{className:"chat-step__label",children:f!=null&&f.toolName?h!=null&&h.toolName?`Running ${Ca(f.toolName)} › ${Ca(h.toolName)}…`:`Running ${Ca(f.toolName)}…`:"Running…"})]}):o.jsxs("span",{className:"chat-tool-step__page",children:[o.jsx(Rf,{kind:m}),o.jsx("span",{className:"chat-step__label",children:CQ(r)}),l>0?o.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:l===1?"1 nested call":`${l} nested calls`}):null,c>0?o.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:c===1?"1 nested failed":`${c} nested failed`}):null,d?o.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[o.jsxs("span",{className:"text-success",children:["+",d.additions]})," ",o.jsxs("span",{className:"text-danger",children:["-",d.deletions]})]}):null,i>0?o.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:i===1?"1 failed":`${i} failed`}):null,u>0?o.jsx("span",{className:"chat-step__meta",children:y$(u)}):null]})}),o.jsx(Ai,{"aria-hidden":"true",className:"chat-step__chevron"})]}),o.jsx(Xk,{keepMounted:!0,className:"chat-step__panel",children:r.length===1?U$(r[0])?o.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:o.jsx(F$,{tool:r[0]})}):null:o.jsx("ol",{className:"chat-tool-step__list",children:r.map((y,g)=>o.jsxs("li",{className:"chat-tool-step__item",children:[o.jsx(Rf,{kind:Ph(y.toolName)}),o.jsx(G$,{tools:[y]})]},y.toolCallId??g))})})]})}const D5={done:"Done",failed:"Failed",running:"Running"};function K$(e){const t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function TQ({startedAt:e}){const t=Wl(1e3);return o.jsx(o.Fragment,{children:K$(t-e)})}function zQ({tool:e,summary:t,openInPanel:n}){const s=Fk(e),r=(s==null?void 0:s.kind)==="subagent"?s:void 0,i=e.state==="output-available"?"done":e.state==="output-error"?"failed":"running",a=t!==void 0?Yn(t):Uk(e.argsText)??"Subagent",l=r==null?void 0:r.startedAt,c=r==null?void 0:r.endedAt,u=[D5[i],(t==null?void 0:t.role)===void 0?void 0:`@${t.role}`,r==null?void 0:r.model,l===void 0?void 0:i==="running"?o.jsx(TQ,{startedAt:l},"elapsed"):c===void 0?void 0:K$(c-l)];return o.jsxs(fe,{className:"pigui-subagent-card rounded-lg border border-border p-3",gap:1,"data-slot":"subagent-card","data-status":i,children:[o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ur,{variant:i==="failed"?"error":i==="running"?"success":"neutral",label:D5[i],isPulsing:i==="running"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a}),r===void 0?null:o.jsx(re,{label:"View",variant:"ghost",size:"sm",onClick:()=>n(r.conversationId,"tasks")})]}),o.jsx("div",{className:"text-xs text-muted",children:u.map((d,f)=>d===void 0||d===""?null:f===0?o.jsx("span",{children:d},f):o.jsxs("span",{children:[" · ",d]},f))}),i==="running"&&(t==null?void 0:t.activity)!==void 0?o.jsxs("div",{className:"text-xs text-muted",children:["→ ",Ca(t.activity.tool)??t.activity.tool,t.activity.target===void 0?"":` ${t.activity.target}`]}):null,i==="failed"&&e.output!==void 0&&e.output!==""?o.jsx("div",{className:"text-xs text-muted",children:e.output}):null]})}function AQ({tools:e,summaryOf:t,openInPanel:n}){return e.length===0?null:o.jsx(fe,{gap:2,className:"pigui-subagent-cards",children:e.map(({key:s,tool:r})=>{const i=Fk(r);return o.jsx(zQ,{tool:r,summary:(i==null?void 0:i.kind)==="subagent"?t==null?void 0:t(i.conversationId):void 0,openInPanel:n},s)})})}const _p=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function NQ(e){const t=[];let n,s=0,r=0,i=!1;const a=c=>({path:c,isNew:!1,isDeleted:!1,binary:!1,additions:0,deletions:0,lines:[]}),l=()=>{n!==void 0&&(n.path===""&&n.oldPath!==void 0&&(n.path=n.oldPath),t.push(n))};for(const c of e.split(`
|
|
383
|
-
`)){if((s>0||r>0)&&n!==void 0){c.startsWith("\\")?n.lines.push({kind:"ctx",text:c}):c.startsWith("+")?(n.additions+=1,n.lines.push({kind:"add",text:c}),r-=1):c.startsWith("-")?(n.deletions+=1,n.lines.push({kind:"del",text:c}),s-=1):(n.lines.push({kind:"ctx",text:c}),s-=1,r-=1);continue}if(c.startsWith("@@")){const u=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/.exec(c);n!==void 0&&u!==null&&(s=u[2]===void 0?1:Number(u[2]),r=u[4]===void 0?1:Number(u[4]),n.lines.push({kind:"meta",text:c}));continue}if(c.startsWith("diff --git ")){l();const u=/^diff --git a\/(\S+) b\/(\S+)$/.exec(c);n=a((u==null?void 0:u[2])??c.slice(11)),i=!0;continue}if(c.startsWith("--- ")){n!==void 0&&i?(i=!1,c==="--- /dev/null"?n.isNew=!0:n.oldPath=_p(c,"---","a/")):(l(),n=a(""),c==="--- /dev/null"?n.isNew=!0:n.oldPath=_p(c,"---","a/"));continue}n!==void 0&&(c.startsWith("+++ ")?c==="+++ /dev/null"?n.isDeleted=!0:n.path=_p(c,"+++","b/"):c.startsWith("new file mode")?n.isNew=!0:c.startsWith("deleted file mode")?n.isDeleted=!0:c.startsWith("rename from ")?n.oldPath=c.slice(12):c.startsWith("rename to ")?n.path=c.slice(10):c.startsWith("copy from ")?n.oldPath=c.slice(10):c.startsWith("copy to ")?n.path=c.slice(8):(c.startsWith("Binary files")||c.startsWith("GIT binary patch"))&&(n.binary=!0))}return l(),t}const MQ={fontFamily:"var(--font-family-code)",fontSize:"var(--font-size-sm)",lineHeight:"var(--line-height-sm, 1.5)",overflowX:"auto",whiteSpace:"pre",borderRadius:"var(--radius-sm, 6px)"},RQ={add:{backgroundColor:"var(--color-success-muted)",color:"var(--color-text-primary)"},del:{backgroundColor:"var(--color-error-muted)",color:"var(--color-text-primary)"},ctx:{color:"var(--color-text-secondary)"},meta:{color:"var(--color-text-accent)",backgroundColor:"var(--color-background-muted)"}};function X$({patch:e}){const t=x.useMemo(()=>NQ(e),[e]);return t.length===0?o.jsx(ee,{type:"supporting",children:"No changes."}):o.jsx(fe,{gap:2,children:t.map((n,s)=>o.jsxs(fe,{gap:0,children:[o.jsxs(we,{gap:2,vAlign:"center",padding:1,children:[o.jsx(ee,{type:"supporting",weight:"semibold",maxLines:1,children:n.oldPath!==void 0&&n.oldPath!==n.path?`${n.oldPath} → ${n.path}`:n.path}),n.isNew?o.jsx(vn,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?o.jsx(vn,{label:"deleted",color:"red",size:"sm"}):null,o.jsxs(ee,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?o.jsx(ee,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:o.jsx("div",{style:MQ,children:n.lines.map((r,i)=>o.jsx("div",{style:RQ[r.kind],children:r.text},i))})]},`${n.path}-${s}`))})}function IQ(e){return e.kind==="diff"?o.jsx(X$,{patch:e.patch}):void 0}function _Q(e){const t=n=>{var a;const s=Fk(n),r=s===void 0?void 0:IQ(s),i=(a=n.children)==null?void 0:a.map(t);return r===void 0&&i===void 0?n:{...n,...r===void 0?{}:{detail:r},...i===void 0?{}:{children:i}}};return{...e,steps:e.steps.map(n=>n.kind==="tools"?{...n,tools:n.tools.map(t)}:n)}}function OQ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l}){switch(e.kind){case"user":return o.jsx(fa.User,{children:o.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.images.length===0?null:o.jsx(uQ,{images:e.images}),e.text===""?null:o.jsxs(o.Fragment,{children:[o.jsx(fa.Bubble,{children:o.jsx(fa.Content,{children:e.text})}),o.jsx(qa,{className:"shrink-0",children:o.jsx(qa.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var c;(c=navigator.clipboard)==null||c.writeText(e.text)}})})]})]})});case"run":return o.jsx(DQ,{entry:e,connected:t,openInPanel:n,onFork:s,canFork:r,forksAt:i,summaryOf:a,onRetry:l});case"compaction":return o.jsx(Kf,{variant:"divider",children:"Earlier context summarized"});case"reset":return o.jsx(Kf,{variant:"divider",children:"New context"})}}function DQ({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:a,onRetry:l}){const{view:c,subagents:u}=x.useMemo(()=>zZ(e.cot),[e.cot]),d=x.useMemo(()=>_Q(c),[c]),f=d.answer,h=e.forkEntryId===void 0?[]:(i==null?void 0:i(e.forkEntryId))??[],p=d.phase==="settled"&&(f!==void 0||e.forkEntryId!==void 0&&(r||h.length>0));return o.jsx(fa.Assistant,{children:o.jsxs(fa.Body,{children:[e.interrupted?o.jsx("p",{className:"mb-1",children:o.jsx(vn,{label:"interrupted",color:"orange",size:"sm"})}):null,o.jsx(LQ,{view:d}),o.jsx(AQ,{tools:u,summaryOf:a,openInPanel:n}),f===void 0?null:o.jsx(fa.Content,{children:f.streaming?o.jsx(VY,{isStreaming:!0,children:f.text}):o.jsx(GY,{children:f.text})}),e.failure===void 0?null:o.jsx(cQ,{error:e.failure,onRetry:l}),p?o.jsxs(qa,{className:"chat-message__actions--persist",children:[f===void 0?null:o.jsx(qa.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var m;(m=navigator.clipboard)==null||m.writeText(f.text)}}),e.forkEntryId===void 0?null:h.length>0?o.jsxs("button",{type:"button",className:"pigui-fork-chip","aria-label":`${h.length} ${h.length===1?"fork":"forks"}`,title:"Open in Threads",disabled:!t,onClick:()=>n(h[0],"threads"),children:[o.jsx(mm,{"aria-hidden":"true"}),h.length," ",h.length===1?"fork":"forks"]}):r?o.jsx(fa.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>s(e.forkEntryId),children:o.jsx(mm,{"aria-hidden":"true",className:"size-4"})}):null]}):null]})})}function LQ({view:e}){if(e.phase==="hidden")return null;const t=e.phase==="thinking"||e.phase==="acting";return!t&&!e.steps.length&&e.elapsedMs===void 0?null:o.jsx(Vc,{...t?{startedAtMs:e.anchorMs}:{elapsedMs:e.elapsedMs},hasSteps:e.steps.length>0,phase:e.phase,outcome:e.outcome,children:o.jsx(Vc.Steps,{children:e.steps.map(n=>o.jsx(Vc.Step,{children:n.kind==="thinking"?o.jsx(kQ,{step:n}):n.kind==="tools"?o.jsx(EQ,{step:n}):o.jsx("div",{className:"chain-of-thought__interim","data-slot":"chat-interim-output",children:o.jsx(H$,{text:n.text})})},n.id))})})}function Z$({conversation:e,toolPresentations:t,connected:n,canFork:s,openInPanel:r,onFork:i,forksAt:a,summaryOf:l,ownOnly:c,forkSource:u,onRetry:d}){const f=_k(e),h=x.useMemo(()=>c?{...e,entries:e.entries.filter(b=>b.conversationId===e.conversation.id)}:e,[e,c]),p=x.useMemo(()=>EZ(h,t,f),[h,t,f]),m=x.useMemo(()=>TZ(p),[p]);return p.length===0&&!c?null:o.jsx(U4,{isStreaming:f,gap:0,children:o.jsxs("div",{className:"mx-auto flex w-full max-w-[44rem] flex-col gap-8 px-4 pb-6 pt-2",children:[c?o.jsxs(Kf,{variant:"divider",children:["Forked from ",u]}):null,p.map((b,y)=>o.jsx(OQ,{entry:b,connected:n,openInPanel:r,onFork:i,canFork:s,forksAt:a,summaryOf:l,onRetry:d!==void 0&&n&&m!==void 0&&y===p.length-1?()=>d(m):void 0},b.id))]})})}const BQ={pending:"pending",in_progress:"in progress",completed:"completed"};function qQ({doc:e}){if(e.value===null)return null;const t=Xx(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,s=t.type==="pinomad.todo"?o.jsx(HQ,{doc:t.value}):t.type==="pinomad.question"?o.jsx(UQ,{doc:t.value}):o.jsx(FQ,{value:t.value});return o.jsxs(fe,{gap:1,children:[o.jsx(ee,{type:"label",weight:"semibold",children:n}),s]})}function HQ({doc:e}){return o.jsx(ut,{density:"compact",children:e.items.length===0?o.jsx(_e,{label:"Empty"}):e.items.map((t,n)=>o.jsx(_e,{label:t.text,startContent:o.jsx(vn,{label:BQ[t.status],size:"sm"})},n))})}function PQ(e,t){const n=e.resolution;if(n===void 0)return{label:"pending"};if(n.outcome==="dismissed")return{label:"answered in chat",color:"gray"};if(n.outcome==="cancelled")return{label:"cancelled",color:"gray"};const s=n.answers[t];if(s===void 0||s.selected.length===0&&s.other===void 0)return{label:"skipped",color:"gray"};const r=[s.selected.join(", "),...s.other===void 0?[]:[`other: "${s.other}"`]].filter(i=>i!=="").join("; ");return{label:r===""?"skipped":r,color:"green"}}function UQ({doc:e}){return o.jsx(ut,{density:"compact",children:e.requests.length===0?o.jsx(_e,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,s)=>{const r=PQ(t,s);return o.jsx(_e,{label:n.question,description:r.label,startContent:o.jsx(vn,{label:n.header,size:"sm"})},`${t.id}-${s}`)}))})}function FQ({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return o.jsx(ut,{density:"compact",children:t.map(([n,s])=>o.jsx(_e,{label:n,description:GQ(s)},n))})}function GQ(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}function VQ({view:e,remote:t,conversation:n}){var c;const s=e.tasks===void 0?[]:d7(e.tasks),r=[...e.notices].reverse().slice(0,5),i=n===void 0?[]:mq(n),a=n===void 0||(c=e.checkout)==null?void 0:c.branch,l=n===void 0?void 0:u7(n).cwd;return o.jsxs(fe,{gap:4,children:[n===void 0||a===void 0&&l===void 0?null:o.jsxs(ut,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Workspace"}),children:[a===void 0?null:o.jsx(_e,{label:"Branch",description:a}),l===void 0?null:o.jsx(_e,{label:"Path",description:l})]}),e.docs.map(u=>o.jsx(qQ,{doc:u,remote:t,connected:e.connection==="connected"},u.kind)),o.jsx(ut,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Tasks"}),children:s.length===0?o.jsx(_e,{label:"No live tasks"}):s.map(u=>o.jsx(_e,{label:`${" ".repeat(u.depth)}${u.depth>0?"└ ":""}${u.label}`},u.id))}),r.length===0?null:o.jsx(ut,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Notices"}),children:r.map(u=>o.jsx(_e,{label:u.message,startContent:o.jsx(ur,{variant:u.level==="error"?"error":u.level==="warning"?"warning":"neutral",label:u.level})},u.id))}),i.length===0?null:o.jsx(ut,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"Usage"}),children:i.map(u=>o.jsx(_e,{label:u.key,description:`↑${u.input} ↓${u.output} · $${u.cost.toFixed(4)}`},u.key))}),o.jsx(KQ,{view:e})]})}const WQ={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function KQ({view:e}){const t=e.mcp;return t===null||t.servers.length===0&&t.errors.length===0?null:o.jsxs(ut,{density:"compact",header:o.jsx(ee,{type:"label",weight:"semibold",children:"MCP"}),children:[t.servers.map(n=>o.jsx(_e,{label:n.name,description:n.state==="connected"?`${n.tools} tool${n.tools===1?"":"s"}${n.error===void 0?"":` · ${n.error}`}`:n.error??n.state,startContent:o.jsx(ur,{variant:WQ[n.state],label:n.state,isPulsing:n.state==="connecting"})},n.name)),t.errors.map((n,s)=>o.jsx(_e,{label:n,startContent:o.jsx(ur,{variant:"error",label:"config error"})},s))]})}const XQ={"needs-answer":"warning",failed:"error",running:"success"},ZQ={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function Y$({status:e}){return e===void 0?null:o.jsx("span",{"aria-hidden":"true",children:o.jsx(ur,{variant:XQ[e],label:ZQ[e],isPulsing:e!=="failed"})})}function L5({view:e,remote:t,conversation:n,tab:s,onTabChange:r,openInPanel:i,onOpenInMain:a}){var b;const l=Wl(6e4),c=e.side,u=c===void 0||(b=Nr(e.organized,c.id))==null?void 0:b.summary,d=n===void 0?void 0:o7(e.organized,n.conversation.id),f=d===void 0?[]:l7(d),h=d===void 0?[]:oq(d),p=h.reduce((y,g)=>y+g.tasks.length,0),m=()=>void t.controller.showSide(void 0);return o.jsxs(fe,{className:"h-full min-h-0",gap:0,children:[o.jsxs(w6,{value:s,onChange:y=>r(y),layout:"fill",hasDivider:!0,children:[o.jsx(af,{value:"threads",label:"Threads",endContent:f.length===0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:f.length})}),o.jsx(af,{value:"tasks",label:"Tasks",endContent:p===0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:p})}),o.jsx(af,{value:"live",label:"Live"})]}),s==="threads"?c!==void 0&&(u==null?void 0:u.kind)==="fork"?o.jsx(YQ,{view:e,remote:t,side:c,summary:u,onBack:m,onOpenInMain:a,openInPanel:i},c.id):o.jsx(Op,{children:f.length===0?o.jsx(ee,{type:"supporting",className:"p-3 text-muted",children:"No threads yet"}):o.jsx(ut,{density:"compact",children:f.map(y=>o.jsx(B5,{summary:y.summary,now:l,onOpen:()=>i(y.summary.id,"threads")},y.summary.id))})}):s==="tasks"?c!==void 0&&(u==null?void 0:u.kind)==="subagent"?o.jsx(QQ,{view:e,remote:t,side:c,summary:u,onBack:m,openInPanel:i}):o.jsx(Op,{children:h.length===0?o.jsx(ee,{type:"supporting",className:"p-3 text-muted",children:"No tasks yet"}):h.map(y=>o.jsx(ut,{density:"compact",header:o.jsx("div",{className:"px-3 pt-2",children:o.jsx(ee,{type:"label",weight:"semibold",children:y.label})}),children:y.tasks.map(g=>o.jsx(B5,{summary:g.summary,now:l,onOpen:()=>i(g.summary.id,"tasks")},g.summary.id))},y.owner.id))}):o.jsx(Op,{label:"Live state",children:o.jsx("div",{className:"p-3",children:o.jsx(VQ,{view:e,remote:t,conversation:n})})})]})}function Op({children:e,label:t}){return o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",...t===void 0?{}:{"aria-label":t},children:e})}function B5({summary:e,now:t,onOpen:n}){return o.jsx(_e,{label:e.kind!=="fork"||e.role===void 0?Yn(e):o.jsxs("span",{className:"inline-flex min-w-0 items-baseline gap-1.5",children:[o.jsx("span",{className:"truncate",children:Yn(e)}),o.jsxs("span",{className:"shrink-0 text-xs text-muted",children:["@",e.role]})]}),description:e.status==="running"&&e.activity!==void 0?`→ ${Ca(e.activity.tool)??e.activity.tool}${e.activity.target===void 0?"":` ${e.activity.target}`}`:void 0,startContent:o.jsx(Y$,{status:e.status}),endContent:e.updatedAt===void 0?void 0:o.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:Dx(e.updatedAt,t)}),onClick:n})}function Q$({back:e,title:t,status:n,onBack:s,extra:r}){return o.jsxs(we,{className:"shrink-0 gap-1 border-b border-border px-2 py-1",vAlign:"center",children:[o.jsx(kn,{icon:o.jsx(p7,{className:"size-4","aria-hidden":"true"}),label:e,size:"sm",variant:"ghost",onClick:s}),o.jsx(Y$,{status:n}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:t}),r]})}function J$({view:e,remote:t,side:n,openInPanel:s,ownOnly:r,forkSource:i,onRetry:a}){return n.conversation===void 0?null:o.jsx(Z$,{conversation:n.conversation,toolPresentations:e.toolPresentations,connected:e.connection==="connected",canFork:!1,openInPanel:s,onFork:()=>{},ownOnly:r,forkSource:i,summaryOf:l=>{var c;return(c=Nr(e.organized,l))==null?void 0:c.summary},forksAt:l=>c7(e.organized,n.id,l),onRetry:a})}function YQ({view:e,remote:t,side:n,summary:s,onBack:r,onOpenInMain:i,openInPanel:a}){var m,b,y;const l=n.conversation,c=l!==void 0&&_k(l),[u,d]=x.useState(""),f=x.useRef(null),h=()=>{const g=u.trim();g!==""&&(Cl(),t.controller.submit(g,"followUp",{target:n.id}),d(""))},p=s.parent===void 0||(m=Nr(e.organized,s.parent))==null?void 0:m.summary;return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(Q$,{back:"Back to threads",title:Yn(s),status:s.status,onBack:r,extra:o.jsx(re,{label:"Open in main",variant:"secondary",size:"sm",onClick:()=>i(n.id)})}),o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[o.jsx(J$,{view:e,remote:t,side:n,openInPanel:a,ownOnly:!0,forkSource:Yn(p),onRetry:async({text:g,images:k,requestId:v})=>{Cl(),await t.controller.submit(g,"followUp",{target:n.id,requestId:v,images:k})}}),o.jsx(m$,{docs:n.docs,remote:t,connected:e.connection==="connected",target:n.id})]}),o.jsx("div",{className:"shrink-0 border-t border-border p-2",children:o.jsx(Pk,{value:u,inputRef:f,placeholder:"Reply in this thread…",status:c?"streaming":"ready",isDisabled:e.connection!=="connected",onSubmit:h,onStop:()=>void t.controller.abort(n.id),onValueChange:d,triggers:Hk(e.agents,f,((b=e.home)==null?void 0:b.kind)!=="chat"&&os(((y=e.host)==null?void 0:y.protocol.minor)??0,"listFiles")?{key:`conversation:${n.id}`,list:g=>t.controller.listFiles({kind:"conversation",conversationId:n.id},g)}:void 0)})})]})}function QQ({view:e,remote:t,side:n,summary:s,onBack:r,openInPanel:i}){return o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(Q$,{back:"Back to tasks",title:Yn(s),status:s.status,onBack:r}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(J$,{view:e,remote:t,side:n,openInPanel:i})}),o.jsx("div",{className:"shrink-0 border-t border-border p-2 text-center text-xs text-muted",children:"Read-only · subagent"})]})}function q5({view:e,remote:t,conversation:n,narrow:s,open:r,onOpenChange:i,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u}){const d=m6({defaultSize:440,minSizePx:360,maxSizePx:720,autoSaveId:"pinomad-side-panel"});return s?o.jsx(js,{isOpen:r,onOpenChange:i,variant:"fullscreen",children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Side panel",onOpenChange:i}),content:o.jsx(es,{padding:0,children:o.jsx(L5,{view:e,remote:t,conversation:n,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u})})})}):r?o.jsxs("div",{className:"relative h-full shrink-0 border-l border-border",style:{width:d.size},"aria-label":"Side panel",role:"complementary",children:[o.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:o.jsx(L5,{view:e,remote:t,conversation:n,tab:a,onTabChange:l,openInPanel:c,onOpenInMain:u})}),o.jsx(oy,{direction:"horizontal",position:"overlay",isReversed:!0,label:"Resize side panel",resizable:d.props})]}):null}const eC="pinomad.sidebar.open",JQ=()=>typeof window>"u"||window.localStorage.getItem(eC)!=="false";function eJ({view:e,remote:t,device:n,narrow:s,drafting:r,draftingChat:i,draftLabel:a,conversation:l,summary:c,parentSummary:u,banner:d,onDraft:f,onOpenChanges:h,panelOpen:p,panelTab:m,onPanelOpen:b,onPanelTab:y,openInPanel:g,openInMain:k,children:v}){const[w,j]=x.useState(JQ),[S,C]=x.useState(!1),[E,T]=x.useState(!1),[$,N]=x.useState(!1),[A,M]=x.useState(!1),[I,R]=x.useState(!1),z=f7(),_=z.reserveMacTrafficLights&&!s&&w,O=()=>{window.localStorage.setItem(eC,String(!w)),j(!w)},D=P=>void t.controller.switchConversation(P),L=e.tasks!==void 0&&d7(e.tasks).length>0,B=o.jsx(GU,{view:e,remote:t,draftingChat:i,shownId:l==null?void 0:l.conversation.id,onDraft:f,onSelect:()=>C(!1)});return o.jsxs(o.Fragment,{children:[o.jsx(X3,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:s||!w?void 0:o.jsx(fy,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:o.jsx(PU,{connection:e.connection,onCollapse:O,safeLeft:_?z.safeLeft:void 0}),footer:o.jsx(Vw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>N(!0),onPairHost:()=>M(!0),onOpenAccount:()=>R(!0)}),children:B}),children:o.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[o.jsx(nJ,{narrow:s,sidebarOpen:w,safeLeft:z.reserveMacTrafficLights&&!_?z.safeLeft:void 0,onToggleSidebar:O,onOpenNav:()=>C(!0),title:r?a:Yn(c),role:c==null?void 0:c.role,parentSummary:u,onBackToParent:D,showChanges:l!==void 0,onOpenChanges:h,panelOpen:p,onPanelChange:b,liveActivity:L}),d,o.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[o.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:v}),s?null:o.jsx(q5,{view:e,remote:t,conversation:l,narrow:!1,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k})]})]})}),s?o.jsxs(uy,{className:"pigui-app-layout text-foreground",isOpen:S,onOpenChange:C,header:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),o.jsx(f9,{connection:e.connection})]}),children:[B,o.jsx(Vw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>N(!0),onPairHost:()=>M(!0),onOpenAccount:()=>R(!0),onSelect:()=>C(!1)})]}):null,s?o.jsx(q5,{view:e,remote:t,conversation:l,narrow:!0,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k}):null,E?o.jsx(gF,{view:e,remote:t,self:n,onClose:()=>T(!1)}):null,$?o.jsx(NF,{view:e,remote:t,onClose:()=>N(!1)}):null,A?o.jsx(c9,{onClose:()=>M(!1)}):null,I?o.jsx(o9,{onClose:()=>R(!1)}):null,o.jsx(I0,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:o.jsx(tJ,{notices:e.notices})})]})}function tJ({notices:e}){const t=xB(),n=x.useRef(void 0);return x.useEffect(()=>{var r;const s=(r=e[e.length-1])==null?void 0:r.id;if(n.current===void 0){n.current=s??-1;return}for(const i of e)i.id<=n.current||t({body:i.message,type:i.level==="error"?"error":"info",uniqueID:String(i.id)});s!==void 0&&(n.current=s)},[e,t]),null}function nJ({narrow:e,sidebarOpen:t,safeLeft:n,onToggleSidebar:s,onOpenNav:r,title:i,role:a,parentSummary:l,onBackToParent:c,showChanges:u,onOpenChanges:d,panelOpen:f,onPanelChange:h,liveActivity:p}){return o.jsxs("div",{className:"pinomad-drag flex h-10 shrink-0 items-center gap-1 border-b border-border px-3",style:n===void 0?void 0:{paddingLeft:n},children:[e?o.jsx(kn,{icon:o.jsx(ym,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:o.jsx(kn,{icon:o.jsx(ym,{className:"size-4"}),label:"Expand sidebar",size:"sm",variant:"ghost",onClick:s}),o.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-normal",children:l===void 0?o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"truncate",children:i}),a===void 0?null:o.jsxs("span",{className:"shrink-0 text-muted",children:["@",a]})]}):o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(re,{label:Yn(l),"aria-label":`Back to ${Yn(l)}`,variant:"ghost",size:"sm",onClick:()=>c(l.id)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),o.jsx("span",{className:"truncate",children:i}),a===void 0?null:o.jsxs("span",{className:"shrink-0 text-muted",children:["@",a]})]})}),u?o.jsx(kn,{icon:o.jsx(m7,{className:"size-4"}),label:"Changes",size:"sm",variant:"ghost",onClick:d}):null,o.jsxs("span",{className:"relative",children:[o.jsx(kn,{"aria-pressed":f,icon:o.jsx(bH,{className:"size-4"}),label:"Side panel",size:"sm",tooltip:f?"Hide side panel":"Show side panel",variant:"ghost",onClick:()=>h(!f)}),!f&&p?o.jsx("span",{"aria-label":"Live activity",className:"pointer-events-none absolute right-1 top-1 size-2 rounded-full bg-primary",role:"img"}):null]})]})}function Cc({chrome:e,icon:t,label:n,testId:s}){const r=e==="selector";return o.jsxs("span",{className:`inline-flex h-7 min-w-0 max-w-[16rem] items-center text-sm font-medium ${r?"gap-2 px-3 text-foreground":"gap-1.5 px-2 text-muted"}`,"data-testid":s,children:[o.jsx(t,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),o.jsx("span",{className:"truncate",children:n}),r?o.jsx(xk,{"aria-hidden":"true",className:"invisible size-4 shrink-0"}):null]})}function tC({location:e,branch:t,meter:n}){return o.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e,t,o.jsx("span",{className:"ml-auto inline-flex shrink-0",children:n})]})}function sJ({value:e,onChange:t,isDisabled:n=!1}){return o.jsx("div",{className:"max-w-full","data-testid":"checkout-strategy-picker",children:o.jsx(Zc,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:o.jsx(gm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:o.jsx(mu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?o.jsx(gm,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):o.jsx(mu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:s=>t(s==="worktree"?"worktree":"local")})})}function rJ({agents:e,value:t,isDisabled:n=!1,onChange:s}){const r=(e==null?void 0:e.roles)??[];return o.jsx(_0,{alignment:"start",label:"Named agent",placement:"above",width:236,content:o.jsx("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"agent-popover",onClick:i=>i.stopPropagation(),onMouseDown:i=>i.stopPropagation(),onPointerDown:i=>i.stopPropagation(),children:o.jsxs(ut,{"aria-label":"Named agent",className:"max-h-72 overflow-y-auto",density:"compact",children:[o.jsx(_e,{endContent:t===void 0?o.jsx(Ch,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:t===void 0,label:"No agent",onClick:()=>s(void 0)}),r.map(i=>o.jsx(_e,{description:i.description,endContent:t===i.name?o.jsx(Ch,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:t===i.name,label:i.name,onClick:()=>s(i.name)},i.name))]})}),children:o.jsx(re,{className:"min-w-0 max-w-[12rem] flex-nowrap gap-1.5 px-2 text-muted","data-testid":"agent-trigger",isDisabled:n,label:"Named agent",size:"sm",variant:"ghost",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx(hk,{"aria-hidden":"true",className:"size-4 shrink-0"}),o.jsx("span",{className:"truncate",children:t===void 0?"No agent":`@${t}`}),o.jsx(xk,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}function nC({inputRef:e,onFiles:t}){return o.jsx("input",{ref:e,type:"file",accept:"image/*",multiple:!0,hidden:!0,"aria-hidden":!0,tabIndex:-1,onChange:n=>{t([...n.target.files??[]]),n.target.value=""}})}function sC({images:e,pending:t,onRemove:n}){if(!(e.length===0&&!t))return o.jsxs("div",{className:"flex flex-wrap gap-2","data-testid":"composer-attachments",children:[e.map((s,r)=>o.jsx(Zf,{src:Qm(s),alt:`Image ${r+1}`,onRemove:()=>n(r)},r)),t?o.jsx(Zf,{isLoading:!0,alt:"Preparing image"}):null]})}const iJ=["image/jpeg","image/png","image/gif","image/webp"],Jm=4,aJ=5*1024*1024,oJ=/^[A-Za-z0-9+/]*={0,2}$/;function lJ(e){if(e.length>Jm)return`At most ${Jm} images per message`;for(let t=0;t<e.length;t++){const n=e[t];if(!iJ.includes(n.mimeType))return`Unsupported image type: ${n.mimeType} (use JPEG, PNG, GIF or WebP)`;if(n.data===""||n.data.length%4!==0||!oJ.test(n.data))return`Image ${t+1} is not valid base64`;const s=n.data.endsWith("==")?2:n.data.endsWith("=")?1:0;if(n.data.length*3/4-s>aJ)return`Image ${t+1} is larger than 5 MB`}}const cJ=1568;function uJ(e){const t=new Uint8Array(e);let n="";for(let s=0;s<t.length;s+=32768)n+=String.fromCharCode(...t.subarray(s,s+32768));return btoa(n)}async function dJ(e){let t;try{t=await createImageBitmap(e)}catch{throw new Error(`Couldn't read ${e.name}`)}const n=Math.min(1,cJ/Math.max(t.width,t.height)),s=Math.max(1,Math.round(t.width*n)),r=Math.max(1,Math.round(t.height*n)),i=document.createElement("canvas");i.width=s,i.height=r;const a=i.getContext("2d");a.fillStyle="#ffffff",a.fillRect(0,0,s,r),a.drawImage(t,0,0,s,r),t.close();const l=await new Promise((d,f)=>i.toBlob(h=>h===null?f(new Error(`Couldn't read ${e.name}`)):d(h),"image/jpeg",.85)),c={data:uJ(await l.arrayBuffer()),mimeType:"image/jpeg"},u=lJ([c]);if(u!==void 0)throw new Error(u);return c}function rC(e){const[t,n]=x.useState([]),[s,r]=x.useState(0),[i,a]=x.useState(null),l=x.useRef(e);l.current=e;const c=x.useRef(0),u=x.useRef(0),d=p=>{if(!l.current){a("This model doesn't accept images");return}const m=p.filter(k=>k.type.startsWith("image/"));m.length<p.length&&a("Only images can be attached");const b=Math.max(0,Jm-u.current),y=m.slice(0,b);if(m.length>b?a("At most 4 images per message"):m.length===p.length&&a(null),y.length===0)return;u.current+=y.length;const g=c.current;r(k=>k+y.length),Promise.all(y.map(k=>dJ(k))).then(k=>{c.current===g&&(n(v=>[...v,...k]),r(v=>v-y.length))},k=>{c.current===g&&(u.current-=y.length,a(k instanceof Error?k.message:String(k)),r(v=>v-y.length))})},f=p=>{u.current-=1,n(m=>m.filter((b,y)=>y!==p))},h=()=>{c.current+=1,u.current=0,n([]),r(0),a(null)};return{images:t,pending:s>0,error:i,add:d,remove:f,clear:h}}const iC="pinomad.draft.model";function fJ(e){try{const t=localStorage.getItem(iC);if(t===null)return;const n=JSON.parse(t);if(typeof n.provider=="string"&&typeof n.modelId=="string"&&typeof n.thinkingLevel=="string"&&e.some(s=>s.provider===n.provider&&s.modelId===n.modelId))return n}catch{}}function hJ(e){const[t,n]=x.useState(()=>{var y;const h=fJ(e.models),p=h!==void 0?{provider:h.provider,modelId:h.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),m=((y=ks(e.models,p))==null?void 0:y.thinkingLevels)??["off"],b=(h==null?void 0:h.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:p,level:qh(m,b)}}),[s,r]=x.useState(void 0),[i,a]=x.useState({}),l=(h,p)=>{localStorage.setItem(iC,JSON.stringify({...h,thinkingLevel:p}))},c=s===void 0?void 0:TF(s,e.agents,e.models,e.defaults,i),u=CF(e.models,e.defaults,t),d=c??u,f=d.level;return{pick:d,agent:s,resolution:c,setModel:h=>{var m;if(s!==void 0){a(b=>({...b,model:h}));return}const p=qh(((m=ks(e.models,h))==null?void 0:m.thinkingLevels)??["off"],f);n({model:h,level:p}),l(h,p)},setLevel:h=>{if(s!==void 0){a(p=>({...p,level:h}));return}n(p=>({...p,level:h})),d.model!==void 0&&l(d.model,h)},setAgent:h=>{r(h),a({})}}}function Wc({children:e,className:t="",...n}){return o.jsx("div",{className:`prompt-suggestion prompt-suggestion--pill ${t}`.trim(),"data-slot":"prompt-suggestion",...n,children:e})}function xJ({children:e,className:t="",...n}){return o.jsx("div",{className:`prompt-suggestion__items prompt-suggestion__items--pill ${t}`.trim(),"data-slot":"prompt-suggestion-items",...n,children:e})}function pJ({children:e,className:t="",showEndIcon:n=!0,onPress:s,...r}){return o.jsxs("button",{className:`prompt-suggestion__item ${t}`.trim(),"data-slot":"prompt-suggestion-item",type:"button",onClick:s,...r,children:[e,n?o.jsx("span",{"aria-hidden":"true",className:"prompt-suggestion__item-end-icon",children:o.jsx(g7,{size:14})}):null]})}Wc.Items=xJ;Wc.Item=pJ;const gJ=[{Icon:cH,label:"Explain this repo's architecture"},{Icon:b7,label:"Fix the failing test"},{Icon:k7,label:"Add a CLI flag with docs"},{Icon:m7,label:"Review my uncommitted changes"}];function mJ(e){switch(e.kind){case"agent-missing":return{label:`@${e.agent} unavailable`,title:`Agent @${e.agent} is not defined on this host${e.reason===void 0?"":` — ${e.reason}`}`};case"model-missing":return{label:`No model for @${e.agent}`,title:`Agent @${e.agent} pins no model and the host has no default`};case"model-unavailable":{const t=`${e.model.provider}/${e.model.modelId}`,n=e.source==="agent"?`@${e.agent}'s model`:e.source==="default"?"the host default":"the picked model";return{label:`${t} unavailable`,title:`${t} (${n}) is not in the host's model list`}}}}function yJ({view:e,remote:t,draft:n,onDraft:s,connected:r}){var O,D,L;const[i,a]=x.useState(""),[l,c]=x.useState(!1),u=x.useRef(!1),[d,f]=x.useState("worktree"),h=x.useRef(null),{pick:p,setModel:m,setLevel:b,agent:y,setAgent:g,resolution:k}=hJ(e),v=ks(e.models,p.model),w=(v==null?void 0:v.images)===!0,{images:j,pending:S,error:C,add:E,remove:T}=rC(w),$=x.useRef(null),N=(O=e.host)==null?void 0:O.protocol.minor,A=((D=e.agents)==null?void 0:D.roles)??[],M=N!==void 0&&sa(N,"agentConversations")&&(A.length>0||y!==void 0),I=k==null?void 0:k.problem,R=y===void 0||k===void 0?void 0:k.modelFrom!=="override"&&k.levelFrom!=="override"?`from @${y}`:k.modelFrom!=="override"?`model from @${y}`:k.levelFrom!=="override"?`level from @${y}`:void 0,z=w||!r?"Add images…":`Add images… (${(v==null?void 0:v.name)??((L=p.model)==null?void 0:L.modelId)??"This model"} can't see images)`,_=n.kind==="project"?o.jsx(sJ,{value:d,onChange:f,isDisabled:!r}):o.jsx(Cc,{chrome:"selector",icon:Ef,label:"Chat",testId:"composer-location-label"});return o.jsx("section",{className:"flex h-full min-h-0 flex-col items-center overflow-y-auto px-6 py-8","data-testid":"draft-home",children:o.jsxs("div",{className:"mx-auto my-auto flex w-full max-w-[44rem] flex-col items-center justify-center gap-6",children:[o.jsxs("h2",{className:"text-center text-3xl font-normal tracking-tight text-foreground max-lg:text-2xl",children:["Build something useful with ",o.jsx(Zx,{tone:"brand",children:"PiNomad"})]}),o.jsx("div",{className:"flex w-full flex-wrap justify-center gap-2",children:o.jsx(Zc,{isLabelHidden:!0,label:"Project",placeholder:"No project",placement:"below",variant:"ghost",size:"sm",isDisabled:!r,value:n.kind==="chat"?"chat":n.path,startIcon:n.kind==="chat"?o.jsx(Ef,{"aria-hidden":"true",className:"size-4 shrink-0"}):o.jsx(yu,{"aria-hidden":"true",className:"size-4 shrink-0"}),options:[{value:"chat",label:"No project",icon:o.jsx(Ef,{"aria-hidden":"true",className:"size-4 shrink-0"})},...e.organized.projects.map(B=>({value:B.project.path,label:B.project.name,icon:o.jsx(yu,{"aria-hidden":"true",className:"size-4 shrink-0"})}))],onChange:B=>s(B==="chat"?{kind:"chat"}:{kind:"project",path:B})})}),o.jsxs("div",{className:"flex w-full flex-col gap-3",children:[o.jsx(nC,{inputRef:$,onFiles:E}),o.jsx(Pk,{accent:"brand",accentFocusRing:!0,value:i,inputRef:h,onValueChange:a,triggers:Hk(e.agents,h,n.kind==="project"&&N!==void 0&&os(N,"listFiles")?{key:`project:${n.path}:${d}`,list:B=>t.controller.listFiles({kind:"project",path:n.path,checkout:d==="local"?"project":"worktree"},B)}:void 0),status:l?"submitted":"ready",onSubmit:()=>{const B=i.trim();B===""&&j.length===0||S||u.current||I!==void 0||(Cl(),u.current=!0,c(!0),t.controller.createConversation(n,B,{...n.kind==="project"&&d==="local"?{checkout:"project"}:{},...k===void 0?{...p.model===void 0?{}:{model:p.model},thinkingLevel:p.level}:k.send,...j.length===0?{}:{images:j}}).finally(()=>{u.current=!1,c(!1)}))},isDisabled:!r,submitDisabled:I!==void 0,placeholder:"Do anything with Pi",attachments:sC({images:j,pending:S,onRemove:T}),hasAttachments:j.length>0,onFiles:E,error:C,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Wa,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(Xo,{"aria-hidden":"true"}),isDisabled:!r},items:[{label:z,isDisabled:!r||!w,onClick:()=>{var B;return(B=$.current)==null?void 0:B.click()}}]}),M?o.jsx(rJ,{agents:e.agents,value:y,isDisabled:!r,onChange:g}):null,o.jsx(Ik,{models:e.models,selected:{model:p.model,level:p.level},isDisabled:!r,sourceHint:R,...I===void 0?{}:{problem:mJ(I)},onModelChange:m,onLevelChange:b})]}),footer:o.jsx(tC,{location:_})})]}),o.jsx(Wc,{className:"w-full max-w-[35rem]",children:o.jsx(Wc.Items,{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:gJ.map(({Icon:B,label:P})=>o.jsx(Wc.Item,{className:"items-center justify-start",showEndIcon:!1,onPress:()=>{var X;a(P),(X=h.current)==null||X.focusAtEnd()},children:o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[o.jsx(B,{"aria-hidden":"true",className:"size-4 shrink-0"}),o.jsx("span",{className:"truncate",children:P})]})},P))})})]})})}function kJ({body:e,tag:t,className:n,...s}){return o.jsxs("div",{className:`chat-queued-message flex min-w-0 items-center gap-2 rounded-lg border border-border bg-surface py-1.5 pl-3 pr-2 text-sm ${n??""}`.trim(),"data-testid":"chat-queued-message",...s,children:[o.jsx("p",{className:"chat-queued-message__body min-w-0 flex-1 truncate","data-slot":"queued-message-body",title:e,children:e}),o.jsx("span",{className:"shrink-0 text-xs font-medium text-muted",children:t})]})}const bJ={steer:"Steer",followUp:"Follow-up",write:"Write"};function vJ({items:e}){if(e.length===0)return null;const t=n=>{if(n.imageCount===0)return n.text;const s=`${n.imageCount} ${n.imageCount===1?"image":"images"}`;return n.text===""?s:`${n.text} · ${s}`};return o.jsx("div",{className:"mx-auto mb-3 grid w-full gap-1.5","data-testid":"queued-message-list",children:e.map(n=>o.jsx(kJ,{body:t(n),tag:bJ[n.mode]},n.id))})}function wJ({view:e,remote:t,conversation:n,busy:s,narrow:r}){var N,A,M,I;const[i,a]=x.useState(""),l=u7(n),c=xq(n),u=e.connection!=="connected",d=pq(n),f=e.checkout,h=((N=e.home)==null?void 0:N.kind)==="project",p=ks(e.models,l.model),m=(p==null?void 0:p.images)===!0,{images:b,pending:y,error:g,add:k,remove:v,clear:w}=rC(m),j=x.useRef(null),S=x.useRef(null),C=m||u?"Add images…":`Add images… (${(p==null?void 0:p.name)??((A=l.model)==null?void 0:A.modelId)??"This model"} can't see images)`,E=h?f!==void 0?o.jsx(Cc,{chrome:"selector",icon:gm,label:"Git worktree",testId:"composer-location-label"}):o.jsx(Cc,{chrome:"selector",icon:mu,label:"Project folder",testId:"composer-location-label"}):o.jsx(Cc,{chrome:"selector",icon:Ef,label:"Chat",testId:"composer-location-label"}),T=f===void 0?null:o.jsx(Cc,{chrome:"button",icon:mm,label:f.branch,testId:"composer-branch-label"}),$=R=>{const z=i.trim();z===""&&b.length===0||y||(Cl(),t.controller.submit(z,R,{images:b}),a(""),w())};return o.jsxs(o.Fragment,{children:[c===""?null:o.jsx(ee,{type:"supporting",children:c}),o.jsx(vJ,{items:d}),o.jsx(nC,{inputRef:j,onFiles:k}),o.jsx(Pk,{value:i,inputRef:S,status:s?"streaming":"ready",isDisabled:u,placeholder:s?"Steer the running turn…":"Ask the agent…",onValueChange:a,onSubmit:()=>$("steer"),triggers:Hk(e.agents,S,((M=e.home)==null?void 0:M.kind)!=="chat"&&os(((I=e.host)==null?void 0:I.protocol.minor)??0,"listFiles")?{key:`conversation:${n.conversation.id}`,list:R=>t.controller.listFiles({kind:"conversation",conversationId:n.conversation.id},R)}:void 0),onStop:s?()=>void t.controller.abort():void 0,attachments:sC({images:b,pending:y,onRemove:v}),hasAttachments:b.length>0,onFiles:k,error:g,startActions:o.jsxs(o.Fragment,{children:[o.jsx(Wa,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:o.jsx(Xo,{"aria-hidden":"true"}),isDisabled:u},items:[{label:C,isDisabled:u||!m,onClick:()=>{var R;return(R=j.current)==null?void 0:R.click()}},{label:"Compact conversation",isDisabled:u,onClick:()=>void t.controller.compact(void 0)}]}),o.jsx(Ik,{models:e.models,selected:{model:l.model,level:l.thinkingLevel??"off"},isDisabled:u,onModelChange:R=>void t.controller.setModel(R),onLevelChange:R=>void t.controller.setThinkingLevel(R)})]}),endActions:s&&(i.trim()!==""||b.length>0)?o.jsx(re,{label:"Follow-up",variant:"ghost",size:r?"md":"sm",tooltip:"Queue after the running turn",isDisabled:u||y,onClick:()=>$("followUp")}):null,footer:o.jsx(tC,{location:E,branch:T})})]})}function jJ({hostKey:e}){const t=Hx(),{state:n}=t,[s,r]=x.useState(!1),[i,a]=x.useState();if(x.useEffect(()=>t.hostRejected(e),[t,e]),n.status!=="signed-in")return null;const l=n.hosts.find(u=>{var d;return((d=u.stored)==null?void 0:d.hostKey)===e});if(l===void 0)return null;const c=()=>{r(!0),a(void 0),t.pairHost(l.host.hostId).then(u=>{r(!1),u.ok?Xu(u.value.hostKey):a(u.error)})};return o.jsxs(fe,{gap:2,hAlign:"center",children:[o.jsx(re,{label:"Pair again with your account",variant:"primary",isLoading:s,isDisabled:l.host.pairing!=="available",onClick:c}),i===void 0?null:o.jsx(yt,{status:"error",title:"Couldn't pair",description:Zu(i)})]})}const nl=e=>e!==null&&typeof e=="object",aC=new Set(["__proto__","constructor","prototype"]);class El extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);te(this,"segment");this.segment=n,this.name="UnsafePathError"}}function oC(e){if(!Array.isArray(e)||e.length===0)throw new TypeError("op is not a tuple");switch(e[0]){case"r":if(e.length!==2)throw new TypeError("r arity");return;case"s":if(e.length!==3)throw new TypeError("s arity");mo(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");mo(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");mo(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");mo(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(mo(e[1]),!Number.isInteger(e[2])||e[2]<0)throw new TypeError("p index");if(!Number.isInteger(e[3])||e[3]<0)throw new TypeError("p remove");if(!Array.isArray(e[4]))throw new TypeError("p items");return}case"m":if(e.length!==3)throw new TypeError("m arity");mo(e[1]),SJ(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function mo(e,t=!1){if(!Array.isArray(e))throw new TypeError("path is not an array");if(t&&e.length===0)throw new TypeError("path is empty");lC(e)}function SJ(e){if(!Array.isArray(e))throw new TypeError("m permutation is not an array");const t=new Uint8Array(e.length);for(const n of e){if(!Number.isInteger(n)||n<0||n>=e.length||t[n]!==0)throw new TypeError("m permutation is not a bijection");t[n]=1}}function lC(e){for(const t of e)if(typeof t=="string"){if(aC.has(t))throw new El(t)}else if(!Number.isInteger(t)||t<0)throw new El(t)}function $J(e,t){if(t>e.length)throw new El(t)}class ps extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);te(this,"path");this.path=n,this.name="PathError"}}function CJ(e,t){let n=e;for(const s of t){if(oC(s),s[0]==="r"){n=s[1];continue}const r=s[1];if(lC(r),s[0]==="p"){const u=r.length===0?n:If(n,r);if(!Array.isArray(u))throw new ps(r);u.splice(s[2],s[3]);const d=1e4;for(let f=0;f<s[4].length;f+=d)u.splice(s[2]+f,0,...s[4].slice(f,f+d));continue}if(s[0]==="m"){const u=r.length===0?n:If(n,r);if(!Array.isArray(u)||u.length!==s[2].length)throw new ps(r);const d=u.slice();for(let f=0;f<s[2].length;f++)u[f]=d[s[2][f]];continue}const i=If(n,r.slice(0,-1)),a=r[r.length-1];if(Array.isArray(i)){if(typeof a!="number")throw new El(a);$J(i,a)}const l=u=>{Object.defineProperty(i,a,{value:u,writable:!0,enumerable:!0,configurable:!0})},c=()=>Object.hasOwn(i,a)?i[a]:void 0;switch(s[0]){case"s":l(s[2]);break;case"d":if(Array.isArray(i)){if(typeof a!="number"||a>=i.length)throw new ps(r);i.splice(a,1)}else delete i[a];break;case"a":{const u=c();if(typeof u!="string")throw new ps(r);l(`${u}${s[2]}`);break}case"t":{const u=c();if(typeof u!="string")throw new ps(r);l(u.slice(s[2]));break}}}return n}function EJ(e,t){return TJ(e,[t])}function TJ(e,t){let n=e;const s=new WeakSet;for(const r of t)for(const i of r){if(oC(i),i[0]==="r"){n=i[1];continue}if(i[0]==="p"){const a=zJ(n,i,s);if(a!==void 0){n=a;continue}}n=cC(n,i[0]==="p"||i[0]==="m"?i[1]:i[1].slice(0,-1),s),n=CJ(n,[i])}return n}function zJ(e,t,n){const[,s,r,i,a]=t;if(i!==0)return;let l=e;for(const f of s){if(!(typeof f=="string"?!aC.has(f)&&nl(l)&&!Array.isArray(l):Number.isInteger(f)&&f>=0&&Array.isArray(l))||!Object.hasOwn(l,f))return;l=l[f]}if(!Array.isArray(l)||n.has(l)||r!==l.length)return;const c=l.concat(a);if(n.add(c),s.length===0)return c;const u=s.slice(0,-1),d=cC(e,u,n);return Object.defineProperty(If(d,u),s[s.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),d}function cC(e,t,n){const s=a=>{if(Array.isArray(a))return a.slice();if(!nl(a))throw new ps(t);const l=Object.create(Object.getPrototypeOf(a)===null?null:Object.prototype);for(const c of Object.keys(a))Object.defineProperty(l,c,{value:a[c],writable:!0,enumerable:!0,configurable:!0});return l};if(!nl(e))throw new ps(t);let r;n.has(e)?r=e:(r=s(e),n.add(r));let i=r;for(const a of t){if(!Object.hasOwn(i,a))throw new ps(t);if(Array.isArray(i)&&typeof a!="number")throw new El(a);const l=i[a];if(!nl(l))throw new ps(t);if(n.has(l)){i=l;continue}const c=s(l);Object.defineProperty(i,a,{value:c,writable:!0,enumerable:!0,configurable:!0}),n.add(c),i=c}return r}function AJ(e,t){let n=e;for(const s of t){if(!nl(n))throw new ps(t);if(Array.isArray(n)&&typeof s!="number")throw new El(s);if(!Object.hasOwn(n,s))throw new ps(t);n=n[s]}return n}function If(e,t){const n=AJ(e,t);if(!nl(n))throw new ps(t);return n}function NJ(e,t){return{label:e,open(n){const s=new URL(e);s.searchParams.set("token",t);const r=new WebSocket(s);return r.onmessage=i=>n.message(String(i.data)),r.onclose=i=>n.closed(i.code),{send:i=>r.send(i),close:()=>r.close()}}}}function MJ(e){return new RJ(e).ready}class e0 extends Error{constructor(){super("Unauthorized: this client is not allowed (wrong token, or the device is not paired or was revoked)"),this.name="UnauthorizedError"}}class uC extends Error{constructor(n,s,r){const i=n>s?"client-older":"host-older";super(i==="client-older"?`Client out of date: the host speaks protocol major ${n}, this client speaks ${s}`:`Host out of date: this client speaks protocol major ${s}, the host speaks ${n}`);te(this,"hostMajor");te(this,"clientMajor");te(this,"hostVersion");te(this,"direction");this.name="ProtocolMismatchError",this.hostMajor=n,this.clientMajor=s,r!==void 0&&(this.hostVersion=r),this.direction=i}}var zu,il,Gt,It,br,al,Fh,pa,ii,ol,Is,gn,mn,ls,Gh,Vh,St,Au,Nu,ll,Mu,_s,cl,ai,Ru,ul,H,t0,dC,Qi,fC,hC,_f,Ji,n0,Of,rs,s0,r0,xC,i0,Zs,yr,ei,et,sn,Ys,pC,gC,Df,mC,Lf,yC;class RJ{constructor(t){ze(this,H);te(this,"ready");ze(this,zu);ze(this,il,new Set);ze(this,Gt,new Map);ze(this,It,new Set);ze(this,br,new Set);ze(this,al,[]);ze(this,Fh,{});ze(this,pa,new Map);ze(this,ii,new Map);ze(this,ol);ze(this,Is);ze(this,gn);ze(this,mn);ze(this,ls);ze(this,Gh,1);ze(this,Vh,1);ze(this,St,0);ze(this,Au,[]);ze(this,Nu,{});ze(this,ll);ze(this,Mu,0);ze(this,_s,!1);ze(this,cl,!1);ze(this,ai,Promise.resolve());ze(this,Ru);ze(this,ul);Se(this,zu,t),Se(this,ol,"transport"in t?t.transport:NJ(t.url,t.token)),this.ready=new Promise((n,s)=>{Se(this,Ru,n),Se(this,ul,s)}),V(this,H,t0).call(this)}}zu=new WeakMap,il=new WeakMap,Gt=new WeakMap,It=new WeakMap,br=new WeakMap,al=new WeakMap,Fh=new WeakMap,pa=new WeakMap,ii=new WeakMap,ol=new WeakMap,Is=new WeakMap,gn=new WeakMap,mn=new WeakMap,ls=new WeakMap,Gh=new WeakMap,Vh=new WeakMap,St=new WeakMap,Au=new WeakMap,Nu=new WeakMap,ll=new WeakMap,Mu=new WeakMap,_s=new WeakMap,cl=new WeakMap,ai=new WeakMap,Ru=new WeakMap,ul=new WeakMap,H=new WeakSet,t0=function(){const t=G(this,ol).open({message:n=>{G(this,Is)===t&&V(this,H,fC).call(this,JSON.parse(n))},closed:(n,s)=>V(this,H,dC).call(this,t,n,s)});Se(this,Is,t)},dC=function(t,n,s){if(G(this,Is)!==t)return;Se(this,Is,void 0);for(const l of G(this,ii).values())l.reject(new Error("Disconnected from host"));if(G(this,ii).clear(),G(this,gn)===void 0){Se(this,_s,!0),G(this,ul).call(this,n===Qw?new e0:new Error(s??`Could not connect to ${G(this,ol).label}`));return}if(G(this,_s))return;if(n===Qw){Se(this,_s,!0),V(this,H,yr).call(this,{connection:"closed",unauthorized:!0}),V(this,H,ei).call(this,"error",new e0().message);return}if(n===hF){Se(this,_s,!0),V(this,H,yr).call(this,{connection:"closed"}),V(this,H,ei).call(this,"error",`The host rejected a malformed frame from this client${s===void 0?"":`: ${s}`}`);return}V(this,H,yr).call(this,{connection:"reconnecting"});const{min:r,max:i}=G(this,zu).reconnectDelayMs??{min:200,max:2e3},a=Math.min(i,r*2**ed(this,Mu)._++);setTimeout(()=>{G(this,_s)||V(this,H,t0).call(this)},a)},Qi=function(t){var n;(n=G(this,Is))==null||n.send(JSON.stringify(t))},fC=function(t){var n,s,r;if(!(t===null||typeof t!="object"))switch(t.type){case"hello":{const i=t.protocol,a=typeof i=="number"?i:i!==null&&typeof i=="object"?i.major:void 0;if(a!==Cp.major){const u=new uC(typeof a=="number"?a:Number.NaN,Cp.major,t.hostVersion);Se(this,_s,!0),G(this,gn)===void 0?G(this,ul).call(this,u):(V(this,H,yr).call(this,{connection:"outdated",protocolMismatch:{hostMajor:u.hostMajor,clientMajor:u.clientMajor,...u.hostVersion===void 0?{}:{hostVersion:u.hostVersion},direction:u.direction}}),V(this,H,ei).call(this,"error",u.message)),(n=G(this,Is))==null||n.close();return}const l=i!==null&&typeof i=="object"&&typeof i.minor=="number"?i.minor:0;Se(this,St,l),Se(this,Mu,0),Se(this,al,t.docs),Se(this,Fh,t.toolPresentations),Se(this,Au,t.models),Se(this,Nu,t.defaults??{}),Se(this,ll,t.hostVersion),G(this,br).clear();const c=new Set(Zw(l));for(const u of Rk)c.has(u)?G(this,It).add(u):(G(this,It).delete(u),G(this,Gt).delete(u),G(this,br).delete(u));if(G(this,mn)!==void 0)for(const u of V(this,H,Ji).call(this,G(this,mn)))G(this,It).add(u);if(G(this,ls)!==void 0)for(const u of V(this,H,Ji).call(this,G(this,ls)))G(this,It).add(u);for(const u of G(this,It))V(this,H,Qi).call(this,{type:"subscribe",stream:u});G(this,gn)!==void 0?(V(this,H,yr).call(this,{session:t.session,toolPresentations:t.toolPresentations,connection:"connected",host:V(this,H,s0).call(this)}),V(this,H,Zs).call(this)):V(this,H,hC).call(this,t,l);return}case"snapshot":if(!G(this,It).has(t.stream))return;G(this,Gt).set(t.stream,t.value),G(this,br).add(t.stream),V(this,H,Zs).call(this);for(const i of((s=G(this,pa).get(t.stream))==null?void 0:s.splice(0))??[])i.resolve();return;case"ops":if(!G(this,It).has(t.stream)||!G(this,Gt).has(t.stream))return;G(this,Gt).set(t.stream,EJ(G(this,Gt).get(t.stream),t.ops)),V(this,H,Zs).call(this);return;case"ended":G(this,It).delete(t.stream),G(this,Gt).delete(t.stream),G(this,br).delete(t.stream);for(const i of((r=G(this,pa).get(t.stream))==null?void 0:r.splice(0))??[])i.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));V(this,H,Zs).call(this);return;case"result":{const i=G(this,ii).get(t.id);G(this,ii).delete(t.id),t.ok?i==null||i.resolve(t.value):i==null||i.reject(new Error(t.error));return}case"notice":V(this,H,ei).call(this,t.level,t.message);return}},hC=function(t,n){Promise.all(Zw(n).map(s=>V(this,H,_f).call(this,s))).then(()=>{Se(this,gn,{session:t.session,organized:{chats:[],projects:[],archived:[]},models:V(this,H,rs).call(this,"models")??t.models,defaults:V(this,H,r0).call(this,t.defaults??{}),notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null,auth:null,settings:null,agents:null,host:V(this,H,s0).call(this)}),V(this,H,Zs).call(this),G(this,Ru).call(this,{view:V(this,H,pC).call(this),controller:V(this,H,gC).call(this),close:()=>V(this,H,yC).call(this)})})},_f=function(t){return new Promise((n,s)=>{const r=G(this,pa).get(t)??[];r.push({resolve:n,reject:s}),G(this,pa).set(t,r)})},Ji=function(t){return[$p(t),...G(this,al).map(n=>Yw(n.kind,t))]},n0=async function(t){const n=V(this,H,Ji).call(this,t).filter(i=>!G(this,It).has(i)),s=V(this,H,Ji).call(this,t).filter(i=>G(this,It).has(i)&&!G(this,br).has(i)),r=Promise.all([...n,...s].map(i=>V(this,H,_f).call(this,i)));for(const i of n)G(this,It).add(i),V(this,H,Qi).call(this,{type:"subscribe",stream:i});await r},Of=function(t,n){const s=new Set(n===void 0?[]:V(this,H,Ji).call(this,n));for(const r of V(this,H,Ji).call(this,t))s.has(r)||(G(this,It).delete(r),G(this,Gt).delete(r),G(this,br).delete(r),V(this,H,Qi).call(this,{type:"unsubscribe",stream:r}))},rs=function(t){return G(this,Gt).get(t)},s0=function(){return{protocol:{major:Cp.major,minor:G(this,St)},...G(this,ll)===void 0?{}:{version:G(this,ll)}}},r0=function(t){const n=V(this,H,rs).call(this,"settings");return n===void 0?t:{...n.defaultModel===null?{}:{model:n.defaultModel},...n.defaultThinkingLevel===null?{}:{thinkingLevel:n.defaultThinkingLevel}}},xC=function(t,n){const s=V(this,H,rs).call(this,"conversations")??[],r=new Map(s.map(a=>[a.id,a.parent]));let i=t;for(let a=0;i!==void 0&&a<8;a++){if(i===n)return!0;i=r.get(i)}return!1},i0=function(t){return G(this,al).flatMap(n=>{const s=Yw(n.kind,t);return G(this,Gt).has(s)?[{kind:n.kind,presentation:n.presentation,value:G(this,Gt).get(s)}]:[]})},Zs=function(){var c;if(G(this,gn)===void 0)return;const t=G(this,mn),n=G(this,ls),s=t===void 0?void 0:G(this,Gt).get($p(t)),r=V(this,H,rs).call(this,"conversations")??[],i=V(this,H,rs).call(this,"index")??{projects:[],conversations:[]},a=((c=V(this,H,rs).call(this,"devices"))==null?void 0:c.devices)??[],l=G(this,It).has("tasks")?G(this,Gt).get("tasks"):void 0;V(this,H,yr).call(this,{conversation:s,models:V(this,H,rs).call(this,"models")??G(this,Au),organized:nq(i,r),home:t===void 0?void 0:rq(i,r,t),checkout:t===void 0?void 0:sq(i,r,t),tasks:l,docs:t===void 0?[]:V(this,H,i0).call(this,t),side:n===void 0?void 0:{id:n,conversation:G(this,Gt).get($p(n)),docs:V(this,H,i0).call(this,n)},devices:a,mcp:V(this,H,rs).call(this,"mcp")??null,auth:V(this,H,rs).call(this,"auth")??null,settings:V(this,H,rs).call(this,"settings")??null,agents:V(this,H,rs).call(this,"agents")??null,defaults:V(this,H,r0).call(this,G(this,Nu))})},yr=function(t){G(this,gn)!==void 0&&(Se(this,gn,{...G(this,gn),...t}),!G(this,cl)&&(Se(this,cl,!0),queueMicrotask(()=>{Se(this,cl,!1);for(const n of G(this,il))n()})))},ei=function(t,n){G(this,gn)!==void 0&&V(this,H,yr).call(this,{notices:[...G(this,gn).notices,{id:ed(this,Vh)._++,level:t,message:n}].slice(-20)})},et=function(t,n){var r;if(G(this,Is)===void 0||((r=G(this,gn))==null?void 0:r.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const s=ed(this,Gh)._++;return new Promise((i,a)=>{G(this,ii).set(s,{resolve:i,reject:a}),V(this,H,Qi).call(this,{type:"call",id:s,method:t,args:n})})},sn=function(t){return Se(this,ai,G(this,ai).then(t).then(()=>{},n=>V(this,H,ei).call(this,"error",n instanceof Error?n.message:String(n)))),G(this,ai)},Ys=function(t){const n=G(this,ai).then(t);return Se(this,ai,n.then(()=>{},()=>{})),n},pC=function(){return{current:()=>G(this,gn),subscribe:t=>(G(this,il).add(t),()=>G(this,il).delete(t))}},gC=function(){const t=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),s=>s.toString(16).padStart(2,"0")).join(""),n=()=>{if(G(this,mn)===void 0)throw new Error("No conversation selected");return G(this,mn)};return{addProject:s=>V(this,H,Ys).call(this,()=>V(this,H,et).call(this,"addProject",{path:s})),listFolders:s=>V(this,H,Ys).call(this,()=>{if(!os(G(this,St),"listFolders"))throw new Error("The host is too old for this (needs protocol 5.3); run `pinomad upgrade` on the host");return V(this,H,et).call(this,"listFolders",s===void 0?{}:{path:s})}),removeProject:s=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"removeProject",{path:s})),renameConversation:(s,r)=>V(this,H,Ys).call(this,async()=>{if(!os(G(this,St),"renameConversation"))throw new Error("The host is too old for this (needs protocol 5.4); run `pinomad upgrade` on the host");await V(this,H,et).call(this,"renameConversation",{conversationId:s,title:r})}),createConversation:(s,r,i)=>V(this,H,sn).call(this,async()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!sa(G(this,St),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");if((i==null?void 0:i.agent)!==void 0&&!sa(G(this,St),"agentConversations"))throw new Error("The host is too old for named agents (needs protocol 5.10); run `pinomad upgrade` on the host");const{conversationId:l}=await V(this,H,et).call(this,"createConversation",{home:s,text:r,requestId:t(),...(i==null?void 0:i.checkout)===void 0?{}:{checkout:i.checkout},...(i==null?void 0:i.model)===void 0?{}:{model:i.model},...(i==null?void 0:i.thinkingLevel)===void 0?{}:{thinkingLevel:i.thinkingLevel},...(i==null?void 0:i.agent)===void 0?{}:{agent:i.agent},...a.length===0?{}:{images:a}});await V(this,H,Df).call(this,l)}),archive:(s,r)=>V(this,H,sn).call(this,async()=>{await V(this,H,et).call(this,"archive",{conversationId:s,archived:r}),r&&s===G(this,mn)&&V(this,H,mC).call(this),r&&G(this,ls)!==void 0&&V(this,H,xC).call(this,G(this,ls),s)&&await V(this,H,Lf).call(this,void 0)}),submit:(s,r,i)=>V(this,H,sn).call(this,()=>{const a=(i==null?void 0:i.images)??[];if(a.length>0&&!sa(G(this,St),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");return V(this,H,et).call(this,"submit",{conversationId:(i==null?void 0:i.target)??n(),text:s,whenBusy:r,requestId:(i==null?void 0:i.requestId)??t(),...a.length===0?{}:{images:a}})}),compact:s=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"compact",{conversationId:n(),...s===void 0?{}:{instructions:s}})),abort:s=>{const r=s??G(this,mn);return r===void 0?(V(this,H,ei).call(this,"error","No conversation selected"),Promise.resolve()):V(this,H,et).call(this,"abort",{conversationId:r}).then(()=>{},i=>V(this,H,ei).call(this,"error",i instanceof Error?i.message:String(i)))},setThinkingLevel:s=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"setThinkingLevel",{conversationId:n(),level:s})),setModel:s=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"setModel",{conversationId:n(),model:s})),toggleTasks:()=>V(this,H,sn).call(this,async()=>{if(G(this,It).delete("tasks")){V(this,H,Qi).call(this,{type:"unsubscribe",stream:"tasks"}),G(this,Gt).delete("tasks"),V(this,H,Zs).call(this);return}G(this,It).add("tasks");const s=V(this,H,_f).call(this,"tasks");V(this,H,Qi).call(this,{type:"subscribe",stream:"tasks"}),await s}),switchConversation:s=>V(this,H,sn).call(this,()=>V(this,H,Df).call(this,s)),showSide:s=>V(this,H,sn).call(this,()=>V(this,H,Lf).call(this,s)),fork:(s,r,i,a)=>V(this,H,sn).call(this,async()=>{const{conversationId:l}=await V(this,H,et).call(this,"fork",{conversationId:n(),entryId:s,...i===void 0?{}:{removeTools:i}});(a==null?void 0:a.show)==="side"?await V(this,H,Lf).call(this,l):await V(this,H,Df).call(this,l),await V(this,H,et).call(this,"submit",{conversationId:l,text:r,whenBusy:"followUp",requestId:t()})}),answer:(s,r,i,a)=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"answer",{conversationId:a??n(),kind:s,requestId:r,answers:i})),changes:()=>V(this,H,Ys).call(this,()=>V(this,H,et).call(this,"changes",{conversationId:n()})),listFiles:(s,r)=>os(G(this,St),"listFiles")?V(this,H,et).call(this,"listFiles",{scope:s,query:r}):Promise.reject(new Error("The host is too old for this (needs protocol 5.10); run `pinomad upgrade` on the host")),createPairing:()=>V(this,H,Ys).call(this,()=>V(this,H,et).call(this,"createPairing",{})),revokeDevice:s=>V(this,H,sn).call(this,()=>V(this,H,et).call(this,"revokeDevice",{publicKey:s})),logout:s=>V(this,H,sn).call(this,()=>{if(!os(G(this,St),"logout"))throw new Error("The host is too old for this (needs protocol 5.1); run `pinomad upgrade` on the host");return V(this,H,et).call(this,"logout",{providerId:s})}),updateSettings:s=>V(this,H,sn).call(this,()=>{if(!os(G(this,St),"updateSettings"))throw new Error("The host is too old for this (needs protocol 5.2); run `pinomad upgrade` on the host");if(s.acceptAccountDevices!==void 0&&!sa(G(this,St),"acceptAccountDevices"))throw new Error("The host is too old for this (needs protocol 5.8); run `pinomad upgrade` on the host");return V(this,H,et).call(this,"updateSettings",{patch:s})}),createAgent:s=>V(this,H,Ys).call(this,async()=>{if(!os(G(this,St),"createAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,et).call(this,"createAgent",{role:s})}),updateAgent:s=>V(this,H,Ys).call(this,async()=>{if(!os(G(this,St),"updateAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,et).call(this,"updateAgent",{role:s})}),deleteAgent:s=>V(this,H,Ys).call(this,async()=>{if(!os(G(this,St),"deleteAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,et).call(this,"deleteAgent",{name:s})}),setPushToken:s=>V(this,H,Ys).call(this,async()=>{if(!os(G(this,St),"setPushToken"))throw new Error("The host is too old for this (needs protocol 5.7); run `pinomad upgrade` on the host");if(s!==null&&typeof s!="string"&&!sa(G(this,St),"apnsPush"))throw new Error("The host is too old for this (needs protocol 5.9); run `pinomad upgrade` on the host");await V(this,H,et).call(this,"setPushToken",{token:s})})}},Df=async function(t){const n=G(this,mn);t!==n&&(await V(this,H,n0).call(this,t),Se(this,mn,t),n!==void 0&&V(this,H,Of).call(this,n,G(this,ls)),V(this,H,Zs).call(this))},mC=function(){const t=G(this,mn);t!==void 0&&(Se(this,mn,void 0),V(this,H,Of).call(this,t,G(this,ls)),V(this,H,Zs).call(this))},Lf=async function(t){const n=G(this,ls);t!==n&&(t!==void 0&&await V(this,H,n0).call(this,t),Se(this,ls,t),n!==void 0&&V(this,H,Of).call(this,n,G(this,mn)),V(this,H,Zs).call(this))},yC=function(){var t;G(this,_s)||(Se(this,_s,!0),V(this,H,yr).call(this,{connection:"closed"}),(t=G(this,Is))==null||t.close())};function IJ(e,t){const[n,s]=x.useState({status:"connecting"});return x.useEffect(()=>{let r,i=!1;return MJ({reconnectDelayMs:{min:200,max:2e3},...e}).then(a=>{if(i){a.close();return}r=a,a.controller.toggleTasks(),s({status:"ready",remote:a})},a=>{i||s({status:"failed",error:a instanceof Error?a.message:String(a),unauthorized:a instanceof e0,...a instanceof uC?{mismatch:a}:{}})}),()=>{i=!0,r==null||r.close()}},[t]),n}function _J(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const OJ={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},DJ={flex:1,minHeight:0};function LJ(){const[e]=x.useState(EU),[t,n]=x.useState();x.useEffect(()=>{let i=!0;return e.list().catch(a=>(console.error("Could not load the paired-host list",a),[])).then(a=>{if(!i)return;const l=localStorage.getItem(wu);n({hosts:a,activeHostKey:l,address:jU(window.location.hash,window.location,a,l)})}),()=>{i=!1}},[e]),x.useEffect(()=>{const i=()=>{window.location.hash!==""&&window.location.reload()};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]);const s=x.useMemo(()=>t===void 0?{store:e,hosts:[],activeHostKey:null,paired:()=>Promise.resolve()}:{store:e,hosts:t.hosts,activeHostKey:t.activeHostKey,paired:async i=>{await e.save(i),localStorage.setItem(wu,i.hostKey),n(a=>a===void 0?a:{...a,hosts:[...a.hosts.filter(l=>l.hostKey!==i.hostKey),i],activeHostKey:i.hostKey})}},[e,t]);if(t===void 0)return o.jsx(Tl,{children:null});const{address:r}=t;return o.jsx(r9.Provider,{value:s,children:o.jsx(MU,{children:r===void 0?o.jsx(Tl,{children:o.jsx(BJ,{})}):o.jsx(qJ,{address:r})})})}function BJ(){return Hx().state.status==="unavailable"?o.jsxs(fe,{gap:4,hAlign:"center",style:{width:"100%",maxWidth:420},children:[o.jsx(Si,{title:"No host link",description:"Paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(Mm,{})]}):o.jsxs(fe,{gap:6,style:{width:"100%",maxWidth:420},children:[o.jsx(a9,{}),o.jsxs(fe,{gap:2,children:[o.jsx(ee,{type:"supporting",children:"Or paste a pairing link from pinomad pair or Devices → Pair a device."}),o.jsx(Mm,{})]})]})}function Tl({children:e}){const t=f7().reserveMacTrafficLights;return o.jsxs(fe,{style:OJ,isScrollable:!0,children:[t?o.jsx("div",{"aria-hidden":"true",className:"pinomad-drag fixed inset-x-0 top-0 h-10"}):null,o.jsx(fe,{minHeight:"100%",style:{flexShrink:0},hAlign:"center",vAlign:"center",padding:6,children:e})]})}function qJ({address:e}){return e.kind==="token"?o.jsx(bC,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):e.kind==="pair"?o.jsx(HJ,{address:e}):o.jsx(kC,{address:e})}function HJ({address:e}){const[t,n]=x.useState(!1),s=()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()};if(t)return o.jsx(kC,{address:e});const r=new URL(e.url);return o.jsx(Tl,{children:o.jsxs(fe,{gap:4,hAlign:"center",style:{maxWidth:420},children:[o.jsx(Si,{title:"Pair with this host?",description:`This device will pair with ${r.host}.`}),o.jsx(ee,{type:"supporting",style:{wordBreak:"break-all"},children:e.url}),o.jsxs(we,{gap:2,children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Pair",variant:"primary",onClick:()=>n(!0)})]})]})})}function kC({address:e}){const{store:t,hosts:n,paired:s}=qx(),r=x.useMemo(()=>n.find(f=>f.hostKey===e.hostKey),[n,e]),[i,a]=x.useState(),l=x.useMemo(()=>e.kind==="pair"&&r!==void 0?Em(Sa(r.privateKey)):e.kind==="device"?Em(Sa(e.privateKey)):$k(),[e,r]),c=x.useMemo(()=>({transport:Q7({url:e.url,hostKey:Sa(e.hostKey),device:l,...e.kind==="pair"?{pairing:{secret:e.secret,name:n9(navigator.userAgent)},onPaired:()=>{const f={url:e.url,hostKey:e.hostKey,privateKey:Ck(l.privateKey)};s(f).catch(h=>{console.error("Could not save the paired host",h),a(f)}),history.replaceState(null,"",window.location.pathname+window.location.search)}}:{}})}),[e,l,s]),u=e.kind==="pair"?o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(Si,{title:"This pairing code was used or has expired",description:"Generate a new QR on the host: run bun run pair, or open Devices → Pair a device."}),n.length===0?null:o.jsx(re,{label:"Use saved pairing",variant:"secondary",onClick:()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}})]}):o.jsxs(fe,{gap:4,hAlign:"center",children:[o.jsx(Si,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),o.jsx(jJ,{hostKey:e.hostKey}),o.jsx(re,{label:"Forget this host",variant:"secondary",onClick:()=>{localStorage.getItem(wu)===e.hostKey&&localStorage.removeItem(wu),t.remove(e.hostKey).finally(()=>window.location.reload())}})]}),d=i===void 0?void 0:o.jsx(yt,{status:"warning",container:"section",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:o.jsx(re,{label:"Retry",variant:"ghost",onClick:()=>{s(i).then(()=>a(void 0),f=>console.error("Could not save the paired host",f))}})});return o.jsx(bC,{options:c,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:u,device:l,notice:d})}function bC({options:e,connectionKey:t,label:n,rejected:s,device:r,notice:i}){const a=IJ(e,t);return a.status==="connecting"?o.jsx(Tl,{children:o.jsx(Si,{title:"Connecting",description:n})}):a.status==="failed"?o.jsxs(Tl,{children:[a.mismatch!==void 0?o.jsx(vC,{wsUrl:n,mismatch:a.mismatch}):s!==void 0&&a.unauthorized?s:o.jsx(yt,{status:"error",title:"Could not connect to the host",description:a.error}),o.jsx(u9,{})]}):o.jsx(UJ,{remote:a.remote,wsUrl:n,rejected:s,device:r,notice:i})}const a0="pinomad.reloadedForProtocol";function vC({wsUrl:e,mismatch:t}){var a;const n=w7(),s=((a=window.pinomadDesktop)==null?void 0:a.updates)!==void 0,[r]=x.useState(()=>t.direction==="client-older"&&s||!SU(e,window.location)||sessionStorage.getItem(a0)===String(t.hostMajor)?!1:(sessionStorage.setItem(a0,String(t.hostMajor)),window.location.reload(),!0));if(x.useEffect(()=>{var l,c;t.direction==="client-older"&&((c=(l=window.pinomadDesktop)==null?void 0:l.updates)==null||c.check())},[t.direction]),r)return null;const i=t.hostVersion===void 0?"":` Host version: ${t.hostVersion}.`;return t.direction==="client-older"?o.jsxs(fe,{gap:4,children:[o.jsx(yt,{status:"error",container:"section",title:"Client out of date",description:`The host speaks a newer protocol. ${s?"Update the app.":"Reload the page, or update the app."}${i}`}),s?o.jsx(PJ,{update:n}):null]}):o.jsx(yt,{status:"error",container:"section",title:"Host out of date",description:`This client speaks a newer protocol. Upgrade the host (pinomad upgrade).${i}`})}function PJ({update:e}){if(e===void 0)return o.jsx(ee,{type:"supporting",children:"Checking for updates…"});const{status:t}=e;switch(t.state){case"checking":return o.jsx(ee,{type:"supporting",children:"Checking for updates…"});case"available":case"downloading":{const n=t.progressPercent===void 0?"":` ${Math.round(t.progressPercent)}%`;return o.jsx(ee,{type:"supporting",children:`Downloading PiNomad ${t.availableVersion??""}…${n}`})}case"ready":return o.jsx(re,{label:"Restart to update",variant:"primary",onClick:()=>e.install()});case"error":return o.jsxs(we,{gap:2,vAlign:"center",children:[o.jsx(ee,{type:"supporting",children:t.message}),o.jsx(re,{label:"Retry",variant:"secondary",onClick:()=>e.check()})]});case"disabled":return o.jsx(ee,{type:"supporting",children:t.reason??"Updates are unavailable in this build."});default:return o.jsx(ee,{type:"supporting",children:`PiNomad ${t.currentVersion} is up to date; no newer release found.`})}}function UJ({remote:e,wsUrl:t,rejected:n,device:s,notice:r}){var _,O,D,L;const i=_J(e),[a,l]=x.useState(!0),[c,u]=x.useState({kind:"chat"});x.useEffect(()=>l(i.conversation===void 0),[(_=i.conversation)==null?void 0:_.conversation.id]),uq(i,B=>{var P;B===((P=i.conversation)==null?void 0:P.conversation.id)?l(!1):e.controller.switchConversation(B)});const f=a?void 0:i.conversation,h=f!==void 0&&_k(f),p=Ha("(max-width: 1023px)"),[m,b]=x.useState(!1),[y,g]=x.useState("live"),k=x.useCallback((B,P)=>{g(P),b(!0),e.controller.showSide(B)},[e]),v=x.useCallback(B=>{e.controller.switchConversation(B),e.controller.showSide(void 0),p&&b(!1)},[e,p]),w=f===void 0||(O=o7(i.organized,f.conversation.id))==null?void 0:O.summary.id;x.useEffect(()=>{e.controller.showSide(void 0)},[w]);const j=c.kind==="chat"?"New chat":`New conversation in ${WJ(i.organized,c.path)}`,S=f===void 0||(D=Nr(i.organized,f.conversation.id))==null?void 0:D.summary,C=S==null?void 0:S.parent,E=C===void 0||(L=Nr(i.organized,C))==null?void 0:L.summary,T=(S==null?void 0:S.kind)==="conversation",$=x.useCallback(B=>S===void 0?[]:c7(i.organized,S.id,B),[i.organized,S]),N=x.useCallback(B=>{var P;return(P=Nr(i.organized,B))==null?void 0:P.summary},[i.organized]),A=B=>{u(B),l(!0)},[M,I]=x.useState(),[R,z]=x.useState(!1);return x.useEffect(()=>{i.connection==="connected"&&sessionStorage.removeItem(a0)},[i.connection]),i.unauthorized===!0&&n!==void 0?o.jsxs(Tl,{children:[n,o.jsx(u9,{})]}):o.jsxs(o.Fragment,{children:[o.jsx(eJ,{view:i,remote:e,device:s,narrow:p,drafting:a,draftingChat:a&&c.kind==="chat",draftLabel:j,conversation:f,summary:S,parentSummary:E,banner:o.jsxs(o.Fragment,{children:[r,o.jsx(VJ,{view:i,wsUrl:t})]}),onDraft:A,onOpenChanges:()=>z(!0),panelOpen:m,panelTab:y,onPanelOpen:b,onPanelTab:g,openInPanel:k,openInMain:v,children:f===void 0?o.jsx(yJ,{view:i,remote:e,draft:c,onDraft:A,connected:i.connection==="connected"}):o.jsx(X4,{style:DJ,composer:o.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:o.jsxs(fe,{gap:1,children:[o.jsx(m$,{docs:i.docs,remote:e,connected:i.connection==="connected"}),o.jsx(wJ,{view:i,remote:e,conversation:f,busy:h,narrow:p})]})}),emptyState:o.jsx(Si,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:o.jsx(Z$,{conversation:f,toolPresentations:i.toolPresentations,connected:i.connection==="connected",canFork:T,openInPanel:k,onFork:I,forksAt:$,summaryOf:N,onRetry:(S==null?void 0:S.kind)==="subagent"?void 0:async({text:B,images:P,requestId:X})=>{Cl(),await e.controller.submit(B,"followUp",{requestId:X,images:P})}})},f.conversation.id)}),M===void 0?null:o.jsx(FJ,{entryId:M,remote:e,connected:i.connection==="connected",onClose:()=>I(void 0),onForked:()=>{g("threads"),b(!0)}}),R&&f!==void 0&&o.jsx(GJ,{view:i,remote:e,busy:h,onClose:()=>z(!1)})]})}function FJ({entryId:e,remote:t,connected:n,onClose:s,onForked:r}){const[i,a]=x.useState("Continue from here."),l=()=>{Cl(),t.controller.fork(e,i.trim(),void 0,{show:"side"}),r(),s()};return o.jsx(js,{isOpen:!0,onOpenChange:c=>c?void 0:s(),purpose:"form",width:480,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Fork from this answer",subtitle:"The fork sees the conversation up to here and works in the same files.",onOpenChange:()=>s()}),content:o.jsx(es,{children:o.jsx(gs,{label:"First message",value:i,onChange:a})}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Cancel",variant:"secondary",onClick:s}),o.jsx(re,{label:"Fork",variant:"primary",isDisabled:!n||i.trim()==="",onClick:l})]})})})})}function GJ({view:e,remote:t,busy:n,onClose:s}){const[r,i]=x.useState(),a=x.useMemo(()=>()=>void t.controller.changes().then(i).catch(()=>{}),[t]);x.useEffect(a,[a]);const l=x.useRef(n);x.useEffect(()=>{l.current&&!n&&a(),l.current=n},[n,a]);const c=e.checkout===void 0;return o.jsx(js,{isOpen:!0,onOpenChange:u=>u?void 0:s(),width:720,children:o.jsx(Jn,{header:o.jsx(Ss,{title:"Changes",onOpenChange:()=>s()}),content:o.jsx(es,{children:o.jsx(fe,{gap:2,padding:3,children:r===void 0?o.jsx(ee,{type:"supporting",children:"Loading…"}):r.available?o.jsxs(o.Fragment,{children:[c?o.jsx(ee,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,r.truncated?o.jsx(ee,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,o.jsx(X$,{patch:r.patch})]}):o.jsx(ee,{type:"supporting",children:r.reason})})}),footer:o.jsx(Va,{children:o.jsxs(we,{gap:2,hAlign:"end",children:[o.jsx(re,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:a}),o.jsx(re,{label:"Close",variant:"primary",onClick:s})]})})})})}function VJ({view:e,wsUrl:t}){return e.connection==="outdated"?e.protocolMismatch===void 0?null:o.jsx(vC,{wsUrl:t,mismatch:e.protocolMismatch}):e.connection==="reconnecting"?o.jsx(yt,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?o.jsx(yt,{status:"error",container:"section",title:"Disconnected from the host"}):null}function WJ(e,t){var n;return((n=e.projects.find(s=>s.project.path===t))==null?void 0:n.project.name)??t.split("/").at(-1)??t}NS.createRoot(document.getElementById("root")).render(o.jsx(x.StrictMode,{children:o.jsx(g4,{theme:tq,children:o.jsx(LJ,{})})}));
|