@ggui-ai/console 0.22.0 → 0.23.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.
@@ -0,0 +1,143 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=re(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var A=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},j={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=j,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,A)}catch(e){A(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function le(e){return{current:e}}function M(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function N(e,t){ce++,se[ce]=e.current,e.current=t}var ue=le(null),de=le(null),fe=le(null),pe=le(null);function me(e,t){switch(N(fe,t),N(de,e),N(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}M(ue),N(ue,e)}function he(){M(ue),M(de),M(fe)}function ge(e){e.memoizedState!==null&&N(pe,e);var t=ue.current,n=Ud(t,e.type);t!==n&&(N(de,e),N(ue,n))}function _e(e){de.current===e&&(M(ue),M(de)),pe.current===e&&(M(pe),Qf._currentValue=oe)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,P=t.unstable_IdlePriority,F=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof F==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(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&261888;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 Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(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 at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=j.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function st(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[lt])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=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]*$`),Ot={},kt={};function At(e){return Te.call(kt,e)?!0:Te.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Mt(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 Nt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Pt(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Pt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ae(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=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 Xt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(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 $t=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`],[`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`]]),en=/^[\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 tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(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="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Ht(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(xu(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(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 bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=f({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=f({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,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!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(f({},An,{dataTransfer:0})),Nn=Sn(f({},Tn,{relatedTarget:0})),Pn=Sn(f({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(f({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(f({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={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`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(f({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(f({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(f({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(f({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(f({},An,{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})),qn=Sn(f({},Cn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=fn&&`CompositionEvent`in window,Xn=null;fn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=fn&&`TextEvent`in window&&!Xn,Qn=fn&&(!Yn||Xn&&8<Xn&&11>=Xn),$n=` `,er=!1;function tr(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var rr=!1;function ir(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(er=!0,$n):null;case`textInput`:return e=t.data,e===$n&&er?null:e;default:return null}}function ar(e,t){if(rr)return e===`compositionend`||!Yn&&tr(e,t)?(e=vn(),_n=gn=hn=null,rr=!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 Qn&&t.locale!==`ko`?null:t.data;default:return null}}var or={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!or[e.type]:t===`textarea`}function cr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Dd(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){bd(e,0)}function fr(e){if(Rt(bt(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(fn){var hr;if(fn){var gr=`oninput`in document;if(!gr){var _r=document.createElement(`div`);_r.setAttribute(`oninput`,`return;`),gr=typeof _r.oninput==`function`}hr=gr}else hr=!1;mr=hr&&(!document.documentMode||9<document.documentMode)}function vr(){lr&&(lr.detachEvent(`onpropertychange`,yr),ur=lr=null)}function yr(e){if(e.propertyName===`value`&&fr(ur)){var t=[];cr(t,ur,e,an(e)),un(dr,t)}}function br(e,t,n){e===`focusin`?(vr(),lr=t,ur=n,lr.attachEvent(`onpropertychange`,yr)):e===`focusout`&&vr()}function xr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return fr(ur)}function Sr(e,t){if(e===`click`)return fr(t)}function Cr(e,t){if(e===`input`||e===`change`)return fr(t)}function wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Tr=typeof Object.is==`function`?Object.is:wr;function Er(e,t){if(Tr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!Tr(e[i],t[i]))return!1}return!0}function Dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=Dr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(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=zt(e.document)}return t}function jr(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 Mr=fn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==zt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=Dd(Pr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};fn&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Tt(t,[e])}var $r=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(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&65011712,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 mi(e,t){e.flags&=65011714;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 hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=di(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return gi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=di(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=di(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=di(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function I(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function L(e){var t=di(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var bi=[],xi=0,Si=null,Ci=0,R=[],z=0,wi=null,Ti=1,Ei=``;function Di(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Oi(e,t,n){R[z++]=Ti,R[z++]=Ei,R[z++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Be(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===wi;)wi=R[--z],R[z]=null,Ei=R[--z],R[z]=null,Ti=R[--z],R[z]=null}function ji(e,t){R[z++]=Ti,R[z++]=Ei,R[z++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,B=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:Z(`cancel`,t),Z(`close`,t);break;case`iframe`:case`object`:case`embed`:Z(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)Z(vd[n],t);break;case`source`:Z(`error`,t);break;case`img`:case`image`:case`link`:Z(`error`,t),Z(`load`,t);break;case`details`:Z(`toggle`,t);break;case`input`:Z(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Z(`invalid`,t);break;case`textarea`:Z(`invalid`,t),qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(Z(`beforetoggle`,t),Z(`toggle`,t)),r.onScroll!=null&&Z(`scroll`,t),r.onScrollEnd!=null&&Z(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:Mi=Mi.return}}function Bi(e){if(e!==Mi)return!1;if(!B)return zi(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Wd(e.type,e.memoizedProps)),n=!n),n&&Ni&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=df(e)}else t===27?(t=Ni,Qd(e.type)?(e=uf,uf=null,Ni=e):Ni=t):Ni=Mi?lf(e.stateNode.nextSibling):null;return!0}function Vi(){Ni=Mi=null,B=!1}function Hi(){var e=Pi;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=le(null),Gi=null,Ki=null;function qi(e,t,n){N(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,M(Wi)}function Yi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Xi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Yi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Yi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Zi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Tr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=fd(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=A.S;A.S=function(e,t){tu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=le(null);function va(){var e=_a.current;return e===null?K.pooledCache:e}function ya(e,t){t===null?N(_a,_a.current):N(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=I(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=I(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=hi(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(ae(t)||ne(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Da(n),p(e,t,n,r)}if(ae(n)||ne(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Da(r),m(e,t,n,r,i)}if(ae(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&Di(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return B&&Di(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),B&&Di(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),B&&Di(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&Di(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),B&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(ae(o))return h(e,r,o,c);if(ne(o)){if(l=ne(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=I(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(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 Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(J&p)===p:(r&p)===p){p!==0&&p===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:za=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=le(null),Qa=le(0);function $a(e,t){e=Wl,N(Qa,e),N(Za,t),Wl=e|t.baseLanes}function eo(){N(Qa,Wl),N(Za,Za.current)}function to(){Wl=Qa.current,M(Za),M(Qa)}var no=le(null),ro=null;function io(e){var t=e.alternate;N(lo,lo.current&1),N(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){N(lo,lo.current),N(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(N(lo,lo.current),N(no,e),ro===null&&(ro=e)):so(e)}function so(){N(lo,lo.current),N(no,no.current)}function co(e){M(no),ro===e&&(ro=null),M(lo)}var lo=le(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 fo=0,V=null,H=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?zs:Bs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){A.H=Rs;var t=H!==null&&H.next!==null;if(fo=0,po=H=V=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Qi(e)&&(rc=!0))}function To(e,t,n,r){V=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=H=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Vs,o=t(n,r)}while(ho);return o}function Eo(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(H===null?null:H.memoizedState)!==e&&(V.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}fo=0,po=H=V=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?V.memoizedState=po=e:po=po.next=e,po}function jo(){if(H===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=H.next;var t=po===null?V.memoizedState:po.next;if(t!==null)po=t,H=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));H=e,e={memoizedState:H.memoizedState,baseState:H.baseState,baseQueue:H.baseQueue,queue:H.queue,next:null},po===null?V.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ea(yo,e,t),t=V,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?zs:Bs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return ea(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),H,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(fo&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((fo&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,Kl|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&(rc=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Tr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=V,a=jo(),o=B;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((H||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),K===null)throw Error(i(349));o||fo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=Mo(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Go(e){var t=oi(e,2);t!==null&&gu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,H,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(U(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(B){var n=K.formState;if(n!==null){a:{var r=V;if(B){if(Ni){b:{for(var i=Ni,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=lf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,V,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,V,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),H,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===xa?Ca:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=H;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=Mo(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();V.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;H!==null&&r!==null&&So(r,H.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(V.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=Mo(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||fo&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),V.lanes|=e,Kl|=e,n)}function Ss(e,t,n,r){return Tr(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(J&261930)?(rc=!0,e.memoizedState=n):(e=hu(),V.lanes|=e,Kl|=e,t):(e=xs(e,n,r),Tr(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,Fs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ha(c,r),mu(e)):Ps(e,t,r,mu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,oe,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},mu())}function Os(){return ea(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(gu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},U(e)?Is(t,n):(n=ai(e,t,n,r),n!==null&&(gu(n,e,r),Ls(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,mu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(U(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),K===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return gu(n,e,r),Ls(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},U(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&gu(t,e,2)}function U(e){var t=e.alternate;return e===V||t!==null&&t===V}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Rs={readContext:ea,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Rs.useEffectEvent=xo;var zs={readContext:ea,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){ze(!0);try{n(t)}finally{ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,V,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=Ao();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(B){var n=Ei,r=Ti;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,V)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:ea,use:Po,useCallback:ys,useContext:ea,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),H.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),H,e,t)},useMemoCache:Fo,useCacheRefresh:As};Bs.useEffectEvent=ps;var Vs={readContext:ea,use:Po,useCallback:ys,useContext:ea,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return H===null?xs(n,e,t):Ss(n,H.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return H===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,H,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(gu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(gu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(gu(t,e,n),Wa(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Er(n,r)||!Er(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){$r(e)}function Js(e){console.error(e)}function Ys(e){$r(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ha(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),Ou(),!1}if(B)return t=no.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=Qs(e.stateNode,r,a),Ga(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return $i(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(B&&s&&ki(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref){if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return La(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ao(t),(e=Ni)?(e=af(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=L(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a){if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(rc||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=K,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),gu(r,e,s),nc;Ou(),t=fc(e,t,n)}else e=o.treeContext,Ni=lf(s.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=dc(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return $i(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(B&&r&&ki(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(B&&r&&ki(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if($i(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=za||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=za||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Vi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:ba()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(lo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(B){if(a?io(t):so(t),(e=Ni)?(e=af(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=L(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(io(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=K,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),gu(s,e,r),nc;of(c)||Ou(),t=Tc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=lf(c.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=di(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return La(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,N(lo,o),ic(e,t,r,n),r=B?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Qi(e)))}function jc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),N(lo,lo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}}else rc=!1,B&&t.flags&1048576&&Oi(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),qa(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}if(r!==a){a=yi(Error(i(424)),t),Ui(a),t=vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=lf(e.firstChild),Mi=t,B=!0,Pi=null,Fi=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(n=t.type,e=t.pendingProps,r=Vd(fe.current).createElement(n),r[lt]=t,r[ut]=e,Fd(r,n,e),St(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&B&&(r=t.stateNode=pf(t.type,t.pendingProps,fe.current),Mi=t,Fi=!0,a=Ni,Qd(t.type)?(uf=a,Ni=lf(r.firstChild)):Ni=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((a=r=Ni)&&(r=nf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=lf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=Ni)&&(n=rf(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Li(t)),null;case 13:return Sc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=K,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw Oa=wa,Sa}}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t)){if(Tu())e.flags|=8192;else throw Oa=wa,Sa}}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,Xl|=t)}function Lc(e,t){if(!B)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=ue.current,Bi(t)?Ri(t,e):(e=pf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=ue.current,Bi(t))Ri(t,o);else{var s=Vd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Li(t,!0)}else e=Vd(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[lt]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[lt]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return he(),e===null&&Cd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ji(t.type),Rc(t),null;case 19:if(M(lo),r=t.memoizedState,r===null)return Rc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return N(lo,lo.current&1|2),B&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>nu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!B)return Rc(t),null}else 2*Ae()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=lo.current,N(lo,a?n&1|2:n&1),B&&Di(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&M(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(lo),null;case 4:return he(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&M(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ai(t),t.tag){case 3:Ji(oa),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:M(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&M(_a);break;case 24:Ji(oa)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){X(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){X(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){X(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){X(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){X(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){X(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){X(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){X(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){X(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[ut]=t}catch(t){X(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[lt]=e,t[ut]=n}catch(t){X(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,zd=sp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){X(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Hc(5,n);break;case 1:if(xl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){X(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){X(n,n.return,e)}}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(xl(e,n),r&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{Xa(e,t)}catch(e){X(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:xl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&pl(e,n);break;case 13:xl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?Cl(e,n,!!(n.subtreeFlags&8772)):xl(e,n),tl=i,nl=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(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 ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;Qd(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),mf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null){if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){X(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){X(n,t,e)}}break;case 18:ll!==null&&(ul?(e=ll,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):$d(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){X(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){X(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)W(t,e),t=t.sibling}var vl=null;function W(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),yl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode)}else e.stateNode=Lf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:_l(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){X(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){X(e,e.return,t)}}break;case 3:if(Vf=null,a=vl,vl=_f(t.containerInfo),_l(t,e),vl=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){X(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=vl,vl=_f(e.stateNode.containerInfo),_l(t,e),yl(e),vl=r;break;case 12:_l(t,e),yl(e);break;case 31:_l(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){X(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){X(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){X(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){X(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Sl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Sl(t);break;case 27:mf(t.stateNode);case 26:case 5:qc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Hc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){X(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){X(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Kc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(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&&ca(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Hc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){X(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&$(n,vl,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=vl;vl=_f(e.stateNode.containerInfo),jl(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(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 Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return G&2&&J!==0?J&-J:A.T===null?ot():fd()}function hu(){if(Yl===0){if(!(J&536870912)||B){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),Yl=e}else Yl=536870912}return e=no.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,J,Yl,!1)),$e(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(ql|=n),Gl===4&&bu(e,J,Yl,!1)),id(e))}function _u(e,t,n){if(G&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ye(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-Ae(),10<a)){if(bu(r,t,Yl,!Vl),Je(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=qd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}break}while(1);id(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},Ml(t,a,d);var m=(a&62914560)===a?eu-Ae():(a&4194048)===a?tu-Ae():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(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 r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Tr(a(),i))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 bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function xu(){return G&6?!0:(ad(0,!1),!1)}function Su(){if(q!==null){if(Y===0)var e=q.return;else e=q,Ki=Gi=null,ko(e),ja=null,Ma=0,e=q;for(;e!==null;)Vc(e.alternate,e),e=e.return;q=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),K=e,q=n=pi(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=Ye(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,ri(),n}function wu(e,t){V=null,A.H=Rs,t===xa||t===Ca?(t=ka(),Y=3):t===Sa?(t=ka(),Y=4):Y=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(Gl=1,Xs(e,yi(t,e.current)))}function Tu(){var e=no.current;return e===null?!0:(J&4194048)===J?ro===null:(J&62914560)===J||J&536870912?e===ro:!1}function Eu(){var e=A.H;return A.H=Rs,e===null?Rs:e}function Du(){var e=A.A;return A.A=Rl,e}function Ou(){Gl=4,Vl||(J&4194048)!==J&&no.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||K===null||bu(K,J,Yl,!1)}function ku(e,t,n){var r=G;G|=2;var i=Eu(),a=Du();(K!==e||J!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,G=r,A.H=i,A.A=a,q===null&&(K=null,J=0,ri()),o}function Au(){for(;q!==null;)Nu(q)}function ju(e,t){var n=G;G|=2;var r=Eu(),a=Du();K!==e||J!==t?(ru=null,nu=Ae()+500,Cu(e,t)):Hl=Ye(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Y=0,Bl=null,Pu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),id(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:Ta(o)?(Y=0,Bl=null,Pu(t)):(Y=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Gf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Iu(u))}break b}}Y=0,Bl=null,Fu(e,t,o,5);break;case 6:Y=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Ki=Gi=null,A.H=r,A.A=a,G=n,q===null?(K=null,J=0,ri(),Gl):0}function Mu(){for(;q!==null&&!Oe();)Nu(q)}function Nu(e){var t=Mc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):q=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:ko(t);default:Vc(n,t),t=q=mi(t,Wl),t=Mc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):q=t}function Fu(e,t,n,r){Ki=Gi=null,ko(t),ja=null,Ma=0;var i=t.return;try{if(tc(e,i,t,n,J)){Gl=1,Xs(e,yi(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;Gl=1,Xs(e,yi(n,e.current)),q=null;return}t.flags&32768?(B||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=zc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);Gl=6,q=null}function Ru(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,et(e,n,o,s,c,l),e===K&&(q=K=null,J=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(Pe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=A.T,A.T=null,a=j.p,j.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,j.p=a,A.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=G;G|=4;try{W(t,e);var a=Bd,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!zd,Bd=zd=null}finally{G=i,j.p=r,A.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,j.p=r,A.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,ke();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),at(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=j.p,j.p=2,A.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{A.T=t,j.p=i}}cu&3&&Uu(),id(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,ad(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=at(cu),r=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,ad(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{j.p=a,A.T=r,Hu(e,t)}}function Gu(e,t,n){t=yi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&($e(e,2),id(e))}function X(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=yi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),$e(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(Gl===4||Gl===3&&(J&62914560)===J&&300>Ae()-eu?!(G&2)&&Cu(e,0):Jl|=n,Xl===J&&(Xl=0)),id(e)}function Ju(e,t){t===0&&(t=Ze()),e=oi(e,t),e!==null&&($e(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return Ee(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=J,a=Je(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,ud(r,a))}r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Kd()&&(e=rd);for(var t=Ae(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}au!==0&&au!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),at(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=P;break;default:n=Pe}return r=ld.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=J;return r=Je(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),cd(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Uu())return null;_u(e,t,!0)}function dd(){Xd(function(){G&6?Ee(Me,od):sd()})}function fd(){if(rd===0){var e=da;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Zr.length;gd++){var _d=Zr[gd];Qr(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`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(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}}}}function Z(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Nn;break;case`focusout`:u=`blur`,l=Nn;break;case`beforeblur`:case`afterblur`:l=Nn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Mn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Wn;break;case Ur:case Wr:case Gr:l=Pn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=En;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Un;break;case`toggle`:case`beforetoggle`:l=qn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=pr;else if(sr(c)){if(mr)v=Cr;else{v=xr;var y=br}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=pr):v=Sr;if(v&&=v(e,r)){cr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(sr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(s,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(s,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else rr?tr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Qn&&n.locale!==`ko`&&(rr||x!==`onCompositionStart`?x===`onCompositionEnd`&&rr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,rr=!0)),y=Dd(r,x),0<y.length&&(x=new In(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=nr(n),b!==null&&(x.data=b)))),(b=Zn?ir(e,n):ar(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new In(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),hd(s,e,r,n,i)}bd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=dn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
9
+ `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Q(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Q(e,t,`name`,a.name,a,null),Q(e,t,`formEncType`,a.formEncType,a,null),Q(e,t,`formMethod`,a.formMethod,a,null),Q(e,t,`formTarget`,a.formTarget,a,null)):(Q(e,t,`encType`,a.encType,a,null),Q(e,t,`method`,a.method,a,null),Q(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Z(`beforetoggle`,e),Z(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Z(`error`,e),Z(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,o,s,n,null)}}a&&Q(e,t,`srcSet`,n.srcSet,n,null),r&&Q(e,t,`src`,n.src,n,null);return;case`input`:Z(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Q(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Z(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Q(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Z(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Q(e,t,s,c,n,null)}qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Q(e,t,l,r,n,null)}return;case`dialog`:Z(`beforetoggle`,e),Z(`toggle`,e),Z(`cancel`,e),Z(`close`,e);break;case`iframe`:case`object`:Z(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)Z(vd[r],e);break;case`image`:Z(`error`,e),Z(`load`,e);break;case`details`:Z(`toggle`,e);break;case`embed`:case`source`:case`link`:Z(`error`,e),Z(`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)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Q(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Q(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Q(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Q(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Q(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Q(e,t,s,a,r,o)}Kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Q(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Q(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Q(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Ud(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 Wd(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 Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e!==Gd&&(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body)}n=i}while(n);Np(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function tf(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`:tf(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(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 uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(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 pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=j.d;j.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=xu();return e||t}function bf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=xt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);St(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=xt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),St(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=xt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),St(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=fe.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+Vt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),St(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Vt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,St(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(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 Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function $f(e,t,n,r,i,a,o,s,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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function tp(e){return e?(e=li,e):li}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(gu(n,e,t),Wa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=it(t);var n=oi(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,up(e,t,n,r)}finally{j.p=a,A.T=i}}function lp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,up(e,t,n,r)}finally{j.p=a,A.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Td(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}id(a),!(G&6)&&(nu=Ae()+500,ad(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&gu(s,a,2),xu(),ip(a,2)}if(a=dp(r),a===null&&Td(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function dp(e){return e=an(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(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`resize`: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`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`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case P:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),xu(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(i(527,Lp,`19.2.8`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Le=zp.inject(Rp),Re=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,Cd(e),new Fp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),x=s(((e,t)=>{t.exports=b()})),S=u(p(),1),C=y(),w=x();function T({num:e,title:t,mute:n,intro:r}){return(0,w.jsxs)(`header`,{className:`ggui-section__head`,children:[(0,w.jsx)(`div`,{className:`ggui-section__num`,children:e}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`h2`,{className:`ggui-section__title`,children:[t,n?(0,w.jsxs)(`span`,{className:`ggui-mute`,children:[` `,n]}):null]}),r?(0,w.jsx)(`p`,{className:`ggui-section__intro`,children:r}):null]})]})}var E=`ggui-eui:navigate`;function D(e){if(e===`/`||e===``)return{kind:`admin-index`};let t=/^\/preview\/([^/]+)\/?$/.exec(e);if(t){let n=t[1];return n?{kind:`blueprint`,blueprintId:decodeURIComponent(n)}:{kind:`not-found`,pathname:e}}if(e===`/admin`||e===`/admin/`)return{kind:`admin-index`};if(e===`/admin/status`||e===`/admin/status/`)return{kind:`admin-status`};if(e===`/admin/sessions`||e===`/admin/sessions/`)return{kind:`admin-sessions`};if(e===`/admin/blueprints`||e===`/admin/blueprints/`)return{kind:`admin-blueprints`};let n=/^\/admin\/variants\/([^/]+)\/generate\/?$/.exec(e);if(n){let t=n[1];return t?{kind:`admin-variant-generate`,contractHash:decodeURIComponent(t)}:{kind:`not-found`,pathname:e}}let r=/^\/admin\/variants\/([^/]+)\/?$/.exec(e);if(r){let t=r[1];return t?{kind:`admin-variant-detail`,contractHash:decodeURIComponent(t)}:{kind:`not-found`,pathname:e}}return e===`/admin/variants`||e===`/admin/variants/`?{kind:`admin-variants`}:e===`/admin/config`||e===`/admin/config/`?{kind:`admin-config`}:e===`/admin/tools`||e===`/admin/tools/`?{kind:`admin-tools`}:e===`/admin/llm-keys`||e===`/admin/llm-keys/`?{kind:`admin-llm-keys`}:e===`/admin/connector-keys`||e===`/admin/connector-keys/`?{kind:`admin-connector-keys`}:e===`/admin/oauth-providers`||e===`/admin/oauth-providers/`?{kind:`admin-oauth-providers`}:e===`/admin/clients`||e===`/admin/clients/`?{kind:`admin-clients`}:e===`/admin/theme`||e===`/admin/theme/`?{kind:`admin-theme`}:e===`/admin-login`||e===`/admin-login/`?{kind:`admin-login`}:e===`/devtools`||e===`/devtools/`?{kind:`devtools-index`}:e===`/devtools/llm-trace`||e===`/devtools/llm-trace/`?{kind:`devtools-llm-trace`}:e===`/devtools/validator`||e===`/devtools/validator/`?{kind:`devtools-validator`}:e===`/devtools/cache`||e===`/devtools/cache/`?{kind:`devtools-cache`}:e===`/devtools/timeline`||e===`/devtools/timeline/`?{kind:`devtools-timeline`}:e===`/devtools/payloads`||e===`/devtools/payloads/`?{kind:`devtools-payloads`}:e===`/devtools/benchmarks`||e===`/devtools/benchmarks/`?{kind:`devtools-benchmarks`}:{kind:`not-found`,pathname:e}}var O=null,ee=null;function te(e){return(e!==O||ee===null)&&(O=e,ee=D(e)),ee}function k(e){typeof window>`u`||(window.history.pushState(null,``,e),window.dispatchEvent(new Event(E)))}function ne(e){return typeof window>`u`?()=>void 0:(window.addEventListener(`popstate`,e),window.addEventListener(E,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(E,e)})}function re(e){return e.kind===`admin-index`||e.kind===`admin-status`||e.kind===`admin-sessions`||e.kind===`admin-blueprints`||e.kind===`admin-variants`||e.kind===`admin-variant-detail`||e.kind===`admin-variant-generate`||e.kind===`admin-config`||e.kind===`admin-tools`||e.kind===`admin-llm-keys`||e.kind===`admin-connector-keys`||e.kind===`admin-oauth-providers`||e.kind===`admin-clients`||e.kind===`admin-theme`}function ie(e){return e.kind===`devtools-index`||e.kind===`devtools-llm-trace`||e.kind===`devtools-validator`||e.kind===`devtools-cache`||e.kind===`devtools-timeline`||e.kind===`devtools-payloads`||e.kind===`devtools-benchmarks`}var ae=[{label:`server`,items:[{label:`status`,path:`/admin/status`,match:`admin-status`},{label:`sessions`,path:`/admin/sessions`,match:`admin-sessions`},{label:`blueprints`,path:`/admin/blueprints`,match:`admin-blueprints`},{label:`variants`,path:`/admin/variants`,match:`admin-variants`},{label:`config`,path:`/admin/config`,match:`admin-config`},{label:`tools`,path:`/admin/tools`,match:`admin-tools`}]},{label:`auth`,items:[{label:`LLM keys`,path:`/admin/llm-keys`,match:`admin-llm-keys`},{label:`connector keys`,path:`/admin/connector-keys`,match:`admin-connector-keys`},{label:`OAuth providers`,path:`/admin/oauth-providers`,match:`admin-oauth-providers`},{label:`clients`,path:`/admin/clients`,match:`admin-clients`}]},{label:`appearance`,items:[{label:`theme`,path:`/admin/theme`,match:`admin-theme`}]}];function A({route:e,children:t}){return(0,w.jsxs)(`div`,{className:`ggui-config-grid`,"data-ggui-admin-shell":!0,children:[(0,w.jsx)(j,{route:e}),(0,w.jsx)(`div`,{className:`ggui-admin-pane`,children:t})]})}function j({route:e}){return(0,w.jsx)(`nav`,{className:`ggui-config-rail`,"aria-label":`admin sections`,"data-ggui-admin-rail":!0,children:ae.map(t=>(0,w.jsxs)(`div`,{"data-ggui-admin-group":t.label,children:[(0,w.jsx)(`div`,{className:`ggui-stack__head`,style:{padding:`10px 14px 6px`,borderBottom:0},children:(0,w.jsx)(`span`,{className:`ggui-stack__label`,style:{fontSize:11},children:t.label})}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0},children:t.items.map(t=>{let n=e.kind===t.match;return(0,w.jsx)(`li`,{"data-ggui-admin-item":t.match,children:(0,w.jsx)(`button`,{type:`button`,onClick:()=>k(t.path),"aria-current":n?`page`:void 0,className:`ggui-config-rail__btn${n?` is-active`:``}`,children:t.label})},t.path)})})]},t.label))})}var oe=[{label:`inspect`,items:[{label:`LLM trace`,path:`/devtools/llm-trace`,match:`devtools-llm-trace`},{label:`validator`,path:`/devtools/validator`,match:`devtools-validator`},{label:`cache`,path:`/devtools/cache`,match:`devtools-cache`}]},{label:`replay`,items:[{label:`timeline`,path:`/devtools/timeline`,match:`devtools-timeline`},{label:`payloads`,path:`/devtools/payloads`,match:`devtools-payloads`}]},{label:`performance`,items:[{label:`benchmarks`,path:`/devtools/benchmarks`,match:`devtools-benchmarks`}]}];function se({route:e,children:t}){return(0,w.jsxs)(`div`,{className:`ggui-config-grid`,"data-ggui-devtools-shell":!0,children:[(0,w.jsx)(ce,{route:e}),(0,w.jsx)(`div`,{className:`ggui-admin-pane`,children:t})]})}function ce({route:e}){return(0,w.jsx)(`nav`,{className:`ggui-config-rail`,"aria-label":`devtools sections`,"data-ggui-devtools-rail":!0,children:oe.map(t=>(0,w.jsxs)(`div`,{"data-ggui-devtools-group":t.label,children:[(0,w.jsx)(`div`,{className:`ggui-stack__head`,style:{padding:`10px 14px 6px`,borderBottom:0},children:(0,w.jsx)(`span`,{className:`ggui-stack__label`,style:{fontSize:11},children:t.label})}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0},children:t.items.map(t=>{let n=e.kind===t.match;return(0,w.jsx)(`li`,{"data-ggui-devtools-item":t.match,children:(0,w.jsx)(`button`,{type:`button`,onClick:()=>k(t.path),"aria-current":n?`page`:void 0,className:`ggui-config-rail__btn${n?` is-active`:``}`,children:t.label})},t.path)})})]},t.label))})}var le=`#292929`,M=`#d9d9d9`,N=`#f4f3ed`,ue={mirror:{g1Outer:M,g1Inner:le,g2Outer:le,g2Inner:M,u:le,i:M},"mono-ink":{g1Outer:le,g1Inner:le,g2Outer:le,g2Inner:le,u:le,i:le},reverse:{g1Outer:M,g1Inner:N,g2Outer:N,g2Inner:M,u:N,i:M}};function de({width:e,variant:t=`mirror`}){let n=Math.round(e*50/224),r=ue[t];return(0,w.jsxs)(`svg`,{viewBox:`0 0 224 50`,width:e,height:n,"aria-label":`ggui`,children:[(0,w.jsx)(`path`,{d:`M 0 0 H 50 V 25 H 25 V 50 H 0 Z`,fill:r.g1Outer}),(0,w.jsx)(`rect`,{x:`33`,y:`33`,width:`17`,height:`17`,fill:r.g1Inner}),(0,w.jsx)(`path`,{d:`M 58 0 H 108 V 25 H 83 V 50 H 58 Z`,fill:r.g2Outer}),(0,w.jsx)(`rect`,{x:`91`,y:`33`,width:`17`,height:`17`,fill:r.g2Inner}),(0,w.jsx)(`path`,{d:`M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z`,fill:r.u}),(0,w.jsx)(`rect`,{x:`174`,y:`0`,width:`50`,height:`50`,fill:r.i})]})}function fe(){return(0,w.jsx)(`footer`,{className:`ggui-footer`,children:(0,w.jsxs)(`div`,{className:`ggui-footer__inner`,children:[(0,w.jsxs)(`div`,{className:`ggui-footer__meta`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{children:`ggui`}),` — generative graphical user interface`]}),(0,w.jsx)(`div`,{children:`@ggui-ai/console`}),(0,w.jsx)(`div`,{children:`served by your local ggui serve — same origin only`})]}),(0,w.jsx)(`div`,{className:`ggui-footer__mark`,children:(0,w.jsx)(de,{width:160})})]})})}var pe=`ggui-mode`,me=null;function he(){return me===null?typeof document>`u`?`prod`:(me=document.querySelector(`meta[name="${pe}"]`)?.getAttribute(`content`)===`dev`?`dev`:`prod`,me):me}function ge({route:e,rightSlot:t}){let n=_e(e),r=re(e),i=ie(e),a=he()===`dev`&&!i;return(0,w.jsx)(`nav`,{className:`ggui-nav`,"aria-label":`console navigation`,children:(0,w.jsxs)(`div`,{className:`ggui-nav__inner`,children:[(0,w.jsxs)(`div`,{className:`ggui-nav__left`,children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>k(`/admin/status`),"aria-label":`go to admin`,style:{display:`flex`,alignItems:`center`},children:(0,w.jsx)(de,{width:84})}),(0,w.jsx)(`span`,{className:`ggui-nav__brand`,"aria-label":`ggui console`,children:`console`}),(0,w.jsx)(`span`,{className:`ggui-nav__version`,children:`v1`}),(0,w.jsx)(`span`,{className:`ggui-nav__version`,"aria-label":`community edition`,children:`community`}),i?(0,w.jsx)(`span`,{className:`ggui-nav__version`,"data-ggui-dev-mode-pill":!0,style:{background:`var(--ggui-accent)`,color:`white`},"aria-label":`dev mode`,children:`DEV MODE`}):null,n?(0,w.jsx)(`span`,{className:`ggui-nav__crumb`,children:n}):null]}),(0,w.jsxs)(`ul`,{className:`ggui-nav__links`,children:[a?(0,w.jsx)(`li`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>k(`/devtools`),"data-ggui-nav-devtools":!0,children:`devtools →`})}):null,r?null:(0,w.jsx)(`li`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>k(`/admin/status`),children:`admin →`})}),t?(0,w.jsx)(`li`,{children:t}):null]})]})})}function _e(e){switch(e.kind){case`blueprint`:return`/ preview / ${e.blueprintId}`;case`admin-index`:case`admin-status`:return`/ admin / status`;case`admin-sessions`:return`/ admin / sessions`;case`admin-blueprints`:return`/ admin / blueprints`;case`admin-config`:return`/ admin / config`;case`admin-tools`:return`/ admin / tools`;case`admin-llm-keys`:return`/ admin / llm-keys`;case`admin-connector-keys`:return`/ admin / connector-keys`;case`admin-oauth-providers`:return`/ admin / oauth-providers`;case`admin-clients`:return`/ admin / clients`;case`admin-theme`:return`/ admin / theme`;case`admin-login`:return`/ admin-login`;case`devtools-index`:return`/ devtools`;case`devtools-llm-trace`:return`/ devtools / llm-trace`;case`devtools-validator`:return`/ devtools / validator`;case`devtools-cache`:return`/ devtools / cache`;case`devtools-timeline`:return`/ devtools / timeline`;case`devtools-payloads`:return`/ devtools / payloads`;case`devtools-benchmarks`:return`/ devtools / benchmarks`;case`not-found`:return e.pathname;default:return null}}function ve({route:e,children:t,variant:n=`wide`,showFooter:r=!0,navRightSlot:i}){let a=n===`narrow`?`ggui-shell__main ggui-shell__main--narrow`:`ggui-shell__main`,o=t;return n===`admin`?o=(0,w.jsx)(A,{route:e,children:t}):n===`devtools`&&(o=(0,w.jsx)(se,{route:e,children:t})),(0,w.jsxs)(`div`,{className:`ggui-shell`,children:[(0,w.jsx)(ge,{route:e,rightSlot:i}),(0,w.jsx)(`main`,{className:a,children:o}),r?(0,w.jsx)(fe,{}):null]})}function ye(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(null),o=(()=>{if(typeof window>`u`)return`/admin`;let e=new URLSearchParams(window.location.search).get(`next`);return e===null||e===``||!e.startsWith(`/`)||e.startsWith(`//`)?`/admin`:e})();return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / admin`,title:`Sign in to the admin zone.`,mute:`Admin token gates /admin and /devtools.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Paste the admin token printed on your`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` boot banner. On success we set a same-origin`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_console_admin`}),` `,`HttpOnly cookie and bounce you to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:o}),`.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`admin token`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ADM / IN`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`form`,{className:`ggui-form`,onSubmit:async t=>{t.preventDefault(),a(null);let n=e.trim();if(n.length===0){a(`Paste an admin token.`);return}r(!0);try{let e=await fetch(`/ggui/console/admin-login`,{method:`POST`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({token:n})});if(e.status===204){k(o);return}if(e.status===401){a("Invalid token. Re-check the value printed on your `ggui serve` boot banner.");return}a(`Login failed — server returned ${e.status}`)}catch(e){a(`Login failed — ${String(e)}`)}finally{r(!1)}},"data-ggui-admin-login-form":!0,children:(0,w.jsxs)(`div`,{className:`ggui-form__row`,children:[(0,w.jsx)(`label`,{className:`ggui-field`,"aria-label":`admin token`,children:(0,w.jsx)(`input`,{type:`password`,placeholder:`ggui_admin_...`,value:e,onChange:e=>t(e.target.value),disabled:n,autoComplete:`off`,spellCheck:!1,autoFocus:!0})}),(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-admin-login-submit":!0,disabled:n||e.trim().length===0,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`signing in…`:`sign in`]})]})}),i?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:12},"data-ggui-admin-login-error":!0,children:i}):null]})]})]})}var be={anthropic:{label:`Anthropic`,help:`Used by Claude models.`,apiKeyUrl:`https://console.anthropic.com/settings/keys`},openai:{label:`OpenAI`,help:`Used by GPT models.`,apiKeyUrl:`https://platform.openai.com/api-keys`},google:{label:`Google`,help:`Used by Gemini models.`,apiKeyUrl:`https://aistudio.google.com/app/apikey`},openrouter:{label:`OpenRouter`,help:`Routes to any provider via one key.`,apiKeyUrl:`https://openrouter.ai/keys`}};function xe(){if(typeof window>`u`)return;let e=window.location.pathname+window.location.search;k(`/admin-login?next=${encodeURIComponent(e)}`)}function Se(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,``).replace(/\s+/g,``)}function Ce(){let[e,t]=(0,S.useState)({kind:`loading`}),n=async()=>{t(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/console/llm-keys`,{credentials:`include`,headers:{accept:`application/json`}});if(e.status===401){xe();return}if(!e.ok){t({kind:`error`,message:e.status===404?"BYOK store not enabled — `ggui serve` should wire one by default.":`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};return(0,S.useEffect)(()=>{n()},[]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / admin / llm-keys`,title:`Operator-side LLM keys.`,mute:`Server-default keys for unpaired and operator generation.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each provider is checked against env vars first, then`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/credentials.json`}),` — env wins on collision. These are the keys`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` uses for any generation that doesn't carry a paired-user scope. The same plane is exposed to paired users at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/settings`}),`; the difference is which scope the writes land in.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading providers…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:[`Couldn't load providers — `,e.message]}):(0,w.jsx)(we,{rows:e.data.providers,scope:e.data.scope,onSet:async(e,t)=>{let r=await fetch(`/ggui/console/llm-keys`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({provider:e,key:t})});if(r.status===401){xe();return}if(!r.ok)throw Error(`server returned ${r.status}`);await n()},onClear:async e=>{let t=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`include`});if(t.status===401){xe();return}if(t.status!==204)throw Error(`server returned ${t.status}`);await n()}})]})}function we({rows:e,scope:t,onSet:n,onClear:r}){return(0,w.jsxs)(`div`,{"data-ggui-admin-llm-list":!0,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:0,marginBottom:16,fontSize:12},children:[`scope: `,(0,w.jsx)(`code`,{className:`ggui-code`,children:t})]}),(0,w.jsx)(`div`,{style:{display:`grid`,gap:14},children:e.map(e=>(0,w.jsx)(Te,{row:e,onSet:n,onClear:r},e.name))})]})}function Te({row:e,onSet:t,onClear:n}){let r=be[e.name],[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),u=async n=>{n.preventDefault();let r=Se(i);if(r){s(!0),l(null);try{await t(e.name,r),a(``)}catch(e){l(String(e))}finally{s(!1)}}},d=async()=>{s(!0),l(null);try{await n(e.name)}catch(e){l(String(e))}finally{s(!1)}};return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-admin-llm-row":e.name,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:r.label}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e.configured?e.source??`—`:`not set`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 10px`,fontSize:13},children:[r.help,e.envNames.length>0?(0,w.jsxs)(w.Fragment,{children:[` `,`Env:`,` `,e.envNames.map((t,n)=>(0,w.jsxs)(`span`,{children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),n<e.envNames.length-1?`, `:``]},t)),`.`]}):null]}),e.configured&&e.keyPreview?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 10px`,fontSize:12},children:[`current: `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.keyPreview,`…`]}),e.source===`env`&&e.envName?(0,w.jsxs)(w.Fragment,{children:[` (from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.envName}),`)`]}):null]}):null,(0,w.jsxs)(`form`,{onSubmit:u,style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,w.jsx)(`input`,{type:`password`,placeholder:`Paste ${r.label} key`,value:i,onChange:e=>a(e.target.value),disabled:o,autoComplete:`off`,spellCheck:!1,style:{flex:1,minWidth:240,padding:`8px 10px`,fontFamily:`var(--ggui-mono)`,fontSize:12,border:`1px solid var(--ggui-line-2)`,background:`var(--ggui-paper)`,color:`var(--ggui-ink)`,borderRadius:2}}),(0,w.jsx)(`button`,{type:`submit`,"data-ggui-admin-llm-set":!0,className:`ggui-btn`,disabled:o||!i.trim(),children:o?`saving…`:`save`}),e.inFile?(0,w.jsx)(`button`,{type:`button`,"data-ggui-admin-llm-clear":!0,className:`ggui-btn ggui-btn--ghost`,onClick:()=>void d(),disabled:o,children:`clear`}):null,(0,w.jsx)(`a`,{href:r.apiKeyUrl,target:`_blank`,rel:`noopener noreferrer`,className:`ggui-muted`,style:{fontSize:12},children:`issue a key →`})]}),e.source===`env`&&e.inFile?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:8,marginBottom:0,fontSize:12},children:[`File value present but env var`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.envName}),` overrides.`]}):null,c?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:8,marginBottom:0,fontSize:12,color:`var(--ggui-color-error, #c5374b)`},children:c}):null]})]})}var Ee=[{id:`google`,label:`Google`},{id:`github`,label:`GitHub`}],De=`<redacted>`;async function Oe(e,t,n,r){let i=new Headers(t.headers??{});n!==null&&i.set(`X-Ggui-CSRF`,n);let a=await fetch(e,{...t,headers:i,credentials:`include`});if(a.status!==403)return a;let o=await r();if(o===null)return a;let s=new Headers(t.headers??{});return s.set(`X-Ggui-CSRF`,o),fetch(e,{...t,headers:s,credentials:`include`})}function ke(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),i=async()=>{try{let e=await fetch(`/ggui/csrf-token`,{headers:{accept:`application/json`},credentials:`include`});if(!e.ok)return null;let t=await e.json();return r(t.token),t.token}catch{return null}},a=async()=>{t(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/admin/oauth-providers`,{headers:{accept:`application/json`},credentials:`include`});if(e.status===401){k(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(!e.ok){t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{i(),a()},[]);let o=async(e,t)=>{let r=await Oe(`/ggui/admin/oauth-providers/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(t)},n,i);if(r.status===401){k(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(!r.ok)throw Error(`server returned ${r.status}`);await a()},s=async e=>{let t=await Oe(`/ggui/admin/oauth-providers/${encodeURIComponent(e)}`,{method:`DELETE`},n,i);if(t.status===401){k(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(t.status!==204)throw Error(`server returned ${t.status}`);await a()};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / oauth`,title:`OAuth login providers.`,mute:`Operator-only — end-user sign-in identity.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Configure OAuth login providers so end-users can sign in with their existing identity. Operator-only — these credentials are stored at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/oauth-providers.json`}),` `,`(mode 0600). Set the`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`GGUI_OAUTH_<PROVIDERID>_CLIENT_ID`}),` `,`/`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`_CLIENT_SECRET`}),` env vars to override per-deployment.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading providers…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-oauth-providers-error":!0,children:[`Couldn't load providers — `,e.message]}):(0,w.jsx)(`div`,{"data-ggui-oauth-providers-list":!0,className:`ggui-stack`,"aria-label":`oauth providers`,children:Ee.map(t=>{let n=e.data.providers.find(e=>e.providerId===t.id);return(0,w.jsx)(Ae,{providerId:t.id,label:t.label,row:n,onSave:o,onDelete:s},t.id)})})]})}function Ae({providerId:e,label:t,row:n,onSave:r,onDelete:i}){let a=n?.source===`env`,o=n?.source===`file`,s=n?.clientId??``,c=n?.enabled??!0,[l,u]=(0,S.useState)(s),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(c),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null);(0,S.useEffect)(()=>{u(n?.clientId??``),f(``),m(n?.enabled??!0)},[n?.clientId,n?.enabled,n?.source]);let y=l!==s||d.trim().length>0||p!==c,b=async t=>{if(t.preventDefault(),v(null),l.trim().length===0){v(`Client ID is required.`);return}if(!o&&d.trim().length===0){v(`Client Secret is required.`);return}g(!0);try{await r(e,{clientId:l.trim(),clientSecret:d.trim(),enabled:p})}catch(e){v(`save failed — ${String(e)}`)}finally{g(!1)}},x=async()=>{if(window.confirm(`Delete ${t} OAuth config? End-users will no longer be able to sign in with ${t}.`)){v(null),g(!0);try{await i(e)}catch(e){v(`delete failed — ${String(e)}`)}finally{g(!1)}}};return(0,w.jsxs)(`article`,{"data-ggui-oauth-provider-card":e,className:`ggui-card`,style:{opacity:h?.6:1},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:t}),(0,w.jsx)(`span`,{style:{marginLeft:`auto`},children:(0,w.jsx)(je,{row:n})})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`form`,{className:`ggui-form`,onSubmit:e=>{b(e)},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4},"aria-label":`${t} client ID`,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Client ID`}),(0,w.jsx)(`span`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{type:`text`,placeholder:n===void 0?`paste ${t} OAuth client ID`:``,value:l,onChange:e=>u(e.target.value),readOnly:a,disabled:h,autoComplete:`off`,spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),(0,w.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4},"aria-label":`${t} client secret`,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Client Secret`}),(0,w.jsx)(`span`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{type:`password`,placeholder:a?De:o?`${De} — leave blank to keep`:`paste ${t} OAuth client secret`,value:a?De:d,onChange:e=>f(e.target.value),readOnly:a,disabled:h,autoComplete:`off`,spellCheck:!1,"data-ggui-oauth-provider-client-secret":!0})})]}),(0,w.jsxs)(`label`,{style:{display:`inline-flex`,flexDirection:`row`,alignItems:`center`,gap:8},"aria-label":`${t} enabled`,children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked),disabled:a||h,style:{flex:`none`,width:`auto`},"data-ggui-oauth-provider-enabled":!0}),(0,w.jsx)(`span`,{children:`Enabled`}),a?(0,w.jsx)(`span`,{className:`ggui-muted`,style:{marginLeft:8},children:`env-overrides are always-on`}):null]})]}),(0,w.jsxs)(`div`,{className:`ggui-form__row`,style:{marginTop:12,gap:8},children:[(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-oauth-provider-save":!0,disabled:a||h||!y,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),h?`saving…`:`save`]}),o?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-oauth-provider-delete":!0,disabled:h,onClick:()=>{x()},style:{color:`crimson`,borderColor:`crimson`},children:`delete`}):null]})]}),_?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:8},"data-ggui-oauth-provider-error":!0,children:_}):null]})]})}function je({row:e}){return e===void 0?(0,w.jsx)(`span`,{className:`ggui-tag`,style:{opacity:.5},children:`not configured`}):e.source===`env`?(0,w.jsx)(`span`,{className:`ggui-tag`,title:`set via GGUI_OAUTH_*_CLIENT_ID/_SECRET env vars`,children:`configured (env)`}):(0,w.jsx)(`span`,{className:`ggui-tag`,title:`set via this UI; persisted to ~/.ggui/oauth-providers.json`,children:`configured (file)`})}var Me=Object.defineProperty,Ne=(e,t)=>{for(var n in t)Me(e,n,{get:t[n],enumerable:!0})},Pe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Fe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Pe(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),P=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Pe(),n=Fe(),r=Pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Fe();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=ee(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ee(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=ee(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(te(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(k(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=ee(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=ee(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=ee(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
10
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function ee(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function te(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function k(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${j(e)}`}e.not=k;var ne=A(e.operators.AND);function re(...e){return e.reduce(ne)}e.and=re;var ie=A(e.operators.OR);function ae(...e){return e.reduce(ie)}e.or=ae;function A(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${j(n)} ${e} ${j(r)}`}function j(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),F=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=P(),n=Pe();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0||(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),Ie=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Le=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=P(),n=F(),r=Ie();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Re=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Le(),n=P(),r=Ie(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),ze=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Be=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Ve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=ze(),n=Be(),r=Le(),i=P(),a=F(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
11
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
12
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
13
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),He=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=P(),n=F();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),Ue=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=P(),n=F(),r=Ie(),i=F();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),We=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=P(),n=Ie(),r=Ue(),i=Le();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Ge=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=P(),n=F();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Ke=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),qe=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Je=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=F(),n=Ke(),r=qe(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Ye=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Re(),n=Ve(),r=Be(),i=Ve(),a=He(),o=We(),s=Ge(),c=P(),l=Ie(),u=Je(),d=F(),f=Le();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&te(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),k(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&te(e),O(e),ee(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return re(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);re(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function ee(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function te({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function k(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&ne(e),t.return((0,c._)`${l.default.errors} === 0`))}function ne({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function re(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ue(e,`$ref`,h.all.$ref.definition));return}p.jtd||ae(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),ie(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):ie(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function ie(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ue(e,n.keyword,n.definition,t.type)})}function ae(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(A(e,t),e.opts.allowUnionTypes||j(e,t),oe(e,e.dataTypes))}function A(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ce(e.dataTypes,t)||M(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),le(e,t)}}function j(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&M(e,`use allowUnionTypes to allow union type keyword`)}function oe(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>se(t,e))&&M(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function se(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ce(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function le(e,t){let n=[];for(let r of e.dataTypes)ce(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function M(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var N=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,pe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=N;function ue(e,t,n,r){let i=new N(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var de=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!de.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=fe.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=pe})),Xe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),Ze=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Je();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),Qe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=P(),n=Xe(),r=Ie(),i=Je(),a=F(),o=Ye(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),$e=c({$id:()=>et,additionalProperties:()=>!1,default:()=>at,description:()=>tt,properties:()=>it,required:()=>rt,type:()=>nt}),et,tt,nt,rt,it,at,ot=o((()=>{et=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,tt=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,nt=`object`,rt=[`$data`],it={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},at={$id:et,description:tt,type:nt,required:rt,properties:it,additionalProperties:!1}})),st=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^\d*$/u),a=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)u[t]=`%`+e[t>>4]+e[t&15]}function d(e){return e<2048?u[192|e>>6]+u[128|e&63]:e<65536?u[224|e>>12]+u[128|e>>6&63]+u[128|e&63]:u[240|e>>18]+u[128|e>>12&63]+u[128|e>>6&63]+u[128|e&63]}function f(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var p=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),h=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function _(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!h(e[t])){if(e[t]===`%`&&t+2<e.length&&a(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function v(e){let t=-1,n=0,r=-1,i=0;for(let a=0;a<e.length;a++)e[a]===`0`?(r===-1&&(r=a),i++,i>n&&(n=i,t=r)):(r=-1,i=0);if(n<2)return e.join(`:`);let a=e.slice(0,t).join(`:`),o=e.slice(t+n).join(`:`);return a+`::`+o}function y(e){let t=e.indexOf(`::`);if(t!==-1&&e.indexOf(`::`,t+1)!==-1)return;let n=t===-1?e.split(`:`):e.slice(0,t).split(`:`),i=t===-1?[]:e.slice(t+2).split(`:`);t!==-1&&(n.length===1&&n[0]===``&&(n.length=0),i.length===1&&i[0]===``&&(i.length=0));let a=n.concat(i),o=0;for(let e=0;e<a.length;e++){let n=a[e];if(n===``)return;if(n.indexOf(`.`)!==-1){if(e!==a.length-1||t!==-1&&i.length===0||!r(n))return;o+=2;continue}if(!p(n))return;a[e]=parseInt(n,16).toString(16),o++}if(t===-1)return o===8?v(a):void 0;if(o>=8)return;let s=a.slice(0,n.length);for(let e=o;e<8;e++)s.push(`0`);for(let e=n.length;e<a.length;e++)s.push(a[e]);return v(s)}function b(e){let t=e[0]===`[`&&e[e.length-1]===`]`;if((e[0]===`[`||e[e.length-1]===`]`)&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&m(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(x(n,`:`)<2)return{host:e,isIPV6:!1,error:t};let r=``,i=n.indexOf(`%`);if(i!==-1){let t=n.slice(i,i+3).toLowerCase()===`%25`?3:1;if(r=n.slice(i+t),!_(r))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,i)}let a=y(n);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?`%`+r:``),escapedHost:a+(r?`%25`+r:``),isIPV6:!0}}function x(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function S(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}n.push(t);break}if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var C={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},w=/[@/?#:]/g,T=/[@/?#]/g;function E(e,t){let n=t?T:w;return n.lastIndex=0,e.replace(n,e=>C[e])}function D(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let i=e.slice(r+1,r+3);if(a(i)){let e=i.toUpperCase(),a=String.fromCharCode(parseInt(e,16));t&&o(a)?n+=a:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function O(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ie(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function ee(e,t=!1){let n=``,r=t&&e[0]!==`/`;for(let t=0;t<e.length;t++){let i=e[t];if(i===`%`&&t+2<e.length){let r=e.slice(t+1,t+3);if(a(r)){n+=`%`+r.toUpperCase(),t+=2;continue}}if(i===`/`&&(r=!1),s(i)&&(i!==`:`||!r))n+=i;else{let r=e.charCodeAt(t);if(r<128)n+=u[r];else if(r<55296||r>57343)n+=d(r);else if(r<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);i>=56320&&i<=57343?(n+=d(65536+(r-55296<<10)+(i-56320)),t++):n+=d(65533)}else n+=d(65533)}}return n}function te(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`%`&&r+2<e.length){let t=e.slice(r+1,r+3);if(a(t)){n+=`%`+t.toUpperCase(),r+=2;continue}}if(t(i))n+=i;else{let t=e.charCodeAt(r);if(t<128)n+=u[t];else if(t<55296||t>57343)n+=d(t);else if(t<=56319&&r+1<e.length){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(n+=d(65536+(t-55296<<10)+(i-56320)),r++):n+=d(65533)}else n+=d(65533)}}return n}function k(e){return te(e,l)}function ne(e){return te(e,c)}function re(e){return te(e,c)}function ie(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function ae(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(c(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ie(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function A(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function j(e){let t=[];if(e.userinfo!==void 0&&(t.push(k(e.userinfo)),t.push(`@`)),e.host!==void 0){let n=e.host;if(!r(n)){let e=b(n);e.isIPV6!==!0&&e.isIPVFuture!==!0&&(n=D(n,!0),e=b(n)),n=e.isIPV6===!0||e.isIPVFuture===!0?`[${e.escapedHost}]`:E(n,!1)}t.push(n)}if(typeof e.port==`number`||typeof e.port==`string`){let n=String(e.port);if(!i(n))throw TypeError(`URI port is malformed.`);t.push(`:`),t.push(n)}return t.length?t.join(``):void 0}t.exports={nonSimpleDomain:g,recomposeAuthority:j,reescapeHostDelimiters:E,normalizePercentEncoding:D,normalizePathEncoding:O,serializePathEncoding:ee,normalizeQueryFragmentEncoding:ae,encodeUserinfo:k,encodeQuery:ne,encodeFragment:re,escapePreservingEscapes:A,removeDotSegments:S,isIPv4:r,isUUID:n,normalizeIPv6:b,stringArrayToHexStripped:f}})),ct=s(((e,t)=>{var{isUUID:n}=st(),r=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf(`?`),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!==`/`?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n&&n[0]===e.path){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),lt=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,serializePathEncoding:s,normalizeQueryFragmentEncoding:c,encodeQuery:l,encodeFragment:u,reescapeHostDelimiters:d,isIPv4:f,nonSimpleDomain:p}=st(),{SCHEMES:m,getSchemeHandler:h}=ct(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,_=`URI scheme is malformed.`;function v(e){let t=unescape(String(e));if(!g.test(t))throw TypeError(_);return t}function y(e,t){return typeof e==`string`?e=ie(e,t):typeof e==`object`&&(e=re(C(e,t),t)),e}function b(e,t,r){let i=r?Object.assign({scheme:`null`},r):{scheme:`null`},{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:l,malformedScheme:u}=ne(e,i),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:m,malformedSchemeSpecific:g,malformedHost:_,malformedScheme:v}=ne(t,i);if(o||p||s||m||c||g||l||_||u||v)throw Error(a.error||d.error||`URI is malformed.`);let y=x(a,d,i,!0),b=h(r&&r.scheme||y.scheme),S=y.host,w=S!==void 0&&S!==``&&(f(S)||n(S).isIPV6);k(y,r||{},b,w);let T=S&&S.indexOf(`%`)!==-1&&!/\P{ASCII}/u.test(S);if(y.error&&!T)throw Error(y.error);return i.skipEscape=!0,C(y,i)}function x(e,t,n,i){let a={};return i||(e=re(C(e,n),n),t=re(C(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):(a.path=(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?`/`+t.path:e.path?e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,a.query=t.query===void 0?e.query:t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function S(e,t,n){let r=A(e,n),i=A(t,n);return r!==void 0&&i!==void 0&&r===i}function C(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[];n.scheme&&=v(n.scheme);let d=h(o.scheme||n.scheme);d&&d.serialize&&d.serialize(n,o);let f=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,p=!o.skipEscape&&n.scheme===void 0&&!f;n.path!==void 0&&(n.path=o.skipEscape?a(n.path):s(n.path,p)),o.reference!==`suffix`&&n.scheme&&(n.scheme=v(n.scheme),c.push(n.scheme,`:`));let m=i(n);if(m!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(m),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!d||!d.absolutePath)&&(e=r(e)),p&&(e=s(e,!0)),m===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,l(n.query)),n.fragment!==void 0&&c.push(`#`,u(n.fragment)),c.join(``)}var w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,T=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,E=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function D(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function O(e){if(e===void 0)return!1;let t=e.indexOf(`%`);for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf(`%`,t+3)}return!1}function ee(e){return e[0]===`[`&&e[e.length-1]===`]`}function te(e){let t=e[4];return O(e[3])||t!==void 0&&!ee(t)&&O(t)||O(e[6])||O(e[7])||O(e[8])}function k(e,t,n,r){if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!ee(e.host)&&(t.domainHost||n&&n.domainHost)&&r===!1&&p(e.host))try{e.host=new URL(`http://`+e.host).hostname}catch(t){return e.error=e.error||`Host's domain name can not be converted to ASCII: `+t,!0}return!1}function ne(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},s=!1,l=!1,u=!1,p=!1,v=!1,y=!1,b=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let x=e.match(T);x!==null&&x[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,s=!0);let S=e.match(E);if(S!==null){let e=S[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,s=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,s=!0))}let C=e.match(w);if(C){if(i.scheme=C[1],i.userinfo=C[3],i.host=C[4],i.port=parseInt(C[5],10),i.path=C[6]||``,i.query=C[7],i.fragment=C[8],i.scheme!==void 0){let e=unescape(i.scheme);g.test(e)?i.scheme=e.toLowerCase():(i.error=i.error||_,y=!0)}l=te(C),l&&(i.error=i.error||`URI contains malformed percent-encoding.`),isNaN(i.port)&&(i.port=C[5]);let t=D(i,C);if(t!==void 0&&(i.error=i.error||t,s=!0),i.host){if(f(i.host)===!1){let e=ee(i.host),t=i.host.indexOf(`[`)!==-1||i.host.indexOf(`]`)!==-1,r=n(i.host);b=r.isIPV6||r.isIPVFuture===!0,v=t&&(!e||r.error===!0),i.host=b?r.host:r.host.toLowerCase(),v&&(i.error=i.error||`URI host is malformed.`,s=!0)}else b=!0}i.reference=i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?`same-document`:i.scheme===void 0?`relative`:i.fragment===void 0?`absolute`:`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let x=h(r.scheme||i.scheme);v||(p=k(i,r,x,b)),(!x||x&&!x.skipNormalize)&&(e.indexOf(`%`)!==-1&&i.host!==void 0&&!v&&(i.host=d(b?i.host:a(i.host,!0),b)),i.path&&=o(i.path),i.query&&=c(i.query),i.fragment&&=c(i.fragment)),x&&x.parse&&(x.parse(i,r),x===m.urn&&i.nid===void 0&&(u=!0))}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:s,malformedPercentEncoding:l,malformedSchemeSpecific:u,malformedHost:p,malformedScheme:y}}function re(e,t){return ne(e,t).parsed}function ie(e,t){return ae(e,t).normalized}function ae(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=ne(e,t);return{normalized:r||i||a||o||s?e:C(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function A(e,t){if(typeof e!=`string`&&typeof e!=`object`)return;let n;try{n=typeof e==`string`?e:C(e,t)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:c}=ae(n,t);return i||a||o||s||c?void 0:r}var j={SCHEMES:m,normalize:y,resolve:b,resolveComponent:x,equal:S,serialize:C,parse:re};t.exports=j,t.exports.default=j,t.exports.fastUri=j})),ut=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lt();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),dt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ye();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=P();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Xe(),i=Ze(),a=ze(),o=Qe(),s=P(),c=Je(),l=Ve(),u=F(),f=(ot(),d($e).default),p=ut(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=ee(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(k.call(this,n,t),!t)return(0,u.eachItem)(n,e=>ne.call(this,e)),this;ie.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>ne.call(this,e,r):e=>r.type.forEach(t=>ne.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=A(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e){if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function ee(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var te=/^[a-z_$][a-z0-9_$:-]*$/i;function k(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!te.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function ne(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?re.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function re(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function ie(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=A(t)),e.validateSchema=this.compile(t,!0))}var ae={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function A(e){return{anyOf:[e,ae]}}})),ft=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),pt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=Ze(),n=Ue(),r=P(),i=Ie(),a=Qe(),o=F(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0){if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}}if(l.items!==!0){if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}}e.callRef=l,e.default=s})),mt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ft(),n=pt();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),ht=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),gt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),_t=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),vt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F(),r=_t();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),yt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ue(),n=F(),r=P();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),bt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),xt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ue(),n=P(),r=F();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),St=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),Ct=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ke();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),wt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ve(),n=P(),r=F(),i=Ct();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),Tt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F(),r=Ct();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Et=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F(),r=Ct();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),Dt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ht(),n=gt(),r=vt(),i=yt(),a=bt(),o=xt(),s=St(),c=wt(),l=Tt(),u=Et();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Ot=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=P(),n=F(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),kt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=P(),n=F(),r=Ue(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),At=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kt();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),jt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F(),r=Ue(),i=Ot();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Mt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Nt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=P(),n=F(),r=Ue();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
14
+ missingProperty: ${i},
15
+ depsCount: ${n},
16
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Pt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),Ft=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ue(),n=P(),r=Ie(),i=F();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),It=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ye(),n=Ue(),r=F(),i=Ft();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Lt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ue(),n=P(),r=F(),i=F();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Rt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=F();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),zt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Ue().validateUnion,error:{message:`must match a schema in anyOf`}}})),Bt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Vt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=F();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Ht=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=F(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Ut=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=F();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Wt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ot(),n=At(),r=kt(),i=jt(),a=Mt(),o=Nt(),s=Pt(),c=Ft(),l=It(),u=Lt(),d=Rt(),f=zt(),p=Bt(),m=Vt(),h=Ht(),g=Ut();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Gt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Kt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Gt().default]})),qt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Jt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=mt(),n=Dt(),r=Wt(),i=Kt(),a=qt();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Yt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Xt=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P(),n=Yt(),r=Qe(),i=Ze(),a=F();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Zt=c({$id:()=>$t,$schema:()=>Qt,default:()=>an,definitions:()=>tn,properties:()=>rn,title:()=>en,type:()=>nn}),Qt,$t,en,tn,nn,rn,an,on=o((()=>{Qt=`http://json-schema.org/draft-07/schema#`,$t=`http://json-schema.org/draft-07/schema#`,en=`Core schema meta-schema`,tn={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},nn=[`object`,`boolean`],rn={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},an={$schema:Qt,$id:$t,title:en,definitions:tn,type:nn,properties:rn,default:!0}})),sn=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=dt(),r=Jt(),i=Xt(),a=(on(),d(Zt).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Ye();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=P();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=Xe();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Ze();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),cn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[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,1}[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|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?: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)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:E,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-+(d<0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[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,1}[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|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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 _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function E(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),ln=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=sn(),n=P(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),un=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=cn(),r=ln(),i=P(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}));function dn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fn=u(sn(),1),pn=u(un(),1),mn=u(Ct(),1),hn=u(_t(),1);function gn(e){if(typeof e==`function`)return e;let t=e?.default;if(typeof t==`function`)return t;throw Error(`ajv-runtime: could not resolve a runtime-helper function`)}gn(mn.default).toString(),gn(hn.default).toString();var _n={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},vn=new fn.default({..._n});(0,pn.default)(vn),vn.getKeyword(`example`)||vn.addKeyword({keyword:`example`}),vn.getKeyword(`nullable`)||vn.addKeyword({keyword:`nullable`});var yn=new fn.default({..._n,code:{source:!0,esm:!0}});(0,pn.default)(yn),yn.getKeyword(`example`)||yn.addKeyword({keyword:`example`}),yn.getKeyword(`nullable`)||yn.addKeyword({keyword:`nullable`});var bn=new fn.default({..._n,code:{source:!0}});(0,pn.default)(bn),bn.getKeyword(`example`)||bn.addKeyword({keyword:`example`}),bn.getKeyword(`nullable`)||bn.addKeyword({keyword:`nullable`});function xn(e){let t=new Set(Array.isArray(e.type)?e.type:e.type?[e.type]:[]);if(t.has(`object`)||e.properties!==void 0){let t={...e};if(t.properties){let e={};for(let[n,r]of Object.entries(t.properties))e[n]=xn(r);t.properties=e}return t.additionalProperties===void 0?t.additionalProperties=!1:typeof t.additionalProperties!=`boolean`&&(t.additionalProperties=xn(t.additionalProperties)),t.oneOf&&=t.oneOf.map(xn),t.anyOf&&=t.anyOf.map(xn),t}if(t.has(`array`)&&e.items)return{...e,items:xn(e.items)};if(e.oneOf||e.anyOf){let t={...e};return t.oneOf&&=t.oneOf.map(xn),t.anyOf&&=t.anyOf.map(xn),t}return e}function Sn(e){let t=xn(e);return vn.compile(t)}function Cn(e,t){return e?e.map(e=>({...Tn(e,t),...e.keyword?{keyword:e.keyword}:{}})):[]}function wn(e,t){return t?e.map(e=>({...e,field:e.field?`${t}.${e.field}`:t})):e}function Tn(e,t){let n=En(e.instancePath);switch(e.keyword){case`additionalProperties`:{let r=e.params.additionalProperty??`<unknown>`,i=n?`${n}.${r}`:r,a=e.parentSchema,o=a?.properties?Object.keys(a.properties):[],s=Dn(t,`${e.instancePath}/${r}`),c=o.length>0?` Declared keys: [${o.join(`, `)}].`:` Declared keys: [(none)].`;return{field:i,message:`Undeclared field '${r}'${n?` at '${n}'`:``}.${c}`,expected:`<declared key>`,received:On(s)}}case`required`:{let t=e.params.missingProperty??`<unknown>`;return{field:n?`${n}.${t}`:t,message:`Required field '${t}' missing${n?` at '${n}'`:``}`,expected:`present`,received:`undefined`}}case`type`:{let r=e.params,i=Array.isArray(r.type)?r.type.join(`|`):r.type??`unknown`,a=On(Dn(t,e.instancePath));return{field:n,message:e.message??`Type mismatch at '${n||`<root>`}'`,expected:i,received:a}}case`enum`:{let r=e.params.allowedValues??[],i=Dn(t,e.instancePath);return{field:n,message:e.message??`Enum mismatch at '${n||`<root>`}'`,expected:r.map(e=>JSON.stringify(e)).join(`|`),received:JSON.stringify(i)}}case`const`:{let r=e.params,i=Dn(t,e.instancePath);return{field:n,message:e.message??`Const mismatch at '${n||`<root>`}'`,expected:JSON.stringify(r.allowedValue),received:JSON.stringify(i)}}case`pattern`:{let r=e.params,i=Dn(t,e.instancePath);return{field:n,message:e.message??`Pattern mismatch at '${n||`<root>`}'`,expected:r.pattern??`<pattern>`,received:typeof i==`string`?i:JSON.stringify(i)}}default:return{field:n,message:e.message??`Validation failed${n?` at '${n}'`:``} (${e.keyword})`}}}function En(e){if(!e)return``;let t=e.slice(1).split(`/`),n=``;for(let e of t)/^\d+$/.test(e)?n+=`[${e}]`:n===``?n=e:n+=`.${e}`;return n}function Dn(e,t){if(!t)return e;let n=t.slice(1).split(`/`),r=e;for(let e of n){if(r==null)return;if(Array.isArray(r)){let t=Number(e);if(!Number.isInteger(t))return;r=r[t]}else if(dn(r))r=r[e];else return}return r}function On(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}var kn=`_ggui:preview`,An=`_ggui:lifecycle`,jn=new Set([kn,An]);function Mn(e){return jn.has(e)}var Nn=new Map([[An,Pn]]);function Pn(e){let t=[];if(!dn(e))return{valid:!1,violations:[{field:`payload`,message:`${An} payload must be a non-null object`,expected:`object`,received:e===null?`null`:Array.isArray(e)?`array`:typeof e}]};let n=e;if(typeof n.kind!=`string`)return{valid:!1,violations:[{field:`kind`,message:`Required field 'kind' must be a string`,expected:`string`,received:n.kind===void 0?`undefined`:typeof n.kind}]};let r=e=>{typeof n[e]!=`string`&&t.push({field:e,message:`Required field '${e}' must be a string`,expected:`string`,received:n[e]===void 0?`undefined`:typeof n[e]})};switch(n.kind){case`handshake_started`:r(`handshakeId`),r(`intent`);break;case`handshake_completed`:r(`handshakeId`),n.outcome!==`accepted`&&n.outcome!==`amended`&&n.outcome!==`declined`&&n.outcome!==`cached`&&t.push({field:`outcome`,message:`Required field 'outcome' must be 'accepted' | 'amended' | 'declined' | 'cached'`,expected:`'accepted' | 'amended' | 'declined' | 'cached'`,received:n.outcome===void 0?`undefined`:String(n.outcome)}),typeof n.genExpected!=`boolean`&&t.push({field:`genExpected`,message:`Required field 'genExpected' must be a boolean`,expected:`boolean`,received:n.genExpected===void 0?`undefined`:typeof n.genExpected});break;case`render_started`:r(`sessionId`),r(`intent`);break;case`consume_polling`:r(`sessionId`),n.state!==`open`&&t.push({field:`state`,message:`Required field 'state' must be 'open'`,expected:`'open'`,received:n.state===void 0?`undefined`:String(n.state)});break;default:t.push({field:`kind`,message:`Unknown lifecycle kind '${n.kind}'. Closed union; new kinds bump protocol version.`,expected:`'handshake_started' | 'handshake_completed' | 'render_started' | 'consume_polling'`,received:n.kind})}return{valid:t.length===0,violations:t}}function Fn(e){let t=e.properties??{};return{type:`object`,properties:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.schema])),required:Object.entries(t).filter(([,e])=>e.required===!0).map(([e])=>e)}}function In(e,t,n){let r=n??Sn(Fn(t));return r(e)?{valid:!0,violations:[]}:{valid:!1,violations:Cn(r.errors,e)}}function Ln(e,t,n,r,i){if(Mn(e)){let n=r?.get(e);if(n)return n(t);let i=Nn.get(e);return i?i(t):{valid:!0,violations:[]}}let a=[],o=n[e];if(!o)return a.push({field:`channel`,message:`Unknown stream channel '${e}'. Declared channels: ${Object.keys(n).join(`, `)}`,expected:Object.keys(n).join(` | `),received:e}),{valid:!1,violations:a};if(o.schema&&t!==void 0){let n=i?.get(e)??Sn(o.schema);if(!n(t))for(let r of wn(Cn(n.errors,t),`${e}.payload`))a.push(r)}return{valid:a.length===0,violations:a}}function Rn(e,t,n){let r=[];if(!dn(e))return r.push({field:`value`,message:"Action payload must be an object with an `action` field",expected:`object`,received:zn(e)}),{valid:!1,violations:r};let i=e,a=i.action;if(typeof a!=`string`||a.length===0)return r.push({field:`action`,message:"Missing or empty `action` identifier",expected:`string`,received:zn(a)}),{valid:!1,violations:r};let o=t[a];if(!o)return r.push({field:`action`,message:`Unknown action '${a}'. Declared actions: ${Object.keys(t).join(`, `)||`(none)`}`,expected:Object.keys(t).join(` | `)||`(none)`,received:a}),{valid:!1,violations:r};if(o.schema){let e=n?.get(a)??Sn(o.schema);if(!e(i.data))for(let t of wn(Cn(e.errors,i.data),`${a}.data`))r.push(t)}return{valid:r.length===0,violations:r}}function zn(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function Bn(e,t,n){return e.type!==`data:submit`||!t?{valid:!0,violations:[]}:Rn(e.payload,t,n)}var Vn=[`geolocation`,`notifications`,`microphone`,`camera`,`persistent-storage`,`midi`,`clipboard-read`,`clipboard-write`,`speaker-selection`,`storage-access`,`background-sync`,`accelerometer`,`gyroscope`,`magnetometer`,`ambient-light-sensor`,`screen-wake-lock`];new Set(Vn);var Hn=`draft-2026-09-10`;Object.freeze([Hn]);function Un(e){return`schemaVersion`in e?e.schemaVersion:Hn}function Wn(e){let t={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(t.payload=e.payload),e.clientSeq!==void 0&&(t.clientSeq=e.clientSeq);let n=Un(e);return n!==void 0&&(t.schemaVersion=n),t}var Gn=(0,S.createContext)(null);function Kn(){let e=(0,S.useContext)(Gn);if(!e)throw Error(`useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.`);return e}function qn({config:e,children:t}){return(0,w.jsx)(Gn.Provider,{value:e,children:t})}var Jn=new Set,Yn=!1;function Xn(e,t){try{return`${e}::${JSON.stringify(t??null)}`}catch{return null}}function Zn(e,t){let n=Xn(e,t);return n===null?{suppressed:!1,signature:n}:Jn.has(n)?{suppressed:!0,signature:n}:(Jn.add(n),Yn||(Yn=!0,queueMicrotask(()=>{Jn.clear(),Yn=!1})),{suppressed:!1,signature:n})}function Qn(e){let{dispatch:t,onDispatchSuppressed:n}=Kn();return(0,S.useCallback)(r=>{let i=Zn(e,r);if(i.suppressed){if(console.warn(`[ggui] useAction('${e}') suppressed a duplicate dispatch (same name + payload, same event-loop task). This usually means two interactive elements nest and both wire to the same action (e.g. a Checkbox onChange inside a Card as={Clickable} onClick); the inner gesture bubbles to the outer handler so one user click would fire the action twice. Wire each useAction callback to exactly ONE interactive surface. Tier-0 'double-wired-action' warns on this at gen time; this runtime defense ensures the user-visible behavior stays correct regardless of code shape.`),n)try{n({reason:`duplicate-dispatch`,actionName:e,payloadSignature:i.signature,payload:r,suppressedAt:Date.now()})}catch(e){console.warn(`[ggui] onDispatchSuppressed observer threw — ignoring:`,e)}return}t(e,r)},[e,t,n])}function $n(e){let t=e.length===0?`Context`:e.charAt(0).toUpperCase()+e.slice(1)+`Context`,n=globalThis.__ggui__?.contexts?.[t];if(!n)throw Error(`[ggui] useGguiContext('${e}'): no Context registered. The contract must declare 'contextSpec.${e}' AND the runtime must have synthesized the per-slot React Context at boot. If you see this in production code generated by the LLM, the boilerplate's destructure line drifted from the contract.`);return(0,S.useContext)(n)}function er(e){let{subscribe:t}=Kn(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),c=(0,S.useRef)(i);return c.current=i,(0,S.useEffect)(()=>t(e,e=>{let t=e.payload;r(t),e.mode===`replace`?a([t]):a([...c.current,t]),e.complete&&s(!0)}),[e,t]),{latest:n,all:i,isComplete:o}}function tr(e){return{useAction:e=>Qn(e),useStream:e=>er(e)}}function nr(){let{auth:e}=Kn();return e}function rr(){let{app:e}=Kn();return e}var ir=class extends Error{owner;attemptedBy;constructor(e,t){super(e===t?`connection writer: '${e}' already holds the claim and '${t}' is claiming it again — two copies of '${e}' in one document (a duplicate bundle of the runtime)`:`connection writer: '${e}' holds the claim; '${t}' cannot take it — exactly one party writes the connection state`),this.name=`ConnectionWriterConflictError`,this.owner=e,this.attemptedBy=t}},ar=class extends Error{claimant;constructor(e){super(`connection writer: '${e}' released its claim and cannot set the connection state`),this.name=`ConnectionWriterReleasedError`,this.claimant=e}},or=Symbol.for(`ai.ggui.wire/connection-store`),sr=class extends Error{key;constructor(e){super(`connection store: the document slot ${String(e)} holds a value that is not a connection store — another copy of @ggui-ai/wire with an incompatible shape, or a foreign object. Refusing to adopt or overwrite it.`),this.key=e,this.name=`ConnectionStoreSlotError`}};function cr(e){if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`source`);return typeof t!=`object`||!t?!1:typeof Reflect.get(e,`claim`)==`function`&&typeof Reflect.get(t,`subscribe`)==`function`&&typeof Reflect.get(t,`getSnapshot`)==`function`}function lr(e=!0){let t=e,n,r=new Set;return{source:{subscribe(e){return r.add(e),()=>{r.delete(e)}},getSnapshot(){return t}},claim(e){if(n!==void 0)throw new ir(n,e);n=e;let i=!1;return{set(n){if(i)throw new ar(e);if(n!==t){t=n;for(let e of r)e()}},release(){i||(i=!0,n=void 0)}}}}}function ur(){let e=Reflect.get(globalThis,or);if(e!==void 0){if(cr(e))return e;throw new sr(or)}let t=lr(!0);return Reflect.set(globalThis,or,t),t}var dr=ur().source;function fr(){let{render:e}=Kn(),t=(0,S.useSyncExternalStore)(dr.subscribe,dr.getSnapshot,dr.getSnapshot);return{sessionId:e.sessionId,isConnected:t}}var pr=class extends Error{direction;violations;constructor(e,t,n){super(n?`Client contract violation (${e}): ${n}`:`Client contract violation (${e})`),this.name=`ClientContractViolationError`,this.direction=e,this.violations=t}};function mr(e,t,n){return e?Rn({action:t,data:n},e):{valid:!0,violations:[]}}function hr(e,t,n,r){return Mn(t)?Ln(t,n,e??{},r):e?Ln(t,n,e,r):{valid:!0,violations:[]}}function gr(e){return Wn(e)}function _r(e,t){return Bn(t,e)}function vr(e,t){return e?In(t,e):{valid:!0,violations:[]}}var yr=class{listeners=new Map;reservedReplay=new Map;subscribe(e,t){let n=this.listeners.get(e);if(n===void 0&&(n=new Set,this.listeners.set(e,n)),n.add(t),e.startsWith(`_ggui:`)){let n=this.reservedReplay.get(e);if(n!==void 0)for(let e of n)t(e)}return()=>{let n=this.listeners.get(e);n!==void 0&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}emit(e){if(e.channel.startsWith(`_ggui:`)){let t=this.reservedReplay.get(e.channel);t===void 0&&(t=[],this.reservedReplay.set(e.channel,t)),t.push(e),t.length>256&&t.shift()}let t=this.listeners.get(e.channel);if(t!==void 0)for(let n of t)n(e)}};function br(e){let t=0,n=e.nextClientSeq??(()=>(t+=1,t)),r=e.validateEnvelope??_r,i=new Set;return{app:e.app,render:e.render,auth:e.auth,...e.onDispatchSuppressed===void 0?{}:{onDispatchSuppressed:e.onDispatchSuppressed},dispatch:(t,a)=>{let o=e.getActiveActionSpec();o===void 0&&e.onActionSpecAbsent?.(t);let s=o?.[t]?.oneShot===!0,c=i.has(t)||e.getSpentOneShots?.()?.includes(t)===!0;if(s&&c){console.warn(`[ggui] dispatch('${t}') suppressed: this action is declared oneShot and already fired for this render. A second gesture is NOT sent to the agent — the submitted control is spent for the render's lifetime. If the action is meant to repeat, remove \`oneShot\` from its contract entry.`),e.onDispatchSuppressed?.({reason:`one-shot-spent`,actionName:t,payloadSignature:Xn(t,a),payload:a,suppressedAt:Date.now()});return}let l=gr({sessionId:e.render.sessionId,type:`data:submit`,payload:{action:t,data:a},clientSeq:n()}),u=r(o,l);if(!u.valid){e.onViolation(new pr(`outbound-action`,u.violations));return}s&&i.add(t),e.emitEnvelope(l)},subscribe:(t,n)=>e.streamBus.subscribe(t,e=>{n({payload:e.payload,mode:e.mode,...e.complete===void 0?{}:{complete:e.complete}})})}}var xr=c({ClientContractViolationError:()=>pr,GguiWireProvider:()=>qn,RESERVED_CHANNEL_REPLAY_MAX:()=>256,StreamBus:()=>yr,buildActionEnvelope:()=>gr,buildWireConfig:()=>br,connectionSource:()=>dr,useAction:()=>Qn,useApp:()=>rr,useAuth:()=>nr,useContract:()=>tr,useGguiContext:()=>$n,useRender:()=>fr,useStream:()=>er,useWireContext:()=>Kn,validateInboundPropsPayload:()=>vr,validateInboundStreamPayload:()=>hr,validateOutboundActionEnvelope:()=>_r,validateOutboundActionPayload:()=>mr}),Sr=`modulepreload`,Cr=function(e){return`/`+e},wr={},Tr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Cr(t,n),t=s(t),t in wr)return;wr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Sr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};(0,S.createContext)(null),new Set(Vn);var Er={};Ne(Er,{Accordion:()=>_a,Alert:()=>Ki,Avatar:()=>Ui,Badge:()=>Ri,Box:()=>li,Button:()=>Ei,Card:()=>ei,Checkbox:()=>Mi,Container:()=>Ir,Divider:()=>ui,Grid:()=>ci,Heading:()=>xi,Icon:()=>ta,Image:()=>Xi,Input:()=>Oi,Link:()=>na,MotionKeyframes:()=>ya,Progress:()=>Yi,RadioGroup:()=>Pi,Row:()=>ii,Select:()=>ji,Skeleton:()=>Bi,Slider:()=>Fi,Spacer:()=>di,Spinner:()=>Si,Stack:()=>ri,Table:()=>aa,Tabs:()=>sa,Text:()=>hi,TextArea:()=>ki,Toast:()=>ha,Toggle:()=>B,Tooltip:()=>ra,useAnimationKey:()=>xa,useMotion:()=>ba});var Dr={0:`0`,.5:`2px`,1:`4px`,1.5:`6px`,2:`8px`,2.5:`10px`,3:`12px`,3.5:`14px`,4:`16px`,5:`20px`,6:`24px`,7:`28px`,8:`32px`,9:`36px`,10:`40px`,11:`44px`,12:`48px`,14:`56px`,16:`64px`,20:`80px`,24:`96px`,28:`112px`,32:`128px`,36:`144px`,40:`160px`,44:`176px`,48:`192px`,52:`208px`,56:`224px`,60:`240px`,64:`256px`,72:`288px`,80:`320px`,96:`384px`},Or={xs:`320px`,sm:`480px`,md:`640px`,lg:`768px`,xl:`1024px`,"2xl":`1280px`,"3xl":`1536px`,full:`100%`},kr={none:`0`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`,"2xl":`16px`,"3xl":`24px`,full:`9999px`},Ar={none:`none`,sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},jr={hide:-1,auto:`auto`,base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Mr={none:`0`,xs:`var(--ggui-spacing-xs, 4px)`,sm:`var(--ggui-spacing-sm, 8px)`,md:`var(--ggui-spacing-md, 16px)`,lg:`var(--ggui-spacing-lg, 24px)`,xl:`var(--ggui-spacing-xl, 32px)`,"2xl":`var(--ggui-spacing-2xl, 48px)`},Nr=new Set(Object.keys(Mr));function Pr(e){if(e!==void 0)return typeof e==`number`?`${e}px`:Nr.has(e)?Mr[e]:e}var Fr={xs:Or.xs,sm:Or.sm,md:Or.md,lg:Or.lg,xl:Or.xl,"2xl":Or[`2xl`],"3xl":Or[`3xl`],full:Or.full};function Ir({children:e,maxWidth:t=`lg`,center:n=!0,padding:r,style:i,className:a}){let o=Fr[t]||t,s=Pr(r);return(0,w.jsx)(`div`,{className:a,style:{maxWidth:o,margin:n?`0 auto`:void 0,padding:s,width:`100%`,...i},children:e})}function Lr(e){return e===void 0?{}:{...e.surface===void 0?{}:{"data-ggui-surface":e.surface},...e.bleed===!0?{"data-ggui-bleed":``}:{}}}function Rr(e,t,n,r){let i=Lr(n.frame);return e===void 0?(0,S.createElement)(`div`,{className:n.className,style:n.style,...i},r):(0,S.createElement)(e,{...t,className:n.className,style:n.style,...i},r)}function zr(e){switch(e){case`default`:return`var(--ggui-color-onContainer, #18181b)`;case`muted`:return`var(--ggui-color-onSunken, #52525b)`;case`subtle`:return`var(--ggui-color-neutral-500, #71717a)`;case`emphasized`:return`var(--ggui-color-link, var(--ggui-color-primary-700, #0369a1))`;case`loud`:return`var(--ggui-color-link, var(--ggui-color-primary-500, #0ea5e9))`;case`error`:return`var(--ggui-color-error, var(--ggui-color-error-500, ${Br.error}))`;case`success`:case`warning`:case`info`:return`var(--ggui-color-${e}-500, ${Br[e]})`;case`inverse`:return`var(--ggui-color-onInverted, var(--ggui-color-container, #ffffff))`;case`inherit`:return`inherit`}}var Br={success:`#15803d`,warning:`#b45309`,error:`#b91c1c`,info:`#0e7490`};function Vr(e){if(e===`inverted`)return zr(`inverse`);if(e===`hero`)return`var(--ggui-color-onHeroGround, #0c4a6e)`}var Hr=`ggui-surface-inverted`;function Ur(e,t,n,r,i,a){let o=`--ggui-surface-`+t+`-bg`,s=`--ggui-surface-`+t+`-ink`,c=`var(`+o+`)`,l=`var(`+s+`)`;return`.${e}{${o}:${n};${s}:${r};--ggui-color-onInverted:${r}}.${e}>*{--ggui-color-container:${c};--ggui-color-onContainer:${l};--ggui-color-elevated:${c};--ggui-color-onElevated:${l};--ggui-color-sunken:${c};--ggui-color-onSunken:${l};--ggui-color-neutral-500:${l};--ggui-color-ground:${c};--ggui-color-onGround:${l};--ggui-color-link:${i}}@supports (color: color-mix(in srgb, red, blue)){.${e}>*{--ggui-color-container:color-mix(in srgb, ${c} 94%, ${l});--ggui-color-elevated:color-mix(in srgb, ${c} 92%, ${l});--ggui-color-sunken:color-mix(in srgb, ${c} 88%, ${l});--ggui-color-onSunken:color-mix(in srgb, ${l} 76%, ${c});--ggui-color-neutral-500:color-mix(in srgb, ${l} 62%, ${c});--ggui-color-outline:${a}color-mix(in srgb, ${l} 32%, ${c}));--ggui-color-outlineVariant:color-mix(in srgb, ${l} 18%, ${c})}}`}var Wr=Ur(Hr,`inverted`,`var(--ggui-color-onContainer, #18181b)`,`var(--ggui-color-container, #ffffff)`,`var(--ggui-color-inverseLink, var(--ggui-color-container, #ffffff))`,`var(--ggui-color-inverseOutline, `),Gr=`ggui-surface-hero`,Kr=Ur(Gr,`hero`,`var(--ggui-color-heroGround, #e0f2fe)`,`var(--ggui-color-onHeroGround, #0c4a6e)`,`var(--ggui-color-heroLink, var(--ggui-color-onHeroGround, #0c4a6e))`,`var(--ggui-color-heroOutline, `);function qr(e){if(e===void 0)return;let{background:t,backgroundColor:n,backgroundImage:r,...i}=e;return i}function Jr(e){if(e===`inverted`)return{className:Hr,css:Wr};if(e===`hero`)return{className:Gr,css:Kr}}function Yr(e){switch(e){case`default`:return`var(--ggui-color-container, #ffffff)`;case`elevated`:return`var(--ggui-color-elevated, #ffffff)`;case`sunken`:return`var(--ggui-color-sunken, #f4f4f5)`;case`accent`:return`var(--ggui-color-primary-50, #f0f9ff)`;case`inverted`:return`var(--ggui-color-onContainer, #18181b)`;case`hero`:return`var(--ggui-color-heroGround, #e0f2fe)`;case`transparent`:return`transparent`}}var Xr={none:`0`,sm:`var(--ggui-shape-radius-sm, 4px)`,md:`var(--ggui-shape-radius-md, 8px)`,lg:`var(--ggui-shape-radius-lg, 12px)`,xl:`var(--ggui-shape-radius-xl, 16px)`},Zr=new Set(Object.keys(Xr));function Qr(e){if(e!==void 0)return typeof e==`number`?`${e}px`:Zr.has(e)?Xr[e]:e}var $r={none:`none`,sm:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04))`,md:`var(--ggui-shape-shadow-md, 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 8px -2px rgba(15, 23, 42, 0.08))`,lg:`var(--ggui-shape-shadow-lg, 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 24px -6px rgba(15, 23, 42, 0.10))`,xl:`var(--ggui-shape-shadow-xl, 0 4px 8px rgba(15, 23, 42, 0.04), 0 20px 40px -8px rgba(15, 23, 42, 0.14))`};function ei(e){let{children:t,padding:n=`lg`,shadow:r=`sm`,border:i=!0,radius:a=`lg`,surface:o,style:s,className:c,bleed:l,as:u,...d}=e,f={...o===`transparent`?{}:{surface:o??`default`},...l===!0?{bleed:!0}:{}},p=Pr(n),m=Yr(o??`default`),h=Vr(o??`default`),g=Jr(o??`default`),_=g===void 0?s:qr(s),v={backgroundColor:m,...h===void 0?{}:{color:h},borderRadius:Qr(a),padding:p,boxShadow:$r[r]||r,border:i?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,..._};return g===void 0?Rr(u,d,{className:c,style:v,frame:f},t):Rr(u,d,{className:c?`${c} ${g.className}`:g.className,style:v,frame:f},(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{children:g.css}),t]}))}var ti={start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`},ni={start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`};function ri(e){let{children:t,direction:n=`vertical`,gap:r=`sm`,align:i=`stretch`,justify:a=`start`,wrap:o=!1,style:s,className:c,as:l,...u}=e,d=Pr(r);return Rr(l,u,{className:c,style:{display:`flex`,flexDirection:n===`vertical`?`column`:`row`,gap:d,alignItems:ni[i]||i,justifyContent:ti[a]||a,flexWrap:o?`wrap`:`nowrap`,...s}},t)}function ii(e){return(0,S.createElement)(ri,{...e,direction:`horizontal`})}var ai=[[`sm`,640],[`md`,768],[`lg`,1024],[`xl`,1280]],oi=e=>`repeat(${e}, minmax(0, 1fr))`;function si(e){let t=JSON.stringify(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(31,n)+t.charCodeAt(e)|0;return(n>>>0).toString(36)}function ci(e){let{children:t,columns:n=2,gap:r=`md`,minColumnWidth:i,style:a,className:o,as:s,...c}=e,l=typeof i==`number`?`${i}px`:i;if(l!==void 0)return Rr(s,c,{className:o,style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(${l}, 1fr))`,gap:Pr(r),...a}},t);if(typeof n==`object`){let e=`ggui-grid-${si(n)}`,i=[`.${e}{grid-template-columns:${oi(n.base??1)}}`];for(let[t,r]of ai){let a=n[t];typeof a==`number`&&i.push(`@media (min-width:${r}px){.${e}{grid-template-columns:${oi(a)}}}`)}let l={display:`grid`,gap:Pr(r),...a};return Rr(s,c,{className:o?`${o} ${e}`:e,style:l},(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{children:i.join(``)}),t]}))}return Rr(s,c,{className:o,style:{display:`grid`,gridTemplateColumns:oi(n),gap:Pr(r),...a}},t)}function li(e){let{children:t,padding:n,paddingX:r,paddingY:i,margin:a,surface:o,assetColor:s,assetSemantic:c,radius:l,style:u,className:d,bleed:f,as:p,...m}=e,h=o!==void 0&&o!==`transparent`?o:void 0,g=h===void 0&&f!==!0?void 0:{...h===void 0?{}:{surface:h},...f===!0?{bleed:!0}:{}},_;if(r!==void 0||i!==void 0){let e=Pr(r)||`0`;_=`${Pr(i)||`0`} ${e}`}else _=Pr(n);let v=s!==void 0&&typeof c==`string`&&c.length>0?s:void 0,y=v||(o?Yr(o):void 0),b=!v&&o?Vr(o):void 0,x=!v&&o?Jr(o):void 0,S=x===void 0?u:qr(u),C={padding:_,margin:Pr(a),background:y,...b===void 0?{}:{color:b},borderRadius:Qr(l),...S};return x===void 0?Rr(p,m,{className:d,style:C,...g===void 0?{}:{frame:g}},t):Rr(p,m,{className:d?`${d} ${x.className}`:x.className,style:C,...g===void 0?{}:{frame:g}},(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{children:x.css}),t]}))}function ui({orientation:e=`horizontal`,margin:t=`var(--ggui-spacing-md, 16px)`,tone:n,style:r,className:i}){let a=typeof t==`number`?`${t}px`:t,o=n?zr(n):`var(--ggui-color-outlineVariant, #e4e4e7)`;return e===`vertical`?(0,w.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:i,style:{width:`1px`,backgroundColor:o,margin:`0 ${a}`,alignSelf:`stretch`,...r}}):(0,w.jsx)(`hr`,{role:`separator`,"aria-orientation":`horizontal`,className:i,style:{border:`none`,height:`1px`,backgroundColor:o,margin:`${a} 0`,...r}})}function di({size:e=16,style:t,className:n}){return e===`flex`?(0,w.jsx)(`div`,{className:n,style:{flex:1,...t}}):(0,w.jsx)(`div`,{className:n,style:{width:`${e}px`,height:`${e}px`,flexShrink:0,...t}})}var fi={xs:`var(--ggui-font-size-xs, 12px)`,sm:`var(--ggui-font-size-sm, 14px)`,base:`var(--ggui-font-size-base, 16px)`,lg:`var(--ggui-font-size-lg, 18px)`,xl:`var(--ggui-font-size-xl, 20px)`,"2xl":`var(--ggui-font-size-2xl, 24px)`,"3xl":`var(--ggui-font-size-3xl, 30px)`,"4xl":`var(--ggui-font-size-4xl, 36px)`},pi={normal:`var(--ggui-font-weight-normal, 400)`,medium:`var(--ggui-font-weight-medium, 500)`,semibold:`var(--ggui-font-weight-semibold, 600)`,bold:`var(--ggui-font-weight-bold, 700)`},mi={xs:1.5,sm:1.5,base:1.5,lg:1.625,xl:1.375,"2xl":1.25,"3xl":1.25,"4xl":1.25};function hi({children:e,size:t=`base`,weight:n=`normal`,caps:r=!1,tone:i,align:a,truncate:o,is:s=`p`,id:c,htmlFor:l,style:u,className:d}){let f=i?zr(i):`var(--ggui-color-onContainer, #18181b)`,p={id:c,htmlFor:l,className:d,style:{fontSize:fi[t],fontWeight:pi[n],lineHeight:mi[t],color:f,textAlign:a,margin:0,...r&&{textTransform:`uppercase`,letterSpacing:`0.05em`},...o&&{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},...u}};return(0,S.createElement)(s,p,e)}var gi={sans:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,mono:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`},I={xs:`12px`,sm:`14px`,base:`16px`,lg:`18px`,xl:`20px`,"2xl":`24px`,"3xl":`30px`,"4xl":`36px`,"5xl":`48px`,"6xl":`60px`},L={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},_i={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},vi={tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`},yi={h1:{fontSize:I[`4xl`],fontWeight:L.bold,lineHeight:_i.tight,letterSpacing:vi.tight},h2:{fontSize:I[`3xl`],fontWeight:L.bold,lineHeight:_i.tight,letterSpacing:vi.tight},h3:{fontSize:I[`2xl`],fontWeight:L.semibold,lineHeight:_i.snug,letterSpacing:vi.normal},h4:{fontSize:I.xl,fontWeight:L.semibold,lineHeight:_i.snug,letterSpacing:vi.normal},h5:{fontSize:I.lg,fontWeight:L.semibold,lineHeight:_i.normal,letterSpacing:vi.normal},h6:{fontSize:I.base,fontWeight:L.semibold,lineHeight:_i.normal,letterSpacing:vi.normal}},bi={h1:`var(--ggui-font-size-4xl, 36px)`,h2:`var(--ggui-font-size-3xl, 30px)`,h3:`var(--ggui-font-size-2xl, 24px)`,h4:`var(--ggui-font-size-xl, 20px)`,h5:`var(--ggui-font-size-lg, 18px)`,h6:`var(--ggui-font-size-base, 16px)`};function xi({children:e,level:t=2,tone:n,align:r,style:i,className:a}){let o=`h${t}`,s=yi[o]||yi.h2,c={fontSize:bi[o],fontWeight:`var(--ggui-font-weight-heading, ${s.fontWeight})`,fontFamily:`var(--ggui-font-family-heading, var(--ggui-font-family-sans, inherit))`,lineHeight:s.lineHeight,letterSpacing:`var(--ggui-letter-spacing-heading, ${s.letterSpacing})`},l=n?zr(n):`var(--ggui-color-onContainer, #18181b)`;return(0,S.createElement)(o,{className:a,style:{...c,color:l,textAlign:r,margin:0,...i}},e)}function Si({size:e=24,tone:t,style:n,className:r}){let i=t===`inherit`?`currentColor`:t?zr(t):`var(--ggui-color-primary-600, #0284c7)`;return(0,w.jsxs)(`svg`,{className:r,width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,role:`status`,"aria-label":`Loading`,style:{animation:`ggui-spin 1s linear infinite`,...n},children:[(0,w.jsx)(`style`,{children:`@keyframes ggui-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }`}),(0,w.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`var(--ggui-color-outlineVariant, #e4e4e7)`,strokeWidth:`3`,fill:`none`}),(0,w.jsx)(`path`,{d:`M12 2a10 10 0 0 1 10 10`,stroke:i,strokeWidth:`3`,strokeLinecap:`round`,fill:`none`})]})}var Ci={instant:`0ms`,fast:`100ms`,normal:`200ms`,slow:`300ms`,slower:`500ms`},R={linear:`linear`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,easeOut:`cubic-bezier(0, 0, 0.2, 1)`,easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,spring:`cubic-bezier(0.175, 0.885, 0.32, 1.275)`},z={duration:{fast:`var(--ggui-motion-duration-fast)`,base:`var(--ggui-motion-duration-base)`,slow:`var(--ggui-motion-duration-slow)`},easing:{standard:`var(--ggui-motion-easing-standard)`,emphasized:`var(--ggui-motion-easing-emphasized)`,exit:`var(--ggui-motion-easing-exit)`}};`${z.duration.fast}${z.easing.standard}`,`${z.duration.base}${z.easing.standard}`,`${z.duration.slow}${z.easing.standard}`,`${z.duration.base}${z.easing.standard}${z.duration.base}${z.easing.standard}${z.duration.base}${z.easing.standard}`,`${z.duration.base}${z.easing.standard}`,`${z.duration.base}${z.easing.emphasized}`;var wi={xs:{padding:`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`,minHeight:`24px`},sm:{padding:`6px var(--ggui-spacing-4, 12px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,minHeight:`32px`},md:{padding:`10px var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,minHeight:`40px`},lg:{padding:`12px var(--ggui-spacing-6, 24px)`,fontSize:`var(--ggui-font-size-base, 16px)`,minHeight:`48px`}},Ti={primary:{backgroundColor:`var(--ggui-color-primary-600, #0284c7)`,color:`var(--ggui-color-onPrimary, #ffffff)`,border:`none`},secondary:{backgroundColor:`var(--ggui-color-sunken, #f4f4f5)`,color:`var(--ggui-color-onSunken, #52525b)`,border:`none`},outline:{backgroundColor:`transparent`,color:`var(--ggui-color-onContainer, #18181b)`,border:`1px solid var(--ggui-color-primary-600, #0284c7)`},ghost:{backgroundColor:`transparent`,color:`var(--ggui-color-onSunken, #52525b)`,border:`none`},danger:{backgroundColor:`var(--ggui-color-error-600, #dc2626)`,color:`var(--ggui-color-onError, #ffffff)`,border:`none`}};function Ei({children:e,variant:t=`primary`,size:n=`md`,fullWidth:r,loading:i,disabled:a,leftIcon:o,rightIcon:s,type:c=`button`,onClick:l,onPress:u,style:d,className:f,...p}){let m=a||i;return(0,w.jsx)(`button`,{type:c,onClick:m?void 0:l??u,disabled:m,className:f,style:{...wi[n],...Ti[t],display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:`var(--ggui-spacing-2, 8px)`,borderRadius:`var(--ggui-shape-radius-control, var(--ggui-shape-radius-md, 8px))`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:m?`not-allowed`:`pointer`,opacity:m?.5:1,width:r?`100%`:void 0,transition:`background-color ${z.duration.base} ${z.easing.standard}, box-shadow ${z.duration.base} ${z.easing.standard}, opacity ${z.duration.base} ${z.easing.standard}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`,...d},...p,children:i?(0,w.jsx)(Si,{size:16,tone:`inherit`}):(0,w.jsxs)(w.Fragment,{children:[o,e,s]})})}var Di={sm:{padding:`6px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`},md:{padding:`10px 12px`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`12px 14px`,fontSize:`var(--ggui-font-size-base, 16px)`}};function Oi({label:e,placeholder:t,value:n,onChange:r,type:i=`text`,error:a,helperText:o,required:s,disabled:c,size:l=`md`,style:u,className:d,...f}){let p=(0,S.useId)(),m=`${p}-input`,h=`${p}-message`,g=!!a,_=!!(a||o);return(0,w.jsxs)(`div`,{className:d,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...u},children:[e&&(0,w.jsxs)(`label`,{htmlFor:m,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsx)(`input`,{id:m,type:i,placeholder:t,value:n,onChange:e=>r?.(e.target.value),disabled:c,required:s,"aria-invalid":g||void 0,"aria-describedby":_?h:void 0,style:{...Di[l],width:`100%`,borderRadius:`var(--ggui-shape-radius-control, var(--ggui-shape-radius-md, 8px))`,border:`1px solid ${g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-sunken, #fafafa)`:`var(--ggui-color-sunken, #ffffff)`,color:`var(--ggui-color-onContainer, #18181b)`,transition:`border-color ${z.duration.base} ${z.easing.standard}, box-shadow ${z.duration.base} ${z.easing.standard}`,boxSizing:`border-box`},...f}),_&&(0,w.jsx)(`span`,{id:h,role:g?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSunken, #52525b)`},children:a||o})]})}function ki({label:e,placeholder:t,value:n,onChange:r,rows:i=4,error:a,helperText:o,required:s,disabled:c,maxLength:l,showCount:u,autoResize:d,style:f,className:p,...m}){let h=(0,S.useId)(),g=`${h}-textarea`,_=`${h}-message`,v=!!a,y=!!(a||o),b=n?.length||0;return(0,w.jsxs)(`div`,{className:p,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...f},children:[e&&(0,w.jsxs)(`label`,{htmlFor:g,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsx)(`textarea`,{id:g,placeholder:t,value:n,onChange:e=>r?.(e.target.value),rows:i,disabled:c,required:s,maxLength:l,"aria-invalid":v||void 0,"aria-describedby":y?_:void 0,style:{padding:`10px 12px`,width:`100%`,borderRadius:`var(--ggui-shape-radius-control, var(--ggui-shape-radius-md, 8px))`,border:`1px solid ${v?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-sunken, #fafafa)`:`var(--ggui-color-sunken, #ffffff)`,color:`var(--ggui-color-onContainer, #18181b)`,fontSize:`var(--ggui-font-size-sm, 14px)`,fontFamily:`inherit`,transition:`border-color ${z.duration.base} ${z.easing.standard}, box-shadow ${z.duration.base} ${z.easing.standard}`,boxSizing:`border-box`,resize:d?`none`:`vertical`},...m}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[y&&(0,w.jsx)(`span`,{id:_,role:v?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:v?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSunken, #52525b)`},children:a||o}),u&&l&&(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSunken, #52525b)`,marginLeft:`auto`},children:[b,`/`,l]})]})]})}var Ai={sm:{padding:`6px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`},md:{padding:`10px 12px`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`12px 14px`,fontSize:`var(--ggui-font-size-base, 16px)`}};function ji({label:e,value:t,onChange:n,options:r,placeholder:i,error:a,helperText:o,required:s,disabled:c,size:l=`md`,style:u,className:d,...f}){let p=(0,S.useId)(),m=`${p}-select`,h=`${p}-message`,g=!!a,_=!!(a||o);return(0,w.jsxs)(`div`,{className:d,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...u},children:[e&&(0,w.jsxs)(`label`,{htmlFor:m,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsxs)(`select`,{id:m,value:t,onChange:e=>n?.(e.target.value),disabled:c,required:s,"aria-invalid":g||void 0,"aria-describedby":_?h:void 0,style:{...Ai[l],width:`100%`,borderRadius:`var(--ggui-shape-radius-control, var(--ggui-shape-radius-md, 8px))`,border:`1px solid ${g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-sunken, #fafafa)`:`var(--ggui-color-sunken, #ffffff)`,color:t?`var(--ggui-color-onContainer, #18181b)`:`var(--ggui-color-onSunken, #52525b)`,cursor:c?`not-allowed`:`pointer`,appearance:`none`,backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")`,backgroundRepeat:`no-repeat`,backgroundPosition:`right 12px center`,paddingRight:`36px`,boxSizing:`border-box`,transition:`border-color ${z.duration.base} ${z.easing.standard}, box-shadow ${z.duration.base} ${z.easing.standard}`},...f,children:[i&&(0,w.jsx)(`option`,{value:``,disabled:!0,children:i}),r.map(e=>(0,w.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),_&&(0,w.jsx)(`span`,{id:h,role:g?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSunken, #52525b)`},children:a||o})]})}function Mi({label:e,checked:t,onChange:n,disabled:r,description:i,indeterminate:a,style:o,className:s}){return(0,w.jsxs)(`label`,{className:s,style:{display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,cursor:r?`not-allowed`:`pointer`,opacity:r?.5:1,...o},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,width:`18px`,height:`18px`,flexShrink:0,marginTop:`2px`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n?.(e.target.checked),disabled:r,ref:e=>{e&&(e.indeterminate=a||!1)},style:{position:`absolute`,width:`18px`,height:`18px`,margin:0,opacity:0,cursor:r?`not-allowed`:`pointer`}}),(0,w.jsx)(`div`,{style:{width:`18px`,height:`18px`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,border:`2px solid ${t||a?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:t||a?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-sunken, #ffffff)`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all ${z.duration.base} ${z.easing.standard}`},children:(t||a)&&(0,w.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,style:{color:`var(--ggui-color-onPrimary, #ffffff)`},children:a?(0,w.jsx)(`path`,{d:`M2.5 6H9.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}):(0,w.jsx)(`path`,{d:`M2.5 6L5 8.5L9.5 3.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(e||i)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[e&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e}),i&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSunken, #52525b)`},children:i})]})]})}var Ni={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function B({label:e,checked:t,onChange:n,disabled:r,size:i=`md`,style:a,className:o}){let s=Ni[i],[c,l]=(0,S.useState)(!1);return(0,w.jsxs)(`label`,{className:o,style:{display:`flex`,alignItems:`center`,gap:`var(--ggui-spacing-2, 8px)`,cursor:r?`not-allowed`:`pointer`,opacity:r?.5:1,...a},children:[(0,w.jsx)(`div`,{role:`switch`,"aria-checked":t,"aria-label":e,tabIndex:r?-1:0,onClick:()=>!r&&n?.(!t),onKeyDown:e=>{r||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),n?.(!t))},onFocus:()=>l(!0),onBlur:()=>l(!1),style:{width:s.width,height:s.height,borderRadius:`9999px`,backgroundColor:t?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`,position:`relative`,transition:`background-color ${z.duration.base} ${z.easing.standard}, box-shadow ${z.duration.base} ${z.easing.standard}`,flexShrink:0,outline:`none`,boxShadow:c?`0 0 0 3px var(--ggui-color-primary-200, #bae6fd)`:void 0},children:(0,w.jsx)(`div`,{style:{width:s.knob,height:s.knob,borderRadius:`50%`,backgroundColor:`#ffffff`,position:`absolute`,top:(s.height-s.knob)/2,left:t?s.width-s.knob-(s.height-s.knob)/2:(s.height-s.knob)/2,transition:`left ${z.duration.base} ${z.easing.standard}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`}})}),e&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e})]})}function Pi({label:e,value:t,onChange:n,options:r,direction:i=`vertical`,disabled:a,error:o,style:s,className:c}){let l=(0,S.useId)(),u=`${l}-label`,d=`${l}-error`,f=`${l}-radio`;return(0,w.jsxs)(`div`,{role:`radiogroup`,"aria-labelledby":e?u:void 0,"aria-describedby":o?d:void 0,className:c,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-2, 8px)`,...s},children:[e&&(0,w.jsx)(`span`,{id:u,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e}),(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:i===`vertical`?`column`:`row`,gap:i===`vertical`?`var(--ggui-spacing-2, 8px)`:`var(--ggui-spacing-4, 16px)`,flexWrap:`wrap`},children:r.map(e=>{let r=t===e.value,i=a||e.disabled;return(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,cursor:i?`not-allowed`:`pointer`,opacity:i?.5:1},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,width:`18px`,height:`18px`,flexShrink:0,marginTop:`2px`},children:[(0,w.jsx)(`input`,{type:`radio`,name:f,value:e.value,checked:r,onChange:()=>n?.(e.value),disabled:i,style:{position:`absolute`,width:`18px`,height:`18px`,margin:0,opacity:0,cursor:i?`not-allowed`:`pointer`}}),(0,w.jsx)(`div`,{style:{width:`18px`,height:`18px`,borderRadius:`var(--ggui-shape-radius-full, 9999px)`,border:`2px solid ${r?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:`var(--ggui-color-sunken, #ffffff)`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all ${z.duration.base} ${z.easing.standard}`},children:r&&(0,w.jsx)(`div`,{style:{width:`8px`,height:`8px`,borderRadius:`var(--ggui-shape-radius-full, 9999px)`,backgroundColor:`var(--ggui-color-primary-600, #0284c7)`}})})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e.label}),e.description&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e.description})]})]},e.value)})}),o&&(0,w.jsx)(`span`,{id:d,role:`alert`,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-error-500, #ef4444)`},children:o})]})}function Fi({label:e,value:t=0,onChange:n,min:r=0,max:i=100,step:a=1,disabled:o,showValue:s,style:c,className:l}){let u=(0,S.useId)(),d=`${u}-slider`,f=`${u}-label`,p=(t-r)/(i-r)*100;return(0,w.jsxs)(`div`,{className:l,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-2, 8px)`,...c},children:[(e||s)&&(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[e&&(0,w.jsx)(`span`,{id:f,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSunken, #52525b)`},children:e}),s&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-primary-600, #0284c7)`},children:t})]}),(0,w.jsxs)(`div`,{style:{position:`relative`,height:`20px`,display:`flex`,alignItems:`center`},children:[(0,w.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`6px`,borderRadius:`3px`,backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`}}),(0,w.jsx)(`div`,{style:{position:`absolute`,width:`${p}%`,height:`6px`,borderRadius:`3px`,backgroundColor:o?`var(--ggui-color-outline, #d4d4d8)`:`var(--ggui-color-primary-600, #0284c7)`,transition:`width ${z.duration.fast} ${z.easing.standard}`}}),(0,w.jsx)(`input`,{id:d,type:`range`,min:r,max:i,step:a,value:t,onChange:e=>n?.(Number(e.target.value)),disabled:o,"aria-labelledby":e?f:void 0,"aria-label":e?void 0:`Slider`,"aria-valuenow":t,"aria-valuemin":r,"aria-valuemax":i,style:{position:`absolute`,width:`100%`,height:`20px`,margin:0,opacity:0,cursor:o?`not-allowed`:`pointer`,zIndex:1}}),(0,w.jsx)(`div`,{style:{position:`absolute`,left:`calc(${p}% - 10px)`,width:`20px`,height:`20px`,borderRadius:`50%`,backgroundColor:`#ffffff`,border:`2px solid ${o?`var(--ggui-color-outline, #d4d4d8)`:`var(--ggui-color-primary-600, #0284c7)`}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`,transition:`left ${z.duration.fast} ${z.easing.standard}`,pointerEvents:`none`}})]})]})}var Ii={default:{backgroundColor:`var(--ggui-color-sunken, #f4f4f5)`,color:`var(--ggui-color-onSunken, #52525b)`},primary:{backgroundColor:`var(--ggui-color-primary-100, #e0f2fe)`,color:`var(--ggui-color-primary-700, #0369a1)`},secondary:{backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`,color:`var(--ggui-color-onContainer, #18181b)`},success:{backgroundColor:`var(--ggui-color-success-100, #dcfce7)`,color:`var(--ggui-color-success-700, #15803d)`},warning:{backgroundColor:`var(--ggui-color-warning-100, #fef3c7)`,color:`var(--ggui-color-warning-700, #b45309)`},error:{backgroundColor:`var(--ggui-color-error-100, #fee2e2)`,color:`var(--ggui-color-error-700, #b91c1c)`},info:{backgroundColor:`var(--ggui-color-info-100, #cffafe)`,color:`var(--ggui-color-info-700, #0e7490)`},tertiary:{backgroundColor:`var(--ggui-color-tertiaryContainer, #ccfbf1)`,color:`var(--ggui-color-onTertiaryContainer, #134e4a)`}},Li={sm:{padding:`2px 6px`,fontSize:`var(--ggui-font-size-xs, 12px)`},md:{padding:`2px 8px`,fontSize:`var(--ggui-font-size-xs, 12px)`},lg:{padding:`4px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`}};function Ri({children:e,variant:t=`default`,size:n=`md`,pill:r=!0,style:i,className:a}){return(0,w.jsx)(`span`,{className:a,style:{...Ii[t],...Li[n],display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:`var(--ggui-font-weight-medium, 500)`,borderRadius:r?`9999px`:`var(--ggui-shape-radius-sm, 4px)`,whiteSpace:`nowrap`,...i},children:e})}var zi=e=>e===void 0?void 0:typeof e==`number`?`${e}px`:e;function Bi({variant:e=`rect`,width:t,height:n,radius:r=`sm`,style:i,className:a}){let o=e===`circle`,s=e===`text`,c=zi(t)??(o?`2.5rem`:`100%`),l={display:`block`,width:c,height:zi(n)??(s?`1em`:o?c:`1.25rem`),borderRadius:o?`9999px`:Qr(r),backgroundColor:`var(--ggui-color-sunken, #f4f4f5)`,animation:`ggui-skeleton-pulse 1.5s ease-in-out infinite`,...i};return(0,w.jsx)(`div`,{className:a,style:l,"aria-hidden":`true`,children:(0,w.jsx)(`style`,{children:`@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }`})})}var Vi={xs:24,sm:32,md:40,lg:48,xl:64},Hi=[`var(--ggui-color-primary-500, #0ea5e9)`,`var(--ggui-color-success-500, #22c55e)`,`var(--ggui-color-warning-500, #f59e0b)`,`var(--ggui-color-error-500, #ef4444)`,`var(--ggui-color-info-500, #06b6d4)`];function Ui({src:e,name:t,size:n=`md`,shape:r=`circle`,style:i,className:a}){let[o,s]=(0,S.useState)(!1),c=typeof n==`number`?n:Vi[n]||40,l=t?t.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2):`?`,u=e=>e?Hi[e.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%Hi.length]:`var(--ggui-color-outline, #d4d4d8)`,d=!e||o;return(0,w.jsx)(`div`,{role:`img`,"aria-label":t||`Avatar`,className:a,style:{width:c,height:c,borderRadius:r===`circle`?`50%`:`var(--ggui-shape-radius-md, 8px)`,backgroundColor:d?u(t):`transparent`,color:`#ffffff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:c*.4,fontWeight:`var(--ggui-font-weight-semibold, 600)`,overflow:`hidden`,flexShrink:0,...i},children:d?l:(0,w.jsx)(`img`,{src:e,alt:t||`Avatar`,onError:()=>s(!0),style:{width:`100%`,height:`100%`,objectFit:`cover`}})})}var Wi={info:{bg:`var(--ggui-color-info-50, #ecfeff)`,border:`var(--ggui-color-info-200, #a5f3fc)`,text:`var(--ggui-color-info-800, #155e75)`,icon:`var(--ggui-color-info-500, #06b6d4)`},success:{bg:`var(--ggui-color-success-50, #f0fdf4)`,border:`var(--ggui-color-success-200, #bbf7d0)`,text:`var(--ggui-color-success-800, #166534)`,icon:`var(--ggui-color-success-500, #22c55e)`},warning:{bg:`var(--ggui-color-warning-50, #fffbeb)`,border:`var(--ggui-color-warning-200, #fde68a)`,text:`var(--ggui-color-warning-800, #92400e)`,icon:`var(--ggui-color-warning-500, #f59e0b)`},error:{bg:`var(--ggui-color-error-50, #fef2f2)`,border:`var(--ggui-color-error-200, #fecaca)`,text:`var(--ggui-color-error-800, #991b1b)`,icon:`var(--ggui-color-error-500, #ef4444)`}},Gi={info:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z`,clipRule:`evenodd`})}),success:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,clipRule:`evenodd`})}),warning:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),error:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,clipRule:`evenodd`})})};function Ki({children:e,variant:t=`info`,title:n,closable:r,onClose:i,icon:a,style:o,className:s}){let c=Wi[t];return(0,w.jsxs)(`div`,{role:`alert`,className:s,style:{display:`flex`,gap:`12px`,padding:`12px 16px`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,backgroundColor:c.bg,border:`1px solid ${c.border}`,color:c.text,...o},children:[(0,w.jsx)(`div`,{style:{color:c.icon,flexShrink:0},children:a||Gi[t]}),(0,w.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`},children:[n&&(0,w.jsx)(`div`,{style:{fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-sm, 14px)`},children:n}),(0,w.jsx)(`div`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`},children:e})]}),r&&(0,w.jsx)(`button`,{onClick:i,"aria-label":`Close`,style:{background:`none`,border:`none`,padding:`4px`,cursor:`pointer`,color:c.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:`28px`,minHeight:`28px`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})})})]})}var qi={default:`var(--ggui-color-primary-600, #0284c7)`,success:`var(--ggui-color-success-500, #22c55e)`,warning:`var(--ggui-color-warning-500, #f59e0b)`,error:`var(--ggui-color-error-500, #ef4444)`},Ji={sm:4,md:8,lg:12};function Yi({value:e,max:t=100,variant:n=`default`,size:r=`md`,label:i,showLabel:a,indeterminate:o,style:s,className:c}){let l=Math.min(100,Math.max(0,e/t*100)),u=Ji[r],d=qi[n],f=i??`Progress`;return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...s},children:[a&&(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSunken, #52525b)`},children:f}),(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onContainer, #18181b)`},children:[Math.round(l),`%`]})]}),(0,w.jsxs)(`div`,{role:`progressbar`,"aria-valuenow":o?void 0:e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":f,style:{width:`100%`,height:u,borderRadius:u/2,backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`,overflow:`hidden`},children:[(0,w.jsx)(`div`,{style:{height:`100%`,borderRadius:u/2,backgroundColor:d,transition:o?`none`:`width ${z.duration.slow} ${z.easing.standard}`,...o?{width:`30%`,animation:`ggui-progress-indeterminate 1.5s ease-in-out infinite`}:{width:`${l}%`}}}),o&&(0,w.jsx)(`style`,{children:`@keyframes ggui-progress-indeterminate {
17
+ 0% { transform: translateX(-100%); }
18
+ 100% { transform: translateX(400%); }
19
+ }`})]})]})}function Xi({src:e,alt:t,width:n,height:r,objectFit:i=`cover`,radius:a,fallback:o,style:s,className:c}){let[l,u]=(0,S.useState)(!1),d=e=>{if(e!==void 0)return typeof e==`number`?`${e}px`:e};return l&&o?(0,w.jsx)(w.Fragment,{children:o}):l?(0,w.jsx)(`div`,{role:`img`,"aria-label":`${t} (failed to load)`,className:c,style:{width:d(n)||`100%`,height:d(r)||`auto`,borderRadius:Qr(a),backgroundColor:`var(--ggui-color-sunken, #f4f4f5)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--ggui-color-outline, #d4d4d8)`,...s},children:(0,w.jsx)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,w.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z`})})}):(0,w.jsx)(`img`,{src:e,alt:t,onError:()=>u(!0),className:c,style:{width:d(n)||`100%`,height:d(r)||`auto`,objectFit:i,borderRadius:Qr(a),display:`block`,...s}})}var Zi={Sun:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]],Moon:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]],Cloud:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`}]],CloudRain:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M16 14v6`}],[`path`,{d:`M8 14v6`}],[`path`,{d:`M12 16v6`}]],CloudSnow:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M8 15h.01`}],[`path`,{d:`M8 19h.01`}],[`path`,{d:`M12 17h.01`}],[`path`,{d:`M12 21h.01`}],[`path`,{d:`M16 15h.01`}],[`path`,{d:`M16 19h.01`}]],CloudLightning:[[`path`,{d:`M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973`}],[`path`,{d:`m13 12-3 5h4l-3 5`}]],CloudDrizzle:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M8 19v1`}],[`path`,{d:`M8 14v1`}],[`path`,{d:`M16 19v1`}],[`path`,{d:`M16 14v1`}],[`path`,{d:`M12 21v1`}],[`path`,{d:`M12 16v1`}]],CloudSun:[[`path`,{d:`M12 2v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}],[`path`,{d:`M15.947 12.65a4 4 0 0 0-5.925-4.128`}],[`path`,{d:`M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z`}]],CloudMoon:[[`path`,{d:`M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z`}],[`path`,{d:`M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36`}]],CloudFog:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M16 17H7`}],[`path`,{d:`M17 21H9`}]],Wind:[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`}]],Thermometer:[[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`}]],Droplets:[[`path`,{d:`M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z`}],[`path`,{d:`M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97`}]],Umbrella:[[`path`,{d:`M12 13v7a2 2 0 0 0 4 0`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z`}]],Snowflake:[[`path`,{d:`m10 20-1.25-2.5L6 18`}],[`path`,{d:`M10 4 8.75 6.5 6 6`}],[`path`,{d:`m14 20 1.25-2.5L18 18`}],[`path`,{d:`m14 4 1.25 2.5L18 6`}],[`path`,{d:`m17 21-3-6h-4`}],[`path`,{d:`m17 3-3 6 1.5 3`}],[`path`,{d:`M2 12h6.5L10 9`}],[`path`,{d:`m20 10-1.5 2 1.5 2`}],[`path`,{d:`M22 12h-6.5L14 15`}],[`path`,{d:`m4 10 1.5 2L4 14`}],[`path`,{d:`m7 21 3-6-1.5-3`}],[`path`,{d:`m7 3 3 6h4`}]],Rainbow:[[`path`,{d:`M22 17a10 10 0 0 0-20 0`}],[`path`,{d:`M6 17a6 6 0 0 1 12 0`}],[`path`,{d:`M10 17a2 2 0 0 1 4 0`}]],Home:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}]],ArrowLeft:[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]],ArrowRight:[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]],ArrowUp:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]],ArrowDown:[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]],ChevronLeft:[[`path`,{d:`m15 18-6-6 6-6`}]],ChevronRight:[[`path`,{d:`m9 18 6-6-6-6`}]],ChevronUp:[[`path`,{d:`m18 15-6-6-6 6`}]],ChevronDown:[[`path`,{d:`m6 9 6 6 6-6`}]],ChevronsLeft:[[`path`,{d:`m11 17-5-5 5-5`}],[`path`,{d:`m18 17-5-5 5-5`}]],ChevronsRight:[[`path`,{d:`m6 17 5-5-5-5`}],[`path`,{d:`m13 17 5-5-5-5`}]],ChevronsUp:[[`path`,{d:`m17 11-5-5-5 5`}],[`path`,{d:`m17 18-5-5-5 5`}]],ChevronsDown:[[`path`,{d:`m7 6 5 5 5-5`}],[`path`,{d:`m7 13 5 5 5-5`}]],ExternalLink:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]],CornerDownLeft:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`}],[`path`,{d:`m9 10-5 5 5 5`}]],CornerDownRight:[[`path`,{d:`m15 10 5 5-5 5`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`}]],MoveHorizontal:[[`path`,{d:`m18 8 4 4-4 4`}],[`path`,{d:`M2 12h20`}],[`path`,{d:`m6 8-4 4 4 4`}]],MoveVertical:[[`path`,{d:`M12 2v20`}],[`path`,{d:`m8 18 4 4 4-4`}],[`path`,{d:`m8 6 4-4 4 4`}]],Plus:[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],Minus:[[`path`,{d:`M5 12h14`}]],X:[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],Check:[[`path`,{d:`M20 6 9 17l-5-5`}]],Search:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]],Edit:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]],Trash2:[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]],Save:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]],Download:[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]],Upload:[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]],Share2:[[`circle`,{cx:`18`,cy:`5`,r:`3`}],[`circle`,{cx:`6`,cy:`12`,r:`3`}],[`circle`,{cx:`18`,cy:`19`,r:`3`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`}]],Copy:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]],Clipboard:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}]],RotateCcw:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],RotateCw:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]],RefreshCw:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]],Undo2:[[`path`,{d:`M9 14 4 9l5-5`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`}]],Redo2:[[`path`,{d:`m15 14 5-5-5-5`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`}]],Maximize2:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],Minimize2:[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],ZoomIn:[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],ZoomOut:[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],Send:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`}],[`path`,{d:`m21.854 2.147-10.94 10.939`}]],LogIn:[[`path`,{d:`m10 17 5-5-5-5`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}]],LogOut:[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]],Heart:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}]],Star:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`}]],ThumbsUp:[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`}],[`path`,{d:`M7 10v12`}]],ThumbsDown:[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`}],[`path`,{d:`M17 14V2`}]],MessageCircle:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`}]],MessageSquare:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]],Bell:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`}]],BellOff:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`}]],Mail:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}]],Phone:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],PhoneCall:[[`path`,{d:`M13 2a9 9 0 0 1 9 9`}],[`path`,{d:`M13 6a5 5 0 0 1 5 5`}],[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],Video:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`}]],AtSign:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]],Users:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}]],UserPlus:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`}]],ShoppingCart:[[`circle`,{cx:`8`,cy:`21`,r:`1`}],[`circle`,{cx:`19`,cy:`21`,r:`1`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`}]],ShoppingBag:[[`path`,{d:`M16 10a4 4 0 0 1-8 0`}],[`path`,{d:`M3.103 6.034h17.794`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`}]],CreditCard:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]],DollarSign:[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]],Package:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`}],[`path`,{d:`M12 22V12`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`}],[`path`,{d:`m7.5 4.27 9 5.15`}]],Tag:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],Receipt:[[`path`,{d:`M12 17V7`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`}]],Wallet:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]],Banknote:[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`M6 12h.01M18 12h.01`}]],Percent:[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`}]],Gift:[[`path`,{d:`M12 7v14`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`}]],Store:[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`}]],Truck:[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`}],[`path`,{d:`M15 18H9`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`}],[`circle`,{cx:`17`,cy:`18`,r:`2`}],[`circle`,{cx:`7`,cy:`18`,r:`2`}]],AlertCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],AlertTriangle:[[`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`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]],Info:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]],HelpCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]],CheckCircle:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`}],[`path`,{d:`m9 11 3 3L22 4`}]],XCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],Loader:[[`path`,{d:`M12 2v4`}],[`path`,{d:`m16.2 7.8 2.9-2.9`}],[`path`,{d:`M18 12h4`}],[`path`,{d:`m16.2 16.2 2.9 2.9`}],[`path`,{d:`M12 18v4`}],[`path`,{d:`m4.9 19.1 2.9-2.9`}],[`path`,{d:`M2 12h4`}],[`path`,{d:`m4.9 4.9 2.9 2.9`}]],Loader2:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],CircleDot:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`circle`,{cx:`12`,cy:`12`,r:`1`}]],ShieldCheck:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]],ShieldAlert:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]],Ban:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M4.929 4.929 19.07 19.071`}]],Play:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],Pause:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]],Square:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],SkipBack:[[`path`,{d:`M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z`}],[`path`,{d:`M3 20V4`}]],SkipForward:[[`path`,{d:`M21 4v16`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`}]],Volume2:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`}]],VolumeX:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`}]],Camera:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Image:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]],Film:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 3v18`}],[`path`,{d:`M3 7.5h4`}],[`path`,{d:`M3 12h18`}],[`path`,{d:`M3 16.5h4`}],[`path`,{d:`M17 3v18`}],[`path`,{d:`M17 7.5h4`}],[`path`,{d:`M17 16.5h4`}]],Music:[[`path`,{d:`M9 18V5l12-2v13`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`circle`,{cx:`18`,cy:`16`,r:`3`}]],Mic:[[`path`,{d:`M12 19v3`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`}]],MicOff:[[`path`,{d:`M12 19v3`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`}]],Headphones:[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`}]],File:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}]],FileText:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]],Folder:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]],FolderOpen:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],Database:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],HardDrive:[[`path`,{d:`M10 16h.01`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`}],[`path`,{d:`M21.946 12.013H2.054`}],[`path`,{d:`M6 16h.01`}]],Server:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]],PieChart:[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`}]],BarChart3:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]],LineChart:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`m19 9-5 5-4-4-3 3`}]],TrendingUp:[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]],TrendingDown:[[`path`,{d:`M16 17h6v-6`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`}]],Activity:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]],Menu:[[`path`,{d:`M4 5h16`}],[`path`,{d:`M4 12h16`}],[`path`,{d:`M4 19h16`}]],MoreHorizontal:[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`19`,cy:`12`,r:`1`}],[`circle`,{cx:`5`,cy:`12`,r:`1`}]],MoreVertical:[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`12`,cy:`5`,r:`1`}],[`circle`,{cx:`12`,cy:`19`,r:`1`}]],Grid:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]],List:[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]],Columns:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M12 3v18`}]],Layout:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M9 21V9`}]],Sidebar:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],PanelLeft:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],PanelRight:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]],SlidersHorizontal:[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],Filter:[[`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`}]],SortAsc:[[`path`,{d:`m3 8 4-4 4 4`}],[`path`,{d:`M7 4v16`}],[`path`,{d:`M11 12h4`}],[`path`,{d:`M11 16h7`}],[`path`,{d:`M11 20h10`}]],SortDesc:[[`path`,{d:`m3 16 4 4 4-4`}],[`path`,{d:`M7 20V4`}],[`path`,{d:`M11 4h10`}],[`path`,{d:`M11 8h7`}],[`path`,{d:`M11 12h4`}]],Table:[[`path`,{d:`M12 3v18`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}]],Calendar:[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}]],Clock:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]],Timer:[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`}],[`circle`,{cx:`12`,cy:`14`,r:`8`}]],Hourglass:[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]],User:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]],UserCheck:[[`path`,{d:`m16 11 2 2 4-4`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}]],Settings:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],Sliders:[[`path`,{d:`M10 8h4`}],[`path`,{d:`M12 21v-9`}],[`path`,{d:`M12 8V3`}],[`path`,{d:`M17 16h4`}],[`path`,{d:`M19 12V3`}],[`path`,{d:`M19 21v-5`}],[`path`,{d:`M3 14h4`}],[`path`,{d:`M5 10V3`}],[`path`,{d:`M5 21v-7`}]],Cog:[[`path`,{d:`M11 10.27 7 3.34`}],[`path`,{d:`m11 13.73-4 6.93`}],[`path`,{d:`M12 22v-2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M14 12h8`}],[`path`,{d:`m17 20.66-1-1.73`}],[`path`,{d:`m17 3.34-1 1.73`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`m20.66 17-1.73-1`}],[`path`,{d:`m20.66 7-1.73 1`}],[`path`,{d:`m3.34 17 1.73-1`}],[`path`,{d:`m3.34 7 1.73 1`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`circle`,{cx:`12`,cy:`12`,r:`8`}]],MapPin:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],Map:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`}],[`path`,{d:`M15 5.764v15`}],[`path`,{d:`M9 3.236v15`}]],Globe:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]],Compass:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`}]],Link:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}]],Lock:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]],Unlock:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`}]],Key:[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`}],[`path`,{d:`m21 2-9.6 9.6`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}]],Shield:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]],Eye:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],EyeOff:[[`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`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`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`}],[`path`,{d:`m2 2 20 20`}]],Bookmark:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`}]],Flag:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]],Award:[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`}],[`circle`,{cx:`12`,cy:`8`,r:`6`}]],Target:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`circle`,{cx:`12`,cy:`12`,r:`6`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}]],Zap:[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`}]],Flame:[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]],Coffee:[[`path`,{d:`M10 2v2`}],[`path`,{d:`M14 2v2`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`}],[`path`,{d:`M6 2v2`}]],Lightbulb:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}],[`path`,{d:`M9 18h6`}],[`path`,{d:`M10 22h4`}]],Puzzle:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`}]],Rocket:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`}]],Code:[[`path`,{d:`m16 18 6-6-6-6`}],[`path`,{d:`m8 6-6 6 6 6`}]],Terminal:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],Braces:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`}]],Hash:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]],Wifi:[[`path`,{d:`M12 20h.01`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`}]],WifiOff:[[`path`,{d:`M12 20h.01`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`}],[`path`,{d:`m2 2 20 20`}]],Bluetooth:[[`path`,{d:`m7 7 10 10-5 5V2l5 5L7 17`}]],Battery:[[`path`,{d:`M 22 14 L 22 10`}],[`rect`,{x:`2`,y:`6`,width:`16`,height:`12`,rx:`2`}]],BatteryCharging:[[`path`,{d:`m11 7-3 5h4l-3 5`}],[`path`,{d:`M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935`}],[`path`,{d:`M22 14v-4`}],[`path`,{d:`M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`}]],Power:[[`path`,{d:`M12 2v10`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`}]],Printer:[[`path`,{d:`M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6`}],[`rect`,{x:`6`,y:`14`,width:`12`,height:`8`,rx:`1`}]],QrCode:[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`}],[`path`,{d:`M21 21v.01`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M12 3h.01`}],[`path`,{d:`M12 16v.01`}],[`path`,{d:`M16 12h1`}],[`path`,{d:`M21 12v.01`}],[`path`,{d:`M12 21v-1`}]],Fingerprint:[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]],Gauge:[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]],Sparkles:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]],Sparkle:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}]],Bot:[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]],BotMessageSquare:[[`path`,{d:`M12 6V2H8`}],[`path`,{d:`M15 11v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z`}],[`path`,{d:`M9 11v2`}]],WandSparkles:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`}],[`path`,{d:`m14 7 3 3`}],[`path`,{d:`M5 6v4`}],[`path`,{d:`M19 14v4`}],[`path`,{d:`M10 2v2`}],[`path`,{d:`M7 8H3`}],[`path`,{d:`M21 16h-4`}],[`path`,{d:`M11 3H9`}]],Hand:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`}]],PartyPopper:[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`}],[`path`,{d:`M4 3h.01`}],[`path`,{d:`M22 8h.01`}],[`path`,{d:`M15 2h.01`}],[`path`,{d:`M22 20h.01`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`}]],Smile:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`}]],Brain:[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]],Trophy:[[`path`,{d:`M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978`}],[`path`,{d:`M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978`}],[`path`,{d:`M18 9h1.5a1 1 0 0 0 0-5H18`}],[`path`,{d:`M4 22h16`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`}],[`path`,{d:`M6 9H4.5a1 1 0 0 1 0-5H6`}]],Waves:[[`path`,{d:`M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`}],[`path`,{d:`M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`}],[`path`,{d:`M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`}]],Paperclip:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`}]],Cpu:[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]],ArrowUpRight:[[`path`,{d:`M7 7h10v10`}],[`path`,{d:`M7 17 17 7`}]],ArrowDownRight:[[`path`,{d:`m7 7 10 10`}],[`path`,{d:`M17 7v10H7`}]],ArrowUpLeft:[[`path`,{d:`M7 17V7h10`}],[`path`,{d:`M17 17 7 7`}]],ArrowDownLeft:[[`path`,{d:`M17 7 7 17`}],[`path`,{d:`M17 17H7V7`}]]},Qi=new Map;for(let e of Object.keys(Zi))Qi.set(e.toLowerCase(),e);function $i(e){if(Zi[e])return e;let t=e.replace(/[-_]/g,``).toLowerCase();return Qi.get(t)}function ea(e,t,n){return(0,w.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:e.map(([e,t],n)=>S.createElement(e,{key:n,...t}))})}function ta({name:e,size:t=24,tone:n,children:r,style:i,className:a,"aria-label":o}){let s=n?zr(n):`currentColor`,c=o?{role:`img`,"aria-label":o}:{"aria-hidden":!0},l={display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:t,height:t,color:s,...i};if(r)return(0,w.jsx)(`span`,{className:a,style:l,...c,children:r});if(e){let n=$i(e);if(n)return(0,w.jsx)(`span`,{className:a,style:l,...c,children:ea(Zi[n],t,s)})}return e&&/[^\x00-\x7F]/.test(e)?(0,w.jsx)(`span`,{className:a,...c,style:{...l,fontSize:t*.75,lineHeight:1},children:e}):(0,w.jsx)(`span`,{className:a,...c,style:l,"data-ggui-icon-unknown":e??``})}function na({children:e,href:t,external:n,tone:r,underline:i=`hover`,style:a,className:o,...s}){let c=r?zr(r):`var(--ggui-color-link, var(--ggui-color-primary-600, #0284c7))`,l={always:`underline`,hover:`none`,none:`none`}[i];return(0,w.jsxs)(`a`,{href:t,target:n?`_blank`:void 0,rel:n?`noopener noreferrer`:void 0,className:o,style:{color:c,textDecoration:l,cursor:`pointer`,transition:`color ${z.duration.base} ${z.easing.standard}`,...a},onMouseEnter:e=>{i===`hover`&&(e.target.style.textDecoration=`underline`)},onMouseLeave:e=>{i===`hover`&&(e.target.style.textDecoration=`none`)},...s,children:[e,n&&(0,w.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{marginLeft:`4px`,verticalAlign:`middle`},children:[(0,w.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,w.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,w.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})]})}function ra({children:e,content:t,position:n=`top`,delay:r=200,style:i,className:a}){let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)({top:0,left:0}),u=(0,S.useRef)(null),d=(0,S.useRef)(null),f=()=>{d.current=setTimeout(()=>{s(!0)},r)},p=()=>{d.current&&clearTimeout(d.current),s(!1)};(0,S.useEffect)(()=>{if(o&&u.current){let e=u.current.getBoundingClientRect(),t=0,r=0;switch(n){case`top`:t=e.top-8,r=e.left+e.width/2;break;case`bottom`:t=e.bottom+8,r=e.left+e.width/2;break;case`left`:t=e.top+e.height/2,r=e.left-8;break;case`right`:t=e.top+e.height/2,r=e.right+8}l({top:t,left:r})}},[o,n]),(0,S.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let m=()=>{switch(n){case`top`:return`translateX(-50%) translateY(-100%)`;case`bottom`:return`translateX(-50%)`;case`left`:return`translateX(-100%) translateY(-50%)`;case`right`:return`translateY(-50%)`}};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{ref:u,onMouseEnter:f,onMouseLeave:p,onFocus:f,onBlur:p,className:a,style:{display:`inline-block`,...i},children:e}),o&&(0,w.jsx)(`div`,{role:`tooltip`,style:{position:`fixed`,top:c.top,left:c.left,transform:m(),backgroundColor:`var(--ggui-color-onContainer, #18181b)`,color:`var(--ggui-color-container, #ffffff)`,padding:`6px 10px`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`,zIndex:jr.tooltip,maxWidth:`200px`,pointerEvents:`none`,whiteSpace:`nowrap`},children:t})]})}var ia=(e,t)=>(0,w.jsxs)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,flexDirection:`column`,marginLeft:`4px`,fontSize:`10px`,lineHeight:1,opacity:e?1:.3},children:[(0,w.jsx)(`span`,{style:{opacity:e&&t===`asc`?1:.4},children:`▲`}),(0,w.jsx)(`span`,{style:{opacity:e&&t===`desc`?1:.4},children:`▼`})]});function aa({columns:e,data:t,sortKey:n,sortDirection:r=`asc`,onSort:i,striped:a=!1,hoverable:o=!0,compact:s=!1,bordered:c=!1,caption:l,style:u,className:d}){let[f,p]=(0,S.useState)(null),m=s?`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`:`var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)`,h=e=>{i&&i(e,n===e&&r===`asc`?`desc`:`asc`)},g={padding:m,textAlign:`left`,fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSunken, #52525b)`,textTransform:`uppercase`,letterSpacing:`0.05em`,borderBottom:`2px solid var(--ggui-color-outlineVariant, #e4e4e7)`,whiteSpace:`nowrap`,userSelect:`none`};return(0,w.jsx)(`div`,{className:d,style:{overflowX:`auto`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,border:c?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,...u},children:(0,w.jsxs)(`table`,{role:`table`,style:{width:`100%`,borderCollapse:`collapse`,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSunken, #52525b)`},children:[l&&(0,w.jsx)(`caption`,{style:{padding:m,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSunken, #52525b)`,textAlign:`left`,captionSide:`top`},children:l}),(0,w.jsx)(`thead`,{children:(0,w.jsx)(`tr`,{children:e.map(e=>(0,w.jsx)(`th`,{scope:`col`,"aria-sort":n===e.key?r===`asc`?`ascending`:`descending`:void 0,onClick:e.sortable?()=>h(e.key):void 0,onKeyDown:e.sortable?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),h(e.key))}:void 0,tabIndex:e.sortable?0:void 0,style:{...g,textAlign:e.align||`left`,width:e.width,cursor:e.sortable?`pointer`:`default`},children:(0,w.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`},children:[e.header,e.sortable&&ia(n===e.key,r)]})},e.key))})}),(0,w.jsx)(`tbody`,{children:t.map((t,n)=>(0,w.jsx)(`tr`,{onMouseEnter:o?()=>p(n):void 0,onMouseLeave:o?()=>p(null):void 0,style:{backgroundColor:o&&f===n||a&&n%2==1?`var(--ggui-color-sunken, #fafafa)`:`transparent`,transition:`background-color ${z.duration.fast} ${z.easing.standard}`},children:e.map(e=>(0,w.jsx)(`td`,{style:{padding:m,textAlign:e.align||`left`,borderBottom:`1px solid var(--ggui-color-sunken, #f4f4f5)`,borderRight:c?`1px solid var(--ggui-color-sunken, #f4f4f5)`:void 0},children:e.render?e.render(t[e.key],t,n):t[e.key]},e.key))},n))})]})})}var oa={sm:{padding:`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`},md:{padding:`var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`var(--ggui-spacing-4, 12px) var(--ggui-spacing-6, 24px)`,fontSize:`var(--ggui-font-size-base, 16px)`}};function sa({items:e,activeKey:t,onChange:n,variant:r=`line`,size:i=`md`,fullWidth:a=!1,style:o,className:s}){let c=(0,S.useId)(),[l,u]=(0,S.useState)(e[0]?.key),d=t??l,f=(0,S.useCallback)(e=>{n?n(e):u(e)},[n]),p=e.find(e=>e.key===d),m=(0,S.useRef)(null),h=(0,S.useCallback)(t=>{let n=e.filter(e=>!e.disabled),r=n.findIndex(e=>e.key===d),i;if(t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),i=(r+1)%n.length):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),i=(r-1+n.length)%n.length):t.key===`Home`?(t.preventDefault(),i=0):t.key===`End`&&(t.preventDefault(),i=n.length-1),i!==void 0){let e=n[i];f(e.key),(m.current?.querySelector(`#${CSS.escape(`${c}-tab-${e.key}`)}`))?.focus()}},[e,d,c,f]),g=(e,t)=>{let n={...oa[i],display:`inline-flex`,alignItems:`center`,gap:`var(--ggui-spacing-1, 4px)`,cursor:t?`not-allowed`:`pointer`,opacity:t?.5:1,background:`none`,border:`none`,fontWeight:e?`var(--ggui-font-weight-semibold, 600)`:`var(--ggui-font-weight-medium, 500)`,transition:`color ${z.duration.base} ${z.easing.standard}, background-color ${z.duration.base} ${z.easing.standard}, border-color ${z.duration.base} ${z.easing.standard}`,whiteSpace:`nowrap`,flex:a?1:void 0,justifyContent:a?`center`:void 0};return r===`line`?{...n,color:e?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-onSunken, #52525b)`,borderBottom:e?`2px solid var(--ggui-color-primary-600, #0284c7)`:`2px solid transparent`,marginBottom:`-1px`}:r===`pills`?{...n,color:e?`var(--ggui-color-onPrimary, #ffffff)`:`var(--ggui-color-onSunken, #52525b)`,backgroundColor:e?`var(--ggui-color-primary-600, #0284c7)`:`transparent`,borderRadius:`var(--ggui-shape-radius-md, 6px)`}:{...n,color:e?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-onSunken, #52525b)`,backgroundColor:e?`var(--ggui-color-container, #ffffff)`:`transparent`,border:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:`1px solid transparent`,borderBottom:e?`1px solid var(--ggui-color-container, #ffffff)`:`1px solid transparent`,borderRadius:`var(--ggui-shape-radius-md, 6px) var(--ggui-shape-radius-md, 6px) 0 0`,marginBottom:`-1px`}};return(0,w.jsxs)(`div`,{className:s,style:o,children:[(0,w.jsx)(`div`,{ref:m,role:`tablist`,"aria-orientation":`horizontal`,style:{display:`flex`,gap:r===`pills`?`var(--ggui-spacing-1, 4px)`:`0`,borderBottom:r===`line`||r===`enclosed`?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,backgroundColor:r===`pills`?`var(--ggui-color-sunken, #f4f4f5)`:void 0,borderRadius:r===`pills`?`var(--ggui-shape-radius-lg, 8px)`:void 0,padding:r===`pills`?`var(--ggui-spacing-1, 4px)`:void 0},children:e.map(e=>{let t=e.key===d,n=!!e.disabled;return(0,w.jsxs)(`button`,{role:`tab`,id:`${c}-tab-${e.key}`,"aria-selected":t,"aria-controls":`${c}-panel-${e.key}`,"aria-disabled":n,tabIndex:t?0:-1,onClick:n?void 0:()=>f(e.key),onKeyDown:n?void 0:h,style:g(t,n),children:[e.icon,e.label]},e.key)})}),p&&(0,w.jsx)(`div`,{role:`tabpanel`,id:`${c}-panel-${p.key}`,"aria-labelledby":`${c}-tab-${p.key}`,tabIndex:0,style:{padding:`var(--ggui-spacing-4, 16px) 0`},children:p.content})]})}var ca={fadeIn:`@keyframes ggui-fadeIn {
20
+ from { opacity: 0; }
21
+ to { opacity: 1; }
22
+ }`,fadeOut:`@keyframes ggui-fadeOut {
23
+ from { opacity: 1; }
24
+ to { opacity: 0; }
25
+ }`,slideInUp:`@keyframes ggui-slideInUp {
26
+ from { opacity: 0; transform: translateY(8px); }
27
+ to { opacity: 1; transform: translateY(0); }
28
+ }`,slideInDown:`@keyframes ggui-slideInDown {
29
+ from { opacity: 0; transform: translateY(-8px); }
30
+ to { opacity: 1; transform: translateY(0); }
31
+ }`,scaleIn:`@keyframes ggui-scaleIn {
32
+ from { opacity: 0; transform: scale(0.95); }
33
+ to { opacity: 1; transform: scale(1); }
34
+ }`,scaleOut:`@keyframes ggui-scaleOut {
35
+ from { opacity: 1; transform: scale(1); }
36
+ to { opacity: 0; transform: scale(0.95); }
37
+ }`,flash:`@keyframes ggui-flash {
38
+ 0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
39
+ 100% { background-color: transparent; }
40
+ }`,pulse:`@keyframes ggui-pulse {
41
+ 0%, 100% { opacity: 1; }
42
+ 50% { opacity: 0.6; }
43
+ }`,bounce:`@keyframes ggui-bounce {
44
+ 0% { transform: scale(1); }
45
+ 40% { transform: scale(1.06); }
46
+ 70% { transform: scale(0.98); }
47
+ 100% { transform: scale(1); }
48
+ }`},la={fadeIn:`ggui-fadeIn ${Ci.normal} ${R.easeOut} both`,fadeOut:`ggui-fadeOut ${Ci.normal} ${R.easeIn} both`,slideInUp:`ggui-slideInUp ${Ci.normal} ${R.easeOut} both`,slideInDown:`ggui-slideInDown ${Ci.normal} ${R.easeOut} both`,scaleIn:`ggui-scaleIn ${Ci.normal} ${R.easeOut} both`,scaleOut:`ggui-scaleOut ${Ci.fast} ${R.easeIn} both`,flash:`ggui-flash ${Ci.slow} ${R.easeOut}`,pulse:`ggui-pulse 2s ${R.easeInOut} infinite`,bounce:`ggui-bounce ${Ci.slow} ${R.spring}`},ua={textIn:`@keyframes ggui-thinking-text-in {
49
+ from { opacity: 0; transform: translateY(6px); }
50
+ to { opacity: 1; transform: translateY(0); }
51
+ }`,textOut:`@keyframes ggui-thinking-text-out {
52
+ from { opacity: 1; transform: translateY(0); }
53
+ to { opacity: 0; transform: translateY(-6px); }
54
+ }`,shimmer:`@keyframes ggui-thinking-shimmer {
55
+ 0% { transform: translateX(-100%); }
56
+ 100% { transform: translateX(200%); }
57
+ }`,pulse:`@keyframes ggui-thinking-pulse {
58
+ 0%, 100% { opacity: 0.5; }
59
+ 50% { opacity: 1; }
60
+ }`,wave:`@keyframes ggui-thinking-wave {
61
+ 0% { background-position: -200% 0; }
62
+ 100% { background-position: 200% 0; }
63
+ }`,breathe:`@keyframes ggui-thinking-breathe {
64
+ 0%, 100% { transform: scale(1); opacity: 0.6; }
65
+ 50% { transform: scale(1.02); opacity: 1; }
66
+ }`,cursor:`@keyframes ggui-thinking-cursor {
67
+ 0%, 100% { border-right-color: currentColor; }
68
+ 50% { border-right-color: transparent; }
69
+ }`},da={textIn:`ggui-thinking-text-in ${Ci.slow} ${R.easeOut} forwards`,textOut:`ggui-thinking-text-out ${Ci.normal} ${R.easeIn} forwards`,shimmer:`ggui-thinking-shimmer 3s ${R.easeInOut} infinite`,pulse:`ggui-thinking-pulse 2s ${R.easeInOut} infinite`,wave:`ggui-thinking-wave 2s ${R.linear} infinite`,breathe:`ggui-thinking-breathe 3s ${R.easeInOut} infinite`,cursor:`ggui-thinking-cursor 1s step-end infinite`};da.shimmer,da.pulse,da.textIn,da.textOut,[ua.shimmer,ua.pulse,ua.textIn,ua.textOut].join(`
70
+ `),da.wave,da.pulse,da.textIn,da.textOut,[ua.wave,ua.pulse,ua.textIn,ua.textOut].join(`
71
+ `),da.pulse,da.breathe,da.textIn,da.textOut,[ua.pulse,ua.breathe,ua.textIn,ua.textOut].join(`
72
+ `),da.breathe,da.pulse,da.textIn,da.textOut,[ua.breathe,ua.pulse,ua.textIn,ua.textOut].join(`
73
+ `),da.pulse,`${Ci.normal}${R.easeOut}`,`${Ci.fast}${R.easeIn}`,[ua.pulse,ca.fadeIn,ca.fadeOut].join(`
74
+ `);var fa=`@media (prefers-reduced-motion: reduce) {
75
+ *, *::before, *::after {
76
+ animation-duration: 0.01ms !important;
77
+ animation-iteration-count: 1 !important;
78
+ transition-duration: 0.01ms !important;
79
+ }
80
+ }`,pa={info:{bg:`var(--ggui-color-elevated, #ecfeff)`,border:`var(--ggui-color-info-200, #a5f3fc)`,text:`var(--ggui-color-info-800, #155e75)`,icon:`var(--ggui-color-info-500, #06b6d4)`},success:{bg:`var(--ggui-color-elevated, #f0fdf4)`,border:`var(--ggui-color-success-200, #bbf7d0)`,text:`var(--ggui-color-success-800, #166534)`,icon:`var(--ggui-color-success-500, #22c55e)`},warning:{bg:`var(--ggui-color-elevated, #fffbeb)`,border:`var(--ggui-color-warning-200, #fde68a)`,text:`var(--ggui-color-warning-800, #92400e)`,icon:`var(--ggui-color-warning-500, #f59e0b)`},error:{bg:`var(--ggui-color-elevated, #fef2f2)`,border:`var(--ggui-color-error-200, #fecaca)`,text:`var(--ggui-color-error-800, #991b1b)`,icon:`var(--ggui-color-error-500, #ef4444)`}},ma={info:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z`,clipRule:`evenodd`})}),success:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,clipRule:`evenodd`})}),warning:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),error:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,clipRule:`evenodd`})})};function ha({message:e,variant:t=`info`,title:n,duration:r=5e3,onClose:i,visible:a=!0,style:o,className:s}){if((0,S.useEffect)(()=>{if(!a||r===0||!i)return;let e=setTimeout(i,r);return()=>clearTimeout(e)},[a,r,i]),!a)return(0,w.jsx)(`div`,{role:`alert`,"aria-live":`assertive`,className:s,style:{position:`absolute`,width:`1px`,height:`1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}});let c=pa[t],l={display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,padding:`var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,backgroundColor:c.bg,border:`1px solid ${c.border}`,color:c.text,boxShadow:`var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1))`,minWidth:`280px`,maxWidth:`420px`,animation:la.slideInUp,...o};return(0,w.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:s,style:l,children:[(0,w.jsx)(`div`,{style:{color:c.icon,flexShrink:0,marginTop:`2px`},children:ma[t]}),(0,w.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`2px`},children:[n&&(0,w.jsx)(`div`,{style:{fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-sm, 14px)`},children:n}),(0,w.jsx)(`div`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`},children:e})]}),i&&(0,w.jsx)(`button`,{onClick:i,"aria-label":`Dismiss notification`,style:{background:`none`,border:`none`,padding:`4px`,cursor:`pointer`,color:c.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:`28px`,minHeight:`28px`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:(0,w.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})})})]})}var ga=e=>(0,w.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,style:{transition:`transform ${z.duration.base} ${z.easing.standard}`,transform:e?`rotate(180deg)`:`rotate(0deg)`,flexShrink:0},children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z`,clipRule:`evenodd`})});function _a({items:e,expandedKeys:t,onChange:n,multiple:r=!1,variant:i=`default`,style:a,className:o}){let s=(0,S.useId)(),[c,l]=(0,S.useState)([]),u=t??c,d=e=>{let t;t=u.includes(e)?u.filter(t=>t!==e):r?[...u,e]:[e],n?n(t):l(t)},f={display:`flex`,flexDirection:`column`,gap:i===`separated`?`var(--ggui-spacing-2, 8px)`:`0`,...a},p=(e,t)=>i===`separated`?{border:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,overflow:`hidden`}:i===`bordered`?{borderLeft:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderRight:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTop:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTopLeftRadius:e?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderTopRightRadius:e?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderBottomLeftRadius:t?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderBottomRightRadius:t?`var(--ggui-shape-radius-lg, 8px)`:void 0}:{borderBottom:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTop:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0};return(0,w.jsx)(`div`,{className:o,style:f,children:e.map((t,n)=>{let r=u.includes(t.key),i=!!t.disabled,a=n===0,o=n===e.length-1;return(0,w.jsxs)(`div`,{style:p(a,o),children:[(0,w.jsx)(`h3`,{style:{margin:0},children:(0,w.jsxs)(`button`,{id:`${s}-header-${t.key}`,"aria-expanded":r,"aria-controls":`${s}-panel-${t.key}`,"aria-disabled":i,onClick:i?void 0:()=>d(t.key),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,padding:`var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)`,background:`none`,border:`none`,cursor:i?`not-allowed`:`pointer`,opacity:i?.5:1,fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onContainer, #18181b)`,textAlign:`left`,transition:`background-color ${z.duration.fast} ${z.easing.standard}`},children:[(0,w.jsx)(`span`,{children:t.title}),ga(r)]})}),(0,w.jsx)(`div`,{id:`${s}-panel-${t.key}`,role:`region`,"aria-labelledby":`${s}-header-${t.key}`,hidden:!r,style:{overflow:`hidden`},children:r&&(0,w.jsx)(`div`,{style:{padding:`0 var(--ggui-spacing-4, 16px) var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSunken, #52525b)`,lineHeight:`var(--ggui-font-lineHeight-normal, 1.5)`},children:t.content})})]},t.key)})})}var va=`ggui-motion-keyframes`;function ya(){return(0,S.useEffect)(()=>{if(document.getElementById(va))return;let e=document.createElement(`style`);return e.id=va,e.textContent=[...Object.values(ca),fa].join(`
81
+
82
+ `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function ba(){let[e,t]=(0,S.useState)(()=>typeof window>`u`||!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,S.useEffect)(()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=e=>t(!e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),{motionEnabled:e}}function xa(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(!0);return(0,S.useEffect)(()=>{if(r.current){r.current=!1;return}n(e=>e+1)},[e]),t}var Sa={};Ne(Sa,{Autocomplete:()=>Aa,Breadcrumb:()=>ja,Dropdown:()=>ka,EmptyState:()=>Na,FormField:()=>wa,Markdown:()=>go,MarkdownInline:()=>_o,MenuItem:()=>Ta,Pagination:()=>Ma,SearchField:()=>Ca,Stat:()=>Pa,Stepper:()=>Ba,Tag:()=>Oa,renderRichTextInlines:()=>mo});function Ca({value:e,onChange:t,onSearch:n,placeholder:r=`Search...`,showButton:i=!1,buttonText:a=`Search`,loading:o,disabled:s,size:c=`md`,style:l,className:u}){let[d,f]=(0,S.useState)(``),p=e===void 0?d:e,m=n=>{e===void 0&&f(n),t?.(n)},h=()=>{n?.(p)},g=e=>{e.key===`Enter`&&!s&&h()},_={sm:`sm`,md:`md`,lg:`md`};return(0,w.jsxs)(`div`,{className:u,style:{display:`flex`,gap:`8px`,alignItems:`flex-end`,...l},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,w.jsx)(`div`,{style:{position:`absolute`,left:`12px`,top:`50%`,transform:`translateY(-50%)`,color:`var(--ggui-color-neutral-400, #9ca3af)`,pointerEvents:`none`,display:`flex`,alignItems:`center`},children:o?(0,w.jsx)(Si,{size:16}):(0,w.jsx)(ta,{name:`search`,size:16})}),(0,w.jsx)(`input`,{type:`search`,value:p,onChange:e=>m(e.target.value),onKeyDown:g,placeholder:r,disabled:s||o,style:{width:`100%`,padding:c===`sm`?`6px 10px 6px 36px`:c===`lg`?`12px 14px 12px 40px`:`10px 12px 10px 38px`,paddingLeft:`36px`,fontSize:c===`lg`?`16px`:`14px`,borderRadius:`6px`,border:`1px solid var(--ggui-color-outline, #d1d5db)`,backgroundColor:s?`var(--ggui-color-sunken, #f9fafb)`:`var(--ggui-color-container, #ffffff)`,color:`var(--ggui-color-onContainer, #111827)`,outline:`none`,boxSizing:`border-box`}})]}),i&&(0,w.jsx)(Ei,{onClick:h,disabled:s||o,size:_[c],loading:o,children:a})]})}function wa({label:e,children:t,error:n,helperText:r,required:i,description:a,style:o,className:s}){let c=!!n;return(0,w.jsxs)(`div`,{className:s,style:{display:`flex`,flexDirection:`column`,gap:`4px`,...o},children:[(0,w.jsxs)(`label`,{style:{fontSize:I.sm,fontWeight:L.medium,color:`var(--ggui-color-onContainer, #374151)`},children:[e,i&&(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),a&&(0,w.jsx)(`span`,{style:{fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`,marginBottom:`4px`},children:a}),t,(n||r)&&(0,w.jsx)(`span`,{style:{fontSize:I.xs,color:c?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-neutral-500, #6b7280)`},children:n||r})]})}function Ta({label:e,icon:t,rightElement:n,onClick:r,disabled:i,active:a,danger:o,style:s,className:c}){let l=o?`var(--ggui-color-error-600, #dc2626)`:`var(--ggui-color-onElevated, #3f3f46)`,u=o?`var(--ggui-color-error-50, #fef2f2)`:`var(--ggui-color-sunken, #f4f4f5)`,d=o?`var(--ggui-color-error-100, #fee2e2)`:`var(--ggui-color-primary-50, #f0f9ff)`;return(0,w.jsxs)(`button`,{onClick:i?void 0:r,disabled:i,className:c,style:{display:`flex`,alignItems:`center`,gap:`8px`,width:`100%`,padding:`8px 12px`,border:`none`,borderRadius:kr.md,backgroundColor:a?d:`transparent`,color:i?`var(--ggui-color-neutral-400, #9ca3af)`:l,fontSize:I.sm,fontWeight:a?L.medium:L.normal,textAlign:`left`,cursor:i?`not-allowed`:`pointer`,transition:`background-color ${z.duration.fast} ${z.easing.standard}`,...s},onMouseEnter:e=>{!i&&!a&&(e.target.style.backgroundColor=u)},onMouseLeave:e=>{!i&&!a&&(e.target.style.backgroundColor=`transparent`)},children:[t&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0},children:t}),(0,w.jsx)(`span`,{style:{flex:1},children:e}),n&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0,color:`var(--ggui-color-neutral-400, #9ca3af)`},children:n})]})}var Ea={default:{backgroundColor:`var(--ggui-color-sunken, #f3f4f6)`,color:`var(--ggui-color-onSunken, #374151)`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},primary:{backgroundColor:`var(--ggui-color-primaryContainer, #f0f9ff)`,color:`var(--ggui-color-onPrimaryContainer, #0369a1)`,border:`1px solid var(--ggui-color-primary-200, #bae6fd)`},success:{backgroundColor:`var(--ggui-color-successContainer, #f0fdf4)`,color:`var(--ggui-color-onSuccessContainer, #15803d)`,border:`1px solid var(--ggui-color-success-200, #bbf7d0)`},warning:{backgroundColor:`var(--ggui-color-warningContainer, #fffbeb)`,color:`var(--ggui-color-onWarningContainer, #b45309)`,border:`1px solid var(--ggui-color-warning-200, #fde68a)`},error:{backgroundColor:`var(--ggui-color-errorContainer, #fef2f2)`,color:`var(--ggui-color-onErrorContainer, #b91c1c)`,border:`1px solid var(--ggui-color-error-200, #fecaca)`},info:{backgroundColor:`var(--ggui-color-infoContainer, #ecfeff)`,color:`var(--ggui-color-onInfoContainer, #0e7490)`,border:`1px solid var(--ggui-color-info-200, #a5f3fc)`}},Da={sm:{padding:`2px 6px`,fontSize:I.xs,gap:`4px`},md:{padding:`4px 8px`,fontSize:I.xs,gap:`6px`},lg:{padding:`6px 10px`,fontSize:I.sm,gap:`6px`}};function Oa({children:e,variant:t=`default`,size:n=`md`,closable:r,onClose:i,icon:a,style:o,className:s}){let c=Da[n];return(0,w.jsxs)(`span`,{className:s,style:{display:`inline-flex`,alignItems:`center`,gap:c.gap,padding:c.padding,fontSize:c.fontSize,fontWeight:L.medium,borderRadius:`6px`,...Ea[t],...o},children:[a&&(0,w.jsx)(`span`,{style:{display:`flex`},children:a}),e,r&&(0,w.jsx)(`button`,{onClick:i,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:0,border:`none`,background:`none`,color:`inherit`,cursor:`pointer`,opacity:.7,marginLeft:`2px`},"aria-label":`Remove`,children:(0,w.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`currentColor`,children:(0,w.jsx)(`path`,{d:`M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z`})})})]})}function ka({trigger:e,options:t,value:n,onChange:r,placement:i=`bottom-start`,disabled:a,style:o,className:s}){let[c,l]=(0,S.useState)(!1),u=(0,S.useRef)(null);(0,S.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&l(!1)};if(c)return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[c]),(0,S.useEffect)(()=>{let e=e=>{e.key===`Escape`&&l(!1)};if(c)return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[c]);let d=e=>{r?.(e),l(!1)},f=()=>{switch(i){case`bottom-start`:return{top:`100%`,left:0,marginTop:`4px`};case`bottom-end`:return{top:`100%`,right:0,marginTop:`4px`};case`top-start`:return{bottom:`100%`,left:0,marginBottom:`4px`};case`top-end`:return{bottom:`100%`,right:0,marginBottom:`4px`};default:return{top:`100%`,left:0,marginTop:`4px`}}};return(0,w.jsxs)(`div`,{ref:u,className:s,style:{position:`relative`,display:`inline-block`,...o},children:[(0,w.jsx)(`div`,{onClick:()=>!a&&l(!c),style:{cursor:a?`not-allowed`:`pointer`},children:e}),c&&(0,w.jsx)(`div`,{style:{position:`absolute`,...f(),minWidth:`160px`,backgroundColor:`var(--ggui-color-elevated, #ffffff)`,color:`var(--ggui-color-onElevated, #18181b)`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:kr.lg,boxShadow:Ar.lg,zIndex:jr.dropdown,padding:`4px`},children:t.map(e=>(0,w.jsx)(Ta,{label:e.label,icon:e.icon,onClick:()=>d(e.value),disabled:e.disabled,active:n===e.value,danger:e.danger},e.value))})]})}function Aa({value:e=``,onChange:t,onSelect:n,options:r,placeholder:i,label:a,loading:o,disabled:s,error:c,noResultsText:l=`No results found`,style:u,className:d}){let[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(-1),g=(0,S.useRef)(null),_=(0,S.useMemo)(()=>{if(!e)return r;let t=e.toLowerCase();return r.filter(e=>e.label.toLowerCase().includes(t)||e.value.toLowerCase().includes(t))},[r,e]);(0,S.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&p(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let v=e=>{t?.(e),p(!0),h(-1)},y=e=>{t?.(e.label),n?.(e),p(!1),h(-1)},b=e=>{if(!f){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&p(!0);return}switch(e.key){case`ArrowDown`:e.preventDefault(),h(e=>e<_.length-1?e+1:e);break;case`ArrowUp`:e.preventDefault(),h(e=>e>0?e-1:e);break;case`Enter`:e.preventDefault(),m>=0&&_[m]&&y(_[m]);break;case`Escape`:p(!1),h(-1)}};return(0,w.jsxs)(`div`,{ref:g,className:d,style:{position:`relative`,...u},children:[(0,w.jsx)(`div`,{onKeyDown:b,children:(0,w.jsx)(Oi,{label:a,value:e,onChange:v,onFocus:()=>p(!0),placeholder:i,disabled:s,error:c})}),f&&(0,w.jsx)(`div`,{style:{position:`absolute`,top:`100%`,left:0,right:0,marginTop:`4px`,backgroundColor:`var(--ggui-color-elevated, #ffffff)`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:kr.lg,boxShadow:Ar.lg,zIndex:jr.dropdown,maxHeight:`240px`,overflow:`auto`},children:o?(0,w.jsx)(`div`,{style:{padding:`12px`,display:`flex`,justifyContent:`center`},children:(0,w.jsx)(Si,{size:20})}):_.length===0?(0,w.jsx)(`div`,{style:{padding:`12px`,textAlign:`center`,color:`var(--ggui-color-neutral-500, #6b7280)`,fontSize:I.sm},children:l}):_.map((e,t)=>(0,w.jsxs)(`div`,{onClick:()=>!e.disabled&&y(e),style:{padding:`8px 12px`,cursor:e.disabled?`not-allowed`:`pointer`,backgroundColor:m===t?`var(--ggui-color-sunken, #f3f4f6)`:`transparent`,color:e.disabled?`var(--ggui-color-neutral-400, #9ca3af)`:`var(--ggui-color-onElevated, #111827)`,fontSize:I.sm,display:`flex`,alignItems:`center`,gap:`8px`},onMouseEnter:()=>h(t),children:[e.icon&&(0,w.jsx)(`span`,{style:{flexShrink:0},children:e.icon}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(`div`,{children:e.label}),e.description&&(0,w.jsx)(`div`,{style:{fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`},children:e.description})]})]},e.value))})]})}function ja({items:e,separator:t=`/`,onItemClick:n,style:r,className:i}){return(0,w.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:i,style:{display:`flex`,alignItems:`center`,gap:`8px`,fontSize:I.sm,...r},children:e.map((r,i)=>{let a=i===e.length-1;return(0,w.jsxs)(S.Fragment,{children:[i>0&&(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-neutral-400, #9ca3af)`},children:t}),r.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,alignItems:`center`,color:a?`var(--ggui-color-onContainer, #111827)`:`var(--ggui-color-neutral-500, #6b7280)`},children:r.icon}),a?(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-onContainer, #111827)`,fontWeight:500},"aria-current":`page`,children:r.label}):r.href?(0,w.jsx)(na,{href:r.href,tone:`muted`,underline:`hover`,onClick:e=>{n&&(e.preventDefault(),n(r,i))},children:r.label}):(0,w.jsx)(`button`,{onClick:()=>n?.(r,i),style:{background:`none`,border:`none`,padding:0,color:`var(--ggui-color-neutral-500, #6b7280)`,cursor:`pointer`,fontSize:`inherit`},children:r.label})]},i)})})}function Ma({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!0,maxVisible:i=5,size:a=`md`,disabled:o,style:s,className:c}){let l=()=>{let n=[];if(t<=i)for(let e=1;e<=t;e++)n.push(e);else{n.push(1);let r=Math.floor((i-3)/2),a=Math.max(2,e-r),o=Math.min(t-1,e+r);e<=r+2&&(o=Math.min(t-1,i-2)),e>=t-r-1&&(a=Math.max(2,t-i+3)),a>2&&n.push(`ellipsis`);for(let e=a;e<=o;e++)n.push(e);o<t-1&&n.push(`ellipsis`),n.push(t)}return n},u=a===`sm`?`xs`:a===`lg`?`md`:`sm`,d=a===`sm`?14:a===`lg`?20:16,f=({page:e,active:t})=>(0,w.jsx)(`button`,{onClick:()=>!o&&n?.(e),disabled:o,style:{minWidth:a===`sm`?`28px`:a===`lg`?`40px`:`32px`,height:a===`sm`?`28px`:a===`lg`?`40px`:`32px`,padding:`0 8px`,border:`none`,borderRadius:`6px`,backgroundColor:t?`var(--ggui-color-primary-600, #0284c7)`:`transparent`,color:t?`var(--ggui-color-onPrimary, #ffffff)`:`var(--ggui-color-onContainer, #374151)`,fontSize:a===`sm`?I.xs:I.sm,fontWeight:t?L.medium:L.normal,cursor:o?`not-allowed`:`pointer`,opacity:o?.5:1,transition:`all ${z.duration.fast} ${z.easing.standard}`},children:e});return(0,w.jsxs)(`nav`,{"aria-label":`Pagination`,className:c,style:{display:`flex`,alignItems:`center`,gap:`4px`,...s},children:[r&&(0,w.jsxs)(Ei,{variant:`ghost`,size:u,onClick:()=>n?.(1),disabled:o||e===1,"aria-label":`First page`,children:[(0,w.jsx)(ta,{name:`chevron-left`,size:d}),(0,w.jsx)(ta,{name:`chevron-left`,size:d,style:{marginLeft:`-8px`}})]}),(0,w.jsx)(Ei,{variant:`ghost`,size:u,onClick:()=>n?.(e-1),disabled:o||e===1,"aria-label":`Previous page`,children:(0,w.jsx)(ta,{name:`chevron-left`,size:d})}),l().map((t,n)=>t===`ellipsis`?(0,w.jsx)(`span`,{style:{padding:`0 4px`,color:`var(--ggui-color-neutral-400, #9ca3af)`},children:`...`},`ellipsis-${n}`):(0,w.jsx)(f,{page:t,active:t===e},t)),(0,w.jsx)(Ei,{variant:`ghost`,size:u,onClick:()=>n?.(e+1),disabled:o||e===t,"aria-label":`Next page`,children:(0,w.jsx)(ta,{name:`chevron-right`,size:d})}),r&&(0,w.jsxs)(Ei,{variant:`ghost`,size:u,onClick:()=>n?.(t),disabled:o||e===t,"aria-label":`Last page`,children:[(0,w.jsx)(ta,{name:`chevron-right`,size:d}),(0,w.jsx)(ta,{name:`chevron-right`,size:d,style:{marginLeft:`-8px`}})]})]})}function Na({icon:e,title:t,description:n,action:r,style:i,className:a}){let o={textAlign:`center`,padding:`var(--ggui-spacing-xl, 32px)`,...i};return(0,w.jsxs)(ri,{align:`center`,gap:`sm`,className:a,style:o,children:[e!==void 0&&(typeof e==`string`?(0,w.jsx)(ta,{name:e,size:40,tone:`subtle`}):e),(0,w.jsx)(xi,{level:3,children:t}),n!==void 0&&(0,w.jsx)(hi,{tone:`muted`,children:n}),r!==void 0&&(0,w.jsx)(`div`,{style:{marginTop:`var(--ggui-spacing-sm, 8px)`},children:r})]})}function Pa({label:e,value:t,delta:n,trend:r=`neutral`,icon:i,style:a,className:o}){let s=r===`up`?`success`:r===`down`?`error`:`muted`;return(0,w.jsxs)(ri,{gap:`xs`,className:o,style:a,children:[(0,w.jsxs)(ii,{gap:`xs`,align:`center`,children:[i!==void 0&&(typeof i==`string`?(0,w.jsx)(ta,{name:i,size:16,tone:`muted`}):i),(0,w.jsx)(hi,{size:`xs`,weight:`semibold`,caps:!0,tone:`muted`,children:e})]}),(0,w.jsxs)(ii,{gap:`sm`,align:`end`,children:[(0,w.jsx)(hi,{size:`3xl`,weight:`bold`,children:t}),n!==void 0&&(0,w.jsx)(hi,{size:`sm`,weight:`semibold`,tone:s,children:n})]})]})}var Fa=28;function Ia(e,t){return e<t?`completed`:e===t?`current`:`upcoming`}var La={completed:{backgroundColor:`var(--ggui-color-primary-100, #e0f2fe)`,border:`1px solid var(--ggui-color-primary-300, #7dd3fc)`,color:`var(--ggui-color-primary-700, #0369a1)`},current:{backgroundColor:`var(--ggui-color-primary-600, #0284c7)`,border:`1px solid var(--ggui-color-primary-600, #0284c7)`,color:`var(--ggui-color-onPrimary, #ffffff)`},upcoming:{backgroundColor:`var(--ggui-color-sunken, #fafafa)`,border:`1px solid var(--ggui-color-outline, #d4d4d8)`,color:`var(--ggui-color-onSunken, #52525b)`}};function Ra({index:e,state:t}){return(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{width:Fa,height:Fa,borderRadius:`50%`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxSizing:`border-box`,transition:`background-color ${z.duration.base} ${z.easing.standard}, border-color ${z.duration.base} ${z.easing.standard}, color ${z.duration.base} ${z.easing.standard}`,...La[t]},children:t===`completed`?(0,w.jsx)(ta,{name:`check`,size:16,tone:`inherit`}):(0,w.jsx)(hi,{is:`span`,size:`sm`,weight:`semibold`,tone:`inherit`,children:e+1})})}function za({label:e,state:t}){return(0,w.jsx)(hi,{is:`span`,size:`sm`,weight:t===`current`?`semibold`:`normal`,tone:t===`upcoming`?`muted`:`default`,children:e})}function Ba({steps:e,current:t,orientation:n=`horizontal`,onStepClick:r,style:i,className:a}){let o=(e,n)=>{let i=Ia(n,t),a=(0,w.jsxs)(ii,{gap:`sm`,align:`center`,children:[(0,w.jsx)(Ra,{index:n,state:i}),(0,w.jsx)(za,{label:e,state:i})]});return r===void 0?(0,w.jsx)(`span`,{"aria-current":i===`current`?`step`:void 0,children:a}):(0,w.jsx)(`button`,{type:`button`,onClick:()=>r(n),"aria-current":i===`current`?`step`:void 0,style:{background:`none`,border:`none`,padding:0,margin:0,font:`inherit`,textAlign:`inherit`,cursor:`pointer`},children:a})};return n===`vertical`?(0,w.jsx)(`nav`,{"aria-label":`Progress`,className:a,style:i,children:(0,w.jsx)(ri,{gap:`none`,align:`start`,children:e.map((e,t)=>(0,w.jsxs)(ri,{gap:`none`,align:`start`,children:[t>0&&(0,w.jsx)(`span`,{style:{width:Fa,height:16,display:`inline-flex`,justifyContent:`center`},children:(0,w.jsx)(ui,{orientation:`vertical`,margin:0})}),o(e,t)]},t))})}):(0,w.jsx)(`nav`,{"aria-label":`Progress`,className:a,style:i,children:(0,w.jsx)(ii,{gap:`sm`,align:`center`,children:e.map((e,t)=>(0,w.jsxs)(ii,{gap:`sm`,align:`center`,style:t>0?{flex:1}:void 0,children:[t>0&&(0,w.jsx)(ui,{style:{flex:1,minWidth:16,margin:0}}),o(e,t)]},t))})})}var Va=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;function Ha(e){return Va.test(e)?e:void 0}function Ua(e){let t=new Set;for(let n of e)n>0&&t.add(n-1);return t}function Wa(e){return e===void 0||e===` `||e===` `||e===`
83
+ `}function Ga(e){return e!==void 0&&/[A-Za-z0-9]/.test(e)}function Ka(e,t,n){return Wa(n)?!1:e===`_`||e===`__`?!Ga(t):!0}function qa(e,t,n){return Wa(t)?!1:e===`_`||e===`__`?!Ga(n):!0}var Ja=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`);function Ya(e,t,n){let r=[],i=``,a=()=>{i.length>0&&(r.push({type:`text`,text:i}),i=``)},o=t;for(;o<e.length;){let t=e[o];if(t===void 0)break;if(t===`\\`){let n=e[o+1];if(n!==void 0&&Ja.has(n)){i+=n,o+=2;continue}i+=t,o+=1;continue}if(t===`
84
+ `){a(),r.push({type:`break`}),o+=1;continue}if(t==="`"){a();let t=e.indexOf("`",o+1);if(t===-1){r.push({type:`code`,code:e.slice(o+1),closed:!1}),o=e.length;continue}r.push({type:`code`,code:e.slice(o+1,t),closed:!0}),o=t+1;continue}if(t===`*`||t===`_`){let s=e.slice(o,o+2),c=s===`**`||s===`__`?s:void 0,l=t,u=o>0?e[o-1]:void 0,d=1;for(;e[o+d]===t;)d++;let f=e[o+d],p=n.indexOf(`]`),m=p===-1?n.length-1:p-1,h=new Set,g=d;for(let e=m;e>=0;e--){let r=n[e];if(r!==void 0&&r[0]===t&&!(r.length>g)&&qa(r,u,f)&&(h.add(e),g-=r.length,g===0))break}if(h.size>0)return a(),{children:r,closedBy:Math.max(...h),closedIdxs:h,runConsumed:d-g,pos:o};let _=c??l,v=e[o+_.length];if(Ka(_,u,v)){a();let t=Ya(e,o+_.length,[_,...n]),i=_===`**`||_===`__`?{type:`strong`,children:t.children,closed:t.closedIdxs.has(0)}:{type:`em`,children:t.children,closed:t.closedIdxs.has(0)};if(r.push(i),t.closedBy===0){o=t.pos+t.runConsumed;continue}if(t.closedBy===-1){o=t.pos;continue}return{children:r,closedBy:t.closedBy-1,closedIdxs:Ua(t.closedIdxs),runConsumed:t.runConsumed,pos:t.pos}}i+=_,o+=_.length;continue}if(t===`[`){let t=Ya(e,o+1,[`]`,...n]);if(t.closedBy>0){i+=`[`,o+=1;continue}if(t.closedBy===-1){a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:``,closed:!1}),o=t.pos;continue}let s=t.pos+1,c=e[s];if(c===`(`){let n=e.indexOf(`)`,s+1);if(n===-1){let n=e.slice(s+1);a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:n,closed:!1}),o=e.length;continue}let i=e.slice(s+1,n).trim().split(/\s+/)[0]??``;a(),r.push({type:`link`,children:t.children,href:Ha(i),rawHref:i,closed:!0}),o=n+1;continue}if(c===void 0){a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:``,closed:!1}),o=s;continue}i+=`[`,o+=1;continue}if(t===`]`&&n.includes(`]`)){let e=n.indexOf(`]`);return a(),{children:r,closedBy:e,closedIdxs:new Set([e]),runConsumed:1,pos:o}}i+=t,o+=1}return a(),{children:r,closedBy:-1,closedIdxs:new Set,runConsumed:0,pos:o}}function Xa(e){return Ya(e,0,[]).children}var Za=/^```+\s*(\S*)\s*$/,Qa=/^```+\s*$/,$a=/^(#{1,6})\s+(.*)$/,eo=/^\s*[-*+]\s+(.*)$/,to=/^\s*(\d{1,9})[.)]\s+(.*)$/,no=/^:?-+:?$/;function ro(e){let t=[],n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];if(a===`\\`&&o!==void 0){n+=a+o,i+=1;continue}if(a===`|`){r=!0,t.push(n),n=``;continue}n+=a}if(t.push(n),!r)return;let i=t.map(e=>e.trim());return i[0]===``&&e.trimStart().startsWith(`|`)&&i.shift(),i.length>0&&i[i.length-1]===``&&e.trimEnd().endsWith(`|`)&&i.pop(),i}function io(e,t){let n=ro(e);if(n===void 0||n.length!==t)return;let r=[];for(let e of n){if(!no.test(e))return;let t=e.startsWith(`:`),n=e.endsWith(`:`);r.push(t&&n?`center`:t?`left`:n?`right`:void 0)}return r}function ao(e,t){let n=[];for(let r=0;r<t;r++){let t=(e[r]??``).replace(/\\\|/g,`|`);n.push({children:Ya(t,0,[]).children})}return{cells:n}}function oo(e){let t=[],n=e.split(`
85
+ `),r=[],i,a=()=>{r.length>0&&(t.push({type:`paragraph`,children:Ya(r.join(`
86
+ `),0,[]).children}),r=[])},o=()=>{i!==void 0&&(t.push({type:`list`,ordered:i.ordered,start:i.start,items:i.items}),i=void 0)};for(let e=0;e<n.length;e++){let s=n[e];if(s===void 0)continue;let c=s.match(Za);if(c!==null){a(),o();let r=c[1]!==void 0&&c[1].length>0?c[1]:void 0,i=[],s=!1,l=e+1;for(;l<n.length;l++){let e=n[l];if(e!==void 0&&Qa.test(e)){s=!0;break}i.push(e??``)}t.push({type:`code-fence`,code:i.join(`
87
+ `),lang:r,closed:s}),e=l;continue}if(s.trim().length===0){a(),o();continue}let l=s.match($a);if(l!==null&&l[1]!==void 0){a(),o();let e=l[1].length;t.push({type:`heading`,level:e,children:Ya(l[2]??``,0,[]).children});continue}let u=s.match(to),d=u===null?s.match(eo):null;if(u!==null||d!==null){a();let e=u!==null,t=(e?u[2]:d?.[1])??``;i!==void 0&&i.ordered!==e&&o(),i===void 0&&(i={ordered:e,start:e&&u[1]!==void 0?parseInt(u[1],10):void 0,items:[]}),i.items.push({children:Ya(t,0,[]).children});continue}let f=ro(s);if(f!==void 0&&f.length>0){let r=n[e+1],i=r===void 0?void 0:io(r,f.length);if(i!==void 0){a(),o();let r=f.length,s=[],c=e+2;for(;c<n.length;c++){let e=n[c],t=e===void 0||e.trim().length===0?void 0:ro(e);if(t===void 0)break;s.push(ao(t,r))}t.push({type:`table`,align:i,header:ao(f,r),rows:s}),e=c-1;continue}}o(),r.push(s)}return a(),o(),t}var so={fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,fontSize:`0.9em`,background:`var(--ggui-color-sunken, rgba(0,0,0,0.06))`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,padding:`0.1em 0.35em`},co={fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,fontSize:`var(--ggui-font-size-sm, 14px)`,background:`var(--ggui-color-sunken, rgba(0,0,0,0.06))`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,padding:`var(--ggui-spacing-sm, 12px)`,overflowX:`auto`,whiteSpace:`pre`,margin:0},lo={color:`var(--ggui-color-primary, #4f46e5)`,textDecoration:`none`},uo={margin:0,paddingInlineStart:`var(--ggui-spacing-lg, 24px)`},fo={overflowX:`auto`},V={borderCollapse:`collapse`,width:`100%`,fontSize:`var(--ggui-font-size-sm, 14px)`},H={padding:`var(--ggui-spacing-xs, 6px) var(--ggui-spacing-sm, 12px)`,borderBottom:`1px solid var(--ggui-color-outline, rgba(0,0,0,0.15))`,verticalAlign:`top`,textAlign:`left`},po={...H,fontWeight:`var(--ggui-font-weight-semibold, 600)`,background:`var(--ggui-color-sunken, rgba(0,0,0,0.06))`};function mo(e){return e.map((e,t)=>{switch(e.type){case`text`:return e.text;case`break`:return(0,w.jsx)(`br`,{},t);case`strong`:return(0,w.jsx)(`strong`,{children:mo(e.children)},t);case`em`:return(0,w.jsx)(`em`,{children:mo(e.children)},t);case`code`:return(0,w.jsx)(`code`,{style:so,children:e.code},t);case`link`:{let n=mo(e.children);return e.href===void 0?(0,w.jsx)(`span`,{style:lo,children:n},t):(0,w.jsx)(na,{href:e.href,external:!0,children:n},t)}default:return e}})}function ho(e,t){switch(e.type){case`paragraph`:return(0,w.jsx)(hi,{children:mo(e.children)},t);case`heading`:return(0,w.jsx)(xi,{level:e.level,children:mo(e.children)},t);case`code-fence`:return(0,w.jsx)(`pre`,{style:co,"data-lang":e.lang,children:(0,w.jsx)(`code`,{children:e.code})},t);case`list`:{let n=e.items.map((e,t)=>(0,w.jsx)(`li`,{children:mo(e.children)},t));return e.ordered?(0,w.jsx)(`ol`,{start:e.start,style:uo,children:n},t):(0,w.jsx)(`ul`,{style:uo,children:n},t)}case`table`:{let n=(t,n)=>{let r=e.align[n];return r===void 0?t:{...t,textAlign:r}};return(0,w.jsx)(`div`,{style:fo,children:(0,w.jsxs)(`table`,{style:V,children:[(0,w.jsx)(`thead`,{children:(0,w.jsx)(`tr`,{children:e.header.cells.map((e,t)=>(0,w.jsx)(`th`,{scope:`col`,style:n(po,t),children:mo(e.children)},t))})}),(0,w.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,w.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,w.jsx)(`td`,{style:n(H,t),children:mo(e.children)},t))},t))})]})},t)}default:return e}}function go({markdown:e,className:t,style:n}){let r=oo(e);return(0,w.jsx)(`div`,{className:t,"data-ggui-markdown":``,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-sm, 12px)`,...n},children:r.map(ho)})}function _o({markdown:e}){return(0,w.jsx)(w.Fragment,{children:mo(Xa(e))})}var vo={};Ne(vo,{CardGrid:()=>So,ChatWindow:()=>Eo,CommandPalette:()=>Fo,CommentThread:()=>wo,DataTable:()=>To,FileUploader:()=>ko,Footer:()=>Io,Header:()=>yo,Hero:()=>Lo,Modal:()=>Po,NavigationBar:()=>Do,NotificationCenter:()=>Mo,Sidebar:()=>xo});function yo({logo:e,navigation:t,actions:n,sticky:r=!1,background:i,bordered:a=!0,style:o,className:s}){return(0,w.jsxs)(`header`,{className:s,style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 24px`,backgroundColor:i||`var(--ggui-color-container, #ffffff)`,borderBottom:a?`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`:void 0,...r&&{position:`sticky`,top:0,zIndex:jr.sticky,boxShadow:Ar.sm},...o},children:[e&&(0,w.jsx)(`div`,{style:{flexShrink:0},children:e}),t&&(0,w.jsx)(`nav`,{style:{display:`flex`,alignItems:`center`,flex:1,marginLeft:`32px`},children:t}),n&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,flexShrink:0},children:n})]})}function bo({item:e,activeId:t,onItemClick:n,collapsed:r,depth:i=0}){let[a,o]=(0,S.useState)(!1),s=e.children&&e.children.length>0,c=t===e.id;return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`button`,{onClick:()=>{s&&!r&&o(!a),n?.(e)},disabled:e.disabled,style:{display:`flex`,alignItems:`center`,gap:`12px`,width:`100%`,padding:r?`10px`:`10px 12px`,paddingLeft:r?`10px`:`${12+i*16}px`,border:`none`,borderRadius:kr.md,backgroundColor:c?`var(--ggui-color-primaryContainer, #f0f9ff)`:`transparent`,color:e.disabled?`var(--ggui-color-neutral-400, #9ca3af)`:c?`var(--ggui-color-onPrimaryContainer, #0369a1)`:`var(--ggui-color-onContainer, #374151)`,fontSize:I.sm,fontWeight:c?L.medium:L.normal,textAlign:`left`,cursor:e.disabled?`not-allowed`:`pointer`,transition:`all 0.15s`,justifyContent:r?`center`:`flex-start`},children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0},children:e.icon}),!r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{style:{flex:1},children:e.label}),e.badge&&(0,w.jsx)(`span`,{children:e.badge}),s&&(0,w.jsx)(ta,{name:a?`chevron-down`:`chevron-right`,size:14,tone:`subtle`})]})]}),s&&a&&!r&&(0,w.jsx)(`div`,{style:{marginTop:`4px`},children:e.children.map(e=>(0,w.jsx)(bo,{item:e,activeId:t,onItemClick:n,collapsed:r,depth:i+1},e.id))})]})}function xo({items:e,activeId:t,onItemClick:n,collapsed:r=!1,header:i,footer:a,width:o=256,collapsedWidth:s=64,style:c,className:l}){let u=r?s:o;return(0,w.jsxs)(`aside`,{className:l,style:{width:u,minWidth:u,height:`100%`,display:`flex`,flexDirection:`column`,backgroundColor:`var(--ggui-color-container, #ffffff)`,borderRight:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,transition:`width 0.2s`,overflow:`hidden`,...c},children:[i&&(0,w.jsx)(`div`,{style:{padding:r?`16px 8px`:`16px`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:i}),(0,w.jsx)(`nav`,{style:{flex:1,padding:`8px`,overflowY:`auto`,overflowX:`hidden`},children:(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:e.map(e=>(0,w.jsx)(bo,{item:e,activeId:t,onItemClick:n,collapsed:r},e.id))})}),a&&(0,w.jsx)(`div`,{style:{padding:r?`16px 8px`:`16px`,borderTop:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:a})]})}function So({children:e,columns:t=3,gap:n=16,style:r,className:i}){return(0,w.jsx)(`div`,{className:i,style:{display:`grid`,gridTemplateColumns:typeof t==`number`?`repeat(${t}, 1fr)`:`repeat(auto-fit, minmax(280px, 1fr))`,gap:`${n}px`,...r},children:e})}function Co({comment:e,onReply:t,onReaction:n,depth:r=0}){let[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),c=()=>{o.trim()&&(t?.(e.id,o),s(``),a(!1))},l=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,w.jsxs)(`div`,{style:{marginLeft:r>0?`40px`:0},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`},children:[(0,w.jsx)(Ui,{name:e.author.name,src:e.author.avatar,size:`sm`}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,w.jsx)(`span`,{style:{fontWeight:500,fontSize:I.sm},children:e.author.name}),(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-neutral-500, #6b7280)`,fontSize:I.xs},children:l})]}),(0,w.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:I.sm,color:`var(--ggui-color-onContainer, #374151)`},children:e.content}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[e.reactions?.map(t=>(0,w.jsxs)(`button`,{onClick:()=>n?.(e.id,t.emoji),style:{padding:`2px 8px`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:`12px`,backgroundColor:`var(--ggui-color-sunken, #f9fafb)`,fontSize:I.xs,cursor:`pointer`},children:[t.emoji,` `,t.count]},t.emoji)),(0,w.jsx)(`button`,{onClick:()=>a(!i),style:{background:`none`,border:`none`,color:`var(--ggui-color-neutral-500, #6b7280)`,fontSize:I.xs,cursor:`pointer`},children:`Reply`})]}),i&&(0,w.jsxs)(`div`,{style:{marginTop:`12px`},children:[(0,w.jsx)(ki,{value:o,onChange:s,placeholder:`Write a reply...`,rows:2}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginTop:`8px`},children:[(0,w.jsx)(Ei,{size:`sm`,onClick:c,children:`Reply`}),(0,w.jsx)(Ei,{size:`sm`,variant:`ghost`,onClick:()=>a(!1),children:`Cancel`})]})]})]})]}),e.replies?.map(e=>(0,w.jsx)(`div`,{style:{marginTop:`16px`},children:(0,w.jsx)(Co,{comment:e,onReply:t,onReaction:n,depth:r+1})},e.id))]})}function wo({comments:e,currentUser:t,onAddComment:n,onReply:r,onReaction:i,loading:a,style:o,className:s}){let[c,l]=(0,S.useState)(``),u=()=>{c.trim()&&(n?.(c),l(``))};return(0,w.jsxs)(`div`,{className:s,style:{...o},children:[t&&(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,marginBottom:`24px`},children:[(0,w.jsx)(Ui,{name:t.name,src:t.avatar,size:`sm`}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(ki,{value:c,onChange:l,placeholder:`Write a comment...`,rows:3}),(0,w.jsx)(`div`,{style:{marginTop:`8px`,display:`flex`,justifyContent:`flex-end`},children:(0,w.jsx)(Ei,{onClick:u,disabled:!c.trim(),children:`Comment`})})]})]}),a?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`24px`},children:(0,w.jsx)(Si,{size:24})}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`20px`},children:e.map(e=>(0,w.jsx)(Co,{comment:e,onReply:r,onReaction:i},e.id))})]})}function To({columns:e,data:t,rowKey:n=`id`,loading:r,emptyText:i=`No data`,onSort:a,sortKey:o,sortDirection:s,onRowClick:c,selectable:l,selectedKeys:u=[],onSelectionChange:d,style:f,className:p}){let m=(e,t)=>typeof n==`function`?n(e):String(e[n]??t),h=e=>{e?d?.(t.map((e,t)=>m(e,t))):d?.([])},g=(e,t)=>{t?d?.([...u,e]):d?.(u.filter(t=>t!==e))},_=t.length>0&&u.length===t.length,v=u.length>0&&u.length<t.length;return(0,w.jsx)(`div`,{className:p,style:{border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:`8px`,overflow:`hidden`,...f},children:(0,w.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:I.sm},children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{style:{backgroundColor:`var(--ggui-color-sunken, #f9fafb)`},children:[l&&(0,w.jsx)(`th`,{style:{width:`40px`,padding:`12px`},children:(0,w.jsx)(Mi,{checked:_,indeterminate:v,onChange:h})}),e.map(e=>(0,w.jsx)(`th`,{style:{padding:`12px 16px`,textAlign:e.align||`left`,fontWeight:L.semibold,color:`var(--ggui-color-onSunken, #374151)`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,cursor:e.sortable?`pointer`:void 0,width:e.width},onClick:()=>e.sortable&&a?.(e.key,o===e.key&&s===`asc`?`desc`:`asc`),children:(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[e.header,e.sortable&&o===e.key&&(0,w.jsx)(ta,{name:s===`asc`?`chevron-up`:`chevron-down`,size:14})]})},e.key))]})}),(0,w.jsx)(`tbody`,{children:r?(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{colSpan:e.length+ +!!l,style:{padding:`48px`,textAlign:`center`},children:(0,w.jsx)(Si,{size:24})})}):t.length===0?(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{colSpan:e.length+ +!!l,style:{padding:`48px`,textAlign:`center`,color:`var(--ggui-color-neutral-500, #6b7280)`},children:i})}):t.map((t,n)=>{let r=m(t,n),i=u.includes(r);return(0,w.jsxs)(`tr`,{onClick:()=>c?.(t,n),style:{backgroundColor:i?`var(--ggui-color-primaryContainer, #f0f9ff)`:void 0,cursor:c?`pointer`:void 0,transition:`background-color 0.15s`},children:[l&&(0,w.jsx)(`td`,{style:{padding:`12px`},children:(0,w.jsx)(Mi,{checked:i,onChange:e=>g(r,e)})}),e.map(e=>(0,w.jsx)(`td`,{style:{padding:`12px 16px`,textAlign:e.align||`left`,color:`var(--ggui-color-onContainer, #111827)`,borderBottom:`1px solid var(--ggui-color-neutral-100, #f3f4f6)`},children:e.render?e.render(t[e.key],t,n):String(t[e.key]??``)},e.key))]},r)})})]})})}function Eo({messages:e,currentUserId:t,onSendMessage:n,loading:r,typing:i,placeholder:a=`Type a message...`,header:o,style:s,className:c}){let[l,u]=(0,S.useState)(``),d=(0,S.useRef)(null);(0,S.useEffect)(()=>{d.current?.scrollIntoView({behavior:`smooth`})},[e]);let f=()=>{l.trim()&&(n?.(l),u(``))},p=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),f())};return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,height:`100%`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:kr.lg,backgroundColor:`var(--ggui-color-container, #ffffff)`,overflow:`hidden`,...s},children:[o&&(0,w.jsx)(`div`,{style:{padding:`12px 16px`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:o}),(0,w.jsxs)(`div`,{style:{flex:1,padding:`16px`,overflowY:`auto`,display:`flex`,flexDirection:`column`,gap:`12px`},children:[r?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`24px`},children:(0,w.jsx)(Si,{size:24})}):e.map(e=>{let n=e.sender.id===t,r=e.timestamp instanceof Date?e.timestamp.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):e.timestamp;return(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:n?`row-reverse`:`row`,alignItems:`flex-end`,gap:`8px`},children:[!n&&(0,w.jsx)(Ui,{name:e.sender.name,src:e.sender.avatar,size:`xs`}),(0,w.jsxs)(`div`,{style:{maxWidth:`70%`,padding:`10px 14px`,borderRadius:kr.lg,backgroundColor:n?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-sunken, #f3f4f6)`,color:n?`var(--ggui-color-onPrimary, #ffffff)`:`var(--ggui-color-onSunken, #111827)`},children:[(0,w.jsx)(`p`,{style:{margin:0,fontSize:I.sm},children:e.content}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,marginTop:`4px`,fontSize:I.xs,opacity:.7},children:[(0,w.jsx)(`span`,{children:r}),n&&e.status&&(0,w.jsxs)(`span`,{children:[e.status===`sending`&&`•`,e.status===`sent`&&`✓`,e.status===`delivered`&&`✓✓`,e.status===`read`&&`✓✓`,e.status===`error`&&`!`]})]})]})]},e.id)}),i&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:(0,w.jsxs)(`span`,{style:{fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`},children:[i.name,` is typing...`]})}),(0,w.jsx)(`div`,{ref:d})]}),(0,w.jsxs)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,display:`flex`,gap:`8px`},children:[(0,w.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:a,style:{flex:1,padding:`10px 14px`,border:`1px solid var(--ggui-color-outline, #d1d5db)`,borderRadius:kr.full,fontSize:I.sm,outline:`none`}}),(0,w.jsx)(Ei,{onClick:f,disabled:!l.trim(),children:(0,w.jsx)(ta,{name:`chevron-right`,size:18})})]})]})}function Do({items:e,activeId:t,onItemClick:n,orientation:r=`horizontal`,variant:i=`default`,style:a,className:o}){let s=e=>{let a=t===e.id,o={display:`flex`,alignItems:`center`,gap:`8px`,padding:r===`horizontal`?`8px 16px`:`10px 16px`,border:`none`,background:`none`,fontSize:I.sm,cursor:e.disabled?`not-allowed`:`pointer`,opacity:e.disabled?.5:1,transition:`all 0.15s`,textDecoration:`none`,color:`inherit`},s={default:{fontWeight:a?L.medium:L.normal,color:a?`var(--ggui-color-link, #0284c7)`:`var(--ggui-color-onSunken, #4b5563)`},pills:{borderRadius:kr.full,backgroundColor:a?`var(--ggui-color-primaryContainer, #e0f2fe)`:`transparent`,color:a?`var(--ggui-color-onPrimaryContainer, #0369a1)`:`var(--ggui-color-onSunken, #4b5563)`,fontWeight:a?L.medium:L.normal},underline:{borderBottom:a?`2px solid var(--ggui-color-primary-600, #0284c7)`:`2px solid transparent`,color:a?`var(--ggui-color-link, #0284c7)`:`var(--ggui-color-onSunken, #4b5563)`,fontWeight:a?L.medium:L.normal,borderRadius:0}},c=()=>{e.disabled||n?.(e)},l=(0,w.jsxs)(w.Fragment,{children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`},children:e.icon}),(0,w.jsx)(`span`,{children:e.label})]});return e.href?(0,w.jsx)(`a`,{href:e.href,onClick:e=>{e.preventDefault(),c()},style:{...o,...s[i]},children:l},e.id):(0,w.jsx)(`button`,{onClick:c,disabled:e.disabled,style:{...o,...s[i]},children:l},e.id)};return(0,w.jsx)(`nav`,{className:o,style:{display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,gap:r===`horizontal`?`4px`:`2px`,...i===`underline`&&r===`horizontal`&&{borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},...a},children:e.map(s)})}function Oo(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(1))} ${n[r]}`}function ko({files:e=[],onFilesSelected:t,onFileRemove:n,accept:r,multiple:i=!0,maxSize:a,maxFiles:o,disabled:s,dragDrop:c=!0,style:l,className:u}){let[d,f]=(0,S.useState)(!1),p=(0,S.useRef)(null),m=n=>{if(!n)return;let r=Array.from(n);o&&(r=r.slice(0,o-e.length)),a&&(r=r.filter(e=>e.size<=a)),t?.(r)},h=e=>{e.preventDefault(),f(!1),!s&&c&&m(e.dataTransfer.files)},g=e=>{e.preventDefault(),!s&&c&&f(!0)},_=()=>{f(!1)};return(0,w.jsxs)(`div`,{className:u,style:{...l},children:[(0,w.jsxs)(`div`,{onClick:()=>!s&&p.current?.click(),onDrop:h,onDragOver:g,onDragLeave:_,style:{border:`2px dashed ${d?`var(--ggui-color-primary-400, #38bdf8)`:`var(--ggui-color-outline, #d1d5db)`}`,borderRadius:kr.lg,padding:`32px`,textAlign:`center`,backgroundColor:d?`var(--ggui-color-primaryContainer, #f0f9ff)`:`var(--ggui-color-sunken, #f9fafb)`,cursor:s?`not-allowed`:`pointer`,transition:`all 0.2s`,opacity:s?.5:1},children:[(0,w.jsx)(`input`,{ref:p,type:`file`,accept:r,multiple:i,onChange:e=>m(e.target.files),disabled:s,style:{display:`none`}}),(0,w.jsx)(ta,{name:`plus`,size:32,tone:`subtle`}),(0,w.jsx)(`p`,{style:{margin:`12px 0 4px`,color:`var(--ggui-color-onContainer, #374151)`,fontSize:I.sm},children:c?`Drag and drop files here, or click to browse`:`Click to browse files`}),(0,w.jsxs)(`p`,{style:{margin:0,color:`var(--ggui-color-neutral-500, #6b7280)`,fontSize:I.xs},children:[r&&`Accepted: ${r}`,a&&` \u2022 Max size: ${Oo(a)}`,o&&` \u2022 Max files: ${o}`]})]}),e.length>0&&(0,w.jsx)(`div`,{style:{marginTop:`16px`,display:`flex`,flexDirection:`column`,gap:`8px`},children:e.map(e=>(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,padding:`12px`,border:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,borderRadius:kr.md,backgroundColor:`var(--ggui-color-container, #ffffff)`},children:[(0,w.jsx)(ta,{name:`menu`,size:20,tone:`subtle`}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`p`,{style:{margin:0,fontSize:I.sm,color:`var(--ggui-color-onContainer, #111827)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name}),(0,w.jsxs)(`p`,{style:{margin:`2px 0 0`,fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`},children:[Oo(e.size),e.error&&(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`8px`},children:e.error})]}),e.status===`uploading`&&e.progress!==void 0&&(0,w.jsx)(Yi,{value:e.progress,size:`sm`,style:{marginTop:`8px`}})]}),(0,w.jsx)(Ei,{variant:`ghost`,size:`sm`,onClick:()=>n?.(e.id),children:(0,w.jsx)(ta,{name:`x`,size:16})})]},e.id))})]})}var Ao={info:`var(--ggui-color-info-500, #06b6d4)`,success:`var(--ggui-color-success-500, #22c55e)`,warning:`var(--ggui-color-warning-500, #f59e0b)`,error:`var(--ggui-color-error-500, #ef4444)`};function jo({notification:e,onMarkAsRead:t,onDismiss:n}){let r=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,i=Ao[e.type||`info`];return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,padding:`12px`,backgroundColor:e.read?`transparent`:`var(--ggui-color-primaryContainer, #f0f9ff)`,borderRadius:kr.md,transition:`background-color 0.15s`},children:[(0,w.jsx)(`div`,{style:{width:`8px`,height:`8px`,borderRadius:`50%`,backgroundColor:e.read?`transparent`:i,flexShrink:0,marginTop:`6px`}}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,gap:`8px`},children:[(0,w.jsx)(`p`,{style:{margin:0,fontWeight:L.medium,color:`var(--ggui-color-onContainer, #111827)`,fontSize:I.sm},children:e.title}),(0,w.jsx)(`button`,{onClick:()=>n?.(e.id),style:{background:`none`,border:`none`,padding:`2px`,cursor:`pointer`,color:`var(--ggui-color-neutral-400, #9ca3af)`,flexShrink:0},children:(0,w.jsx)(ta,{name:`x`,size:14})})]}),e.message&&(0,w.jsx)(`p`,{style:{margin:`4px 0 0`,color:`var(--ggui-color-onSunken, #4b5563)`,fontSize:I.xs},children:e.message}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,marginTop:`8px`},children:[(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-neutral-400, #9ca3af)`,fontSize:I.xs},children:r}),!e.read&&(0,w.jsx)(`button`,{onClick:()=>t?.(e.id),style:{background:`none`,border:`none`,padding:0,color:`var(--ggui-color-link, #0284c7)`,fontSize:I.xs,cursor:`pointer`},children:`Mark as read`}),e.action&&(0,w.jsx)(`button`,{onClick:e.action.onClick,style:{background:`none`,border:`none`,padding:0,color:`var(--ggui-color-link, #0284c7)`,fontSize:I.xs,cursor:`pointer`},children:e.action.label})]})]})]})}function Mo({notifications:e,onMarkAsRead:t,onMarkAllAsRead:n,onDismiss:r,onClearAll:i,emptyText:a=`No notifications`,loading:o,style:s,className:c}){let l=e.filter(e=>!e.read).length;return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,...s},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,w.jsx)(`span`,{style:{fontWeight:L.semibold,color:`var(--ggui-color-onContainer, #111827)`},children:`Notifications`}),l>0&&(0,w.jsx)(`span`,{style:{padding:`2px 8px`,borderRadius:`12px`,backgroundColor:`var(--ggui-color-primaryContainer, #e0f2fe)`,color:`var(--ggui-color-onPrimaryContainer, #0369a1)`,fontSize:I.xs,fontWeight:L.medium},children:l})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[l>0&&(0,w.jsx)(Ei,{variant:`ghost`,size:`sm`,onClick:n,children:`Mark all read`}),e.length>0&&(0,w.jsx)(Ei,{variant:`ghost`,size:`sm`,onClick:i,children:`Clear all`})]})]}),(0,w.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px`},children:o?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`32px`},children:(0,w.jsx)(Si,{size:24})}):e.length===0?(0,w.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:`var(--ggui-color-neutral-500, #6b7280)`},children:a}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`},children:e.map(e=>(0,w.jsx)(jo,{notification:e,onMarkAsRead:t,onDismiss:r},e.id))})})]})}var No={sm:`400px`,md:`500px`,lg:`640px`,xl:`800px`,full:`100vw`};function Po({open:e,onClose:t,title:n,children:r,footer:i,size:a=`md`,closeOnOverlayClick:o=!0,closeOnEscape:s=!0,showCloseButton:c=!0,style:l,className:u}){let d=(0,S.useCallback)(e=>{e.key===`Escape`&&s&&t()},[s,t]);if((0,S.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,d),document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,d),document.body.style.overflow=``}},[e,d]),!e)return null;let f=e=>{e.target===e.currentTarget&&o&&t()},p=a===`full`;return(0,w.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:jr.modal,display:`flex`,alignItems:p?`stretch`:`center`,justifyContent:`center`,padding:p?0:`24px`},children:[(0,w.jsx)(`div`,{onClick:f,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,animation:la.fadeIn}}),(0,w.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:u,style:{position:`relative`,width:No[a],maxWidth:p?`100%`:`calc(100vw - 48px)`,maxHeight:p?`100%`:`calc(100vh - 48px)`,backgroundColor:`var(--ggui-color-elevated, #ffffff)`,color:`var(--ggui-color-onElevated, #18181b)`,borderRadius:p?0:kr.xl,boxShadow:Ar[`2xl`],display:`flex`,flexDirection:`column`,overflow:`hidden`,animation:la.scaleIn,...l},children:[(n||c)&&(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 20px`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:[n&&(0,w.jsx)(xi,{level:4,children:n}),c&&(0,w.jsx)(Ei,{variant:`ghost`,size:`sm`,onClick:t,"aria-label":`Close modal`,style:{marginLeft:`auto`},children:(0,w.jsx)(ta,{name:`x`,size:20})})]}),(0,w.jsx)(`div`,{style:{flex:1,padding:`20px`,overflowY:`auto`},children:r}),i&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`8px`,padding:`16px 20px`,borderTop:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:i})]})]})}function Fo({open:e,onClose:t,commands:n,onSelect:r,placeholder:i=`Search commands...`,recentIds:a=[],loading:o,style:s,className:c}){let[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(0),p=(0,S.useMemo)(()=>{let e=l?n.filter(e=>e.label.toLowerCase().includes(l.toLowerCase())||e.description?.toLowerCase().includes(l.toLowerCase())):n,t=new Map;if(!l&&a.length>0){let e=a.map(e=>n.find(t=>t.id===e)).filter(Boolean);e.length>0&&t.set(`Recent`,e)}return e.forEach(e=>{let n=e.group||`Commands`;t.has(n)||t.set(n,[]),!(!l&&a.includes(e.id)&&t.has(`Recent`))&&t.get(n).push(e)}),t},[n,l,a]),m=(0,S.useMemo)(()=>{let e=[];return p.forEach(t=>e.push(...t)),e},[p]);(0,S.useEffect)(()=>{f(0)},[l]),(0,S.useEffect)(()=>{e&&(u(``),f(0))},[e]);let h=(0,S.useCallback)(e=>{if(e.key===`Escape`){t();return}if(e.key===`ArrowDown`)e.preventDefault(),f(e=>Math.min(e+1,m.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),f(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let n=m[d];n&&!n.disabled&&(r(n),t())}},[m,d,r,t]);if((0,S.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,h),()=>document.removeEventListener(`keydown`,h)},[e,h]),!e)return null;let g=0;return(0,w.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:jr.modal,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:`15vh`},children:[(0,w.jsx)(`div`,{onClick:t,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`}}),(0,w.jsxs)(`div`,{role:`dialog`,className:c,style:{position:`relative`,width:`560px`,maxWidth:`calc(100vw - 48px)`,maxHeight:`60vh`,backgroundColor:`var(--ggui-color-elevated, #ffffff)`,borderRadius:kr.xl,boxShadow:Ar[`2xl`],overflow:`hidden`,display:`flex`,flexDirection:`column`,...s},children:[(0,w.jsx)(`div`,{style:{padding:`12px`,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:(0,w.jsxs)(`div`,{style:{position:`relative`},children:[(0,w.jsx)(ta,{name:`search`,size:18,tone:`subtle`,style:{position:`absolute`,left:`12px`,top:`50%`,transform:`translateY(-50%)`}}),(0,w.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:i,autoFocus:!0,style:{width:`100%`,padding:`12px 12px 12px 42px`,border:`none`,fontSize:I.base,outline:`none`,backgroundColor:`transparent`}})]})}),(0,w.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px`},children:o?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`32px`},children:(0,w.jsx)(Si,{size:24})}):m.length===0?(0,w.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:`var(--ggui-color-neutral-500, #6b7280)`},children:`No commands found`}):Array.from(p.entries()).map(([e,n])=>(0,w.jsxs)(`div`,{style:{marginBottom:`8px`},children:[(0,w.jsx)(`div`,{style:{padding:`8px 12px`,fontSize:I.xs,fontWeight:L.semibold,color:`var(--ggui-color-neutral-500, #6b7280)`,textTransform:`uppercase`,letterSpacing:`0.05em`},children:e}),n.map(e=>{let n=g++===d;return(0,w.jsxs)(`button`,{onClick:()=>{e.disabled||(r(e),t())},disabled:e.disabled,style:{display:`flex`,alignItems:`center`,gap:`12px`,width:`100%`,padding:`10px 12px`,border:`none`,borderRadius:kr.md,backgroundColor:n?`var(--ggui-color-sunken, #f3f4f6)`:`transparent`,color:e.disabled?`var(--ggui-color-neutral-400, #9ca3af)`:`var(--ggui-color-onElevated, #111827)`,textAlign:`left`,cursor:e.disabled?`not-allowed`:`pointer`},children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,color:`var(--ggui-color-neutral-500, #6b7280)`},children:e.icon}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(`div`,{style:{fontSize:I.sm},children:e.label}),e.description&&(0,w.jsx)(`div`,{style:{fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`},children:e.description})]}),e.shortcut&&(0,w.jsx)(`kbd`,{style:{padding:`2px 6px`,backgroundColor:`var(--ggui-color-sunken, #f3f4f6)`,borderRadius:kr.sm,fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`,fontFamily:`inherit`},children:e.shortcut})]},e.id)})]},e))}),(0,w.jsxs)(`div`,{style:{padding:`8px 12px`,borderTop:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`,display:`flex`,alignItems:`center`,gap:`16px`,fontSize:I.xs,color:`var(--ggui-color-neutral-500, #6b7280)`},children:[(0,w.jsx)(`span`,{children:`↑↓ Navigate`}),(0,w.jsx)(`span`,{children:`↵ Select`}),(0,w.jsx)(`span`,{children:`Esc Close`})]})]})]})}function Io({brand:e,columns:t,socialLinks:n,bottomText:r,bottomLinks:i,background:a,bordered:o=!0,style:s,className:c}){return(0,w.jsxs)(`footer`,{className:c,role:`contentinfo`,style:{backgroundColor:a||`var(--ggui-color-sunken, #f9fafb)`,borderTop:o?`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`:void 0,...s},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`48px`,padding:`48px 24px`,maxWidth:`1280px`,margin:`0 auto`},children:[e&&(0,w.jsx)(`div`,{style:{flex:`1 1 280px`,minWidth:`200px`},children:e}),t?.map((e,t)=>(0,w.jsxs)(`div`,{style:{flex:`0 1 180px`,minWidth:`140px`},children:[e.title&&(0,w.jsx)(`h4`,{style:{fontSize:I.sm,fontWeight:L.semibold,color:`var(--ggui-color-onContainer, #111827)`,lineHeight:_i.normal,margin:`0 0 16px 0`,padding:0},children:e.title}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`flex`,flexDirection:`column`,gap:`10px`},children:e.links.map((e,t)=>(0,w.jsx)(`li`,{children:(0,w.jsx)(`a`,{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick?.()}:void 0,style:{fontSize:I.sm,color:`var(--ggui-color-onSunken, #4b5563)`,textDecoration:`none`,transition:`color 0.15s`,lineHeight:_i.normal},"aria-label":e.label,children:e.label})},t))})]},t))]}),(r||i||n)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:`16px`,padding:`20px 24px`,maxWidth:`1280px`,margin:`0 auto`,borderTop:`1px solid var(--ggui-color-outlineVariant, #e5e7eb)`},children:[r&&(0,w.jsx)(`span`,{style:{fontSize:I.sm,color:`var(--ggui-color-neutral-500, #6b7280)`,lineHeight:_i.normal},children:r}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`20px`},children:[n?.map((e,t)=>(0,w.jsx)(`a`,{href:e.href,"aria-label":e.label,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--ggui-color-neutral-500, #6b7280)`,transition:`color 0.15s`},children:e.icon},t)),i?.map((e,t)=>(0,w.jsx)(`a`,{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick?.()}:void 0,style:{fontSize:I.sm,color:`var(--ggui-color-neutral-500, #6b7280)`,textDecoration:`none`,transition:`color 0.15s`},children:e.label},t))]})]})]})}function Lo({heading:e,description:t,primaryAction:n,secondaryAction:r,media:i,align:a=`center`,size:o=`md`,background:s,backgroundImage:c,overlay:l=!1,style:u,className:d}){let f={sm:{padding:`48px 24px`,headingSize:I[`3xl`],descSize:I.lg},md:{padding:`80px 24px`,headingSize:I[`4xl`],descSize:I.xl},lg:{padding:`120px 24px`,headingSize:I[`5xl`],descSize:I.xl}},p=f[o]||f.md,m=!!c,h=m&&l;return(0,w.jsxs)(`section`,{className:d,style:{position:`relative`,backgroundColor:s||(m?void 0:`var(--ggui-color-container, #ffffff)`),...m&&{backgroundImage:`url(${c})`,backgroundSize:`cover`,backgroundPosition:`center`},overflow:`hidden`,...u},children:[h&&(0,w.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`}}),(0,w.jsxs)(`div`,{style:{position:`relative`,maxWidth:`1280px`,margin:`0 auto`,padding:p.padding,display:`flex`,flexDirection:a===`center`?`column`:`row`,alignItems:`center`,gap:`48px`,textAlign:a===`center`?`center`:`left`},children:[(0,w.jsxs)(`div`,{style:{flex:a===`left`&&i?`1 1 50%`:void 0,maxWidth:a===`center`?`800px`:void 0},children:[e&&(0,w.jsx)(`h1`,{style:{fontSize:p.headingSize,fontWeight:L.bold,lineHeight:_i.tight,letterSpacing:vi.tight,color:h?`#ffffff`:`var(--ggui-color-onContainer, #111827)`,margin:`0 0 16px 0`,padding:0},children:e}),t&&(0,w.jsx)(`p`,{style:{fontSize:p.descSize,lineHeight:_i.relaxed,color:h?`rgba(255,255,255,0.9)`:`var(--ggui-color-onSunken, #4b5563)`,margin:`0 0 32px 0`,padding:0,maxWidth:a===`center`?`640px`:void 0,...a===`center`&&{marginLeft:`auto`,marginRight:`auto`}},children:t}),(n||r)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`12px`,justifyContent:a===`center`?`center`:`flex-start`},children:[n&&(0,w.jsx)(`button`,{onClick:n.onClick,style:{padding:`12px 28px`,fontSize:I.base,fontWeight:L.semibold,color:`var(--ggui-color-onPrimary, #ffffff)`,backgroundColor:`var(--ggui-color-primary-600, #0284c7)`,border:`none`,borderRadius:`8px`,cursor:`pointer`,transition:`background-color 0.15s`,lineHeight:_i.normal},children:n.label}),r&&(0,w.jsx)(`button`,{onClick:r.onClick,style:{padding:`12px 28px`,fontSize:I.base,fontWeight:L.semibold,color:h?`#ffffff`:`var(--ggui-color-onContainer, #374151)`,backgroundColor:`transparent`,border:`1px solid ${h?`rgba(255,255,255,0.3)`:`var(--ggui-color-outline, #d1d5db)`}`,borderRadius:`8px`,cursor:`pointer`,transition:`all 0.15s`,lineHeight:_i.normal},children:r.label})]})]}),i&&(0,w.jsx)(`div`,{style:{flex:a===`left`?`1 1 50%`:void 0,display:`flex`,justifyContent:`center`,alignItems:`center`,...a===`center`&&{marginTop:`16px`}},children:i})]})]})}var Ro={};Ne(Ro,{Clickable:()=>zo,Hoverable:()=>Bo,Pressable:()=>Vo});var zo=(0,S.forwardRef)(function({children:e,onClick:t,onDoubleClick:n,hoverStyle:r,activeStyle:i,cursor:a,transition:o=`all 200ms ease`,disabled:s=!1,role:c,"aria-label":l,tabIndex:u,style:d,className:f,...p},m){let[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),y=!!t,b=s?`not-allowed`:a??(y?`pointer`:void 0),x=c??(y?`button`:void 0),C=u??(y?0:void 0),T=e=>{s||!t||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t(e))},E={...d,cursor:b,transition:o,opacity:s?.5:void 0,...h&&!s?r:{},..._&&!s?i:{}};return(0,w.jsx)(`div`,{ref:m,className:f,style:E,onClick:s?void 0:t,onDoubleClick:s?void 0:n,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),v(!1)},onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onKeyDown:T,role:x,"aria-label":l,"aria-disabled":s||void 0,tabIndex:C,...p,children:e})}),Bo=(0,S.forwardRef)(function({children:e,hoverStyle:t,onHoverChange:n,transition:r=`all 200ms ease`,style:i,className:a,...o},s){let[c,l]=(0,S.useState)(!1),u={...i,transition:r,...c?t:{}};return(0,w.jsx)(`div`,{ref:s,className:a,style:u,onMouseEnter:()=>{l(!0),n?.(!0)},onMouseLeave:()=>{l(!1),n?.(!1)},...o,children:e})}),Vo=(0,S.forwardRef)(function({children:e,onPress:t,onLongPress:n,longPressDelay:r=500,hoverStyle:i,pressStyle:a,disabled:o=!1,transition:s=`all 150ms ease`,role:c,"aria-label":l,tabIndex:u,style:d,className:f,...p},m){let[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(null),x=!!t||!!n,C=e=>{if(!o&&(v(!0),n)){let t=setTimeout(()=>{n(e)},r);b(t)}},T=e=>{o||(v(!1),y?(clearTimeout(y),b(null),t?.(e)):n||t?.(e))},E=e=>{o||!t||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t(e))},D={...d,cursor:o?`not-allowed`:x?`pointer`:void 0,transition:s,opacity:o?.5:void 0,userSelect:x?`none`:void 0,...h&&!o?i:{},..._&&!o?a:{}},O=typeof e==`function`?e({pressed:_,hovered:h}):e;return(0,w.jsx)(`div`,{ref:m,className:f,style:D,onMouseDown:C,onMouseUp:T,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),v(!1),y&&clearTimeout(y)},onKeyDown:E,role:c??(x?`button`:void 0),"aria-label":l,"aria-disabled":o||void 0,tabIndex:u??(x?0:void 0),...p,children:O})});function Ho(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,``).replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,``)}var Uo={version:2,tokens:`--ggui-color-container.--ggui-color-elevated.--ggui-color-error.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-errorContainer.--ggui-color-ground.--ggui-color-ground-gradient.--ggui-color-ground-subtle.--ggui-color-heroGround.--ggui-color-heroLink.--ggui-color-heroOutline.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-infoContainer.--ggui-color-inverseLink.--ggui-color-inverseOutline.--ggui-color-link.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-neutral-900.--ggui-color-onContainer.--ggui-color-onElevated.--ggui-color-onError.--ggui-color-onErrorContainer.--ggui-color-onGround.--ggui-color-onHeroGround.--ggui-color-onInfoContainer.--ggui-color-onInverted.--ggui-color-onPrimary.--ggui-color-onPrimaryContainer.--ggui-color-onSuccessContainer.--ggui-color-onSunken.--ggui-color-onTertiaryContainer.--ggui-color-onWarningContainer.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-primaryContainer.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-successContainer.--ggui-color-sunken.--ggui-color-tertiaryContainer.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-color-warningContainer.--ggui-flash-color.--ggui-font-family-heading.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-heading.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-letter-spacing-heading.--ggui-motion-duration-base.--ggui-motion-duration-fast.--ggui-motion-duration-slow.--ggui-motion-easing-emphasized.--ggui-motion-easing-exit.--ggui-motion-easing-standard.--ggui-scrim-opacity.--ggui-scrim-tint.--ggui-shape-radius-control.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}.tokens,Wo=[`--ggui-color-primary`,`--ggui-color-ground-gradient`,`--ggui-color-ground-subtle`,`--ggui-flash-color`],Go=class extends Error{missing;constructor(e){super(`theme document invalid: missing ${e.join(`, `)}`),this.name=`ThemeDocumentInvalidError`,this.missing=e}};function Ko(e){return e<0?0:e>1?1:e}function qo(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Jo(e){let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.round(Ko(t)*255)}function Yo(e){let t=e.trim().replace(/^#/,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t;if(!/^[0-9a-fA-F]{6}$/.test(n))throw new Go([`colour ${JSON.stringify(e)} is not 6-digit hex`]);return[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]}function Xo(e,t,n){let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*a,1.9779984951*r-2.428592205*i+.4505937099*a,.0259040371*r+.7827717662*i-.808675766*a]}function Zo(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*a,-1.2684380046*r+2.6097574011*i-.3413193965*a,-.0041960863*r-.7034186147*i+1.707614701*a]}function Qo(e){let[t,n,r]=Yo(e),[i,a,o]=Xo(qo(t),qo(n),qo(r)),s=Math.hypot(a,o);return{l:i,c:s,h:s<1e-6?0:(Math.atan2(o,a)*180/Math.PI+360)%360}}var $o=e=>Math.round(e*1e4)/1e4;function es(e){return e.every(e=>e>=-1e-6&&e<=1.000001)}function ts(e){let t=Ko($o(e.l)),n=$o((e.h%360+360)%360),r=Math.max(0,$o(e.c)),i=e=>{let r=n*Math.PI/180;return Zo(t,e*Math.cos(r),e*Math.sin(r))},a=i(r);if(!es(a)){let e=0,t=r;for(let n=0;n<24;n++){let n=(e+t)/2;es(i(n))?e=n:t=n}r=e,a=i(r)}let[o,s,c]=a.map(Ko);return`#${[o,s,c].map(e=>Jo(e).toString(16).padStart(2,`0`)).join(``)}`}function ns(e,t,n){let r=Qo(e),i=Qo(t),a=i.h-r.h;r.c<1e-4||i.c<1e-4?a=0:a>180?a-=360:a<-180&&(a+=360);let o=r.c<1e-4?i.h:r.h+a*n;return ts({l:r.l+(i.l-r.l)*n,c:r.c+(i.c-r.c)*n,h:o})}function rs(e){let[t,n,r]=Yo(e);return .2126*qo(t)+.7152*qo(n)+.0722*qo(r)}function is(e,t){let n=rs(e),r=rs(t),[i,a]=n>r?[n,r]:[r,n];return(i+.05)/(a+.05)}var as=[`50`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],os=[.97,.93,.86,.76,.66,NaN,.5,.42,.34,.26],ss=[.15,.3,.5,.75,.9,1,.95,.85,.7,.55],cs=[.04,.08,.16,.28,.44,.58,.7,.8,.9,.96],ls=[`primary`,`tertiary`,`success`,`warning`,`error`,`info`],us={xs:`4px`,sm:`8px`,md:`16px`,lg:`24px`,xl:`32px`,"2xl":`48px`},ds={xs:-2,sm:-1,base:0,lg:1,xl:2,"2xl":3,"3xl":4,"4xl":5},fs={display:`4xl`,h1:`3xl`,h2:`2xl`,body:`base`,label:`xs`},ps=4,ms=`0.45`;function hs(e){if(typeof e!=`object`||!e||!(`$value`in e))return;let t=e.$value;if(typeof t==`number`)return String(t);if(typeof t==`string`)return/^#[0-9a-fA-F]{3,6}$/.test(t)?`#${Yo(t).map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:t}function gs(e){return e===null?`null`:typeof e==`object`?`$value`in e?`object with a non-string, non-number $value`:`object without $value`:`${typeof e} ${JSON.stringify(e)}`}var _s=e=>{console.warn(`[ggui-design] theme member unreadable at ${e.path} \u2014 found ${e.found}; expected a DTCG token ({ $value }). The member was ignored and the fallback used.`)};function vs(e,t,n){if(e===void 0)return;let r=hs(e);return r===void 0&&n({kind:`member-unreadable`,path:t,found:gs(e)}),r}function ys(e,t){return hs(e?.[t])}function bs(e){if(e!==void 0)return e===`light`?`#ffffff`:e===`dark`?`#000000`:hs(e)}function xs(e,t){let n={};for(let t of as){let r=ys(e,t);r!==void 0&&(n[t]=r)}return Ss(n,t)}function Ss(e,t){let n=Qo(t),r={};return as.forEach((i,a)=>{let o=e[i];if(o!==void 0){r[i]=o;return}r[i]=i===`500`?t:ts({l:os[a],c:n.c*ss[a],h:n.h})}),r}function Cs(e){return is(`#ffffff`,e)>=is(`#000000`,e)?`#ffffff`:`#000000`}var ws={light:[`600`,`700`,`800`,`900`],dark:[`600`,`500`,`400`,`300`,`200`,`100`]};function Ts(e,t,n){let r=Yo(e),i=Yo(t),a=e=>Math.round(r[e]*n+i[e]*(1-n)).toString(16).padStart(2,`0`);return`#${a(0)}${a(1)}${a(2)}`}var Es=[.32,.4,.48,.56,.64,.72,.8,.9,1];function Ds(e,t){for(let n of Es){let r=Ts(t,e,n);if(is(r,e)>=3)return r}return t}function Os(e,t,n){let r=is(`#000000`,t)>=is(`#ffffff`,t);for(let n of r?ws.light:ws.dark){let r=e[`--ggui-color-primary-${n}`];if(r!==void 0&&is(r,t)>=4.5)return r}return n}function ks(e){let t=/^([0-9.]+)\s*(rem|px|em)$/.exec(e.trim());return t?{n:Number(t[1]),unit:t[2]}:void 0}function As(e,t,n={}){let r=new Set,i=n.onDiagnostic??_s,a=e=>{r.has(e.path)||(r.add(e.path),i(e))},o=Object.fromEntries(Object.entries(e.color)),s=e=>hs(o[e]),c=e=>o[e],l={},u=[],d=e=>{let t=s(e);return t===void 0&&u.push(`color.${e}`),t??`#000000`},f=d(`ground`),p=d(`onGround`),m=d(`container`),h=d(`onContainer`),g=d(`sunken`),_=d(`onSunken`);Object.assign(l,{"--ggui-color-ground":f,"--ggui-color-onGround":p,"--ggui-color-container":m,"--ggui-color-onContainer":h,"--ggui-color-sunken":g,"--ggui-color-onSunken":_,"--ggui-color-elevated":t===`light`?m:ns(m,h,.08),"--ggui-color-onElevated":h});let v=c(`neutral`);as.forEach((e,t)=>{l[`--ggui-color-neutral-${e}`]=ys(v,e)??ns(f,p,cs[t])}),l[`--ggui-color-outline`]=s(`outline`)??l[`--ggui-color-neutral-300`],l[`--ggui-color-outlineVariant`]=s(`outlineVariant`)??l[`--ggui-color-neutral-200`];let y=ys(c(`primary`),`500`);y===void 0&&u.push(`color.primary.500`);for(let e of ls){let n=c(e),r=e===`tertiary`?s(`tertiary`):ys(n,`500`);r===void 0&&(e===`tertiary`?r=y??`#000000`:(u.push(`color.${e}.500`),r=`#000000`));let i=xs(n,r);for(let t of as)l[`--ggui-color-${e}-${t}`]=i[t];let a=e[0].toUpperCase()+e.slice(1);l[`--ggui-color-on${a}`]=s(`on${a}`)??Cs(i[500]),l[`--ggui-color-${e}Container`]=s(`${e}Container`)??(t===`light`?i[100]:i[800]),l[`--ggui-color-on${a}Container`]=s(`on${a}Container`)??(t===`light`?i[900]:i[100])}l[`--ggui-color-error`]=l[`--ggui-color-error-500`],l[`--ggui-color-link`]=s(`link`)??Os(l,m,h),l[`--ggui-color-heroGround`]=t===`light`?l[`--ggui-color-primaryContainer`]:h,l[`--ggui-color-onHeroGround`]=t===`light`?l[`--ggui-color-onPrimaryContainer`]:m,l[`--ggui-color-heroLink`]=Os(l,l[`--ggui-color-heroGround`],l[`--ggui-color-onHeroGround`]),l[`--ggui-color-inverseLink`]=Os(l,h,m),l[`--ggui-color-onInverted`]=m,l[`--ggui-color-inverseOutline`]=Ds(h,m),l[`--ggui-color-heroOutline`]=Ds(l[`--ggui-color-heroGround`],l[`--ggui-color-onHeroGround`]);let b=e.font.family,x=hs(b.sans)??gi.sans;l[`--ggui-font-family-sans`]=x,l[`--ggui-font-family-mono`]=hs(b.mono)??gi.mono,l[`--ggui-font-family-heading`]=hs(b.heading)??x;let S=e.font.weight;for(let e of[`normal`,`medium`,`semibold`,`bold`])l[`--ggui-font-weight-${e}`]=ys(S,e)??String(L[e]);l[`--ggui-font-weight-heading`]=ys(S,`heading`)??String(L.bold);let C=e.font.letterSpacing;l[`--ggui-letter-spacing-body`]=ys(C,`body`)??`0em`,l[`--ggui-letter-spacing-heading`]=ys(C,`heading`)??`-0.01em`;for(let e of Object.keys(_i))l[`--ggui-font-lineHeight-${e}`]=String(_i[e]);let w=e.font.ramp,T=w?ks(vs(w.base,`font.ramp.base`,a)??``):void 0,E=w?Number(vs(w.ratio,`font.ramp.ratio`,a)):NaN;for(let[e,t]of Object.entries(ds))l[`--ggui-font-size-${e}`]=T&&Number.isFinite(E)&&E>0?`${Math.round(T.n*E**t*1e3)/1e3}${T.unit}`:I[e];let D=e.typeScale;if(D!==void 0){let e=ks(vs(D.body?.size,`typeScale.body.size`,a)??``);if(e!==void 0){let t=Number.isFinite(E)&&E>0?E:1.25;for(let[n,r]of Object.entries(ds))l[`--ggui-font-size-${n}`]=`${Math.round(e.n*t**r*1e3)/1e3}${e.unit}`}for(let[e,t]of Object.entries(fs)){let n=vs(D[e]?.size,`typeScale.${e}.size`,a);n!==void 0&&(l[`--ggui-font-size-${t}`]=n)}let t=vs(D.h1?.weight,`typeScale.h1.weight`,a);t!==void 0&&(l[`--ggui-font-weight-heading`]=t);let n=vs(D.body?.weight,`typeScale.body.weight`,a);n!==void 0&&(l[`--ggui-font-weight-normal`]=n);let r=vs(D.h1?.tracking,`typeScale.h1.tracking`,a);r!==void 0&&(l[`--ggui-letter-spacing-heading`]=r);let i=vs(D.body?.tracking,`typeScale.body.tracking`,a);i!==void 0&&(l[`--ggui-letter-spacing-body`]=i);let o=vs(D.body?.leading,`typeScale.body.leading`,a);o!==void 0&&(l[`--ggui-font-lineHeight-normal`]=o)}let O=e.spacing,ee=e.rhythm?ks(vs(e.rhythm.base,`rhythm.base`,a)??``):void 0,te=e=>{if(ee===void 0)return;let t=ks(e);if(t===void 0)return;let n=t.n/ps*ee.n;return`${Math.round(n*1e3)/1e3}${ee.unit}`};for(let[e,t]of Object.entries(Dr))l[`--ggui-spacing-${e}`]=te(String(t))??ys(O,e)??String(t);for(let[e,t]of Object.entries(us))l[`--ggui-spacing-${e}`]=te(t)??ys(O,e)??t;let k=e.shape?.radius;for(let[e,t]of Object.entries(kr))l[`--ggui-shape-radius-${e}`]=ys(k,e)??String(t);l[`--ggui-shape-radius-control`]=ys(k,`control`)??l[`--ggui-shape-radius-md`];let ne=e.shape?.shadow;for(let[e,t]of Object.entries(Ar))l[`--ggui-shape-shadow-${e}`]=ys(ne,e)??String(t);let re=e.motion?.duration,ie=e.motion?.easing;if(l[`--ggui-motion-duration-fast`]=ys(re,`fast`)??Ci.fast,l[`--ggui-motion-duration-base`]=ys(re,`base`)??Ci.normal,l[`--ggui-motion-duration-slow`]=ys(re,`slow`)??Ci.slow,l[`--ggui-motion-easing-standard`]=ys(ie,`standard`)??R.easeInOut,l[`--ggui-motion-easing-emphasized`]=ys(ie,`emphasized`)??R.easeOut,l[`--ggui-motion-easing-exit`]=ys(ie,`exit`)??R.easeIn,l[`--ggui-scrim-tint`]=bs(e.scrim?.tone)??l[`--ggui-color-ground`],l[`--ggui-scrim-opacity`]=hs(e.scrim?.opacity)??ms,u.length>0)throw new Go(u);let ae=new Set(Wo),A={},j=[];for(let e of Uo){if(ae.has(e))continue;let t=l[e];t===void 0?j.push(e):A[e]=t}if(j.length>0)throw Error(`deriveThemeVariables: no rule for manifest token(s) ${j.join(`, `)} \u2014 extend the \xA72.4 table`);return A}function js(e,t){return Object.entries(As(e,t)).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>` ${e}: ${t};`).join(`
88
+ `)}function Ms(e,t){let n=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,r=[],i;for(;(i=n.exec(t))!==null;){let e=i[1],t=i[2].trim().split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>e.endsWith(`;`)?e:`${e};`).join(` `);r.push(` ${e} { ${t} }`)}return`@keyframes ggui-${e} {
89
+ ${r.join(`
90
+ `)}
91
+ }`}function Ns(e){let t=[];for(let[n,r]of Object.entries(e.motion.keyframes))n.startsWith(`$`)||t.push(Ms(n,String(r.$value)));return t.join(`
92
+
93
+ `)}function Ps(e,t,n=`light`){let r=`:root {
94
+ ${js(t,n)}
95
+ }`,i=Ns(t),a=i?`${r}
96
+
97
+ ${i}`:r;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:r,cssKeyframes:i,css:a}}var Fs={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},U={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Is={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},Ls={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Rs={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{transition:Ls,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},zs={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},ground:{$value:`#f4f3ed`,$type:`color`},onGround:{$value:`#292929`,$type:`color`},sunken:{$value:`#ebe9e1`,$type:`color`},onSunken:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#f4f3ed`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Rs.font,spacing:Rs.spacing,shape:Rs.shape,motion:Rs.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Is},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},ground:{$value:`#1f1f1f`,$type:`color`},onGround:{$value:`#f4f3ed`,$type:`color`},sunken:{$value:`#292929`,$type:`color`},onSunken:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#1f1f1f`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Rs.font,spacing:Rs.spacing,shape:Rs.shape,motion:Rs.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Is}},Bs={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},Vs={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},ground:{$value:`#0a0a0f`,$type:`color`},onGround:{$value:`#e8e8f0`,$type:`color`},sunken:{$value:`#111118`,$type:`color`},onSunken:{$value:`#8888a0`,$type:`color`},container:{$value:`#0a0a0f`,$type:`color`},onContainer:{$value:`#e8e8f0`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Bs.font,spacing:Bs.spacing,shape:Bs.shape,motion:Bs.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Is},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},ground:{$value:`#000005`,$type:`color`},onGround:{$value:`#e8e8f0`,$type:`color`},sunken:{$value:`#0a0a0f`,$type:`color`},onSunken:{$value:`#aaaabe`,$type:`color`},container:{$value:`#000005`,$type:`color`},onContainer:{$value:`#e8e8f0`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Bs.font,spacing:Bs.spacing,shape:Bs.shape,motion:Bs.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Is}},Hs={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},Us={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},ground:{$value:`#faf9f7`,$type:`color`},onGround:{$value:`#2a2724`,$type:`color`},sunken:{$value:`#f3f1ed`,$type:`color`},onSunken:{$value:`#6b635b`,$type:`color`},container:{$value:`#faf9f7`,$type:`color`},onContainer:{$value:`#2a2724`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:Hs.font,spacing:Hs.spacing,shape:Hs.shape,motion:Hs.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Is},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},ground:{$value:`#2a2724`,$type:`color`},onGround:{$value:`#f3f1ed`,$type:`color`},sunken:{$value:`#3e3a36`,$type:`color`},onSunken:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#2a2724`,$type:`color`},onContainer:{$value:`#f3f1ed`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:Hs.font,spacing:Hs.spacing,shape:Hs.shape,motion:Hs.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Is}},Ws={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},Gs={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...Fs.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...Fs.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...Fs.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...Fs.dark.info,500:{$value:`#38bdf8`,$type:`color`}},ground:{$value:`#09090b`,$type:`color`},onGround:{$value:`#ececf0`,$type:`color`},sunken:{$value:`#111114`,$type:`color`},onSunken:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#09090b`,$type:`color`},onContainer:{$value:`#ececf0`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Ws.font,spacing:Ws.spacing,shape:Ws.shape,motion:Ws.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Is},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...Fs.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...Fs.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...Fs.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...Fs.dark.info,500:{$value:`#5acdff`,$type:`color`}},ground:{$value:`#000000`,$type:`color`},onGround:{$value:`#ececf0`,$type:`color`},sunken:{$value:`#09090b`,$type:`color`},onSunken:{$value:`#b0b0be`,$type:`color`},container:{$value:`#000000`,$type:`color`},onContainer:{$value:`#ececf0`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Ws.font,spacing:Ws.spacing,shape:Ws.shape,motion:Ws.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Is}},Ks={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:Ls}},qs={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...Fs.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...Fs.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...Fs.light.error,500:{$type:`color`,$value:`#e51414`}},info:Fs.light.info,ground:{$value:`#fefcf8`,$type:`color`},onGround:{$value:`#352e20`,$type:`color`},sunken:{$value:`#fdf8ef`,$type:`color`},onSunken:{$value:`#746448`,$type:`color`},container:{$value:`#fefcf8`,$type:`color`},onContainer:{$value:`#352e20`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:Ks.font,spacing:Ks.spacing,shape:Ks.shape,motion:Ks.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Is},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:Fs.dark.success,warning:Fs.dark.warning,error:Fs.dark.error,info:Fs.dark.info,ground:{$value:`#1f1c18`,$type:`color`},onGround:{$value:`#fefcf8`,$type:`color`},sunken:{$value:`#352e20`,$type:`color`},onSunken:{$value:`#dccba5`,$type:`color`},container:{$value:`#1f1c18`,$type:`color`},onContainer:{$value:`#fefcf8`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:Ks.font,spacing:Ks.spacing,shape:Ks.shape,motion:Ks.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Is}},Js={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...Ls,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},Ys={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},ground:{$value:`#faf9f5`,$type:`color`},onGround:{$value:`#141413`,$type:`color`},sunken:{$value:`#f5f4ee`,$type:`color`},onSunken:{$value:`#56544f`,$type:`color`},container:{$value:`#faf9f5`,$type:`color`},onContainer:{$value:`#141413`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:Js.font,spacing:Js.spacing,shape:Js.shape,motion:Js.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Is},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},ground:{$value:`#262624`,$type:`color`},onGround:{$value:`#faf9f5`,$type:`color`},sunken:{$value:`#2d2c2a`,$type:`color`},onSunken:{$value:`#a8a59f`,$type:`color`},container:{$value:`#262624`,$type:`color`},onContainer:{$value:`#faf9f5`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:Js.font,spacing:Js.spacing,shape:Js.shape,motion:Js.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Is}},Xs={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:Ls}},Zs={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},ground:{$value:`#fafaf7`,$type:`color`},onGround:{$value:`#15131f`,$type:`color`},sunken:{$value:`#f4f4f0`,$type:`color`},onSunken:{$value:`#4a4954`,$type:`color`},container:{$value:`#fafaf7`,$type:`color`},onContainer:{$value:`#15131f`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:Xs.font,spacing:Xs.spacing,shape:Xs.shape,motion:Xs.motion,accessibility:{...U.light,focusRing:{...U.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Is},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},ground:{$value:`#15131f`,$type:`color`},onGround:{$value:`#f5f4f9`,$type:`color`},sunken:{$value:`#221e35`,$type:`color`},onSunken:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#15131f`,$type:`color`},onContainer:{$value:`#f5f4f9`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:Xs.font,spacing:Xs.spacing,shape:Xs.shape,motion:Xs.motion,accessibility:{...U.dark,focusRing:{...U.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Is}},Qs={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Is},$s={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},ec={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},tc={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},nc={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},ground:{$value:`#1A1D24`,$type:`color`},onGround:{$value:`#F6F5EE`,$type:`color`},sunken:{$value:`#242938`,$type:`color`},onSunken:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#1A1D24`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...Qs,shape:{radius:$s,shadow:ec}},rc={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:nc.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},ground:{$value:`#FFFFFF`,$type:`color`},onGround:{$value:`#1A1D24`,$type:`color`},sunken:{$value:`#F6F5EE`,$type:`color`},onSunken:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FFFFFF`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...Qs,shape:{radius:$s,shadow:tc}},dark:nc},ic=new Map([[`ggui`,zs],[`indigo`,Zs],[`claudic`,Ys],[`premium-cyberpunk`,Vs],[`premium-zen`,Us],[`premium-neon-noir`,Gs],[`premium-botanical`,qs],[`guuey-brand-v1`,rc]]),ac=new Map;function oc(e,t){return t===`dark`&&e.dark?`dark`:`light`}function sc(e,t=`light`){let n=ic.get(e);if(!n)return;let r=oc(n,t),i=`${e}:${r}`,a=ac.get(i);if(a)return a;let o=Ps(e,r===`dark`?n.dark:n.light);return ac.set(i,o),o}function cc(){return`ggui`}(0,S.createContext)(null);var lc=`@supports (color: color-mix(in srgb, red, blue))`;function uc(e){let t=e.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);return t?t[1]:null}function dc(e){let t=e.replace(`#`,``);if(t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),t.length!==6)return null;let n=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16);return Number.isNaN(n)||Number.isNaN(r)||Number.isNaN(i)?null:{r:n,g:r,b:i}}function fc(e,t){let n=dc(t);return n?e.replace(/color-mix\(\s*in srgb\s*,\s*var\(--ggui-color-primary-500\)\s+(\d+(?:\.\d+)?)%\s*,\s*transparent\s*\)/g,(e,t)=>{let r=Number(t)/100,i=Number(r.toFixed(4)).toString();return`rgba(${n.r}, ${n.g}, ${n.b}, ${i})`}):e}function pc(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);if(t===-1||n===-1)return{base:e,colorMix:[]};let r=e.slice(0,t+1),i=e.slice(t+1,n),a=[],o=[];for(let e of i.split(`
98
+ `))e.trim()!==``&&(e.includes(`color-mix(`)?o.push(e):a.push(e));return{base:`${r}
99
+ ${a.join(`
100
+ `)}
101
+ }`,colorMix:o}}function mc(e,t,n){if(!n||!e.includes(`color-mix(`))return e;let{base:r,colorMix:i}=pc(e);return i.length===0?e:`${r}
102
+ ${`${t} {
103
+ ${i.map(e=>fc(e,n)).join(`
104
+ `)}
105
+ }`}
106
+ ${`${lc} {
107
+ ${t} {
108
+ ${i.join(`
109
+ `)}
110
+ }
111
+ }`}`}function hc(e,t=`light`){return gc(cc(),e,t)}function gc(e,t,n=`light`){let r=sc(e,n);if(!r){let r=cc();return e===r?``:gc(r,t,n)}let i=uc(r.cssVariables),a=mc(r.cssVariables.replace(/^:root\s*\{/,`.${t} {`),`.${t}`,i),o=bc(t),s=xc(t,i),c=r.metadata?.frameless===!0?_c(t):``;return`${a}
112
+ ${o}
113
+ ${s}
114
+ ${r.cssKeyframes}
115
+ ${yc(t)}${c}`}function _c(e){return`
116
+ .${e} > :where(:not(style)) { border: none !important; }`}var vc={outerRadiusVar:`--ggui-shape-radius-xl`,insetPx:16};`${vc.outerRadiusVar}${vc.insetPx}`;function yc(e){return`.${e} *, .${e} *::before, .${e} *::after { box-sizing: border-box; }
117
+ .${e} h1, .${e} h2, .${e} h3, .${e} h4, .${e} h5, .${e} h6, .${e} button, .${e} input, .${e} textarea, .${e} select { font-family: inherit; }`}function bc(e){return`.${e} {
118
+ font-family: var(--ggui-font-family-sans);
119
+ color: var(--ggui-color-onGround);
120
+ background-color: transparent;
121
+ }`}function xc(e,t){let n=`.${e}`,r=` --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);`,i=` --ggui-color-ground-gradient: linear-gradient(180deg, var(--ggui-color-ground) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-ground)) 100%);`,a=` --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);`,o=` --ggui-effect-glow-primary-strong: 0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset;`;return t?`${`${n} {
122
+ ${r}
123
+ --ggui-color-ground-gradient: linear-gradient(180deg, var(--ggui-color-ground) 0%, var(--ggui-color-ground) 100%);
124
+ ${` --ggui-effect-glow-primary: ${fc(`0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)`,t)};`}
125
+ ${` --ggui-effect-glow-primary-strong: ${fc(`0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset`,t)};`}
126
+ }`}
127
+ ${`${lc} {
128
+ ${n} {
129
+ ${i}
130
+ ${a}
131
+ ${o}
132
+ }
133
+ }`}`:`${n} {
134
+ ${r}
135
+ ${i}
136
+ ${a}
137
+ ${o}
138
+ }`}var Sc=[`useAction`,`useStream`,`useAuth`,`useApp`,`useRender`,`useGguiContext`,`useContract`,`useWireContext`,`GguiWireProvider`],Cc=`Container.Card.Stack.Row.Grid.Box.Divider.Spacer.Text.Heading.Button.Input.TextArea.Select.Checkbox.Toggle.RadioGroup.Slider.Badge.Spinner.Skeleton.Avatar.Alert.Progress.Image.Icon.Link.Tooltip.Table.Tabs.Toast.Accordion.MotionKeyframes.useMotion.useAnimationKey`.split(`.`),wc=[`SearchField`,`FormField`,`MenuItem`,`Tag`,`Dropdown`,`Autocomplete`,`Breadcrumb`,`Pagination`,`EmptyState`,`Stat`,`Stepper`,`Markdown`,`MarkdownInline`,`renderRichTextInlines`],Tc=[`Header`,`Sidebar`,`CardGrid`,`CommentThread`,`DataTable`,`ChatWindow`,`NavigationBar`,`FileUploader`,`NotificationCenter`,`Modal`,`CommandPalette`,`Footer`,`Hero`],Ec=[`Clickable`,`Hoverable`,`Pressable`],Dc=`useState.useEffect.useRef.useCallback.useMemo.useContext.useReducer.useId.use.useActionState.useOptimistic.useTransition.startTransition.useDeferredValue.useSyncExternalStore.useInsertionEffect.useLayoutEffect.useImperativeHandle.useDebugValue.createElement.Fragment.Children.cloneElement.createContext.forwardRef.memo.lazy.Suspense.Component.PureComponent.isValidElement.createRef`.split(`.`),Oc=`animation.duration.easing.transition.motionVar.keyframes.thinkingAnimation.thinkingKeyframes.thinkingPresets.THINKING_DEFAULT_STYLE.motionSafe.reducedMotion.reducedMotionCSS.colors.gray.primary.semantic.chartColors.success.warning.error.info.highContrast.typography.fontFamily.fontSize.fontSizeValues.fontWeight.lineHeight.letterSpacing.headingStyles.spacing.spacingValues.radius.shadow.elevation.maxWidth.zIndex.accessibility.focusRing.nativeTokens.tokens`.split(`.`);function kc(e,t,n){return e=e.split(`from"${t}"`).join(`from"${n}"`),e=e.split(`from "${t}"`).join(`from "${n}"`),e=e.split(`from'${t}'`).join(`from'${n}'`),e=e.split(`from '${t}'`).join(`from '${n}'`),e=e.split(`import"${t}"`).join(`import"${n}"`),e=e.split(`import "${t}"`).join(`import "${n}"`),e=e.split(`import'${t}'`).join(`import'${n}'`),e=e.split(`import '${t}'`).join(`import '${n}'`),e}function Ac(e,t){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${t}"])`}function jc(e){return`data:text/javascript,${encodeURIComponent(e)}`}function Mc(e){let t=Dc.map(e=>`export const ${e} = R.${e};`).join(` `);return`const R = ${Ac(`react`,e)}; export default R; ${t}`}function Nc(e){return jc(Mc(e))}function Pc(){return`const D = globalThis.__ggui__["reactDom"]; export default D; ${[`createPortal`,`flushSync`,`unstable_batchedUpdates`].map(e=>`export const ${e} = D.${e};`).join(` `)}`}function Fc(){return jc(Pc())}function Ic(e){return[`const R = ${Ac(`react`,e)};`,`function jsx(t,p,k){`,`if(k!==undefined){p={...p,key:k}}`,`const c=p.children;`,`delete p.children;`,`return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)`,`}`,`export{jsx,jsx as jsxs,jsx as jsxDEV};`,`export const Fragment=R.Fragment;`].join(``)}function Lc(e){return jc(Ic(e))}function Rc(e,t,n,r,i){if(n&&n.length>0){let a=[e,...r||[]],o=[t,...i||[]],s=a.map((e,t)=>`(globalThis.__ggui__&&globalThis.__ggui__["${o[t]}"]||window["${e}"]||{})`),c=s.join(`,`),l=n.map(e=>`export const ${e} = M["${e}"];`).join(` `);return s.length>1?`const M = Object.assign({}, ${c}); ${l} export default M;`:`const M = ${s[0]}; ${l} export default M;`}return`const M = ${Ac(t,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`}function zc(e,t,n,r,i){return jc(Rc(e,t,n,r,i))}function Bc(){return`const w = globalThis.__ggui__.wire; ${Sc.map(e=>`export const ${e} = w.${e};`).join(` `)} export default w;`}function Vc(){return jc(Bc())}function Hc(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),r=RegExp(`import\\s*(?:[A-Za-z_$][\\w$]*\\s*,\\s*)?\\{([^}]*)\\}\\s*from\\s*['"]${n}['"]`,`g`),i=new Set,a;for(;(a=r.exec(e))!==null;)for(let e of a[1].split(`,`)){let t=e.trim().split(/\s+as\s+/)[0]?.trim();t!==void 0&&/^[A-Za-z_$][\w$]*$/.test(t)&&i.add(t)}return[...i]}function Uc(e,t){let n=JSON.stringify(e),r=t.some(e=>/^[A-Z]/.test(e)),i=[];i.push(`var P=${n};`),i.push(`function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}`),i.push(`function H(n){return function(){var f=NS()[n];if(typeof f!=="function")throw new Error("[gadget] export "+n+" from package "+P+" is not loaded — the package failed to load at iframe boot or is not registered on App.gadgets.");return f.apply(this,arguments);};}`),r&&(i.push(`var R=globalThis.__ggui__&&globalThis.__ggui__.react;`),i.push(`class GEB extends R.Component{constructor(p){super(p);this.state={e:null};}static getDerivedStateFromError(e){return{e:e};}render(){if(this.state.e)return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] "+this.props.g+" failed to render");return this.props.children;}}`),i.push(`function C(n){return function(props){var Cmp=NS()[n];if(typeof Cmp!=="function")return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] component "+n+" from package "+P+" is not loaded");return R.createElement(GEB,{g:n},R.createElement(Cmp,props));};}`));for(let e of t){let t=/^[A-Z]/.test(e)?`C`:`H`;i.push(`export const ${e}=${t}(${JSON.stringify(e)});`)}return i.push(`export default new Proxy({},{get:function(_,k){return NS()[k];}});`),i.join(``)}function Wc(e,t){return jc(Uc(e,t))}function Gc(e,t){let n=t.reactGlobal??`__REACT`,r=t.primitivesGlobal??`__GGUI_PRIMITIVES`,i=t.componentsGlobal??`__GGUI_COMPONENTS`,a=t.compositionsGlobal??`__GGUI_COMPOSITIONS`,o=t.interactGlobal??`__GGUI_INTERACT`,s=t.appComponentsGlobal??`__GGUI_APP_COMPONENTS`,c=Nc(n),l=Lc(n);e=kc(e,`react/jsx-runtime`,l),e=kc(e,`react/jsx-dev-runtime`,l);let u=Fc();e=kc(e,`react-dom`,u),e=kc(e,`react`,c);let d=[...Cc,...wc,...Tc,...Ec];e=kc(e,`@ggui-ai/design/primitives`,zc(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=kc(e,`@ggui-ai/design/components`,zc(i,`components`,d,[r,a,o],[`primitives`,`compositions`,`interact`])),e=kc(e,`@ggui-ai/design/compositions`,zc(a,`compositions`,d,[r,i,o],[`primitives`,`components`,`interact`])),e=kc(e,`@ggui-ai/design/interact`,zc(o,`interact`,[...Ec])),e=kc(e,`@ggui-ai/design/templates`,zc(a,`compositions`,d,[r,i],[`primitives`,`components`])),e=kc(e,`@ggui-ai/design/app-components`,zc(s,`appComponents`)),e=kc(e,`@ggui-ai/design/tokens`,zc(`__GGUI_TOKENS`,`tokens`,[...Oc])),e=kc(e,`@ggui-ai/design`,zc(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=kc(e,`@ggui-ai/wire`,Vc());let f=[...new Set([`@ggui-ai/gadgets`,...t.gadgetPackages??[]])];for(let t of f){let n=Hc(e,t);e=kc(e,t,Wc(t,n))}return e}var Kc={"react/jsx-runtime":`jsx-runtime`,"react/jsx-dev-runtime":`jsx-runtime`,"react-dom":`react-dom`,react:`react`,"@ggui-ai/design/primitives":`primitives`,"@ggui-ai/design/components":`components`,"@ggui-ai/design/compositions":`compositions`,"@ggui-ai/design/interact":`interact`,"@ggui-ai/design/templates":`templates`,"@ggui-ai/design/app-components":`app-components`,"@ggui-ai/design/tokens":`tokens`,"@ggui-ai/design":`design`,"@ggui-ai/wire":`wire`,"@ggui-ai/gadgets":`gadgets`};function qc(e){let t=new Set,n=/(?:^|[^.\w$])(?:import|from)\s*['"]([^'"]+)['"]/g,r;for(;(r=n.exec(e))!==null;){let e=r[1];e!==void 0&&(/^(?:[a-z][a-z0-9+.-]*:|\.{0,2}\/)/i.test(e)||t.add(e))}return[...t]}function Jc(e,t){let n=t.shimBaseUrl.replace(/\/$/,``);for(let[t,r]of Object.entries(Kc))e=kc(e,t,`${n}/${r}.js`);return e}function Yc(e,t){let n=t.reactBaseUrl??`https://esm.sh/react@18.2.0`;return e=kc(e,`react/jsx-runtime`,`${n}/jsx-runtime`),e=kc(e,`react/jsx-dev-runtime`,`${n}/jsx-runtime`),e=kc(e,`react`,n),e}var Xc=[`@ggui-ai/wire/internal`],Zc=class extends Error{specifier;constructor(e){super(`import rewriter: generated component code imported '${e}', which is not available to components \u2014 it is the writer side of the wire; components read \`useRender().isConnected\` and never write it`),this.name=`ForbiddenImportSpecifierError`,this.specifier=e}};function Qc(e,t){let n=qc(e);for(let e of Xc)if(n.includes(e))throw new Zc(e);switch(t.mode){case`data-url`:return Gc(e,t);case`importmap`:return Yc(e,t);case`asset-url`:return Jc(e,t)}}function $c(e){let t=e.split(`;`),n=[],r=[];for(let e of t)e.trimStart().startsWith(`import`)?n.push(e):r.push(e);return n.length===0?e:n.join(`;`)+`;`+r.join(`;`)}async function el(e){let t=new Blob([e],{type:`application/javascript`}),n=URL.createObjectURL(t);try{return await Tr(()=>import(n),[])}finally{URL.revokeObjectURL(n)}}var tl=0;function nl(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,``)}`}var rl=1,il=500,al=class extends S.Component{state={error:null,catchCount:0,autoRetrying:!1};retryTimer=null;static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){let t=this.state.catchCount+1;this.setState({catchCount:t}),t<=rl?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},il)):this.props.onError?.(e)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){let{error:e,autoRetrying:t}=this.state;return e?t?(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24,minHeight:80,gap:8,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,fontSize:13,color:`var(--ggui-color-onContainer, inherit)`,opacity:.6},children:[(0,w.jsx)(`div`,{style:{width:16,height:16,border:`2px solid rgba(128,128,128,0.25)`,borderTopColor:`currentColor`,borderRadius:`50%`,animation:`ggui-err-spin 0.6s linear infinite`}}),`Retrying...`,(0,w.jsx)(`style`,{children:`@keyframes ggui-err-spin { to { transform: rotate(360deg); } }`})]}):(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`var(--ggui-color-onContainer, inherit)`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,color:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,opacity:.9},children:`Something went wrong`}),(0,w.jsx)(`div`,{style:{fontSize:12,opacity:.6,maxWidth:280,lineHeight:1.4},children:`This component encountered an error. Try asking for a different view.`}),(0,w.jsx)(`button`,{onClick:()=>this.setState({error:null,catchCount:0}),style:{marginTop:4,padding:`8px 20px`,borderRadius:8,border:`1px solid currentColor`,background:`transparent`,color:`inherit`,opacity:.75,fontSize:13,fontWeight:500,cursor:`pointer`},children:`Retry`}),(0,w.jsxs)(`details`,{style:{marginTop:8,maxWidth:320,width:`100%`,textAlign:`left`,opacity:.65},children:[(0,w.jsx)(`summary`,{style:{fontSize:11,cursor:`pointer`},children:`Error details`}),(0,w.jsx)(`pre`,{style:{fontSize:11,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,margin:`6px 0 0`,maxHeight:140,overflow:`auto`},children:e.message})]})]}):this.props.children}};function ol({code:e,props:t={},themeId:n,cssOverrides:r,fallback:i=(0,w.jsx)(`div`,{children:`Loading component...`}),onError:a}){let o=(0,S.useId)(),[s]=(0,S.useState)(()=>nl(o)||`ggui-rcr-${++tl}`),[c,l]=(0,S.useState)(null),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!0);(0,S.useEffect)(()=>{if(!e||e.trim().length===0){l(null),m(!1);return}let t=!1;m(!0),f(null),l(null);async function n(){try{let n=e;if(e.startsWith(`https://`)){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch component code: ${t.status}`);n=await t.text()}let r=Ho(n),i=globalThis,a={};try{a=await Tr(()=>Promise.resolve().then(()=>u(_(),1)),void 0)}catch{}i.__ggui__={react:S.default,reactDom:a,primitives:Er,components:Sa,compositions:vo,interact:Ro,wire:xr},i.__REACT=S.default,i.__GGUI_PRIMITIVES=Er,i.__GGUI_COMPONENTS=Sa,i.__GGUI_COMPOSITIONS=vo,i.__GGUI_INTERACT=Ro;let o=await el(Qc($c(r),{mode:`data-url`}));if(t)return;let s=o.default??Object.values(o).find(e=>typeof e==`function`);if(!s)throw Error(`Module does not export a default component`);l(()=>s),f(null)}catch(e){if(t)return;let n=e instanceof Error?e:Error(String(e));f(n),l(null),a?.(n)}finally{t||m(!1)}}return n(),()=>{t=!0}},[e]);let h=n?gc(n,s):hc(s);return!e||e.trim().length===0||p?(0,w.jsx)(`div`,{children:i}):d?(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`rgba(255,255,255,0.8)`},children:`Failed to load component`}),(0,w.jsx)(`div`,{style:{fontSize:12,color:`rgba(255,255,255,0.4)`,maxWidth:280,lineHeight:1.4},children:d.message})]}):c?(0,w.jsxs)(`div`,{className:s,children:[(0,w.jsxs)(`style`,{children:[h,r??``]}),(0,w.jsx)(al,{onError:a,children:(0,w.jsx)(c,{...t})},e.length)]}):(0,w.jsx)(`div`,{children:i})}function sl(){return(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:80},children:(0,w.jsx)(Si,{})})}function cl({suspended:e=!1,fallback:t}={}){return e?null:(0,w.jsx)(w.Fragment,{children:t??(0,w.jsx)(sl,{})})}var ll={display:`inline-flex`,alignItems:`center`,gap:4,fontFamily:`var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`,fontSize:12,lineHeight:1.2,color:`var(--ggui-color-neutral-500, #6b7280)`},ul={appearance:`none`,display:`inline-flex`,alignItems:`center`,background:`var(--ggui-color-neutral-50, #f9fafb)`,border:`1px solid var(--ggui-color-neutral-200, #e5e7eb)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,padding:`3px 7px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-600, #4b5563)`,cursor:`pointer`},dl={appearance:`none`,background:`transparent`,border:`none`,padding:`2px 4px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-400, #9ca3af)`,cursor:`pointer`};function fl({direction:e}){return(0,w.jsx)(`svg`,{width:13,height:13,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e===`up`?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`path`,{d:`M7 10v12`}),(0,w.jsx)(`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`path`,{d:`M17 14V2`}),(0,w.jsx)(`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`})]})})}var pl={up:`Thumbs up`,down:`Thumbs down`};function ml({onUiFeedback:e,sessionId:t,toolName:n}){let[r,i]=(0,S.useState)(`idle`),a=(0,S.useCallback)(r=>{e&&(e({verdict:r,...t===void 0?{}:{sessionId:t},...n===void 0?{}:{toolName:n}}),i(`sent`))},[e,t,n]);return!e||r===`dismissed`?null:(0,w.jsxs)(`div`,{"data-ggui-ui-feedback":!0,role:`group`,"aria-label":`Share feedback on this UI`,style:ll,children:[r===`sent`?(0,w.jsx)(`span`,{"data-ggui-ui-feedback-thanks":!0,children:`Thanks for the feedback`}):[`up`,`down`].map(e=>(0,w.jsx)(`button`,{type:`button`,style:ul,"data-ggui-ui-feedback-verdict":e,"aria-label":pl[e],title:pl[e],onClick:()=>a(e),children:(0,w.jsx)(fl,{direction:e})},e)),(0,w.jsx)(`button`,{type:`button`,style:dl,"aria-label":`Dismiss feedback`,"data-ggui-ui-feedback-dismiss":!0,onClick:()=>i(`dismissed`),children:`×`})]})}function hl({render:e,fallback:t,onError:n,cssOverrides:r,themeId:i,onUiFeedback:a,feedbackSessionId:o,feedbackToolName:s}){return!e.componentCode||e.componentCode.length===0?(0,w.jsx)(gl,{children:(0,w.jsx)(cl,{fallback:t})}):(0,w.jsxs)(gl,{children:[(0,w.jsx)(ol,{code:e.componentCode,props:e.props,cssOverrides:r,themeId:i,onError:n,fallback:t}),a?(0,w.jsx)(ml,{onUiFeedback:a,...o===void 0?{}:{sessionId:o},...s===void 0?{}:{toolName:s}}):null]})}function gl({children:e}){return vl()?(0,w.jsx)(w.Fragment,{children:e}):(0,w.jsx)(qn,{config:_l,children:e})}var _l={app:{appId:`preview`,appName:`preview`},render:{sessionId:`preview`,isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function vl(){try{return Kn()}catch{return null}}new TextDecoder;function W({tone:e,children:t,dot:n=!0}){return(0,w.jsxs)(`span`,{className:`ggui-status ggui-status--${e}`,children:[n?(0,w.jsx)(`span`,{className:`ggui-status__dot`,"aria-hidden":!0}):null,t]})}function yl({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:t.signal,headers:{accept:`application/json`}});if(r.status===404){n({kind:`not-found`});return}if(!r.ok){n({kind:`error`,message:`server returned ${r.status}`});return}let i=await r.json();n({kind:`ready`,blueprint:i})}catch(e){if(t.signal.aborted)return;n({kind:`error`,message:String(e)})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprint`,title:`Manifest-registered surface.`,mute:(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`/preview/`,e]})}),intro:(0,w.jsxs)(w.Fragment,{children:[`Reads the bundle via`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`LocalUiRegistry`}),`. Same bytes an agent would get from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render_blueprint`}),`.`]})}),t.kind===`loading`?(0,w.jsx)(Cl,{title:`loading`,num:`BPR / 01`,tone:`draft`,children:`Loading blueprint…`}):t.kind===`not-found`?(0,w.jsx)(Sl,{blueprintId:e}):t.kind===`error`?(0,w.jsxs)(Cl,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load blueprint — `,t.message,`.`]}):(0,w.jsx)(bl,{blueprint:t.blueprint})]})}function bl({blueprint:e}){return(0,w.jsxs)(`section`,{"data-ggui-session-entry":`component`,"data-ggui-code-ready":`true`,"data-ggui-blueprint-id":e.blueprintId,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:e.blueprintName}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:e.contentType}),(0,w.jsx)(xl,{blueprintId:e.blueprintId})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,children:(0,w.jsx)(hl,{render:{componentCode:e.code},fallback:(0,w.jsx)(`div`,{"data-ggui-preview-state":`waiting`,className:`ggui-muted`,style:{padding:`16px 0`},children:`Loading component…`})})})]})}function xl({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`idle`}),r=async()=>{n({kind:`pending`});try{let t=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:`POST`,headers:{accept:`application/json`}});if(!t.ok){let e=await t.json().catch(()=>({}));n({kind:`error`,message:e.message??`server returned ${t.status}`});return}n({kind:`ok`})}catch(e){n({kind:`error`,message:String(e)})}};return(0,w.jsxs)(`span`,{className:`ggui-pane__actions`,style:{marginLeft:`auto`},children:[t.kind===`error`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`error`,title:t.message,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live failed`}):null,t.kind===`ok`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`ok`,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live ok`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-try-live":t.kind===`pending`?`pending`:`idle`,"data-ggui-blueprint-id":e,disabled:t.kind===`pending`,onClick:()=>{r()},children:t.kind===`pending`?`trying…`:`Try live →`})]})}function Sl({blueprintId:e}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`not found`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`h2`,{className:`ggui-h2`,children:`Blueprint not found`}),(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No blueprint registered with id`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),`. Check`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` `,`and the blueprint's`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json#id`}),`.`]}),(0,w.jsx)(`div`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/`),children:`back to landing`})})]})]})}function Cl({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function wl(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/registry`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let c=(0,S.useCallback)(async e=>{r({kind:`loading`});try{let t=await fetch(`/ggui/console/blueprints/cached`,{signal:e,headers:{accept:`application/json`}});if(t.status===501){let e=await t.json().catch(()=>({}));r({kind:`unsupported`,message:e.message??`The configured vector store does not support enumeration.`});return}if(!t.ok){r({kind:`error`,message:`server returned ${t.status}`});return}let n=await t.json();r({kind:`ready`,data:n})}catch(t){if(e?.aborted)return;r({kind:`error`,message:String(t)})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return c(e.signal),()=>e.abort()},[c]);let l=(0,S.useCallback)(async e=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(e)}`,{method:`DELETE`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),u=(0,S.useCallback)(async()=>{try{await fetch(`/ggui/console/blueprints/cached/clear`,{method:`POST`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),d=i.trim().toLowerCase(),f=(0,S.useMemo)(()=>e.kind===`ready`?d.length===0?e.data:{blueprints:e.data.blueprints.filter(e=>[e.id,e.name,e.description??``,e.category??``].join(` `).toLowerCase().includes(d)),primitives:e.data.primitives.filter(e=>[e.name,e.catalog,e.source].join(` `).toLowerCase().includes(d))}:null,[e,d]),p=(0,S.useMemo)(()=>n.kind===`ready`?d.length===0?n.data.entries:n.data.entries.filter(e=>[e.id,e.cachedIntent].join(` `).toLowerCase().includes(d)):null,[n,d]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprints`,title:`What can this server produce without generating?`,mute:`Declared and cached.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Two answers on one screen. `,(0,w.jsx)(`strong`,{children:`Declared`}),` blueprints from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),`;`,` `,(0,w.jsx)(`strong`,{children:`cached`}),` generations the render path has stored (contract-keyed, written by the blueprint registry on every successful cold-gen).`]})}),e.kind===`loading`||n.kind===`loading`?(0,w.jsx)(Nl,{title:`loading`,num:`REG / 01`,tone:`draft`,children:`Loading…`}):e.kind===`error`?(0,w.jsxs)(Nl,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load registry — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-registry-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-registry-filter`,name:`filter`,"aria-label":`filter registry entries`,placeholder:`substring match over id, name, description, intent…`,value:i,onChange:e=>a(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsxs)(`div`,{className:`ggui-registry-grid`,children:[(0,w.jsx)(Tl,{all:e.data.blueprints,shown:f?.blueprints??e.data.blueprints,filterActive:d.length>0}),(0,w.jsx)(El,{state:n,shown:p,filterActive:d.length>0,onInvalidate:l,onClearAll:u})]}),(0,w.jsx)(Ol,{all:e.data.primitives,shown:f?.primitives??e.data.primitives,filterActive:d.length>0,expanded:o,onToggle:()=>s(e=>!e)})]})]})}function Tl({all:e,shown:t,filterActive:n}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`blueprints`,className:`ggui-stack`,"aria-label":`declared blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`BPR`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`declared`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),e.length===0?(0,w.jsx)(kl,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No declared blueprints match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`blueprint`,"data-ggui-registry-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`BPR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.name}),e.category?(0,w.jsx)(W,{tone:`ink`,children:e.category}):null]}),(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id})}),e.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`8px 0 0`},children:e.description}):null,(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/preview/${encodeURIComponent(e.id)}`),children:`preview →`})})]},e.id))})]})}function El({state:e,shown:t,filterActive:n,onInvalidate:r,onClearAll:i}){let a=e.kind===`ready`?e.data.entries:[],o=t??a;return(0,w.jsxs)(`div`,{"data-ggui-cached-list":!0,className:`ggui-stack`,"aria-label":`cached blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CCH`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`cached`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.kind===`ready`?`${o.length}${n&&o.length!==a.length?` / ${a.length}`:``}`:`—`}),e.kind===`ready`&&a.length>0?(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-clear-all":!0,className:`ggui-btn ggui-btn--ghost`,style:{marginLeft:`auto`},onClick:()=>{i()},children:`clear all`}):null]}),e.kind===`unsupported`?(0,w.jsx)(jl,{message:e.message}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`Couldn't load cache — `,e.message,`.`]}):a.length===0?(0,w.jsx)(Al,{}):o.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No cached entries match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:o.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-cached-item":!0,"data-ggui-cached-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CCH / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.cachedIntent}),typeof e.hitCount==`number`?(0,w.jsxs)(W,{tone:`ink`,children:[`hits `,e.hitCount]}):null]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`cached `,Dl(e.cachedAt)]}),e.lastHitAt?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`last hit `,Dl(e.lastHitAt)]}):null]}),(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-invalidate":!0,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{r(e.id)},children:`invalidate ✕`})})]},e.id))})]})}function Dl(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function Ol({all:e,shown:t,filterActive:n,expanded:r,onToggle:i}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`primitives`,className:`ggui-card`,"aria-label":`primitives`,style:{marginTop:24},children:[(0,w.jsxs)(`button`,{type:`button`,"data-ggui-primitives-toggle":!0,onClick:i,className:`ggui-card__head`,style:{width:`100%`,background:`transparent`,border:`none`,textAlign:`left`,cursor:`pointer`,font:`inherit`,color:`inherit`},"aria-expanded":r,children:[(0,w.jsxs)(`span`,{className:`ggui-card__title`,children:[r?`▾`:`▸`,` primitives`]}),(0,w.jsxs)(`span`,{className:`ggui-card__num`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``,` available — fyi`]})]}),r?e.length===0?(0,w.jsx)(Ml,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No primitives match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-card__body`,style:{listStyle:`none`,margin:0,padding:`12px 16px`,display:`flex`,flexWrap:`wrap`,gap:`6px 12px`},children:t.map(e=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`primitive`,"data-ggui-registry-name":e.name,style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.name}),(0,w.jsx)(W,{tone:e.source===`package`?`ink`:`draft`,children:e.source})]},`${e.catalog}::${e.name}`))}):null]})}function kl(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No declared blueprints.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Add include globs to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` and colocate each UI with a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json`}),`.`]})]})}function Al(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No cached generations yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate a UI from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/`}),` (the playground) and the result will land here for future cache hits.`]})]})}function jl({message:e}){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsxs)(`p`,{className:`ggui-body`,style:{margin:0},children:[(0,w.jsx)(W,{tone:`signal`,children:`unsupported`}),` Vector store doesn't support enumeration.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:e})]})}function Ml(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No primitives declared.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Declare packages or local catalogs in`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#primitives`}),`.`]})]})}function Nl({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function Pl({blueprint:e,height:t,title:n}){let r=typeof e.codeHash==`string`,i=n??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!r)return(0,w.jsx)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`pending`,className:`ggui-card`,style:{height:t??320,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,w.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:(0,w.jsx)(W,{tone:`draft`,children:`pending`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`This variant has no code yet — the next render against the same contract will gen against`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),`.`]})]})});let a=`/preview/${encodeURIComponent(e.blueprintId)}`;return(0,w.jsxs)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`ready`,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:i}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.codeHash?.slice(0,12),`…`]})})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,style:{padding:0},children:(0,w.jsx)(`iframe`,{src:a,title:`Preview of ${i}`,sandbox:`allow-scripts allow-same-origin`,style:{width:`100%`,height:t??320,border:`none`,display:`block`}})})]})}function Fl({blueprints:e,height:t}){return(0,w.jsx)(`div`,{"data-ggui-variant-comparison":!0,"data-ggui-variant-comparison-count":e.length,style:{display:`grid`,gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`,gap:16},children:e.map(e=>(0,w.jsx)(Pl,{blueprint:e,height:t,title:e.variance.persona??e.blueprintId.slice(0,12)},e.blueprintId))})}var Il=[`ui-gen-default`,`ui-gen-advanced`],Ll=.8,Rl={persona:``,generator:``,draftsOnly:!1};function zl({filters:e,onChange:t,generatorSlugs:n}){let r=n??Il;return(0,w.jsxs)(`form`,{"data-ggui-variants-filter-bar":!0,className:`ggui-form`,onSubmit:e=>e.preventDefault(),style:{display:`flex`,flexWrap:`wrap`,gap:16,alignItems:`flex-end`,marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-field`,style:{flex:1,minWidth:200},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-variants-filter-persona`,"data-ggui-variants-filter-persona":!0,"aria-label":`filter by persona`,placeholder:`e.g. minimalist, data-dense`,value:e.persona,onChange:n=>{t({...e,persona:n.target.value})},autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,style:{minWidth:220},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-variants-filter-generator`,"data-ggui-variants-filter-generator":!0,"aria-label":`filter by generator`,value:e.generator,onChange:n=>{t({...e,generator:n.target.value})},children:[(0,w.jsx)(`option`,{value:``,children:`any`}),r.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-variants-filter-drafts-only`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-variants-filter-drafts-only`,"data-ggui-variants-filter-drafts-only":!0,type:`checkbox`,"aria-label":`show drafts only`,checked:e.draftsOnly,onChange:n=>{t({...e,draftsOnly:n.target.checked})}}),(0,w.jsxs)(`span`,{className:`ggui-label`,style:{margin:0},children:[`drafts only (score < `,Ll.toFixed(2),`)`]})]})]})}function G(e,t){let n=t.persona.trim().toLowerCase();return!(n.length>0&&!(e.variance.persona?.toLowerCase()??``).includes(n)||t.generator.length>0&&(e.source.kind!==`llm`||e.source.generator!==t.generator)||t.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=.8))}function K(e){return e>=.8?`live`:e>=.5?`draft`:`signal`}function q(e){return e.kind===`llm`?`${e.generator} · ${e.model}`:e.kind}function J({blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i,compareSelected:a,onCompareToggle:o}){let s=e.isOperatorDefault===!0,c=e.variance.persona,l=e.validatorScore;return(0,w.jsxs)(`li`,{"data-ggui-variant-card":!0,"data-ggui-variant-id":e.blueprintId,"data-ggui-variant-default":s?`true`:`false`,"data-ggui-variant-compare-selected":a?`true`:`false`,className:`ggui-stack__entry`,style:a?{outline:`2px solid var(--ggui-ink, #292929)`}:void 0,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`VAR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsxs)(`span`,{className:`ggui-stack__entry-title`,children:[s?(0,w.jsx)(`span`,{"aria-label":`operator default`,children:`★ `}):null,c&&c.length>0?c:`(no persona)`]}),c?(0,w.jsxs)(W,{tone:`ink`,children:[`persona: `,c]}):null,(0,w.jsx)(W,{tone:`ink`,children:q(e.source)}),typeof l==`number`?(0,w.jsxs)(W,{tone:K(l),children:[`score `,l.toFixed(2)]}):null,(0,w.jsxs)(W,{tone:e.createdBy===`operator`?`live`:`draft`,children:[`by `,e.createdBy]})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`created `,Y(e.createdAt)]}),e.codeHash?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`hash `,(0,w.jsx)(`code`,{className:`ggui-code`,children:Bl(e.codeHash)})]}):(0,w.jsx)(`span`,{style:{marginLeft:12},children:(0,w.jsx)(W,{tone:`signal`,children:`no code`})})]}),e.variance.seedPrompt?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`,fontStyle:`italic`},children:[`“`,e.variance.seedPrompt,`”`]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`preview`,onClick:()=>n(e.blueprintId),children:`preview →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`set-default`,disabled:s,onClick:()=>r(e.blueprintId),title:s?`Already the operator default for this contract`:`Pin as the operator default for this contract`,children:s?`★ default`:`set as default`}),o?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`compare-toggle`,onClick:()=>o(e.blueprintId),children:a?`✓ in compare`:`add to compare`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`delete`,onClick:()=>i(e.blueprintId),children:`delete ✕`})]})]})}function Y(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function Bl(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}var Vl=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`OpsCallError`,this.code=t,n!==void 0&&(this.status=n)}},Hl=1;async function Ul(e){if((e.headers.get(`content-type`)??``).includes(`text/event-stream`)){let t=await e.text(),n=/^data:\s*(.+)$/m.exec(t);if(!n||!n[1])throw new Vl(`Malformed SSE response from /control — no data line`,-32700,e.status);return JSON.parse(n[1])}return await e.json()}async function Wl(e,t,n){let r=Hl++,i={method:`POST`,headers:{"content-type":`application/json`,accept:`application/json, text/event-stream`},body:JSON.stringify({jsonrpc:`2.0`,id:r,method:`tools/call`,params:{name:e,arguments:t}})};n!==void 0&&(i.signal=n);let a=await fetch(`/control`,i);if(!a.ok&&a.status!==200){let e=await a.text().catch(()=>``);throw new Vl(`/control returned HTTP ${a.status}${e?` — ${e}`:``}`,-32e3,a.status)}let o=await Ul(a);if(`error`in o)throw new Vl(o.error.message,o.error.code);let s=o.result;if(s.isError)throw new Vl(s.content?.[0]?.text??`tool reported error`,-32e3);if(s.structuredContent!==void 0)return s.structuredContent;let c=s.content?.[0]?.text;if(typeof c==`string`&&c.length>0)return JSON.parse(c);throw new Vl(`tool ${e} returned empty result`,-32e3)}function Gl(e,t){return Wl(`ggui_ops_generate_blueprint`,{...e,confirm:!0},t)}function Kl(e,t){return Wl(`ggui_ops_list_blueprints`,e,t)}function ql(e,t){return Wl(`ggui_ops_update_blueprint`,{...e,confirm:!0},t)}function Jl(e,t){return Wl(`ggui_ops_delete_blueprint`,{...e,confirm:!0},t)}function Yl({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`}),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async t=>{n({kind:`loading`});try{let r=await Kl({contractHash:e},t);n({kind:`ready`,blueprints:r.blueprints})}catch(e){if(t?.aborted)return;let r=e instanceof Vl||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}},[e]);(0,S.useEffect)(()=>{let e=new AbortController;return s(e.signal),()=>e.abort()},[s]);let c=(0,S.useMemo)(()=>t.kind===`ready`?[...t.blueprints].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}):[],[t]),l=c[0]?.contract,u=(0,S.useMemo)(()=>a?c.filter(e=>r.includes(e.blueprintId)):[],[c,r,a]),d=(0,S.useCallback)(e=>{k(`/preview/${encodeURIComponent(e)}`)},[]),f=(0,S.useCallback)(async e=>{try{await ql({blueprintId:e,isOperatorDefault:!0}),await s()}catch(e){let t=e instanceof Vl||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),p=(0,S.useCallback)(async e=>{try{await Jl({blueprintId:e}),i(t=>t.filter(t=>t!==e)),await s()}catch(e){let t=e instanceof Vl||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),m=(0,S.useCallback)(e=>{i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[(0,w.jsx)(T,{num:`01 / contract`,title:`One contract — many variants.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every variant the server has for this contract, grouped under the canonical`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.`]})}),(0,w.jsxs)(`div`,{style:{marginBottom:16},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin/variants`),children:`← all variants`}),` `,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-detail-generate":!0,onClick:()=>k(`/admin/variants/${encodeURIComponent(e)}/generate`),children:`generate new variant +`})]}),t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)(W,{tone:`signal`,children:`error`}),` Couldn't load variants — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{s()},children:`retry →`})]})]}):null,l?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`contract`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`CTR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`pre`,{"data-ggui-variant-detail-contract":!0,className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:280,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(l,null,2)})})]}):null,t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`}):c.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No variants registered for this contract.`}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Click "generate new variant" above to author the first one.`})]})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{"data-ggui-variant-compare-controls":!0,style:{display:`flex`,gap:12,alignItems:`center`,marginBottom:16},children:[(0,w.jsxs)(W,{tone:`ink`,children:[r.length,` selected`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-compare-run":!0,disabled:r.length<2,onClick:()=>o(!0),children:`compare selected →`}),a?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-compare-clear":!0,onClick:()=>{o(!1),i([])},children:`exit compare`}):null]}),a&&u.length>=2?(0,w.jsx)(`div`,{"data-ggui-variant-compare-set":u.length,style:{marginBottom:24},children:(0,w.jsx)(Fl,{blueprints:u,height:420})}):(0,w.jsx)(`div`,{className:`ggui-stack`,style:{marginBottom:24},"aria-label":`variants and preview`,children:c.map((e,t)=>(0,w.jsxs)(`article`,{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":e.blueprintId,style:{display:`grid`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`,gap:16,padding:12,borderBottom:`1px solid var(--ggui-line2, #d6d4cb)`},children:[(0,w.jsx)(`ul`,{className:`ggui-stack__list`,style:{listStyle:`none`,margin:0,padding:0},children:(0,w.jsx)(J,{blueprint:e,index:t,onPreview:d,onSetDefault:e=>{f(e)},onDelete:e=>{p(e)},compareSelected:r.includes(e.blueprintId),onCompareToggle:m})}),(0,w.jsx)(Pl,{blueprint:e,height:240})]},e.blueprintId))})]})]})}function Xl({contract:e,contractHash:t,onSubmit:n,onCancel:r,generatorSlugs:i}){let[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)({kind:`idle`}),_=async t=>{t.preventDefault();let r;if(d.trim().length>0)try{let e=JSON.parse(d);if(typeof e!=`object`||!e||Array.isArray(e)){g({kind:`error`,message:`context must be a JSON object (e.g. {"foo": "bar"})`});return}r=e}catch(e){g({kind:`error`,message:`context JSON parse failed — ${e instanceof Error?e.message:String(e)}`});return}g({kind:`pending`});let i={contract:e,...l.length>0?{generator:l}:{},...a.trim().length>0?{persona:a.trim()}:{},...r===void 0?{}:{context:r},...s.trim().length>0?{seedPrompt:s.trim()}:{},...p?{setAsOperatorDefault:!0}:{}};try{let e=await n(i);`error`in e&&g({kind:`error`,message:e.error})}catch(e){g({kind:`error`,message:e instanceof Error?e.message:String(e)})}},v=i??Il;return(0,w.jsxs)(`form`,{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":h.kind,className:`ggui-form`,onSubmit:_,children:[(0,w.jsxs)(Zl,{title:`contract`,num:`GEN / 01`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 8px`},children:[`Contract hash`,` `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[t.slice(0,16),`…`]}),` `,`— read-only; create variants for the same contract here.`]}),(0,w.jsx)(`pre`,{className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:200,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(e,null,2)})]}),(0,w.jsxs)(Zl,{title:`variance`,num:`GEN / 02`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-gen-persona`,name:`persona`,"data-ggui-variant-generate-persona":!0,placeholder:`e.g. minimalist, data-dense, mobile-first`,value:a,onChange:e=>o(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-seed`,children:`seed prompt`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-seed`,name:`seedPrompt`,"data-ggui-variant-generate-seed":!0,placeholder:`e.g. use a glassy card with rounded corners…`,value:s,onChange:e=>c(e.target.value),rows:3})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-context`,children:`context (JSON object, optional)`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-context`,name:`context`,"data-ggui-variant-generate-context":!0,placeholder:`{"locale": "en", "density": "compact"}`,value:d,onChange:e=>f(e.target.value),rows:3,spellCheck:!1,style:{fontFamily:`var(--ggui-font-family-mono, monospace)`}})]})]}),(0,w.jsxs)(Zl,{title:`dispatch`,num:`GEN / 03`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-gen-generator`,name:`generator`,"data-ggui-variant-generate-generator":!0,value:l,onChange:e=>u(e.target.value),children:[(0,w.jsx)(`option`,{value:``,children:`(registry default)`}),v.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-gen-set-default`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-gen-set-default`,"data-ggui-variant-generate-set-default":!0,type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),(0,w.jsx)(`span`,{className:`ggui-label`,style:{margin:0},children:`pin as operator default for this contract`})]})]}),h.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)(W,{tone:`signal`,children:`error`}),` `,h.message]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,w.jsx)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-variant-generate-submit":!0,disabled:h.kind===`pending`,children:h.kind===`pending`?`generating…`:`generate →`}),r?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:r,disabled:h.kind===`pending`,children:`cancel`}):null]})]})}function Zl({title:e,num:t,children:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:16},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:n})]})}function Ql({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await Kl({contractHash:e},t.signal);if(t.signal.aborted)return;if(r.blueprints.length===0){n({kind:`empty`});return}let i=r.blueprints[0];n({kind:`ready`,contract:i.contract,variantCount:r.blueprints.length})}catch(e){if(t.signal.aborted)return;let r=e instanceof Vl||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / generate`,title:`Author a new variant.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Forks the contract from an existing variant in this group and dispatches it through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_ops_generate_blueprint`}),` `,`with your persona + context + seed prompt. The new blueprint persists under the same`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`.`]})}),(0,w.jsx)(`div`,{style:{marginBottom:16},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin/variants/${encodeURIComponent(e)}`),children:`← contract detail`})}),t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading contract…`}):t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)(W,{tone:`signal`,children:`error`}),` `,`Couldn't load contract — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin/variants`),children:`← all variants`})]})]}):t.kind===`empty`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No variant exists for hash`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` yet.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`The generate form needs an existing variant to fork the contract from. Either trigger a render from an agent first (which will mint the initial variant), or navigate back and pick a contract with at least one variant.`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin/variants`),children:`← all variants`})]})]}):(0,w.jsx)(Xl,{contract:t.contract,contractHash:e,onSubmit:async e=>{try{let t=await Gl(e);return k(`/preview/${encodeURIComponent(t.blueprintId)}`),{blueprintId:t.blueprintId}}catch(e){return{error:e instanceof Vl||e instanceof Error?e.message:String(e)}}},onCancel:()=>k(`/admin/variants/${encodeURIComponent(e)}`)})]})}function $l(e){let t=new Map;for(let n of e){let e=t.get(n.contractHash);e?e.push(n):t.set(n.contractHash,[n])}return Array.from(t.entries()).map(([e,t])=>{let n=[...t].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}),r=n[0];return{contractHash:e,intent:r!==void 0&&typeof r.contract==`object`&&r.contract!==null&&`intent`in r.contract&&typeof r.contract.intent==`string`?r.contract.intent:`(contract ${e.slice(0,10)}…)`,blueprints:n}}).sort((e,t)=>{let n=e.blueprints[0]?.createdAt??``;return(t.blueprints[0]?.createdAt??``).localeCompare(n)})}function eu({blueprints:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let s=(0,S.useMemo)(()=>$l(e),[e]);return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No blueprints for this app yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate one via the per-contract page, or wait for an agent to render a contract through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_handshake`}),`.`]})]})]}):(0,w.jsx)(`div`,{"data-ggui-variants-list":!0,"aria-label":`blueprint variants`,children:s.map(e=>(0,w.jsx)(tu,{group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o},e.contractHash))})}function tu({group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let[s,c]=(0,S.useState)(!0),l=e.blueprints.filter(e=>G(e,t));return(0,w.jsxs)(`section`,{"data-ggui-variants-group":!0,"data-ggui-variants-group-hash":e.contractHash,"data-ggui-variants-group-count":l.length,className:`ggui-stack`,style:{marginBottom:24},children:[(0,w.jsxs)(`header`,{className:`ggui-stack__head`,style:{alignItems:`center`,gap:12},children:[(0,w.jsxs)(`button`,{type:`button`,"aria-expanded":s,"data-ggui-variants-group-toggle":!0,onClick:()=>c(e=>!e),className:`ggui-stack__num`,style:{background:`transparent`,border:`none`,font:`inherit`,cursor:`pointer`,color:`inherit`,padding:0},children:[s?`▾`:`▸`,` VAR`]}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:e.intent}),(0,w.jsxs)(W,{tone:`ink`,children:[l.length,l.length===e.blueprints.length?``:` / ${e.blueprints.length}`,` `,`variant`,l.length===1?``:`s`]}),(0,w.jsxs)(`code`,{className:`ggui-code`,style:{marginLeft:`auto`,fontSize:`0.75rem`},children:[e.contractHash.slice(0,16),`…`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-open":!0,onClick:()=>a(e.contractHash),children:`open →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-generate":!0,onClick:()=>o(e.contractHash),children:`generate variant +`})]}),s?l.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No variants in this group match the active filters.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:l.map((e,t)=>(0,w.jsx)(J,{blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i},e.blueprintId))}):null]})}function nu(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(Rl),i=(0,S.useCallback)(async e=>{t({kind:`loading`});try{let n=await Kl({},e);t({kind:`ready`,blueprints:n.blueprints})}catch(n){if(e?.aborted)return;let r=n instanceof Vl||n instanceof Error?n.message:String(n);t({kind:`error`,message:r})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return i(e.signal),()=>e.abort()},[i]);let a=(0,S.useCallback)(e=>{k(`/preview/${encodeURIComponent(e)}`)},[]),o=(0,S.useCallback)(async e=>{try{await ql({blueprintId:e,isOperatorDefault:!0}),await i()}catch(e){let n=e instanceof Vl||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),s=(0,S.useCallback)(async e=>{try{await Jl({blueprintId:e}),await i()}catch(e){let n=e instanceof Vl||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),c=(0,S.useCallback)(e=>{k(`/admin/variants/${encodeURIComponent(e)}`)},[]),l=(0,S.useCallback)(e=>{k(`/admin/variants/${encodeURIComponent(e)}/generate`)},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / variants`,title:`Blueprint variants — N codes per contract.`,mute:`Operator-pinned defaults · validatorScore · personas.`,intro:(0,w.jsx)(w.Fragment,{children:`Every blueprint variant the server has for the current app, grouped by the contract they implement. The matcher picks among siblings in a group at handshake time — pin one as the operator default to fix the floor, or seed personas for the LLM selector (MVB-6) to choose from.`})}),e.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)(W,{tone:`signal`,children:`error`}),` Couldn't load variants — `,e.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{i()},children:`retry →`})]})]}):null,(0,w.jsx)(zl,{filters:n,onChange:r}),e.kind===`loading`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`loading`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`})})]}):e.kind===`ready`?(0,w.jsx)(eu,{blueprints:e.blueprints,filters:n,onPreview:a,onSetDefault:e=>{o(e)},onDelete:e=>{s(e)},onOpenContract:c,onGenerate:l}):null]})}function ru(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(null),o=async()=>{t({kind:`loading`});try{let e=await fetch(`/ggui/console/oauth-clients`,{headers:{accept:`application/json`}});if(!e.ok){if(e.status===404){t({kind:`error`,message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{o()},[]);let s=async e=>{r(e);try{let n=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(e)}`,{method:`DELETE`});if(n.status!==204){t({kind:`error`,message:`revoke failed — server returned ${n.status}`});return}a(null),await o()}catch(e){t({kind:`error`,message:`revoke failed — ${String(e)}`})}finally{r(null)}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / clients`,title:`Connected apps.`,mute:`OAuth clients that have registered against this server.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/oauth/register`}),` against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:`,` `,(0,w.jsx)(`strong`,{children:`existing bearers keep working`}),` until they expire or you re-pair.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading clients…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:[`Couldn't load clients — `,e.message]}):(0,w.jsx)(iu,{clients:e.data.clients,revokingId:n,pendingConfirm:i,onRevokeRequest:e=>a(e),onRevokeCancel:()=>a(null),onRevokeConfirm:e=>{s(e)},onRefresh:()=>{o()}})]})}function iu({clients:e,revokingId:t,pendingConfirm:n,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a,onRefresh:o}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-stack`,"data-ggui-clients-list":!0,"aria-label":`connected apps (empty)`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:`0`})]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No clients have registered yet. Add this server as a custom connector in claude.ai (or another MCP host) — its OAuth flow will register a client here.`})]}):(0,w.jsxs)(`div`,{"data-ggui-clients-list":!0,className:`ggui-stack`,"aria-label":`connected apps`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.length}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:o,style:{marginLeft:`auto`},children:`refresh`})]}),(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:e.map((e,o)=>(0,w.jsx)(au,{client:e,index:o+1,isRevoking:t===e.clientId,isPendingConfirm:n===e.clientId,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a},e.clientId))})]})}function au({client:e,index:t,isRevoking:n,isPendingConfirm:r,onRevokeRequest:i,onRevokeCancel:a,onRevokeConfirm:o}){let s=e.clientId.slice(0,12),c=e.clientName??s;return(0,w.jsxs)(`li`,{"data-ggui-client-id":e.clientId,className:`ggui-stack__entry`,style:{opacity:n?.5:1},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CON / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:c})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`id `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[s,`…`]})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`registered`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:ou(e.createdAt)})]})]}),e.redirectUris.length>0?(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:4},children:(0,w.jsxs)(`span`,{children:[`redirect`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:``]})}):null,(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:r?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>o(e.clientId),children:n?`revoking…`:`confirm revoke`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,disabled:n,onClick:a,children:`cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>i(e.clientId),children:`revoke`})})]})}function ou(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}var su=new Set([`theme`]),cu={blueprints:{path:`/admin/blueprints`,label:`browse blueprints →`,mute:`The Blueprints page renders every entry with its primitives + props.`},primitives:{path:`/admin/blueprints`,label:`browse primitives →`,mute:`Primitives surface alongside blueprints on the Blueprints page.`},mcpMounts:{path:`/admin/tools`,label:`open Tools →`,mute:`The Tools page lists every mounted MCP tool with its handler + schema.`},storage:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows render + vector-store backends as live wiring.`},agent:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows agent + generation wiring.`}};function lu(){let[e,t]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/config`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]),e.kind===`loading`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Probing project root.`}),(0,w.jsx)(yu,{title:`loading`,num:`CFG / 01`,tone:`draft`,children:`Loading config…`})]}):e.kind===`error`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Endpoint unreachable.`}),(0,w.jsxs)(yu,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load config — `,e.message,`.`]})]}):(0,w.jsx)(uu,{data:e.data})}function uu({data:e}){let t=(0,S.useMemo)(()=>Object.keys(e.schema.properties??{}).filter(e=>!su.has(e)),[e.schema]),[n,r]=(0,S.useState)(t[0]??``),i=e.source.found?e.source.error?`found-invalid`:`found-valid`:`missing`;return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-config-source":i,children:[(0,w.jsx)(T,{num:`01 / admin / config`,title:`ggui.json — read-only manifest view.`,mute:du(e),intro:(0,w.jsxs)(w.Fragment,{children:[`Debug view of every top-level field your`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` can carry. Descriptions come from the Zod schema; the value column shows what your manifest currently sets (or the schema default when omitted). To `,(0,w.jsx)(`strong`,{children:`author`}),` theme, paired keys, OAuth providers, etc., use the dedicated pages in the admin sub-nav — this page is just for inspection.`]})}),(0,w.jsx)(fu,{data:e}),i===`found-invalid`?null:(0,w.jsxs)(`div`,{className:`ggui-config-stack`,children:[(0,w.jsx)(pu,{sections:t,active:n,onSelect:r}),(0,w.jsx)(mu,{data:e,active:n})]}),e.source.found&&`raw`in e&&e.raw?(0,w.jsx)(vu,{raw:e.raw}):null]})}function du(e){return e.source.found?e.source.error?`Validation failed.`:`Loaded from disk.`:`No ggui.json reachable.`}function fu({data:e}){return e.source.found?e.source.error?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`validation failed`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`signal`,children:`invalid`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})}),(0,w.jsx)(`pre`,{className:`ggui-config-error`,children:e.source.error.message})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`source`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`live`,children:`loaded`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`no manifest`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`ink`,children:`missing`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` walked up from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.searchedFrom}),`. The schema below shows what would be configurable; create a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` at the project root and reload.`]})]})]})}function pu({sections:e,active:t,onSelect:n}){return(0,w.jsx)(`nav`,{"aria-label":`config sections`,"data-ggui-config-active-section":t,children:(0,w.jsx)(`ul`,{className:`ggui-config-tabs`,role:`tablist`,children:e.map(e=>(0,w.jsx)(`li`,{"data-ggui-config-section":e,role:`presentation`,children:(0,w.jsx)(`button`,{type:`button`,role:`tab`,onClick:()=>n(e),"aria-selected":e===t?`true`:`false`,"aria-current":e===t?`true`:void 0,className:`ggui-config-tabs__btn${e===t?` is-active`:``}`,children:e})},e))})})}function mu({data:e,active:t}){let n=e.schema.properties?.[t],r=e.source.found&&`manifest`in e&&e.manifest?e.manifest[t]:void 0,i=e.schema.required?.includes(t)??!1;if(!n)return(0,w.jsx)(`div`,{className:`ggui-config-panel`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No schema for "`,t,`".`]})});let a=cu[t];return(0,w.jsxs)(`div`,{className:`ggui-config-panel`,"data-ggui-config-section":t,children:[(0,w.jsxs)(`div`,{className:`ggui-config-panel__head`,children:[(0,w.jsx)(`span`,{className:`ggui-config-panel__name`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t})}),i?(0,w.jsx)(W,{tone:`signal`,children:`required`}):(0,w.jsx)(W,{tone:`ink`,children:`optional`}),(0,w.jsx)(`span`,{className:`ggui-config-panel__type`,children:hu(n)})]}),a?(0,w.jsx)(gu,{link:a}):null,n.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`12px 0`},children:n.description}):(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No description on the schema — file a bug if this is a known field.`}),(0,w.jsx)(_u,{label:`current`,value:r,absentNote:`not set in your manifest — schema default applies`}),n.default===void 0?(0,w.jsx)(_u,{label:`default`,value:void 0,absentNote:`no default — must be set explicitly when used`}):(0,w.jsx)(_u,{label:`default`,value:n.default}),n.enum?(0,w.jsx)(_u,{label:`allowed`,value:n.enum}):null,(0,w.jsxs)(`div`,{style:{marginTop:16},children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:6,textTransform:`uppercase`,letterSpacing:`0.12em`},children:`schema`}),(0,w.jsx)(`pre`,{className:`ggui-config-schema`,children:JSON.stringify(n,null,2)})]})]})}function hu(e){return e.const===void 0?e.enum?`enum (${e.enum.length})`:e.type===`array`?`array`:e.type===`object`?`object`:typeof e.type==`string`?e.type:`unknown`:`literal "${String(e.const)}"`}function gu({link:e}){return(0,w.jsxs)(`div`,{"data-ggui-config-cross-link":e.path,style:{marginTop:8,padding:`10px 12px`,background:`var(--ggui-paper-2)`,border:`1px solid var(--ggui-line-1)`,borderRadius:2,display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(e.path),style:{fontSize:12},children:e.label}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:12,flex:1},children:e.mute})]})}function _u({label:e,value:t,absentNote:n}){return(0,w.jsxs)(`div`,{className:`ggui-config-value-row`,children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:4,textTransform:`uppercase`,letterSpacing:`0.12em`},children:e}),t===void 0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0},children:n??`—`}):(0,w.jsx)(`pre`,{className:`ggui-config-value`,children:JSON.stringify(t,null,2)})]})}function vu({raw:e}){let[t,n]=(0,S.useState)(!1);return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:24},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`raw ggui.json`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RAW / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>n(e=>!e),"aria-expanded":t,children:[t?`hide`:`show`,` raw bytes`]}),t?(0,w.jsx)(`pre`,{className:`ggui-config-raw`,"data-ggui-config-raw":!0,children:e}):null]})]})}function yu({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function bu(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/llm-trace/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent LLM trace.`);return}n=new EventSource(`/ggui/console/llm-trace/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7A`,title:`LLM trace.`,mute:`Live.`,intro:(0,w.jsx)(w.Fragment,{children:`Every LLM call the harness makes during generation — system prompt, user prompt, tool defs, completion, token counts. Anthropic only for now; OpenAI / Google / OpenRouter slot in later. Bounded ring buffer — most recent 200 events stay in memory.`})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-llm-trace-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No LLM calls yet. Trigger a generation (push a prompt through your MCP client) and they'll appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-llm-trace-list":!0,children:e.map(e=>(0,w.jsx)(xu,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function xu({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.result?`${e.result.inputTokens} in · ${e.result.outputTokens} out`+(e.result.cacheRead?` · ${e.result.cacheRead} cache hit`:``)+(e.result.cacheCreated?` · ${e.result.cacheCreated} cache write`:``):`—`,a=e.error?`error`:`ok`;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-llm-trace-event":e.id,"data-ggui-llm-trace-status":a,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:r}),(0,w.jsxs)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[e.provider,`/`,e.model]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:e.kind}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:i}),e.error?(0,w.jsx)(`span`,{style:{fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},children:`error`}):null]}),t?(0,w.jsx)(Su,{event:e}):null]})}function Su({event:e}){return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(Cu,{label:`error`,children:(0,w.jsx)(`pre`,{style:wu,children:e.error.message})}):null,e.systemPrompt?(0,w.jsx)(Cu,{label:`system prompt`,children:(0,w.jsx)(`pre`,{style:wu,children:e.systemPrompt})}):null,e.userPrompt?(0,w.jsx)(Cu,{label:`user prompt`,children:(0,w.jsx)(`pre`,{style:wu,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?(0,w.jsx)(Cu,{label:`tools (${e.tools.length})`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.tools.map(e=>(0,w.jsxs)(`li`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,padding:`2px 0`},children:[(0,w.jsx)(`strong`,{children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[` — `,e.description]})]},e.name))})}):null,e.result?.text?(0,w.jsx)(Cu,{label:`completion text`,children:(0,w.jsx)(`pre`,{style:wu,children:e.result.text})}):null,e.result?.toolCalls&&e.result.toolCalls.length>0?(0,w.jsx)(Cu,{label:`tool calls (${e.result.toolCalls.length})`,children:(0,w.jsx)(`pre`,{style:wu,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,e.result?.turnsUsed?(0,w.jsx)(Cu,{label:`agentic turns`,children:(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.result.turnsUsed})}):null]})}function Cu({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var wu={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function Tu(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/validator/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent validator trace.`);return}n=new EventSource(`/ggui/console/validator/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7B`,title:`Validator tier results.`,mute:`Live.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`runCheck()`}),` the harness performs during generation — which axis-checks fired, which tier-0 deterministic checks failed, what the runtime- render probe surfaced, what the LLM evaluator flagged. Bounded ring buffer — most recent 200 events stay in memory.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-validator-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No validator runs yet. Trigger a generation (push a prompt through your MCP client) and tier results will appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-validator-list":!0,children:e.map(e=>(0,w.jsx)(Eu,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function Eu({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.issues.filter(e=>e.result===`fail`).length,a=e.issues.filter(e=>e.result===`warn`).length,o=i>0?`fail`:a>0?`warn`:`pass`,s=e.harnessId.length>12?e.harnessId.slice(0,12)+`…`:e.harnessId;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-validator-event":e.id,"data-ggui-validator-outcome":o,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`,flexWrap:`wrap`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:r}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},title:e.harnessId,children:s}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:e.workflowId}),(0,w.jsx)(Du,{label:`axis`,count:e.summary.axisIssues}),(0,w.jsx)(Du,{label:`tier-0`,count:e.summary.tierIssues}),(0,w.jsx)(Du,{label:`probe`,count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),(0,w.jsx)(Du,{label:`llm`,count:e.summary.llmIssues}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(Ou,{outcome:o,fails:i,warns:a})]}),t?(0,w.jsx)(ku,{event:e}):null]})}function Du({label:e,count:t,dimmed:n}){return(0,w.jsxs)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,opacity:n?.4:t>0?1:.7},children:[e,` `,t]})}function Ou({outcome:e,fails:t,warns:n}){let r=e===`pass`?`pass`:e===`warn`?`${n} warn`:`${t} fail`;return(0,w.jsx)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},"data-ggui-validator-pill":e,children:r})}function ku({event:e}){let t=Au(e.issues);return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(Mu,{label:`error`,children:(0,w.jsx)(`pre`,{style:Nu,children:e.error.message})}):null,(0,w.jsx)(Mu,{label:`harness`,children:(0,w.jsxs)(`div`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[(0,w.jsxs)(`div`,{children:[`id: `,e.harnessId]}),(0,w.jsxs)(`div`,{children:[`workflow: `,e.workflowId]}),(0,w.jsxs)(`div`,{children:[`compiled: `,e.hadCompiledCode?`yes`:`no — checks skipped`]}),(0,w.jsxs)(`div`,{children:[`runtime-render: `,e.skippedRuntimeRender?`skipped`:`ran`]})]})}),(0,w.jsx)(Mu,{label:`classification`,children:(0,w.jsx)(`div`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:Object.entries(e.classification).map(([e,t])=>(0,w.jsxs)(`div`,{children:[e,`: `,String(t)]},e))})}),e.summary.firedCheckIds.length>0?(0,w.jsx)(Mu,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:(0,w.jsx)(`pre`,{style:Nu,children:e.summary.firedCheckIds.join(`
139
+ `)})}):null,t.axis.length>0?(0,w.jsx)(Mu,{label:`axis issues (${t.axis.length})`,children:(0,w.jsx)(ju,{issues:t.axis})}):null,t.tier0.length>0?(0,w.jsx)(Mu,{label:`tier-0 issues (${t.tier0.length})`,children:(0,w.jsx)(ju,{issues:t.tier0})}):null,t.tier1.length>0?(0,w.jsx)(Mu,{label:`tier-1 issues (${t.tier1.length})`,children:(0,w.jsx)(ju,{issues:t.tier1})}):null,t.tier2.length>0?(0,w.jsx)(Mu,{label:`tier-2 issues (${t.tier2.length})`,children:(0,w.jsx)(ju,{issues:t.tier2})}):null,e.prompt?(0,w.jsx)(Mu,{label:`prompt`,children:(0,w.jsx)(`pre`,{style:Nu,children:e.prompt})}):null,e.sourceCode?(0,w.jsx)(Mu,{label:`source under check`,children:(0,w.jsx)(`pre`,{style:Nu,children:e.sourceCode})}):null]})}function Au(e){let t=[],n=[],r=[],i=[];for(let a of e){if(typeof a.subcategory==`string`&&a.subcategory.startsWith(`axis.`)){t.push(a);continue}a.tier===0?n.push(a):a.tier===1?r.push(a):i.push(a)}return{axis:t,tier0:n,tier1:r,tier2:i}}function ju({issues:e}){return(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:8},children:e.map((e,t)=>(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`6px 8px`,background:`var(--ggui-paper-2, #efeee8)`},"data-ggui-validator-issue":e.category,"data-ggui-validator-issue-result":e.result,children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,flexWrap:`wrap`,fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:[(0,w.jsx)(`span`,{style:{padding:`0 4px`,border:`1px solid var(--ggui-rule)`},children:e.result}),(0,w.jsx)(`span`,{style:{fontWeight:500},children:e.category}),e.subcategory?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.subcategory}):null,e.priority?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.priority}):null,e.severity?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.severity}):null,typeof e.line==`number`?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`line `,e.line]}):null]}),(0,w.jsx)(`div`,{style:{fontSize:12,marginTop:4},children:e.description}),e.fix?(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:12,marginTop:2},children:[`fix: `,e.fix]}):null]},t))})}function Mu({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var Nu={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function Pu(e){return e===`synth-ok`?`synth-ok`:e===`synth-fail`?`synth-fail`:e===`push-classify`?`classify`:e===`match-exact`||e===`match-semantic`||e===`hit`?`match`:`miss`}function Fu(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),[c,l]=(0,S.useState)(`all`),[u,d]=(0,S.useState)(`all`),f=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{f.current.has(e.id)||(f.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/cache/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)f.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent cache trace.`);return}n=new EventSource(`/ggui/console/cache/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let p=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},m=Iu(e),h=Lu(e),g=c===`all`?e:c===`no-strategy`?e.filter(e=>e.strategy===void 0):e.filter(e=>e.strategy===c),_=u===`all`?g:g.filter(e=>e.agentClassification===u);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7C`,title:`Cache decisions.`,mute:`Live.`,intro:(0,w.jsx)(w.Fragment,{children:`Every blueprint-cache lookup the matcher runs — query intent, threshold, top-k candidate similarity scores, and the outcome (MATCH on canonical-key equality or judge accept; MISS on no-match buckets; SYNTH for cold-path contract synthesis; PUSH for paired-push confirm-vs-override classification). Quality-overlay chips surface validator findings on synth output, cosine novelty distance from the registry, and the agent's confirm-vs-override rate against the handshake's provisional. Filter by strategy or agent disposition to slice the stream. Bounded ring buffer — most recent 200 events stay in memory.`})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-cache-trace-error":!0,children:i}):null,(0,w.jsx)(Ru,{filter:c,onFilter:l,counts:m}),(0,w.jsx)(zu,{filter:u,onFilter:d,counts:h}),e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No cache lookups yet. Trigger a generation (push a prompt through your MCP client) and decisions will appear here as they fire.`}):null,e.length>0&&_.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No events for this strategy. Try a different filter.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-cache-trace-list":!0,children:_.map(e=>(0,w.jsx)(Bu,{event:e,expanded:o.has(e.id),onToggle:()=>p(e.id)},e.id))})]})]})]})}function Iu(e){let t=0,n=0,r=0;for(let i of e)i.strategy===`exact-key`?t+=1:i.strategy===`semantic`?n+=1:r+=1;return{all:e.length,"exact-key":t,semantic:n,"no-strategy":r}}function Lu(e){let t=0,n=0;for(let r of e)r.agentClassification===`confirm`?t+=1:r.agentClassification===`override`&&(n+=1);return{all:e.length,confirm:t,override:n}}function Ru({filter:e,onFilter:t,counts:n}){return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},"data-ggui-cache-trace-filter":!0,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginRight:4},children:`strategy`}),[{key:`all`,label:`all`},{key:`exact-key`,label:`exact-key`},{key:`semantic`,label:`semantic`},{key:`no-strategy`,label:`no-strategy`}].map(r=>{let i=e===r.key,a=n[r.key];return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t(r.key),style:{all:`unset`,cursor:`pointer`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:11,padding:`2px 8px`,border:`1px solid var(--ggui-rule)`,background:i?`var(--ggui-ink)`:`transparent`,color:i?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-filter-key":r.key,"data-ggui-cache-trace-filter-active":i?`true`:`false`,children:[r.label,` · `,a]},r.key)})]})}function zu({filter:e,onFilter:t,counts:n}){return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},"data-ggui-cache-trace-classification-filter":!0,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginRight:4},children:`agent`}),[{key:`all`,label:`all`},{key:`confirm`,label:`confirm`},{key:`override`,label:`override`}].map(r=>{let i=e===r.key,a=n[r.key];return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t(r.key),style:{all:`unset`,cursor:`pointer`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:11,padding:`2px 8px`,border:`1px solid var(--ggui-rule)`,background:i?`var(--ggui-ink)`:`transparent`,color:i?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-classification-key":r.key,"data-ggui-cache-trace-classification-active":i?`true`:`false`,children:[r.label,` · `,a]},r.key)})]})}function Bu({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=Pu(e.decision),a=i===`match`&&e.winningBlueprintId,o=e.candidates[0],s=o?o.score.toFixed(3):`—`,c=e.intent.length>80?`${e.intent.slice(0,80)}…`:e.intent;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-cache-trace-event":e.id,"data-ggui-cache-trace-decision":e.decision,...e.strategy?{"data-ggui-cache-trace-strategy":e.strategy}:{},...e.agentClassification?{"data-ggui-cache-trace-classification":e.agentClassification}:{},children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:r}),(0,w.jsx)(Vu,{outcome:i}),e.strategy?(0,w.jsx)(Hu,{strategy:e.strategy}):null,e.agentClassification?(0,w.jsx)(Uu,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?(0,w.jsx)(Wu,{count:e.validatorFindings.length,severity:e.validatorFindings.some(e=>e.severity===`error`)?`error`:`warn`}):null,(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:c||(0,w.jsx)(`span`,{className:`ggui-muted`,children:`(empty intent)`})}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:[`top `,s]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),a?(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},children:e.winningBlueprintId}):null]}),t?(0,w.jsx)(Gu,{event:e}):null]})}function Vu({outcome:e}){let t=e===`match`||e===`synth-ok`;return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:11,padding:`0 8px`,border:`1px solid var(--ggui-rule)`,background:t?`var(--ggui-ink)`:`transparent`,color:t?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-outcome":e,children:e===`match`?`MATCH`:e===`synth-ok`||e===`synth-fail`?`SYNTH`:e===`classify`?`PUSH`:`MISS`})}function Hu({strategy:e}){return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:10,padding:`0 6px`,border:`1px dashed var(--ggui-rule)`,background:`transparent`,color:`var(--ggui-ink)`,letterSpacing:`0.05em`,textTransform:`lowercase`},children:e})}function Uu({classification:e}){let t=e===`confirm`;return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:10,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,background:t?`var(--ggui-ink)`:`transparent`,color:t?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-classification-chip":e,children:e})}function Wu({count:e,severity:t}){return(0,w.jsxs)(`span`,{title:t===`error`?`Validator emitted at least one error finding — synth dropped the contract.`:`Validator emitted warning findings — contract was returned but flagged.`,style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:10,padding:`0 6px`,border:t===`error`?`1px solid var(--ggui-ink)`:`1px dashed var(--ggui-rule)`,background:`transparent`,color:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-validator-severity":t,children:[t===`error`?`err`:`warn`,` · `,e]})}function Gu({event:e}){return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[(0,w.jsx)(X,{label:`reason`,children:(0,w.jsx)(`p`,{style:{margin:0,fontSize:13},children:e.reason})}),(0,w.jsx)(X,{label:`decision class`,children:(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[(0,w.jsx)(`span`,{children:e.decision}),e.strategy?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`· strategy = `,e.strategy]}):null,e.agentClassification?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`· classification = `,e.agentClassification]}):null]})}),e.agentClassification?(0,w.jsx)(X,{label:`agent classification`,children:(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[(0,w.jsx)(Uu,{classification:e.agentClassification}),(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.agentClassification===`confirm`?`agent render contract canonicalizes to the handshake plan key`:`agent render contract diverges from the handshake plan key`})]})}):null,e.cosineNoveltyDistance===void 0?null:(0,w.jsx)(X,{label:`cosine novelty distance`,children:(0,w.jsx)(`div`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},title:`1 - top.cosine. Higher = farther from any registered blueprint. Track over time to spot synth fragmentation.`,children:e.cosineNoveltyDistance.toFixed(3)})}),e.validatorFindings&&e.validatorFindings.length>0?(0,w.jsx)(X,{label:`validator findings (${e.validatorFindings.length})`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.validatorFindings.map((t,n)=>(0,w.jsxs)(`li`,{style:{padding:`4px 0`,borderBottom:n<(e.validatorFindings?.length??0)-1?`1px solid var(--ggui-rule)`:`none`,display:`grid`,gap:2},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`},children:[(0,w.jsx)(Wu,{count:1,severity:t.severity}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:t.kind})]}),(0,w.jsx)(`div`,{style:{fontSize:12},children:t.hint})]},`${t.kind}-${n}`))})}):null,(0,w.jsx)(X,{label:`intent`,children:(0,w.jsx)(`pre`,{style:Ku,children:e.intent||`(empty)`})}),(0,w.jsx)(X,{label:`scope / threshold`,children:(0,w.jsxs)(`div`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[(0,w.jsxs)(`div`,{children:[`scope = `,(0,w.jsx)(`strong`,{children:e.scope})]}),(0,w.jsxs)(`div`,{children:[`threshold = `,(0,w.jsx)(`strong`,{children:e.threshold})]}),(0,w.jsxs)(`div`,{children:[`expectedKey = `,(0,w.jsx)(`strong`,{children:e.expectedKey||`(none)`})]}),e.winningBlueprintId?(0,w.jsxs)(`div`,{children:[`winningBlueprintId = `,(0,w.jsx)(`strong`,{children:e.winningBlueprintId})]}):null]})}),(0,w.jsx)(X,{label:`candidates (${e.candidates.length})`,children:e.candidates.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:`No candidates returned by the vector store.`}):(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.candidates.map((t,n)=>{let r=e.winningBlueprintId!==void 0&&t.key===e.winningBlueprintId;return(0,w.jsxs)(`li`,{style:{padding:`4px 0`,borderBottom:n<e.candidates.length-1?`1px solid var(--ggui-rule)`:`none`,display:`grid`,gap:4},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`},children:[(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,fontWeight:r?600:400},children:t.key}),r?(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:10},children:`(winner)`}):null,(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:t.score.toFixed(3)})]}),t.cachedIntent?(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:t.cachedIntent}):null]},`${t.key}-${n}`)})})})]})}function X({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var Ku={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function qu(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`idle`}),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(0);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/timeline/renders`,{signal:e.signal,headers:{accept:`application/json`},credentials:`same-origin`});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>e.abort()},[]);let c=(0,S.useCallback)(e=>{a(e),s(0),r({kind:`loading`,sessionId:e})},[]);return(0,S.useEffect)(()=>{if(!i)return;let e=new AbortController;return(async()=>{try{let t=await fetch(`/ggui/console/timeline/${encodeURIComponent(i)}/events`,{signal:e.signal,headers:{accept:`application/json`},credentials:`same-origin`}),n=await t.json();if(!t.ok&&t.status!==404){r({kind:`error`,sessionId:i,message:`server returned ${t.status}`});return}r({kind:`ready`,sessionId:i,data:n}),s(Math.max(0,n.events.length-1))}catch(t){if(e.signal.aborted)return;r({kind:`error`,sessionId:i,message:t instanceof Error?t.message:String(t)})}})(),()=>e.abort()},[i]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7D`,title:`Render timeline.`,mute:`Snapshot.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Pick a render, then step through its event log chronologically. Each event carries the full`,(0,w.jsx)(`code`,{className:`ggui-code`,children:` GguiSessionEvent.data `}),`payload — useful for answering “what was the UI state at event N?” without a live tail.`]})}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`minmax(260px, 320px) 1fr`,gap:16,alignItems:`start`},children:[(0,w.jsx)(Ju,{state:e,pickedSessionId:i,onPick:c}),(0,w.jsx)(Xu,{state:n,scrubIndex:o,onScrub:s})]})]})}function Ju({state:e,pickedSessionId:t,onPick:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`renders`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`renders`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e.kind===`loading`?`loading…`:e.kind===`error`?`error`:`${e.data.sessions.length} / ${e.data.total}`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,style:{padding:0},children:e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading renders…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-timeline-sessions-error":!0,children:[`Couldn't load renders — `,e.message,`.`]}):e.data.sessions.length===0?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`No renders yet. Render from an agent (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`) to create one.`]}):(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,maxHeight:520,overflowY:`auto`},children:e.data.sessions.map(e=>(0,w.jsx)(Yu,{render:e,selected:e.sessionId===t,onClick:()=>n(e.sessionId)},e.sessionId))})})]})}function Yu({render:e,selected:t,onClick:n}){let r=e.sessionId.slice(0,12),i=e.status===`active`?`live`:e.status===`expired`?`signal`:`ink`;return(0,w.jsx)(`li`,{"data-ggui-timeline-session-id":e.sessionId,"data-ggui-timeline-session-selected":t?`true`:`false`,style:{borderBottom:`1px solid var(--ggui-rule)`},children:(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,width:`100%`,padding:`10px 12px`,display:`block`,background:t?`var(--ggui-paper-2, #efeee8)`:`transparent`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,marginBottom:4},children:[(0,w.jsxs)(`code`,{className:`ggui-code`,style:{fontSize:12,fontFamily:`var(--ggui-font-family-mono)`},children:[r,`…`]}),(0,w.jsx)(W,{tone:i,children:e.status})]}),(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:11},children:[`app `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.appId}),` · stream`,` `,e.streamSeq]}),(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:11,marginTop:2},children:[`last `,nd(e.lastActivityAt)]})]})})}function Xu({state:e,scrubIndex:t,onScrub:n}){return e.kind===`idle`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 7D`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Pick a render on the left to load its event log.`})})]}):e.kind===`loading`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`loading…`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Loading events for`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:ed(e.sessionId)}),`…`]})})]}):e.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`error`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,"data-ggui-timeline-events-error":!0,children:[`Couldn't load events — `,e.message,`.`]})})]}):(0,w.jsx)(Zu,{state:e,scrubIndex:t,onScrub:n})}function Zu({state:e,scrubIndex:t,onScrub:n}){let{events:r,status:i,streamSeq:a}=e.data,o=r.length,s=(0,S.useMemo)(()=>o===0?0:Math.max(0,Math.min(t,o-1)),[t,o]),c=o>0?r[s]:null,l=(0,S.useCallback)(()=>{o!==0&&n(Math.max(0,s-1))},[n,s,o]),u=(0,S.useCallback)(()=>{o!==0&&n(Math.min(o-1,s+1))},[n,s,o]),d=(0,S.useCallback)(()=>n(0),[n]),f=(0,S.useCallback)(()=>{o!==0&&n(o-1)},[n,o]);return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:ed(e.sessionId)})}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:o===0?`no events`:`${s+1} / ${o}`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},children:[(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`status`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:i})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`stream cursor`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:a})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`inbound events`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:o})]})]}),o===0?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No events recorded for this render yet. Inbound user actions, tool calls, and UI mutations land here as the agent runs — open the iframe and interact to populate.`}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,onClick:d,disabled:s===0,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`start`,children:`⟪ start`}),(0,w.jsx)(`button`,{type:`button`,onClick:l,disabled:s===0,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`prev`,children:`‹ prev`}),(0,w.jsx)(`input`,{type:`range`,min:0,max:o-1,value:s,onChange:e=>n(Number(e.target.value)),"aria-label":`event scrubber`,"data-ggui-timeline-scrubber":!0,style:{flex:1,minWidth:160}}),(0,w.jsx)(`button`,{type:`button`,onClick:u,disabled:s>=o-1,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`next`,children:`next ›`}),(0,w.jsx)(`button`,{type:`button`,onClick:f,disabled:s>=o-1,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`end`,children:`end ⟫`})]}),c?(0,w.jsx)(Qu,{event:c}):null]})]})]})}function Qu({event:e}){return(0,w.jsxs)(`div`,{"data-ggui-timeline-event-seq":e.seq,"data-ggui-timeline-event-type":e.type,style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`baseline`,marginBottom:8},children:[(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:[`seq `,e.seq]}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:e.type}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:td(e.timestamp)})]}),(0,w.jsx)(`pre`,{style:$u,children:rd(e.data)})]})}var $u={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:420,overflow:`auto`};function ed(e){return e.length>16?`${e.slice(0,16)}…`:e}function td(e){try{return new Date(e).toISOString().slice(11,23)}catch{return String(e)}}function nd(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function rd(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function id(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/payloads/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent payloads.`);return}n=new EventSource(`/ggui/console/payloads/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7E`,title:`Payloads.`,mute:`Live.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` and`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_update`}),` tool call as it lands on the handler — exactly the JSON the agent sent. Useful when contract drift or the agent paraphrases an intent. Bounded ring buffer — most recent 100 payloads stay in memory.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-payloads-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No payloads yet. Trigger a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` from your MCP client and it'll appear here as it lands.`]}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-payloads-list":!0,children:e.map(e=>(0,w.jsx)(ad,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function ad({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.sessionId.length>8?`${e.sessionId.slice(0,8)}…`:e.sessionId,a=e.direction===`inbound-render`?`inbound`:`outbound`;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-payloads-event":e.id,"data-ggui-payloads-direction":e.direction,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:r}),(0,w.jsx)(`span`,{style:{fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`},children:a}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:e.tool}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`},children:i}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:ld(e.byteSize)})]}),t?(0,w.jsx)(od,{event:e}):null]})}function od({event:e}){let t=cd(e.payload);return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[(0,w.jsx)(sd,{label:`session`,children:(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:12},children:[e.sessionId,` · app `,e.appId]})}),(0,w.jsx)(sd,{label:`payload`,children:(0,w.jsx)(`pre`,{style:ud,children:t})})]})}function sd({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-family-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}function cd(e){try{return JSON.stringify(e,null,2)??`undefined`}catch{return`[unstringifiable]`}}function ld(e){return!Number.isFinite(e)||e<0?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var ud={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-family-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:400,overflow:`auto`},dd=`ggui-console:benchmark-dashboard-url`,fd=`https://benchmarks.ggui.ai`;function pd(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=localStorage.getItem(dd);e&&(t(e),r(e))},[]);let i=e=>{let n=e.trim();t(n),n?localStorage.setItem(dd,n):localStorage.removeItem(dd)};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 06`,title:`Benchmarks dashboard.`,mute:`GGUI_MODE=dev`,intro:(0,w.jsxs)(w.Fragment,{children:[`Embed a `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`@ggui-ai/benchmark`}),` `,`dashboard. Default points at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`benchmarks.ggui.ai`}),` (the public ggui-protocol leaderboard); paste any URL serving the same shape to view your own runs.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`dashboard URL`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 06`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i(n)},style:{display:`flex`,gap:8},children:[(0,w.jsx)(`input`,{type:`url`,value:n,onChange:e=>r(e.target.value),placeholder:fd,spellCheck:!1,autoComplete:`off`,style:{flex:1,padding:`8px 10px`,fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,fontSize:13,border:`1px solid var(--ggui-rule)`,background:`var(--ggui-paper)`,color:`var(--ggui-ink)`}}),(0,w.jsx)(`button`,{type:`submit`,className:`ggui-btn`,disabled:n.trim()===e.trim(),children:`load`}),e&&(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--muted`,onClick:()=>{r(``),i(``)},children:`clear`})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:12,fontSize:13,lineHeight:1.5},children:[`URL persists across reloads. Local dev:`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`npx serve ./bench-results`}),` then paste `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`http://localhost:3000`}),`.`]})]})]}),e&&(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:16},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 06.1`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,style:{padding:0},children:(0,w.jsx)(`iframe`,{src:e,title:`Benchmarks dashboard`,style:{width:`100%`,height:`78vh`,border:`none`,background:`var(--ggui-paper)`}})})]})]})}var md={"devtools-llm-trace":{title:`LLM trace`,slice:`7a`,answers:`Why is my generation slow / wrong?`},"devtools-validator":{title:`Validator tier results`,slice:`7b`,answers:`Which check failed, and what did the LLM emit?`},"devtools-cache":{title:`Cache hit/miss + feature vectors`,slice:`7c`,answers:`Why didn't this match my saved blueprint?`},"devtools-timeline":{title:`Render event timeline`,slice:`7d`,answers:`What was the UI state at each event?`},"devtools-payloads":{title:`Raw render/update payloads`,slice:`7e`,answers:`What did the agent actually send me?`},"devtools-benchmarks":{title:`Benchmarks dashboard`,slice:`7f`,answers:`How do providers/models score on the public corpus?`}};function hd({route:e}){return e.kind===`devtools-index`?(0,w.jsx)(gd,{}):e.kind===`devtools-llm-trace`?(0,w.jsx)(bu,{}):e.kind===`devtools-validator`?(0,w.jsx)(Tu,{}):e.kind===`devtools-cache`?(0,w.jsx)(Fu,{}):e.kind===`devtools-timeline`?(0,w.jsx)(qu,{}):e.kind===`devtools-payloads`?(0,w.jsx)(id,{}):e.kind===`devtools-benchmarks`?(0,w.jsx)(pd,{}):(0,w.jsx)(gd,{})}function gd(){return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 00`,title:`Dev-mode debug surfaces.`,mute:`GGUI_MODE=dev`,intro:(0,w.jsxs)(w.Fragment,{children:[`Default for `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui dev`}),`. Each surface answers a different question about the last generation; sub-slices ship one at a time.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`surfaces`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},children:Object.entries(md).map(([e,t])=>(0,w.jsxs)(`li`,{"data-ggui-devtools-surface":e,style:{display:`flex`,justifyContent:`space-between`,gap:16,padding:`10px 0`,borderBottom:`1px solid var(--ggui-rule)`},children:[(0,w.jsxs)(`div`,{style:{minWidth:0},children:[(0,w.jsx)(`div`,{style:{fontWeight:500},children:t.title}),(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:13},children:t.answers})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12,whiteSpace:`nowrap`},children:[`Slice `,t.slice]})]},e))})})]})]})}function _d(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),m=async()=>{t({kind:`loading`});try{let e=await fetch(`/ggui/console/keys`,{headers:{accept:`application/json`}});if(e.status===401){k(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(!e.ok){if(e.status===404){t({kind:`error`,message:"Pairing not enabled on this server — re-run `ggui serve` (pairing is on by default for the OSS bundle)."});return}t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{m()},[]);let h=async e=>{r(e);try{let n=await fetch(`/ggui/console/keys/${encodeURIComponent(e)}`,{method:`DELETE`});if(n.status===401){k(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(n.status!==204){t({kind:`error`,message:`revoke failed — server returned ${n.status}`});return}a(null),await m()}catch(e){t({kind:`error`,message:`revoke failed — ${String(e)}`})}finally{r(null)}},g=async e=>{e.preventDefault(),d(null);let t=o.trim();if(t.length===0){d(`Device name is required.`);return}l(!0);try{let e=await fetch(`/ggui/console/keys`,{method:`POST`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({deviceName:t})});if(e.status===401){k(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(!e.ok){d(`mint failed — server returned ${e.status}`);return}let n=await e.json();p(n),s(``),await m()}catch(e){d(`mint failed — ${String(e)}`)}finally{l(!1)}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / keys`,title:`Paired bearer tokens.`,mute:`Personal-mode bearers minted by /pair.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each row is a paired bearer minted by the pairing service — paste these into MCP clients (Claude Desktop, claude.ai) as the `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`Authorization: Bearer`}),` `,`header. Tokens are stored in plaintext on disk (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/keys.json`}),` by default); treat this page like`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ssh/`}),` — anyone with view access can copy a bearer.`]})}),(0,w.jsx)(vd,{deviceName:o,onDeviceName:s,minting:c,error:u,result:f,onSubmit:e=>{g(e)},onDismissResult:()=>p(null)}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading keys…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-keys-error":!0,children:[`Couldn't load keys — `,e.message]}):(0,w.jsx)(bd,{keys:e.data.keys,revokingId:n,pendingConfirm:i,onRevokeRequest:e=>a(e),onRevokeCancel:()=>a(null),onRevokeConfirm:e=>{h(e)},onRefresh:()=>{m()}})]})}function vd({deviceName:e,onDeviceName:t,minting:n,error:r,result:i,onSubmit:a,onDismissResult:o}){return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`mint a new key`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`KEY / NEW`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`form`,{className:`ggui-form`,onSubmit:a,children:(0,w.jsxs)(`div`,{className:`ggui-form__row`,children:[(0,w.jsx)(`label`,{className:`ggui-field`,"aria-label":`device name for the new key`,children:(0,w.jsx)(`input`,{type:`text`,placeholder:`device name (e.g. Claude Desktop, iPhone)`,value:e,onChange:e=>t(e.target.value),disabled:n,maxLength:256})}),(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-key-mint":!0,disabled:n||e.trim().length===0,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`minting…`:`mint`]})]})}),r?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:10},children:r}):null,i?(0,w.jsx)(yd,{result:i,onDismiss:o}):null]})]})}function yd({result:e,onDismiss:t}){let[n,r]=(0,S.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e.token),r(!0),window.setTimeout(()=>r(!1),2e3)}catch{}};return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`new bearer minted — copy it now`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`KEY / FRESH`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:0},children:[`Paste this into your MCP client's`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`Authorization: Bearer`}),` `,`header. The plaintext stays visible until you dismiss this card — there's no second-fetch path; close the page and you'll need to copy it from the table below or mint a fresh one.`]}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginTop:12},children:[(0,w.jsx)(`code`,{className:`ggui-code`,style:{flex:1,padding:10,wordBreak:`break-all`,userSelect:`all`},children:e.token}),(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{i()},children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`copied`:`copy`]})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:12},children:[(0,w.jsxs)(`span`,{children:[`device `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.deviceName})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`id `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.pairingId})]})]}),(0,w.jsx)(`div`,{style:{marginTop:14},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:t,children:`dismiss`})})]})]})}function bd({keys:e,revokingId:t,pendingConfirm:n,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a,onRefresh:o}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-stack`,"data-ggui-keys-list":!0,"aria-label":`paired keys (empty)`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`KEY`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`paired keys`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:`0`})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`No keys minted yet. Use the form above to mint one, or complete a `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`POST /pair`}),` from a viewer client to land a row here.`]})]}):(0,w.jsxs)(`div`,{"data-ggui-keys-list":!0,className:`ggui-stack`,"aria-label":`paired keys`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`KEY`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`paired keys`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.length}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:o,style:{marginLeft:`auto`},children:`refresh`})]}),(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:e.map((e,o)=>(0,w.jsx)(Z,{entry:e,index:o+1,isRevoking:t===e.pairingId,isPendingConfirm:n===e.pairingId,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a},e.pairingId))})]})}function Z({entry:e,index:t,isRevoking:n,isPendingConfirm:r,onRevokeRequest:i,onRevokeCancel:a,onRevokeConfirm:o}){return(0,w.jsxs)(`li`,{"data-ggui-key-id":e.pairingId,className:`ggui-stack__entry`,style:{opacity:n?.5:1},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`KEY / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.deviceName})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`id `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.pairingId})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`minted`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:xd(e.createdAt)})]}),e.lastUsedAt===void 0?null:(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`used`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:xd(e.lastUsedAt)})]})]}),(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:6},children:(0,w.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[`token`,` `,e.token===null?(0,w.jsx)(`code`,{className:`ggui-code`,children:`— rotated, re-pair to recover`}):(0,w.jsx)(`code`,{className:`ggui-code`,style:{wordBreak:`break-all`,userSelect:`all`},children:e.token})]})}),(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:r?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-key-revoke":!0,disabled:n,onClick:()=>o(e.pairingId),children:n?`revoking…`:`confirm revoke`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,disabled:n,onClick:a,children:`cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-key-revoke":!0,disabled:n,onClick:()=>i(e.pairingId),children:`revoke`})})]})}function xd(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Sd(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/mcp/tools`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let i=n.trim().toLowerCase(),a=(0,S.useMemo)(()=>e.kind===`ready`?i.length===0?e.data.tools:e.data.tools.filter(e=>[e.name,e.title??``,e.description].join(` `).toLowerCase().includes(i)):null,[e,i]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / mcp`,title:`Registered MCP tools.`,mute:`Read-only inventory.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every tool this server registered with the MCP runtime — same set `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`tools/list`}),` `,`returns over JSON-RPC, rendered as expandable cards. Click a row to see its input + output JSON Schema.`,` `,(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Test-invoke from the browser is deferred — for now, exercise tools via your paired MCP client.`})]})}),e.kind===`loading`?(0,w.jsx)(Ed,{title:`loading`,num:`MCP / 01`,tone:`draft`,children:`Loading tool inventory…`}):e.kind===`error`?(0,w.jsxs)(Ed,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load tools — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-mcp-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-mcp-filter`,name:`filter`,"aria-label":`filter tools`,placeholder:`substring match over name, title, description…`,value:n,onChange:e=>r(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsx)(Cd,{all:e.data.tools,shown:a??e.data.tools,filterActive:i.length>0})]})]})}function Cd({all:e,shown:t,filterActive:n}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`MCP / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No tools registered.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`This server booted without any handlers — unusual for a full `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),`. Check the boot config.`]})]})]}):(0,w.jsxs)(`div`,{"data-ggui-mcp-list":!0,className:`ggui-stack`,"aria-label":`mcp tools`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`MCP`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`registered tools`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No tools match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsx)(wd,{tool:e,index:t+1},e.name))})]})}function wd({tool:e,index:t}){let[n,r]=(0,S.useState)(!1);return(0,w.jsxs)(`li`,{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":n?`true`:`false`,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,style:{background:`transparent`,border:0,padding:0,width:`100%`,textAlign:`left`,cursor:`pointer`,color:`inherit`,font:`inherit`},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`MCP / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.name})}),e.title?(0,w.jsx)(W,{tone:`ink`,children:e.title}):null,(0,w.jsx)(`span`,{className:`ggui-muted`,style:{marginLeft:`auto`,fontFamily:`var(--ggui-mono)`,fontSize:11},children:n?`−`:`+`})]}),e.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`8px 0 0`},children:e.description}):null]}),n?(0,w.jsxs)(`div`,{style:{marginTop:12,display:`grid`,gap:12},children:[(0,w.jsx)(Td,{label:`input`,schema:e.inputSchema}),(0,w.jsx)(Td,{label:`output`,schema:e.outputSchema})]}):null]})}function Td({label:e,schema:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:6,textTransform:`uppercase`,letterSpacing:`0.12em`},children:e}),(0,w.jsx)(`pre`,{"data-ggui-mcp-schema":e,style:{margin:0,padding:12,background:`var(--ggui-paper-2)`,border:`1px solid var(--ggui-line-2)`,borderRadius:2,fontFamily:`var(--ggui-mono)`,fontSize:11,lineHeight:1.5,overflow:`auto`,maxHeight:320,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(t,null,2)})]})}function Ed({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function Dd(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/sessions`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let i=n.trim().toLowerCase(),a=(0,S.useMemo)(()=>e.kind===`ready`?i.length===0?e.data.sessions:e.data.sessions.filter(e=>[e.sessionId,e.shortCode??``,e.appId].join(` `).toLowerCase().includes(i)):null,[e,i]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / sessions`,title:`Live sessions.`,mute:`Active only — render from an agent to create one.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every row is an active GguiSession on this server. A session has a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`shortCode`}),` once one is minted by `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`.`]})}),e.kind===`loading`?(0,w.jsx)(Md,{title:`loading`,num:`SES / 01`,tone:`draft`,children:`Loading sessions…`}):e.kind===`error`?(0,w.jsxs)(Md,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load sessions — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-sessions-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-sessions-filter`,name:`filter`,"aria-label":`filter session entries`,placeholder:`substring match over sessionId, shortCode, appId…`,value:n,onChange:e=>r(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsx)(Od,{all:e.data.sessions,shown:a??e.data.sessions,filterActive:i.length>0})]})]})}function Od({all:e,shown:t,filterActive:n}){return e.length===0?(0,w.jsx)(jd,{}):(0,w.jsxs)(`div`,{"data-ggui-sessions-list":!0,className:`ggui-stack`,"aria-label":`active sessions`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`SES`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`live sessions`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No sessions match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsx)(kd,{render:e,index:t+1},e.sessionId))})]})}function kd({render:e,index:t}){let n=e.sessionId.slice(0,8),r=e.status===`active`?`live`:e.status===`expired`?`signal`:`ink`;return(0,w.jsxs)(`li`,{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`SES / ${String(t).padStart(2,`0`)}`}),(0,w.jsxs)(`span`,{className:`ggui-stack__entry-title`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:n}),`…`]}),(0,w.jsx)(W,{tone:r,children:e.status})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`app `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.appId})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`last active`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:Ad(e.lastActivityAt)})]})]}),(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:e.shortCode?(0,w.jsxs)(`span`,{children:[`shortCode`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.shortCode})]}):(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`No shortCode — render via`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` to mint one.`]})})]})}function Ad(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function jd(){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SES / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No sessions yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Render from an agent (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`) to start a generation — new sessions appear here on reload.`]})]})]})}function Md({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function Nd(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/info`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ok`,info:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),(async()=>{try{let t=await fetch(`/ggui/console/sessions?limit=3`,{signal:e.signal,headers:{accept:`application/json`}});if(!t.ok){r({kind:`error`});return}let n=await t.json();r({kind:`ok`,data:n})}catch{e.signal.aborted||r({kind:`error`})}})(),()=>e.abort()},[]),(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-status-dashboard":!0,children:[(0,w.jsx)(T,{num:`01 / status`,title:`What's this server doing right now?`,mute:`Every card reads a local endpoint. No hosted calls.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`playground`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`blueprints`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`tools`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`config`}),`.`]})}),(0,w.jsx)(Rd,{state:n}),(0,w.jsxs)(`div`,{className:`ggui-status-grid`,children:[(0,w.jsx)(Q,{state:e}),(0,w.jsx)(Pd,{state:e}),(0,w.jsx)(Fd,{state:e}),(0,w.jsx)(Ld,{state:e})]})]})}function Q({state:e}){return(0,w.jsx)(Bd,{num:`SRV / 01`,title:`server`,children:e.kind===`ok`?(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`name`}),(0,w.jsx)(`dd`,{children:e.info.server})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`version`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.info.version})})]}),e.info.description?(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`description`}),(0,w.jsx)(`dd`,{children:e.info.description})]}):null]})}):e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Loading server identity…`}):(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Couldn't reach `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/ggui/console/info`}),` `,`— `,e.message,`.`]})})}function Pd({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Bd,{num:`PAR / 01`,title:`pairing`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let{enabled:t,pending:n}=e.info.pairing;if(!t)return(0,w.jsxs)(Bd,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`ink`,children:`disabled`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`This server was composed with`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`pairing: false`}),`. Pass`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`pairing: true`}),` at boot to enable per-device auth.`]})]});if(!n)return(0,w.jsxs)(Bd,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`live`,children:`idle`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Pairing is enabled. No pair code is pending — mint one via the CLI (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui pair`}),`) or the admin route.`]})]});let r=Math.max(0,Math.round((n.codeExpiresAt-Date.now())/1e3));return(0,w.jsxs)(Bd,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)(W,{tone:`draft`,children:`pending`})}),(0,w.jsx)(`p`,{className:`ggui-code`,style:{fontSize:24,letterSpacing:`0.08em`,margin:`8px 0`},children:n.code}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Valid for `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[r,`s`]}),`. Paste into a paired client or`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`POST /pair`}),` with the bearer.`]})]})}function Fd({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Bd,{num:`CAP / 01`,title:`capabilities`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let t=e.info.capabilities;return(0,w.jsx)(Bd,{num:`CAP / 01`,title:`capabilities`,children:(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`tools`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.toolCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`blueprints`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.blueprintCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`primitives`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.primitiveCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`agent`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(W,{tone:t.agentWired?`live`:`ink`,children:t.agentWired?`wired`:`off`})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`generation`}),(0,w.jsx)(`dd`,{children:Id(t.generation)})]})]})})}function Id(e){return e.wired?e.hasCredentials?(0,w.jsx)(W,{tone:`live`,children:`ready`}):(0,w.jsx)(W,{tone:`draft`,children:`needs key`}):(0,w.jsx)(W,{tone:`ink`,children:`off`})}function Ld({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Bd,{num:`STG / 01`,title:`storage`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let t=e.info.storage,n=e=>e===`custom`?`live`:`draft`;return(0,w.jsxs)(Bd,{num:`STG / 01`,title:`storage`,children:[(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`renders`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(W,{tone:n(t.renderStore),children:t.renderStore})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`vectors`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(W,{tone:n(t.vectorStore),children:t.vectorStore})})]})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:12},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:`memory`}),` = in-process default (loss on restart). `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`custom`}),` = operator-wired store.`]})]})}function Rd({state:e}){if(e.kind===`loading`)return(0,w.jsx)(`div`,{className:`ggui-status-hero`,"data-ggui-status-hero":`loading`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Loading live sessions…`})});if(e.kind===`error`)return(0,w.jsx)(`div`,{className:`ggui-status-hero`,"data-ggui-status-hero":`error`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Couldn't reach `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/ggui/console/sessions`}),`.`]})});if(e.data.sessions.length===0)return(0,w.jsxs)(`div`,{className:`ggui-status-hero ggui-status-hero--empty`,"data-ggui-status-hero":`empty`,children:[(0,w.jsx)(`div`,{className:`ggui-status-hero__head`,children:(0,w.jsxs)(`span`,{className:`ggui-status-hero__eyebrow`,children:[(0,w.jsx)(W,{tone:`ink`,children:`idle`}),(0,w.jsx)(`span`,{children:`live sessions`})]})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0},children:[`No sessions yet. Open`,` `,(0,w.jsx)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>k(`/`),children:`playground`}),` `,`to start one, or point an agent at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`.`]})]});let t=e.data.sessions,n=t.slice(0,3);return(0,w.jsxs)(`div`,{className:`ggui-status-hero ggui-status-hero--active`,"data-ggui-status-hero":`active`,"data-ggui-live-session-count":String(t.length),children:[(0,w.jsx)(`div`,{className:`ggui-status-hero__head`,children:(0,w.jsxs)(`span`,{className:`ggui-status-hero__eyebrow`,children:[(0,w.jsx)(W,{tone:`live`,children:`live`}),(0,w.jsxs)(`span`,{children:[t.length,` `,t.length===1?`session`:`sessions`]})]})}),(0,w.jsx)(`ul`,{className:`ggui-status-hero__list`,children:n.map(e=>(0,w.jsx)(`li`,{className:`ggui-status-hero__row`,"data-ggui-dashboard-session-id":e.sessionId,children:(0,w.jsxs)(`div`,{className:`ggui-status-hero__row-main`,children:[e.shortCode?(0,w.jsx)(`code`,{className:`ggui-code`,"data-ggui-status-hero-shortcode":e.shortCode,children:e.shortCode}):(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.sessionId.slice(0,8),`…`]}),(0,w.jsx)(`span`,{className:`ggui-muted`,children:zd(e.lastActivityAt)})]})},e.sessionId))}),t.length>n.length?(0,w.jsx)(`div`,{className:`ggui-status-hero__foot`,children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>k(`/admin/sessions`),children:[`view all `,t.length,` →`]})}):(0,w.jsx)(`div`,{className:`ggui-status-hero__foot`,children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>k(`/admin/sessions`),children:`view all →`})})]})}function zd(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function Bd({num:e,title:t,children:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:t}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:n})]})}var Vd={version:2,tokens:`--ggui-color-container.--ggui-color-elevated.--ggui-color-error.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-errorContainer.--ggui-color-ground.--ggui-color-ground-gradient.--ggui-color-ground-subtle.--ggui-color-heroGround.--ggui-color-heroLink.--ggui-color-heroOutline.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-infoContainer.--ggui-color-inverseLink.--ggui-color-inverseOutline.--ggui-color-link.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-neutral-900.--ggui-color-onContainer.--ggui-color-onElevated.--ggui-color-onError.--ggui-color-onErrorContainer.--ggui-color-onGround.--ggui-color-onHeroGround.--ggui-color-onInfoContainer.--ggui-color-onInverted.--ggui-color-onPrimary.--ggui-color-onPrimaryContainer.--ggui-color-onSuccessContainer.--ggui-color-onSunken.--ggui-color-onTertiaryContainer.--ggui-color-onWarningContainer.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-primaryContainer.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-successContainer.--ggui-color-sunken.--ggui-color-tertiaryContainer.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-color-warningContainer.--ggui-flash-color.--ggui-font-family-heading.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-heading.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-letter-spacing-heading.--ggui-motion-duration-base.--ggui-motion-duration-fast.--ggui-motion-duration-slow.--ggui-motion-easing-emphasized.--ggui-motion-easing-exit.--ggui-motion-easing-standard.--ggui-scrim-opacity.--ggui-scrim-tint.--ggui-shape-radius-control.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}.tokens,Hd=[`--ggui-color-primary`,`--ggui-color-ground-gradient`,`--ggui-color-ground-subtle`,`--ggui-flash-color`],Ud={sans:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,mono:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`},Wd={xs:`12px`,sm:`14px`,base:`16px`,lg:`18px`,xl:`20px`,"2xl":`24px`,"3xl":`30px`,"4xl":`36px`,"5xl":`48px`,"6xl":`60px`},Gd={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},Kd={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},qd={tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`};Wd[`4xl`],Gd.bold,Kd.tight,qd.tight,Wd[`3xl`],Gd.bold,Kd.tight,qd.tight,Wd[`2xl`],Gd.semibold,Kd.snug,qd.normal,Wd.xl,Gd.semibold,Kd.snug,qd.normal,Wd.lg,Gd.semibold,Kd.normal,qd.normal,Wd.base,Gd.semibold,Kd.normal,qd.normal;var Jd={0:`0`,.5:`2px`,1:`4px`,1.5:`6px`,2:`8px`,2.5:`10px`,3:`12px`,3.5:`14px`,4:`16px`,5:`20px`,6:`24px`,7:`28px`,8:`32px`,9:`36px`,10:`40px`,11:`44px`,12:`48px`,14:`56px`,16:`64px`,20:`80px`,24:`96px`,28:`112px`,32:`128px`,36:`144px`,40:`160px`,44:`176px`,48:`192px`,52:`208px`,56:`224px`,60:`240px`,64:`256px`,72:`288px`,80:`320px`,96:`384px`},Yd={none:`0`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`,"2xl":`16px`,"3xl":`24px`,full:`9999px`},Xd={none:`none`,sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},Zd={instant:`0ms`,fast:`100ms`,normal:`200ms`,slow:`300ms`,slower:`500ms`},Qd={linear:`linear`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,easeOut:`cubic-bezier(0, 0, 0.2, 1)`,easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,spring:`cubic-bezier(0.175, 0.885, 0.32, 1.275)`},$d={duration:{fast:`var(--ggui-motion-duration-fast)`,base:`var(--ggui-motion-duration-base)`,slow:`var(--ggui-motion-duration-slow)`},easing:{standard:`var(--ggui-motion-easing-standard)`,emphasized:`var(--ggui-motion-easing-emphasized)`,exit:`var(--ggui-motion-easing-exit)`}};`${$d.duration.fast}${$d.easing.standard}`,`${$d.duration.base}${$d.easing.standard}`,`${$d.duration.slow}${$d.easing.standard}`,`${$d.duration.base}${$d.easing.standard}${$d.duration.base}${$d.easing.standard}${$d.duration.base}${$d.easing.standard}`,`${$d.duration.base}${$d.easing.standard}`,`${$d.duration.base}${$d.easing.emphasized}`;var ef=class extends Error{missing;constructor(e){super(`theme document invalid: missing ${e.join(`, `)}`),this.name=`ThemeDocumentInvalidError`,this.missing=e}};function tf(e){return e<0?0:e>1?1:e}function nf(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function rf(e){let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.round(tf(t)*255)}function af(e){let t=e.trim().replace(/^#/,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t;if(!/^[0-9a-fA-F]{6}$/.test(n))throw new ef([`colour ${JSON.stringify(e)} is not 6-digit hex`]);return[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]}function of(e,t,n){let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*a,1.9779984951*r-2.428592205*i+.4505937099*a,.0259040371*r+.7827717662*i-.808675766*a]}function sf(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*a,-1.2684380046*r+2.6097574011*i-.3413193965*a,-.0041960863*r-.7034186147*i+1.707614701*a]}function cf(e){let[t,n,r]=af(e),[i,a,o]=of(nf(t),nf(n),nf(r)),s=Math.hypot(a,o);return{l:i,c:s,h:s<1e-6?0:(Math.atan2(o,a)*180/Math.PI+360)%360}}var lf=e=>Math.round(e*1e4)/1e4;function uf(e){return e.every(e=>e>=-1e-6&&e<=1.000001)}function df(e){let t=tf(lf(e.l)),n=lf((e.h%360+360)%360),r=Math.max(0,lf(e.c)),i=e=>{let r=n*Math.PI/180;return sf(t,e*Math.cos(r),e*Math.sin(r))},a=i(r);if(!uf(a)){let e=0,t=r;for(let n=0;n<24;n++){let n=(e+t)/2;uf(i(n))?e=n:t=n}r=e,a=i(r)}let[o,s,c]=a.map(tf);return`#${[o,s,c].map(e=>rf(e).toString(16).padStart(2,`0`)).join(``)}`}function ff(e,t,n){let r=cf(e),i=cf(t),a=i.h-r.h;r.c<1e-4||i.c<1e-4?a=0:a>180?a-=360:a<-180&&(a+=360);let o=r.c<1e-4?i.h:r.h+a*n;return df({l:r.l+(i.l-r.l)*n,c:r.c+(i.c-r.c)*n,h:o})}function pf(e){let[t,n,r]=af(e);return .2126*nf(t)+.7152*nf(n)+.0722*nf(r)}function mf(e,t){let n=pf(e),r=pf(t),[i,a]=n>r?[n,r]:[r,n];return(i+.05)/(a+.05)}var hf=[`50`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],gf=[.97,.93,.86,.76,.66,NaN,.5,.42,.34,.26],_f=[.15,.3,.5,.75,.9,1,.95,.85,.7,.55],vf=[.04,.08,.16,.28,.44,.58,.7,.8,.9,.96],yf=[`primary`,`tertiary`,`success`,`warning`,`error`,`info`],bf={xs:`4px`,sm:`8px`,md:`16px`,lg:`24px`,xl:`32px`,"2xl":`48px`},xf={xs:-2,sm:-1,base:0,lg:1,xl:2,"2xl":3,"3xl":4,"4xl":5},Sf={display:`4xl`,h1:`3xl`,h2:`2xl`,body:`base`,label:`xs`},Cf=4,wf=`0.45`;function Tf(e){if(typeof e!=`object`||!e||!(`$value`in e))return;let t=e.$value;if(typeof t==`number`)return String(t);if(typeof t==`string`)return/^#[0-9a-fA-F]{3,6}$/.test(t)?`#${af(t).map(e=>e.toString(16).padStart(2,`0`)).join(``)}`:t}function Ef(e){return e===null?`null`:typeof e==`object`?`$value`in e?`object with a non-string, non-number $value`:`object without $value`:`${typeof e} ${JSON.stringify(e)}`}var Df=e=>{console.warn(`[ggui-design] theme member unreadable at ${e.path} — found ${e.found}; expected a DTCG token ({ $value }). The member was ignored and the fallback used.`)};function Of(e,t,n){if(e===void 0)return;let r=Tf(e);return r===void 0&&n({kind:`member-unreadable`,path:t,found:Ef(e)}),r}function kf(e,t){return Tf(e?.[t])}function Af(e){if(e!==void 0)return e===`light`?`#ffffff`:e===`dark`?`#000000`:Tf(e)}function jf(e,t){let n={};for(let t of hf){let r=kf(e,t);r!==void 0&&(n[t]=r)}return Mf(n,t)}function Mf(e,t){let n=cf(t),r={};return hf.forEach((i,a)=>{let o=e[i];if(o!==void 0){r[i]=o;return}r[i]=i===`500`?t:df({l:gf[a],c:n.c*_f[a],h:n.h})}),r}function Nf(e){return mf(`#ffffff`,e)>=mf(`#000000`,e)?`#ffffff`:`#000000`}var Pf={light:[`600`,`700`,`800`,`900`],dark:[`600`,`500`,`400`,`300`,`200`,`100`]};function Ff(e,t,n){let r=af(e),i=af(t),a=e=>Math.round(r[e]*n+i[e]*(1-n)).toString(16).padStart(2,`0`);return`#${a(0)}${a(1)}${a(2)}`}var If=[.32,.4,.48,.56,.64,.72,.8,.9,1];function Lf(e,t){for(let n of If){let r=Ff(t,e,n);if(mf(r,e)>=3)return r}return t}function Rf(e,t,n){let r=mf(`#000000`,t)>=mf(`#ffffff`,t);for(let n of r?Pf.light:Pf.dark){let r=e[`--ggui-color-primary-${n}`];if(r!==void 0&&mf(r,t)>=4.5)return r}return n}function zf(e){let t=/^([0-9.]+)\s*(rem|px|em)$/.exec(e.trim());return t?{n:Number(t[1]),unit:t[2]}:void 0}function Bf(e,t,n={}){let r=new Set,i=n.onDiagnostic??Df,a=e=>{r.has(e.path)||(r.add(e.path),i(e))},o=Object.fromEntries(Object.entries(e.color)),s=e=>Tf(o[e]),c=e=>o[e],l={},u=[],d=e=>{let t=s(e);return t===void 0&&u.push(`color.${e}`),t??`#000000`},f=d(`ground`),p=d(`onGround`),m=d(`container`),h=d(`onContainer`),g=d(`sunken`),_=d(`onSunken`);Object.assign(l,{"--ggui-color-ground":f,"--ggui-color-onGround":p,"--ggui-color-container":m,"--ggui-color-onContainer":h,"--ggui-color-sunken":g,"--ggui-color-onSunken":_,"--ggui-color-elevated":t===`light`?m:ff(m,h,.08),"--ggui-color-onElevated":h});let v=c(`neutral`);hf.forEach((e,t)=>{l[`--ggui-color-neutral-${e}`]=kf(v,e)??ff(f,p,vf[t])}),l[`--ggui-color-outline`]=s(`outline`)??l[`--ggui-color-neutral-300`],l[`--ggui-color-outlineVariant`]=s(`outlineVariant`)??l[`--ggui-color-neutral-200`];let y=kf(c(`primary`),`500`);y===void 0&&u.push(`color.primary.500`);for(let e of yf){let n=c(e),r=e===`tertiary`?s(`tertiary`):kf(n,`500`);r===void 0&&(e===`tertiary`?r=y??`#000000`:(u.push(`color.${e}.500`),r=`#000000`));let i=jf(n,r);for(let t of hf)l[`--ggui-color-${e}-${t}`]=i[t];let a=e[0].toUpperCase()+e.slice(1);l[`--ggui-color-on${a}`]=s(`on${a}`)??Nf(i[500]),l[`--ggui-color-${e}Container`]=s(`${e}Container`)??(t===`light`?i[100]:i[800]),l[`--ggui-color-on${a}Container`]=s(`on${a}Container`)??(t===`light`?i[900]:i[100])}l[`--ggui-color-error`]=l[`--ggui-color-error-500`],l[`--ggui-color-link`]=s(`link`)??Rf(l,m,h),l[`--ggui-color-heroGround`]=t===`light`?l[`--ggui-color-primaryContainer`]:h,l[`--ggui-color-onHeroGround`]=t===`light`?l[`--ggui-color-onPrimaryContainer`]:m,l[`--ggui-color-heroLink`]=Rf(l,l[`--ggui-color-heroGround`],l[`--ggui-color-onHeroGround`]),l[`--ggui-color-inverseLink`]=Rf(l,h,m),l[`--ggui-color-onInverted`]=m,l[`--ggui-color-inverseOutline`]=Lf(h,m),l[`--ggui-color-heroOutline`]=Lf(l[`--ggui-color-heroGround`],l[`--ggui-color-onHeroGround`]);let b=e.font.family,x=Tf(b.sans)??Ud.sans;l[`--ggui-font-family-sans`]=x,l[`--ggui-font-family-mono`]=Tf(b.mono)??Ud.mono,l[`--ggui-font-family-heading`]=Tf(b.heading)??x;let S=e.font.weight;for(let e of[`normal`,`medium`,`semibold`,`bold`])l[`--ggui-font-weight-${e}`]=kf(S,e)??String(Gd[e]);l[`--ggui-font-weight-heading`]=kf(S,`heading`)??String(Gd.bold);let C=e.font.letterSpacing;l[`--ggui-letter-spacing-body`]=kf(C,`body`)??`0em`,l[`--ggui-letter-spacing-heading`]=kf(C,`heading`)??`-0.01em`;for(let e of Object.keys(Kd))l[`--ggui-font-lineHeight-${e}`]=String(Kd[e]);let w=e.font.ramp,T=w?zf(Of(w.base,`font.ramp.base`,a)??``):void 0,E=w?Number(Of(w.ratio,`font.ramp.ratio`,a)):NaN;for(let[e,t]of Object.entries(xf))l[`--ggui-font-size-${e}`]=T&&Number.isFinite(E)&&E>0?`${Math.round(T.n*E**t*1e3)/1e3}${T.unit}`:Wd[e];let D=e.typeScale;if(D!==void 0){let e=zf(Of(D.body?.size,`typeScale.body.size`,a)??``);if(e!==void 0){let t=Number.isFinite(E)&&E>0?E:1.25;for(let[n,r]of Object.entries(xf))l[`--ggui-font-size-${n}`]=`${Math.round(e.n*t**r*1e3)/1e3}${e.unit}`}for(let[e,t]of Object.entries(Sf)){let n=Of(D[e]?.size,`typeScale.${e}.size`,a);n!==void 0&&(l[`--ggui-font-size-${t}`]=n)}let t=Of(D.h1?.weight,`typeScale.h1.weight`,a);t!==void 0&&(l[`--ggui-font-weight-heading`]=t);let n=Of(D.body?.weight,`typeScale.body.weight`,a);n!==void 0&&(l[`--ggui-font-weight-normal`]=n);let r=Of(D.h1?.tracking,`typeScale.h1.tracking`,a);r!==void 0&&(l[`--ggui-letter-spacing-heading`]=r);let i=Of(D.body?.tracking,`typeScale.body.tracking`,a);i!==void 0&&(l[`--ggui-letter-spacing-body`]=i);let o=Of(D.body?.leading,`typeScale.body.leading`,a);o!==void 0&&(l[`--ggui-font-lineHeight-normal`]=o)}let O=e.spacing,ee=e.rhythm?zf(Of(e.rhythm.base,`rhythm.base`,a)??``):void 0,te=e=>{if(ee===void 0)return;let t=zf(e);if(t===void 0)return;let n=t.n/Cf*ee.n;return`${Math.round(n*1e3)/1e3}${ee.unit}`};for(let[e,t]of Object.entries(Jd))l[`--ggui-spacing-${e}`]=te(String(t))??kf(O,e)??String(t);for(let[e,t]of Object.entries(bf))l[`--ggui-spacing-${e}`]=te(t)??kf(O,e)??t;let k=e.shape?.radius;for(let[e,t]of Object.entries(Yd))l[`--ggui-shape-radius-${e}`]=kf(k,e)??String(t);l[`--ggui-shape-radius-control`]=kf(k,`control`)??l[`--ggui-shape-radius-md`];let ne=e.shape?.shadow;for(let[e,t]of Object.entries(Xd))l[`--ggui-shape-shadow-${e}`]=kf(ne,e)??String(t);let re=e.motion?.duration,ie=e.motion?.easing;if(l[`--ggui-motion-duration-fast`]=kf(re,`fast`)??Zd.fast,l[`--ggui-motion-duration-base`]=kf(re,`base`)??Zd.normal,l[`--ggui-motion-duration-slow`]=kf(re,`slow`)??Zd.slow,l[`--ggui-motion-easing-standard`]=kf(ie,`standard`)??Qd.easeInOut,l[`--ggui-motion-easing-emphasized`]=kf(ie,`emphasized`)??Qd.easeOut,l[`--ggui-motion-easing-exit`]=kf(ie,`exit`)??Qd.easeIn,l[`--ggui-scrim-tint`]=Af(e.scrim?.tone)??l[`--ggui-color-ground`],l[`--ggui-scrim-opacity`]=Tf(e.scrim?.opacity)??wf,u.length>0)throw new ef(u);let ae=new Set(Hd),A={},j=[];for(let e of Vd){if(ae.has(e))continue;let t=l[e];t===void 0?j.push(e):A[e]=t}if(j.length>0)throw Error(`deriveThemeVariables: no rule for manifest token(s) ${j.join(`, `)} — extend the §2.4 table`);return A}function Vf(e,t){return Object.entries(Bf(e,t)).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>` ${e}: ${t};`).join(`
140
+ `)}function Hf(e,t){let n=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,r=[],i;for(;(i=n.exec(t))!==null;){let e=i[1],t=i[2].trim().split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>e.endsWith(`;`)?e:`${e};`).join(` `);r.push(` ${e} { ${t} }`)}return`@keyframes ggui-${e} {\n${r.join(`
141
+ `)}\n}`}function Uf(e){let t=[];for(let[n,r]of Object.entries(e.motion.keyframes))n.startsWith(`$`)||t.push(Hf(n,String(r.$value)));return t.join(`
142
+
143
+ `)}function Wf(e,t,n=`light`){let r=`:root {\n${Vf(t,n)}\n}`,i=Uf(t),a=i?`${r}\n\n${i}`:r;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:r,cssKeyframes:i,css:a}}var Gf={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},$={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Kf={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},qf={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Jf={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{transition:qf,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},Yf={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},ground:{$value:`#f4f3ed`,$type:`color`},onGround:{$value:`#292929`,$type:`color`},sunken:{$value:`#ebe9e1`,$type:`color`},onSunken:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#f4f3ed`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Jf.font,spacing:Jf.spacing,shape:Jf.shape,motion:Jf.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Kf},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},ground:{$value:`#1f1f1f`,$type:`color`},onGround:{$value:`#f4f3ed`,$type:`color`},sunken:{$value:`#292929`,$type:`color`},onSunken:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#1f1f1f`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Jf.font,spacing:Jf.spacing,shape:Jf.shape,motion:Jf.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Kf}},Xf={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},Zf={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},ground:{$value:`#0a0a0f`,$type:`color`},onGround:{$value:`#e8e8f0`,$type:`color`},sunken:{$value:`#111118`,$type:`color`},onSunken:{$value:`#8888a0`,$type:`color`},container:{$value:`#0a0a0f`,$type:`color`},onContainer:{$value:`#e8e8f0`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Xf.font,spacing:Xf.spacing,shape:Xf.shape,motion:Xf.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Kf},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},ground:{$value:`#000005`,$type:`color`},onGround:{$value:`#e8e8f0`,$type:`color`},sunken:{$value:`#0a0a0f`,$type:`color`},onSunken:{$value:`#aaaabe`,$type:`color`},container:{$value:`#000005`,$type:`color`},onContainer:{$value:`#e8e8f0`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Xf.font,spacing:Xf.spacing,shape:Xf.shape,motion:Xf.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Kf}},Qf={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},$f={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},ground:{$value:`#faf9f7`,$type:`color`},onGround:{$value:`#2a2724`,$type:`color`},sunken:{$value:`#f3f1ed`,$type:`color`},onSunken:{$value:`#6b635b`,$type:`color`},container:{$value:`#faf9f7`,$type:`color`},onContainer:{$value:`#2a2724`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:Qf.font,spacing:Qf.spacing,shape:Qf.shape,motion:Qf.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Kf},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},ground:{$value:`#2a2724`,$type:`color`},onGround:{$value:`#f3f1ed`,$type:`color`},sunken:{$value:`#3e3a36`,$type:`color`},onSunken:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#2a2724`,$type:`color`},onContainer:{$value:`#f3f1ed`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:Qf.font,spacing:Qf.spacing,shape:Qf.shape,motion:Qf.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Kf}},ep={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},tp={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...Gf.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...Gf.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...Gf.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...Gf.dark.info,500:{$value:`#38bdf8`,$type:`color`}},ground:{$value:`#09090b`,$type:`color`},onGround:{$value:`#ececf0`,$type:`color`},sunken:{$value:`#111114`,$type:`color`},onSunken:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#09090b`,$type:`color`},onContainer:{$value:`#ececf0`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:ep.font,spacing:ep.spacing,shape:ep.shape,motion:ep.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Kf},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...Gf.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...Gf.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...Gf.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...Gf.dark.info,500:{$value:`#5acdff`,$type:`color`}},ground:{$value:`#000000`,$type:`color`},onGround:{$value:`#ececf0`,$type:`color`},sunken:{$value:`#09090b`,$type:`color`},onSunken:{$value:`#b0b0be`,$type:`color`},container:{$value:`#000000`,$type:`color`},onContainer:{$value:`#ececf0`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:ep.font,spacing:ep.spacing,shape:ep.shape,motion:ep.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Kf}},np={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:qf}},rp={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...Gf.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...Gf.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...Gf.light.error,500:{$type:`color`,$value:`#e51414`}},info:Gf.light.info,ground:{$value:`#fefcf8`,$type:`color`},onGround:{$value:`#352e20`,$type:`color`},sunken:{$value:`#fdf8ef`,$type:`color`},onSunken:{$value:`#746448`,$type:`color`},container:{$value:`#fefcf8`,$type:`color`},onContainer:{$value:`#352e20`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:np.font,spacing:np.spacing,shape:np.shape,motion:np.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Kf},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:Gf.dark.success,warning:Gf.dark.warning,error:Gf.dark.error,info:Gf.dark.info,ground:{$value:`#1f1c18`,$type:`color`},onGround:{$value:`#fefcf8`,$type:`color`},sunken:{$value:`#352e20`,$type:`color`},onSunken:{$value:`#dccba5`,$type:`color`},container:{$value:`#1f1c18`,$type:`color`},onContainer:{$value:`#fefcf8`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:np.font,spacing:np.spacing,shape:np.shape,motion:np.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Kf}},ip={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...qf,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},ap={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},ground:{$value:`#faf9f5`,$type:`color`},onGround:{$value:`#141413`,$type:`color`},sunken:{$value:`#f5f4ee`,$type:`color`},onSunken:{$value:`#56544f`,$type:`color`},container:{$value:`#faf9f5`,$type:`color`},onContainer:{$value:`#141413`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:ip.font,spacing:ip.spacing,shape:ip.shape,motion:ip.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Kf},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},ground:{$value:`#262624`,$type:`color`},onGround:{$value:`#faf9f5`,$type:`color`},sunken:{$value:`#2d2c2a`,$type:`color`},onSunken:{$value:`#a8a59f`,$type:`color`},container:{$value:`#262624`,$type:`color`},onContainer:{$value:`#faf9f5`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:ip.font,spacing:ip.spacing,shape:ip.shape,motion:ip.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Kf}},op={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:qf}},sp={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},ground:{$value:`#fafaf7`,$type:`color`},onGround:{$value:`#15131f`,$type:`color`},sunken:{$value:`#f4f4f0`,$type:`color`},onSunken:{$value:`#4a4954`,$type:`color`},container:{$value:`#fafaf7`,$type:`color`},onContainer:{$value:`#15131f`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:op.font,spacing:op.spacing,shape:op.shape,motion:op.motion,accessibility:{...$.light,focusRing:{...$.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Kf},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},ground:{$value:`#15131f`,$type:`color`},onGround:{$value:`#f5f4f9`,$type:`color`},sunken:{$value:`#221e35`,$type:`color`},onSunken:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#15131f`,$type:`color`},onContainer:{$value:`#f5f4f9`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:op.font,spacing:op.spacing,shape:op.shape,motion:op.motion,accessibility:{...$.dark,focusRing:{...$.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Kf}},cp={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Kf},lp={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},up={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},dp={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},fp={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},ground:{$value:`#1A1D24`,$type:`color`},onGround:{$value:`#F6F5EE`,$type:`color`},sunken:{$value:`#242938`,$type:`color`},onSunken:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#1A1D24`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...cp,shape:{radius:lp,shadow:up}},pp={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:fp.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},ground:{$value:`#FFFFFF`,$type:`color`},onGround:{$value:`#1A1D24`,$type:`color`},sunken:{$value:`#F6F5EE`,$type:`color`},onSunken:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FFFFFF`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...cp,shape:{radius:lp,shadow:dp}},dark:fp},mp=new Map([[`ggui`,Yf],[`indigo`,sp],[`claudic`,ap],[`premium-cyberpunk`,Zf],[`premium-zen`,$f],[`premium-neon-noir`,tp],[`premium-botanical`,rp],[`guuey-brand-v1`,pp]]);function hp(e,t){return t===`dark`&&e.dark?`dark`:`light`}function gp(e,t=`light`){let n=mp.get(e);if(n)return hp(n,t)===`dark`?n.dark:n.light}function _p(){let e=[];for(let[t,n]of mp){let r=n.dark?[`light`,`dark`]:[`light`];e.push({id:t,name:n.light.$name,description:n.light.$description,metadata:n.light.$metadata,modes:r})}return e}(0,S.createContext)(null);function vp(e,t){return e===null?{presetId:t,mode:`light`,fromFile:!1,overrides:{}}:typeof e==`string`?{presetId:e,mode:`light`,fromFile:!1,overrides:{}}:`file`in e?{presetId:t,mode:e.mode??`light`,fromFile:!0,overrides:{}}:{presetId:e.preset,mode:e.mode??`light`,fromFile:!1,overrides:e.overrides??{}}}function yp(e,t,n){let r=Object.keys(n);if(r.length===0)return{preset:e,mode:t};r.sort();let i={};for(let e of r)i[e]=n[e];return{preset:e,mode:t,overrides:i}}function bp(){let e=(0,S.useMemo)(()=>_p(),[]),t=e[0]?.id??`ggui`,[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(t),[o,s]=(0,S.useState)(`light`),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)({}),g=async()=>{r(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/console/theme`,{credentials:`include`,headers:{accept:`application/json`}});if(e.status===401){k(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(!e.ok){r({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();r({kind:`ready`,data:n});let i=vp(n.current,t);a(i.presetId),s(i.mode),p(i.fromFile),h({...i.overrides})}catch(e){r({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{g()},[]);let _=(e,t)=>{h(n=>{let r={...n};return t===null||t===``?delete r[e]:r[e]=t,r})},v=()=>{h({})},y=async e=>{if(n.kind===`ready`){d(null),l(!0);try{let t=await e.text(),n;try{n=JSON.parse(t)}catch(e){d(`upload failed — file is not valid JSON: ${String(e)}`);return}let r=e.name.replace(/[^a-zA-Z0-9._-]/g,`-`),i=/\.json$/i.test(r)?r:`${r}.json`,a=await fetch(`/ggui/console/theme/upload`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({filename:i,content:n,mode:o})});if(a.status===401){k(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(a.status===400){let e=await a.json();d(e.message??`upload rejected — ${e.error??`invalid_content`}: ${JSON.stringify(e.issue)}`);return}if(a.status===501){let e=await a.json();d(e.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!a.ok){d(`upload failed — server returned ${a.status}`);return}await g()}catch(e){d(`upload failed — ${String(e)}`)}finally{l(!1)}}},b=async()=>{if(n.kind===`ready`){d(null),l(!0);try{let e=await fetch(`/ggui/console/theme`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(yp(i,o,m))});if(e.status===401){k(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(e.status===501){let t=await e.json();d(t.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!e.ok){d(`save failed — server returned ${e.status}`);return}await g()}catch(e){d(`save failed — ${String(e)}`)}finally{l(!1)}}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / theme`,title:`Pick a theme for your generated UI.`,mute:`Persists to ggui.json#theme. Affects every UI the LLM emits — not the console chrome you’re looking at.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each preset ships a complete DTCG token tree (color, type, spacing, motion). Light + dark variants are independent — presets that haven’t shipped a dark mode fall back to light on selection. The chosen theme writes to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` and takes effect on the next generation.`]})}),n.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading themes…`}):n.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:[`Couldn’t load theme state — `,n.message]}):(0,w.jsx)(xp,{presets:e,selectedPresetId:i,mode:o,writerEnabled:n.data.writerEnabled,uploadEnabled:n.data.uploadEnabled??!1,fromFile:f,busy:c,err:u,overrides:m,onSelectPreset:a,onSelectMode:s,onSetOverride:_,onClearAllOverrides:v,onSave:()=>{b()},onUploadFile:e=>{y(e)}})]})}function xp({presets:e,selectedPresetId:t,mode:n,writerEnabled:r,uploadEnabled:i,fromFile:a,busy:o,err:s,overrides:c,onSelectPreset:l,onSelectMode:u,onSetOverride:d,onClearAllOverrides:f,onSave:p,onUploadFile:m}){let h=e.find(e=>e.id===t)?.modes.includes(`dark`)??!1,g=n===`dark`&&!h?`light`:n,_=gp(t,g);return(0,w.jsxs)(`div`,{"data-ggui-theme-layout":!0,style:{display:`flex`,gap:16,alignItems:`flex-start`},children:[(0,w.jsxs)(`aside`,{"aria-label":`theme picker controls`,style:{flex:`0 0 360px`,minWidth:320,maxWidth:400,display:`flex`,flexDirection:`column`,gap:12,position:`sticky`,top:16},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`THM`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`mode`}),(0,w.jsxs)(`span`,{style:{marginLeft:`auto`,display:`inline-flex`,gap:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`light`,onClick:()=>u(`light`),...g===`light`?{"aria-pressed":!0}:{},style:g===`light`?{fontWeight:600}:void 0,children:`◐ Light`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`dark`,onClick:()=>u(`dark`),disabled:!h,title:h?`Switch to dark variant`:`This preset hasn’t shipped a dark variant yet`,...g===`dark`?{"aria-pressed":!0}:{},style:g===`dark`?{fontWeight:600}:void 0,children:`◑ Dark`})]})]}),a?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ Current selection is a file-form theme (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ file: "..." }`}),`). Saving a preset below will replace it.`]}):null,r?null:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`Read-only — launch via `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` `,`to enable saves.`]}),(0,w.jsx)(`div`,{"data-ggui-theme-grid":!0,style:{display:`flex`,flexDirection:`column`,gap:6},children:e.map(e=>(0,w.jsx)(Dp,{preset:e,selected:e.id===t,mode:g,onSelect:()=>l(e.id)},e.id))}),(0,w.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`,paddingTop:4,borderTop:`1px solid currentColor`,marginTop:4,opacity:.95},children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-theme-save":!0,disabled:o||!r,onClick:p,style:{flex:1},children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),o?`saving…`:`Save to ggui.json`]})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:11,lineHeight:1.4},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` `,`· `,(0,w.jsx)(`code`,{className:`ggui-code`,children:g}),Object.keys(c).length>0?(0,w.jsxs)(w.Fragment,{children:[` `,`· `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`+`,Object.keys(c).length,` override`,Object.keys(c).length===1?``:`s`]})]}):null,g===n?null:(0,w.jsxs)(w.Fragment,{children:[` `,`· requested `,(0,w.jsx)(`code`,{className:`ggui-code`,children:n}),`, fell back`]})]}),(0,w.jsx)(wp,{uploadEnabled:i,busy:o,onUploadFile:m}),s?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,color:`#c0392b`,fontSize:12},"data-ggui-theme-error":!0,children:s}):null,_?(0,w.jsx)(Tp,{rawTheme:_,overrides:c,onSetOverride:d,onClearAll:f}):(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ `,(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset.`]})]}),(0,w.jsx)(`main`,{"aria-label":`theme preview`,style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:12},children:_?(0,w.jsx)(kp,{presetId:t,mode:g,rawTheme:_,overrides:c}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`preview unavailable`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`PRV / 00`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t a registered preset on this build, so there’s no token tree to paint from. Pick another preset on the left.`]})})]})})]})}function Sp(e){let t=e=>{let t=e.$value;return typeof t==`string`?t:JSON.stringify(t)},n=(e,n)=>Object.keys(n).sort((e,t)=>{let n=Number(e),r=Number(t);return Number.isFinite(n)&&Number.isFinite(r)?n-r:e.localeCompare(t)}).map(r=>({path:`${e}.${r}`,value:t(n[r])})),r=[];r.push({label:`Color · Primary`,prefix:`color.primary`,leaves:n(`color.primary`,e.color.primary)}),r.push({label:`Color · Neutral`,prefix:`color.neutral`,leaves:n(`color.neutral`,e.color.neutral??{})}),r.push({label:`Color · Success`,prefix:`color.success`,leaves:n(`color.success`,e.color.success)}),r.push({label:`Color · Warning`,prefix:`color.warning`,leaves:n(`color.warning`,e.color.warning)}),r.push({label:`Color · Error`,prefix:`color.error`,leaves:n(`color.error`,e.color.error)}),r.push({label:`Color · Info`,prefix:`color.info`,leaves:n(`color.info`,e.color.info)}),r.push({label:`Color · Roles`,prefix:`color`,leaves:[{path:`color.ground`,value:t(e.color.ground)},{path:`color.onGround`,value:t(e.color.onGround)},{path:`color.container`,value:t(e.color.container)},{path:`color.onContainer`,value:t(e.color.onContainer)},{path:`color.sunken`,value:t(e.color.sunken)},{path:`color.onSunken`,value:t(e.color.onSunken)},...e.color.outline===void 0?[]:[{path:`color.outline`,value:t(e.color.outline)}],...e.color.outlineVariant===void 0?[]:[{path:`color.outlineVariant`,value:t(e.color.outlineVariant)}]]}),r.push({label:`Shape · Radius`,prefix:`shape.radius`,leaves:n(`shape.radius`,e.shape.radius)}),r.push({label:`Shape · Shadow`,prefix:`shape.shadow`,leaves:n(`shape.shadow`,e.shape.shadow)});let i=[{path:`font.family.sans`,value:t(e.font.family.sans)}];return e.font.family.mono&&i.push({path:`font.family.mono`,value:t(e.font.family.mono)}),r.push({label:`Font · Family`,prefix:`font.family`,leaves:i}),e.font.ramp!==void 0&&r.push({label:`Font · Ramp`,prefix:`font.ramp`,leaves:[{path:`font.ramp.base`,value:t(e.font.ramp.base)},{path:`font.ramp.ratio`,value:t(e.font.ramp.ratio)}]}),r.push({label:`Font · Weight`,prefix:`font.weight`,leaves:n(`font.weight`,e.font.weight)}),r.push({label:`Spacing`,prefix:`spacing`,leaves:n(`spacing`,e.spacing)}),r.filter(e=>e.leaves.length>0)}var Cp=`https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md`;function wp({uploadEnabled:e,busy:t,onUploadFile:n}){return(0,w.jsxs)(`div`,{"data-ggui-theme-custom-row":!0,style:{display:`flex`,flexDirection:`column`,gap:6,paddingTop:8,marginTop:4,borderTop:`1px dashed currentColor`,opacity:.95},children:[e?(0,w.jsxs)(`label`,{className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-upload":!0,style:{display:`inline-flex`,alignItems:`center`,gap:8,cursor:t?`not-allowed`:`pointer`,justifyContent:`center`},children:[(0,w.jsx)(`input`,{type:`file`,accept:`.json,application/json`,disabled:t,onChange:e=>{let t=e.target.files?.[0];t!==void 0&&n(t),e.target.value=``},style:{position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0,0,0,0)`,whiteSpace:`nowrap`,border:0}}),`↑ Upload theme.json`]}):null,(0,w.jsx)(`a`,{href:Cp,target:`_blank`,rel:`noreferrer noopener`,"data-ggui-theme-docs":!0,className:`ggui-muted`,style:{fontSize:11,textDecoration:`underline`,textAlign:`center`,opacity:.85},children:`Roll your own theme →`})]})}function Tp({rawTheme:e,overrides:t,onSetOverride:n,onClearAll:r}){let i=(0,S.useMemo)(()=>Sp(e),[e]),a=Object.keys(t).length;return(0,w.jsxs)(`div`,{"data-ggui-theme-overrides":!0,className:`ggui-stack`,style:{marginTop:16},"aria-label":`theme token overrides`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`DTCG`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`overrides`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[a,` `,a===1?`override`:`overrides`]}),a>0?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-overrides-clear":!0,onClick:r,style:{marginLeft:`auto`},children:`Clear all`}):null]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0`,fontSize:12},children:[`Tweak individual DTCG tokens on top of the selected preset. Each leaf shows the preset’s shipped `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`$value`}),`; type a CSS-valid replacement to override it. Per-leaf`,` `,(0,w.jsx)(`em`,{children:`reset`}),` clears that path; saving with no overrides writes the bare `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ preset, mode }`}),` `,`shape (no `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`overrides`}),` field).`]}),i.map(e=>(0,w.jsxs)(`details`,{...e.prefix===`color.primary`?{open:!0}:{},style:{marginTop:8},children:[(0,w.jsxs)(`summary`,{style:{cursor:`pointer`,padding:`6px 0`,fontSize:13,fontWeight:500,userSelect:`none`},children:[e.label,` `,(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[`(`,e.leaves.length,e.leaves.some(e=>e.path in t)?`, +${e.leaves.filter(e=>e.path in t).length} overridden`:``,`)`]})]}),(0,w.jsx)(`div`,{style:{display:`grid`,gap:6,gridTemplateColumns:`auto 1fr auto`,padding:`8px 0 8px 12px`,alignItems:`center`,fontSize:12},children:e.leaves.map(e=>(0,w.jsx)(Ep,{path:e.path,presetValue:e.value,overrideValue:t[e.path]??null,onChange:n},e.path))})]},e.prefix))]})}function Ep({path:e,presetValue:t,overrideValue:n,onChange:r}){let i=n!==null;return(0,w.jsxs)(`div`,{"data-ggui-theme-override-leaf":e,style:{display:`contents`},children:[(0,w.jsx)(`code`,{className:`ggui-code`,style:{fontSize:11,opacity:.85,padding:`2px 6px`},children:e}),(0,w.jsx)(`input`,{type:`text`,"data-ggui-theme-override-input":!0,value:n??``,placeholder:t,onChange:t=>{let n=t.target.value;r(e,n.length===0?null:n)},spellCheck:!1,autoComplete:`off`,style:{fontSize:12,fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,padding:`4px 8px`,border:`1px solid currentColor`,borderRadius:4,background:`transparent`,color:`inherit`,opacity:i?1:.85,outline:i?`1px solid currentColor`:`none`},"aria-label":`override ${e}`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-override-reset":!0,onClick:()=>r(e,null),disabled:!i,style:{fontSize:11,padding:`2px 8px`,opacity:i?1:.4,cursor:i?`pointer`:`default`},title:i?`Reset this leaf to the preset value`:`No override set on this leaf`,children:`reset`})]})}function Dp({preset:e,selected:t,mode:n,onSelect:r}){let i=e.modes.includes(`dark`),a=gp(e.id,n),o=a?.color.primary[500]?.$value,s=a?.color.ground.$value;return(0,w.jsxs)(`button`,{type:`button`,"data-ggui-theme-card":e.id,onClick:r,"aria-pressed":t,style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,textAlign:`left`,cursor:`pointer`,border:t?`2px solid currentColor`:`1px solid currentColor`,borderRadius:6,background:`transparent`,color:`inherit`,opacity:t?1:.85},children:[(0,w.jsxs)(`span`,{"aria-hidden":!0,style:{display:`inline-flex`,flexShrink:0,width:28,height:28,borderRadius:4,overflow:`hidden`,border:`1px solid currentColor`},children:[(0,w.jsx)(`span`,{style:{flex:1,background:o??`#ccc`}}),(0,w.jsx)(`span`,{style:{flex:1,background:s??`#fff`}})]}),(0,w.jsxs)(`span`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`span`,{style:{display:`block`,fontSize:13,fontWeight:t?600:500},children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{display:`block`,fontSize:11,opacity:.75},children:[e.id===`claudic`?`claude.ai · `:``,i?`Light · Dark`:`Light only`]})]})]})}function Op(e,t){if(Object.keys(t).length===0)return e;let n=structuredClone(e);for(let[e,r]of Object.entries(t)){let t=e.split(`.`),i=n,a=!0;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(n===void 0){a=!1;break}let r=i[n];if(typeof r!=`object`||!r){a=!1;break}i=r}if(!a)continue;let o=t[t.length-1];if(o===void 0)continue;let s=i[o];typeof s!=`object`||!s||(s.$value=r)}return n}function kp({presetId:e,mode:t,rawTheme:n,overrides:r}){let i=(0,S.useMemo)(()=>`ggui-theme-preview-${e}-${t}`,[e,t]),a=(0,S.useMemo)(()=>{let t=Wf(e,Op(n,r));return`${t.cssVariables.replace(/^:root\s*\{/,`.${i} {`)}\n${t.cssKeyframes}`},[n,r,e,i]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{"data-ggui-theme-preview-style":i,children:a}),(0,w.jsxs)(`div`,{"data-ggui-theme-preview":!0,className:i,style:{background:`var(--ggui-color-container)`,color:`var(--ggui-color-onContainer)`,fontFamily:`var(--ggui-font-family-sans)`,padding:`var(--ggui-spacing-lg, 24px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,border:`1px solid var(--ggui-color-outline)`,boxShadow:`var(--ggui-shape-shadow-md)`,display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-lg, 24px)`},children:[(0,w.jsx)(Ap,{presetName:n.$name,mode:t}),(0,w.jsx)(jp,{}),(0,w.jsx)(Mp,{}),(0,w.jsx)(Np,{}),(0,w.jsx)(Pp,{theme:n,overrides:r}),(0,w.jsx)(Fp,{})]})]})}function Ap({presetName:e,mode:t}){return(0,w.jsxs)(`header`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:12,flexWrap:`wrap`,borderBottom:`1px solid var(--ggui-color-outlineVariant)`,paddingBottom:`var(--ggui-spacing-md, 16px)`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-2xl, 1.5rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:e}),(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSunken)`,fontFamily:`var(--ggui-font-family-mono)`},children:t})]})}function jp(){return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`h3`,{style:{margin:0,fontSize:`var(--ggui-font-size-xl, 1.25rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`,lineHeight:1.25},children:`Typography reads naturally`}),(0,w.jsxs)(`p`,{style:{margin:0,fontSize:`var(--ggui-font-size-base, 1rem)`,lineHeight:`var(--ggui-font-lineHeight-normal, 1.5)`},children:[`The body paragraph is what generated UIs use for prose. Inline`,` `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:`0.9em`,background:`var(--ggui-color-sunken)`,color:`var(--ggui-color-onSunken)`,padding:`0.1em 0.4em`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:`code`}),` `,`and a`,` `,(0,w.jsx)(`a`,{href:`#preview`,style:{color:`var(--ggui-color-primary-600)`,textDecorationColor:`var(--ggui-color-primary-400)`},onClick:e=>e.preventDefault(),children:`link`}),` `,`sit alongside.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSunken)`},children:`Caption text — softer contrast for secondary info.`})]})}function Mp(){return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`var(--ggui-color-primary-500)`,color:`var(--ggui-color-onPrimary)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`,boxShadow:`var(--ggui-shape-shadow-sm)`},children:`Primary`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-primary-600)`,border:`1px solid var(--ggui-color-primary-500)`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`},children:`Outline`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-onSunken)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,cursor:`pointer`},children:`Ghost`})]})}function Np(){return(0,w.jsxs)(`section`,{style:{background:`var(--ggui-color-container)`,color:`var(--ggui-color-onContainer)`,padding:`var(--ggui-spacing-md, 16px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,boxShadow:`var(--ggui-shape-shadow-lg)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-lg, 1.125rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:`Container card`}),(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[`Painted with `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.container`}),` `,`+ `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.onContainer`}),` `,`— the role pair generated UIs reach for to highlight primary-tinted content.`]}),(0,w.jsx)(`input`,{type:`text`,defaultValue:`Form input — focus to see border`,onChange:()=>{},style:{padding:`6px 10px`,background:`var(--ggui-color-container)`,color:`var(--ggui-color-onContainer)`,border:`1px solid var(--ggui-color-outline)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,outline:`none`}})]})}function Pp({theme:e,overrides:t}){let n=(0,S.useMemo)(()=>Op(e,t),[e,t]),r=(e,t,n)=>{let r=Object.keys(t).sort((e,t)=>{if(n){let n=Number(e),r=Number(t);if(Number.isFinite(n)&&Number.isFinite(r))return n-r}return e.localeCompare(t)});return(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{style:{width:64,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSunken)`},children:e}),(0,w.jsx)(`div`,{style:{display:`flex`,flex:1,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,overflow:`hidden`,border:`1px solid var(--ggui-color-outlineVariant)`},children:r.map(n=>{let r=t[n];return r?(0,w.jsx)(`span`,{title:`${e.toLowerCase()}.${n} · ${r.$value}`,style:{flex:1,height:24,background:r.$value}},n):null})})]})};return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSunken)`,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Color ramps`}),r(`Primary`,n.color.primary,!0),r(`Neutral`,n.color.neutral??{},!0)]})}function Fp(){let e=(e,t)=>(0,w.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[(0,w.jsx)(`span`,{"aria-hidden":!0,style:{width:12,height:12,borderRadius:`50%`,background:e,border:`1px solid var(--ggui-color-outline)`}}),(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-onSunken)`},children:t})]});return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[e(`var(--ggui-color-success-500)`,`success`),e(`var(--ggui-color-warning-500)`,`warning`),e(`var(--ggui-color-error-500)`,`error`),e(`var(--ggui-color-info-500)`,`info`)]})}var Ip={kind:`admin-index`};function Lp(){return typeof window>`u`?Ip:te(window.location.pathname)}function Rp(){return Ip}function zp(){let e=(0,S.useSyncExternalStore)(ne,Lp,Rp);return e.kind===`blueprint`?(0,w.jsx)(ve,{route:e,variant:`narrow`,children:(0,w.jsx)(yl,{blueprintId:e.blueprintId})}):e.kind===`admin-index`||e.kind===`admin-status`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Nd,{})}):e.kind===`admin-sessions`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Dd,{})}):e.kind===`admin-blueprints`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(wl,{})}):e.kind===`admin-variants`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(nu,{})}):e.kind===`admin-variant-detail`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Yl,{contractHash:e.contractHash})}):e.kind===`admin-variant-generate`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Ql,{contractHash:e.contractHash})}):e.kind===`admin-config`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(lu,{})}):e.kind===`admin-tools`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Sd,{})}):e.kind===`admin-llm-keys`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(Ce,{})}):e.kind===`admin-connector-keys`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(_d,{})}):e.kind===`admin-oauth-providers`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(ke,{})}):e.kind===`admin-clients`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(ru,{})}):e.kind===`admin-theme`?(0,w.jsx)(ve,{route:e,variant:`admin`,children:(0,w.jsx)(bp,{})}):e.kind===`admin-login`?(0,w.jsx)(ve,{route:e,variant:`narrow`,children:(0,w.jsx)(ye,{})}):ie(e)?(0,w.jsx)(ve,{route:e,variant:`devtools`,children:(0,w.jsx)(hd,{route:e})}):(0,w.jsx)(ve,{route:e,variant:`narrow`,children:(0,w.jsx)(Bp,{pathname:e.pathname})})}function Bp({pathname:e}){return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`404 / not found`,title:`Nothing lives here.`,mute:`This is an operator-only server.`,intro:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` is not a route served by this console. The end-user pages were retired — ggui’s end-users see UI through their MCP host (claude.ai, Claude Desktop, Cursor), not through this server’s own surface.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`routes`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RTE / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:10},children:[(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin/status`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin`]})}),(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>k(`/admin-login`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin-login`]})})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`The`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/preview/<blueprintId>`}),` `,`route requires a real id — paste a blueprint id registered in `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),`.`]})]})]})]})}var Vp=document.getElementById(`root`);if(!Vp)throw Error(`console: #root element missing from index.html`);(0,C.createRoot)(Vp).render((0,w.jsx)(S.StrictMode,{children:(0,w.jsx)(zp,{})}));