uisandbox-mcp 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/antd-DhIfMnKY.js +1 -0
- package/dist/app/assets/bootstrap-COnYSIiB.js +1 -0
- package/dist/app/assets/daisyui-BMsY9tCy.js +1 -0
- package/dist/app/assets/index-D4fhCnAn.js +788 -0
- package/dist/app/assets/index-HdhXLG_b.css +1 -0
- package/dist/app/assets/mantine-_j_jRC3m.js +1 -0
- package/dist/app/assets/material-Dztr9pnA.js +1 -0
- package/dist/app/assets/openprops-8c8qkGJk.js +1 -0
- package/dist/app/assets/radix-XX7gl5Rg.js +1 -0
- package/dist/app/assets/shadcn-BKbCld6D.js +1 -0
- package/dist/app/assets/tailwind-DqpNPM-k.js +1 -0
- package/dist/app/how-it-works-poster.png +0 -0
- package/dist/app/how-it-works.mp4 +0 -0
- package/dist/app/index.html +51 -40
- package/dist/app/kits/antd.zip +0 -0
- package/dist/app/kits/bootstrap.zip +0 -0
- package/dist/app/kits/daisyui.zip +0 -0
- package/dist/app/kits/mantine.zip +0 -0
- package/dist/app/kits/material.zip +0 -0
- package/dist/app/kits/radix.zip +0 -0
- package/dist/app/kits/shadcn.zip +0 -0
- package/dist/app/kits/tailwind.zip +0 -0
- package/dist/app/live.js +119 -0
- package/dist/app/llms-full.txt +58 -55
- package/dist/app/llms.txt +16 -14
- package/dist/app/og.png +0 -0
- package/dist/app/shot-reach-dark.png +0 -0
- package/dist/app/shot-reach.png +0 -0
- package/dist/app/shot-refusal-dark.png +0 -0
- package/dist/app/shot-refusal.png +0 -0
- package/dist/app/shot-stage-dark.png +0 -0
- package/dist/app/shot-stage.png +0 -0
- package/dist/app/shot-verify-dark.png +0 -0
- package/dist/app/shot-verify.png +0 -0
- package/dist/app/site.webmanifest +1 -1
- package/dist/app/sitemap.xml +1 -0
- package/dist/app/sw.js +27 -1
- package/dist/server.mjs +251 -15
- package/package.json +6 -6
- package/dist/app/assets/index-DTKomyUq.css +0 -1
- package/dist/app/assets/index-J6HcqYP4.js +0 -318
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.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 k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(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 te(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,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),te(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(A,`$&/`)+`/`)+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+j(a,u),c+=te(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+j(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(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 ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 M=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)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(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=N,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:re}},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,M)}catch(e){M(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`})),u=o(((e,t)=>{t.exports=l()})),d=o((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&&j(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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);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`})),m=o(((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=p()})),h=o((e=>{var t=f(),n=u(),r=m();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 d(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 p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=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`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?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 k: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?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function se(e){return{current:e}}function P(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function F(e,t){oe++,ae[oe]=e.current,e.current=t}var I=se(null),ce=se(null),le=se(null),ue=se(null);function de(e,t){switch(F(le,t),F(ce,e),F(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}P(I),F(I,e)}function fe(){P(I),P(ce),P(le)}function pe(e){e.memoizedState!==null&&F(ue,e);var t=I.current,n=Hd(t,e.type);t!==n&&(F(ce,e),F(I,n))}function me(e){ce.current===e&&(P(I),P(ce)),ue.current===e&&(P(ue),Qf._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+he+e+ge}var L=!1;function ve(e,t){if(!e||L)return``;L=!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{L=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return _e(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(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 Ke(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=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(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 qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(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 Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(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-Re(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&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(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 rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function at(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var ot=Math.random().toString(36).slice(2),R=`__reactFiber$`+ot,st=`__reactProps$`+ot,ct=`__reactContainer$`+ot,lt=`__reactEvents$`+ot,ut=`__reactListeners$`+ot,dt=`__reactHandles$`+ot,ft=`__reactResources$`+ot,pt=`__reactMarker$`+ot;function mt(e){delete e[R],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[R];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[R]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[R])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[R]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function z(e){e[pt]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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]*$`),wt={},Tt={};function Et(e){return xe.call(Tt,e)?!0:xe.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(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 Ot(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 kt(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 At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(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 Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ft(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 It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(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=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(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=``+At(s):e.removeAttribute(`name`)}function zt(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)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(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),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(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=``+At(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 Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var B=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 Gt(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||B.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(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&&Gt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Gt(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 Jt=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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(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="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));Rt(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&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(bu(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||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 sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.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 fn=i.slice(e,1<r?1-r:void 0)}function mn(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 hn(){return!0}function gn(){return!1}function _n(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)?hn:gn,this.isPropagationStopped=gn,this}return h(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=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=h({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=h({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(h({},Tn,{dataTransfer:0})),On=_n(h({},bn,{relatedTarget:0})),kn=_n(h({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),V=_n(h({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=_n(h({},vn,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=_n(h({},bn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=_n(h({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=_n(h({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=_n(h({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=_n(h({},Tn,{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})),Vn=_n(h({},vn,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=sn&&`CompositionEvent`in window,Wn=null;sn&&`documentMode`in document&&(Wn=document.documentMode);var Gn=sn&&`TextEvent`in window&&!Wn,Kn=sn&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=pn(),fn=dn=un=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Ed(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){yd(e,0)}function or(e){if(Pt(_t(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(sn){var lr;if(sn){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,$t(e)),an(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function _r(e,t){if(e===`input`||e===`change`)return or(t)}function vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var yr=typeof Object.is==`function`?Object.is:vr;function br(e,t){if(yr(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(!xe.call(t,i)||!yr(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(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=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(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=Ft(e.document)}return t}function Tr(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 Er=sn&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==Ft(r)||(r=Dr,`selectionStart`in r&&Tr(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}),kr&&br(kr,r)||(kr=r,r=Ed(Or,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};sn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,H=`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(` `);H.push(`scrollEnd`);function Gr(e,t){Wr.set(e,t),xt(t,[e])}var Kr=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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[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&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(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-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,I.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ii(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return li(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ii(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ii(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ii(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=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Re(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,U=!1,ji=null,Mi=!1,Ni=Error(i(519));function Pi(e){throw Bi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ni}function Fi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[R]=e,t[st]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Ut(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||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||Pi(e,!0)}function Ii(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:ki=ki.return}}function Li(e){if(e!==ki)return!1;if(!U)return Ii(e),U=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Ud(e.type,e.memoizedProps)),n=!n),n&&Ai&&Pi(e),Ii(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=uf(e)}else t===27?(t=Ai,Zd(e.type)?(e=lf,lf=null,Ai=e):Ai=t):Ai=ki?cf(e.stateNode.nextSibling):null;return!0}function Ri(){Ai=ki=null,U=!1}function zi(){var e=ji;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),ji=null),e}function Bi(e){ji===null?ji=[e]:ji.push(e)}var Vi=se(null),Hi=null,Ui=null;function Wi(e,t,n){F(Vi,t._currentValue),t._currentValue=n}function Gi(e){e._currentValue=Vi.current,P(Vi)}function Ki(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 qi(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),Ki(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),Ki(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 Ji(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;yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.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&&qi(t,e,n,r),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Hi=e,Ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zi(e){return $i(Hi,e)}function Qi(e,t){return Hi===null&&Xi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ui===null){if(e===null)throw Error(i(308));Ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ui=Ui.next=t;return n}var ea=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()})}},ta=t.unstable_scheduleCallback,na=t.unstable_NormalPriority,ra={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new ea,data:new Map,refCount:0}}function aa(e){e.refCount--,e.refCount===0&&ta(na,function(){e.controller.abort()})}var oa=null,sa=0,ca=0,la=null;function ua(e,t){if(oa===null){var n=oa=[];sa=0,ca=dd(),la={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return sa++,t.then(da,da),t}function da(){if(--sa===0&&oa!==null){la!==null&&(la.status=`fulfilled`);var e=oa;oa=null,ca=0,la=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fa(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 pa=M.S;M.S=function(e,t){eu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ua(e,t),pa!==null&&pa(e,t)};var ma=se(null);function ha(){var e=ma.current;return e===null?q.pooledCache:e}function ga(e,t){t===null?F(ma,ma.current):F(ma,t.pool)}function _a(){var e=ha();return e===null?null:{parent:ra._currentValue,pool:e}}var va=Error(i(460)),ya=Error(i(474)),ba=Error(i(542)),xa={then:function(){}};function Sa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ca(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=q,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,Da(e),e}throw Ta=t,va}}function wa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ta=e,va):e}}var Ta=null;function Ea(){if(Ta===null)throw Error(i(459));var e=Ta;return Ta=null,e}function Da(e){if(e===va||e===ba)throw Error(i(483))}var Oa=null,ka=0;function Aa(e){var t=ka;return ka+=1,Oa===null&&(Oa=[]),Ca(Oa,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(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=oi(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=ui(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&&wa(i)===t.type)?(t=a(t,n.props),ja(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),ja(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ci(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case O:return t=wa(t),f(e,t,n)}if(re(t)||ee(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Aa(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);Ma(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 _: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=wa(n),p(e,t,n,r)}if(re(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Aa(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);Ma(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 _: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=wa(r),m(e,t,n,r,i)}if(re(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Aa(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);Ma(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),U&&wi(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 U&&wi(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)}),U&&wi(i,h),l}function g(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),U&&wi(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 U&&wi(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)}),U&&wi(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 _: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&&wa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),ja(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=fi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=wa(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Aa(o),c);if(o.$$typeof===C)return b(e,r,Qi(e,o),c);Ma(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=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ka=0;var i=b(e,t,n,r);return Oa=null,i}catch(t){if(t===va||t===ba)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(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 za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Va(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,et(e,n)}}function Ha(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 Ua=!1;function Wa(){if(Ua){var e=la;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!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 f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ca&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ia=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=se(null),Ya=se(0);function Xa(e,t){e=Ul,F(Ya,e),F(Ja,t),Ul=e|t.baseLanes}function Za(){F(Ya,Ul),F(Ja,Ja.current)}function Qa(){Ul=Ya.current,P(Ja),P(Ya)}var $a=se(null),eo=null;function to(e){var t=e.alternate;F(oo,oo.current&1),F($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){F(oo,oo.current),F($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(F(oo,oo.current),F($a,e),eo===null&&(eo=e)):io(e)}function io(){F(oo,oo.current),F($a,$a.current)}function ao(e){P($a),eo===e&&(eo=null),P(oo)}var oo=se(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){M.H=Is;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Yi(e)&&(tc=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ca(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return Zi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.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=ko(),W.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]=A;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(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?(co&f)===f:(Y&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===ca&&(d=!0);else if((co&p)===p){u=u.next,p===ca&&(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,W.lanes|=p,Gl|=p;f=u.action,po&&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,W.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!yr(o,e.memoizedState)&&(tc=!0,d&&(n=la,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 Io(e){var t=Oo(),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);yr(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=U;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!yr((G||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yr(e,n)}catch{return!0}}function Ho(e){var t=$r(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(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)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(U){var n=q.formState;if(n!==null){a:{var r=W;if(U){if(Ai){b:{for(var i=Ai,a=Mi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=cf(i.nextSibling),r=i.data===`F!`;break a}}Pi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===va?ba:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.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 is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),W.lanes|=e,Gl|=e,n)}function ys(e,t,n,r){return yr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=mu(),W.lanes|=e,Gl|=e,t):(e=vs(e,n,r),yr(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Ms(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,fa(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,ie,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return Zi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=za(n);var r=Ba(t,e,n);r!==null&&(hu(r,t,n),Va(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Qr(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(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,yr(s,o))return Zr(e,t,i,0),q===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Is={readContext:Zi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Zi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Le(!0);try{n(t)}finally{Le(!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=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(U){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(U){var n=Ci,r=Si;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return G===null?vs(n,e,t):ys(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(hu(t,e,n),Va(t,e,n))}};function Hs(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?!br(n,r)||!br(i,a):!0}function Us(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&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(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=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Kr(e)}function Ks(e){console.error(e)}function qs(e){Kr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(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 Xs(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=za(e),e.tag=3,e}function Qs(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(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ji(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===xa?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)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(U)return t=$a.current,t===null?(r!==Ni&&(t=Error(i(423),{cause:r}),Bi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Xs(e.stateNode,r,a),Ha(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ni&&(e=Error(i(422),{cause:r}),Bi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Ha(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function rc(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 Xi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(U&&s&&Ei(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(br(a,r)&&e.ref===t.ref){if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}}return pc(e,t,n,r,i)}function oc(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 cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ga(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ga(t,null),Za(),io(t)):(ga(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ha();return a=a===null?null:{parent:ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ga(t,null),Za(),ro(t),e!==null&&Ji(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Pa(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(U){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(no(t),(e=Ai)?(e=rf(e,Mi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a){if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(tc||Ji(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=q,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),hu(r,e,s),ec;Du(),t=uc(e,t,n)}else e=o.treeContext,Ai=cf(s.nextSibling),ki=t,U=!0,ji=null,Mi=!1,e!==null&&Oi(t,e),t=lc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Xi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(U&&r&&Ei(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Xi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(U&&r&&Ei(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Xi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Zi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?Zi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(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&&Vs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),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=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Zi(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)&&Us(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Ia||Hs(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,Ra(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Zi(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)&&Us(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Ia||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Yi(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,fc(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=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Ri(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:_a()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(oo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(U){if(a?to(t):io(t),(e=Ai)?(e=rf(e,Mi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Pi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(to(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Bi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Ji(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=q,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),hu(s,e,r),ec;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=cf(c.nextSibling),ki=t,U=!0,ji=null,Mi=!1,e!==null&&Oi(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=_a():(l=ra._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=oi(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 xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Pa(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ki(e.return,t,n)}function Tc(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 Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,F(oo,o),nc(e,t,r,n),r=U?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(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&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(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&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ji(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=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Yi(e)))}function kc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Wi(t,ra,e.memoizedState.cache),Ri();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Ji(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(oo,oo.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Wi(t,ra,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}}else tc=!1,U&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=rc(null,t,e,r,n);break a}if(a===D){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Wi(t,ra,r),r!==o.cache&&qi(t,[ra],n,!0),Wa(),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=gc(e,t,r,n);break a}if(r!==a){a=mi(Error(i(424)),t),Bi(a),t=gc(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(Ai=cf(e.firstChild),ki=t,U=!0,ji=null,Mi=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:U||(n=t.type,e=t.pendingProps,r=Bd(le.current).createElement(n),r[R]=t,r[st]=e,Pd(r,n,e),z(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&U&&(r=t.stateNode=ff(t.type,t.pendingProps,le.current),ki=t,Mi=!0,a=Ai,Zd(t.type)?(lf=a,Ai=cf(r.firstChild)):Ai=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&U&&((a=r=Ai)&&(r=tf(r,t.type,t.pendingProps,Mi),r===null?a=!1:(t.stateNode=r,ki=t,Ai=cf(r.firstChild),Mi=!1,a=!0)),a||Pi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&U&&((e=n=Ai)&&(n=nf(n,t.pendingProps,Mi),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Pi(t)),null;case 13:return bc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Xi(t),a=Zi(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Xi(t),r=Zi(ra),e===null?(a=ha(),a===null&&(a=q,o=ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Wi(t,ra,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Wi(t,ra,r),r!==a.cache&&qi(t,[ra],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wi(t,ra,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(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(wu())e.flags|=8192;else throw Ta=xa,ya}}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(wu())e.flags|=8192;else throw Ta=xa,ya}}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!U)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 Ic(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 Lc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Gi(ra),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Li(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zi())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=I.current,Li(t)?Fi(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=I.current,Li(t))Fi(t,o);else{var s=Bd(le.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[R]=t,o[st]=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(Pd(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&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[R]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Pi(t,!0)}else e=Bd(e).createTextNode(r),e[R]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(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[R]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Li(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[R]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(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),Pc(t,t.updateQueue),Ic(t),null);case 4:return fe(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Gi(t.type),Ic(t),null;case 19:if(P(oo),r=t.memoizedState,r===null)return Ic(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return F(oo,oo.current&1|2),U&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>tu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!U)return Ic(t),null}else 2*Ee()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Fc(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?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=oo.current,F(oo,a?n&1|2:n&1),U&&wi(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(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&&P(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(ra),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(ra),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(oo),null;case 4:return fe(),null;case 10:return Gi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&P(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(ra),null;case 25:return null;default:return null}}function zc(e,t){switch(Di(t),t.tag){case 3:Gi(ra),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:P(oo);break;case 10:Gi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&P(ma);break;case 24:Gi(ra)}}function Bc(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){Z(t,t.return,e)}}function Vc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(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){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}}function Kc(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){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[st]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(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 Xc(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=Zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(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&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[R]=e,t[st]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=wr(e),Tr(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(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,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=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(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{qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,!!(n.subtreeFlags&8772)):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null){if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(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){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(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(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(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=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(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[pt]||o[R]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[R]=e,z(o),r=o;break a;case`link`:var s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[R]=e,z(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode)}else e.stateNode=If(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)Ka(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&aa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&aa(e)));break;case 12:if(i&2048){Tl(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){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(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:aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=Zi(ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zi(ra).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:M.T===null?it():dd()}function mu(){if(Jl===0){if(!(Y&536870912)||U){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Jl=e}else Jl=536870912}return e=$a.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Ze(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||qe(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}if(n=e.current.alternate,o&&!vu(n)){a=Ou(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=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(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:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ee(),10<a)){if(yu(r,t,Jl,!Bl),Ke(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}break}while(1);rd(e)}function _u(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:Zt},jl(t,a,d);var m=(a&62914560)===a?$l-Ee():(a&4194048)===a?eu-Ee():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!yr(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Ui=Hi=null,Eo(e),Oa=null,ka=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=oi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=qe(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Xr(),n}function Cu(e,t){W=null,M.H=Is,t===va||t===ba?(t=Ea(),X=3):t===ya?(t=Ea(),X=4):X=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Js(e,mi(t,e.current)))}function wu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Tu(){var e=M.H;return M.H=Is,e===null?Is:e}function Eu(){var e=M.A;return M.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&$a.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ui=Hi=null,K=r,M.H=i,M.A=a,J===null&&(q=null,Y=0,Xr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ee()+500,Su(e,t)):Vl=qe(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Sa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Sa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Ui=Hi=null,M.H=r,M.A=a,K=n,J===null?(q=null,Y=0,Xr(),Wl):0}function ju(){for(;J!==null&&!we();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:zc(n,t),t=J=si(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Ui=Hi=null,Eo(t),Oa=null,ka=0;var i=t.return;try{if($s(e,i,t,n,Y)){Wl=1,Js(e,mi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Js(e,mi(n,e.current)),J=null;return}t.flags&32768?(U||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Qe(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ae,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=K,K|=4;try{il(e,t,n)}finally{K=s,N.p=a,M.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(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 _=Sr(s,h),v=Sr(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=!!Rd,zd=Rd=null}finally{K=i,N.p=r,M.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,N.p=r,M.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Te();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.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{M.T=t,N.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,aa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=rt(su),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{N.p=a,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=mi(n,t),t=Xs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ze(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=mi(n,e),n=Zs(2),r=Ba(t,n,2),r!==null&&(Qs(n,r,t,e),Ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ee()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ye()),e=$r(e,t),e!==null&&(Ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(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),qu(e,n)}function Xu(e,t){return Se(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ke(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ee(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=cd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Ke(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?Se(Oe,ad):od()})}function dd(){if(nd===0){var e=ca;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<H.length;hd++){var gd=H[hd];Gr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Gr(Lr,`onAnimationEnd`),Gr(Rr,`onAnimationIteration`),Gr(zr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(Br,`onTransitionRun`),Gr(Vr,`onTransitionStart`),Gr(Hr,`onTransitionCancel`),Gr(Ur,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){Kr(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){Kr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,yt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(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,!cn||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 wd(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=ht(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}an(function(){var r=a,i=$t(n),s=[];a:{var c=Wr.get(e);if(c!==void 0){var l=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=On;break;case`focusout`:u=`blur`,l=On;break;case`beforeblur`:case`afterblur`:l=On;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=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Lr:case Rr:case zr:l=kn;break;case Ur:l=zn;break;case`scroll`:case`scrollend`:l=xn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=V;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}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=on(m,p),g!=null&&d.push(Td(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!==Qt&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))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?ht(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=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(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=Dd,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&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c)){if(cr)v=_r;else{v=hr;var y=mr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&qt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Un)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 Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Zn=!0)),y=Ed(r,x),0<y.length&&(x=new An(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(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=on(e,n),i!=null&&r.unshift(Td(e,i,a)),i=on(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(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=on(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=on(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Ot(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=Xt(``+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`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`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=Xt(``+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`:Q(`beforetoggle`,e),Q(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(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=Jt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Kt(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`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.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[st]||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,``):Dt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`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:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`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:$(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`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:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`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:$(e,t,s,c,n,null)}Ut(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:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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:$(e,t,u,r,n,null)}return;default:if(qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(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)||$(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&&$(e,t,p,m,r,f)}}Rt(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)||$(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&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(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:$(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&&$(e,t,s,a,r,o)}Ht(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:$(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:$(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)&&$(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:$(e,t,u,p,r,m)}return;default:if(qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(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||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e!==Wd&&(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body)}n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[pt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=N.d;N.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),z(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),z(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),z(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=vt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);z(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),z(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),z(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=le.current)?gf(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=Af(n.href),n=vt(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=Af(n.href);var o=vt(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=vt(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 Af(e){return`href="`+Lt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),z(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,z(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),z(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,z(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),z(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,z(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),z(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[pt]||a[R]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(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,z(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),z(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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*Ld());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:ie,_currentValue2:ie,_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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(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=ii(3,null,null,t),e.current=a,a.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=ni,e):ni}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(hu(n,e,t),Va(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=$r(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=nt(t);var n=$r(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(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=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ee()+500,id(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=$t(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ht(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me: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=gt(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=ht(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,at(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(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);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=gt(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=gt(n);a!==null&&(e.splice(t,3),t-=3,Ss(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[st]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||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,pu(),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),bu(),t[ct]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();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`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Fe=zp.inject(Rp),Ie=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;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[ct]=t.current,Sd(e),new Fp(t)}})),g=o(((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=h()})),_=u(),v=g(),y=[{id:`tailwind`,name:`Tailwind CSS`,version:`4.3.3`,renders:!0},{id:`daisyui`,name:`daisyUI`,version:`5.7.21`,renders:!0},{id:`shadcn`,name:`shadcn/ui`,version:null,renders:!0},{id:`bootstrap`,name:`Bootstrap`,version:`5.3.8`,renders:!0},{id:`material`,name:`Material 3`,version:`2.5.0`,renders:!0},{id:`radix`,name:`Radix Themes`,version:`3.3.0`,renders:!0},{id:`mantine`,name:`Mantine`,version:`9.5.2`,renders:!0},{id:`antd`,name:`Ant Design`,version:`6.6.1`,renders:!0},{id:`openprops`,name:`Open Props`,version:`1.7.23`,renders:!1}],b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,_.createContext)({}),D=()=>(0,_.useContext)(E),O=(0,_.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=D()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,_.createElement)(`svg`,{ref:c,...w,width:t??l??w.width,height:t??l??w.height,stroke:e??f,strokeWidth:m,className:b(`lucide`,p,i),...!a&&!T(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),k=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(O,{ref:i,iconNode:t,className:b(`lucide-${x(C(e))}`,`lucide-${e}`,n),...r}));return n.displayName=C(e),n},A=k(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),j=k(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ee=k(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),te=k(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ne=k(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),re=k(`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`,key:`ezmyqa`}],[`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`,key:`e1hn23`}]]),M=k(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),N=k(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ie=k(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ae=k(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),oe=k(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),se=k(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),P=k(`diff`,[[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 10h14`,key:`elsbfy`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),F=k(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),I=k(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ce=k(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),le=k(`file-braces-corner`,[[`path`,{d:`M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6`,key:`14cnrg`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1`,key:`sr0ebq`}],[`path`,{d:`M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1`,key:`w793db`}]]),ue=k(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),de=k(`file-text`,[[`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`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),fe=k(`folder-open`,[[`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`,key:`usdka0`}]]),pe=k(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),me=k(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),he=k(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ge=k(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),_e=k(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),L=k(`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`,key:`kfwtm`}]]),ve=k(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),ye=k(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),be=k(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),xe=k(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Se=k(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ce=k(`redo-2`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`,key:`6uklza`}]]),we=k(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Te=k(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Ee=k(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),De=k(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Oe=k(`shield-check`,[[`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`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ke=k(`shuffle`,[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]),Ae=k(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),je=k(`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`,key:`r04s7s`}]]),Me=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ne=k(`swatch-book`,[[`path`,{d:`M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z`,key:`1ldrpk`}],[`path`,{d:`M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7`,key:`11i5po`}],[`path`,{d:`M 7 17h.01`,key:`1euzgo`}],[`path`,{d:`m11 8 2.3-2.3a2.4 2.4 0 0 1 3.404.004L18.6 7.6a2.4 2.4 0 0 1 .026 3.434L9.9 19.8`,key:`o2gii7`}]]),Pe=k(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`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`,key:`f3b9sd`}]]),Fe=k(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Ie=k(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),Le=k(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Re=m(),ze=`System`,Be=`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,Ve=`Custom: `,He=e=>e.startsWith(Ve),Ue=e=>He(e)?e.slice(8):e,We=[`Inter`,`Geist`,`Public Sans`,`IBM Plex Sans`,`Roboto Flex`],Ge=[`Source Sans 3`,`Nunito Sans`,`Figtree`,`Albert Sans`,`Hanken Grotesk`,`Lexend`],Ke=[`Outfit`,`Plus Jakarta Sans`,`Manrope`,`Urbanist`,`DM Sans`],qe=[...We,...Ge,...Ke],Je=[`Fraunces`,`Newsreader`,`Playfair Display`,`Lora`,`Source Serif 4`],Ye=[`Geist Mono`,`JetBrains Mono`,`IBM Plex Mono`,`Fira Code`],Xe=Ye,Ze={Manrope:`Capital I and lowercase l are the same stroke (98 % overlap)`,Inter:`Capital I and lowercase l are near-identical (86 % overlap)`},Qe=[{group:`System`,fonts:[ze]},{group:`Grotesk`,fonts:We},{group:`Humanist`,fonts:Ge},{group:`Geometric`,fonts:Ke},{group:`Mono`,fonts:Ye}],$e=[{group:`System`,fonts:[ze]},{group:`Grotesk`,fonts:We},{group:`Humanist`,fonts:Ge},{group:`Geometric`,fonts:Ke},{group:`Serif`,fonts:Je},{group:`Mono`,fonts:Ye}],et=[ze,...qe,...Je,...Ye],tt=Je,nt=`JetBrains Mono`,rt={medium:500,semibold:600,bold:700};function it(e,t){let n=new Set([e,t]);n.delete(ze);for(let e of[...n])He(e)&&n.delete(e);let r=e=>`${e.replace(/\s+/g,`+`)}:wght@400;500;600;700`,i=[...n].map(r);return n.has(`JetBrains Mono`)||i.push(`JetBrains+Mono:wght@400;500`),`@import url('${`https://fonts.googleapis.com/css2?family=${i.join(`&family=`)}&display=swap`}');`}function at(e){let t=Ue(e);return`/* ===== Custom font: "${t}" =====
|
|
10
|
+
You uploaded this font in Cockpit. Drop the actual file alongside
|
|
11
|
+
this tokens.css (or whichever folder you serve from) and update the
|
|
12
|
+
path below. Use .woff2 for best browser support. */
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: '${t}';
|
|
15
|
+
src: url('./${t.replace(/\s+/g,`-`)}.woff2') format('woff2');
|
|
16
|
+
font-weight: 100 900;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
}`}function ot(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=0,s=0,c=(i+a)/2;if(i!==a){let e=i-a;s=c>.5?e/(2-i-a):e/(i+a),o=i===t?(n-r)/e+(n<r?6:0):i===n?(r-t)/e+2:(t-n)/e+4,o/=6}return[o*360,s*100,c*100]}function R(e){let t=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,n=t(parseInt(e.slice(1,3),16)/255),r=t(parseInt(e.slice(3,5),16)/255),i=t(parseInt(e.slice(5,7),16)/255),a=.4122214708*n+.5363325363*r+.0514459929*i,o=.2119034982*n+.6806995451*r+.1073969566*i,s=.0883024619*n+.2817188376*r+.6299787005*i,c=Math.cbrt(a),l=Math.cbrt(o),u=Math.cbrt(s),d=.2104542553*c+.793617785*l-.0040720468*u,f=1.9779984951*c-2.428592205*l+.4505937099*u,p=.0259040371*c+.7827717662*l-.808675766*u,m=Math.sqrt(f*f+p*p),h=Math.atan2(p,f)*180/Math.PI;return h<0&&(h+=360),[d,m,h]}var st=(e,t,n,r)=>{let i=(Math.max(0,Math.min(1,e))*100).toFixed(1),a=Math.max(0,t).toFixed(4),o=((n%360+360)%360).toFixed(1);return r===void 0?`oklch(${i}% ${a} ${o})`:`oklch(${i}% ${a} ${o} / ${r})`};function ct(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o*o*o,u=s*s*s,d=c*c*c,f=4.0767416621*l-3.3077115913*u+.2309699292*d,p=-1.2684380046*l+2.6097574011*u-.3413193965*d,m=-.0041960863*l-.7034186147*u+1.707614701*d,h=e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.round(Math.max(0,Math.min(1,t))*255).toString(16).padStart(2,`0`)};return`#${h(f)}${h(p)}${h(m)}`}var lt=(e,t,n)=>{let[r,i,a]=R(z(e,Math.max(0,t),Math.max(0,Math.min(100,n))));return st(r,i,a)},ut=(e,t,n,r)=>{let[i,a,o]=R(z(e,Math.max(0,t),Math.max(0,Math.min(100,n))));return st(i,a,o,r)},dt=e=>{let t=e.match(/oklch\(([\d.]+)%\s+([\d.]+)\s+([\d.]+)/);return t?ct(parseFloat(t[1])/100,parseFloat(t[2]),parseFloat(t[3])):`#000000`},ft=[.995,.98,.958,.937,.916,.892,.858,.8,.64,.605,.503,.16],pt=[.176,.213,.254,.285,.317,.355,.423,.536,.64,.693,.775,.945],mt=[.07,.13,.22,.33,.44,.55,.68,.84,1,.97,.79,.55],ht=[.4,.45,.5,.55,.55,.55,.6,.65,.8,.85,1,1];function gt(e,t,n,r,i=1){let a=n?pt:ft;if(r||t<=0||i<=0)return a.map(e=>st(e,0,0));let[,o,s]=R(z(e,Math.max(t,8),50)),c=Math.min(Math.min(o*.65,.014)*i,.04);return a.map((e,t)=>st(e,c*(ht[t]??1),s))}function _t(e,t){let[n,r,i]=R(e),a=(t?pt:ft).slice();return a[8]=n,a[9]=t?Math.min(n+.05,.99):Math.max(n-.05,.05),a.map((e,t)=>st(e,r*(mt[t]??1),i))}function vt(e,t,n,r,i){let a=Math.max(0,Math.min(1.5,i?.spreadFactor??1)),o=Math.max(0,Math.min(2,i?.exprMul??1)),s=1-Math.min(1,o),c=e=>Math.min(96,Math.round(e*o)),l;if(n||t===0||o===0)l=(r?[78,68,58,49,40,32]:[30,42,52,61,70,78]).map(t=>[e,0,t]);else{let t=[0,42,96,168,220,292],n=r?56:54,i=r?56:80;l=t.map((t,o)=>[(e+t*a)%360,c(r?74:76),n+(i-n)*s-(s>.5&&!r&&o%2?3:0)])}if(!(n||t===0||o===0)){if(a<.999){let e=r?[78,68,58,49,40,32]:[30,42,52,61,70,78];l=l.map(([t,n,r],i)=>[t,n,r+((e[i]??r)-r)*(1-a)])}l=l.map(([e,t,n])=>wt(e,t,n))}n||t===0||(l=[0,2,4,1,3,5].map(e=>l[e]));let u=l.map(([e,t,n])=>lt(e,t,n)),d=l.map(([e,t,n])=>Ct(z(e,t,n))),f=r?26+6*s:87+7*s,p=80-22*s,m=l.map(([e,r])=>lt(e,n||t===0?0:Math.min(r,p),f)),h=r?82:22+6*s;return{base:u,ink:d,soft:m,softFg:l.map(([e,r])=>lt(e,n||t===0?0:Math.min(r+10,84),h)),grad:l.map(([e,t,n])=>{let i=lt((e+18)%360,Math.max(t-6,0),Math.min(n+(r?10:12),92));return`linear-gradient(135deg, ${lt(e,t,n)}, ${i})`})}}function z(e,t,n){let r=e/360,i=t/100,a=n/100,o=e=>{let t=(e+r*12)%12,n=i*Math.min(a,1-a),o=a-n*Math.max(-1,Math.min(t-3,9-t,1));return Math.round(o*255).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function yt(e,t){if(typeof e==`string`&&/^#[0-9a-f]{6}$/i.test(e))return;let n=`${t}() needs a 6-digit hex and got: ${String(e).slice(0,60)}`;typeof console<`u`&&console.error(`[uicockpit] ${n}`)}function bt(e){yt(e,`relLum`);let t=[1,3,5].map(t=>{let n=parseInt(e.slice(t,t+2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4});return .2126*t[0]+.7152*t[1]+.0722*t[2]}var xt=(e,t)=>{let n=bt(e),r=bt(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},St=e=>bt(e)>.42?`#16160c`:`#ffffff`,Ct=e=>{let t=St(e);if(xt(e,t)>=4.5)return t;let n=t===`#ffffff`?`#16160c`:`#ffffff`;return xt(e,n)>=4.5?n:t},wt=(e,t,n)=>e>=90&&e<=111&&t>16&&n<65?[e,t,70]:[e,t,n],Tt=(e,t)=>{let n=(t-e+540)%360-180;return(e+Math.min(Math.abs(n)/2,15)*Math.sign(n)+360)%360};function Et(e,t,n){for(let r=n;r>8;r--){let n=z(e,t,r);if(xt(n,St(n))>=4.6)return r}return 25}var Dt={neutral:{h:255,s:3}},Ot=[{max:14,name:`Red`},{max:30,name:`Coral`},{max:45,name:`Orange`},{max:60,name:`Amber`},{max:75,name:`Yellow`},{max:95,name:`Lime`},{max:150,name:`Green`},{max:170,name:`Emerald`},{max:190,name:`Teal`},{max:205,name:`Cyan`},{max:240,name:`Blue`},{max:265,name:`Indigo`},{max:290,name:`Violet`},{max:320,name:`Purple`},{max:345,name:`Magenta`},{max:360,name:`Red`}],kt=[[`White`,`#ffffff`],[`Snow`,`#fffafa`],[`Ivory`,`#fffff0`],[`Floral White`,`#fffaf0`],[`Ghost White`,`#f8f8ff`],[`White Smoke`,`#f5f5f5`],[`Sea Shell`,`#fff5ee`],[`Old Lace`,`#fdf5e6`],[`Linen`,`#faf0e6`],[`Alice Blue`,`#f0f8ff`],[`Honeydew`,`#f0fff0`],[`Mint Cream`,`#f5fffa`],[`Azure`,`#f0ffff`],[`Lavender Blush`,`#fff0f5`],[`Beige`,`#f5f5dc`],[`Antique White`,`#faebd7`],[`Lavender`,`#e6e6fa`],[`Gainsboro`,`#dcdcdc`],[`Light Gray`,`#d3d3d3`],[`Silver`,`#c0c0c0`],[`Dark Gray`,`#a9a9a9`],[`Gray`,`#808080`],[`Dim Gray`,`#696969`],[`Light Slate Gray`,`#778899`],[`Slate Gray`,`#708090`],[`Dark Slate Gray`,`#2f4f4f`],[`Black`,`#000000`]];function At(e){let[,t,n]=ot(e);if(t>=8&&n<90)return null;let[r,i,a]=[1,3,5].map(t=>parseInt(e.slice(t,t+2),16)),o=null;for(let[e,t]of kt){let[n,s,c]=[1,3,5].map(e=>parseInt(t.slice(e,e+2),16)),l=Math.max(Math.abs(r-n),Math.abs(i-s),Math.abs(a-c));(!o||l<o.d)&&(o={name:e,d:l})}return o&&o.d<=3?o.name:null}function jt(e){let[t,n,r]=ot(e),i=At(e);if(i)return i;if(n<8)return r<10?`Near Black`:r<26?`Charcoal`:r<45?`Slate Gray`:r<62?`Gray`:r<80?`Light Gray`:r<94?`Mist`:`Near White`;let a=(Ot.find(e=>t<=e.max)??Ot[0]).name;a===`Coral`&&r<58&&(a=`Vermilion`);let o=``;r<22?o=`Deep`:r<38?o=`Dark`:r>82?o=`Pale`:r>66&&(o=`Light`);let s=``;return n<32?s=`Muted`:n>78&&r>40&&r<70&&(s=`Vivid`),[s,o,a].filter(Boolean).join(` `)}var Mt={mono:{cPrimary:`#3b3b42`},cobalt:{cPrimary:`#0A84FF`},sky:{cPrimary:`#0EA5E9`},teal:{cPrimary:`#14B8A6`},jade:{cPrimary:`#10B981`},ember:{cPrimary:`#F97316`},coral:{cPrimary:`#EC4899`},indigo:{cPrimary:`#6366F1`},violet:{cPrimary:`#8B5CF6`},rose:{cPrimary:`#F43F5E`}};function Nt(e,t){return{...e,...Mt[t],colorTheme:t,color:t===`mono`?`mono`:`tone`}}var Pt=new Map,Ft=new Set,It=[];function Lt(){It=Array.from(Pt.keys()).map(e=>Ve+e)}function Rt(e){return e.replace(/\.(woff2|woff|ttf|otf)$/i,``).replace(/[^a-zA-Z0-9 _-]/g,``).trim().slice(0,40)||`CustomFont`}async function zt(e){let t=Rt(e.name),n=URL.createObjectURL(e),r=new FontFace(t,`url(${n})`);await r.load(),document.fonts.add(r);let i=Pt.get(t);return i&&(document.fonts.delete(i.fontFace),URL.revokeObjectURL(i.blobUrl)),Pt.set(t,{family:t,blobUrl:n,fontFace:r}),Lt(),Ft.forEach(e=>e()),Ve+t}function Bt(){return It}function Vt(e){let t=e.startsWith(`Custom: `)?e.slice(Ve.length):e;return Pt.has(t)}function Ht(e){return Ft.add(e),()=>{Ft.delete(e)}}function Ut(e){let t=e.startsWith(`Custom: `)?e.slice(Ve.length):e;return Pt.get(t)?.blobUrl??null}var Wt=o((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})),B=o(((e,t)=>{t.exports=Wt()}))(),Gt=new Set;function Kt(e){let t=e.flatMap(e=>e.fonts).filter(e=>e!==`System`&&!He(e)&&!Gt.has(e));if(!t.length)return;for(let e of t)Gt.add(e);let n=document.createElement(`link`);n.rel=`stylesheet`,n.href=`https://fonts.googleapis.com/css2?${t.map(e=>`family=${e.replace(/\s+/g,`+`)}:wght@400`).join(`&`)}&display=swap`,document.head.appendChild(n)}function qt({value:e,groups:t,onChange:n,sample:r,sampleSize:i=`display`,inline:a=!1,inCode:o=[]}){let[s,c]=(0,_.useState)(!1),l=a||s;(0,_.useEffect)(()=>{l&&Kt(t)},[l,t]);let u=(0,_.useRef)(null),d=(0,_.useRef)(null),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),g=(0,_.useSyncExternalStore)(Ht,Bt,()=>[]),v=new Set(t.flatMap(e=>e.fonts)),y=o.includes(e)||v.has(e)||!He(e)||g.includes(e)?o:[e,...o],b=new Set(y),x=[...t.slice(0,1),...y.length?[{group:`In your code`,fonts:y}]:[],...t.slice(1).map(e=>({...e,fonts:e.fonts.filter(e=>!b.has(e))})).filter(e=>e.fonts.length)];(0,_.useEffect)(()=>{if(!s)return;let e=e=>{u.current?.contains(e.target)||c(!1)},t=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let S=tt.includes(e),C=e=>e===`System`?Be:He(e)?`'${Ue(e)}', sans-serif`:`'${e}', ${tt.includes(e)?`serif`:`sans-serif`}`,w=e=>He(e)?Ue(e):e,T=He(e)&&!Vt(e),E=async e=>{if(p(null),!/\.(woff2|woff|ttf|otf)$/i.test(e.name)){p(`Pick a .woff2 / .woff / .ttf / .otf file.`);return}try{n(await zt(e)),c(!1)}catch{p(`Could not load font. Try a .woff2 file.`)}},D=async e=>{let t=e.target.files?.[0];t&&await E(t),d.current&&(d.current.value=``)},O=e=>{e.preventDefault(),e.stopPropagation(),h(!0)},k=e=>{e.preventDefault(),e.stopPropagation(),m||h(!0)},A=e=>{e.preventDefault(),e.stopPropagation(),h(!1)},j=async e=>{e.preventDefault(),e.stopPropagation(),h(!1);let t=e.dataTransfer.files?.[0];t&&await E(t)};return(0,B.jsxs)(`div`,{className:`fp ${a?`fp--inline`:``}`,ref:u,children:[!a&&(0,B.jsxs)(`button`,{type:`button`,className:`fp__btn`,onClick:()=>c(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":s,children:[(0,B.jsx)(`span`,{className:`fp__name`,style:{fontFamily:C(e)},children:w(e)}),He(e)&&(0,B.jsx)(`span`,{className:`fp__tag`,children:`Custom`}),(0,B.jsx)(`span`,{className:`fp__chev`,"aria-hidden":!0,children:(0,B.jsx)(N,{size:14,strokeWidth:1.75})})]}),!a&&r&&(0,B.jsx)(`div`,{className:`fp__sample fp__sample--${i}`,style:{fontFamily:C(e),fontStyle:S?`normal`:void 0},children:r}),!a&&T&&(0,B.jsxs)(`div`,{className:`fp__warn`,role:`status`,children:[(0,B.jsx)(oe,{size:12,strokeWidth:1.75}),`Custom font was lost on reload. Re-upload to preview.`]}),l&&(0,B.jsx)(`div`,{className:`menu fp__menu ${a?`fp__menu--inline`:``}`,role:`listbox`,children:x.map((t,r)=>(0,B.jsxs)(`div`,{className:`fp__group`,children:[(0,B.jsx)(`div`,{className:`fp__group-label`,children:t.group}),t.fonts.map(t=>(0,B.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===e,className:`fp__item ${t===e?`fp__item--on`:``}`,onClick:()=>{n(t),c(!1)},style:{fontFamily:C(t)},title:Ze[t],children:[w(t),Ze[t]&&(0,B.jsx)(`span`,{className:`fp__hint`,"aria-hidden":!0,children:`Il`})]},t)),r===0&&(0,B.jsxs)(B.Fragment,{children:[g.length>0&&(0,B.jsxs)(`div`,{className:`fp__subgroup`,children:[(0,B.jsx)(`div`,{className:`fp__group-label`,children:`Custom (this session)`}),g.map(t=>(0,B.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":t===e,className:`fp__item ${t===e?`fp__item--on`:``}`,onClick:()=>{n(t),c(!1)},style:{fontFamily:C(t)},children:Ue(t)},t))]}),!a&&(0,B.jsxs)(`div`,{className:`fp__upload fp__upload--inline`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`fp__upload-btn ${m?`fp__upload-btn--over`:``}`,onClick:()=>d.current?.click(),onDragEnter:O,onDragOver:k,onDragLeave:A,onDrop:j,"aria-describedby":f?`font-upload-error`:void 0,children:[(0,B.jsx)(Fe,{size:13,strokeWidth:1.75}),(0,B.jsx)(`span`,{children:m?`Drop to upload`:g.length>0?`Upload another font`:`Upload or drop a font`}),(0,B.jsx)(`span`,{className:`fp__upload-hint`,children:`.woff2 / .woff / .ttf / .otf`})]}),f&&(0,B.jsx)(`div`,{id:`font-upload-error`,className:`fp__error`,children:f}),(0,B.jsx)(`div`,{className:`fp__upload-disclaimer`,children:`Stays in this browser session, never sent to a server.`})]})]})]},t.group))}),a&&(0,B.jsxs)(`div`,{className:`fp__foot ${m?`fp__foot--over`:``}`,onDragEnter:O,onDragOver:k,onDragLeave:A,onDrop:j,children:[(0,B.jsxs)(`button`,{type:`button`,className:`fp__foot-btn`,onClick:()=>d.current?.click(),"aria-describedby":f?`font-upload-error-foot`:void 0,children:[(0,B.jsx)(Fe,{size:14,strokeWidth:1.75}),(0,B.jsx)(`span`,{className:`fp__foot-label`,children:m?`Drop to upload`:`Upload your own font`}),(0,B.jsx)(`span`,{className:`fp__foot-hint`,children:`.woff2 / .ttf`})]}),f&&(0,B.jsx)(`div`,{id:`font-upload-error-foot`,className:`fp__error fp__error--foot`,children:f})]}),(0,B.jsx)(`input`,{ref:d,type:`file`,accept:`.woff2,.woff,.ttf,.otf,font/woff2,font/woff,font/ttf,font/otf`,hidden:!0,"aria-label":`Upload a font file`,onChange:D})]})}var Jt={radius:1,space:1,type:1,lineHeight:1,tracking:0,weight:0,borderWidth:1,borderTone:0,bgTone:0,shadow:1,motion:1,hue:0,sat:1,contrast:0,gradAngle:0},Yt=[{key:`type`,label:`Text size`,min:.8,max:1.4,step:.02,unit:`×`,section:`Type`,snaps:[{at:.88,label:`S`},{at:1,label:`as is`},{at:1.12,label:`L`},{at:1.25,label:`XL`}]},{key:`lineHeight`,label:`Line height`,min:.85,max:1.35,step:.01,unit:`×`,section:`Type`,snaps:[{at:.9,label:`Tight`},{at:1,label:`as is`},{at:1.15,label:`Airy`}]},{key:`tracking`,label:`Letter spacing`,min:-.05,max:.15,step:.005,unit:`em`,section:`Type`,snaps:[{at:-.02,label:`Tight`},{at:0,label:`as is`},{at:.05,label:`Wide`}]},{key:`weight`,label:`Weight`,min:-2,max:2,step:1,unit:`steps`,section:`Type`,snaps:[{at:-1,label:`Lighter`},{at:0,label:`as is`},{at:1,label:`Bolder`}]},{key:`space`,label:`Spacing`,min:.6,max:1.5,step:.02,unit:`×`,section:`Shape`,snaps:[{at:.75,label:`Compact`},{at:1,label:`as is`},{at:1.25,label:`Comfortable`}]},{key:`radius`,label:`Radius`,min:0,max:2,step:.05,unit:`×`,section:`Shape`,snaps:[{at:0,label:`None`},{at:.5,label:`Subtle`},{at:1,label:`as is`},{at:1.5,label:`Round`},{at:2,label:`Rounder`}]},{key:`borderWidth`,label:`Border width`,min:0,max:3,step:.25,unit:`×`,section:`Shape`,snaps:[{at:0,label:`None`},{at:1,label:`as is`},{at:2,label:`Heavy`}]},{key:`shadow`,label:`Elevation`,min:0,max:2.5,step:.05,unit:`×`,section:`Shape`,snaps:[{at:0,label:`Flat`},{at:.5,label:`Soft`},{at:1,label:`as is`},{at:1.8,label:`Deep`}]},{key:`motion`,label:`Motion`,min:0,max:2.5,step:.05,unit:`×`,section:`Shape`,snaps:[{at:0,label:`Off`},{at:.6,label:`Snappy`},{at:1,label:`as is`},{at:1.6,label:`Slow`}]},{key:`hue`,label:`Hue`,min:-180,max:180,step:1,unit:`°`,section:`Colour`,snaps:[{at:-90,label:`−90°`},{at:-30,label:`−30°`},{at:0,label:`as is`},{at:30,label:`+30°`},{at:90,label:`+90°`},{at:180,label:`Opposite`}]},{key:`sat`,label:`Saturation`,min:0,max:2,step:.02,unit:`×`,section:`Colour`,snaps:[{at:0,label:`Grey`},{at:.6,label:`Muted`},{at:1,label:`as is`},{at:1.4,label:`Vivid`}]},{key:`contrast`,label:`Contrast`,min:-.3,max:.3,step:.01,unit:`ΔL`,section:`Colour`,snaps:[{at:-.15,label:`Softer`},{at:0,label:`as is`},{at:.15,label:`Harder`}]},{key:`gradAngle`,label:`Gradient angle`,min:-180,max:180,step:5,unit:`°`,section:`Colour`,snaps:[{at:-90,label:`−90°`},{at:-45,label:`−45°`},{at:0,label:`as is`},{at:45,label:`+45°`},{at:90,label:`+90°`},{at:180,label:`Reversed`}]},{key:`borderTone`,label:`Border tone`,min:-.15,max:.15,step:.005,unit:`ΔL`,section:`Colour`,snaps:[{at:-.08,label:`Stronger`},{at:0,label:`as is`},{at:.06,label:`Fainter`}]}],Xt=(e,t)=>{let n=null;for(let r of e.snaps)Math.abs(r.at-t)<=e.step*1.01&&(!n||Math.abs(r.at-t)<Math.abs(n.at-t))&&(n=r);return n},Zt=(e,t)=>{let n=Xt(e,t),r=e.unit===`°`?`${t>0?`+`:``}${Math.round(t)}°`:e.unit===`×`?`×${String(+t.toFixed(2))}`:e.unit===`em`?`${t>=0?`+`:``}${t.toFixed(3).replace(/0+$/,``).replace(/\.$/,``)}em`:e.unit===`steps`?`${t>0?`+`:``}${t}`:`${t>=0?`+`:``}${(t*100).toFixed(1).replace(/\.0$/,``)}%`;return n?n.label===`as is`?`as is`:n.label===r?r:`${n.label} · ${r}`:r},Qt={v3:`3.4.17`,v4:`4.3.3`},$t={v3:{black:`#000`,white:`#fff`,"slate-50":`#f8fafc`,"slate-100":`#f1f5f9`,"slate-200":`#e2e8f0`,"slate-300":`#cbd5e1`,"slate-400":`#94a3b8`,"slate-500":`#64748b`,"slate-600":`#475569`,"slate-700":`#334155`,"slate-800":`#1e293b`,"slate-900":`#0f172a`,"slate-950":`#020617`,"gray-50":`#f9fafb`,"gray-100":`#f3f4f6`,"gray-200":`#e5e7eb`,"gray-300":`#d1d5db`,"gray-400":`#9ca3af`,"gray-500":`#6b7280`,"gray-600":`#4b5563`,"gray-700":`#374151`,"gray-800":`#1f2937`,"gray-900":`#111827`,"gray-950":`#030712`,"zinc-50":`#fafafa`,"zinc-100":`#f4f4f5`,"zinc-200":`#e4e4e7`,"zinc-300":`#d4d4d8`,"zinc-400":`#a1a1aa`,"zinc-500":`#71717a`,"zinc-600":`#52525b`,"zinc-700":`#3f3f46`,"zinc-800":`#27272a`,"zinc-900":`#18181b`,"zinc-950":`#09090b`,"neutral-50":`#fafafa`,"neutral-100":`#f5f5f5`,"neutral-200":`#e5e5e5`,"neutral-300":`#d4d4d4`,"neutral-400":`#a3a3a3`,"neutral-500":`#737373`,"neutral-600":`#525252`,"neutral-700":`#404040`,"neutral-800":`#262626`,"neutral-900":`#171717`,"neutral-950":`#0a0a0a`,"stone-50":`#fafaf9`,"stone-100":`#f5f5f4`,"stone-200":`#e7e5e4`,"stone-300":`#d6d3d1`,"stone-400":`#a8a29e`,"stone-500":`#78716c`,"stone-600":`#57534e`,"stone-700":`#44403c`,"stone-800":`#292524`,"stone-900":`#1c1917`,"stone-950":`#0c0a09`,"red-50":`#fef2f2`,"red-100":`#fee2e2`,"red-200":`#fecaca`,"red-300":`#fca5a5`,"red-400":`#f87171`,"red-500":`#ef4444`,"red-600":`#dc2626`,"red-700":`#b91c1c`,"red-800":`#991b1b`,"red-900":`#7f1d1d`,"red-950":`#450a0a`,"orange-50":`#fff7ed`,"orange-100":`#ffedd5`,"orange-200":`#fed7aa`,"orange-300":`#fdba74`,"orange-400":`#fb923c`,"orange-500":`#f97316`,"orange-600":`#ea580c`,"orange-700":`#c2410c`,"orange-800":`#9a3412`,"orange-900":`#7c2d12`,"orange-950":`#431407`,"amber-50":`#fffbeb`,"amber-100":`#fef3c7`,"amber-200":`#fde68a`,"amber-300":`#fcd34d`,"amber-400":`#fbbf24`,"amber-500":`#f59e0b`,"amber-600":`#d97706`,"amber-700":`#b45309`,"amber-800":`#92400e`,"amber-900":`#78350f`,"amber-950":`#451a03`,"yellow-50":`#fefce8`,"yellow-100":`#fef9c3`,"yellow-200":`#fef08a`,"yellow-300":`#fde047`,"yellow-400":`#facc15`,"yellow-500":`#eab308`,"yellow-600":`#ca8a04`,"yellow-700":`#a16207`,"yellow-800":`#854d0e`,"yellow-900":`#713f12`,"yellow-950":`#422006`,"lime-50":`#f7fee7`,"lime-100":`#ecfccb`,"lime-200":`#d9f99d`,"lime-300":`#bef264`,"lime-400":`#a3e635`,"lime-500":`#84cc16`,"lime-600":`#65a30d`,"lime-700":`#4d7c0f`,"lime-800":`#3f6212`,"lime-900":`#365314`,"lime-950":`#1a2e05`,"green-50":`#f0fdf4`,"green-100":`#dcfce7`,"green-200":`#bbf7d0`,"green-300":`#86efac`,"green-400":`#4ade80`,"green-500":`#22c55e`,"green-600":`#16a34a`,"green-700":`#15803d`,"green-800":`#166534`,"green-900":`#14532d`,"green-950":`#052e16`,"emerald-50":`#ecfdf5`,"emerald-100":`#d1fae5`,"emerald-200":`#a7f3d0`,"emerald-300":`#6ee7b7`,"emerald-400":`#34d399`,"emerald-500":`#10b981`,"emerald-600":`#059669`,"emerald-700":`#047857`,"emerald-800":`#065f46`,"emerald-900":`#064e3b`,"emerald-950":`#022c22`,"teal-50":`#f0fdfa`,"teal-100":`#ccfbf1`,"teal-200":`#99f6e4`,"teal-300":`#5eead4`,"teal-400":`#2dd4bf`,"teal-500":`#14b8a6`,"teal-600":`#0d9488`,"teal-700":`#0f766e`,"teal-800":`#115e59`,"teal-900":`#134e4a`,"teal-950":`#042f2e`,"cyan-50":`#ecfeff`,"cyan-100":`#cffafe`,"cyan-200":`#a5f3fc`,"cyan-300":`#67e8f9`,"cyan-400":`#22d3ee`,"cyan-500":`#06b6d4`,"cyan-600":`#0891b2`,"cyan-700":`#0e7490`,"cyan-800":`#155e75`,"cyan-900":`#164e63`,"cyan-950":`#083344`,"sky-50":`#f0f9ff`,"sky-100":`#e0f2fe`,"sky-200":`#bae6fd`,"sky-300":`#7dd3fc`,"sky-400":`#38bdf8`,"sky-500":`#0ea5e9`,"sky-600":`#0284c7`,"sky-700":`#0369a1`,"sky-800":`#075985`,"sky-900":`#0c4a6e`,"sky-950":`#082f49`,"blue-50":`#eff6ff`,"blue-100":`#dbeafe`,"blue-200":`#bfdbfe`,"blue-300":`#93c5fd`,"blue-400":`#60a5fa`,"blue-500":`#3b82f6`,"blue-600":`#2563eb`,"blue-700":`#1d4ed8`,"blue-800":`#1e40af`,"blue-900":`#1e3a8a`,"blue-950":`#172554`,"indigo-50":`#eef2ff`,"indigo-100":`#e0e7ff`,"indigo-200":`#c7d2fe`,"indigo-300":`#a5b4fc`,"indigo-400":`#818cf8`,"indigo-500":`#6366f1`,"indigo-600":`#4f46e5`,"indigo-700":`#4338ca`,"indigo-800":`#3730a3`,"indigo-900":`#312e81`,"indigo-950":`#1e1b4b`,"violet-50":`#f5f3ff`,"violet-100":`#ede9fe`,"violet-200":`#ddd6fe`,"violet-300":`#c4b5fd`,"violet-400":`#a78bfa`,"violet-500":`#8b5cf6`,"violet-600":`#7c3aed`,"violet-700":`#6d28d9`,"violet-800":`#5b21b6`,"violet-900":`#4c1d95`,"violet-950":`#2e1065`,"purple-50":`#faf5ff`,"purple-100":`#f3e8ff`,"purple-200":`#e9d5ff`,"purple-300":`#d8b4fe`,"purple-400":`#c084fc`,"purple-500":`#a855f7`,"purple-600":`#9333ea`,"purple-700":`#7e22ce`,"purple-800":`#6b21a8`,"purple-900":`#581c87`,"purple-950":`#3b0764`,"fuchsia-50":`#fdf4ff`,"fuchsia-100":`#fae8ff`,"fuchsia-200":`#f5d0fe`,"fuchsia-300":`#f0abfc`,"fuchsia-400":`#e879f9`,"fuchsia-500":`#d946ef`,"fuchsia-600":`#c026d3`,"fuchsia-700":`#a21caf`,"fuchsia-800":`#86198f`,"fuchsia-900":`#701a75`,"fuchsia-950":`#4a044e`,"pink-50":`#fdf2f8`,"pink-100":`#fce7f3`,"pink-200":`#fbcfe8`,"pink-300":`#f9a8d4`,"pink-400":`#f472b6`,"pink-500":`#ec4899`,"pink-600":`#db2777`,"pink-700":`#be185d`,"pink-800":`#9d174d`,"pink-900":`#831843`,"pink-950":`#500724`,"rose-50":`#fff1f2`,"rose-100":`#ffe4e6`,"rose-200":`#fecdd3`,"rose-300":`#fda4af`,"rose-400":`#fb7185`,"rose-500":`#f43f5e`,"rose-600":`#e11d48`,"rose-700":`#be123c`,"rose-800":`#9f1239`,"rose-900":`#881337`,"rose-950":`#4c0519`},v4:{"red-50":`oklch(97.1% 0.013 17.38)`,"red-100":`oklch(93.6% 0.032 17.717)`,"red-200":`oklch(88.5% 0.062 18.334)`,"red-300":`oklch(80.8% 0.114 19.571)`,"red-400":`oklch(70.4% 0.191 22.216)`,"red-500":`oklch(63.7% 0.237 25.331)`,"red-600":`oklch(57.7% 0.245 27.325)`,"red-700":`oklch(50.5% 0.213 27.518)`,"red-800":`oklch(44.4% 0.177 26.899)`,"red-900":`oklch(39.6% 0.141 25.723)`,"red-950":`oklch(25.8% 0.092 26.042)`,"orange-50":`oklch(98% 0.016 73.684)`,"orange-100":`oklch(95.4% 0.038 75.164)`,"orange-200":`oklch(90.1% 0.076 70.697)`,"orange-300":`oklch(83.7% 0.128 66.29)`,"orange-400":`oklch(75% 0.183 55.934)`,"orange-500":`oklch(70.5% 0.213 47.604)`,"orange-600":`oklch(64.6% 0.222 41.116)`,"orange-700":`oklch(55.3% 0.195 38.402)`,"orange-800":`oklch(47% 0.157 37.304)`,"orange-900":`oklch(40.8% 0.123 38.172)`,"orange-950":`oklch(26.6% 0.079 36.259)`,"amber-50":`oklch(98.7% 0.022 95.277)`,"amber-100":`oklch(96.2% 0.059 95.617)`,"amber-200":`oklch(92.4% 0.12 95.746)`,"amber-300":`oklch(87.9% 0.169 91.605)`,"amber-400":`oklch(82.8% 0.189 84.429)`,"amber-500":`oklch(76.9% 0.188 70.08)`,"amber-600":`oklch(66.6% 0.179 58.318)`,"amber-700":`oklch(55.5% 0.163 48.998)`,"amber-800":`oklch(47.3% 0.137 46.201)`,"amber-900":`oklch(41.4% 0.112 45.904)`,"amber-950":`oklch(27.9% 0.077 45.635)`,"yellow-50":`oklch(98.7% 0.026 102.212)`,"yellow-100":`oklch(97.3% 0.071 103.193)`,"yellow-200":`oklch(94.5% 0.129 101.54)`,"yellow-300":`oklch(90.5% 0.182 98.111)`,"yellow-400":`oklch(85.2% 0.199 91.936)`,"yellow-500":`oklch(79.5% 0.184 86.047)`,"yellow-600":`oklch(68.1% 0.162 75.834)`,"yellow-700":`oklch(55.4% 0.135 66.442)`,"yellow-800":`oklch(47.6% 0.114 61.907)`,"yellow-900":`oklch(42.1% 0.095 57.708)`,"yellow-950":`oklch(28.6% 0.066 53.813)`,"lime-50":`oklch(98.6% 0.031 120.757)`,"lime-100":`oklch(96.7% 0.067 122.328)`,"lime-200":`oklch(93.8% 0.127 124.321)`,"lime-300":`oklch(89.7% 0.196 126.665)`,"lime-400":`oklch(84.1% 0.238 128.85)`,"lime-500":`oklch(76.8% 0.233 130.85)`,"lime-600":`oklch(64.8% 0.2 131.684)`,"lime-700":`oklch(53.2% 0.157 131.589)`,"lime-800":`oklch(45.3% 0.124 130.933)`,"lime-900":`oklch(40.5% 0.101 131.063)`,"lime-950":`oklch(27.4% 0.072 132.109)`,"green-50":`oklch(98.2% 0.018 155.826)`,"green-100":`oklch(96.2% 0.044 156.743)`,"green-200":`oklch(92.5% 0.084 155.995)`,"green-300":`oklch(87.1% 0.15 154.449)`,"green-400":`oklch(79.2% 0.209 151.711)`,"green-500":`oklch(72.3% 0.219 149.579)`,"green-600":`oklch(62.7% 0.194 149.214)`,"green-700":`oklch(52.7% 0.154 150.069)`,"green-800":`oklch(44.8% 0.119 151.328)`,"green-900":`oklch(39.3% 0.095 152.535)`,"green-950":`oklch(26.6% 0.065 152.934)`,"emerald-50":`oklch(97.9% 0.021 166.113)`,"emerald-100":`oklch(95% 0.052 163.051)`,"emerald-200":`oklch(90.5% 0.093 164.15)`,"emerald-300":`oklch(84.5% 0.143 164.978)`,"emerald-400":`oklch(76.5% 0.177 163.223)`,"emerald-500":`oklch(69.6% 0.17 162.48)`,"emerald-600":`oklch(59.6% 0.145 163.225)`,"emerald-700":`oklch(50.8% 0.118 165.612)`,"emerald-800":`oklch(43.2% 0.095 166.913)`,"emerald-900":`oklch(37.8% 0.077 168.94)`,"emerald-950":`oklch(26.2% 0.051 172.552)`,"teal-50":`oklch(98.4% 0.014 180.72)`,"teal-100":`oklch(95.3% 0.051 180.801)`,"teal-200":`oklch(91% 0.096 180.426)`,"teal-300":`oklch(85.5% 0.138 181.071)`,"teal-400":`oklch(77.7% 0.152 181.912)`,"teal-500":`oklch(70.4% 0.14 182.503)`,"teal-600":`oklch(60% 0.118 184.704)`,"teal-700":`oklch(51.1% 0.096 186.391)`,"teal-800":`oklch(43.7% 0.078 188.216)`,"teal-900":`oklch(38.6% 0.063 188.416)`,"teal-950":`oklch(27.7% 0.046 192.524)`,"cyan-50":`oklch(98.4% 0.019 200.873)`,"cyan-100":`oklch(95.6% 0.045 203.388)`,"cyan-200":`oklch(91.7% 0.08 205.041)`,"cyan-300":`oklch(86.5% 0.127 207.078)`,"cyan-400":`oklch(78.9% 0.154 211.53)`,"cyan-500":`oklch(71.5% 0.143 215.221)`,"cyan-600":`oklch(60.9% 0.126 221.723)`,"cyan-700":`oklch(52% 0.105 223.128)`,"cyan-800":`oklch(45% 0.085 224.283)`,"cyan-900":`oklch(39.8% 0.07 227.392)`,"cyan-950":`oklch(30.2% 0.056 229.695)`,"sky-50":`oklch(97.7% 0.013 236.62)`,"sky-100":`oklch(95.1% 0.026 236.824)`,"sky-200":`oklch(90.1% 0.058 230.902)`,"sky-300":`oklch(82.8% 0.111 230.318)`,"sky-400":`oklch(74.6% 0.16 232.661)`,"sky-500":`oklch(68.5% 0.169 237.323)`,"sky-600":`oklch(58.8% 0.158 241.966)`,"sky-700":`oklch(50% 0.134 242.749)`,"sky-800":`oklch(44.3% 0.11 240.79)`,"sky-900":`oklch(39.1% 0.09 240.876)`,"sky-950":`oklch(29.3% 0.066 243.157)`,"blue-50":`oklch(97% 0.014 254.604)`,"blue-100":`oklch(93.2% 0.032 255.585)`,"blue-200":`oklch(88.2% 0.059 254.128)`,"blue-300":`oklch(80.9% 0.105 251.813)`,"blue-400":`oklch(70.7% 0.165 254.624)`,"blue-500":`oklch(62.3% 0.214 259.815)`,"blue-600":`oklch(54.6% 0.245 262.881)`,"blue-700":`oklch(48.8% 0.243 264.376)`,"blue-800":`oklch(42.4% 0.199 265.638)`,"blue-900":`oklch(37.9% 0.146 265.522)`,"blue-950":`oklch(28.2% 0.091 267.935)`,"indigo-50":`oklch(96.2% 0.018 272.314)`,"indigo-100":`oklch(93% 0.034 272.788)`,"indigo-200":`oklch(87% 0.065 274.039)`,"indigo-300":`oklch(78.5% 0.115 274.713)`,"indigo-400":`oklch(67.3% 0.182 276.935)`,"indigo-500":`oklch(58.5% 0.233 277.117)`,"indigo-600":`oklch(51.1% 0.262 276.966)`,"indigo-700":`oklch(45.7% 0.24 277.023)`,"indigo-800":`oklch(39.8% 0.195 277.366)`,"indigo-900":`oklch(35.9% 0.144 278.697)`,"indigo-950":`oklch(25.7% 0.09 281.288)`,"violet-50":`oklch(96.9% 0.016 293.756)`,"violet-100":`oklch(94.3% 0.029 294.588)`,"violet-200":`oklch(89.4% 0.057 293.283)`,"violet-300":`oklch(81.1% 0.111 293.571)`,"violet-400":`oklch(70.2% 0.183 293.541)`,"violet-500":`oklch(60.6% 0.25 292.717)`,"violet-600":`oklch(54.1% 0.281 293.009)`,"violet-700":`oklch(49.1% 0.27 292.581)`,"violet-800":`oklch(43.2% 0.232 292.759)`,"violet-900":`oklch(38% 0.189 293.745)`,"violet-950":`oklch(28.3% 0.141 291.089)`,"purple-50":`oklch(97.7% 0.014 308.299)`,"purple-100":`oklch(94.6% 0.033 307.174)`,"purple-200":`oklch(90.2% 0.063 306.703)`,"purple-300":`oklch(82.7% 0.119 306.383)`,"purple-400":`oklch(71.4% 0.203 305.504)`,"purple-500":`oklch(62.7% 0.265 303.9)`,"purple-600":`oklch(55.8% 0.288 302.321)`,"purple-700":`oklch(49.6% 0.265 301.924)`,"purple-800":`oklch(43.8% 0.218 303.724)`,"purple-900":`oklch(38.1% 0.176 304.987)`,"purple-950":`oklch(29.1% 0.149 302.717)`,"fuchsia-50":`oklch(97.7% 0.017 320.058)`,"fuchsia-100":`oklch(95.2% 0.037 318.852)`,"fuchsia-200":`oklch(90.3% 0.076 319.62)`,"fuchsia-300":`oklch(83.3% 0.145 321.434)`,"fuchsia-400":`oklch(74% 0.238 322.16)`,"fuchsia-500":`oklch(66.7% 0.295 322.15)`,"fuchsia-600":`oklch(59.1% 0.293 322.896)`,"fuchsia-700":`oklch(51.8% 0.253 323.949)`,"fuchsia-800":`oklch(45.2% 0.211 324.591)`,"fuchsia-900":`oklch(40.1% 0.17 325.612)`,"fuchsia-950":`oklch(29.3% 0.136 325.661)`,"pink-50":`oklch(97.1% 0.014 343.198)`,"pink-100":`oklch(94.8% 0.028 342.258)`,"pink-200":`oklch(89.9% 0.061 343.231)`,"pink-300":`oklch(82.3% 0.12 346.018)`,"pink-400":`oklch(71.8% 0.202 349.761)`,"pink-500":`oklch(65.6% 0.241 354.308)`,"pink-600":`oklch(59.2% 0.249 0.584)`,"pink-700":`oklch(52.5% 0.223 3.958)`,"pink-800":`oklch(45.9% 0.187 3.815)`,"pink-900":`oklch(40.8% 0.153 2.432)`,"pink-950":`oklch(28.4% 0.109 3.907)`,"rose-50":`oklch(96.9% 0.015 12.422)`,"rose-100":`oklch(94.1% 0.03 12.58)`,"rose-200":`oklch(89.2% 0.058 10.001)`,"rose-300":`oklch(81% 0.117 11.638)`,"rose-400":`oklch(71.2% 0.194 13.428)`,"rose-500":`oklch(64.5% 0.246 16.439)`,"rose-600":`oklch(58.6% 0.253 17.585)`,"rose-700":`oklch(51.4% 0.222 16.935)`,"rose-800":`oklch(45.5% 0.188 13.697)`,"rose-900":`oklch(41% 0.159 10.272)`,"rose-950":`oklch(27.1% 0.105 12.094)`,"slate-50":`oklch(98.4% 0.003 247.858)`,"slate-100":`oklch(96.8% 0.007 247.896)`,"slate-200":`oklch(92.9% 0.013 255.508)`,"slate-300":`oklch(86.9% 0.022 252.894)`,"slate-400":`oklch(70.4% 0.04 256.788)`,"slate-500":`oklch(55.4% 0.046 257.417)`,"slate-600":`oklch(44.6% 0.043 257.281)`,"slate-700":`oklch(37.2% 0.044 257.287)`,"slate-800":`oklch(27.9% 0.041 260.031)`,"slate-900":`oklch(20.8% 0.042 265.755)`,"slate-950":`oklch(12.9% 0.042 264.695)`,"gray-50":`oklch(98.5% 0.002 247.839)`,"gray-100":`oklch(96.7% 0.003 264.542)`,"gray-200":`oklch(92.8% 0.006 264.531)`,"gray-300":`oklch(87.2% 0.01 258.338)`,"gray-400":`oklch(70.7% 0.022 261.325)`,"gray-500":`oklch(55.1% 0.027 264.364)`,"gray-600":`oklch(44.6% 0.03 256.802)`,"gray-700":`oklch(37.3% 0.034 259.733)`,"gray-800":`oklch(27.8% 0.033 256.848)`,"gray-900":`oklch(21% 0.034 264.665)`,"gray-950":`oklch(13% 0.028 261.692)`,"zinc-50":`oklch(98.5% 0 none)`,"zinc-100":`oklch(96.7% 0.001 286.375)`,"zinc-200":`oklch(92% 0.004 286.32)`,"zinc-300":`oklch(87.1% 0.006 286.286)`,"zinc-400":`oklch(70.5% 0.015 286.067)`,"zinc-500":`oklch(55.2% 0.016 285.938)`,"zinc-600":`oklch(44.2% 0.017 285.786)`,"zinc-700":`oklch(37% 0.013 285.805)`,"zinc-800":`oklch(27.4% 0.006 286.033)`,"zinc-900":`oklch(21% 0.006 285.885)`,"zinc-950":`oklch(14.1% 0.005 285.823)`,"neutral-50":`oklch(98.5% 0 none)`,"neutral-100":`oklch(97% 0 none)`,"neutral-200":`oklch(92.2% 0 none)`,"neutral-300":`oklch(87% 0 none)`,"neutral-400":`oklch(70.8% 0 none)`,"neutral-500":`oklch(55.6% 0 none)`,"neutral-600":`oklch(43.9% 0 none)`,"neutral-700":`oklch(37.1% 0 none)`,"neutral-800":`oklch(26.9% 0 none)`,"neutral-900":`oklch(20.5% 0 none)`,"neutral-950":`oklch(14.5% 0 none)`,"stone-50":`oklch(98.5% 0.001 106.423)`,"stone-100":`oklch(97% 0.001 106.424)`,"stone-200":`oklch(92.3% 0.003 48.717)`,"stone-300":`oklch(86.9% 0.005 56.366)`,"stone-400":`oklch(70.9% 0.01 56.259)`,"stone-500":`oklch(55.3% 0.013 58.071)`,"stone-600":`oklch(44.4% 0.011 73.639)`,"stone-700":`oklch(37.4% 0.01 67.558)`,"stone-800":`oklch(26.8% 0.007 34.298)`,"stone-900":`oklch(21.6% 0.006 56.043)`,"stone-950":`oklch(14.7% 0.004 49.25)`,"mauve-50":`oklch(98.5% 0 none)`,"mauve-100":`oklch(96% 0.003 325.6)`,"mauve-200":`oklch(92.2% 0.005 325.62)`,"mauve-300":`oklch(86.5% 0.012 325.68)`,"mauve-400":`oklch(71.1% 0.019 323.02)`,"mauve-500":`oklch(54.2% 0.034 322.5)`,"mauve-600":`oklch(43.5% 0.029 321.78)`,"mauve-700":`oklch(36.4% 0.029 323.89)`,"mauve-800":`oklch(26.3% 0.024 320.12)`,"mauve-900":`oklch(21.2% 0.019 322.12)`,"mauve-950":`oklch(14.5% 0.008 326)`,"olive-50":`oklch(98.8% 0.003 106.5)`,"olive-100":`oklch(96.6% 0.005 106.5)`,"olive-200":`oklch(93% 0.007 106.5)`,"olive-300":`oklch(88% 0.011 106.6)`,"olive-400":`oklch(73.7% 0.021 106.9)`,"olive-500":`oklch(58% 0.031 107.3)`,"olive-600":`oklch(46.6% 0.025 107.3)`,"olive-700":`oklch(39.4% 0.023 107.4)`,"olive-800":`oklch(28.6% 0.016 107.4)`,"olive-900":`oklch(22.8% 0.013 107.4)`,"olive-950":`oklch(15.3% 0.006 107.1)`,"mist-50":`oklch(98.7% 0.002 197.1)`,"mist-100":`oklch(96.3% 0.002 197.1)`,"mist-200":`oklch(92.5% 0.005 214.3)`,"mist-300":`oklch(87.2% 0.007 219.6)`,"mist-400":`oklch(72.3% 0.014 214.4)`,"mist-500":`oklch(56% 0.021 213.5)`,"mist-600":`oklch(45% 0.017 213.2)`,"mist-700":`oklch(37.8% 0.015 216)`,"mist-800":`oklch(27.5% 0.011 216.9)`,"mist-900":`oklch(21.8% 0.008 223.9)`,"mist-950":`oklch(14.8% 0.004 228.8)`,"taupe-50":`oklch(98.6% 0.002 67.8)`,"taupe-100":`oklch(96% 0.002 17.2)`,"taupe-200":`oklch(92.2% 0.005 34.3)`,"taupe-300":`oklch(86.8% 0.007 39.5)`,"taupe-400":`oklch(71.4% 0.014 41.2)`,"taupe-500":`oklch(54.7% 0.021 43.1)`,"taupe-600":`oklch(43.8% 0.017 39.3)`,"taupe-700":`oklch(36.7% 0.016 35.7)`,"taupe-800":`oklch(26.8% 0.011 36.5)`,"taupe-900":`oklch(21.4% 0.009 43.1)`,"taupe-950":`oklch(14.7% 0.004 49.3)`,black:`#000`,white:`#fff`}},en=`CIEDE2000`,tn=/^#([0-9a-f]{3,8})$/i,nn={"gray-50":`#f9fafb`,"gray-100":`#f3f4f6`,"gray-200":`#e5e7eb`,"gray-300":`#d1d5db`,"gray-400":`#9ca3af`,"gray-500":`#6b7280`,"gray-600":`#4b5563`,"gray-700":`#374151`,"gray-800":`#1f2937`,"gray-900":`#111827`,"gray-950":`#030712`,"slate-50":`#f8fafc`,"slate-100":`#f1f5f9`,"slate-200":`#e2e8f0`,"slate-300":`#cbd5e1`,"slate-400":`#94a3b8`,"slate-500":`#64748b`,"slate-600":`#475569`,"slate-700":`#334155`,"slate-800":`#1e293b`,"slate-900":`#0f172a`,"slate-950":`#020617`,"zinc-50":`#fafafa`,"zinc-100":`#f4f4f5`,"zinc-200":`#e4e4e7`,"zinc-300":`#d4d4d8`,"zinc-400":`#a1a1aa`,"zinc-500":`#71717a`,"zinc-600":`#52525b`,"zinc-700":`#3f3f46`,"zinc-800":`#27272a`,"zinc-900":`#18181b`,"zinc-950":`#09090b`,"neutral-50":`#fafafa`,"neutral-100":`#f5f5f5`,"neutral-200":`#e5e5e5`,"neutral-300":`#d4d4d4`,"neutral-400":`#a3a3a3`,"neutral-500":`#737373`,"neutral-600":`#525252`,"neutral-700":`#404040`,"neutral-800":`#262626`,"neutral-900":`#171717`,"neutral-950":`#0a0a0a`,"stone-50":`#fafaf9`,"stone-100":`#f5f5f4`,"stone-200":`#e7e5e4`,"stone-300":`#d6d3d1`,"stone-400":`#a8a29e`,"stone-500":`#78716c`,"stone-600":`#57534e`,"stone-700":`#44403c`,"stone-800":`#292524`,"stone-900":`#1c1917`,"stone-950":`#0c0a09`,white:`#ffffff`,black:`#000000`},rn={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function an(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o**3,u=s**3,d=c**3;return[4.0767416621*l-3.3077115913*u+.2309699292*d,-1.2684380046*l+2.6097574011*u-.3413193965*d,-.0041960863*l-.7034186147*u+1.707614701*d].map(e=>{let t=e<=.0031308?12.92*e:1.055*Math.max(e,0)**(1/2.4)-.055;return Math.round(Math.max(0,Math.min(1,t))*255)})}function on(e,t,n){let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}),o=Math.cbrt(.4122214708*r+.5363325363*i+.0514459929*a),s=Math.cbrt(.2119034982*r+.6806995451*i+.1073969566*a),c=Math.cbrt(.0883024619*r+.2817188376*i+.6299787005*a),l=.2104542553*o+.793617785*s-.0040720468*c,u=1.9779984951*o-2.428592205*s+.4505937099*c,d=.0259040371*o+.7827717662*s-.808675766*c;return[l,Math.hypot(u,d),(Math.atan2(d,u)*180/Math.PI+360)%360]}var sn=e=>String(e).replace(/\/[\d.]+%?$/,``);function cn(e,t=null){if(typeof e!=`string`)return null;let n=e.trim().toLowerCase();if(t){let e=t[sn(n)];if(e&&e!==n)return cn(e,null)}let r=n.match(/^(-?[\d.]+)(?:deg)?\s+(-?[\d.]+)%\s+(-?[\d.]+)%$/);if(r)return cn(`hsl(${r[1]} ${r[2]}% ${r[3]}%)`,null);let i=n.match(/^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})$/);if(i){let e=[i[1],i[2],i[3]].map(Number);return e.every(e=>e<=255)?e:null}let a=n.match(/^oklch\(([^)]+)\)$/);if(a){let e=a[1].split(/[\s,/]+/).filter(Boolean),t=e[0].endsWith(`%`)?parseFloat(e[0])/100:parseFloat(e[0]),n=parseFloat(e[1]),r=parseFloat(e[2])||0;return[t,n].every(Number.isFinite)?an(t,n,r):null}let o=n.match(tn);if(o){let e=o[1];return(e.length===3||e.length===4)&&(e=e.split(``).map(e=>e+e).join(``)),e.length!==6&&e.length!==8?null:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}let s=n.match(/^rgba?\(([^)]+)\)$/);if(s){let e=s[1].split(/[\s,/]+/).filter(Boolean).slice(0,3).map(e=>e.endsWith(`%`)?Math.round(parseFloat(e)*2.55):parseFloat(e));return e.length===3&&e.every(Number.isFinite)?e:null}let c=n.match(/^hsla?\(([^)]+)\)$/);if(c){let e=c[1].split(/[\s,/]+/).filter(Boolean),t=parseFloat(e[0]),n=parseFloat(e[1])/100,r=parseFloat(e[2])/100;return[t,n,r].every(Number.isFinite)?un(t,n,r):null}let l=nn[sn(n)];if(l)return cn(l);let u=rn[sn(n)];return u?cn(u):null}function ln(e={},t={},n=`v3`){let r=n&&$t[n]?$t[n]:{},i={...nn,...r,...t};for(let[t,n]of Object.entries(e)){let e=t.match(/^--color-(.+)$/);e&&n&&(i[e[1]]=n.trim())}return i}function un(e,t,n){let r=(1-Math.abs(2*n-1))*t,i=(e%360+360)%360/60,a=r*(1-Math.abs(i%2-1)),[o,s,c]=i<1?[r,a,0]:i<2?[a,r,0]:i<3?[0,r,a]:i<4?[0,a,r]:i<5?[a,0,r]:[r,0,a],l=n-r/2;return[(o+l)*255,(s+l)*255,(c+l)*255].map(e=>Math.round(Math.max(0,Math.min(255,e))))}var dn=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},fn=[95.047,100,108.883];function pn([e,t,n]){let r=dn(e)*100,i=dn(t)*100,a=dn(n)*100;return[r*.4124564+i*.3575761+a*.1804375,r*.2126729+i*.7151522+a*.072175,r*.0193339+i*.119192+a*.9503041]}var mn=216/24389,hn=24389/27,gn=e=>e>mn?Math.cbrt(e):(hn*e+16)/116;function _n([e,t,n]){let r=gn(e/fn[0]),i=gn(t/fn[1]),a=gn(n/fn[2]);return[116*i-16,500*(r-i),200*(i-a)]}function vn(e,t=null){let n=cn(e,t);return n?_n(pn(n)):null}var yn=e=>e*Math.PI/180,bn=e=>e*180/Math.PI,xn=e=>e**7;function Sn([e,t,n],[r,i,a]){let o=(Math.hypot(t,n)+Math.hypot(i,a))/2,s=.5*(1-Math.sqrt(xn(o)/(xn(o)+xn(25)))),c=(1+s)*t,l=(1+s)*i,u=Math.hypot(c,n),d=Math.hypot(l,a),f=(e,t)=>{if(e===0&&t===0)return 0;let n=bn(Math.atan2(e,t));return n>=0?n:n+360},p=f(n,c),m=f(a,l),h=r-e,g=d-u,_;_=u*d===0?0:Math.abs(m-p)<=180?m-p:m-p>180?m-p-360:m-p+360;let v=2*Math.sqrt(u*d)*Math.sin(yn(_)/2),y=(e+r)/2,b=(u+d)/2,x;x=u*d===0?p+m:Math.abs(p-m)<=180?(p+m)/2:p+m<360?(p+m+360)/2:(p+m-360)/2;let S=1-.17*Math.cos(yn(x-30))+.24*Math.cos(yn(2*x))+.32*Math.cos(yn(3*x+6))-.2*Math.cos(yn(4*x-63)),C=30*Math.exp(-(((x-275)/25)**2)),w=2*Math.sqrt(xn(b)/(xn(b)+xn(25))),T=1+.015*(y-50)**2/Math.sqrt(20+(y-50)**2),E=1+.045*b,D=1+.015*b*S,O=-Math.sin(yn(2*C))*w;return Math.sqrt((h/T)**2+(g/E)**2+(v/D)**2+g/E*O*(v/D))}function Cn(e,t,n=null){let r=vn(e,n),i=vn(t,n);return r&&i?Sn(r,i):null}function wn(e,t,n){let r=e.map((e,t)=>t),i=e=>r[e]===e?e:r[e]=i(r[e]),a=(e,t)=>{let n=i(e),a=i(t);n!==a&&(r[n]=a)};for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++){let o=t(e[r],e[i]);o!==null&&o<n&&a(r,i)}let o=new Map;for(let t=0;t<e.length;t++){let n=i(t);o.has(n)||o.set(n,[]),o.get(n).push(e[t])}return[...o.values()].filter(e=>e.length>1)}function Tn(e,t){let n=parseFloat(e),r=parseFloat(t);return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r):null}var En=e=>Math.min(1,Math.max(0,e));function Dn(e){let t=e.trim().toLowerCase(),n=t.match(/^#([0-9a-f]{8}|[0-9a-f]{4})$/);if(n){let e=n[1],t=e.length===4?e[3]+e[3]:e.slice(6,8);return parseInt(t,16)/255}let r=t.match(/\/\s*([\d.]+)(%?)\s*\)$/);if(r)return r[2]?parseFloat(r[1])/100:parseFloat(r[1]);let i=t.match(/^(rgba|hsla)\(([^)]+)\)$/);if(i){let e=i[2].split(`,`).map(e=>e.trim());if(e.length===4){let t=e[3];return t.endsWith(`%`)?parseFloat(t)/100:parseFloat(t)}}return t===`transparent`?0:1}var On=/^\d{1,3}(\s*,\s*|\s+)\d{1,3}(\s*,\s*|\s+)\d{1,3}$/;function kn(e){return e.startsWith(`hsl:`)?`hsl-triplet`:On.test(e.trim())?`rgb-triplet`:`css`}function V(e){let t=e.trim().replace(/^hsl:/,``);if(/^transparent$/i.test(t))return{L:0,C:0,H:0,a:0};On.test(t)&&(t=t.replace(/,/g,` `));let n=cn(t);if(!n)return null;let[r,i,a]=on(n[0],n[1],n[2]),o=Dn(t);return[r,i,a,o].every(Number.isFinite)?{L:r,C:Math.max(0,i),H:(a%360+360)%360,a:En(o)}:null}function An(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o**3,u=s**3,d=c**3;return[4.0767416621*l-3.3077115913*u+.2309699292*d,-1.2684380046*l+2.6097574011*u-.3413193965*d,-.0041960863*l-.7034186147*u+1.707614701*d]}function jn(e){let t=t=>An(e.L,t,e.H).every(e=>e>=-5e-4&&e<=1.0005);if(t(e.C))return e;let n=0,r=e.C;for(let e=0;e<18;e++){let e=(n+r)/2;t(e)?n=e:r=e}return{...e,C:n}}function Mn(e,t){let n=jn(t),r=kn(e);if(r===`css`)return Nn(n);let[i,a,o]=an(En(n.L),Math.max(0,n.C),n.H).map(e=>Math.round(Math.min(255,Math.max(0,e))));if(r===`rgb-triplet`){let t=/,/.test(e)?/,\s/.test(e)?`, `:`,`:` `;return[i,a,o].join(t)}let s=i/255,c=a/255,l=o/255,u=Math.max(s,c,l),d=Math.min(s,c,l),f=(u+d)/2,p=0,m=0;if(u!==d){let e=u-d;m=f>.5?e/(2-u-d):e/(u+d),p=u===s?(c-l)/e+(c<l?6:0):u===c?(l-s)/e+2:(s-c)/e+4,p*=60}let h=e=>Math.round(e*10)/10;return`hsl:${h(p)} ${h(m*100)}% ${h(f*100)}%`}function Nn(e){let t=jn(e),[n,r,i]=an(En(t.L),Math.max(0,t.C),t.H).map(e=>Math.round(Math.min(255,Math.max(0,e))));return t.a>=.999?`#`+[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``):`rgb(${n} ${r} ${i} / ${Math.round(t.a*1e3)/1e3})`}function Pn(e){let t=jn(e),n=an(En(t.L),Math.max(0,t.C),t.H).map(e=>Math.min(1,Math.max(0,e/255))),r=e=>Math.round(e*1e4)/1e4;return{components:[r(n[0]),r(n[1]),r(n[2])],alpha:Math.round(t.a*1e3)/1e3,hex:`#`+n.map(e=>Math.round(e*255).toString(16).padStart(2,`0`)).join(``)}}function Fn(e,t){let n=t-e;for(;n>180;)n-=360;for(;n<-180;)n+=360;return n}var In=Object.keys(Mt).map(e=>({id:e,label:e[0].toUpperCase()+e.slice(1),hex:Mt[e].cPrimary})),Ln=[{fam:`secondary`,key:`cSecondary`,label:`Secondary`},{fam:`accent`,key:`cAccent`,label:`Accent`},{fam:`success`,key:`cSuccess`,label:`Success`},{fam:`warning`,key:`cWarning`,label:`Warning`},{fam:`danger`,key:`cDanger`,label:`Danger`},{fam:`info`,key:`cInfo`,label:`Info`}];function Rn({cfg:e,tokens:t,base:n,families:r,scheme:i,codeFonts:a=[],hasGradients:o=!1,varNow:s,dispatch:c,onCollapse:l,onRandomize:u,onReset:d,history:f,radiiOnScreen:p,kitName:m}){let h=m?`as the kit ships it`:`as in your code`,[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),x=(0,_.useRef)(null),S=e=>c({type:`SET`,patch:e}),C=(t,n)=>S({sb:{...e.sb,[t]:n}}),w=()=>{v(null),b(null)},T=(e,t)=>{if(g===e){w();return}let n=t?.getBoundingClientRect();b(n?{top:n.top-6,left:n.right+10}:null),v(e)};(0,_.useLayoutEffect)(()=>{let e=x.current;if(!e||!y)return;let t=window.innerHeight-e.offsetHeight-12;y.top>t&&(e.style.top=`${Math.max(12,t)}px`)},[y,g]),(0,_.useEffect)(()=>{if(!g)return;let e=e=>{e.target.closest(`.fmrow, .fmrow__pop`)||w()},t=e=>{e.key===`Escape`&&w()},n=()=>w(),r=e=>{e.target instanceof Element&&e.target.closest(`.fmrow__pop`)||w()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),window.addEventListener(`resize`,n),document.addEventListener(`scroll`,r,!0),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t),window.removeEventListener(`resize`,n),document.removeEventListener(`scroll`,r,!0)}},[g]);let E=Object.keys(n).every(t=>t===`sb`?JSON.stringify(e.sb)===JSON.stringify(n.sb):e[t]===n[t]),D=e.cPrimary.toLowerCase()!==n.cPrimary.toLowerCase(),O=e=>In.find(t=>t.hex.toLowerCase()===e.toLowerCase()),k=[],A=!!r&&r.centreId?.brand===void 0&&!D;k.push({key:`brand`,sec:`Colour`,label:`Brand`,changed:D,value:A?`None in your CSS`:O(e.cPrimary)?.label??jt(t.primaryHex),dot:(0,B.jsx)(`span`,{className:`fmrow__dot ${A?`fmrow__dot--none`:``}`,style:A?void 0:{background:e.cPrimary}}),body:()=>(0,B.jsxs)(B.Fragment,{children:[A&&(0,B.jsx)(`p`,{className:`sbp__hint`,style:{marginTop:0},children:`Your CSS has no colour near a brand role — there is nothing for this knob to move. Hue, Saturation and Contrast still reach every colour the page does have.`}),(0,B.jsx)(`div`,{className:`fmpop__grid`,children:In.map(t=>(0,B.jsxs)(`button`,{type:`button`,className:`menu__item fmopt ${O(e.cPrimary)?.id===t.id?`menu__item--on`:``}`,onClick:()=>{c({type:`APPLY_COLOR_THEME`,id:t.id}),w()},children:[(0,B.jsx)(`span`,{className:`fmopt__viz`,children:(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:t.hex}})}),(0,B.jsx)(`span`,{className:`fmopt__label`,children:t.label}),O(e.cPrimary)?.id===t.id&&(0,B.jsx)(M,{size:14,strokeWidth:2.5,className:`fmopt__check`})]},t.id))}),(0,B.jsxs)(`label`,{className:`fmbrand`,children:[(0,B.jsx)(`span`,{className:`fmbrand__label`,children:`Brand colour`}),(0,B.jsxs)(`span`,{className:`fmbrand__val`,children:[(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e.cPrimary}}),e.cPrimary]}),(0,B.jsx)(`input`,{type:`color`,className:`fmrow__colorinput`,value:e.cPrimary,onChange:e=>S({cPrimary:e.target.value}),"aria-label":`Brand colour`})]}),D&&(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm sbp__reset`,onClick:()=>S({cPrimary:n.cPrimary}),children:[`Back to your code (`,n.cPrimary,`)`]})]})});let j=t=>{let n=r?.centre[t.fam];if(!n)return null;let i=Nn({...n,a:1}),a=e.sb[t.key]??i,o=r?.centreId?.[t.fam],c=(o===void 0?void 0:s?.(o))??a;return{...t,centreHex:i,cur:a,live:c,changed:a.toLowerCase()!==i.toLowerCase()}},ee=(t,n=!0)=>(0,B.jsxs)(_.Fragment,{children:[(0,B.jsxs)(`label`,{className:`fmbrand`,children:[(0,B.jsxs)(`span`,{className:`fmbrand__label`,children:[t.label,` colour`]}),(0,B.jsxs)(`span`,{className:`fmbrand__val`,children:[(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:t.cur}}),t.cur]}),(0,B.jsx)(`input`,{type:`color`,className:`fmrow__colorinput`,value:t.cur,onChange:e=>C(t.key,e.target.value),"aria-label":`${t.label} colour`})]}),n&&(0,B.jsxs)(`p`,{className:`sbp__hint`,children:[`Every `,t.label.toLowerCase(),`-family colour in your CSS moves with this one; its most-used member is `,t.centreHex,`.`]}),e.sb[t.key]&&(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm sbp__reset`,onClick:()=>C(t.key,void 0),children:[`Back to your code`,n?``:` (${t.label.toLowerCase()})`]})]},t.key);for(let e of Ln.filter(e=>e.fam===`secondary`||e.fam===`accent`).map(j))e&&k.push({key:e.key,label:e.label,changed:e.changed,value:jt(e.cur),dot:(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e.live}}),body:()=>ee(e)});let te=Ln.filter(e=>e.fam!==`secondary`&&e.fam!==`accent`).map(j).filter(e=>!!e);if(te.length&&k.push({key:`status`,label:`Status`,changed:te.some(e=>e.changed),value:(0,B.jsx)(`span`,{className:`fmrow__dots`,children:te.map(e=>(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e.live},title:`${e.label}: ${e.live}`},e.key))}),body:()=>(0,B.jsxs)(B.Fragment,{children:[te.map(e=>ee(e,!1)),(0,B.jsx)(`p`,{className:`sbp__hint`,children:`Every colour of a status family in your CSS moves with its picker; the dots show each family's most-used member.`})]})}),r?.canvas){let t=Nn({...r.canvas,a:1}),n=e.sb.cBackground??t,i=(r.canvasId===void 0?void 0:s?.(r.canvasId))??n;k.push({key:`background`,label:`Background`,changed:n.toLowerCase()!==t.toLowerCase(),value:jt(n),dot:(0,B.jsx)(`span`,{className:`fmrow__dot fmrow__dot--ring`,style:{background:i}}),body:()=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`label`,{className:`fmbrand`,children:[(0,B.jsx)(`span`,{className:`fmbrand__label`,children:`Page background`}),(0,B.jsxs)(`span`,{className:`fmbrand__val`,children:[(0,B.jsx)(`span`,{className:`fmrow__dot fmrow__dot--ring`,style:{background:n}}),n]}),(0,B.jsx)(`input`,{type:`color`,className:`fmrow__colorinput`,value:n,onChange:e=>C(`cBackground`,e.target.value),"aria-label":`Page background`})]}),(0,B.jsxs)(`p`,{className:`sbp__hint`,children:[`Your page paints `,t,` behind everything; surfaces and cards near that lightness move with it, so their step above the page stays.`]}),e.sb.cBackground&&(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm sbp__reset`,onClick:()=>C(`cBackground`,void 0),children:[`Back to your code (`,t,`)`]})]})})}if(r?.palette?.length){let e=r.palette.slice(0,8).map((e,t)=>{let n=r.paletteId?.[t];return(n===void 0?void 0:s?.(n))??Nn({...e,a:1})});k.push({key:`palette`,label:`Palette`,changed:!1,value:(0,B.jsx)(`span`,{className:`fmrow__dots`,children:e.map((e,t)=>(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e},title:e},t))}),body:()=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`p`,{className:`sbp__hint`,children:[r.palette.length,` colour famil`,r.palette.length===1?`y`:`ies`,` in your CSS that are neither the brand nor a status role: pastel tints on cards, categories, chart series. They are not touched by the Status pickers; Hue, Saturation and Contrast move them.`]}),(0,B.jsx)(`div`,{className:`fmrow__dots`,style:{gap:6,padding:`4px 10px 8px`},children:e.map((e,t)=>(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e,width:14,height:14},title:e},t))})]})})}let ne=(t,r)=>{let i=e.sb[t.key]??Jt[t.key],a=n.sb[t.key]??Jt[t.key];return{key:t.key,sec:r,label:t.label,changed:i!==a,value:Zt(t,i),body:()=>(0,B.jsxs)(`div`,{className:`sbp__dial`,children:[t.key===`radius`&&p!==void 0&&p<=3&&(0,B.jsxs)(`p`,{className:`sbp__hint`,style:{marginTop:0,maxWidth:`none`},children:[p===0?`Nothing on this screen paints a rounded corner`:`Only ${p} element${p===1?``:`s`} on this screen paint${p===1?`s`:``} a rounded corner`,`, so this dial has little visible to move. It scales the radii your CSS has; square corners stay square.`]}),(0,B.jsxs)(`div`,{className:`sbp__dial-row`,children:[(0,B.jsx)(`input`,{type:`range`,min:t.min,max:t.max,step:t.step,value:i,onChange:e=>C(t.key,parseFloat(e.target.value)),"aria-label":t.label,list:`snaps-${t.key}`}),(0,B.jsx)(`datalist`,{id:`snaps-${t.key}`,children:t.snaps.map(e=>(0,B.jsx)(`option`,{value:e.at,label:e.label},e.at))})]}),(0,B.jsx)(`div`,{className:`sbp__snaps`,children:t.snaps.map(e=>(0,B.jsx)(`button`,{type:`button`,className:`sbp__snap ${Xt(t,i)?.at===e.at?`sbp__snap--on`:``}`,onClick:()=>C(t.key,e.at),children:e.label===`as is`?h:e.label},e.at))}),(0,B.jsxs)(`div`,{className:`sbp__dial-foot`,children:[(0,B.jsx)(`span`,{children:Zt(t,i)}),i!==a&&(0,B.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>C(t.key,a),children:`Reset`})]})]})}},re=t=>(t===`hue`||t===`sat`||t===`contrast`)&&!!m&&(e.sb[t]??Jt[t])===(n.sb[t]??Jt[t]);for(let e of Yt.filter(e=>e.section===`Colour`&&(e.key!==`gradAngle`||o)&&!re(e.key)))k.push(ne(e));if(i&&(i.media||i.hooks.length)){let t=e.sb.dark;k.push({key:`dark`,label:`Dark mode`,changed:t!==n.sb.dark,value:t===`dark`?`Dark`:t===`light`?`Light`:`as is`,body:()=>(0,B.jsxs)(`div`,{className:`fmpop__list`,children:[[[void 0,`as is`,`whatever your page does on its own`],[`dark`,`Dark`,`your own dark scheme, switched on`],[`light`,`Light`,`your own light scheme, forced`]].map(([e,n,r])=>(0,B.jsxs)(`button`,{type:`button`,className:`menu__item fmopt ${t===e?`menu__item--on`:``}`,onClick:()=>{C(`dark`,e),w()},title:r,children:[(0,B.jsx)(`span`,{className:`fmopt__label`,children:n}),t===e&&(0,B.jsx)(M,{size:14,strokeWidth:2.5,className:`fmopt__check`})]},String(e))),(0,B.jsxs)(`p`,{className:`sbp__hint`,children:[`Found in your CSS: `,[i.media?`prefers-color-scheme`:null,...i.hooks.map(([e,t])=>e===`class`?`.${t}`:`[${e}="${t}"]`)].filter(Boolean).join(` · `),`.`]})]})})}k.push({key:`neutral`,label:`Grey tint`,changed:e.neutral!==n.neutral,value:e.neutral===`auto`?`Follows brand`:`Neutral`,body:()=>(0,B.jsx)(`div`,{className:`fmpop__list`,children:[[`neutral`,`Neutral`,`greys stay as they are`],[`auto`,`Follows brand`,`greys take a whisper of the brand hue`]].map(([t,n,r])=>(0,B.jsxs)(`button`,{type:`button`,className:`menu__item fmopt ${e.neutral===t?`menu__item--on`:``}`,onClick:()=>{S({neutral:t}),w()},title:r,children:[(0,B.jsx)(`span`,{className:`fmopt__label`,children:n}),e.neutral===t&&(0,B.jsx)(M,{size:14,strokeWidth:2.5,className:`fmopt__check`})]},t))})});let N=(t,r)=>({key:t,sec:t===`fontDisplay`?`Type`:void 0,label:r,changed:e[t]!==n[t],value:e[t].replace(/^Custom: /,``),body:()=>(0,B.jsx)(qt,{inline:!0,value:e[t],inCode:a,groups:t===`fontDisplay`?$e:Qe,onChange:e=>{S({[t]:e}),w()}}),wide:!0});k.push(N(`fontDisplay`,`Display font`),N(`fontBody`,`Body font`));for(let e of Yt.filter(e=>e.section===`Type`))k.push(ne(e));return Yt.filter(e=>e.section===`Shape`).forEach((e,t)=>k.push(ne(e,t===0?`Shape`:void 0))),(0,B.jsxs)(`aside`,{className:`panel`,children:[(0,B.jsxs)(`div`,{className:`card fmenu`,children:[(0,B.jsxs)(`div`,{className:`fmenu__bar`,children:[(0,B.jsx)(`span`,{className:`fmenu__bar-title`,children:m?`${m} · knobs`:`Your app · knobs`}),(0,B.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--icon fmenu__collapse`,onClick:l,"aria-label":`Collapse`,title:`Collapse for a full-width preview`,children:(0,B.jsx)(ve,{size:15,strokeWidth:1.75})})]}),(0,B.jsx)(`div`,{className:`fmenu__rows`,children:k.map(e=>(0,B.jsxs)(_.Fragment,{children:[e.sec&&(0,B.jsx)(`div`,{className:`menu__label fmsec`,children:e.sec}),(0,B.jsxs)(`div`,{className:`fmrow ${g===e.key?`fmrow--open`:``}`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`menu__item fmrow__head sbp__head`,onClick:t=>T(e.key,t.currentTarget.closest(`.fmrow`)),"aria-expanded":g===e.key,children:[(0,B.jsx)(`span`,{className:`sbp__state ${e.changed?`sbp__state--changed`:``}`,title:e.changed?`changed`:h}),(0,B.jsx)(`span`,{className:`fmrow__label`,children:e.label}),(0,B.jsxs)(`span`,{className:`menu__value fmrow__val`,title:String(e.value),children:[e.dot&&(0,B.jsx)(`span`,{className:`fmrow__dot fmrow__dot--viz`,children:e.dot}),(0,B.jsx)(`span`,{className:`fmrow__val-text`,children:e.value})]}),(0,B.jsx)(ae,{size:14,strokeWidth:2,className:`fmrow__chev`})]}),g===e.key&&(0,Re.createPortal)((0,B.jsx)(`div`,{ref:x,className:`menu fmrow__pop ${e.wide?`fmrow__pop--font`:``}`,role:`menu`,style:y?{position:`fixed`,top:y.top,left:y.left}:void 0,children:e.body()}),document.body)]})]},e.key))})]}),(0,B.jsxs)(`div`,{className:`panel__foot`,children:[f&&(0,B.jsxs)(`span`,{className:`panel__history`,role:`group`,"aria-label":`History`,children:[(0,B.jsx)(`button`,{type:`button`,className:`panel__hist`,onClick:f.undo,disabled:!f.canUndo,title:`Undo (⌘Z)`,"aria-label":`Undo`,children:(0,B.jsx)(Pe,{size:15,strokeWidth:1.75})}),(0,B.jsx)(`button`,{type:`button`,className:`panel__hist`,onClick:f.redo,disabled:!f.canRedo,title:`Redo (⇧⌘Z)`,"aria-label":`Redo`,children:(0,B.jsx)(Ce,{size:15,strokeWidth:1.75})})]}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--secondary panel__shuffle`,onClick:u,title:`Shuffle: a random stand on every knob`,children:[(0,B.jsx)(ke,{size:15,strokeWidth:1.75}),(0,B.jsx)(`span`,{children:`Shuffle`})]}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost panel__reset`,onClick:d,disabled:E,title:E?`Every knob is on your code`:`Back to your code, every knob`,children:[(0,B.jsx)(Ee,{size:15,strokeWidth:1.75}),(0,B.jsx)(`span`,{children:`Reset`})]})]})]})}var zn={sb:Jt,colorTheme:`cobalt`,color:`tone`,radius:`soft`,conformance:`aa`,scale:`default`,typeScale:`md`,labelCase:`sentence`,fontDisplay:`Inter`,fontBody:`Inter`,iconSet:`line`,surfaceDepth:`soft`,surface:`outlined`,borders:`subtle`,cPrimary:`#0A84FF`,harmony:`tonal`,spread:60,expression:100,neutral:`auto`,canvas:`neutral`,fill:`brand`,mode:`light`},Bn={mono:{spread:0,expression:85},tonal:{spread:60,expression:100},complement:{spread:180,expression:100},expressive:{spread:120,expression:140}};function Vn(e){let t=Number.isFinite(e.spread)?e.spread:Bn.tonal.spread,n=Number.isFinite(e.expression)?e.expression:Bn.tonal.expression;return{spreadDeg:Math.max(0,Math.min(180,t)),exprMul:Math.max(0,Math.min(1.5,n/100))}}function Hn(e){let t=e.surfaceDepth!==`flat`,n=e.surface===`outlined`||e.borders!==`faint`,r=e.surface===`filled`;return{shadow:t,border:n,fill:r,count:Number(t)+Number(n)+Number(r)}}function Un(e){return Hn(e).count===0?`subtle`:e.borders}var Wn=16,Gn=e=>e===0?`0rem`:`${+(e/Wn).toFixed(4)}rem`,Kn={none:0,subtle:5,soft:10,round:16},qn={compact:{space:12,pad:16,stackGap:6,btnH:32,inH:32,rowDefault:`sm`,calCell:28,toggleW:28,toggleH:14},default:{space:16,pad:24,stackGap:8,btnH:36,inH:36,rowDefault:`md`,calCell:32,toggleW:32,toggleH:18},comfortable:{space:20,pad:28,stackGap:10,btnH:44,inH:44,rowDefault:`lg`,calCell:44,toggleW:44,toggleH:24}},Jn={none:{fast:0,normal:0,slow:0},snappy:{fast:70,normal:110,slow:180},smooth:{fast:120,normal:200,slow:320},playful:{fast:150,normal:260,slow:380}},Yn={snappy:.72,normal:1,generous:1.42},Xn={standard:{ease:`cubic-bezier(.4,0,.2,1)`,easeOut:`cubic-bezier(.05,.7,.1,1)`,easeIn:`cubic-bezier(.3,0,.8,.15)`},emphasized:{ease:`cubic-bezier(.2,0,0,1)`,easeOut:`cubic-bezier(.05,.7,.1,1)`,easeIn:`cubic-bezier(.3,0,.8,.15)`},spring:{ease:`cubic-bezier(.34,1.56,.64,1)`,easeOut:`cubic-bezier(.34,1.3,.64,1)`,easeIn:`cubic-bezier(.3,0,.8,.15)`}},Zn={standard:`cubic-bezier(.2,0,0,1)`,accel:`cubic-bezier(.3,0,.8,.15)`,decel:`cubic-bezier(.05,.7,.1,1)`},Qn=.05;function $n(e,t,n=24){let r=Math.sqrt(t),i=e,a=6.91/(Math.min(i,1)*r),o=e=>{if(i<1){let t=r*Math.sqrt(1-i*i);return 1-Math.exp(-i*r*e)*(Math.cos(t*e)+i*r/t*Math.sin(t*e))}return 1-Math.exp(-r*e)*(1+r*e)},s=Array.from({length:n+1},(e,t)=>+o(t/n*a).toFixed(4));return s[n]=1,{easing:`linear(${s.join(`, `)})`,durMs:Math.round(a*1e3)}}var er={standard:{fast:[.9,1400],def:[.9,700],slow:[.9,300]}},tr={sm:[26,19,15,13,11.5],md:[30,22,16,14,12],lg:[34,24,17,15,12.5],xl:[38,27,19,16,13]};function nr(e,t){return e===`flat`?{xs:`none`,sm:`none`,md:`none`,lg:`none`}:e===`soft`?{xs:`0 1px 2px hsl(${t}/.05)`,sm:`0 1px 2px hsl(${t}/.07)`,md:`0 4px 6px -1px hsl(${t}/.10), 0 2px 4px -2px hsl(${t}/.10)`,lg:`0 10px 15px -3px hsl(${t}/.13), 0 4px 6px -4px hsl(${t}/.13)`}:e===`sharp`?{xs:`0 1px 0 hsl(${t}/.16)`,sm:`0 1px 0 hsl(${t}/.22)`,md:`0 2px 0 hsl(${t}/.20),0 3px 1px hsl(${t}/.14)`,lg:`0 4px 0 hsl(${t}/.20),0 8px 3px hsl(${t}/.16)`}:{xs:`0 1px 2px hsl(${t}/.05)`,sm:`0 1px 2px hsl(${t}/.10)`,md:`0 2px 4px hsl(${t}/.10),0 6px 14px hsl(${t}/.12)`,lg:`0 4px 8px hsl(${t}/.10),0 12px 24px hsl(${t}/.14),0 24px 48px hsl(${t}/.14)`}}var rr={flat:`flat`,soft:`soft`,deep:`default`},ir=e=>e===`flat`||e===`soft`||e===`deep`?e:e===`layered`?`deep`:`soft`,ar={faint:[4,2],subtle:[5,3],medium:[6,4],strong:[7,5]};function or(e){let t=e.color===`mono`,[n,r]=ot(e.cPrimary),{spreadDeg:i,exprMul:a}=Vn(e),o=t?0:i,s=e.neutral===`auto`?{h:n,s:Math.min(Math.max(r,8),14)}:Dt[e.neutral],c=e.mode===`dark`,l=rr[ir(e.surfaceDepth)],u=e.surface===`filled`,d=u,f=gt(s.h,s.s,c,t,a),p=e=>f[Math.max(0,Math.min(11,Math.round(e)))],m=c?{sunken:p(0),base:p(2),s2:p(3),raised:p(4),overlay:p(5)}:{base:`oklch(100% 0 0)`,raised:`oklch(100% 0 0)`,overlay:`oklch(100% 0 0)`,s2:p(1),sunken:p(3)},h=c?m.overlay:m.sunken,g=(e,t,n)=>{let r=dt(t),i=dt(e);if(xt(i,r)>=n)return e;let[a,o,s]=R(i),l=c?1:-1;for(let e=a;e>=.1&&e<=.98;e+=l*.01){let t=`oklch(${(e*100).toFixed(1)}% ${o.toFixed(4)} ${s.toFixed(1)})`;if(xt(dt(t),r)>=n)return t}return e},_=g(p(8),h,4.5),v=.1,y=(()=>{let e=g(p(10),h,4.5),[t,n,r]=R(dt(e)),i=R(dt(_))[0];return(c?t-i:i-t)>=v?e:`oklch(${((c?Math.min(.98,i+v):Math.max(.18,i-v))*100).toFixed(1)}% ${n.toFixed(4)} ${r.toFixed(1)})`})(),b={main:p(11),muted:y,faint:_},x=ot(e.cPrimary)[2],S=n>=18&&n<=70,C=t?0:Math.min(r,82),w=e=>{let r=t?e?92:12:e?S?72:46:Math.min(x,52);return t?r:Et(n,C,r)},T=z(n,C,w(c)),E=_t(T,c),D=E[8],O=E[9],k=e=>St(e),A=(()=>{let e=dt(m.base),t=dt(D);if(xt(t,e)>=3)return D;let[n,r,i]=ot(t),a=c?1:-1;for(let t=i;t>=14&&t<=90;t+=a*2){let i=z(n,r,t);if(xt(i,e)>=3)return i}for(let t=i;t>=14&&t<=90;t-=a*2){let i=z(n,r,t);if(xt(i,e)>=3)return i}return D})(),j=St(T),ee=(()=>{let e=dt(O);if(xt(e,j)>=4.5)return O;let[t]=R(j),[n,r,i]=R(e),a=t>n?-1:1;for(let e=n;e>=.08&&e<=.97;e+=a*.01){let t=`oklch(${(e*100).toFixed(1)}% ${r.toFixed(4)} ${i.toFixed(1)})`;if(xt(dt(t),j)>=4.5)return t}return O})(),te=g(D,h,4.5),ne=E[2],re=t?c?lt(n,12,88):lt(n,14,22):c?lt(n,Math.max(70,C),82):g(D,ne,4.5),M=(()=>{let[e,t,n]=R(dt(re)),r=c?e+.09:e-.09,i=r>.97||r<.06?c?e-.11:e+.11:r,a=`oklch(${(Math.min(.97,Math.max(.06,i))*100).toFixed(1)}% ${t.toFixed(4)} ${n.toFixed(1)})`;return xt(dt(a),dt(h))>=4.5?a:re})(),N=(n+o*.25)%360,ie=Math.round(C*.6*a),ae=c?56:48,oe=t?0:Math.min(ie,82),se=t?c?60:54:ae,P=z(N,oe,se),F=lt(N,oe,se),I=Ct(P),ce=t?z(N,c?5:6,c?20:93):z(N,c?Math.max(20,Math.min(oe,36)):Math.max(24,Math.min(oe,44)),c?23:91),le=St(ce),ue=(n+o)%360,de=Math.min((C+6)*a,88),[fe,pe,me]=t?[ue,0,c?60:52]:wt(ue,Math.min(de,88),c?62:54),he=lt(fe,pe,me),ge=z(fe,pe,me),_e=Ct(ge),L=vt(n,t?0:C,t,c,{spreadFactor:o/60,exprMul:a}),ve=L.base,ye=D,be=c?58:48,xe=c?20:94,Se=t?c?14:12:Math.round(pe*.42),Ce=z(fe,Se,xe),we=lt(fe,Se,xe),Te=St(Ce),Ee=[{k:`success`,h:145,s:c?52:58,softMul:.42},{k:`warning`,h:45,s:c?75:88,softMul:c?.34:.78},{k:`danger`,h:4,s:c?62:68,softMul:.42},{k:`info`,h:212,s:c?60:70,softMul:.42}],De={},Oe=[];Ee.forEach(({k:e,h:r,s:i,softMul:a})=>{let o=t?r:Tt(r,n),s=z(o,i,be),l=Math.round(c?i*(a+.08):i*a),u=z(o,l,xe);De[`--k-`+e]=lt(o,i,be),De[`--k-`+e+`-fg`]=Ct(s),De[`--k-`+e+`-text`]=g(lt(o,i,be),h,4.5),De[`--k-`+e+`-soft`]=lt(o,l,xe),De[`--k-`+e+`-soft-fg`]=Ct(u),Oe.push({k:e,hex:s,soft:u})});let ke=c?{lowest:p(0),low:p(2),mid:p(3),high:p(4),highest:p(5)}:{lowest:`oklch(100% 0 0)`,low:p(1),mid:p(2),high:p(3),highest:p(4)},Ae=gt(s.h,s.s,!c,t,a),je=e=>Ae[Math.max(0,Math.min(11,e))],Me=je(2),Ne=je(11),Pe=_t(z(n,C,w(!c)),!c)[8],Fe=p(ar[Un(e)][+!!c]),Ie=Kn[e.radius],Le=Ie,Re={sm:Gn(Math.round(Ie*.66)),md:Gn(Ie),lg:Gn(Math.min(Math.round(Ie*1.2),16)),pill:`999px`,button:Gn(Le)},ze=e.conformance===`aaa`,Ve=qn[e.scale],We=ze?{...Ve,btnH:Math.max(44,Ve.btnH),inH:Math.max(44,Ve.inH),calCell:Math.max(44,Ve.calCell)}:Ve,Ge=Gn(We.space),Ke=Gn(We.pad),qe={"--k-s-0":`0`};for(let e of[2,4,6,8,10,12,14,16,20,24,28,32])qe[`--k-s-${e}`]=Gn(e);qe[`--k-measure-narrow`]=`48ch`,qe[`--k-measure-prose`]=`68ch`,qe[`--k-measure-wide`]=`90ch`;let Je=c?`0 0 0`:`${n.toFixed(0)} ${t?8:16}% 18%`,Ye=nr(l,Je),Ze=Jn.smooth,Qe=Yn.normal,$e=er.standard,et=$n(...$e.fast),it=$n(...$e.def),at=$n(...$e.slow),st=Xn.standard,ct=e=>`${Math.round(e*Qe)}ms`,ft={fast:ct(Ze.fast),normal:ct(Ze.normal),slow:ct(Ze.slow),ease:st.ease,easeOut:st.easeOut,easeIn:st.easeIn},pt=Qn,[mt,ht]=[s.h,s.s],yt=c?86:14,bt=ut(mt,ht,yt,pt),Ot=ut(mt,ht,yt,.15000000000000002),[kt,At,jt,Mt,Nt]=tr[e.typeScale]??tr.md,Pt={compact:.85,default:1,comfortable:1.08}[e.scale]??1,Ft=e=>Math.round((Mt+(e-Mt)*Pt)*10)/10,It=Ft(kt),Lt=Ft(At),Rt=Ft(jt),zt=Math.round(It*1.6),Bt=Math.max(10,Math.round((Nt-1)*10)/10),Vt=rt.semibold,[Ht,Ut]={light:[300,400],regular:[400,500],medium:[500,600],semibold:[600,700],bold:[700,800]}.semibold,Wt=e=>Xe.includes(e)?`monospace`:tt.includes(e)?`serif`:`sans-serif`,B=e=>e===`System`?Be:`'${He(e)?Ue(e):e}',${Wt(e)}`,Gt=e.canvas===`white`?p(0):e.canvas===`brand`?`color-mix(in srgb, var(--k-primary) 6%, ${p(0)})`:p(1),Kt=e.fill===`white`?`var(--k-surface)`:`color-mix(in srgb, var(--k-primary) 6%, ${p(0)})`,qt=(()=>{let e=dt(D),t=[dt(Gt),dt(m.base)],n=e=>t.every(t=>xt(e,t)>=3);if(n(e))return`transparent`;let[r,i,a]=R(e),o=c?1:-1;for(let t=r;t>=.06&&t<=.97;t+=o*.01){let r=`oklch(${(t*100).toFixed(1)}% ${i.toFixed(4)} ${a.toFixed(1)})`,o=dt(r);if(n(o)&&xt(o,e)>=1.4)return r}return k(e)})(),Jt=p(Math.min(9,ar[e.borders][+!!c]+1)),Yt=c?m.sunken:p(2),Xt=(()=>{let t={faint:3,subtle:3.35,medium:3.9,strong:4.6}[e.borders],n=[dt(Yt),dt(m.base),dt(Gt)],r=(e,t)=>n.every(n=>xt(e,n)>=t),i=dt(Jt);if(r(i,t))return Jt;let[a,o,s]=R(i),l=c?1:-1,u=null;for(let e=a;e>=.1&&e<=.95;e+=l*.01){let n=`oklch(${(e*100).toFixed(1)}% ${o.toFixed(4)} ${s.toFixed(1)})`;if(!u&&r(dt(n),3)&&(u=n),r(dt(n),t))return n}return u??Jt})();return{mode:e.mode,primaryHex:T,secHex:P,accentHex:ge,iconSet:e.iconSet,sysList:Oe,vars:{...qe,"--k-bg":Gt,"--k-surface-fill":Kt,"--k-canvas":`radial-gradient(46% 42% at 10% 2%, color-mix(in srgb, var(--k-primary) 12%, transparent), transparent 70%), radial-gradient(44% 40% at 92% 8%, color-mix(in srgb, var(--k-secondary) 9%, transparent), transparent 68%), radial-gradient(54% 50% at 82% 100%, color-mix(in srgb, var(--k-accent) 7%, transparent), transparent 72%), var(--k-bg)`,"--k-chrome-bg":d?m.sunken:Gt,"--k-surface":m.base,"--k-surface-sunken":m.sunken,"--k-surface-2":m.s2,"--k-surface-container-lowest":ke.lowest,"--k-surface-container-low":ke.low,"--k-surface-container":ke.mid,"--k-surface-container-high":ke.high,"--k-surface-container-highest":ke.highest,"--k-inverse-surface":Me,"--k-inverse-fg":Ne,"--k-inverse-fg-muted":`color-mix(in srgb, ${Ne} 62%, ${Me})`,"--k-inverse-primary":Pe,"--k-input-bg":Yt,"--k-field-bg":`var(--k-input-bg)`,"--k-field-border-color":u?`transparent`:`var(--k-input-border)`,"--k-field-underline-color":u?`transparent`:`var(--k-input-border)`,"--k-field-radius":`var(--k-radius-md)`,"--k-field-hover-edge":`var(--k-state-border, var(--k-fg-faint))`,"--k-field-focus-edge":`var(--k-ring)`,"--k-track":`color-mix(in srgb, ${b.main} 5%, ${p(1)})`,"--k-surface-raised":m.raised,"--k-surface-overlay":m.overlay,"--k-scrim":`rgba(0, 0, 0, 0.4)`,"--k-scrim-strong":`rgba(0, 0, 0, 0.86)`,"--k-z-dropdown":`50`,"--k-z-popover":`50`,"--k-z-modal":`60`,"--k-z-tooltip":`70`,"--k-fg":b.main,"--k-fg-muted":b.muted,"--k-fg-faint":b.faint,"--k-primary":D,"--k-primary-edge":qt,"--k-primary-text":te,"--k-primary-text-hover":M,"--k-primary-hover":ee,"--k-primary-fg":j,"--k-primary-soft":ne,"--k-primary-soft-fg":re,"--k-selection":t?ut(n,c?14:12,c?70:50,c?.32:.18):ut(n,C,c?64:50,c?.28:.18),"--k-accent":he,"--k-accent-text":g(he,h,4.5),"--k-accent-fg":_e,"--k-accent-soft":we,"--k-accent-soft-fg":Te,"--k-chart-1":ve[0]??D,"--k-chart-2":ve[1]??D,"--k-chart-3":ve[2]??D,"--k-chart-4":ve[3]??D,"--k-chart-5":ve[4]??D,"--k-chart-6":ve[5]??D,"--k-accent-1":L.base[0]??D,"--k-accent-2":L.base[1]??D,"--k-accent-3":L.base[2]??D,"--k-accent-4":L.base[3]??D,"--k-accent-5":L.base[4]??D,"--k-accent-6":L.base[5]??D,"--k-accent-1-ink":L.ink[0]??`#ffffff`,"--k-accent-2-ink":L.ink[1]??`#ffffff`,"--k-accent-3-ink":L.ink[2]??`#ffffff`,"--k-accent-4-ink":L.ink[3]??`#ffffff`,"--k-accent-5-ink":L.ink[4]??`#ffffff`,"--k-accent-6-ink":L.ink[5]??`#ffffff`,"--k-accent-1-soft":L.soft[0]??D,"--k-accent-2-soft":L.soft[1]??D,"--k-accent-3-soft":L.soft[2]??D,"--k-accent-4-soft":L.soft[3]??D,"--k-accent-5-soft":L.soft[4]??D,"--k-accent-6-soft":L.soft[5]??D,"--k-accent-1-soft-fg":L.softFg[0]??D,"--k-accent-2-soft-fg":L.softFg[1]??D,"--k-accent-3-soft-fg":L.softFg[2]??D,"--k-accent-4-soft-fg":L.softFg[3]??D,"--k-accent-5-soft-fg":L.softFg[4]??D,"--k-accent-6-soft-fg":L.softFg[5]??D,"--k-grad-1":L.grad[0]??D,"--k-grad-2":L.grad[1]??D,"--k-grad-3":L.grad[2]??D,"--k-grad-4":L.grad[3]??D,"--k-grad-5":L.grad[4]??D,"--k-grad-6":L.grad[5]??D,"--k-fill":ye,"--k-secondary":F,"--k-secondary-fg":I,"--k-secondary-soft":ce,"--k-secondary-soft-fg":le,"--k-neutral":p(c?4:2),"--k-neutral-fg":b.main,...De,"--k-border":Fe,"--k-input-border":Xt,"--k-ring":A,"--k-ring-soft":ne,"--k-ring-halo":`color-mix(in srgb, ${D} 28%, transparent)`,"--k-ring-w":`3px`,"--k-state-border":c?lt(s.h,s.s,60):lt(s.h,s.s,50),"--k-state-selected-bg":`color-mix(in srgb, var(--k-primary) 14%, transparent)`,"--k-state-selected-fg":`var(--k-fg)`,"--k-bw":`1px`,"--k-selected-edge":`inset 0 0 0 var(--k-bw) color-mix(in srgb, var(--k-primary) 30%, var(--k-border))`,"--k-radius-sm":Re.sm,"--k-radius-md":Re.md,"--k-radius-lg":Re.lg,"--k-radius-pill":Re.pill,"--k-radius-button":Re.button,"--k-space":Ge,"--k-gutter":`var(--k-space)`,"--k-icon-xs":`0.6875rem`,"--k-icon-sm":`0.875rem`,"--k-icon-md":`1rem`,"--k-marker":`0.5rem`,"--k-pad":Ke,"--k-gap":Gn(We.stackGap),"--k-stack-gap":`var(--k-gap)`,"--k-form-measure":`30rem`,"--k-shadow-xs":Ye.xs,"--k-shadow-sm":Ye.sm,"--k-shadow-md":Ye.md,"--k-shadow-lg":Ye.lg,"--k-hairline":`var(--k-bw) solid color-mix(in srgb, var(--k-border), transparent 45%)`,"--k-divider":`var(--k-bw) solid var(--k-border)`,"--k-shadow-tactile":c?`inset 0 1px 0 hsl(0 0% 100% / 0.06), 0 1px 2px hsl(0 0% 0% / 0.45)`:`inset 0 1px 0 hsl(0 0% 100% / 0.85), 0 1px 2px hsl(${Je}/.08), 0 0 0 1px hsl(${Je}/.04)`,"--k-shadow-pressed":c?`inset 0 1px 2px hsl(0 0% 0% / 0.35)`:`inset 0 1px 2px hsl(${Je}/.12)`,"--k-ease-spring":`cubic-bezier(.34, 1.56, .64, 1)`,"--k-ease-emphasized":Zn.standard,"--k-ease-emphasized-accel":Zn.accel,"--k-ease-emphasized-decel":Zn.decel,"--k-row-h-sm":Gn(ze?44:28),"--k-row-h-md":Gn(ze?44:32),"--k-row-h-lg":Gn(ze?44:40),"--k-row-px":Gn(10),"--k-row-gap":Gn(10),"--k-row-icon":Gn(14),"--k-row-radius":`min(0.5rem, var(--k-radius-md))`,"--k-stroke-1":`1px`,"--k-stroke-2":`2px`,"--k-stroke-3":`3px`,"--k-stroke-progress":`6px`,"--k-btn-h-default":Gn(We.btnH),"--k-in-h-default":Gn(We.inH),"--k-control-h-md":`max(var(--k-hit-min), var(--k-in-h-default))`,"--k-control-h-sm":`max(var(--k-hit-min), calc(var(--k-in-h-default) - 0.25rem))`,"--k-control-h-lg":`calc(var(--k-in-h-default) + 0.5rem)`,"--k-hit-min":ze?`2.75rem`:`1.5rem`,"--k-overlay-min":`12rem`,"--k-touch-target":`44px`,"--k-cal-cell":Gn(We.calCell),"--k-toggle-w-default":Gn(We.toggleW),"--k-toggle-h-default":Gn(We.toggleH),"--k-slider-knob":`calc(var(--k-toggle-h-default) - 6px)`,"--k-avatar":`calc(var(--k-in-h-default) - 0.5rem)`,"--k-icon-chip":`calc(var(--k-in-h-default) + 0.125rem)`,"--k-dot":`calc(var(--k-in-h-default) / 4.5)`,"--k-row-h-default":`var(--k-row-h-${We.rowDefault})`,"--k-btn-shadow":c?`0 1px 2px hsl(0 0% 0% / 0.35)`:`0 1px 2px hsl(${Je}/.06)`,"--k-btn-shadow-press":`none`,"--k-btn-lift":`-1px`,"--k-dur-fast":ft.fast,"--k-dur":ft.normal,"--k-dur-slow":ft.slow,"--k-spring-fast":et.easing,"--k-spring":it.easing,"--k-spring-slow":at.easing,"--k-spring-dur-fast":`${et.durMs}ms`,"--k-spring-dur":`${it.durMs}ms`,"--k-spring-dur-slow":`${at.durMs}ms`,"--k-ease":ft.ease,"--k-ease-out":ft.easeOut,"--k-ease-in":ft.easeIn,"--k-state-hover":bt,"--k-state-press":Ot,"--k-font-display":B(e.fontDisplay),"--k-font-body":B(e.fontBody),"--k-font-mono":`'${nt}',ui-monospace,monospace`,"--k-type-display":Gn(zt),"--k-type-h1":Gn(It),"--k-type-h2":Gn(Lt),"--k-type-h3":Gn(Rt),"--k-type-body":Gn(Mt),"--k-type-small":Gn(Nt),"--k-type-input-min":`16px`,"--k-type-caption":Gn(Math.max(9.5,Nt-2)),"--k-type-eyebrow":Gn(Bt),"--k-track-eyebrow":`0.06em`,"--k-label-transform":e.labelCase===`caps`?`uppercase`:`none`,"--k-label-tracking":e.labelCase===`caps`?`0.05em`:`0`,"--k-track-tight":`-0.01em`,"--k-track-display":`-0.02em`,"--k-leading-tight":`1.05`,"--k-leading-snug":`1.25`,"--k-leading-normal":`1.5`,"--k-ui-weight":Vt,"--k-weight-medium":String(rt.medium),"--k-weight-semibold":String(rt.semibold),"--k-weight-bold":String(rt.bold),"--k-weight-display":String(Ht),"--k-weight-display-hero":String(Ut),"--k-disabled-bg":(De[`--k-info-soft`],m.s2),"--k-disabled-fg":b.faint,"--k-disabled-opacity":`0.55`,"--k-focus-ring-offset":`2px`,"--k-focus-ring-width":`2px`,"--k-input-error-border":Oe[2].hex,"--k-input-success-border":Oe[0].hex,"--k-input-warning-border":Oe[1].hex,"--k-anim-fade-in":`k-fade-in ${ft.fast} ${ft.easeOut} both`,"--k-anim-fade-out":`k-fade-out ${ft.fast} ${ft.easeIn} both`,"--k-anim-slide-up":`k-slide-up ${ft.normal} ${ft.easeOut} both`,"--k-anim-slide-down":`k-slide-down ${ft.normal} ${ft.easeOut} both`,"--k-anim-rise":`k-rise ${ft.slow} ${Zn.decel} both`,"--k-anim-scale-in":`k-scale-in ${ft.normal} ${ft.easeOut} both`,"--k-anim-scale-out":`k-scale-out ${ft.fast} ${ft.easeIn} both`,"--k-anim-menu":`k-menu-roll ${ft.normal} ${Zn.decel} both`,"--k-anim-menu-item":`k-menu-item ${ft.normal} ${Zn.decel} both`,"--k-menu-stagger":`${Math.round(Ze.normal*Qe/10)}ms`,"--k-anim-spin":`k-spin 800ms linear infinite`,"--k-anim-pulse":`k-pulse 1.8s cubic-bezier(.4, 0, .2, 1) infinite`,"--k-anim-shimmer":`k-shimmer 1.6s linear infinite`,"--k-anim-fade-through":`k-fade-through ${ft.normal} ${Zn.standard} both`,"--k-glass-bg":c?`hsl(${s.h} ${s.s}% ${12.9.toFixed(1)}% / 0.72)`:`hsl(0 0% 100% / 0.72)`,"--k-glass-blur":`saturate(180%) blur(12px)`,"--k-glass-edge":c?`inset 0 1px 0 hsl(0 0% 100% / 0.08)`:`inset 0 1px 0 hsl(0 0% 100% / 0.6)`},cc:{primaryOnBg:xt(T,c?`#131316`:`#ffffff`),inkOnPrimary:xt(T,j)}}}var{compressToEncodedURIComponent:sr,decompressFromEncodedURIComponent:cr}=c(o(((e,t)=>{var n=(function(){var e=String.fromCharCode,t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$`,r={};function i(e,t){if(!r[e]){r[e]={};for(var n=0;n<e.length;n++)r[e][e.charAt(n)]=n}return r[e][t]}var a={compressToBase64:function(e){if(e==null)return``;var n=a._compress(e,6,function(e){return t.charAt(e)});switch(n.length%4){default:case 0:return n;case 1:return n+`===`;case 2:return n+`==`;case 3:return n+`=`}},decompressFromBase64:function(e){return e==null?``:e==``?null:a._decompress(e.length,32,function(n){return i(t,e.charAt(n))})},compressToUTF16:function(t){return t==null?``:a._compress(t,15,function(t){return e(t+32)})+` `},decompressFromUTF16:function(e){return e==null?``:e==``?null:a._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=a.compress(e),n=new Uint8Array(t.length*2),r=0,i=t.length;r<i;r++){var o=t.charCodeAt(r);n[r*2]=o>>>8,n[r*2+1]=o%256}return n},decompressFromUint8Array:function(t){if(t==null)return a.decompress(t);for(var n=Array(t.length/2),r=0,i=n.length;r<i;r++)n[r]=t[r*2]*256+t[r*2+1];var o=[];return n.forEach(function(t){o.push(e(t))}),a.decompress(o.join(``))},compressToEncodedURIComponent:function(e){return e==null?``:a._compress(e,6,function(e){return n.charAt(e)})},decompressFromEncodedURIComponent:function(e){return e==null?``:e==``?null:(e=e.replace(/ /g,`+`),a._decompress(e.length,32,function(t){return i(n,e.charAt(t))}))},compress:function(t){return a._compress(t,16,function(t){return e(t)})},_compress:function(e,t,n){if(e==null)return``;var r,i,a={},o={},s=``,c=``,l=``,u=2,d=3,f=2,p=[],m=0,h=0,g;for(g=0;g<e.length;g+=1)if(s=e.charAt(g),Object.prototype.hasOwnProperty.call(a,s)||(a[s]=d++,o[s]=!0),c=l+s,Object.prototype.hasOwnProperty.call(a,c))l=c;else{if(Object.prototype.hasOwnProperty.call(o,l)){if(l.charCodeAt(0)<256){for(r=0;r<f;r++)m<<=1,h==t-1?(h=0,p.push(n(m)),m=0):h++;for(i=l.charCodeAt(0),r=0;r<8;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1}else{for(i=1,r=0;r<f;r++)m=m<<1|i,h==t-1?(h=0,p.push(n(m)),m=0):h++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1}u--,u==0&&(u=2**f,f++),delete o[l]}else for(i=a[l],r=0;r<f;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1;u--,u==0&&(u=2**f,f++),a[c]=d++,l=String(s)}if(l!==``){if(Object.prototype.hasOwnProperty.call(o,l)){if(l.charCodeAt(0)<256){for(r=0;r<f;r++)m<<=1,h==t-1?(h=0,p.push(n(m)),m=0):h++;for(i=l.charCodeAt(0),r=0;r<8;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1}else{for(i=1,r=0;r<f;r++)m=m<<1|i,h==t-1?(h=0,p.push(n(m)),m=0):h++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1}u--,u==0&&(u=2**f,f++),delete o[l]}else for(i=a[l],r=0;r<f;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1;u--,u==0&&(u=2**f,f++)}for(i=2,r=0;r<f;r++)m=m<<1|i&1,h==t-1?(h=0,p.push(n(m)),m=0):h++,i>>=1;for(;;){if(m<<=1,h==t-1){p.push(n(m));break}h++}return p.join(``)},decompress:function(e){return e==null?``:e==``?null:a._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,r){var i=[],a=4,o=4,s=3,c=``,l=[],u,d,f,p,m,h,g,_={val:r(0),position:n,index:1};for(u=0;u<3;u+=1)i[u]=u;for(f=0,m=4,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;switch(f){case 0:for(f=0,m=256,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;g=e(f);break;case 1:for(f=0,m=2**16,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;g=e(f);break;case 2:return``}for(i[3]=g,d=g,l.push(g);;){if(_.index>t)return``;for(f=0,m=2**s,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;switch(g=f){case 0:for(f=0,m=256,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;i[o++]=e(f),g=o-1,a--;break;case 1:for(f=0,m=2**16,h=1;h!=m;)p=_.val&_.position,_.position>>=1,_.position==0&&(_.position=n,_.val=r(_.index++)),f|=+(p>0)*h,h<<=1;i[o++]=e(f),g=o-1,a--;break;case 2:return l.join(``)}if(a==0&&(a=2**s,s++),i[g])c=i[g];else if(g===o)c=d+d.charAt(0);else return null;l.push(c),i[o++]=d+c.charAt(0),a--,d=c,a==0&&(a=2**s,s++)}}};return a})();typeof define==`function`&&define.amd?define(function(){return n}):t!==void 0&&t!=null?t.exports=n:typeof angular<`u`&&angular!=null&&angular.module(`LZString`,[]).factory(`LZString`,function(){return n})}))(),1).default,lr=`v2:`;function ur(e){return lr+sr(JSON.stringify(e))}function dr(e){if(!e)return null;let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return null;let n=null;if(t.startsWith(lr))n=cr(t.slice(3));else try{n=atob(decodeURIComponent(t))}catch{n=null}if(!n)return null;try{let e=JSON.parse(n);return e.radius===`pill`&&(e.radius=`round`),{...zn,...e,sb:{...zn.sb,...e.sb??{}}}}catch{return null}}function fr(){return typeof window>`u`?null:dr(window.location.hash)}var pr=ur(zn);function mr(e){if(typeof window>`u`)return;if(ur(e)===pr){window.location.hash&&history.replaceState(null,``,window.location.pathname+window.location.search);return}let t=`#`+ur(e);window.location.hash!==t&&history.replaceState(null,``,t)}var hr=[`cPrimary`];function gr(e){return hr.some(t=>t in e)}function _r(e,t){switch(t.type){case`SET`:{let n=e.color===`mono`&&gr(t.patch)&&!(`color`in t.patch);return{...e,...n?{color:`tone`,colorTheme:`mono`}:null,...t.patch}}case`APPLY_COLOR_THEME`:return Nt(e,t.id);case`REPLACE`:return t.cfg}}var vr=50;function yr(e){return{past:[],present:e,future:[],mergeKey:null}}function br(e){if(e.type===`SET`){let t=Object.keys(e.patch);return t.length===1?`set:${t[0]}`:null}return null}function xr(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}function Sr(e,t){switch(t.type){case`UNDO`:{if(!e.past.length)return e;let t=e.past[e.past.length-1];return{past:e.past.slice(0,-1),present:t,future:[e.present,...e.future],mergeKey:null}}case`RESET`:return yr(t.cfg);case`REDO`:{if(!e.future.length)return e;let t=e.future[0];return{past:[...e.past,e.present],present:t,future:e.future.slice(1),mergeKey:null}}default:{let n=_r(e.present,t);if(xr(n,e.present))return e;let r=br(t);if(r!==null&&r===e.mergeKey)return{...e,present:n,future:[]};let i=[...e.past,e.present];return i.length>vr&&i.shift(),{past:i,present:n,future:[],mergeKey:r}}}}var Cr=150;function wr(){return fr()??zn}function Tr(){let[e,t]=(0,_.useReducer)(Sr,void 0,()=>yr(wr())),n=e.present,r=(0,_.useRef)(null);(0,_.useEffect)(()=>(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{mr(n)},Cr),()=>{r.current&&clearTimeout(r.current)}),[n]),(0,_.useEffect)(()=>{let e=()=>{let e=fr();e&&t({type:`REPLACE`,cfg:e})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let i=(0,_.useMemo)(()=>or(n),[n]),a=(0,_.useCallback)(()=>t({type:`UNDO`}),[]),o=(0,_.useCallback)(e=>{r.current&&clearTimeout(r.current),window.location.hash&&history.replaceState(null,``,window.location.pathname+window.location.search),t({type:`RESET`,cfg:e})},[]);return{cfg:n,tokens:i,dispatch:t,undo:a,redo:(0,_.useCallback)(()=>t({type:`REDO`}),[]),reset:o,canUndo:e.past.length>0,canRedo:e.future.length>0}}function Er(e,t,n=Math.random){let r=e=>e[Math.floor(n()*e.length)],i={...e.sb};for(let e of Yt){let t=e.snaps.find(e=>e.label===`as is`)?.at??(e.min+e.max)/2,r=(n()+n())/2,a=r<.5?t-(t-e.min)*(1-r*2):t+(e.max-t)*((r-.5)*2),o=Math.round(a/e.step)*e.step;i[e.key]=Math.min(e.max,Math.max(e.min,Math.round(o*1e3)/1e3))}let a=t.families;for(let[e,t]of[[`secondary`,`cSecondary`],[`accent`,`cAccent`],[`success`,`cSuccess`],[`warning`,`cWarning`],[`danger`,`cDanger`],[`info`,`cInfo`]]){let r=a?.centre[e];r&&(i[t]=n()<.5?Nn({...r,H:n()*360,a:1}):void 0)}let o=r(Object.keys(Mt)),s=r(Qe.flatMap(e=>e.fonts)),c=n()<.5?s:r($e.flatMap(e=>e.fonts));return{...e,cPrimary:Mt[o].cPrimary,colorTheme:o,fontBody:s,fontDisplay:c,sb:i}}var Dr=/\.(css|scss|less|html|jsx|tsx|vue|svelte|astro|ts|js|mts|cts|heex|eex|leex|erb|blade\.php|twig|hbs|handlebars|njk|liquid|cshtml|razor|ejs|php|mustache|haml)$/,Or=/(^|[/\\])(uicockpit\.tokens\.css|.*\.contract\.json|.*\.config\.(js|ts|mjs|cjs)|.*\.d\.ts|vite\.config\..*|next\.config\..*)$/;function kr(e){let t=e.toLowerCase();return/\.(test|spec|stories|story|bench)\.[jt]sx?$/.test(t)||/(^|\/)(tests?|__tests__|e2e|fixtures?|mocks?)\//.test(t)?4:/\.(css|scss|less)$/.test(t)?0:/\.(vue|svelte|astro|tsx|jsx|html)$/.test(t)?1:/(^|\/)(components?|ui|design-system|theme|styles?|views?|pages?|screens?|layouts?|frontend|web|app|client)(\/|$)/.test(t)?2:3}var Ar={none:`0px`,sm:`2px`,DEFAULT:`4px`,md:`6px`,lg:`8px`,xl:`12px`,"2xl":`16px`,"3xl":`24px`,full:`9999px`},jr={none:`none`,sm:`0 1px 2px rgb(0 0 0 / .05)`,DEFAULT:`0 1px 3px rgb(0 0 0 / .1)`,md:`0 4px 6px rgb(0 0 0 / .1)`,lg:`0 10px 15px rgb(0 0 0 / .1)`,xl:`0 20px 25px rgb(0 0 0 / .1)`,"2xl":`0 25px 50px rgb(0 0 0 / .25)`,inner:`inset 0 2px 4px rgb(0 0 0 / .05)`},Mr={xs:`12px`,sm:`14px`,base:`16px`,lg:`18px`,xl:`20px`,"2xl":`24px`,"3xl":`30px`,"4xl":`36px`,"5xl":`48px`,"6xl":`60px`,"7xl":`72px`,"8xl":`96px`,"9xl":`128px`},Nr={xs:`1rem`,sm:`1.25rem`,base:`1.5rem`,lg:`1.75rem`,xl:`1.75rem`,"2xl":`2rem`,"3xl":`2.25rem`,"4xl":`2.5rem`,"5xl":`1`,"6xl":`1`,"7xl":`1`,"8xl":`1`,"9xl":`1`},Pr={thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},Fr={none:`1`,tight:`1.25`,snug:`1.375`,normal:`1.5`,relaxed:`1.625`,loose:`2`,3:`.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`},Ir=new Set(Object.keys(Mr)),Lr=new Set([`left`,`center`,`right`,`justify`,`start`,`end`,`wrap`,`nowrap`,`balance`,`pretty`,`ellipsis`,`clip`,`transparent`,`current`,`inherit`]);function Rr(e){if(e===`px`)return`1px`;if(e===`auto`||e===`full`)return null;let t=Number(e);return Number.isFinite(t)?`${t*4}px`:null}var zr=RegExp(`^(?:[\\w-]+:)*(?:p|m|gap|space|w|h|min|max|inset|top|right|bottom|left|z|order|col|row|basis|text|font|leading|tracking|bg|border|rounded|shadow|ring|outline|opacity|flex|grid|items|justify|content|self|place|object|aspect|overflow|transition|duration|ease|animate|translate|scale|rotate|cursor|select|divide|backdrop|filter|blur|truncate|sr|container|block|inline|hidden|absolute|relative|fixed|sticky)(?:-[\\w./[\\]#%()-]+)?$`),Br=[`top`,`right`,`bottom`,`left`];function Vr(e){let t=e.filter(Boolean);return t.length===0?[]:t.length===1?Br.map(e=>[e,t[0]]):t.length===2?[[`top`,t[0]],[`right`,t[1]],[`bottom`,t[0]],[`left`,t[1]]]:t.length===3?[[`top`,t[0]],[`right`,t[1]],[`bottom`,t[2]],[`left`,t[1]]]:[[`top`,t[0]],[`right`,t[1]],[`bottom`,t[2]],[`left`,t[3]]]}var Hr=e=>String(e).trim().toLowerCase().replace(/\s+/g,` `).replace(/\s*!important$/,``),Ur=e=>/var\(\s*--/.test(e),Wr=/#[0-9a-fA-F]{3,8}\b|\brgba?\([^)]*\)|\bhsla?\([^)]*\)|\boklch\([^)]*\)|\blab\([^)]*\)/g,H=(e,t,n,r={})=>({dim:e,value:Hr(t),role:r.role??null,side:r.side??null,tokenized:!!r.tokenized,arbitrary:!!r.arbitrary,source:r.source??`css`,at:n}),Gr=e=>e.replace(/\/\*[\s\S]*?\*\//g,e=>e.replace(/[^\n]/g,` `));function Kr(e,t){let n=Gr(e),r=[{sel:``,decls:``,start:0}],i=``;for(let e=0;e<n.length;e++){let a=n[e];if(a===`{`){let t=i.lastIndexOf(`;`),n=t===-1?``:i.slice(0,t+1),a=(t===-1?i:i.slice(t+1)).trim();r[r.length-1].decls+=n,r.push({sel:a,decls:``,start:e+1}),i=``,e+1}else if(a===`}`){let n=r.pop();if(!n){i=``;continue}n.decls+=i,t(n.sel,n.decls,r.map(e=>e.sel).filter(Boolean),n.start),i=``,e+1,r.length||r.push({sel:``,decls:``,start:e+1})}else i+=a}}function qr(e,t){if(!e.includes(`&`))return e;let n=t.length?t[t.length-1]:``;return e.replace(/&/g,n)}function Jr(e,t){let n=[],r=Gr(t),i=e=>r.slice(0,e).split(`
|
|
20
|
+
`).length,a=[];Kr(t,(e,t,n,r)=>a.push({sel:e,body:t,ancestors:n,start:r}));for(let t of a){let r=t.body,a=t.start,o=[];for(let e of r.matchAll(/([-\w]+)\s*:\s*([^;]+)(;|$)/g))o.push({prop:e[1].toLowerCase(),value:e[2].trim(),at:a+e.index});let s={size:null,lh:null,weight:null,at:null,tokenized:!1};for(let{prop:t,value:r,at:a}of o){let o={file:e,line:i(a),col:1},c=Ur(r);if(!t.startsWith(`--`)){if(t===`border-radius`||/^border-(top|bottom)-(left|right)-radius$/.test(t))for(let e of r.split(/\s+/))/^\d|^var\(|^\./.test(e)&&n.push(H(`radius`,e,o,{tokenized:c,source:`css`}));else if(t===`box-shadow`)Hr(r)!==`none`&&n.push(H(`shadow`,r,o,{tokenized:c,source:`css`}));else if(t===`font-size`)s.size=r,s.at=s.at??o,s.tokenized=s.tokenized||c;else if(t===`line-height`)s.lh=r,s.at=s.at??o;else if(t===`font-weight`)s.weight=r,s.at=s.at??o;else if(/^(padding|margin)$/.test(t))for(let[e,t]of Vr(r.split(/\s+/)))n.push(H(`spacing`,t,o,{side:e,tokenized:c,source:`css`}));else if(/^(padding|margin)-(top|right|bottom|left)$/.test(t))n.push(H(`spacing`,r,o,{side:t.split(`-`)[1],tokenized:c,source:`css`}));else if(/^(gap|row-gap|column-gap)$/.test(t))for(let e of r.split(/\s+/))n.push(H(`spacing`,e,o,{side:`gap`,tokenized:c,source:`css`}));else t===`color`?Yr(n,r,o,`fg`,c):/^(background|background-color)$/.test(t)?Yr(n,r,o,`bg`,c):(/^border(-(top|right|bottom|left))?(-color)?$/.test(t)||t===`outline-color`)&&Yr(n,r,o,`border`,c)}}if(s.size){let e=`${Hr(s.size)}/${s.lh?Hr(s.lh):`auto`}/${s.weight?Hr(s.weight):`auto`}`;n.push(H(`type`,e,s.at,{tokenized:s.tokenized,source:`css`}))}}return n}function Yr(e,t,n,r,i){if(i){for(let i of t.matchAll(/var\(\s*(--[\w-]+)/g))e.push(H(`color`,i[1],n,{role:r,tokenized:!0,source:`css`}));return}for(let i of t.matchAll(Wr))e.push(H(`color`,i[0],n,{role:r,tokenized:!1,source:`css`}))}function Xr(e){let t=[],n=/(:|v-bind:)?class(?:Name)?\s*=\s*/g,r;for(;r=n.exec(e);){let i=r.index+r[0].length,a=e[i],o=!!r[1],s=``,c=i,l=null;if(a===`"`||a===`'`){if(c=e.indexOf(a,i+1),c<0)continue;s=e.slice(i+1,c),l=o?`expr`:`string`}else if(a===`{`){let t=0,r=i;for(;r<e.length;r++){let n=e[r];if(n===`{`)t++;else if(n===`}`){if(t--,!t)break}else if(n==="`"||n===`"`||n===`'`){let t=n;for(r++;r<e.length&&e[r]!==t;)e[r]===`\\`&&r++,r++}}c=r;let a=e.slice(i+1,c).trim();if(/^(?:[\w$]+\.)?class(?:Name)?$/.test(a)){n.lastIndex=c+1;continue}let o=a.match(/^`([\s\S]*)`$/);o?(s=o[1],l=`template`):(s=a,l=`expr`)}else continue;n.lastIndex=c+1;let u=[],d=!1,f=e=>{for(let t of e.replace(/\$\{[\s\S]*?\}/g,` `).split(/\s+/))t&&u.push(t)};if(l===`string`)f(s);else if(l===`template`)f(s),d=/\$\{/.test(s);else{for(let e of s.matchAll(/"([^"]*)"|'([^']*)'|`([^`]*)`/g))f(e[1]??e[2]??e[3]??``);for(let e of s.matchAll(/[{,]\s*([A-Za-z_][\w-]*)\s*:/g))u.push(e[1]);for(let e of s.matchAll(/\$?styles?\.([A-Za-z_][\w-]*)/g))u.push(e[1]);let e=s.replace(/"[^"]*"|'[^']*'|`[^`]*`/g,``).replace(/\$?styles?\.[\w-]+/g,``).replace(/\b(cn|clsx|classnames|classNames|twMerge|cva|cx|true|false|null|undefined)\b/g,``);d=/[A-Za-z_$][\w$.]*/.test(e)}u=u.filter(e=>/^[A-Za-z_-][\w:./\[\]#%!()-]*$/.test(e)),t.push({index:r.index,kind:l,literals:u,dynamic:d})}return t}function Zr(e,t){let n=[],r=1,i=0,a=e=>{for(;i<e;i++)t.charCodeAt(i)===10&&r++;return r};for(let r of Xr(t))r.literals.length&&n.push({classes:r.literals,at:{file:e,line:a(r.index),col:1}});return n}var Qr=e=>{let t=e.lastIndexOf(`:`);return t===-1?e:e.slice(t+1)},$r=/^([a-z][a-z-]*)-\[([^\]]+)\]$/;function ei(e,t){let n=[],r=null,i=null,a=null,o=!0;for(let s of e){let e=Qr(s);if(e.includes(`--`))continue;let c=e.match($r),l=c?c[1]:null,u=c?c[2]:null;if(!c&&/^rounded(-|$)/.test(e)){let r=e.match(/^rounded(?:-(t|r|b|l|tl|tr|br|bl|s|e|ss|se|es|ee))?(?:-(.+))?$/);if(r){let e=Ar[r[2]||`DEFAULT`];e&&n.push(H(`radius`,e,t,{tokenized:!0,source:`class`}));continue}}if(c&&/^rounded/.test(l)){n.push(H(`radius`,u,t,{tokenized:!1,arbitrary:!0,source:`class`}));continue}if(/^shadow(-|$)/.test(e)&&!c){let r=jr[e.replace(/^shadow-?/,``)||`DEFAULT`];r&&r!==`none`&&n.push(H(`shadow`,r,t,{tokenized:!0,source:`class`}));continue}if(c&&l===`shadow`){n.push(H(`shadow`,u,t,{tokenized:!1,arbitrary:!0,source:`class`}));continue}let d=e.match(/^([pm])([xytrbl])?-(.+)$/)||e.match(/^(gap)(-[xy])?-(.+)$/);if(d&&!c){let e=d[1],r=(d[2]||``).replace(`-`,``),i=Rr(d[3]);if(i){let a=e===`gap`?[`gap`]:r===`x`?[`left`,`right`]:r===`y`?[`top`,`bottom`]:r?[{t:`top`,r:`right`,b:`bottom`,l:`left`}[r]]:Br;for(let e of a)n.push(H(`spacing`,i,t,{side:e,tokenized:!0,source:`class`}))}continue}if(c&&/^([pm][xytrbl]?|gap(-[xy])?)$/.test(l)){n.push(H(`spacing`,u,t,{side:`any`,tokenized:!1,arbitrary:!0,source:`class`}));continue}if(c&&l===`text`&&/^\d|rem|px|em/.test(u)){r=u,o=!1;continue}if(!c&&/^text-/.test(e)){let a=e.slice(5);if(Ir.has(a)){r=Mr[a],i??=Nr[a];continue}if(!Lr.has(a)){n.push(H(`color`,a,t,{role:`fg`,tokenized:!0,source:`class`}));continue}continue}if(c&&l===`text`){n.push(H(`color`,u,t,{role:`fg`,tokenized:!1,arbitrary:!0,source:`class`}));continue}if(/^leading-/.test(e)&&!c){i=Fr[e.slice(8)]??i;continue}if(/^font-/.test(e)&&!c){a=Pr[e.slice(5)]??a;continue}if(!c&&/^bg-/.test(e)){let r=e.slice(3);/^(none|gradient|clip|origin|fixed|local|scroll|repeat|no|center|cover|contain|top|bottom|left|right|auto)/.test(r)||n.push(H(`color`,r,t,{role:`bg`,tokenized:!0,source:`class`}));continue}if(c&&l===`bg`){n.push(H(`color`,u,t,{role:`bg`,tokenized:!1,arbitrary:!0,source:`class`}));continue}if(!c&&/^border-/.test(e)){let r=e.slice(7);!/^\d+$/.test(r)&&!/^(t|r|b|l|x|y|s|e|solid|dashed|dotted|double|none|hidden|collapse|separate|spacing)$/.test(r)&&n.push(H(`color`,r,t,{role:`border`,tokenized:!0,source:`class`}));continue}if(c&&l===`border`){n.push(H(`color`,u,t,{role:`border`,tokenized:!1,arbitrary:!0,source:`class`}));continue}}return r&&n.push(H(`type`,`${Hr(r)}/${i?Hr(i):`auto`}/${a?Hr(a):`auto`}`,t,{tokenized:o,source:`class`})),n}var ti=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),ni=/<(\/)?([A-Za-z][\w.-]*)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/)?>/g;function ri(e,t){let n=[],r=1,i=0;for(let a of e.matchAll(ni)){for(let t=i;t<a.index;t++)e[t]===`
|
|
21
|
+
`&&r++;i=a.index;let[,o,s,c=``,l]=a;if(o){let e=n.map(e=>e.tag).lastIndexOf(s);e!==-1&&(n.length=e);continue}let u={tag:s,attrs:c,line:r,depth:n.length,parent:n[n.length-1]||null};t(u),!l&&!ti.has(s.toLowerCase())&&n.push(u)}}function ii(e,t){let n={};for(let r of t.matchAll(/import\s+(?:\*\s+as\s+)?([A-Za-z_$][\w$]*)\s+from\s+['"]([^'"]+\.module\.(?:css|scss|less))['"]/g))n[r[1]]=ai(e,r[2]);return n}function ai(e,t){if(!t.startsWith(`.`))return t.split(`/`).pop();let n=e.split(/[/\\]/).slice(0,-1);for(let e of t.split(`/`))e!==`.`&&e!==``&&(e===`..`?n.pop():n.push(e));return n.join(`/`)}var oi=(e,t)=>`${e}#${t}`,si=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function ci(e,t,n){let r=Object.keys(n);if(!r.length)return[];let i=RegExp(`\\b(${r.map(si).join(`|`)})(?:\\.([A-Za-z_$][\\w$]*)|\\[\\s*['"]([^'"]+)['"]\\s*\\])`,`g`),a=[],o=t.split(`
|
|
22
|
+
`);for(let t=0;t<o.length;t++)for(let r of o[t].matchAll(/class(?:Name)?\s*=\s*\{([^}]*)\}/g)){let o=[],s=r[1].replace(i,(e,t,r,i)=>{let a=r??i;return a&&o.push(oi(n[t],a)),` `.repeat(e.length)});for(let e of s.matchAll(/['"]([^'"]+)['"]/g))for(let t of e[1].split(/\s+/))t&&!/^[.#]/.test(t)&&o.push(t);o.length&&a.push({classes:o,at:{file:e,line:t+1,col:r.index+1}})}return a}var li={borderRadius:`border-radius`,boxShadow:`box-shadow`,fontSize:`font-size`,lineHeight:`line-height`,fontWeight:`font-weight`,backgroundColor:`background-color`,borderColor:`border-color`,paddingTop:`padding-top`,paddingRight:`padding-right`,paddingBottom:`padding-bottom`,paddingLeft:`padding-left`,marginTop:`margin-top`,marginRight:`margin-right`,marginBottom:`margin-bottom`,marginLeft:`margin-left`};function ui(e,t){let n=[],r=t.split(`
|
|
23
|
+
`);for(let t=0;t<r.length;t++)for(let i of r[t].matchAll(/style\s*=\s*\{\{([^}]*)\}\}/g)){let r={file:e,line:t+1,col:i.index+1};for(let e of i[1].matchAll(/([A-Za-z-]+)\s*:\s*(?:'([^']*)'|"([^"]*)"|([\d.]+))/g)){let t=li[e[1]]||e[1].replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),i=e[2]??e[3]??e[4],a=/^[\d.]+$/.test(i)?`${i}px`:i;if(t===`border-radius`)n.push(H(`radius`,a,r,{source:`inline`}));else if(t===`box-shadow`)n.push(H(`shadow`,a,r,{source:`inline`}));else if(t===`font-size`)n.push(H(`type`,`${Hr(a)}/auto/auto`,r,{source:`inline`}));else if(/^(padding|margin)(-(top|right|bottom|left))?$/.test(t)){let e=t.split(`-`)[1]||`all`;n.push(H(`spacing`,a,r,{side:e,source:`inline`}))}else t===`gap`?n.push(H(`spacing`,a,r,{side:`gap`,source:`inline`})):t===`color`?Yr(n,a,r,`fg`,Ur(a)):/^background/.test(t)?Yr(n,a,r,`bg`,Ur(a)):/^border.*color$/.test(t)&&Yr(n,a,r,`border`,Ur(a))}}return n}var di=/\b(?:styled(?:\.[A-Za-z][\w]*|\([^)]*\))|css|createGlobalStyle|keyframes)\s*`/g;function fi(e,t){let n=t;for(;n<e.length;){let r=e[n];if(r===`\\`){n+=2;continue}if(r==="`")return{body:e.slice(t,n),end:n};if(r===`$`&&e[n+1]===`{`){let t=0;for(n+=1;n<e.length;){if(e[n]===`{`)t++;else if(e[n]===`}`&&(t--,!t))break;n++}}n++}return null}var pi=/^(theme|tokens?|palette|vars|styles?|colou?rs?|spacings?|radii|radius|fonts?|typography|shadows?|elevations?|sizes?|breakpoints?|z(?:-?index|indices)?|motion|durations?|easings?)$|^(theme|tokens?|palette|vars|styles?)/i,mi=/^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$|^[A-Z]{3,}$/;function hi(e){let t=e.trim(),n=(e,t)=>{let n=t.replace(/\s+/g,``).replace(/^\./,``).split(`.`);return!pi.test(e)&&n.length>1&&pi.test(n[0])?{base:n[0],path:n.slice(1).join(`.`)}:{base:e,path:n.join(`.`)}},r=t.match(/\b([A-Za-z_$][\w$]*)((?:\s*\.\s*[\w$]+)+)\s*\(\s*([^()]*)\)\s*$/);if(r){let e=n(r[1],r[2]);if(pi.test(e.base)){let t=r[3].split(`,`).map(e=>e.trim().replace(/^['"]|['"]$/g,``).replace(/[^\w.-]/g,``)).filter(Boolean);if(t.length&&t.every(e=>/^[\w.-]+$/.test(e)))return`${e.path}.${t.join(`.`)}`.replace(/\./g,`-`).replace(/-+/g,`-`)}}let i=t.match(/^([a-z][\w$]*)\s*\(\s*['"]([\w.$-]+)['"]\s*\)$/);if(i&&/^(s|t|th|get|theme|themeGet|token|tokens|color|colou?r|c|v|css|useToken)$/.test(i[1]))return i[2].replace(/\./g,`-`);let a=t.match(/^([a-z][\w$]*)\s*\(\s*([^()]*)\)$/);if(a){let e=a[2].split(`,`).map(e=>e.trim().replace(/^['"]|['"]$/g,``)).filter(Boolean);if(e.length&&e.every(e=>/^-?[\w.-]+$/.test(e)))return`${a[1]}-${e.join(`-`)}`.replace(/\./g,`-`).replace(/-+/g,`-`)}let o=t.match(/\b([A-Za-z_$][\w$]*)((?:\s*\.\s*[\w$]+|\s*\[\s*['"]?[\w-]+['"]?\s*\])+)/);if(o){let e=n(o[1],o[2].replace(/\[['"]?([\w-]+)['"]?\]/g,`.$1`)),r=e.base;if(pi.test(r))return e.path||null;if(mi.test(o[1])||/^[A-Z][A-Za-z0-9]+$/.test(o[1]))return`const-${o[1]}${o[2].replace(/\s+/g,``).replace(/\[['"]?([\w-]+)['"]?\]/g,`.$1`)}`.replace(/\./g,`-`).toLowerCase();let i=/^(props?|p|rest|attrs|attributes|\$props)$/.test(r),a=t.match(/^\(?\s*\{?\s*([\w$]+)/),s=/=>/.test(t)&&a&&a[1]===o[1];if(!i&&!s&&!/=>/.test(t))return`ref-${o[1]}${o[2].replace(/\s+/g,``).replace(/\[['"]?([\w-]+)['"]?\]/g,`.$1`)}`.replace(/\./g,`-`)}let s=t.match(/^([A-Za-z_$][\w$]*)$/);return s&&mi.test(s[1])?`const-${s[1]}`.toLowerCase():null}function gi(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]!==`$`||e[n+1]!==`{`){t+=e[n];continue}let r=0,i=n+2,a=n+1;for(;a<e.length;a++)if(e[a]===`{`)r++;else if(e[a]===`}`&&(r--,!r))break;let o=e.slice(i,a),s=_i(o),c=s===null?hi(o):null;t+=s===null?c?`var(--${c.replace(/\./g,`-`)})`:`/*·*/`:s,n=a}return t}function _i(e){let t=[...e.matchAll(/(["'])((?:(?!\1)[^\\]|\\.)*)\1/g)].map(e=>e[2]);return t.length<1||e.replace(/(["'])(?:(?!\1)[^\\]|\\.)*\1/g,``).replace(/[A-Za-z_$][\w$]*/g,``).replace(/=>|\?\?|===|!==|==|!=|&&|\|\||[?:!()\[\]{},.\s]/g,``).trim()!==``||!t.every(e=>/^(?:#[0-9a-f]{3,8}|-?[\d.]+(?:px|rem|em|%|vh|vw|s|ms)?|[a-z-]+|rgba?\([^)]*\)|hsla?\([^)]*\)|var\(--[\w-]+\)|[\d.]+\s+[\d.]+%\s+[\d.]+%)$/i.test(e.trim()))||!/\?|\|\|/.test(e)&&!/^\s*(["'])(?:(?!\1)[^\\]|\\.)*\1\s*$/.test(e)?null:t[0].trim()}function vi(e){let t=[];for(let n of e.matchAll(di)){let r=fi(e,n.index+n[0].length);if(!r)continue;let i=gi(r.body);t.push(`.styled-block {\n${i}\n}`)}return t}function yi(e){let t=0;for(let n of vi(e))t+=(n.match(/[\w-]\s*:\s*\/\*·\*\/(?!\s*\{)/g)||[]).length;return t}function bi(e,t,n=0){let r={},i=(e,t)=>{t>0&&(r[e]=(r[e]||0)+t)};return i(`css-in-js-interpolation`,yi(t)),i(`dynamic-classname`,Xr(t).filter(e=>e.literals.length===0).length-n),i(`css-modules-composes`,(t.match(/^\s*composes\s*:/gm)||[]).length),r}var xi=new Set([`background`,`background-color`,`color`,`border-radius`,`box-shadow`,`padding`,`font-size`,`font-weight`,`border`,`border-color`,`border-width`,`line-height`]),Si=/(^|[/\\])(docs?|documentation|website|site|www|landing|marketing|storybook|\.storybook|stories|examples?|demo|playground)[/\\]/i,Ci=/(^|[/\\])_?dark(?:-?(?:theme|mode))?[\w-]*\.(scss|less|css|ts|js|mjs|tsx|jsx)$|[/\\]themes?[/\\]dark[/\\]/i;function wi(e){let t={},n=Gr(e);for(let e of n.matchAll(/(?:^|[\n;{])\s*([$@][\w-]+)\s*:\s*([^;\n]+?)\s*(?:!default)?\s*;/g))/^@(?:media|import|use|include|mixin|if|else|each|for|function|return|extend|supports|font-face|keyframes|charset|layer|container)/.test(e[1])||(t[e[1]]=e[2].trim());for(let e of n.matchAll(/['"]([\w-]+)['"]\s*:\s*(\$[\w-]+|#[0-9a-f]{3,8}|rgba?\([^)]*\)|hsla?\([^)]*\))\s*[,)]/gi))t[`$`+e[1]]||(t[`$`+e[1]]=e[2]);return t}var Ti=/(^|[/\\])(theme|themes|tokens?|palette|colou?rs|design-?tokens|styles?\/[\w-]*(?:theme|tokens?|palette))[\w.-]*\.(ts|tsx|js|jsx|mjs|mts)$/i;function Ei(e){let t={},n=/^(?:#[0-9a-f]{3,8}|rgba?\([^)]*\)|hsla?\([^)]*\)|oklch\([^)]*\)|-?[\d.]+(?:px|rem|em)|[\d.]+\s+[\d.]+%\s+[\d.]+%|\d{1,3}\s+\d{1,3}\s+\d{1,3})$/i,r=Gr(e),i=[],a=/([A-Za-z_$][\w$]*|['"][\w$-]+['"])\s*:\s*(\{|['"`]([^'"`]*)['"`])|(\})/g,o;for(;o=a.exec(r);){if(o[4]){i.pop();continue}let e=o[1].replace(/^['"]|['"]$/g,``);if(o[2]===`{`){i.push(e);continue}let r=(o[3]||``).trim();if(!n.test(r))continue;let a=[...i,e].filter((e,t)=>!(t===0&&/^(theme|tokens?|palette|light|dark|default|base|colors?)$/i.test(e)&&i.length>0));t[`--`+a.join(`-`)]=r,t[`--`+e]||(t[`--`+e]=r)}return t}function Di(e){let t={},n={},r=(e,t)=>{for(let n of t.matchAll(/(?:^|[{;])\s*(--[\w-]+)\s*:\s*([^;}]+)(?=[;}])/g))e[n[1]]=n[2].trim()};return Kr(e,(e,i,a)=>{r(Oi.test([...a,e].join(` `))?n:t,i+`;`)}),{...n,...t}}var Oi=/(\.|\[data-)(dark|light)(?![\w-])|prefers-color-scheme|theme-(dark|light)(?![\w-])|=\s*['"]?(dark|light)['"]?\s*\]|\[data-[\w-]*(?:theme|mode|scheme|appearance)[\w-]*\s*=|contrast|forced-colors|overrides?(?![\w])|@media[^{]*\bprint\b/i;function ki(e){let t=new Set;return Kr(e,(e,n,r)=>{if(/^\s*@/.test(e)||!/[\w-]+\s*:/.test(n))return;let i=qr(e,r);for(let e of i.matchAll(/\.(-?[A-Za-z_][\w-]*)/g))t.add(e[1])}),t}function Ai(e){let t={};return Kr(e,(e,n,r)=>{let i=qr(e,r);if(/^\s*@/.test(i)||/:(hover|focus|active|disabled|checked)/.test(i))return;let a={};for(let e of n.matchAll(/([-\w]+)\s*:\s*([^;]+)(;|$)/g)){let t=e[1].toLowerCase();xi.has(t)&&(a[t]=e[2].trim())}if(Object.keys(a).length)for(let e of i.matchAll(/\.(-?[A-Za-z_][\w-]*)/g))t[e[1]]={...t[e[1]]||{},...a}}),t}function U(e,t){return typeof e==`string`?e.replace(/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g,(e,n,r)=>t[n]??(r?r.trim():``)):e}function ji(e,t,n=0){if(n>8)return e;let r=typeof e==`string`&&t[e]!==void 0?t[e]:e;if(typeof r!=`string`)return e;let i=r.trim(),a=i.match(/^var\(\s*(--[\w-]+)\s*(?:,\s*([\s\S]+))?\)$/);if(a){if(t[a[1]]!==void 0){let e=ji(a[1],t,n+1);if(e!==a[1])return e}return a[2]?ji(a[2].trim(),t,n+1):i}if(/^[$@][\w-]+$/.test(i)&&t[i]!==void 0)return ji(i===r?t[i]:i,t,n+1);let o=i.match(/^(rgba?|hsla?)\(\s*var\(\s*(--[\w-]+)\s*\)\s*(\/\s*[\d.]+%?)?\s*\)$/i);if(o&&t[o[2]]!==void 0){let e=ji(o[2],t,n+1);if(e!==o[2]&&!/var\(/.test(e))return`${o[1]}(${e}${o[3]?` `+o[3]:``})`}return i}function Mi(e,t,n=0){return/\.(css|scss|less)$/.test(e)?(Gr(t).match(/\{[^{}]*\}/g)||[]).length:Xr(t).filter(e=>e.literals.length>0).length+(t.match(/style\s*=\s*\{\{/g)||[]).length+n}var Ni={nav:[/<nav[\s>]/,/role=["']navigation["']/],menu:[/role=["']menu["']/],tabs:[/role=["']tablist["']/],table:[/<table[\s>]/,/role=["']table["']/],dialog:[/role=["'](dialog|alertdialog)["']/],toast:[/from ["'](sonner|react-hot-toast|react-toastify)["']/],badge:[/class(?:Name)?=["'][^"']*\bbadge\b/],avatar:[/class(?:Name)?=["'][^"']*\bavatar\b/],toggle:[/role=["']switch["']/],tooltip:[/role=["']tooltip["']/],card:[/class(?:Name)?=["'][^"']*\bcard\b/],form:[/<label[\s>]/],breadcrumb:[/aria-label=["']breadcrumb["']/i],pagination:[/aria-label=["']pagination["']/i],chart:[/from ["'](recharts|chart\.js|victory|nivo)/],calendar:[/from ["'](react-day-picker|@fullcalendar)/]},Pi=/\.(tsx|jsx|vue|svelte|astro|html|ts|js|mts|cts|heex|eex|leex|erb|blade\.php|twig|hbs|handlebars|njk|liquid|cshtml|razor|ejs|php|mustache|haml)$/,Fi={nav:[`Nav`,`Navbar`,`NavBar`,`Navigation`,`Sidebar`,`SideNav`,`TopBar`,`AppBar`],menu:[`Menu`,`Dropdown`,`ContextMenu`,`Select`,`Combobox`,`Listbox`,`Popover`],tabs:[`Tabs`,`TabList`,`TabGroup`,`TabPanel`],table:[`Table`,`DataTable`,`DataGrid`],dialog:[`Dialog`,`Modal`,`Sheet`,`Drawer`,`AlertDialog`],toast:[`Toast`,`Toaster`,`Snackbar`],badge:[`Badge`,`Pill`,`Chip`,`=Tag`],avatar:[`Avatar`,`ProfilePicture`],toggle:[`Switch`,`=Toggle`,`=ToggleGroup`],tooltip:[`Tooltip`,`HoverCard`],card:[`Card`],form:[`Form`,`FormField`,`FormItem`,`FormControl`],breadcrumb:[`Breadcrumb`,`Breadcrumbs`],pagination:[`Pagination`,`Paginator`],chart:[`Chart`,`Sparkline`],calendar:[`Calendar`,`DatePicker`,`DayPicker`,`DateRangePicker`,`DateTimePicker`]};function Ii(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1\0$2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1\0$2`).split(`\0`).filter(Boolean)}function Li(e,t){if(t.startsWith(`=`))return e===t.slice(1);let n=Ii(e),r=Ii(t);for(let e=0;e+r.length<=n.length;e++)if(r.every((t,r)=>n[e+r]===t))return!0;return!1}var Ri=/(^|[\s(){}[\],;=>&|?:!])<([A-Z][A-Za-z0-9]*)(?=[\s/>])/g;function zi(e){let t={};for(let e of Object.keys(Ni))t[e]={files:0,at:[]};for(let{path:n,content:r}of e){if(!Pi.test(n))continue;let e=new Set;for(let t of r.matchAll(Ri))e.add(t[2]);for(let[i,a]of Object.entries(Ni)){let o=a.some(e=>e.test(r)),s=!o&&Fi[i]&&[...e].some(e=>Fi[i].some(t=>Li(e,t)));if(!o&&!s)continue;let c=t[i];c.files++,c.at.length<5&&c.at.push(n)}}return t}var Bi={"side-nav":[/<(Sidebar|AppSidebar|SideNav|SidebarProvider|MainNavigation)\b/,/<aside\b[^>]*(nav|menu)/i],"top-bar":[/<(TopBar|AppBar|SiteHeader|Navbar|TopControlBar)\b/,/<header\b[^>]*(app|top|site)/i],rail:[/<SidebarTrigger\b/,/isCollapsed|sidebarCollapsed|collapsible=["']icon["']/],"right-panel":[/<(Inspector|DetailPanel|RightPanel|PropertiesPanel|ThreadDisplay|PreviewPane)\b/],"page-header":[/<(PageHeader|PageTitle|SettingsHeader|SectionHeader)\b/],breadcrumbs:[/<(Breadcrumb|Breadcrumbs)\b/,/aria-label=["']breadcrumb["']/i],"command-menu":[/<(CommandDialog|CommandMenu|CommandK)\b/,/from ["']cmdk["']/],toolbar:[/<(Toolbar|ActionBar|FilterBar)\b/]},Vi=/\.(tsx|jsx|vue|svelte|astro)$/;function Hi(e){let t={};for(let e of Object.keys(Bi))t[e]={files:0,at:[]};for(let{path:n,content:r}of e)if(Vi.test(n))for(let[e,i]of Object.entries(Bi)){if(!i.some(e=>e.test(r)))continue;let a=t[e];a.files++,a.at.length<5&&a.at.push(n)}return t}var Ui={"table.sortable":[/aria-sort=/,/getSortedRowModel|<SortableHeader\b|onSort\b/],"table.selectable":[/rowSelection|getIsSelected/,/<Checkbox[^>]{0,80}row/i],"dialog.destructive":[/<(AlertDialog|ConfirmDialog)\b/,/variant=["']destructive["']/],"form.validation":[/zodResolver|<FormMessage\b|aria-invalid=/]};function Wi(e){let t={};for(let e of Object.keys(Ui))t[e]=0;for(let{path:n,content:r}of e)if(Pi.test(n))for(let[e,n]of Object.entries(Ui))n.some(e=>e.test(r))&&t[e]++;return t}var Gi=`modulepreload`,Ki=function(e){return`/`+e},qi={},Ji=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=Ki(t,n),t=s(t),t in qi)return;qi[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`:Gi,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)})},Yi={internal:{color:16,type:8,spacing:10,radius:5,shadow:5},product:{color:30,type:12,spacing:13,radius:5,shadow:6}},Xi={color:.25,type:.25,spacing:.2,radius:.15,shadow:.15},Zi=[`color`,`type`,`spacing`,`radius`,`shadow`],Qi=Math.log2(8),$i=.3,ea=.7;function ta(e){let t=e.reduce((e,t)=>e+t,0);if(t===0)return 0;let n=0;for(let r of e){if(r<=0)continue;let e=r/t;n-=e*Math.log(e)}return Math.exp(n)}function na(e,t){if(e===0)return 100;let n=Math.max(1,e/t);return 100*Math.max(0,1-Math.log2(n)/Qi)}function ra(e){return e>=85?`A`:e>=70?`B`:e>=55?`C`:e>=40?`D`:`F`}function ia(e){let t=new Map;for(let n of e){let e=t.get(n.value);e||(e={value:n.value,count:0,at:[]},t.set(n.value,e)),e.count++,e.at.length<25&&e.at.push(n.at)}return[...t.values()].sort((e,t)=>t.count-e.count)}function aa(e,t,n){let r=t.map(e=>e.value);return e===`color`?wn(r,sa(n),2):e===`radius`||e===`spacing`?wn(r,Tn,1):e===`shadow`?wn(r,ca,2):[]}var oa=e=>/\/[\d.]+%?$/.test(String(e)),sa=e=>(t,n)=>oa(t)||oa(n)?null:Cn(t,n,e);function ca(e,t){let n=e=>{let t=String(e).match(/-?[\d.]+px/g);return t&&t.length>=3?parseFloat(t[2]):t?parseFloat(t[t.length-1]):null},r=n(e),i=n(t);return r!==null&&i!==null?Math.abs(r-i):null}function la(e,t,n,r){let i=ia(t),a=i.map(e=>e.count),o=a.reduce((e,t)=>e+t,0),s=ta(a),c=na(s,n),l=o?t.filter(e=>e.tokenized).length/o:1,u=aa(e,i,r),d=new Set(u.flat()),f=o?t.filter(e=>d.has(e.value)).length/o:0,p=null;if(e===`spacing`){let e=t.filter(e=>/^-?[\d.]+px$/.test(e.value)),n=e.filter(e=>{let t=Math.abs(parseFloat(e.value));return t>0&&t%4!=0});p=e.length?n.length/e.length:0}let m=[l,1-f];p!==null&&m.push(1-p);let h=m.reduce((e,t)=>e+t,0)/m.length,g=c*($i+.7*h),_=o<12;return{insufficient:_,events:o,distinct:i.length,nEff:ua(s,1),budget:n,cardinalityScore:ua(c,1),coherence:ua(h,3),tokenisedRate:ua(l,3),offGridRate:p===null?null:ua(p,3),nearDupeMass:ua(f,3),score:_?null:ua(g,1),grade:_?null:ra(g),values:i.slice(0,200),singletons:i.filter(e=>e.count===1).map(e=>e.value),nearDupes:u}}var ua=(e,t)=>Math.round(e*10**t)/10**t,da=/^(flex|inline-flex|grid|inline-grid|block|inline|inline-block|hidden|table|contents|flow-root|list-item|absolute|relative|fixed|sticky|static|isolate|float-\w+|clear-\w+|items-|justify-|content-|self-|place-|order-|col-|row-|basis-|grow|shrink|w-|h-|min-w-|min-h-|max-w-|max-h-|top-|right-|bottom-|left-|inset-|z-|overflow-|object-|aspect-|container|mx-auto|space-[xy]-|divide-)/,fa=/<(button|a)\b([^>]*)>/gi,pa=/<(input|select|textarea)\b([^>]*)>/gi,ma={button:/^(?:\w*Button|Btn|\w*Btn|IconButton|ToggleButton|SubmitButton|LinkButton|Cta)$/,input:/^(?:\w*Input|TextField|\w*Field|Textarea|TextArea|Select|Combobox|Checkbox|Radio|Switch|Toggle)$/,card:/^(?:\w*Card|Panel|Tile|Surface)$/},ha=/^(?:ButtonGroup|Buttons|InputGroup|Inputs|CardGroup|CardHeader|CardTitle|CardContent|CardFooter|CardDescription|FieldGroup|Fieldset|SelectGroup|SelectLabel|SelectContent|SelectItem|SelectTrigger|SelectValue|RadioGroup|CheckboxGroup|ToggleGroup)$/;function ga(e){let t={button:0,input:0,card:0},n={button:new Set,input:new Set,card:new Set};for(let r of e.matchAll(/<([A-Z][\w.]*)[\s/>]/g)){let e=r[1].split(`.`).pop();if(!ha.test(e)){for(let r of Object.keys(ma))if(ma[r].test(e)){t[r]++,n[r].add(e);break}}}return{found:t,names:n}}function _a(e,t={},n=``){let r=e.match(/class(?:Name)?\s*=\s*(?:"([^"]*)"|'([^']*)'|\{`([^`]*)`\})/);if(r)return(r[1]??r[2]??r[3]??``).split(/\s+/).filter(Boolean);let i=e.match(/class(?:Name)?\s*=\s*\{([^}]*)\}/);if(!i)return null;let a=ci(n,`className={${i[1]}}`,t);return a.length?a[0].classes:null}function va(e){let t=e.map(e=>e.trim()).filter(e=>e&&!da.test(e)).map(e=>e.includes(`#`)?e:e.toLowerCase());return[...new Set(t)].sort().join(` `)}function ya(e){let t={button:new Map,input:new Map,card:new Map},n=(e,n,r)=>{if(!n)return;let i=t[e].get(n);i||(i={sig:n,count:0,at:[]},t[e].set(n,i)),i.count++,i.at.length<25&&i.at.push(r)},r=(e,t)=>e.slice(0,t).split(`
|
|
24
|
+
`).length,i={button:0,input:0,card:0},a={button:new Set,input:new Set,card:new Set};for(let{path:t,content:o}of e){if(/\.(css|scss|less)$/.test(t))continue;let e=ii(t,o),s=ga(o);for(let e of Object.keys(i)){i[e]+=s.found[e];for(let t of s.names[e])a[e].add(t)}for(let i of o.matchAll(fa)){let a=i[1].toLowerCase(),s=i[2]||``,c=_a(s,e,t),l=/role\s*=\s*["']button["']/.test(s),u=c&&c.some(e=>/^bg-/.test(e))&&c.some(e=>/^p[xytrbl]?-/.test(e));(a===`button`||l||a===`a`&&u)&&n(`button`,va(c||[]),{file:t,line:r(o,i.index),col:1})}for(let i of o.matchAll(pa))n(`input`,va(_a(i[2]||``,e,t)||[]),{file:t,line:r(o,i.index),col:1});ri(o,r=>{if(Ta(r.tag))return;let i=_a(r.attrs,e,t);if(!i)return;let a=e=>i.some(t=>e.test(t));a(/^bg-/)&&a(/^p[xytrbl]?-/)&&(a(/^rounded/)||a(/^(border|shadow)/))&&n(`card`,va(i),{file:t,line:r.line,col:1})})}let o={};for(let[e,n]of Object.entries(t)){let t=[...n.values()].sort((e,t)=>t.count-e.count),r=t.reduce((e,t)=>e+t.count,0),s=i[e],c=r+s;o[e]={treatments:t.length,singletons:t.filter(e=>e.count===1).length,handRolled:r,throughComponent:s,componentNames:[...a[e]].sort().slice(0,12),componentShare:c?ua(s/c,3):null,signatures:t.slice(0,100)}}return o}function ba(e){let t=[`button`,`input`,`card`],n=0,r=0,i=0,a=0,o={};for(let s of t){let t=e[s];t&&(n+=t.treatments,r+=t.singletons,i+=t.handRolled,a+=t.throughComponent,o[s]={treatments:t.treatments,singletons:t.singletons,componentShare:t.componentShare})}let s=i+a;return{treatments:n,singletons:r,singletonRate:n?ua(r/n,3):null,componentShare:s?ua(a/s,3):null,byKind:o}}function xa(e,t){return e!==null&&e>=70&&t.treatments>=10&&t.singletonRate!==null&&t.singletonRate>=.5}var Sa=/^(?:[\w-]+:)*(h|min-h|size|py|pt|pb|p|text|leading)-/,Ca=[`padding`,`font-size`,`line-height`];function wa(e){let t=String(e).trim().split(/\s+/);return t.length?t.length===1||t.length===2?t[0]:`${t[0]}/${t[2]??t[0]}`:null}function Ta(e){let t=e.toLowerCase();if(t===`button`)return`button`;if(t===`input`||t===`select`||t===`textarea`)return`input`;if(/^[A-Z]/.test(e)&&!ha.test(e)){for(let t of[`button`,`input`])if(ma[t].test(e))return t}return null}function Ea(e,t,n,r){let i={},a=_a(e.attrs,n,r);if(a){for(let e of a){let t=e.replace(/^(?:[\w-]+:)*/,``);t.match(Sa)&&(i[`class:${t.split(`-`)[0]}`]=t)}for(let e of a){let n=t[e];if(n)for(let e of Ca)n[e]&&(i[e]=e===`padding`?wa(n[e]):n[e])}}let o=e.attrs.match(/\bsize\s*=\s*(?:"([^"]*)"|'([^']*)'|\{\s*["']([^"']*)["']\s*\})/);return o?i.size=o[1]??o[2]??o[3]:/^[A-Z]/.test(e.tag)&&(i.size=`default`),Object.keys(i).length?i:null}function Da(e){let t=Object.keys(e[0]).filter(t=>e.every(e=>t in e));if(!t.length)return null;let n=t.filter(t=>new Set(e.map(e=>e[t])).size>1);return n.length?n:null}function Oa(e,t){let n=0,r=[];for(let{path:i,content:a}of e){if(/\.(css|scss|less)$/.test(i))continue;let e=ii(i,a),o=new Map;ri(a,e=>{let t=Ta(e.tag);!t||!e.parent||(o.has(e.parent)||o.set(e.parent,[]),o.get(e.parent).push({el:e,kind:t}))});for(let[a,s]of o)for(let o of[`button`,`input`]){let c=s.filter(e=>e.kind===o);if(c.length<2)continue;n++;let l=c.map(n=>({tag:n.el.tag,line:n.el.line,facets:Ea(n.el,t,e,i)}));if(l.some(e=>e.facets===null))continue;let u=Da(l.map(e=>e.facets));u&&r.push({kind:o,file:i,line:a.line,container:a.tag,differsOn:u,controls:l.map(e=>({tag:e.tag,line:e.line,height:u.map(t=>`${t}:${e.facets[t]}`).join(` `)}))})}}return{rows:n,mismatched:r.length,findings:r.slice(0,50)}}var ka=[[/^react$/,`React`],[/^vue$/,`Vue`],[/^svelte$/,`Svelte`],[/^@angular\/core$/,`Angular`],[/^solid-js$/,`Solid`],[/^preact$/,`Preact`]],Aa=[[/^next$/,`Next.js`],[/^nuxt$/,`Nuxt`],[/^astro$/,`Astro`],[/^@remix-run\/react$/,`Remix`],[/^@sveltejs\/kit$/,`SvelteKit`],[/^vite$/,`Vite`]],ja=[[`styled-components`,`styled-components`],[`@emotion/styled`,`Emotion`],[`@stitches/react`,`Stitches`],[`@vanilla-extract/css`,`vanilla-extract`]],Ma=[`@mui/material`,`antd`,`@chakra-ui/react`,`@mantine/core`,`react-bootstrap`,`@radix-ui/themes`],Na=e=>(String(e).match(/(\d+)/)||[])[1]||null;function Pa(e,t,n){let r={...t?.dependencies||{},...t?.devDependencies||{}},i=e=>{for(let[t,n]of e){let e=Object.keys(r).find(e=>t.test(e));if(e)return{name:n,version:Na(r[e])}}return null},a={};for(let t of e){let e=(t.path.match(/\.(\w+)$/)||[,`?`])[1];a[e]=(a[e]||0)+1}let o=(e,t,n=`${t}s`)=>`${so(e)} ${e===1?t:n}`,s=[],c=(e,t,n,r)=>s.push({kind:e,version:t,weight:n,detail:r});n.utilities&&c(`Tailwind CSS`,r.tailwindcss?Na(r.tailwindcss):null,n.utilities,o(n.utilities,`utility class`,`utility classes`)),n.moduleFiles&&c(`CSS Modules`,null,n.moduleBindings,`${o(n.moduleFiles,`module`)}, ${o(n.moduleRules,`rule`)}, ${o(n.moduleBindings,`binding`)}`),n.plainCssFiles&&c(`Plain CSS`,null,n.cssRules,`${o(n.plainCssFiles,`file`)}, ${o(n.cssRules,`rule`)}`),n.inlineStyles&&c(`Inline styles`,null,n.inlineStyles,o(n.inlineStyles,`declaration`));for(let[e,t]of ja)r[e]&&c(t,null,n.cssInJsBlocks||1,n.cssInJsBlocks?o(n.cssInJsBlocks,`styled block`):`installed, none found`);s.sort((e,t)=>t.weight-e.weight);let l=s.length?s[0].weight:0,u=s.filter((e,t)=>t===0||e.weight>=10||e.weight>=l*.02);return{framework:i(ka),meta:i(Aa),typescript:!!(r.typescript||a.tsx||a.ts),styling:u,componentLibraries:Ma.filter(e=>r[e]),files:e.length,byExt:a}}function Fa(e,t,n){let r=[],i=e.map(e=>e.path);if(t){let e={...t.dependencies||{},...t.devDependencies||{}},n=Object.keys(e).filter(e=>/^(lucide-react|react-icons|@heroicons\/|@tabler\/icons|react-feather|@phosphor-icons\/|@radix-ui\/react-icons|iconoir-react|@fortawesome\/)/.test(e));n.length>=2&&r.push({id:`multiple-icon-libs`,severity:`high`,detail:n});let i=Object.keys(e).filter(e=>/^(tailwindcss|styled-components|@emotion\/styled|@stitches\/|sass|less|@vanilla-extract\/)/.test(e));i.length>=2&&r.push({id:`multiple-styling-systems`,severity:`high`,detail:i});let a=Object.keys(e).filter(e=>/^(@fontsource|next\/font)/.test(e));a.length>=2&&r.push({id:`multiple-font-packages`,severity:`low`,detail:a})}let a=new Map;for(let e of i){let t=e.split(/[/\\]/).pop().replace(/\.\w+$/,``).toLowerCase();/^(button|card|input|modal|dialog|badge|avatar|select)$/.test(t)&&(a.has(t)||a.set(t,[]),a.get(t).push(e))}let o=[...a.entries()].filter(([,e])=>e.length>1);o.length&&r.push({id:`duplicate-components`,severity:`high`,detail:o.map(([e,t])=>`${e}: ${t.join(` · `)}`)});let s=new Set;for(let e of n){if(e.dim!==`color`)continue;let t=String(e.value).match(/^(gray|slate|zinc|neutral|stone)-\d{2,3}$/);t&&s.add(t[1])}s.size>=3&&r.push({id:`mixed-gray-ramps`,severity:`high`,detail:[...s]});let c=new Set;for(let{path:t,content:n}of e)if(/\.(css|scss|less)$/.test(t))for(let e of n.matchAll(/font-family\s*:\s*([^;]+);/gi)){let t=e[1].split(`,`)[0].trim().replace(/["']/g,``).toLowerCase();t&&!/mono|courier|consolas|menlo|var\(/.test(t)&&c.add(t)}return c.size>=2&&r.push({id:`multiple-font-families`,severity:`medium`,detail:[...c]}),r}var Ia={mono:`#3b3b42`,cobalt:`#0A84FF`,sky:`#0EA5E9`,teal:`#14B8A6`,jade:`#10B981`,ember:`#F97316`,coral:`#EC4899`,indigo:`#6366F1`,violet:`#8B5CF6`,rose:`#F43F5E`};function La(e){let t=e.reduce((e,t)=>e+t.count,0);return!t||!e.length?{value:null,share:null}:{value:e[0].value,share:e[0].count/t}}var Ra=e=>{let t=String(e).match(/^(-?[\d.]+)(px|rem)?$/);return t?t[2]===`rem`?parseFloat(t[1])*16:parseFloat(t[1]):null};function za(e,t,n={},r=new Map,i=``,a=new Set){let o={},s={},c=.4,l=La(e.radius.values);if(l.value&&l.share>=c){let e=Ra(l.value);o.radius=e===null?`soft`:e===0?`none`:e<=5?`subtle`:e<=10?`soft`:`round`,s.radius=ua(l.share,2)}else s.radius=null;let u=e.shadow.distinct;if(e.shadow.events===0)o.elevation=`flat`,s.elevation=1;else{let t=La(e.shadow.values);t.share>=c&&(o.elevation=u<=3?`soft`:`default`),s.elevation=t.share?ua(t.share,2):null}let d=La(e.type.values);if(d.value&&d.share>=c){let e=Ra(String(d.value).split(`/`)[0]);o.typeScale=e===null?`md`:e<=13?`sm`:e<=15?`md`:e<=17?`lg`:`xl`,s.typeScale=ua(d.share,2)}else s.typeScale=null;let f=e.spacing.values.map(e=>({n:Ra(e.value),c:e.count})).filter(e=>e.n);if(f.length){let t=f.reduce((e,t)=>e+t.n*t.c,0)/f.reduce((e,t)=>e+t.c,0);o.scale=t<=10?`compact`:t<=18?`default`:`comfortable`,s.scale=ua(Math.min(1,f.length/e.spacing.distinct),2)}else s.scale=null;let p=Ja(n,t,r,i,a),m=p||Ya(e.color.values,t);if(m){let e=null;for(let[n,r]of Object.entries(Ia)){let i=Cn(m.value,r,t);i!==null&&(!e||i<e.d)&&(e={name:n,d:i})}let n=p?null:Math.min(1,(m.count??0)/20);if(s.colorTheme=p?p.docs?.5:1:ua(Math.min(m.share,n),2),s.colorThemeSource=p?`declared as ${p.name}${p.docs?` — in a docs site, not the app`:``}`:`most-used literal colour`,e&&(p||m.share>=c)){o.colorTheme=e.name;let n=Za(m.value,t,`saturated`);n&&(o.brandHex=n)}}return s.colorTheme===void 0&&(s.colorTheme=null),{values:o,confidence:s}}var Ba=/^(?:--?|[$@])(?:[\w-]*?-)?(?:brand|primary|accent)(?:-(?:default|base|main))?$/i,Va=/^--?(?:sidebar|card|popover|muted|destructive|input|ring|chart|border|secondary)-/i,Ha=/^--?(?:[\w-]*?-)?(?:txt|text|link|icon|fill|stroke|shadow|outline|hover|active|focus|disabled|selected|placeholder|caret|scrollbar|gradient)-/i,Ua=/^--?(?:primary|accent|brand|success|warning|error|danger|info)-/i,Wa=/(?:^|-)(?:danger|success|warning|error|info|destructive|critical|positive|negative)(?:-|$)/i,Ga=/@import\s+["']tailwindcss(?:\/[\w-]+)?["']|@theme\b|@utility\b|@custom-variant\b/,Ka=/@tailwind\s+(?:base|components|utilities)\b/,qa=/^--(?:ifm|vp|sl|md|docsearch|docusaurus|vitepress|starlight|mkdocs)-/i;function Ja(e,t,n=new Map,r=``,i=new Set){let a=[];for(let[o,s]of Object.entries(e)){if(!Ba.test(o)||Va.test(o)||Ha.test(o)||Wa.test(o))continue;let c=ji(s,e),l=vn(c,t);l&&(Math.hypot(l[1],l[2])<=25||l[0]<=15||l[0]>=92||a.push({name:o,value:c,refs:n.get(o)||0,mine:r.length>2&&o.toLowerCase().includes(r)?1:0,docs:qa.test(o)||i.has(o)?1:0}))}return a.length?(a.sort((e,t)=>e.docs-t.docs||t.refs-e.refs||t.mine-e.mine||e.name.length-t.name.length),a[0].docs?{value:a[0].value,name:a[0].name,docs:!0}:{value:a[0].value,name:a[0].name}):null}function Ya(e,t){let n=[];for(let r of e){let e=vn(r.value,t);if(e&&Math.hypot(e[1],e[2])>25&&e[0]>15&&e[0]<92){let e=cn(sn(String(r.value)),t);n.push({...r,hue:e?on(...e)[2]:null})}}if(!n.length)return null;let r=n.reduce((e,t)=>e+t.count,0),i=(e,t)=>{let n=Math.abs(e-t)%360;return Math.min(n,360-n)<=10},a=[];for(let e of[...n].sort((e,t)=>t.count-e.count)){let t=e.hue==null?null:a.find(t=>t.hue!=null&&i(t.hue,e.hue));t?(t.count+=e.count,t.members.push(e)):a.push({hue:e.hue,count:e.count,top:e,members:[e]})}let o=a.reduce((e,t)=>t.count>e.count?t:e,a[0]);return{value:o.top.value,share:r?o.count/r:0,count:o.count,shades:o.members.length}}function Xa(e){return typeof e==`string`&&/^-?[\d.]+(px|rem|em|%)$/.test(e)}function Za(e,t,n=`saturated`){let r=cn(sn(String(e)),t);if(!r)return null;let[i,a,o]=r,s=Math.max(i,a,o)-Math.min(i,a,o);return(n===`saturated`?s<60:s>=60)?null:`#`+[i,a,o].map(e=>Math.round(e).toString(16).padStart(2,`0`)).join(``)}var Qa=e=>{let t=parseInt(e.slice(1),16);return(.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t&255))/255};function $a(e){if(!e.length)return{bg:null,polarity:null};let t=e.filter(e=>Qa(e)<.5).length>e.length/2?`dark`:`light`,n=[...e].sort((e,t)=>Qa(t)-Qa(e));return{bg:t===`dark`?n[n.length-1]:n[0],polarity:t}}function eo(e,t){let n=e=>{let t=parseInt(e.slice(1),16),n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(t&255)},[r,i]=[n(e),n(t)];return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function to(e,t,n){let r=e.map(([e])=>e);if(!n)return{fg:r[0]||null,border:t[0]||null};let i=t=>e.filter(([e])=>eo(e,n)>=t),a=i(4.5).length?i(4.5):i(3),o=null;if(a.length){let e=Math.max(2,a[0][1]*.1),t=a.filter(([,t])=>t>=e);o=(t.length?t:a).reduce((e,t)=>eo(t[0],n)>eo(e[0],n)?t:e)[0]}return{fg:o,border:t.find(e=>eo(e,n)>=1.2&&eo(e,n)<=6)||t[0]||null}}var no={bg:/^--?(?:[\w-]*?-)?(?:background|bg|canvas|page|surface)$/i,fg:/^--?(?:[\w-]*?-)?(?:foreground|fg|text|ink|body-color)$/i,border:/^--?(?:[\w-]*?-)?(?:border|border-color|divider|outline)$/i};function ro(e,t,n){let r={bg:null,fg:null,border:null};for(let i of[`bg`,`fg`,`border`]){let a=[];for(let[r,o]of Object.entries(e)){if(!no[i].test(r)||Va.test(r)||Ua.test(r)||Ha.test(r))continue;let s=Za(ji(o,e),t,`neutral`);s&&a.push({name:r,hex:s,refs:n.get(r)||0})}a.sort((e,t)=>t.refs-e.refs||e.name.length-t.name.length),r[i]=a.length?a[0].hex:null}return r.bg&&r.fg&&eo(r.bg,r.fg)<3&&(r.bg=null,r.fg=null),r}function io(e,t,n,r){let i=new Map;for(let n of e)n.dim===`color`&&n.role===t&&i.set(n.value,(i.get(n.value)||0)+1);let a=new Map;for(let[e,t]of i){let i=Za(e,n,r);i&&a.set(i,(a.get(i)||0)+t)}return[...a.entries()].sort((e,t)=>t[1]-e[1])}var ao=(e,t,n,r)=>io(e,t,n,r).map(([e])=>e);function oo(e,t={}){let n=t.profile===`product`?`product`:`internal`,r=Yi[n],i=t.vocabulary?.classes||{},a=t.vocabulary?.vocabVersion||null,o=[],s=0,c={},l={recipe:0,tokensOnly:0,layout:0,none:0},u=[],d=new Set,f={},p={},m={utilities:0,moduleFiles:0,moduleBindings:0,moduleRules:0,plainCssFiles:0,cssRules:0,inlineStyles:0,cssInJsBlocks:0},h={},g={},_=e=>Si.test(e),v=e=>Ci.test(e),y=e=>_(e)?h:v(e)?g:p,b={v4:0,v3:0},x=(e,t)=>{Ga.test(t)&&b.v4++,Ka.test(t)&&b.v3++,o.push(...Jr(e,t)),Object.assign(y(e),Di(t)),/\.(scss|less)$/.test(e)&&Object.assign(y(e),wi(t));let n=/\.module\.(css|scss|less)$/.test(e);for(let[r,i]of Object.entries(Ai(t))){let t=n?oi(e,r):r;f[t]={...f[t]||{},...i}}for(let r of ki(t))d.add(n?oi(e,r):r)};for(let{path:t,content:n}of e){if(!Ti.test(t))continue;let e=Ei(n);Object.keys(e).length&&Object.assign(y(t),e)}for(let{path:t,content:n}of e){if(!/\.(css|scss|less)$/.test(t))continue;let e=Mi(t,n);s+=e,/\.module\.(css|scss|less)$/.test(t)?(m.moduleFiles++,m.moduleRules+=e):(m.plainCssFiles++,m.cssRules+=e);for(let[e,r]of Object.entries(bi(t,n)))c[e]=(c[e]||0)+r;x(t,n)}for(let{path:t,content:n}of e){if(/\.(css|scss|less)$/.test(t))continue;let e=ci(t,n,ii(t,n));s+=Mi(t,n,e.length);for(let[r,i]of Object.entries(bi(t,n,e.length)))c[r]=(c[r]||0)+i;m.moduleBindings+=e.length;for(let{classes:e,at:r}of Zr(t,n)){let t=ei(e,r);o.push(...t);for(let t of e)zr.test(t)&&m.utilities++;u.push({classes:e,valueCarrying:t.length>0})}for(let{classes:t}of e)u.push({classes:t,valueCarrying:!1});let r=vi(n);for(let e of r)x(t,e);r.length&&(m.cssInJsBlocks+=r.length,s+=r.length);let i=ui(t,n);m.inlineStyles+=i.length,o.push(...i);for(let e of n.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/gi))x(t,e[1])}let S=e=>e.split(`#`).pop().split(`--`)[0].split(`__`)[0].replace(/^.*:/,``);for(let e of u){let t=e.classes.some(e=>Object.prototype.hasOwnProperty.call(i,S(e))),n=e.valueCarrying||e.classes.some(e=>f[e]&&Object.keys(f[e]).length);if(t){l.recipe++;continue}if(n){l.tokensOnly++;continue}if(e.classes.some(e=>d.has(e))){l.none++;continue}l.layout++}for(let e of o)if(typeof e.value==`string`&&e.value.startsWith(`--`)){let t=ji(e.value,p);t!==e.value&&(e.value=Hr(t))}let C=t.palette&&Object.keys(t.palette).length?t.palette:null,w=t.tailwind===null?null:t.tailwind||(b.v4?`v4`:b.v3?`v3`:`v4`),T=ln(p,C||{},C?null:w),E=C?`installed`:w?!m.utilities&&!b.v4&&!b.v3?`none needed (no Tailwind utilities read)`:`tailwind ${w} defaults (${Qt[w]}${b.v4||b.v3?`, ${b.v4?`@import "tailwindcss"/@theme`:`@tailwind`} seen`:`, assumed — no marker seen`})`:`none`,D={};for(let[e,t]of Object.entries(f)){let n={};for(let[e,r]of Object.entries(t))n[e]=U(r,p);D[e]=n}let O=Object.values(c).reduce((e,t)=>e+t,0),k=s+O,A=k?s/k:1,j={};for(let e of Zi)j[e]=la(e,o.filter(t=>t.dim===e),r[e],T);let ee=Zi.filter(e=>!j[e].insufficient),te=ee.reduce((e,t)=>e+Xi[t],0),ne=te?ee.reduce((e,t)=>e+Xi[t]*j[t].score,0)/te:null,re=l.recipe+l.tokensOnly+l.layout+l.none,M=e=>re?ua(e/re,3):null,N=String(t.pkg?.name||``).split(`/`).pop().replace(/[^a-z0-9]/gi,``).toLowerCase(),ie=new Map,ae=new Map;for(let{path:t,content:n}of e){let e=_(t)?ae:ie;for(let t of n.matchAll(/var\(\s*(--[\w-]+)/g))e.set(t[1],(e.get(t[1])||0)+1)}let oe=new Set(Object.keys(h).filter(e=>!(e in p)&&!(e in g)));Object.assign(p,{...h,...g,...p});for(let[e,t]of ae)!ie.has(e)&&oe.has(e)&&ie.set(e,0);let se={...$a(ao(o,`bg`,T,`neutral`)),...to(io(o,`fg`,T,`neutral`),ao(o,`border`,T,`neutral`),$a(ao(o,`bg`,T,`neutral`)).bg)},P=ro(p,T,ie),F={bg:P.bg||se.bg,fg:P.fg||se.fg,border:P.border||se.border};F.polarity=F.bg?Qa(F.bg)<.5?`dark`:`light`:null;let I={meta:{files:e.length,elements:k,profile:n,stack:Pa(e,t.pkg,m),parsed:ua(A,3),unreadable:c,expressible:{recipe:M(l.recipe),tokensOnly:M(l.tokensOnly),layout:M(l.layout),none:M(l.none),counts:{...l}},vocabVersion:a,palette:E,nearDupeMetric:{color:en,threshold:2,length:`px`,lengthThreshold:1,shadow:`blur-px`,shadowThreshold:2}},score:ne===null?null:ua(ne,0),grade:ne===null?null:ra(ne),scoredDimensions:ee,insufficientDimensions:Zi.filter(e=>j[e].insufficient),refused:A<.7||ne===null,dimensions:j,components:ya(e),kinds:zi(e),spread:{radius:j.radius.values.map(e=>e.value).filter(Xa).slice(0,12),shadow:j.shadow.values.map(e=>e.value).filter(e=>!/var\(/.test(e)).slice(0,8),spacing:j.spacing.values.map(e=>e.value).filter(Xa).slice(0,10),color:j.color.values.map(e=>Za(e.value,T,`saturated`)).filter(Boolean).slice(0,10),...F,neutral:j.color.values.map(e=>Za(e.value,T,`neutral`)).filter(Boolean).slice(0,8),type:j.type.values.map(e=>String(e.value).split(`/`)[0]).filter(e=>/^[\d.]+(px|rem)$/.test(e)).slice(0,6)},shell:Hi(e),variants:Wi(e),classStyles:D,clusters:Oa(e,D),palette:Object.fromEntries(j.color.values.map(e=>[sn(e.value),T[sn(e.value)]]).filter(([,e])=>e)),flags:Fa(e,t.pkg,o),inferredConfig:za(j,T,p,ie,N,oe)};return I.sprawl=ba(I.components),I.headlinesDisagree=xa(I.score,I.sprawl),I.refused&&(I.score=null,I.grade=null,I.refusal=A<.7?`Only ${Math.round(A*100)}% of styled elements could be read (minimum ${Math.round(ea*100)}%). Scoring code we could not read would be contestable, so no score is given.`:`Too little styling to measure — every dimension is under 12 usage events. This is not a clean bill of health; it means the values live somewhere this scan cannot see (a component library, a theme file, or another stack).`),I}var so=e=>e.toLocaleString(`en-US`),co=/(^|\/)(node_modules|\.git|dist|build|\.next|out|coverage|\.uicockpit|vendor|__snapshots__)(\/|$)/,W=524288,G=41943040,lo=8e3,uo=e=>!co.test(e)&&Dr.test(e)&&!Or.test(e);function fo(e){let t={tooBig:0,overCap:0},n=e.filter(e=>uo(e.path)).map(e=>({c:e,rank:kr(e.path)})).sort((e,t)=>e.rank-t.rank||(e.c.path<t.c.path?-1:+(e.c.path>t.c.path))),r=[],i=0;for(let{c:e}of n){if(e.size>W){t.tooBig++;continue}if(r.length>=lo||i+e.size>G){t.overCap++;continue}i+=e.size,r.push(e)}return{take:r,skipped:t}}var po=e=>new Promise(t=>e.file(e=>t(e),()=>t(null)));async function mo(e){let t=e.createReader(),n=[];for(;;){let e=await new Promise(e=>t.readEntries(t=>e(t),()=>e([])));if(!e.length)return n;n.push(...e)}}async function ho(e){let t=[];for(let n of Array.from(e)){let e=n.webkitGetAsEntry?.();e&&t.push(e)}if(!t.length)return[];let n=[],r=t.map(e=>({entry:e,path:e.name})),i=0;for(;r.length&&i<6e4;){let{entry:e,path:t}=r.shift();if(i++,co.test(t))continue;if(e.isDirectory){for(let n of await mo(e))r.push({entry:n,path:`${t}/${n.name}`});continue}if(!e.isFile)continue;let a=await po(e);a&&(Object.defineProperty(a,"webkitRelativePath",{value:t,configurable:!0}),n.push(a))}return n}var go=101010256,_o=101075792,vo=117853008,yo=33639248,bo=(e,t)=>e.getUint16(t,!0),xo=(e,t)=>e.getUint32(t,!0),So=(e,t)=>Number(e.getBigUint64(t,!0)),Co=async(e,t,n)=>new DataView(await e.slice(t,n).arrayBuffer());async function wo(e){let t=Math.min(e.size,65557),n=await Co(e,e.size-t,e.size);for(let r=n.byteLength-22;r>=0;r--){if(xo(n,r)!==go)continue;let i=e.size-t+r,a=bo(n,r+10),o=xo(n,r+12),s=xo(n,r+16);if(a===65535||s===4294967295){let t=i-20;if(t>=0){let n=await Co(e,t,t+20);if(xo(n,0)===vo){let t=So(n,8),r=await Co(e,t,t+56);xo(r,0)===_o&&(a=So(r,32),o=So(r,40),s=So(r,48))}}}return{entries:a,cdSize:o,cdOffset:s}}return null}async function To(e){let t=await wo(e);if(!t||!t.cdSize)return null;let n=await Co(e,t.cdOffset,t.cdOffset+t.cdSize),r=new TextDecoder,i=[],a=0;for(;a+46<=n.byteLength&&xo(n,a)===yo;){let e=bo(n,a+10),t=xo(n,a+20),o=xo(n,a+24),s=bo(n,a+28),c=bo(n,a+30),l=bo(n,a+32),u=xo(n,a+42),d=r.decode(new Uint8Array(n.buffer,n.byteOffset+a+46,s));if(o===4294967295||t===4294967295||u===4294967295){let e=a+46+s,r=e+c;for(;e+4<=r;){let r=bo(n,e),i=bo(n,e+2);if(r===1){let r=e+4;o===4294967295&&(o=So(n,r),r+=8),t===4294967295&&(t=So(n,r),r+=8),u===4294967295&&(u=So(n,r));break}e+=4+i}}d.endsWith(`/`)||i.push({path:d,size:o,compSize:t,method:e,offset:u}),a+=46+s+c+l}return i}function Eo(e){return e.replace(/\\/g,`/`).split(`/`).filter(e=>e&&e!==`.`&&e!==`..`).join(`/`)}async function Do(e,t){let n=await Co(e,t.offset,t.offset+30),r=t.offset+30+bo(n,26)+bo(n,28),i=e.slice(r,r+t.compSize);if(t.method===0)return i;if(t.method!==8)return null;try{let e=i.stream().pipeThrough(new DecompressionStream(`deflate-raw`));return await new Response(e).blob()}catch{return null}}async function Oo(e,t){let n=await Do(e,t);return n?n.text():null}async function ko(e){let t=await To(e);if(!t)throw Error(`That file is not a readable .zip archive.`);let n=t.filter(e=>!e.path.startsWith(`__MACOSX/`)&&!/(^|\/)\._/.test(e.path)),r=n[0]?.path.split(`/`)[0],i=!!r&&n.every(e=>e.path.startsWith(`${r}/`)),a=i?r:e.name.replace(/\.zip$/i,``)||`your project`,o=e=>i?e.slice(r.length+1):e,s=n.map(e=>({...e,path:Eo(o(e.path))})).filter(e=>e.path),c=s.reduce((e,t)=>e+t.size,0);if(c>2*1024**3)throw Error(`This archive unpacks to ${Math.round(c/1024**3)} GB — more than a browser tab can hold. Drop the built site only (its dist/ or build/ folder).`);if(s.length>6e4)throw Error(`This archive holds ${s.length.toLocaleString()} files — more than a browser tab can hold. Drop the built site only (its dist/ or build/ folder).`);return{rootName:a,entries:s,readBlob:t=>Do(e,t),readText:t=>Oo(e,t)}}var Ao=e=>/\.zip$/i.test(e.name)||e.type===`application/zip`||e.type===`application/x-zip-compressed`;async function jo(e){let{entries:t,rootName:n}=e,r=null,i=t.find(e=>e.path===`package.json`);if(i)try{r=JSON.parse(await e.readText(i)||``)}catch{}let{take:a,skipped:o}=fo(t),s=[];for(let t of a){let n=await e.readText(t);n!==null&&s.push({path:t.path,content:n})}return{files:s,pkg:r,skipped:o,rootName:n}}function Mo(e,t=`your project`){let n=e=>{let t=e.webkitRelativePath||e.name,n=t.indexOf(`/`);return n>=0?t.slice(n+1):t},r=e[0]?.webkitRelativePath?.split(`/`)[0],i=new Map;for(let t of e)i.set(n(t),t);let a=[...i.entries()].filter(([e])=>e&&!e.startsWith(`__MACOSX/`)&&!/(^|\/)\._/.test(e)).map(([e,t])=>({path:e,size:t.size,compSize:t.size,method:0,offset:0}));return{rootName:r||t,entries:a,readBlob:async e=>i.get(e.path)??null,readText:async e=>await i.get(e.path)?.text()??null}}var No=e=>`--us-v${e}`,Po=class e{byKey=new Map;seq=0;refs=new Map;ref(e){this.refs.set(e,(this.refs.get(e)??0)+1)}entries=[];add(e,t,n){let r=Fo(e,t),i=`${e} ${r}`,a=this.byKey.get(i);return a||(a={id:this.entries.length+1,kind:e,value:r,count:0,sites:[]},this.byKey.set(i,a),this.entries.push(a)),a.count++,n.seq===void 0&&(n.seq=++this.seq),a.sites.length<25&&a.sites.push(n),`var(${No(a.id)})`}find(e,t){return this.byKey.get(`${e} ${Fo(e,t)}`)}get(e){return this.entries[e-1]}ofKind(e){return this.entries.filter(t=>t.kind===e)}identityVars(){let e={};for(let t of this.entries)e[No(t.id)]=Io(t.value);return e}toJSON(){return{entries:this.entries,refs:Object.fromEntries(this.refs)}}static fromJSON(t){let n=new e;for(let[e,r]of Object.entries(t.refs??{}))n.refs.set(e,r);for(let e of t.entries){let t={...e,sites:[...e.sites]};n.entries.push(t),n.byKey.set(`${e.kind} ${e.value}`,t)}return n}};function Fo(e,t){let n=t.trim().replace(/\s+/g,` `);if(e===`font-family`)return n=n.split(`,`).map(e=>e.trim()).filter(Boolean).join(`, `),n;if(e===`svg`)return n;if(n=n.toLowerCase().replace(/\s*,\s*/g,`, `).replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`),e===`color`){if(n.startsWith(`hsl:`))return`hsl:`+n.slice(4).trim();let e=n.match(/^#([0-9a-f]{3,4})$/);e&&(n=`#`+e[1].split(``).map(e=>e+e).join(``))}return n}var Io=e=>e.startsWith(`hsl:`)?e.slice(4):e;function Lo(e,t,n){if(t.entries.length<=n)return;let r=e.getElementById(`us-vars`);r||(r=e.createElement(`style`),r.id=`us-vars`,(e.head??e.documentElement).prepend(r));let i=t.entries.slice(n).map(e=>`${No(e.id)}:${Io(e.value)}`).join(`;`),a=(r.textContent??``).replace(/^\s*:root\s*\{/,``).replace(/\}\s*$/,``);r.textContent=`:root{${a}${a?`;`:``}${i}}`}function Ro(e){let t=[],n=e.length,r=[],i=[],a=0,o=()=>{if(e.startsWith(`/*`,a)){let t=e.indexOf(`*/`,a+2);return a=t<0?n:t+2,!0}return!1},s=()=>{let t=e[a];if(t!==`"`&&t!==`'`)return!1;for(a++;a<n&&e[a]!==t;)e[a]===`\\`&&a++,a++;return a++,!0},c=()=>{if(!/^url\(/i.test(e.slice(a,a+4)))return!1;for(a+=4;a<n&&e[a]!==`)`;){if(e[a]===`\\`)a++;else if(e[a]===`"`||e[a]===`'`){s();continue}a++}return a++,!0},l=()=>e[a]===`\\`&&(a+=2,!0);for(;a<n;){if(o()||s()||l())continue;let u=e[a];if(u===`}`){r.pop(),i.pop(),a++;continue}if(/\s/.test(u)||u===`;`){a++;continue}let d=a,f=0,p=-1,m=``;for(;a<n;){if(o()||s()||c()||l())continue;let t=e[a];if(t===`(`)f++;else if(t===`)`)f=Math.max(0,f-1);else if(f===0){if(t===`:`&&p<0)p=a;else if(t===`{`||t===`;`||t===`}`){m=t;break}}a++}let h=e.slice(d,a);if(m===`{`){let e=h.match(/^@([\w-]+)/);r.push(e?e[1].toLowerCase():``),i.push(e?``:h.trim().replace(/\s+/g,` `)),a++;continue}if(r.length>0&&p>0){let n=e.slice(d,p).trim().toLowerCase(),o=p+1;for(;o<a&&/\s/.test(e[o]);)o++;let s=a;for(;s>o&&/\s/.test(e[s-1]);)s--;if(/^[-\w]+$/.test(n)&&s>o){let e=[...i].reverse().find(Boolean)??``;t.push({prop:n,valueStart:o,valueEnd:s,atRules:r.filter(Boolean),selector:e})}}m===`}`&&(r.pop(),i.pop()),m&&a++}return t}var zo=new Set(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`)),Bo=/^(color|background|background-color|background-image|border|border-(top|right|bottom|left|block|inline)(-(start|end))?|border(-\w+)?-color|outline|outline-color|box-shadow|text-shadow|fill|stroke|text-decoration|text-decoration-color|text-emphasis-color|caret-color|accent-color|column-rule|column-rule-color|scrollbar-color|-webkit-text-fill-color|-webkit-text-stroke-color)$/,Vo=/^(border-radius|border-(top|bottom)-(left|right)-radius|border-(start|end)-(start|end)-radius)$/,Ho=/^(border-width|border-(top|right|bottom|left|block|inline)(-(start|end))?-width|outline-width|column-rule-width)$/,Uo=/^(border|border-(top|right|bottom|left|block|inline)(-(start|end))?|outline|column-rule)$/,Wo=/^(transition|transition-duration|animation|animation-duration)$/,Go=/(?<![\w.#-])(\d*\.?\d+)(ms|s)(?![\w%])/g,Ko=/^(padding|margin|padding-(top|right|bottom|left|block|inline)(-(start|end))?|margin-(top|right|bottom|left|block|inline)(-(start|end))?|gap|row-gap|column-gap|grid-gap|grid-row-gap|grid-column-gap)$/,qo=/^(antialiased|subpixel-antialiased|grayscale|auto|none|normal|italic|oblique|smaller|larger|inherit|initial|unset|small-caps|swap|block|fallback|optional)$/i,Jo=[[/radius|rounded/i,`radius`],[/line-?height|leading/i,`line-height`],[/letter-?spacing|tracking/i,`letter-spacing`],[/font-?weight|(^|-)weight(-|$)/i,`font-weight`],[/border-?width|stroke-?width|(^|-)bw(-|$)/i,`border-width`],[/duration|(^|-)dur(-|$)|transition|(^|-)ease-?time/i,`duration`],[/font-?family|typeface|(^|-)ff(-|$)|(^|-)font(-|$)|font-(sans|serif|mono|display|heading|body)/i,`font-family`],[/font-?size|text-(xs|sm|base|md|lg|xl|\dxl)|(^|-)fs-|type-scale/i,`font-size`],[/spac(e|ing)|gap|padding|margin|(^|-)pad|inset|size-\d/i,`space`],[/shadow|elevation/i,`shadow`]],Yo=/(?<![\w.#-])(-?\d*\.?\d+)(px|rem|em)(?![\w%])/g,Xo=/#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3,4})\b/gi,Zo=/\b(?:rgba?|hsla?|hwb|oklch|oklab|lch|lab|color)\((?:[^()]|\([^()]*\))*\)/gi,Qo=/(?<![\w-])([a-z]{3,20})(?![\w-])/gi;function $o(e){let t=e.replace(Zo,` `).replace(Xo,` `).match(/(?<![\w.#-])-?\d*\.?\d+(px|rem|em)?(?![\w%])/g);return(t?.length??0)<2?!1:t.some(e=>/(px|rem|em)$/.test(e))}var es=/^-(moz|o|ms)-[a-z-]*\(/i;function ts(e){let t=``,n=0,r=e.length;for(;n<r;){let i=e[n];if(i===`-`&&es.test(e.slice(n,n+40))){let i=0,a=n;for(;a<r;a++)if(e[a]===`(`)i++;else if(e[a]===`)`&&(i--,i===0))break;t+=` `.repeat(Math.min(a+1,r)-n),n=Math.min(a+1,r)}else if(i===`"`||i===`'`){let a=i,o=n+1;for(;o<r&&e[o]!==a;)e[o]===`\\`&&o++,o++;t+=` `.repeat(Math.min(o+1,r)-n),n=Math.min(o+1,r)}else if(/^url\(/i.test(e.slice(n,n+4))){let i=e.indexOf(`)`,n);i<0&&(i=r-1),t+=` `.repeat(i+1-n),n=i+1}else t+=i,n++}return t}var ns=/^(rgba?|hsla?)\(\s*((?:\d*\.?\d+%?)(?:\s*,\s*|\s+)(?:\d*\.?\d+%?)(?:\s*,\s*|\s+)(?:\d*\.?\d+%?))\s*(?:\/|,)\s*var\(/i;function rs(e,t,n){let r=[];for(let n of t.matchAll(Zo)){let t=e.slice(n.index,n.index+n[0].length),i=t.match(ns);if(i){let e=t.indexOf(i[2]);r.push({start:n.index+e,end:n.index+e+i[2].length,kind:`color`,raw:(i[1].toLowerCase().startsWith(`hsl`)?`hsl:`:``)+i[2]});continue}r.push({start:n.index,end:n.index+n[0].length,kind:`color`,raw:t})}for(let e of t.matchAll(Xo))r.push({start:e.index,end:e.index+e[0].length,kind:`color`,raw:e[0]});if(n)for(let e of t.matchAll(Qo)){let t=e[1].toLowerCase();zo.has(t)&&r.push({start:e.index,end:e.index+t.length,kind:`color`,raw:e[1]})}return ds(r.filter(e=>!/var\(/i.test(e.raw)))}function is(e,t,n={}){let r=[];for(let i of e.matchAll(Yo)){let e=parseFloat(i[1]);e!==0&&(n.skipPill&&(i[2]===`px`&&e>=100||i[2]!==`px`&&e>=6)||r.push({start:i.index,end:i.index+i[0].length,kind:t,raw:i[0]}))}return r}function as(e){let t=[];for(let n of e.matchAll(/(?<![\w.#-])(\d*\.?\d+)(px|rem|em|%)?(?![\w%])/g))n[2]!==`%`&&(parseFloat(n[1])<=0||t.push({start:n.index,end:n.index+n[0].length,kind:`line-height`,raw:n[0]}));return t}function os(e){let t=[];for(let n of e.matchAll(/(?<![\w-])(?:([1-9]00)|(bold|normal))(?![\w-])/gi))t.push({start:n.index,end:n.index+n[0].length,kind:`font-weight`,raw:n[0]});return t}function ss(e){let t=[];for(let n of e.matchAll(Go))parseFloat(n[1])!==0&&t.push({start:n.index,end:n.index+n[0].length,kind:`duration`,raw:n[0]});return t}var cs=/((?:repeating-)?(?:linear|conic)-gradient\(\s*(?:from\s+)?)(-?\d*\.?\d+(?:deg|turn|rad|grad)|to\s+(?:top|right|bottom|left))(?=\s*,)/gi;function ls(e){let t=[];for(let n of e.matchAll(cs)){let e=n.index+n[1].length;t.push({start:e,end:e+n[2].length,kind:`angle`,raw:n[2]})}return t}var us=/(linear|conic)-gradient\(/i;function ds(e){e.sort((e,t)=>e.start-t.start||t.end-e.end);let t=[],n=-1;for(let r of e)r.start<n||(t.push(r),n=r.end);return t}var fs=/^(inherit|initial|unset|revert|revert-layer|none|auto|transparent|currentcolor|0)$/i;function ps(e,t){let n=t.match(/(?<![\w.-])(\d*\.?\d+)(px|rem|em|%)(\/([\w.%]+))?\s/);if(!n||n.index===void 0)return[];let r=[],i=t.slice(0,n.index).match(/(?<![\w-])(?:([1-9]00)|(bold))(?![\w-])/i);if(i&&i.index!==void 0&&r.push({start:i.index,end:i.index+i[0].length,kind:`font-weight`,raw:i[0]}),n[2]!==`%`&&r.push({start:n.index,end:n.index+n[1].length+n[2].length,kind:`font-size`,raw:n[1]+n[2]}),n[4]&&/^\d*\.?\d+(px|rem|em)?$/.test(n[4])&&n[4]!==`normal`){let e=n.index+n[1].length+n[2].length+1;r.push({start:e,end:e+n[4].length,kind:`line-height`,raw:n[4]})}let a=n.index+n[0].length;for(;a<e.length&&/\s/.test(e[a]);)a++;let o=e.slice(a);return a<e.length&&!/var\(/i.test(o)&&r.push({start:a,end:e.length,kind:`font-family`,raw:o}),r}var ms=/url\((?:"(data:image\/svg\+xml[^"]*)"|'(data:image\/svg\+xml[^']*)'|(data:image\/svg\+xml[^)]*))\)/gi,hs=/%23[0-9a-f]{3,8}|#[0-9a-f]{3,8}|(fill|stroke|stop-color)=['"]?(?!none|currentcolor)[a-z]{3,}/i;function gs(e){let t=[];for(let n of e.matchAll(ms)){let e=n[1]??n[2]??n[3]??``;hs.test(e)&&t.push({start:n.index,end:n.index+n[0].length,kind:`svg`,raw:n[0]})}return t}function _s(e,t){let n=t.match(/\s*!\s*important\s*$/i);if(n){let r=t.slice(0,n.index);return _s(e,r).filter(e=>e.end<=r.length)}let r=ts(t),i=r.trim().toLowerCase(),a=/data:image\/svg\+xml/i.test(t)?gs(t):[];if(fs.test(i)||/(^|[\s,:(])(repeating-)?linear-gradient\(\s*(top|bottom|left|right)(\s+(top|bottom|left|right))?\s*,/i.test(r)||/\\[09]\s*$/.test(t.trim())||/(^|[\s,(])-(moz|o|ms)-[a-z-]*\(/i.test(t)||/(^|[\s,/(])(inherit|initial|unset|revert|revert-layer)(?=$|[\s,/)])/i.test(i)||i.startsWith(`var(`)&&!/,/.test(i))return[];if(e.startsWith(`--`)){let n=[...a,...us.test(r)?ls(r):[],...rs(t,r,!1)];if(/shadow|elevation/i.test(e)&&$o(i))return[...n,{start:0,end:t.length,kind:`shadow`,raw:t}];if(n.length)return n;if(/^\d{1,3}(\s*,\s*|\s+)\d{1,3}(\s*,\s*|\s+)\d{1,3}$/.test(i))return[{start:0,end:t.length,kind:`color`,raw:t}];if(/^-?\d*\.?\d+(deg)?\s+\d*\.?\d+%\s+\d*\.?\d+%$/.test(i))return[{start:0,end:t.length,kind:`color`,raw:`hsl:`+t}];for(let[n,a]of Jo)if(n.test(e))return a===`font-family`?/^-?[a-z"'][^;{}()]*$/i.test(t.trim())&&!/var\(/i.test(r)&&!/^(normal|bold|\d{3})/.test(i)&&!qo.test(i)?[{start:0,end:t.length,kind:`font-family`,raw:t}]:[]:a===`shadow`?/\d(px|rem|em)|\b0\b/.test(i)?[{start:0,end:t.length,kind:`shadow`,raw:t}]:[]:a===`line-height`?as(r):a===`font-weight`?os(r):a===`duration`?ss(r):a===`letter-spacing`?is(r,`letter-spacing`):is(r,a,{skipPill:a===`radius`});return[]}return e===`font`?ps(t,r):e===`line-height`?as(r):e===`letter-spacing`||e===`word-spacing`?is(r,`letter-spacing`):e===`font-weight`?os(r):Ho.test(e)?is(r,`border-width`):Wo.test(e)?ss(r):Uo.test(e)?[...is(r,`border-width`).slice(0,1),...rs(t,r,!0)]:e===`font-family`?/var\(/i.test(r)?[]:[{start:0,end:t.length,kind:`font-family`,raw:t}]:e===`font-size`?is(r,`font-size`):Vo.test(e)?is(r,`radius`,{skipPill:!0}):Ko.test(e)?is(r,`space`):e===`box-shadow`?[...rs(t,r,!0),{start:0,end:t.length,kind:`shadow`,raw:t}]:Bo.test(e)||/^(mask|mask-image|-webkit-mask|-webkit-mask-image|list-style|list-style-image|content)$/.test(e)?[...a,...us.test(r)?ls(r):[],...rs(t,r,!0)]:[]}var vs=new Set([`font-face`,`property`,`counter-style`,`page`,`import`,`charset`,`namespace`]);function ys(e,t,n,r={}){let i=r.mode===`values`;if(i&&r.cache){let t=r.cache.get(e);if(t!==void 0)return t}let a=(e,n)=>{let i=t.find(e,n);if(!i)return null;let a=r.vars?.[No(i.id)];return a===void 0||a===Io(i.value)?null:a};if(!i)for(let n of e.matchAll(/var\(\s*(--[\w-]+)/g))t.ref(n[1]);let o=Ro(e),s=[];for(let r of o){if(r.atRules.some(e=>vs.has(e)))continue;let o=e.slice(r.valueStart,r.valueEnd),c=_s(r.prop,o);if(!c.length)continue;let l=r.selector?{file:n,prop:r.prop,selector:r.selector}:{file:n,prop:r.prop},u=c.filter(e=>e.start!==0||e.end!==o.length),d=c.filter(e=>e.start===0&&e.end===o.length);if(i){let e=ds(u).map(e=>({s:e,to:a(e.kind,e.raw)})).filter(e=>e.to!==null);if(!e.length&&!d.length)continue;let t=o;for(let{s:n,to:r}of e.reverse())t=t.slice(0,n.start)+r+t.slice(n.end);if(!e.length&&d.length){let e=a(d[0].kind,d[0].raw);if(e===null)continue;t=e}s.push({start:r.valueStart,end:r.valueEnd,text:t});continue}let f=ds(u).map(e=>({s:e,ref:t.add(e.kind,e.raw,l)})),p=o;for(let{s:e,ref:t}of f.reverse())p=p.slice(0,e.start)+t+p.slice(e.end);if(d.length&&!/var\(--(?!us-v)/i.test(p)){let e=d[0];p=t.add(e.kind,(e.raw.startsWith(`hsl:`)?`hsl:`:``)+p,l)}s.push({start:r.valueStart,end:r.valueEnd,text:p})}if(!s.length)return e;let c=e;for(let e of s.sort((e,t)=>t.start-e.start))c=c.slice(0,e.start)+e.text+c.slice(e.end);return i&&r.cache&&r.cache.size<400&&r.cache.set(e,c),c}function bs(e,t,n,r={}){return ys(`x{${e}}`,t,n,r).slice(2,-1)}function xs(e){return e.replace(/<link\b[^>]*>/gi,e=>/\bintegrity\s*=/i.test(e)?e.replace(/\s+integrity\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/i,``):e)}function Ss(e){return e.replace(/<link\b[^>]*>/gi,e=>/rel\s*=\s*["']?stylesheet/i.test(e)?e.replace(/\shref\s*=\s*(["'])((?:https?:)?\/\/[^"']+)\1/i,(e,t,n)=>{let r=n.startsWith(`//`)?`https:`+n:n;return` href=${t}/__ext/?u=${encodeURIComponent(r)}${t} data-us-ext=${t}${r}${t}`}):e)}function Cs(e,t,n,r={}){let i=r.mode===`values`?e:Ss(xs(e));return i=i.replace(/(<style\b[^>]*>)([\s\S]*?)(<\/style>)/gi,(e,i,a,o)=>i+ys(a,t,n,r)+o),i=i.replace(/(<[a-zA-Z][^>]*?\sstyle=)("([^"]*)"|'([^']*)')/g,(e,i,a,o,s)=>{let c=o??s??``;if(!c.trim())return e;let l=o===void 0?`'`:`"`,u=bs(c,t,n,r);return i+l+u+l}),i}var ws=(e,t)=>e.some(e=>t.test(e)),Ts=(e,t)=>e.filter(e=>t.test(e)).length;function Es(e,t,n=[]){let r=[],i=n.find(e=>/(^|\/)package\.json$/.test(e.path))?.head??``,a=n.some(e=>/(^|\/)style\.css$/.test(e.path)&&/Theme Name:/i.test(e.head))||ws(e,/(^|\/)(functions\.php|theme\.json)$/)&&ws(e,/\.php$/),o=/"electron"/.test(i),s=n.filter(e=>/\.html?$/i.test(e.path)),c=/<script[^>]+type=["']module["'][^>]*\ssrc=["'](?:\.?\/)?(?:src|app|client|source)\/[^"']+\.(?:[cm]?[jt]sx?|vue|svelte)["']/i,l=s.length>0&&s.every(t=>c.test(t.head)||/<script[^>]+src=["'][^"']*flutter(_bootstrap)?\.js["']/i.test(t.head)&&!ws(e,/(^|\/)(main\.dart\.js|flutter_service_worker\.js|flutter_bootstrap\.js)$/)),u=l&&s.some(e=>c.test(e.head)),d=ws(e,/(^|\/)pubspec\.yaml$/)&&!ws(e,/(^|\/)(main\.dart\.js|flutter_service_worker\.js|flutter_bootstrap\.js)$/)&&(!t||l||s.length>0&&s.every(e=>/(^|\/)web\/[^/]+\.html?$/i.test(e.path)||c.test(e.head))),f=n.some(e=>/(^|\/)app\.json$/.test(e.path)&&/"expo"\s*:/.test(e.head))&&/"react-native"/.test(i)&&(l||!t);return t&&!a&&!d&&!f&&!u?o?{kind:`electron`,label:`Electron (web renderer)`,evidence:[`electron in package.json`],renders:!0}:{kind:`web-build`,label:`Web`,evidence:[],renders:!0}:f?{kind:`react-native`,label:`React Native / Expo`,evidence:[`app.json with expo, react-native in package.json`],renders:!1}:d?{kind:`flutter`,label:`Flutter (Dart)`,evidence:[`${Ts(e,/\.dart$/)} Dart files`,`web/index.html is the build template`],renders:!1}:u?{kind:`web-source`,label:`Web source (dev entry, no build)`,evidence:[`index.html loads ${s.find(e=>c.test(e.head)).head.match(c)[0].match(/src=["']([^"']+)/)[1]} — a dev entry, not a build`],renders:!1}:(ws(e,/\.xcodeproj\/|(^|\/)Package\.swift$|\.xcassets\//)||Ts(e,/\.swift$/)>3)&&(r.push(`${Ts(e,/\.swift$/)} Swift files`,`${Ts(e,/\.colorset\/Contents\.json$/)} colour sets`),!ws(e,/pubspec\.yaml$/))?{kind:`ios`,label:`iOS / macOS (Swift)`,evidence:r,renders:!1}:ws(e,/pubspec\.yaml$/)||Ts(e,/\.dart$/)>3?{kind:`flutter`,label:`Flutter (Dart)`,evidence:[`${Ts(e,/\.dart$/)} Dart files`],renders:!1}:ws(e,/AndroidManifest\.xml$|build\.gradle(\.kts)?$/)||Ts(e,/\.kt$/)>3?{kind:`android`,label:`Android (Kotlin / XML)`,evidence:[`${Ts(e,/\.kt$/)} Kotlin files`,`${Ts(e,/res\/values\/.*\.xml$/)} resource files`],renders:!1}:Ts(e,/\.qml$/)>0||ws(e,/\.pro$|CMakeLists\.txt$/)&&Ts(e,/\.(cpp|h)$/)>3?{kind:`qt`,label:`Qt / QML`,evidence:[`${Ts(e,/\.qml$/)} QML files`],renders:!1}:Ts(e,/\.kv$/)>0?{kind:`kivy`,label:`Kivy (Python)`,evidence:[`${Ts(e,/\.kv$/)} kv files`],renders:!1}:a?{kind:`web-source`,label:`WordPress theme`,evidence:[`style.css with a Theme Name header`,`${Ts(e,/\.php$/)} PHP templates`],renders:!1}:Ts(e,/\.(css|scss|less)$/)>0?{kind:`web-source`,label:`Web source (no built page)`,evidence:[`${Ts(e,/\.(css|scss|less)$/)} stylesheets, no index.html`],renders:!1}:Ts(e,/\.py$/)>3?{kind:`python-gui`,label:`Python`,evidence:[`${Ts(e,/\.py$/)} Python files`],renders:!1}:{kind:`unknown`,label:`Unknown`,evidence:[],renders:!1}}function Ds(e,t){switch(e.kind){case`ios`:return`This is an iOS/macOS project (${e.evidence.join(`, `)}). No browser can render SwiftUI or UIKit, so the sandbox cannot show it 1:1 — and it will not show you a look-alike. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;case`android`:return`This is an Android project (${e.evidence.join(`, `)}). Compose and XML layouts have no browser render, so the sandbox cannot show it 1:1. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;case`flutter`:return`This is a Flutter project (${e.evidence.join(`, `)}). A Flutter WEB build renders here — run \`flutter build web\` and drop build/web/; the Dart source alone cannot.`;case`react-native`:return`This is a React Native / Expo project (${e.evidence.join(`, `)}). Native views have no browser render; a WEB export does — run \`npx expo export -p web\` (or \`expo build:web\`) and drop the dist/ folder.`;case`qt`:return`This is a Qt/QML project. There is no browser render for QML, so the sandbox cannot show it 1:1. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;case`kivy`:return`This is a Kivy (Python) project. There is no browser render for kv layouts, so the sandbox cannot show it 1:1. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;case`python-gui`:return`This looks like a Python project without a web build. The sandbox renders web builds only. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;case`web-source`:return`This is web SOURCE without a built page (${e.evidence.join(`, `)}). Build it first — \`npm run build\`, or for a WordPress theme a static export of the site — then drop the output folder (dist/, build/ or out/).`;case`unknown`:return`No index.html and nothing the sandbox can render was found in these ${t.files} files. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`;default:return`This archive has no page the sandbox can open. Drop a BUILT web app instead — its dist/, build/ or out/ folder with an index.html — and it renders exactly as deployed.`}}var Os=[/\[(data-[\w-]*(?:theme|mode|scheme|color-mode|appearance)[\w-]*)\s*=\s*["']?dark["']?\]/gi,/\[(theme)\s*=\s*["']?dark["']?\]/gi],ks=/(?:^|[\s,}])(?:html|body|:root)?\.(dark|theme-dark|dark-mode|dark-theme|is-dark)\b/gi;function As(e,t){/prefers-color-scheme\s*:\s*dark/i.test(e)&&(t.media=!0);for(let n of Os)for(let r of e.matchAll(n)){let n=r[1].toLowerCase();if(!t.hooks.some(e=>e[0]===n)){let r=RegExp(`\\[${n}\\s*=\\s*["']?light["']?\\]`,`i`).test(e)?`light`:null;t.hooks.push([n,`dark`,r])}}for(let n of e.matchAll(ks)){let r=n[1];if(!t.hooks.some(e=>e[0]===`class`&&e[1]===r)){let n=RegExp(`\\.${r.replace(`dark`,`light`)}\\b`).test(e)&&r!==`dark`?r.replace(`dark`,`light`):r===`dark`&&/\.light\b/.test(e)?`light`:null;t.hooks.push([`class`,r,n])}}}var js=new WeakMap;function Ms(e,t,n){let r=e.documentElement,i=e=>{for(let t of Array.from(e))if(t.media&&typeof t.media.mediaText==`string`){let e=t,r=js.get(e)??e.media.mediaText;if(/prefers-color-scheme/i.test(r)){js.has(e)||js.set(e,r);let t=/prefers-color-scheme\s*:\s*dark/i.test(r),i=n===null?r:n===`dark`===t?`all`:`not all`;if(e.media.mediaText!==i)try{e.media.mediaText=i}catch{}}try{i(e.cssRules)}catch{}}else if(`cssRules`in t)try{i(t.cssRules)}catch{}};for(let t of Array.from(e.styleSheets))try{i(t.cssRules)}catch{}for(let[e,i,a]of t.hooks)if(e===`class`)r.classList.remove(i),a&&r.classList.remove(a),n===`dark`?r.classList.add(i):n===`light`&&a&&r.classList.add(a);else{let t=r.getAttribute(`data-us-prev-${e}`);if(n===null){t!==null&&(t===``?r.removeAttribute(e):r.setAttribute(e,t),r.removeAttribute(`data-us-prev-${e}`));continue}t===null&&r.setAttribute(`data-us-prev-${e}`,r.getAttribute(e)??``),r.setAttribute(e,n===`dark`?i:a??`light`)}r.style.colorScheme=n??``}var Ns={html:`text/html; charset=utf-8`,htm:`text/html; charset=utf-8`,css:`text/css; charset=utf-8`,js:`text/javascript; charset=utf-8`,mjs:`text/javascript; charset=utf-8`,cjs:`text/javascript; charset=utf-8`,json:`application/json`,map:`application/json`,webmanifest:`application/manifest+json`,svg:`image/svg+xml`,png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,avif:`image/avif`,ico:`image/x-icon`,woff:`font/woff`,woff2:`font/woff2`,ttf:`font/ttf`,otf:`font/otf`,eot:`application/vnd.ms-fontobject`,txt:`text/plain; charset=utf-8`,xml:`application/xml`,wasm:`application/wasm`,mp4:`video/mp4`,webm:`video/webm`,mp3:`audio/mpeg`,ogg:`audio/ogg`,pdf:`application/pdf`},Ps=e=>Ns[e.split(`.`).pop()?.toLowerCase()??``]??`application/octet-stream`,Fs=/^(dist|build|out|public|_site|www|docs|site|htdocs|export|release)$/i,Is=/(^|\/)(node_modules|src|\.git|test|tests|__tests__|coverage|\.next|\.nuxt|storybook-static)(\/|$)/;function Ls(e){let t=new Set;for(let n of e){if(!/(^|\/)index\.html?$/i.test(n))continue;let e=n.includes(`/`)?n.slice(0,n.lastIndexOf(`/`)):``;Is.test(e)||t.add(e)}let n=e=>{let t=e?e.split(`/`).length:0,n=e.split(`/`).pop()??``;return t*10-(Fs.test(n)?15:0)};return[...t].sort((e,t)=>n(e)-n(t)||e.localeCompare(t))}var Rs=e=>e.replace(/(^|\/)index\.html?$/i,`$1\0`);function zs(e,t,n){for(let r of e.matchAll(/(?:src|href)=["'](\/[^"'?#]+\.(?:js|mjs|css))["']/gi)){let e=r[1].slice(1);if(t.has(e)){n.set(``,(n.get(``)??0)+1);continue}let i=e.split(`/`);for(let e=1;e<i.length&&e<=3;e++)if(t.has(i.slice(e).join(`/`))){let t=i.slice(0,e).join(`/`);n.set(t,(n.get(t)??0)+1);break}}}var Bs=0,Vs=()=>`p${Date.now().toString(36)}${(Bs++).toString(36)}`;async function Hs(e,t={}){let n=e.entries.map(e=>e.path),r=[],i=0;for(let t of e.entries)if(/(^|\/)(package\.json|style\.css|app\.json|pubspec\.yaml)$/.test(t.path)&&t.size<2e5){let n=await e.readText(t);n&&r.push({path:t.path,head:n.slice(0,2e3)})}else if(/\.html?$/i.test(t.path)&&t.size<2e5&&i<80&&!/(^|\/)node_modules\//.test(t.path)){let n=await e.readText(t);n&&(r.push({path:t.path,head:n.slice(0,4e3)}),i++)}let a=n.some(e=>/\.html?$/i.test(e)&&!/(^|\/)(node_modules|tests?|__tests__|mocks?)\//i.test(e)),o=Es(n,a,r),s=o.renders||o.kind===`unknown`||o.kind===`web-source`&&!r.some(e=>/Theme Name:/i.test(e.head))?Ls(n):[],c=/(^|\/)(node_modules|tests?|__tests__|mocks?|fixtures?)\//i,l=e=>n.filter(t=>/\.html?$/i.test(t)&&!c.test(t)&&(e===``||t.startsWith(e+`/`))).length,u=s[0],d=u!==void 0&&!u.includes(`/`)&&/^(dist|build|out|_site|public)$/i.test(u),f=u!==void 0&&u!==``&&l(``)>=3*Math.max(1,l(u))&&!d;f&&!s.includes(``)&&s.unshift(``);let p=t.root??(f?``:s[0])??``,m=p?`${p}/`:``,h=e.entries.filter(e=>e.path.startsWith(m)&&!/(^|\/)(node_modules|\.git)\//.test(e.path)),g=new Map,_=new Map,v=new Set,y=new Set(h.map(e=>e.path.slice(m.length))),b=new Map,x=new Po,S={media:!1,hooks:[]},C=0,w=0,T=e=>/\.css$/i.test(e.path)?0:/\.html?$/i.test(e.path)?1:2,E=[...h].sort((e,t)=>T(e)-T(t)||e.path.localeCompare(t.path));for(let n of E){let r=n.path.slice(m.length),i=await e.readBlob(n);if(w++,t.onProgress?.(w,E.length,C),!i)continue;let a=Ps(r);if(g.set(r,{blob:i,type:a}),/\.css$/i.test(r)&&i.size<=25165824){let e=await i.text();C+=e.length,As(e,S),_.set(r,{blob:new Blob([ys(e,x,r)],{type:a}),type:a})}else if(/\.html?$/i.test(r)&&i.size<=8388608){let e=await i.text();/<meta[^>]+http-equiv=["']?refresh["']?[^>]*>/i.test(e)&&e.length<4e3&&v.add(r),zs(e,y,b);for(let t of e.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi))C+=t[1].length,As(t[1],S);g.set(r,{blob:new Blob([xs(e)],{type:a}),type:a}),_.set(r,{blob:new Blob([Cs(e,x,r)],{type:a}),type:a})}else _.set(r,{blob:i,type:a})}let D=/(^|\/)(404|500|200|_not-found|_error|offline)(\.html?|\/index\.html?)$/i,O=/(^|\/)(tests?|__tests__|mocks?|fixtures?|spec|e2e|cypress|playwright|storybook-static|coverage)\//i,k=[...g.keys()].filter(e=>/\.html?$/i.test(e)&&!D.test(e)&&!O.test(e)&&!v.has(e)).sort((e,t)=>Rs(e).localeCompare(Rs(t))).map(e=>({path:e,label:`/`+e.replace(/(^|\/)index\.html?$/i,``).replace(/\.html?$/i,``),source:`file`})).map(e=>({...e,label:e.label===`/`?`/`:e.label.replace(/\/$/,``)||`/`})),A=Es(n,k.length>0||a,r),j=[...b.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??``;return{id:Vs(),name:e.rootName,root:p,base:j,candidates:s,screens:A.renders?k:[],raw:g,rewritten:_,table:x,cssBytes:C,platform:A,scheme:S,archive:e}}function Us(e){return`<style id="us-vars">:root{${Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}}</style>`}function Ws(){return`<script id="us-guard">(function(){try{var sw=navigator.serviceWorker;if(!sw)return;sw.register=function(){return Promise.reject(new DOMException('UISandbox: a page inside the sandbox cannot register its own service worker.','SecurityError'))};var R=window.ServiceWorkerRegistration;if(R&&R.prototype)R.prototype.unregister=function(){return Promise.resolve(false)}}catch(e){}})()<\/script>`}function Gs(e){let t=Ws();return/<head[^>]*>/i.test(e)?e.replace(/<head[^>]*>/i,e=>e+t):/<html[^>]*>/i.test(e)?e.replace(/<html[^>]*>/i,e=>e+`<head>${t}</head>`):t+e}function Ks(e){return`<script id="us-hook">(function(){try{var SID=${JSON.stringify(e)};if(!window.Polymer)window.Polymer={useNativeCSSProperties:true};var P=CSSStyleSheet.prototype;var rw=function(t){try{var f=window.parent&&window.parent.__usRewriteRule;return f?f(String(t),window,SID):t}catch(e){return t}};var ins=P.insertRule;P.insertRule=function(r,i){return ins.call(this,rw(r),i)};if(P.replaceSync){var rs=P.replaceSync;P.replaceSync=function(t){return rs.call(this,rw(t))}}if(P.replace){var rp=P.replace;P.replace=function(t){return rp.call(this,rw(t))}}}catch(e){}})()<\/script>`}function qs(e,t,n){e=e.replace(/<meta[^>]+http-equiv=["']?content-security-policy(-report-only)?["']?[^>]*>/gi,``);let r=Ws()+Us(t)+Ks(n);return/<head[^>]*>/i.test(e)?e.replace(/<head[^>]*>/i,e=>e+r):/<html[^>]*>/i.test(e)?e.replace(/<html[^>]*>/i,e=>e+`<head>${r}</head>`):r+e}function Js(e,t){let n=new Set(t.map(e=>e.label)),r=new Map;for(let t of Array.from(e.querySelectorAll(`a[href]`))){let i=t.getAttribute(`href`)??``;if(!i||i.startsWith(`#`)||/^(mailto:|tel:|javascript:)/i.test(i))continue;let a;try{a=new URL(i,e.baseURI)}catch{continue}if(a.origin!==e.location.origin)continue;let o=a.pathname.replace(/^\/__sb\/[^/]+\//,`/`);if(/\.[a-z0-9]{2,5}$/i.test(o))continue;o=o.replace(/\/+$/,``)||`/`;let s=o;n.has(s)||r.has(s)||r.set(s,{path:o.replace(/^\//,``),label:s,source:`link`})}return[...r.values()].sort((e,t)=>e.label.localeCompare(t.label))}async function Ys(e,t){if(e.raw.has(t))return!0;let n=e.archive.entries.find(e=>e.path===t);if(!n)return!1;let r=await e.archive.readBlob(n);if(!r)return!1;let i=Ps(t);if(e.raw.set(t,{blob:r,type:i}),/\.css$/i.test(t)){let n=await r.text();e.rewritten.set(t,{blob:new Blob([ys(n,e.table,t)],{type:i}),type:i})}else if(/\.html?$/i.test(t)){let n=await r.text();e.raw.set(t,{blob:new Blob([xs(n)],{type:i}),type:i}),e.rewritten.set(t,{blob:new Blob([Cs(n,e.table,t)],{type:i}),type:i})}else e.rewritten.set(t,{blob:r,type:i});return!0}function Xs({size:e=16}){return(0,B.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 64 64`,"aria-hidden":`true`,focusable:`false`,children:(0,B.jsx)(`path`,{d:`M64 64H0V0H64V64ZM12 32H32V40H12V52H52V32H32V24H52V12H12V32Z`,fill:`currentColor`,fillRule:`evenodd`})})}function Zs({size:e=15}){return(0,B.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,children:(0,B.jsx)(`path`,{fill:`currentColor`,d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z`})})}function Qs({kind:e}){return(0,B.jsxs)(`svg`,{className:`dropglyph`,width:`132`,height:`56`,viewBox:`0 0 132 56`,"aria-hidden":`true`,focusable:`false`,children:[(0,B.jsxs)(`defs`,{children:[(0,B.jsxs)(`linearGradient`,{id:`dg-item`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,B.jsx)(`stop`,{offset:`0`,stopColor:`var(--app-surface, #fff)`}),(0,B.jsx)(`stop`,{offset:`1`,stopColor:`var(--app-hover, #f4f4f6)`})]}),(0,B.jsx)(`filter`,{id:`dg-shadow`,x:`-20%`,y:`-20%`,width:`140%`,height:`160%`,children:(0,B.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1.8`,floodColor:`#000`,floodOpacity:`.16`})})]}),(0,B.jsx)(`g`,{className:`dropglyph__item`,filter:`url(#dg-shadow)`,children:e===`zip`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{className:`dropglyph__paper`,d:`M9 8h15l8 8v24a2.5 2.5 0 0 1-2.5 2.5H9A2.5 2.5 0 0 1 6.5 40V10.5A2.5 2.5 0 0 1 9 8z`}),(0,B.jsx)(`path`,{className:`dropglyph__fold`,d:`M24 8v8h8`}),(0,B.jsx)(`path`,{className:`dropglyph__zipper`,d:`M14.5 11v17`}),(0,B.jsx)(`rect`,{className:`dropglyph__pull`,x:`11.5`,y:`28`,width:`6`,height:`8`,rx:`1.6`}),(0,B.jsx)(`path`,{className:`dropglyph__pullhole`,d:`M14.5 31.5v2`})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`path`,{className:`dropglyph__paper`,d:`M6.5 14h12l4 4h13a2.5 2.5 0 0 1 2.5 2.5V38a2.5 2.5 0 0 1-2.5 2.5H9A2.5 2.5 0 0 1 6.5 38V14z`}),(0,B.jsx)(`path`,{className:`dropglyph__fold`,d:`M6.5 22h31.5`})]})}),(0,B.jsx)(`path`,{className:`dropglyph__arc dropglyph__arc--track`,d:`M42 32 C 58 12, 76 12, 92 28`}),(0,B.jsx)(`path`,{className:`dropglyph__arc dropglyph__arc--dots`,d:`M42 32 C 58 12, 76 12, 92 28`}),(0,B.jsx)(`rect`,{className:`dropglyph__field`,x:`98`,y:`13`,width:`28`,height:`28`,rx:`8`})]})}var $s=[{id:`cli`,label:`Terminal`,cmd:`npx uisandbox-mcp open`,hint:`Run it inside your project: it finds the build (dist/, build/, out/, whatever yours is called) and opens the sandbox in your browser. A folder or zip as argument works too.`},{id:`claude`,label:`Claude Code`,cmd:`claude mcp add uisandbox -- npx -y uisandbox-mcp`,hint:`Then: "open this app in UISandbox". It builds, loads, opens.`},{id:`plugin`,label:`/uisandbox skill`,cmd:`/plugin marketplace add Ideelab/uisandbox
|
|
25
|
+
/plugin install uisandbox@uisandbox`,hint:`Two commands in Claude Code: the /uisandbox skill and the MCP server in one plugin.`},{id:`mcp`,label:`Any MCP client`,cmd:`npx -y uisandbox-mcp`,hint:`Cursor, Claude Desktop, Codex: add as a stdio server.`}];function ec({compact:e=!1}={}){let[t,n]=(0,_.useState)(`cli`),[r,i]=(0,_.useState)(!1),a=$s.find(e=>e.id===t),o=async()=>{try{await navigator.clipboard.writeText(a.cmd),i(!0),setTimeout(()=>i(!1),1400)}catch{}};if(e){let e=$s[0];return(0,B.jsx)(`div`,{className:`install install--compact`,children:(0,B.jsxs)(`div`,{className:`install__pill`,children:[(0,B.jsx)(`span`,{className:`install__prompt`,"aria-hidden":!0,children:`$`}),(0,B.jsx)(`code`,{className:`install__cmd`,children:e.cmd}),(0,B.jsx)(`button`,{type:`button`,className:`install__copy`,onClick:async()=>{try{await navigator.clipboard.writeText(e.cmd),i(!0),setTimeout(()=>i(!1),1400)}catch{}},"aria-label":`Copy`,title:`Copy`,children:r?(0,B.jsx)(M,{size:14,strokeWidth:2.5}):(0,B.jsx)(se,{size:14})})]})})}return(0,B.jsxs)(`div`,{className:`install`,children:[(0,B.jsx)(`div`,{className:`install__tabs`,role:`tablist`,"aria-label":`How to install`,children:$s.map(e=>(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e.id,className:`install__tab ${t===e.id?`install__tab--on`:``}`,onClick:()=>n(e.id),children:e.label},e.id))}),(0,B.jsxs)(`div`,{className:`install__pill`,children:[(0,B.jsx)(`span`,{className:`install__prompt`,"aria-hidden":!0,children:`$`}),(0,B.jsx)(`code`,{className:`install__cmd`,children:a.cmd.split(`
|
|
26
|
+
`).map((e,t)=>(0,B.jsx)(`span`,{className:`install__line`,children:e},t))}),(0,B.jsx)(`button`,{type:`button`,className:`install__copy`,onClick:o,"aria-label":`Copy`,title:`Copy`,children:r?(0,B.jsx)(M,{size:14,strokeWidth:2.5}):(0,B.jsx)(se,{size:14})})]}),(0,B.jsxs)(`div`,{className:`install__hint`,children:[a.hint,` · `,(0,B.jsx)(`a`,{href:`https://www.npmjs.com/package/uisandbox-mcp`,target:`_blank`,rel:`noopener`,children:`npm`}),` · `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/mcp/README.md`,target:`_blank`,rel:`noopener`,children:`docs`})]})]})}function tc(){let[e,t]=(0,_.useState)(!1),n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&t(!1)};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),(0,B.jsxs)(`div`,{className:`mcp`,ref:n,children:[(0,B.jsxs)(`button`,{type:`button`,className:`mcp__btn ${e?`mcp__btn--on`:``}`,onClick:()=>t(e=>!e),"aria-expanded":e,"aria-haspopup":`dialog`,title:`Use UISandbox from Claude Code, Cursor or any MCP client`,children:[(0,B.jsx)(xe,{size:14,strokeWidth:2}),` MCP `,(0,B.jsx)(N,{size:12,className:`mcp__chev`})]}),e&&(0,B.jsxs)(`div`,{className:`card mcp__pop`,role:`dialog`,"aria-label":`MCP server`,children:[(0,B.jsxs)(`div`,{className:`mcp__head`,children:[(0,B.jsx)(`b`,{children:`Use it from your agent`}),(0,B.jsx)(`span`,{children:`Load a build, turn the knobs, verify 1:1, export the patch, as MCP tools.`})]}),(0,B.jsx)(ec,{})]})]})}var nc=`Ideelab/uisandbox`,rc=`us-stars`;function ic(){let[e,t]=(0,_.useState)(()=>{try{let e=JSON.parse(sessionStorage.getItem(rc)||`null`);return e&&Date.now()-e.at<36e5?e.n:null}catch{return null}});return(0,_.useEffect)(()=>{e===null&&fetch(`https://api.github.com/repos/${nc}`,{headers:{accept:`application/vnd.github+json`}}).then(e=>e.ok?e.json():null).then(e=>{if(e&&typeof e.stargazers_count==`number`){t(e.stargazers_count);try{sessionStorage.setItem(rc,JSON.stringify({n:e.stargazers_count,at:Date.now()}))}catch{}}}).catch(()=>{})},[e]),(0,B.jsxs)(`a`,{className:`star`,href:`https://github.com/${nc}`,target:`_blank`,rel:`noopener`,title:`Star UISandbox on GitHub`,"aria-label":`Star UISandbox on GitHub`,children:[(0,B.jsxs)(`span`,{className:`star__main`,children:[(0,B.jsx)(Zs,{size:14}),` Star`]}),e!==null&&(0,B.jsx)(`span`,{className:`star__count`,children:(e=>e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e))(e)})]})}function ac(){let e=new Date().getFullYear();return(0,B.jsxs)(`footer`,{className:`foot`,"aria-label":`About UISandbox`,children:[(0,B.jsxs)(`span`,{className:`foot__credit`,children:[`Made with ♥ by `,(0,B.jsx)(`a`,{href:`https://github.com/AlexanderKaan`,target:`_blank`,rel:`noopener author`,children:`Alexander Kaan`}),` at `,(0,B.jsx)(`a`,{href:`https://ideelab.nl/`,target:`_blank`,rel:`noopener`,children:`Ideelab`})]}),(0,B.jsx)(`span`,{className:`foot__sep`,"aria-hidden":!0,children:`·`}),(0,B.jsxs)(`span`,{children:[`© `,e,` Ideelab · `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/LICENSE`,target:`_blank`,rel:`noopener license`,children:`MIT`})]}),(0,B.jsx)(`span`,{className:`foot__sep`,"aria-hidden":!0,children:`·`}),(0,B.jsxs)(`nav`,{className:`foot__links`,"aria-label":`UISandbox links`,children:[(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox`,target:`_blank`,rel:`noopener`,children:`Source`}),(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/discussions`,target:`_blank`,rel:`noopener`,children:`Discussions`}),(0,B.jsx)(`a`,{href:`https://www.npmjs.com/package/uisandbox-mcp`,target:`_blank`,rel:`noopener`,children:`MCP server`}),(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/security.md`,target:`_blank`,rel:`noopener`,children:`Privacy & security`}),(0,B.jsx)(`a`,{href:`/llms.txt`,children:`llms.txt`})]}),(0,B.jsx)(`span`,{className:`foot__sep`,"aria-hidden":!0,children:`·`}),(0,B.jsx)(`span`,{className:`foot__note`,children:`Your files never leave your browser.`})]})}var oc=[{key:`colorTheme`,label:`Brand`},{key:`radius`,label:`Box radius`},{key:`scale`,label:`Scale`},{key:`typeScale`,label:`Text size`}];function sc(e,t){if(!t)return{};let n={};for(let{key:r,label:i}of oc){let a=t.derived[r];if(a==null){n[i]=`default`;continue}n[i]=String(e[r])===a?`derived`:`changed`}return n}var cc=(e,t)=>typeof e==`string`&&t.includes(e)?e:null,lc=[`none`,`subtle`,`soft`,`round`],uc=[`compact`,`default`,`comfortable`],dc=[`sm`,`md`,`lg`,`xl`];function fc(e){let t=e.values||{},n={...zn},r=typeof t.colorTheme==`string`?t.colorTheme:null;r&&r in Mt&&(n=Nt(n,r)),typeof t.brandHex==`string`&&/^#[0-9a-f]{6}$/i.test(t.brandHex)&&(n={...n,cPrimary:t.brandHex});let i=cc(t.radius,lc);i&&(n={...n,radius:i});let a=cc(t.scale,uc);a&&(n={...n,scale:a});let o=cc(t.typeScale,dc);return o&&(n={...n,typeScale:o}),n}function pc(e){let t=fc(e),n=e.values||{},r={};for(let{key:e}of oc)n[e]!=null&&(r[e]=String(t[e]));return r}var mc=(e,t,n)=>Math.min(n,Math.max(t,e)),hc=e=>e===void 0?``:String(e);function gc(e){let t=e.trim().match(/^(-?\d*\.?\d+)(px|rem|em)$/);if(!t)return null;let n=parseFloat(t[1]);return{px:t[2]===`px`?n:n*16,unit:t[2]}}var _c=(e,t,n)=>{let r=t===`px`?e:e/16,i=Math.round(r*1e3)/1e3;if(n!==void 0){let t=gc(n);if(t&&Math.abs(t.px-e)<1e-6)return n}return`${i}${t}`},vc=.035,yc=/^(?:--)?(?![\w-]*\bon[_-]?primary)(?:[\w.-]*?[-_.])?(primary|brand)(?:[-_]?(color|colour|base|default|500|600|main|hex))?$/i,bc=e=>yc.test(e)||yc.test(e.replace(/-(rgb|hsl|channels)$/i,``)),xc=/(^|[-_.])(text|bg|background|surface|border|fg|foreground|ink|content|font|label|icon|heading|body)[-_.]primary/i,Sc=e=>e.sites.length>0&&e.sites.length===e.count&&e.sites.every(e=>bc(e.prop)&&!xc.test(e.prop)),Cc=/^--(?:[\w-]*-)?(gray|grey|neutral|slate|zinc|stone|mauve|sage|olive|sand)-a?\d+$/i,wc=(e,t)=>t.a<1&&t.C*t.a<vc&&e.sites.length>0&&e.sites.length===e.count&&e.sites.every(e=>Cc.test(e.prop)),Tc=32,Ec=[[`success`,110,175],[`danger`,335,40],[`warning`,45,100],[`info`,215,265]],Dc=(e,t,n)=>t<=n?e>=t&&e<=n:e>=t||e<=n,Oc={success:/(^|[^a-z])(success|valid|positive|ok|confirm|approved?|complete|done|passed?)([^a-z]|$)/i,warning:/(^|[^a-z])(warn(ing)?|caution|pending|attention|notice-warn)([^a-z]|$)/i,danger:/(^|[^a-z])(danger|err(or)?|invalid|destructive|critical|negative|fail(ed|ure)?|alert|delete|remove|bad)([^a-z]|$)/i,info:/(^|[^a-z])(info|notice|note|hint|tip)([^a-z]|$)/i},kc=/(^|[^a-z])(red|pink|rose|fuchsia|magenta|purple|violet|indigo|blue|sky|cyan|teal|emerald|green|lime|yellow|amber|orange|brown|gold|mint|lavender|peach|coral|pastel|palette|swatch|categor(y|ies)|tag|series|chart)([^a-z0-9]|$)/i,Ac=/(^|[\s,])\.(bg|text|border|fill|stroke|color|colour|swatch|palette)-[a-z]/i,jc=e=>{let t=new Set,n=!1,r=!1;for(let i of e.sites){let e=`${i.prop} ${i.selector??``}`;for(let n of Object.keys(Oc))Oc[n].test(e)&&t.add(n);kc.test(e)&&(n=!0,(i.prop.startsWith(`--`)&&kc.test(i.prop)||Ac.test(i.selector??``))&&(r=!0))}return{status:t,palette:n,swatch:r}};function Mc(e,t){if(e.a===0)return`keep`;if(e.C<vc)return`neutral`;let n=t.centre.brand;if(n&&Math.abs(Fn(e.H,n.H))<=Tc)return`brand`;let r=Ec.find(([,t,n])=>Dc(e.H,t,n));if(r&&t.centre[r[0]])return r[0];for(let n of[`secondary`,`accent`]){let r=t.centre[n];if(r&&Math.abs(Fn(e.H,r.H))<=Tc)return n}return`keep`}function Nc(e,t,n={}){let r=V(t),i=new Map,a=[],o=[];for(let t of e.ofKind(`color`)){let e=V(t.value);if(!e||e.a===0){i.set(t.id,`keep`);continue}if(e.C<vc){if(r&&r.C<vc&&Kc(e,r)&&Sc(t)){i.set(t.id,`brand`);continue}let n=Ec.find(([,t,n])=>Dc(e.H,t,n));if(e.C>=.012&&n&&jc(t).status.has(n[0])){o.push({e:t,c:e});continue}i.set(t.id,`neutral`);continue}if(wc(t,e)){i.set(t.id,`neutral`);continue}if(r&&Math.abs(Fn(e.H,r.H))<=Tc){i.set(t.id,`brand`),a.push({e:t,c:e});continue}o.push({e:t,c:e})}let s={};r&&(s.brand=r);let c=[],l=[],u=new Map;for(let e of o){let t=Ec.find(([,t,n])=>Dc(e.c.H,t,n));t?(u.has(t[0])||u.set(t[0],[]),u.get(t[0]).push(e)):c.push(e)}for(let[e,t]of u){let n=t.map(e=>({x:e,ev:jc(e.e)})),r=n.some(t=>t.ev.status.has(e));for(let t of n)r&&(t.ev.status.has(e)||!t.ev.palette)?i.set(t.x.e.id,e):l.push(t.x)}let d=new Map;for(let e of c){let t=Math.round(e.c.H/30)%12;d.has(t)||d.set(t,[]),d.get(t).push(e)}let f=e=>e.C>=.09&&e.L<=.82,p=e=>!e.some(e=>f(e.c))||e.every(e=>{let t=jc(e.e);return t.swatch&&!t.status.size});[...d.values()].filter(e=>{let t=p(e);return t&&l.push(...e),!t}).sort((e,t)=>t.reduce((e,t)=>e+t.e.count,0)-e.reduce((e,t)=>e+t.e.count,0)).forEach((e,t)=>{let n=t===0?`secondary`:t===1?`accent`:`keep`;for(let t of e)i.set(t.e.id,n)});for(let e of l)i.set(e.e.id,`palette`);let m=new Map;for(let t of e.ofKind(`color`)){let e=i.get(t.id);if(!e||e===`keep`||e===`neutral`||e===`brand`)continue;let n=V(t.value),r=m.get(e);(!r||t.count>r.n)&&m.set(e,{c:n,n:t.count,id:t.id})}let h={};for(let[e,t]of m)s[e]=t.c,h[e]=t.id;let g=null,_=null;for(let t of e.ofKind(`color`)){if(i.get(t.id)!==`brand`)continue;let e=V(t.value);if(r&&Math.abs(e.L-r.L)<=.14&&(!g||t.count>g.n)&&(g={id:t.id,n:t.count}),r){let n=Math.abs(e.L-r.L)+Math.abs(e.C-r.C)*.5;(!_||n<_.d)&&(_={id:t.id,d:n})}}g?h.brand=g.id:_&&(h.brand=_.id),delete s.palette,delete h.palette;let v=new Map;for(let e of l){let t=Math.round(e.c.H/30)%12,n=v.get(t);(!n||e.e.count>n.n)&&v.set(t,{c:e.c,n:e.e.count,id:e.e.id})}let y=[...v.values()].sort((e,t)=>t.n-e.n),b=/^(html|body|:root)(\s*,\s*(html|body|:root))*$/i,x=n.paintedCanvas?V(n.paintedCanvas):null,S=null;for(let t of e.ofKind(`color`)){let e=V(t.value);if(!e||e.a<.99)continue;let n=!!x&&Kc(e,x),r=t.sites.some(e=>/^(background|background-color)$/.test(e.prop)&&b.test(e.selector??``)),a=i.get(t.id)===`neutral`&&Ic(t)===`bg`;!r&&!a&&!n||(!S||n&&!S.painted||n===S.painted&&(r&&!S.site||r===S.site&&t.count>S.n))&&(S={c:e,n:t.count,id:t.id,site:r,painted:n})}return{of:i,centre:s,centreId:h,...y.length?{palette:y.map(e=>e.c),paletteId:y.map(e=>e.id)}:{},...S?{canvas:S.c,canvasId:S.id}:{}}}function Pc(e,t,n){return n===0?e:mc(e+n*mc(n<0?t>0?e/t:0:t<1?(1-e)/(1-t):0,0,1.5),0,1)}function Fc(e,t,n){if(Math.abs(t.L-n.L)<1e-4&&Math.abs(t.C-n.C)<1e-4&&Math.abs(Fn(t.H,n.H))<.001)return e;if(Math.abs(e.L-t.L)<.03&&Math.abs(e.C-t.C)<.03&&Math.abs(Fn(e.H,t.H))<4)return{...n,a:e.a};let r=e.H+Fn(t.H,n.H),i=mc(e.C*(n.C/Math.max(t.C,.01)),0,.4);return{L:Pc(e.L,t.L,n.L-t.L),C:i,H:(r%360+360)%360,a:e.a}}function Ic(e){let t=0,n=0,r=0;for(let i of e.sites)/^(border|outline|column-rule|--.*(border|outline|divider|stroke))/.test(i.prop)&&!/-radius|-width/.test(i.prop)?n++:/^(background|--.*(bg|background|surface|canvas))/.test(i.prop)?t++:r++;return n>=t&&n>=r?`border`:t>=r?`bg`:`ink`}function Lc(e,t,n,r,i){let a=V(hc(n[`--k-fg-muted`])),o=V(hc(r[`--k-fg-muted`])),{L:s,C:c,H:l}=e;if(a&&o){let t=o.C-a.C,n=Fn(a.H,o.H);(t!==0||n!==0)&&(c=mc(c+t*.5,0,.05),l=e.C<.004?o.H:((l+n)%360+360)%360)}let u=Ic(t);return u===`bg`&&i.bgTone!==0&&s>=.6&&(s=Pc(s,s,i.bgTone)),u===`border`&&i.borderTone!==0&&(s=Pc(s,s,i.borderTone)),{L:s,C:c,H:l,a:e.a}}function Rc(e,t){if(t===1)return e;if(t<=0)return`none`;let n=Math.sqrt(t),r=t,i=e.replace(/(-?\d*\.?\d+)(px|rem|em)/g,(e,t,r)=>{let i=parseFloat(t);return i===0?`0${r}`:`${Math.round(i*n*100)/100}${r}`});return i=i.replace(/(\/\s*|,\s*)(0?\.\d+|1(?:\.0+)?)(\s*\))/g,(e,t,n,i)=>`${t}${Math.round(mc(parseFloat(n)*r,0,1)*1e3)/1e3}${i}`),i}function zc(e,t){if(t===1)return e;let n=gc(e);if(n)return _c(n.px*t,n.unit,e);let r=e.trim().match(/^(\d*\.?\d+)$/);return r?String(Math.round(parseFloat(r[1])*t*1e3)/1e3):e}function Bc(e){if(/mono|courier|consolas|menlo|code/i.test(e.value))return`mono`;let t=e.sites.map(e=>e.selector??``).filter(Boolean);return t.length&&t.every(e=>/(^|[\s,>+~])h[1-6]\b|heading|title|display|hero/i.test(e))?`display`:`body`}function Vc(e,t,n,r){let i=t.tokens.vars,a=r.vars,o=t.families??Nc(e,t.cfg.cPrimary),s={};for(let r of e.entries)s[No(r.id)]=Io(Gc(r,i,a,t.cfg,n,o));return s}function Hc(e,t){let{L:n,C:r,H:i}=e;return t.hue!==0&&r>=vc&&(i=((i+t.hue)%360+360)%360),t.sat!==1&&(r=mc(r*t.sat,0,.4)),t.contrast!==0&&(n=mc(.5+(n-.5)*(1+t.contrast*2),0,1)),{L:n,C:r,H:i,a:e.a}}function Uc(e,t,n,r,i,a,o,s=``){let c,l=a.cBackground?V(a.cBackground):null;if(l&&o.canvas&&n&&(n.id===o.canvasId||t===`neutral`&&Ic(n)===`bg`&&Math.abs(e.L-o.canvas.L)<=.3)){if(n.id===o.canvasId)return Hc({...l,a:e.a},a);let t=o.canvas,r=l;return Hc({L:Pc(e.L,t.L,r.L-t.L),C:mc(e.C+(r.C-t.C),0,.4),H:e.C<.004?r.H:((e.H+Fn(t.H,r.H))%360+360)%360,a:e.a},a)}if(t===`keep`||t===`palette`)c=e;else if(t===`neutral`)c=n?Lc(e,n,r,i,a):e;else if(t===`brand`){let t=o.centre.brand??V(hc(r[`--k-primary`])),n=V(s)??V(hc(i[`--k-primary`]));c=t&&n?Fc(e,t,n):e}else{let n=a[Wc[t]],r=o.centre[t],i=n?V(n):null;c=r&&i?Fc(e,r,i):e}return Hc(c,a)}var Wc={secondary:`cSecondary`,accent:`cAccent`,success:`cSuccess`,warning:`cWarning`,danger:`cDanger`,info:`cInfo`};function Gc(e,t,n,r,i,a){let o=i.sb;switch(e.kind){case`color`:{let r=V(e.value);if(!r)return e.value;let s=Uc(r,a.of.get(e.id)??`keep`,e,t,n,o,a,i.cPrimary);if(qc(s,r))return e.value;let c=Mn(e.value,s),l=V(c);return l&&Kc(l,r)?e.value:c}case`radius`:return zc(e.value,o.radius);case`space`:return zc(e.value,o.space);case`font-size`:return zc(e.value,o.type);case`line-height`:return zc(e.value,o.lineHeight);case`border-width`:return zc(e.value,o.borderWidth);case`angle`:{let t=o.gradAngle??0;if(!t)return e.value;let n=Jc(e.value);return n===null?e.value:`${Math.round(((n+t)%360+360)%360*100)/100}deg`}case`duration`:{if(o.motion===1)return e.value;let t=e.value.match(/^(\d*\.?\d+)(ms|s)$/);if(!t)return e.value;let n=parseFloat(t[1])*o.motion;return`${Math.round(n*(t[2]===`ms`?1:1e3))/(t[2]===`ms`?1:1e3)}${t[2]}`}case`letter-spacing`:{if(o.tracking===0)return e.value;let t=e.value.trim().match(/^(-?\d*\.?\d+)(px|rem|em)$/);if(!t)return e.value;let n=t[2],r=n===`px`?o.tracking*16:o.tracking;return`${Math.round((parseFloat(t[1])+r)*1e3)/1e3}${n}`}case`font-weight`:{if(o.weight===0)return e.value;let t=/^bold$/i.test(e.value)?700:/^normal$/i.test(e.value)?400:parseInt(e.value,10);return Number.isFinite(t)?String(mc(Math.round(t/100)*100+o.weight*100,100,900)):e.value}case`shadow`:return Rc(e.value,o.shadow);case`svg`:{let r=!1,s=e.value.replace(/(%23|#)([0-9a-f]{3,8})\b/gi,(e,s,c)=>{let l=V(`#`+c);if(!l)return e;let u=Uc(l,Mc(l,a),null,t,n,o,a,i.cPrimary);return qc(u,l)?e:(r=!0,s+Mn(`#000000`,{...u,a:1}).slice(1))});return s=s.replace(/(rgba?)(\(|%28)([^)%]*?)(\)|%29)/gi,(e,s,c,l,u)=>{let d=V(`${s}(${l.replace(/%2c/gi,`,`)})`);if(!d)return e;let f=Uc(d,Mc(d,a),null,t,n,o,a,i.cPrimary);if(qc(f,d))return e;r=!0;let p=V(Mn(`rgb(0 0 0 / 0.5)`,f)),[m,h,g]=Mn(`#000000`,{...p,a:1}).slice(1).match(/../g).map(e=>parseInt(e,16)),_=p.a<.999?`${m}, ${h}, ${g}, ${Math.round(p.a*1e3)/1e3}`:`${m}, ${h}, ${g}`;return`${p.a<.999?`rgba`:`rgb`}${c}${_}${u}`}),r?s:e.value}case`font-family`:{let t=Bc(e);if(t===`mono`)return e.value;let a=t===`display`?`fontDisplay`:`fontBody`;return i[a]===r[a]?e.value:hc(n[t===`display`?`--k-font-display`:`--k-font-body`])||e.value}}}function Kc(e,t){return Mn(`#000000`,{...e,a:1})===Mn(`#000000`,{...t,a:1})&&Math.abs(e.a-t.a)<.002}var qc=(e,t)=>Math.abs(e.L-t.L)<1e-4&&Math.abs(e.C-t.C)<1e-4&&(Math.abs(Fn(e.H,t.H))<.001||e.C<1e-4&&t.C<1e-4)&&Math.abs(e.a-t.a)<1e-4;function Jc(e){let t=e.trim().toLowerCase(),n={top:0,right:90,bottom:180,left:270},r=t.match(/^to\s+(top|right|bottom|left)$/);if(r)return n[r[1]];let i=t.match(/^(-?\d*\.?\d+)(deg|turn|rad|grad)$/);if(!i)return null;let a=parseFloat(i[1]);return i[2]===`deg`?a:i[2]===`turn`?a*360:i[2]===`rad`?a*180/Math.PI:a*.9}function Yc(e){let t=e=>bc(e.prop),n=new Map;for(let r of e.ofKind(`color`))for(let e of r.sites){if(!t(e)||e.seq===void 0)continue;let r=`${e.file}\n${e.selector??``}\n${e.prop}`;n.set(r,Math.max(n.get(r)??0,e.seq))}let r=e=>e.seq===void 0||n.get(`${e.file}\n${e.selector??``}\n${e.prop}`)===e.seq,i=null;for(let n of e.ofKind(`color`)){let a=V(n.value);if(!a||a.a<.99||a.C<.05&&!Sc(n))continue;let o=n.sites.filter(e=>t(e)&&r(e)),s=o.length,c=new Set(o.map(e=>e.prop)),l=n.count;for(let t of c)l+=e.refs.get(t)??0;s&&(!i||l>i.count||l===i.count&&s>i.n)&&(i={hex:Nn({...a,a:1}),n:s,count:l})}return i?.hex??null}function Xc(e){let t=null;for(let n of e.ofKind(`color`)){let e=V(n.value);if(!e||e.a<.99||e.C<.08||e.L<.25||e.L>.8)continue;let r=n.sites.filter(e=>/background/.test(e.prop)).length,i=n.count+r*2;(!t||i>t.score)&&(t={hex:Nn({...e,a:1}),score:i})}return t?.hex??null}function Zc(e){let t=e.split(`,`)[0].trim().replace(/^["']|["']$/g,``);if(!t||/^(system-ui|-apple-system|blinkmacsystemfont|ui-sans-serif|sans-serif|serif|monospace|ui-monospace|ui-serif|inherit)$/i.test(t))return ze;let n=et.find(e=>e.toLowerCase()===t.toLowerCase()),r=t.replace(/[-_][0-9a-f]{6,}$/i,``).replace(/^__/,``).replace(/_[0-9a-f]{6}$/i,``);return n??`Custom: `+r}var Qc=/awesome|icon|glyph|material symbols|fontello|ionicons|feather|dashicons|simple-line/i,$c=/^(html|body|:root)(\s*,\s*(html|body|:root))*$/i;function el(e){let t=new Map;for(let n of e.ofKind(`font-family`)){if(Qc.test(n.value))continue;let e=Zc(n.value);e!==`System`&&t.set(e,(t.get(e)??0)+n.count)}return[...t.entries()].sort((e,t)=>t[1]-e[1]).map(([e])=>e)}function tl(e){let t=null,n=null;for(let r of e.ofKind(`font-family`)){if(Qc.test(r.value))continue;let e=Bc(r);if(e===`mono`)continue;if(e===`display`){(!n||r.count>n.n)&&(n={v:r.value,n:r.count});continue}let i=r.sites.some(e=>$c.test(e.selector??``));(!t||i&&!t.site||i===t.site&&r.count>t.n)&&(t={v:r.value,n:r.count,site:i})}return{body:t?Zc(t.v):null,display:n?Zc(n.v):null}}function nl(e){let t=null;for(let n of e.ofKind(`radius`)){let e=gc(n.value);e&&(!t||n.count>t.n)&&(t={px:e.px,n:n.count})}return t?t.px===0?`none`:t.px<=5?`subtle`:t.px<=10?`soft`:`round`:null}function rl(e){for(let t of e.ofKind(`font-size`)){if(!t.sites.some(e=>/^(html|body|:root)(\s*,\s*(html|body|:root))*$/i.test(e.selector??``)))continue;let e=gc(t.value);if(e)return e.px<=13?`sm`:e.px<=15?`md`:e.px<=17?`lg`:`xl`}return null}async function il(e,t){let n=[],r,i=null,a=null;try{let t=await jo(e),o=oo(t.files,{pkg:t.pkg});i=o.inferredConfig??null,a={filesRead:o.meta?.files??t.files.length,parsed:o.meta?.parsed??null,refused:!!o.refused},r=fc(i??{}),n.push(`Read ${a.filesRead} source files${a.parsed==null?``:` (${Math.round(a.parsed*100)}% parsed)`}.`)}catch(e){r=fc({}),n.push(`The source scan failed (${e.message}); the knobs start from the stylesheet census only.`)}r={...r,neutral:`neutral`};let o=i?.values??{},s=Yc(t);if(s)r={...r,cPrimary:s},n.push(`Brand declared in the built CSS as a primary/brand variable: ${s}${typeof o.brandHex==`string`&&o.brandHex!==s?` (the source scan said ${o.brandHex})`:``}.`);else if(typeof o.brandHex!=`string`){let e=Xc(t);e?(r={...r,cPrimary:e},n.push(`Brand taken from the most-painted colour in the built CSS: ${e}.`)):n.push(`No brand colour could be told from the code; the Brand knob starts at our default.`)}else n.push(`Brand from the code: ${o.brandHex}.`);if(o.radius==null){let e=nl(t);e&&(r={...r,radius:e},n.push(`Radius from the most-used corner in the built CSS: ${e}.`))}let c=rl(t);c&&(r={...r,typeScale:c},n.push(`Text size from the body font-size in the built CSS: ${c}.`));let l=tl(t);l.body&&(r={...r,fontBody:l.body}),l.display?r={...r,fontDisplay:l.display}:l.body&&(r={...r,fontDisplay:l.body}),(l.body||l.display)&&n.push(`Fonts from the stylesheets: body ${l.body??`—`}, display ${l.display??l.body??`—`}.`);let u={cfg:r,tokens:or(r),families:Nc(t,r.cPrimary)},d=i?pc(i):{},f={baseline:u,brandDeclared:!!s,notes:n,audit:a,provenance:e=>{let n=f.baseline.cfg,r=sc(e,i?{derived:d}:null);for(let[t,i]of[[`fontBody`,`Body font`],[`fontDisplay`,`Display font`]])r[i]=(t===`fontBody`?!l.body&&n.fontBody===al:!l.display&&!l.body&&n.fontDisplay===al)?`default`:e[t]===n[t]?`derived`:`changed`;return(s||typeof o.brandHex!=`string`&&Xc(t))&&(r.Brand=e.cPrimary===n.cPrimary?`derived`:`changed`),o.radius==null&&nl(t)&&(r[`Box radius`]=e.radius===n.radius?`derived`:`changed`),c&&(r[`Text size`]=e.typeScale===n.typeScale?`derived`:`changed`),r}};return f}var al=fc({}).fontBody;function ol(e,t,n={}){let r=e.defaultView;if(!r||!e.body)return null;let i=e=>{let t=new Map;for(let n of e){let e=Array.from(n.childNodes).filter(e=>e.nodeType===3).map(e=>e.textContent?.trim().length??0).reduce((e,t)=>e+t,0);if(e<3)continue;let i=r.getComputedStyle(n).fontFamily;t.set(i,(t.get(i)??0)+e)}return[...t.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??null},a={};if(n.brand){let i=r.innerWidth||1200,o=r.innerHeight||800,s=new Map;for(let t of Array.from(e.querySelectorAll(`body *`)).slice(0,1500)){let e=V(r.getComputedStyle(t).backgroundColor);if(!e||e.a<.9||e.C<.08||e.L<.2||e.L>.85)continue;let n=t.getBoundingClientRect();if(n.width<8||n.height<8||n.width*n.height>i*o*.6)continue;let a=Nn({...e,a:1}),c=n.width*n.height*(/^(BUTTON|A)$/.test(t.tagName)||t.getAttribute(`role`)===`button`?3:1);s.set(a,(s.get(a)??0)+c)}for(let t of Array.from(e.querySelectorAll(`header svg, nav svg, a svg, [class*="logo" i] svg, svg[aria-label]`)).slice(0,40)){let e=t.getBoundingClientRect();if(!(e.width<12||e.height<12||e.width*e.height>i*o*.25))for(let n of Array.from(t.querySelectorAll(`path, rect, circle, polygon, ellipse`)).slice(0,12)){let t=V(r.getComputedStyle(n).fill);if(!t||t.a<.9||t.C<.08||t.L<.2||t.L>.85)continue;let i=Nn({...t,a:1});s.set(i,(s.get(i)??0)+e.width*e.height*2);break}}let c=[...s.entries()].sort((e,t)=>t[1]-e[1])[0],l=!0;if(n.brand===`if-absent`){let n=V(t.cPrimary),i=n?Nn({...n,a:1}).toLowerCase():``;for(let t of Array.from(e.querySelectorAll(`body *`)).slice(0,1500)){let e=r.getComputedStyle(t);for(let t of[e.backgroundColor,e.color,e.borderTopColor,e.fill]){let e=V(t);if(!(!e||e.a<.5)&&Nn({...e,a:1}).toLowerCase()===i){l=!1;break}}if(!l)break}}c&&c[0].toLowerCase()!==t.cPrimary.toLowerCase()&&!s.has(t.cPrimary.toLowerCase())&&(n.brand===!0||l)&&(a.cPrimary=c[0])}let o=/^(times|times new roman|serif)$/i,s=e=>o.test(e.split(`,`)[0].trim().replace(/^["']|["']$/g,``)),c=i(Array.from(e.querySelectorAll(`p, li, td, th, span, a, label, dd, dt, small, div, section, article, main, body`)).slice(0,600));if(c&&!s(c)){let e=Zc(c);e!==t.fontBody&&(a.fontBody=e)}let l=i(Array.from(e.querySelectorAll(`h1, h2, h3, [class*="title"], [class*="heading"]`)).slice(0,100));if(l&&!s(l)){let e=Zc(l);e!==t.fontDisplay&&(a.fontDisplay=e)}else a.fontBody&&t.fontDisplay===t.fontBody&&(a.fontDisplay=a.fontBody);return Object.keys(a).length?a:null}function sl(e,t){let n=fc({}),r={};if(t.cPrimary===n.cPrimary){let t=Yc(e)??Xc(e);t&&t.toLowerCase()!==n.cPrimary.toLowerCase()&&(r.cPrimary=t)}if(t.radius===n.radius){let t=nl(e);t&&t!==n.radius&&(r.radius=t)}if(t.typeScale===n.typeScale){let t=rl(e);t&&t!==n.typeScale&&(r.typeScale=t)}if(t.fontBody===n.fontBody||t.fontDisplay===n.fontDisplay){let i=tl(e);t.fontBody===n.fontBody&&i.body&&i.body!==n.fontBody&&(r.fontBody=i.body),t.fontDisplay===n.fontDisplay&&(i.display??i.body)&&(i.display??i.body)!==n.fontDisplay&&(r.fontDisplay=i.display??i.body)}return Object.keys(r).length?r:null}var cl=new Map,ll=null,ul=new Set,dl=new Map,fl=new Set;function pl(e){return fl.add(e),()=>fl.delete(e)}function ml(e){return[...dl.get(e.id)??[]]}function hl(e){return ul.add(e),()=>ul.delete(e)}var gl=e=>{try{return new URLSearchParams(e.location.search).get(`__sb`)||e.location.pathname.match(/^\/__sb\/([^/]+)\//)?.[1]||e.name.match(/^us:(\S+)$/)?.[1]||null}catch{return null}};function _l(e,t,n){let r=n||gl(t),i=r?cl.get(r):void 0;if(!i||i.variant!==`rewritten`)return e;let a=i.project.table,o=a.entries.length,s=ys(e,a,`insertRule (runtime)`);if(a.entries.length>o){try{Lo(t.document,a,o)}catch{}for(let e of ul)e(i.project)}return s}typeof window<`u`&&(window.__usRewriteRule=_l);var vl=(e,t,n=``)=>{let r=t.replace(/^\//,``).replace(/(^|\/)index\.html?$/i,`$1`),i=n.replace(/^\/|\/$/g,``);return`/${i?i+`/`:``}${r}?__sb=${e}`},yl=e=>`${e}-raw`,bl=e=>`${e}-id`;function xl(){return ll||(`serviceWorker`in navigator?(ll=(async()=>{let e=await navigator.serviceWorker.register(`/sw.js`,{scope:`/`});return await navigator.serviceWorker.ready,navigator.serviceWorker.controller||await new Promise(e=>{let t=()=>{navigator.serviceWorker.removeEventListener(`controllerchange`,t),e()};navigator.serviceWorker.addEventListener(`controllerchange`,t),setTimeout(t,1500)}),e})(),navigator.serviceWorker.addEventListener(`message`,Tl),ll):Promise.reject(Error(`This browser has no service worker — the sandbox cannot serve your files here.`)))}function Sl(e,t){cl.set(e.id,{project:e,variant:`rewritten`,vars:t}),cl.set(bl(e.id),{project:e,variant:`rewritten`,vars:()=>e.table.identityVars()}),cl.set(yl(e.id),{project:e,variant:`raw`,vars:()=>({})})}function Cl(e){cl.delete(e.id),cl.delete(bl(e.id)),cl.delete(yl(e.id))}function wl(e,t){let n=e.get(t);if(n)return n;let r=t.split(`/`);for(let t=1;t<r.length&&t<=4;t++){let n=e.get(r.slice(t).join(`/`));if(n)return n}}async function Tl(e){let t=e.data;if(!t||!t.sid)return;let n=e.ports[0];if(!n)return;if(t.type===`us:rewrite-css`){let e=cl.get(t.sid);if(!e||e.variant!==`rewritten`||!t.css){n.postMessage({found:!1});return}let r=e.project.table,i=r.entries.length,a=`cdn: ${(t.url??``).replace(/^https?:\/\//,``)}`,o=ys(t.css,r,a),s=r.entries.slice(i),c=s.length?`:root{${s.map(e=>`${No(e.id)}:${Io(e.value)}`).join(`;`)}}\n`:``,l=o.match(/^(?:@charset[^;]*;\s*)?(?:@import[^;]*;\s*)*/)?.[0]??``;if(n.postMessage({found:!0,css:l+c+o.slice(l.length)}),s.length)for(let t of ul)t(e.project);return}if(t.type!==`us:fetch`)return;let r=cl.get(t.sid);if(!r){n.postMessage({found:!1,owner:!1});return}let i=r.variant===`raw`?r.project.raw:r.project.rewritten,a=decodeURIComponent(t.path??``),o=wl(i,a);if(!o){let e=[a,...a.split(`/`).map((e,t,n)=>n.slice(t).join(`/`)).slice(1,4)];for(let t of e)if(await Ys(r.project,t)&&(o=i.get(t),o))break}if(!o){if(r.variant===`rewritten`&&/\.(js|mjs|css)$/i.test(a)){dl.has(r.project.id)||dl.set(r.project.id,new Set);let e=dl.get(r.project.id);if(!e.has(a)){e.add(a);for(let e of fl)e(r.project,a)}}n.postMessage({found:!1,owner:!0});return}let s;if(r.variant===`rewritten`&&/\.html?$/i.test(a)&&t.navigate){let e=qs(await o.blob.text(),r.vars(),t.sid);s=new TextEncoder().encode(e).buffer}else s=r.variant===`raw`&&/\.html?$/i.test(a)&&t.navigate?new TextEncoder().encode(Gs(await o.blob.text())).buffer:await o.blob.arrayBuffer();n.postMessage({found:!0,type:o.type,body:s},[s])}var El=/^(us-|uicockpit\.)/;function Dl(){let e=[];for(let t of[localStorage,sessionStorage])try{for(let n of Object.keys(t))El.test(n)||(t.removeItem(n),e.push(n))}catch{}return e}function Ol(e,t,n){let r=!1,i=()=>t.entries.length,a=e=>!!e&&e.nodeType===1,o=e=>a(e)&&e.tagName===`STYLE`,s=a=>{let o=a.getAttribute(`style`);if(!o||!/[#\d]|rgb|hsl|oklch/i.test(o)||/var\(--us-v/.test(o))return;let s=i(),c=bs(o,t,`inline (runtime)`);Lo(e,t,s),c!==o&&(r=!0,a.setAttribute(`style`,c),r=!1),t.entries.length!==s&&n()},c=a=>{let o=a.textContent??``;if(!o.trim()||a.id===`us-vars`||/var\(--us-v/.test(o))return;let s=i(),c=ys(o,t,`<style> (runtime)`);Lo(e,t,s),c!==o&&(r=!0,a.textContent=c,r=!1),t.entries.length!==s&&n()},l=[`fill`,`stroke`,`stop-color`,`flood-color`,`lighting-color`],u=a=>{if(a.namespaceURI!==`http://www.w3.org/2000/svg`)return;let o=a.style,s=i();for(let e of l){let n=a.getAttribute(e);if(!n||/^(none|currentcolor|inherit|transparent|url\(|context-)/i.test(n.trim())||o.getPropertyValue(e).includes(`var(--us-v`))continue;let i=t.add(`color`,n,{file:`inline svg`,prop:`svg ${e}`});r=!0,o.setProperty(e,i),r=!1}t.entries.length!==s&&(Lo(e,t,s),n())},d=e=>{a(e)&&e.hasAttribute(`style`)&&s(e),e.querySelectorAll?.(`[style]`).forEach(s),a(e)&&e.namespaceURI===`http://www.w3.org/2000/svg`&&u(e),e.querySelectorAll?.(`svg, svg *`).forEach(u),o(e)&&c(e),e.querySelectorAll?.(`style`).forEach(e=>c(e))},f=new MutationObserver(e=>{if(!r)for(let t of e)t.type===`attributes`&&a(t.target)?t.attributeName===`style`?s(t.target):u(t.target):t.type===`childList`?t.addedNodes.forEach(e=>{a(e)&&d(e)}):t.type===`characterData`&&o(t.target.parentElement)&&c(t.target.parentElement)});return f.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`style`,`fill`,`stroke`,`stop-color`],characterData:!0}),d(e.documentElement),()=>f.disconnect()}function kl(e=globalThis.document){let t=e.documentElement,n=(e.defaultView||globalThis).getComputedStyle(t),r=e=>n.getPropertyValue(e).trim()!==``;return e.querySelector(`md-filled-button,md-outlined-button,md-text-button,md-filled-text-field,md-outlined-text-field`)?`material`:e.querySelector(`.ant-btn,.ant-layout,.ant-input,.ant-menu`)?`antd`:t.hasAttribute(`data-mantine-color-scheme`)||e.querySelector(`[class*="mantine-"]`)?`mantine`:e.querySelector(`.radix-themes`)?`radix`:r(`--bs-primary`)||r(`--bs-body-bg`)?`bootstrap`:r(`--color-base-100`)&&r(`--color-primary-content`)?`daisyui`:r(`--primary`)&&r(`--card`)&&r(`--radius`)?`shadcn`:r(`--surface-1`)&&r(`--size-3`)?`openprops`:r(`--spacing`)&&r(`--font-sans`)?`tailwind`:null}function Al(e){let t=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,n=t(parseInt(e.slice(1,3),16)/255),r=t(parseInt(e.slice(3,5),16)/255),i=t(parseInt(e.slice(5,7),16)/255),a=.4122214708*n+.5363325363*r+.0514459929*i,o=.2119034982*n+.6806995451*r+.1073969566*i,s=.0883024619*n+.2817188376*r+.6299787005*i,c=Math.cbrt(a),l=Math.cbrt(o),u=Math.cbrt(s),d=.2104542553*c+.793617785*l-.0040720468*u,f=1.9779984951*c-2.428592205*l+.4505937099*u,p=.0259040371*c+.7827717662*l-.808675766*u,m=Math.sqrt(f*f+p*p),h=Math.atan2(p,f)*180/Math.PI;return h<0&&(h+=360),[d,m,h]}function jl(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o*o*o,u=s*s*s,d=c*c*c;return[4.0767416621*l-3.3077115913*u+.2309699292*d,-1.2684380046*l+2.6097574011*u-.3413193965*d,-.0041960863*l-.7034186147*u+1.707614701*d]}function Ml(e,t,n){let[r,i,a]=jl(e,t,n),o=e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.round(Math.max(0,Math.min(1,t))*255).toString(16).padStart(2,`0`)};return`#${o(r)}${o(i)}${o(a)}`}var Nl=e=>{let t=`([\\d.]+|none)`,n=String(e).match(RegExp(`oklch\\(\\s*${t}(%?)\\s+${t}\\s+${t}`,`i`));if(!n)return`#000000`;let r=e=>e===`none`?0:parseFloat(e);return Ml(n[2]===`%`?r(n[1])/100:r(n[1]),r(n[3]),r(n[4]))};function Pl(e,t){if(typeof e==`string`&&/^#[0-9a-f]{6}$/i.test(e))return;let n=`${t}() needs a 6-digit hex and got: ${String(e).slice(0,60)}`;typeof console<`u`&&console.error(`[uicockpit] ${n}`)}function Fl(e){Pl(e,`relLum`);let t=[1,3,5].map(t=>{let n=parseInt(e.slice(t,t+2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4});return .2126*t[0]+.7152*t[1]+.0722*t[2]}var Il=(e,t)=>{let n=Fl(e),r=Fl(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},Ll=[{id:`brand`,label:`Brand`,kind:`colour`,what:`the colour a primary action wears`},{id:`onBrand`,label:`On brand`,kind:`colour`,what:`text and icons on top of the brand colour`,derived:!0},{id:`page`,label:`Page`,kind:`colour`,what:`the ground everything sits on`},{id:`surface`,label:`Surface`,kind:`colour`,what:`a card or panel lifted off the page`},{id:`ink`,label:`Ink`,kind:`colour`,what:`body text`},{id:`inkMuted`,label:`Muted ink`,kind:`colour`,what:`secondary text`},{id:`line`,label:`Line`,kind:`colour`,what:`the border between things`},{id:`success`,label:`Success`,kind:`colour`,what:`the colour that says it worked`},{id:`warning`,label:`Warning`,kind:`colour`,what:`the colour that says look again`},{id:`danger`,label:`Danger`,kind:`colour`,what:`the colour that says it failed`},{id:`fontHeading`,label:`Headings`,kind:`font`,what:`the family headings are set in`},{id:`fontBody`,label:`Body`,kind:`font`,what:`the family everything else is set in`},{id:`focus`,label:`Focus ring`,kind:`colour`,what:`the ring that says where the keyboard is`},{id:`elevation`,label:`Elevation`,kind:`ratio`,what:`how strongly things lift off the page`},{id:`lineHeight`,label:`Line height`,kind:`number`,what:`how much air sits between lines of body text`},{id:`letterSpacing`,label:`Letter spacing`,kind:`length`,what:`how tightly the letters sit together`},{id:`fontWeight`,label:`Heading weight`,kind:`number`,what:`how heavy headings are set`},{id:`borderWidth`,label:`Border width`,kind:`length`,what:`how thick a border is drawn`},{id:`space`,label:`Spacing`,kind:`ratio`,what:`how much room everything gets, as a multiple of the kit's own step`},{id:`radius`,label:`Corner radius`,kind:`length`,what:`how round a box is`},{id:`baseText`,label:`Base text`,kind:`length`,what:`the size body text is set at`}],Rl=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:null},K=e=>Rl(e),q={tailwind:{_note:`Tailwind ships a palette, not roles. Semantic names are added under @theme and its utilities pick them up.`,brand:{var:`--color-brand`,new:!0},onBrand:{var:`--color-brand-foreground`,new:!0},page:{var:`--color-page`,new:!0},surface:{var:`--color-surface`,new:!0},ink:{var:`--color-ink`,new:!0},inkMuted:{var:`--color-ink-muted`,new:!0},line:{var:`--color-line`,new:!0},radius:{var:`--radius-lg`,also:[`--radius-md`,`--radius-sm`]},baseText:{var:`--text-base`},fontBody:{var:`--font-sans`},fontHeading:{var:`--font-heading`,new:!0},success:{var:`--color-success`,new:!0},warning:{var:`--color-warning`,new:!0},danger:{var:`--color-danger`,new:!0},space:{var:`--spacing`,scale:!0},focus:{var:`--color-ring`,new:!0},elevation:{shadows:[`--shadow-2xs`,`--shadow-xs`,`--shadow-sm`,`--shadow-md`,`--shadow-lg`,`--shadow-xl`,`--shadow-2xl`],needsBuild:{where:`theme.css`,sass:`--shadow-*`,why:`Tailwind compiles each shadow utility from the theme, so the new values only appear after its build runs again`}},lineHeight:{var:`--text-base--line-height`,also:[`--text-xs--line-height`,`--text-sm--line-height`,`--text-lg--line-height`,`--text-xl--line-height`,`--text-2xl--line-height`,`--text-3xl--line-height`]},letterSpacing:{var:`--tracking-normal`},fontWeight:{var:`--font-weight-strong`,new:!0},borderWidth:null},radix:{_note:`Radix does not take values, it takes CHOICES from sets it publishes: named accent scales, named grey scales, five radius settings and five scaling steps. Only the page and panel colours are really variables. Every scale is twelve hand-built steps, so a single step written by hand is eleven steps out of step. The knobs are matched to the nearest published set instead, and the manifest names it.`,brand:{choice:`brand`},onBrand:{derives:`brand`},page:{var:`--color-background`},surface:{var:`--color-panel-solid`,also:[`--color-surface`]},ink:{choice:`ink`},inkMuted:{derives:`ink`},line:{derives:`ink`},radius:{choice:`radius`},baseText:{choice:`baseText`},fontBody:{var:`--default-font-family`},fontHeading:{var:`--heading-font-family`},success:{choice:`brand`,attr:`tone`},warning:{choice:`brand`,attr:`tone`},danger:{choice:`brand`,attr:`tone`},space:{derives:`baseText`},focus:{derives:`brand`},elevation:null,lineHeight:{derives:`baseText`},letterSpacing:{var:`--letter-spacing-3`},fontWeight:null,borderWidth:null},mantine:{_note:`Semantic variables throughout, and all settable at runtime. Its COMPONENT class names are content hashes, which is a separate problem and not this table's.`,brand:{var:`--mantine-primary-color-filled`,also:[`--mantine-primary-color-filled-hover`],tint:[`--mantine-primary-color-light`,`--mantine-primary-color-light-hover`,`--mantine-primary-color-light-color`,`--mantine-color-anchor`]},onBrand:{var:`--mantine-primary-color-contrast`},page:{var:`--mantine-color-body`},surface:{var:`--mantine-color-default`},ink:{var:`--mantine-color-text`},inkMuted:{var:`--mantine-color-dimmed`},line:{var:`--mantine-color-default-border`},radius:{var:`--mantine-radius-default`,also:[`--mantine-radius-xs`,`--mantine-radius-sm`,`--mantine-radius-md`,`--mantine-radius-lg`,`--mantine-radius-xl`]},baseText:{var:`--mantine-font-size-md`,also:[`--mantine-font-size-xs`,`--mantine-font-size-sm`,`--mantine-font-size-lg`,`--mantine-font-size-xl`]},fontBody:{var:`--mantine-font-family`},fontHeading:{var:`--mantine-font-family-headings`},success:{var:`--mantine-color-success`},warning:null,danger:{var:`--mantine-color-error`},space:{var:`--mantine-scale`,scale:!0},focus:null,elevation:{shadows:[`--mantine-shadow-xs`,`--mantine-shadow-sm`,`--mantine-shadow-md`,`--mantine-shadow-lg`,`--mantine-shadow-xl`]},lineHeight:{var:`--mantine-line-height`,also:[`--mantine-line-height-xs`,`--mantine-line-height-sm`,`--mantine-line-height-md`,`--mantine-line-height-lg`,`--mantine-line-height-xl`,`--mantine-h1-line-height`,`--mantine-h2-line-height`,`--mantine-h3-line-height`,`--mantine-h4-line-height`,`--mantine-h5-line-height`,`--mantine-h6-line-height`]},letterSpacing:null,fontWeight:{var:`--mantine-heading-font-weight`,also:[`--mantine-h1-font-weight`,`--mantine-h2-font-weight`,`--mantine-h3-font-weight`,`--mantine-h4-font-weight`,`--mantine-h5-font-weight`,`--mantine-h6-font-weight`]},borderWidth:null},openprops:{_note:`Scales, plus the small semantic layer its normalize ships. Open Props renders nothing itself: it sits under whatever does, so your own CSS agrees with the kit above it.`,brand:{var:`--brand`,new:!0,also:[`--link`]},onBrand:{var:`--surface-1`,new:!0},page:{var:`--surface-1`},surface:{var:`--surface-2`,also:[`--surface-3`]},ink:{var:`--text-1`},inkMuted:{var:`--text-2`},line:{var:`--surface-4`},radius:{var:`--radius-2`,also:[`--radius-1`,`--radius-3`]},baseText:{var:`--font-size-1`,also:[`--font-size-0`,`--font-size-2`,`--font-size-3`]},fontBody:{var:`--font-sans`},fontHeading:{var:`--font-heading`,new:!0},success:{var:`--success`,new:!0},warning:{var:`--warning`,new:!0},danger:{var:`--danger`,new:!0},space:{var:`--size-3`,scale:!0,also:[`--size-1`,`--size-2`,`--size-4`,`--size-5`,`--size-6`,`--size-7`,`--size-8`,`--size-9`]},focus:null,elevation:{shadows:[`--shadow-strength`]},lineHeight:{var:`--font-lineheight-3`,also:[`--font-lineheight-0`,`--font-lineheight-1`,`--font-lineheight-2`,`--font-lineheight-4`,`--font-lineheight-5`]},letterSpacing:null,fontWeight:{var:`--font-weight-7`},borderWidth:{var:`--border-size-1`,also:[`--border-size-2`,`--border-size-3`]}},shadcn:{_note:`Semantic variables by design, unprefixed. --border here is a COLOUR.`,brand:{var:`--primary`},onBrand:{var:`--primary-foreground`},page:{var:`--background`},surface:{var:`--card`,also:[`--popover`]},ink:{var:`--foreground`,also:[`--card-foreground`,`--popover-foreground`]},inkMuted:{var:`--muted-foreground`},line:{var:`--border`,also:[`--input`]},radius:{var:`--radius`},baseText:null,fontBody:{inherits:`the base`},fontHeading:{inherits:`the base`},success:null,warning:null,danger:{var:`--destructive`},space:{inherits:`the base`},focus:{var:`--ring`},elevation:{inherits:`the base`},lineHeight:{inherits:`the base`},letterSpacing:{inherits:`the base`},fontWeight:{inherits:`the base`},borderWidth:{inherits:`the base`}},bootstrap:{_note:"Runtime-themeable for surface, ink, line, radius and type: --bs-border-radius alone is read 105 times. But the BRAND is compiled: .btn-primary hard-codes #0d6efd and `var(--bs-primary)` appears zero times in Bootstrap's own stylesheet, so --bs-primary is informational. Changing it for real is a Sass rebuild.",brand:{var:`--bs-link-color`,also:[`--bs-primary`],rgb:[`--bs-primary-rgb`],needsBuild:{sass:`$primary`,why:`component colours are compiled; setting --bs-primary alone changes links and nothing else`}},onBrand:{needsBuild:{sass:`$primary-text-emphasis`,why:`the same, compiled into each component`}},page:{var:`--bs-body-bg`,tint:[`--bs-secondary-bg`],rgb:[`--bs-body-bg-rgb`]},surface:{var:`--bs-tertiary-bg`},ink:{var:`--bs-body-color`,also:[`--bs-emphasis-color`]},inkMuted:{var:`--bs-secondary-color`,also:[`--bs-tertiary-color`]},line:{var:`--bs-border-color`},radius:{var:`--bs-border-radius`,also:[`--bs-border-radius-sm`,`--bs-border-radius-lg`,`--bs-border-radius-xl`,`--bs-border-radius-xxl`]},baseText:{var:`--bs-body-font-size`},fontBody:{var:`--bs-body-font-family`,also:[`--bs-font-sans-serif`]},fontHeading:{needsBuild:{sass:`$headings-font-family`,why:`Bootstrap has no --bs variable for a heading family; it is compiled from Sass like the brand colour`}},success:{var:`--bs-success`,rgb:[`--bs-success-rgb`],needsBuild:{sass:`$success`,why:`Bootstrap compiles its component colours; setting --bs-success alone changes the emphasis text and nothing else`},tint:[`--bs-success-text-emphasis`,`--bs-success-bg-subtle`,`--bs-success-border-subtle`]},warning:{var:`--bs-warning`,rgb:[`--bs-warning-rgb`],needsBuild:{sass:`$warning`,why:`Bootstrap compiles its component colours; setting --bs-warning alone changes the emphasis text and nothing else`},tint:[`--bs-warning-text-emphasis`,`--bs-warning-bg-subtle`,`--bs-warning-border-subtle`]},danger:{var:`--bs-danger`,rgb:[`--bs-danger-rgb`],needsBuild:{sass:`$danger`,why:`Bootstrap compiles its component colours; setting --bs-danger alone changes the emphasis text and nothing else`},tint:[`--bs-danger-text-emphasis`,`--bs-danger-bg-subtle`,`--bs-danger-border-subtle`]},space:{needsBuild:{sass:`$spacer`,from:e=>`${parseFloat(e)||1}rem`,why:`Bootstrap has no spacing variable at runtime; p-3 and gap-4 are compiled from $spacer`}},focus:{var:`--bs-focus-ring-color`,alphaFrom:`--bs-focus-ring-opacity`},elevation:{shadows:[`--bs-box-shadow`,`--bs-box-shadow-sm`,`--bs-box-shadow-lg`,`--bs-box-shadow-inset`]},lineHeight:{var:`--bs-body-line-height`},letterSpacing:null,fontWeight:{needsBuild:{sass:`$headings-font-weight`,why:`Bootstrap compiles its heading weight; there is no --bs variable for it`}},borderWidth:{var:`--bs-border-width`}},material:{_note:`M3 takes ONE input. Its 47 colour roles (containers, on-colours, inverses, fixed variants) are computed from a seed by material-color-utilities, and the tonal surface ramp is an elevation model, not a set of siblings. So the other colour knobs do not reach this kit, and we say so instead of writing four of forty-seven and calling it themed.`,brand:{var:`--md-sys-color-primary`,seeds:`@material/material-color-utilities`},onBrand:{derives:`brand`},page:{derives:`brand`},surface:{derives:`brand`},ink:{derives:`brand`},inkMuted:{derives:`brand`},line:{derives:`brand`},radius:{var:`--md-sys-shape-corner-medium`,also:[`--md-sys-shape-corner-extra-small`,`--md-sys-shape-corner-small`,`--md-sys-shape-corner-large`,`--md-sys-shape-corner-extra-large`,`--md-sys-shape-corner-xs`,`--md-sys-shape-corner-sm`,`--md-sys-shape-corner-md`,`--md-sys-shape-corner-lg`,`--md-sys-shape-corner-xl`,`--md-sys-shape-corner-xxl`]},baseText:null,fontBody:{var:`--md-ref-typeface-plain`},fontHeading:{var:`--md-ref-typeface-brand`},success:null,warning:null,danger:{var:`--md-sys-color-error`,overrides:`the scheme its generator derives from your seed`,tint:[`--md-sys-color-on-error`,`--md-sys-color-error-container`,`--md-sys-color-on-error-container`]},space:null,focus:null,elevation:null,lineHeight:null,letterSpacing:null,fontWeight:null,borderWidth:null},antd:{_note:`Ant Design publishes no stylesheet and no theme file: 3,056 class rules that read 1,289 variables, and every one of those variables is computed at runtime by its own algorithm out of a handful of SEED tokens. So the knobs here are not variables to write, they are arguments to hand their generator: the same relationship as Material, one layer deeper. The variable each one lands in is named so the swatch can show it, but writing that variable on its own would move one value and leave the two hundred it derives behind.`,brand:{var:`--ant-color-primary`,seed:[`colorPrimary`,`colorInfo`],seeds:`antd`,also:[`--ant-color-info`,`--ant-color-info-text`,`--ant-color-link`,`--ant-progress-default-color`]},onBrand:{derives:`brand`},page:{var:`--ant-color-bg-base`,seed:`colorBgBase`},surface:{var:`--ant-color-bg-container`,seed:`colorBgContainer`},ink:{var:`--ant-color-text-base`,seed:`colorTextBase`},inkMuted:{var:`--ant-color-text-secondary`,seed:`colorTextSecondary`},line:{var:`--ant-color-border`,seed:`colorBorder`},success:{var:`--ant-color-success`,seed:`colorSuccess`},warning:{var:`--ant-color-warning`,seed:`colorWarning`},danger:{var:`--ant-color-error`,seed:`colorError`},focus:{derives:`brand`},radius:{var:`--ant-border-radius`,seed:`borderRadius`,from:K},baseText:{var:`--ant-font-size`,seed:`fontSize`,from:K},borderWidth:{var:`--ant-line-width`,seed:`lineWidth`,from:K},lineHeight:{var:`--ant-line-height`,seed:`lineHeight`,from:Rl},fontWeight:{var:`--ant-font-weight-strong`,seed:`fontWeightStrong`,from:Rl},fontBody:{var:`--ant-font-family`,seed:`fontFamily`},fontHeading:null,space:{seed:`sizeUnit`,from:e=>4*(Rl(e)??1)},elevation:{shadows:[`--ant-box-shadow`,`--ant-box-shadow-secondary`,`--ant-box-shadow-tertiary`]},letterSpacing:null},daisyui:{_note:`Registers into Tailwind's --color-* namespace on purpose. --border here is a WIDTH, not a colour.`,brand:{var:`--color-primary`},onBrand:{var:`--color-primary-content`},page:{var:`--color-base-100`},surface:{var:`--color-base-200`,also:[`--color-base-300`]},ink:{var:`--color-base-content`},inkMuted:null,line:null,radius:{var:`--radius-box`,also:[`--radius-field`,`--radius-selector`]},baseText:null,fontBody:{inherits:`the base`},fontHeading:{inherits:`the base`},success:{var:`--color-success`,tint:[`--color-success-content`]},warning:{var:`--color-warning`,tint:[`--color-warning-content`]},danger:{var:`--color-error`,tint:[`--color-error-content`]},space:{inherits:`the base`},focus:null,elevation:null,lineHeight:{inherits:`the base`},letterSpacing:null,fontWeight:null,borderWidth:{var:`--border`}}};function J(e){let t=q[e]??{};return{missing:Ll.filter(e=>t[e.id]===null).map(e=>e.id),added:Ll.filter(e=>t[e.id]?.new).map(e=>e.id),derived:Ll.filter(e=>t[e.id]?.derives).map(e=>({role:e.id,from:t[e.id].derives})),needsBuild:Ll.filter(e=>t[e.id]?.needsBuild).map(e=>({role:e.id,...t[e.id].needsBuild})),seeds:Object.entries(t).filter(([,e])=>e?.seeds).map(([e,t])=>({role:e,by:t.seeds})),note:t._note}}var Y=/^(?:calc\(\s*)?(-?[\d.]+)(rem|em|px)\b/,X=Object.fromEntries(Ll.map(e=>[e.id,e.kind]));function zl(e,t){let n=Object.entries(t?.of??{});if(!n.length||e==null)return null;if(t.unit===`colour`){let t=/^#[0-9a-f]{6}$/i.test(String(e))?String(e):null;if(!t)return null;let[r,i,a]=Al(t),o=null;for(let[e,t]of n){if(!/^#[0-9a-f]{6}$/i.test(t))continue;let[n,s,c]=Al(t),l=Math.abs(a-c)%360;l>180&&(l=360-l);let u=Math.min(1,Math.min(i,s)/.06),d=Math.hypot((r-n)*1.5,(i-s)*6,l/180*4*u);(!o||d<o.d)&&(o={name:e,value:t,d})}return o&&{...o,distance:Number(o.d.toFixed(3))}}let r=parseFloat(e);if(!Number.isFinite(r))return null;let i=null;for(let[e,t]of n){let n=parseFloat(t);if(!Number.isFinite(n))continue;let a=Math.abs(n-r);(!i||a<i.d)&&(i={name:e,value:t,d:a})}return i&&{...i,distance:Number(i.d.toFixed(3))}}function Bl(e){let t=String(e??``).trim();if(/\/|rgba\(|hsla\(|^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i.test(t))return null;let n=/^rgb\(\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)\s*\)$/i.exec(t),r=e=>{let t=parseFloat(e);return Math.max(0,Math.min(255,Math.round(e.endsWith(`%`)?t/100*255:t)))},i=n?`#`+[n[1],n[2],n[3]].map(e=>r(e).toString(16).padStart(2,`0`)).join(``):/^#[0-9a-f]{6}$/i.test(t)?t:/^#[0-9a-f]{3}$/i.test(t)?`#`+t.slice(1).split(``).map(e=>e+e).join(``):t.startsWith(`oklch`)?Nl(t):null;return i?Al(i):null}function Vl(e,t,n){let r=Bl(e),i=Bl(t),a=Bl(n);if(!r||!i||!a)return null;let o=a[0]-i[0],s=i[1]>.01?a[1]/i[1]:1;return Hl(Math.min(1,Math.max(0,r[0]+o)),Math.max(0,r[1]*s),r[2])}function Hl(e,t,n){for(let r=0;r<=24;r++){let i=1-r/24,a=Ml(e,t*i,n),o=Al(a),s=Math.abs(o[2]-n)%360;if(s>180&&(s=360-s),s<2||t*i<.01)return{hex:a,kept:t<.01?1:i}}return{hex:Ml(e,0,n),kept:0}}var Ul=(e,t)=>String(Number(Math.min(1,Math.max(0,Number(e)*t)).toFixed(4)));function Wl(e){let t=/^#[0-9a-f]{6}$/i.test(String(e))?String(e):String(e).startsWith(`oklch`)?Nl(String(e)):null;return t?[1,3,5].map(e=>parseInt(t.slice(e,e+2),16)).join(`, `):null}function Gl(e,t){let n=(e,t,r=0)=>{if(r>6||typeof t!=`string`)return t;let i=/^var\((--[a-z0-9-]+)\s*(?:,\s*([^)]+))?\)$/i.exec(t.trim());if(!i)return t;let a=e[i[1]]??i[2];return a==null?t:n(e,String(a),r+1)};return e.map(e=>{let r=t[e.kit]?.modes?.light??{},i=t[e.kit]?.modes?.dark;if(!i)return{...e,dark:null,noDarkMode:!0};let a={},o=[];for(let[t,s]of Object.entries(e.vars)){let e=i[t]==null?null:n(i,i[t]),c=r[t]==null?r[t]:n(r,r[t]);if(e==null||e===c){a[t]=s;continue}let l=Vl(s,c,e);if(!l){a[t]=e;continue}if(l.kept<.5){a[t]=s,o.push(t);continue}a[t]=l.hex}return{...e,dark:a,unfit:o,greyscale:o,noDarkMode:!1}})}function Kl(e,t,n={}){return t.map(t=>{let r=q[t];if(!r)throw Error(`no role map for kit "${t}" — add one before listing it`);let i=n[t]?.modes?.light??{},a={},o=[],s=[],c=[],l={},u={};for(let d of Ll){let f=e[d.id];if(f==null)continue;let p=r[d.id];if(!p){o.push(d.id);continue}if(p.shadows){let e=parseFloat(f);if(!Number.isFinite(e)){o.push(d.id);continue}for(let t of p.shadows){let n=String(i[t]??``);if(!n){s.push(t);continue}let r=0,o=n.replace(/(rgba?\([^)]*?[,/]\s*)([\d.]+)(\s*\))/gi,(t,n,i,a)=>(r++,n+Ul(i,e)+a)).replace(/^([\d.]+)%$/,(t,n)=>(r++,`${Number((Number(n)*e).toFixed(4))}%`));r?a[t]=o:s.push(t)}continue}if(p.scale){let e=parseFloat(f);if(!Number.isFinite(e)){o.push(d.id);continue}for(let t of[p.var,...p.also??[]]){let n=String(i[t]??``),r=Y.exec(n);if(r){a[t]=`${Number((Number(r[1])*e).toFixed(4))}${r[2]}`;continue}let o=Number(n);if(n.trim()!==``&&Number.isFinite(o)){a[t]=String(Number((o*e).toFixed(4)));continue}s.push(t)}continue}if(p.seed){let e=p.from?p.from(f):f;if(e!=null)for(let t of[p.seed].flat())u[t]=e}if(p.derives||p.inherits)continue;if(p.choice){let e=n[t]?.choices?.[p.choice],r=zl(f,e);if(!r){o.push(d.id);continue}p.attr!==`tone`&&(l[e.attr]=r.name),c.push({role:d.id,attr:p.attr===`tone`?`tone`:e.attr,picked:r.name,of:Object.keys(e.of).length,asked:f,got:r.value,distance:r.distance,why:e.why});continue}if(!p.var)continue;if(p.alphaFrom){let e=parseFloat(i[p.alphaFrom]),t=Wl(f);a[p.var]=Number.isFinite(e)&&t?`rgba(${t}, ${e})`:f}else a[p.var]=f;for(let e of p.rgb??[]){let t=Wl(f);t?a[e]=t:s.push(e)}let m=(e,t=0)=>{let n=i[e];if(n==null||t>6)return n;let r=/^var\((--[a-z0-9-]+)\)$/i.exec(String(n).trim());return r?m(r[1],t+1):n};for(let e of p.tint??[]){let t=Vl(f,m(p.var),m(e));t?a[e]=t.hex:s.push(e)}let h=p.also??[];if(X[d.id]===`colour`||X[d.id]===`font`){for(let e of h)a[e]=f;continue}let g=X[d.id]===`number`,_=e=>{let t=Y.exec(String(e??``));if(t)return[Number(t[1]),t[2]];if(!g)return null;let n=String(e??``).trim(),r=Number(n);if(n!==``&&Number.isFinite(r))return[r,``];let i=/^calc\(\s*([\d.]+)\s*([*/])\s*([\d.]+)\s*\)$/.exec(n);if(i){let[,e,t,n]=i,r=t===`/`?Number(e)/Number(n):Number(e)*Number(n);return Number.isFinite(r)?[Number(r.toFixed(4)),``]:null}return null},v=_(f),y=_(i[p.var]);for(let e of h){let t=_(i[e]);if(!v||!y||!t||y[0]===0){s.push(e);continue}let n=t[0]/y[0]*v[0];a[e]=`${Number(n.toFixed(4))}${v[1]}`}}return{kit:t,vars:a,attrs:l,tokens:u,chosen:c,unroutable:o,unscaled:s,...J(t)}})}function ql(e){let t=e.trim().match(/^(-?\d*\.?\d+)\s*(px|rem|em|pt)?$/i);if(!t)return null;let n=parseFloat(t[1]);if(!Number.isFinite(n))return null;let r=(t[2]??`px`).toLowerCase();return r===`rem`||r===`em`?n*16:r===`pt`?n*4/3:n}function Jl(e){let t={text:0,surface:0,border:0,icon:0,other:0};for(let n of e.sites){let e=n.prop.toLowerCase();e===`color`?t.text++:e.startsWith(`background`)?t.surface++:e.includes(`border`)||e.includes(`outline`)?t.border++:e===`fill`||e===`stroke`?t.icon++:t.other++}let n=Object.entries(t).sort((e,t)=>t[1]-e[1])[0];return n&&n[1]>0?n[0]:`other`}function Yl(e){let t=new Map;for(let n of e.sites)t.set(n.prop,(t.get(n.prop)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]).map(([e])=>e)}function Xl(e){if(!e)return null;let t=[[`text`,e.text],[`surface`,e.surface],[`border`,e.border]].sort((e,t)=>t[1]-e[1])[0];return t&&t[1]>0?t[0]:null}var Zl=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`];function Ql(e,t,n,r,i={}){let a=i.painted&&i.painted.size?i.painted:null,o=(t,n,r=0)=>r>4||!t.includes(`var(--us-v`)?t:t.replace(/var\(--us-v(\d+)\)/g,(t,i)=>{let a=e.get(Number(i));return a?o(n(a),n,r+1):t}),s=e=>t[No(e.id)]??Io(e.value),c=e=>Io(e.value),l=e=>{let t=o(c(e),c),n=o(s(e),s),r=t=>e.kind===`color`?eu(t):t;return{value:r(n),was:r(t),changed:n!==t,count:e.count,props:Yl(e),painted:a?.get(e.id)?.total??0}},u=(e,t)=>a&&e.painted!==t.painted?t.painted-e.painted:t.count-e.count,d=t=>e.ofKind(t).map(l),f={text:[],surface:[],border:[],icon:[],other:[]};for(let t of e.ofKind(`color`)){let e=Xl(a?.get(t.id));f[e??Jl(t)].push({...l(t),paintRole:e})}for(let e of Object.keys(f))f[e].sort(u);let p=e=>e.filter(e=>{let t=V(e.value);return!t||t.a>=.999}),m=[],h=new Set,g=(e,t,n=!1)=>{!t||h.has(tu(t.value))&&!n||(h.add(tu(t.value)),m.push({...t,name:e}))},_=[...f.text,...f.surface,...f.border,...f.icon,...f.other],v=p(f.text),y=p(f.surface),b=p(f.border),x=e=>e.find(e=>!h.has(tu(e.value))),S=(e,t)=>{if(!e)return;let n=V(e),r=n?Nn(n):eu(e);return{..._.find(e=>tu(e.value)===tu(r))??{value:r,was:r,changed:!1,count:0,props:[],painted:0},anchor:t}};g(`primary`,_.find(e=>e.value.toLowerCase()===n.toLowerCase())??{value:n,was:n,changed:!1,count:0,props:[],painted:0}),g(`text`,S(i.anchors?.text,`text`)??v[0],!0),g(`surface`,S(i.anchors?.background,`surface`)??y[0],!0);let C=e=>{let t=V(e);return t&&t.a>=.999?Nn(t):null},w=C(m.find(e=>e.name===`surface`)?.value??``)??`#ffffff`,T=C(m.find(e=>e.name===`text`)?.value??``),E=e=>V(e)?.C??0,D=x(v);if(D){let e=C(D.value);E(D.value)>=.06?g(`text-accent`,D):e&&T&&xt(e,w)>=3&&xt(e,w)<xt(T,w)&&g(`text-muted`,D)}let O=x(y);O&&(E(O.value)>=.06?g(`fill`,O):g(`surface-alt`,O)),g(`border`,b[0]);let k=e=>$l(e.filter(e=>/^-?\d*\.?\d+\s*(px|rem|pt)?$/i.test(e.value.trim())&&ql(e.value)!==null)),A=(e,t)=>ql(t.value)-ql(e.value),j=(e,t)=>ql(e.value)-ql(t.value),ee=k(d(`font-size`)).filter(e=>{let t=ql(e.value);return t>=8&&t<=200}).sort(A),te=k(d(`radius`)).sort(u).slice(0,5).sort(j).map((e,t)=>{let n=ql(e.value),r=n===0?`none`:n>=999?`full`:Zl[Math.min(t,Zl.length-1)];return{...e,name:r}}),ne=k(d(`space`)).filter(e=>ql(e.value)>0).sort(u).slice(0,6).sort(j).map((e,t)=>({...e,name:Zl[Math.min(t,Zl.length-1)]})),re=e.entries.filter(e=>(t[No(e.id)]??Io(e.value))!==Io(e.value)).length,M=d(`font-family`).sort(u),N=(e,t)=>{let n=e=>e.split(`,`)[0].trim().replace(/^["']|["']$/g,``).toLowerCase(),r=e.replace(/^Custom:\s*/,``).toLowerCase(),i=M.find(e=>n(e.value)===r);return i?i.value:/^system$/i.test(e)?M.find(e=>/^(system-ui|-apple-system|ui-sans-serif)/i.test(e.value))?.value??M[0]?.value??`system-ui, sans-serif`:e};return{brand:n,colors:f,palette:nu(m),fonts:{display:N(r.display,`display`),body:N(r.body,`body`),stacks:M},sizes:ee,radii:nu(te),spacing:nu(ne),shadows:d(`shadow`).sort(u),lineHeights:d(`line-height`).sort(u),weights:d(`font-weight`).sort(u),anchors:i.anchors??{},fromScreen:a!==null,totals:{values:e.entries.length,moved:re}}}function $l(e){let t=new Map;for(let n of e){let e=Math.round(ql(n.value)*100)/100,r=t.get(e);!r||n.count>r.count?t.set(e,r?{...n,count:n.count+r.count,painted:n.painted+r.painted}:n):(r.count+=n.count,r.painted+=n.painted)}return[...t.values()]}function eu(e){let t=kn(e),n=V(t===`hsl-triplet`?`hsl(${e.replace(/^hsl:/,``)})`:t===`rgb-triplet`?`rgb(${e})`:e);return n?Nn(n):e}var tu=e=>eu(e).toLowerCase();function nu(e){let t=new Map;return e.map(e=>{let n=t.get(e.name)??0;return t.set(e.name,n+1),n===0?e:{...e,name:`${e.name}-${n+1}`}})}function ru(e){let t=q[e]??{};return Ll.map(e=>t[e.id]?.var).filter(e=>!!e)}function iu(e,t){let n=q[e]??{},r={};for(let e of Ll){let i=n[e.id]?.var,a=i?t[i]?.trim():void 0;if(!a)continue;let o=ou(e.id,a);o!==void 0&&(r[e.id]=o)}return r}function au(e,t){let n=(e.defaultView??globalThis).getComputedStyle(e.documentElement);return iu(t,Object.fromEntries(ru(t).map(e=>[e,n.getPropertyValue(e).trim()])))}function ou(e,t){switch(X[e]){case`colour`:{let e=V(t);return e&&e.a>=.999?Nn(e):void 0}case`length`:{let e=ql(t);return e===null?void 0:`${e}px`}case`number`:{let e=parseFloat(t);return Number.isFinite(e)?e:void 0}case`font`:return t;default:return}}var su=[`color`,`background-color`,`background-image`,`border-top-color`,`border-bottom-color`,`border-top-left-radius`,`border-bottom-right-radius`,`font-family`,`font-size`,`padding-top`,`padding-left`,`margin-top`,`margin-left`,`gap`,`box-shadow`,`outline-color`,`fill`,`stroke`],cu=40;function lu(e){let t=[];for(let n of Array.from(e.querySelectorAll(`iframe`))){let e=null;try{e=n.contentDocument}catch{e=null}e&&e.body&&t.push(e,...lu(e))}return t}function uu(e){let t=[],n=e=>{for(let r of Array.from(e.querySelectorAll(`*`)))if(t.push(r),r.shadowRoot&&n(r.shadowRoot),r.tagName===`IFRAME`){let e=null;try{e=r.contentDocument}catch{e=null}e?.body&&n(e.body)}};return n(e),t}function du(e,t){let n=[],r=e;for(;r&&(r.tagName!==`BODY`||r.ownerDocument!==t);){let e=r.tagName.toLowerCase(),t=(r.getAttribute(`class`)??``).trim().split(/\s+/).filter(e=>e&&!/\d/.test(e)).slice(0,3).join(`.`),i=r.id&&!/[\d:]/.test(r.id)?`#${r.id}`:``,a=0,o=r.previousElementSibling;for(;o;)o.tagName===r.tagName&&a++,o=o.previousElementSibling;n.push(`${e}${i}${t?`.`+t:``}:${a}`);let s=r.parentElement;if(!s){let e=r.getRootNode();if(e.nodeType===11&&e.host){n.push(`#shadow`),r=e.host;continue}if(e.nodeType===9){let t=null;try{t=e.defaultView?.frameElement??null}catch{t=null}if(t){n.push(`#frame`),r=t;continue}}}r=s}return n.reverse().join(`>`)}var fu=e=>e.replace(/url\(("|')?#([A-Za-z_-]+)\d+\1?\)/g,`url(#$2N)`);function pu(e){let t=[],n=e;for(;n;){let r=n.activeElement;if(!r||r===e.body||t.includes(r))break;t.push(r);let i=null;if(r.tagName===`IFRAME`)try{i=r.contentDocument}catch{i=null}n=r.shadowRoot??i}for(let e of t.reverse())e.blur?.()}function mu(e,t,n=su){if(!e.getElementById(`us-guard`)||!t.getElementById(`us-guard`))return{ok:!1,refusal:`The sandbox did not serve this screen (the worker is gone or the page left the sandbox) — nothing of yours was compared.`,elements:0,unpaired:{raw:0,sandbox:0},mismatches:[]};pu(e),pu(t);let r=uu(e.body).filter(e=>!gu(e)&&hu(e)),i=uu(t.body).filter(e=>!gu(e)&&hu(e));if(!r.length||!i.length)return{ok:!1,refusal:`One of the documents has no elements to compare.`,elements:0,unpaired:{raw:r.length,sandbox:i.length},mismatches:[]};let a=new Map;for(let e of i){let n=du(e,t);a.has(n)||a.set(n,e)}let o=e.defaultView,s=t.defaultView,c=[],l=0,u=new Set;r.forEach((t,r)=>{let i=du(t,e),d=a.get(i);if(!d||u.has(i)||(u.add(i),l++,c.length>=cu))return;let f=(t.ownerDocument.defaultView??o).getComputedStyle(t),p=(d.ownerDocument.defaultView??s).getComputedStyle(d);for(let e of n){let n=f.getPropertyValue(e),i=p.getPropertyValue(e);n!==i&&fu(n)!==fu(i)&&c.push({index:r,tag:t.tagName.toLowerCase(),prop:e,raw:n,sandbox:i})}});let d={raw:r.length-l,sandbox:i.length-l};return l<Math.min(r.length,i.length)*.5?{ok:!1,refusal:`Only ${l} of ${Math.min(r.length,i.length)} elements could be paired: the two loads render too differently to compare.`,elements:l,unpaired:d,mismatches:c}:{ok:c.length===0,elements:l,unpaired:d,mismatches:c}}function hu(e){let t=e;for(;t;){let e=t.parentElement;if(e){if(e.shadowRoot&&!t.assignedSlot)return!1;t=e;continue}let n=t.getRootNode();t=n.nodeType===11&&n.host?n.host:null}return!0}var gu=e=>e.id===`us-vars`||e.id===`us-still`||e.id===`us-fonts`||e.id===`us-hook`||e.id===`us-guard`||e.tagName===`IMG`;function _u(e,t,n,r){return new Promise((i,a)=>{let o=document.createElement(`iframe`);o.style.cssText=`position:absolute;left:-10000px;top:0;width:${n}px;height:${r}px;visibility:hidden;border:0`,o.setAttribute(`aria-hidden`,`true`),o.setAttribute(`sandbox`,`allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-pointer-lock allow-orientation-lock`),o.onload=async()=>{try{let e=o.contentDocument;if(!e)throw Error(`no document`);let t=Date.now(),n=()=>Array.from(e.querySelectorAll(`link[rel~="stylesheet"]`)).some(e=>!e.sheet);for(;n()&&Date.now()-t<4e3;)await new Promise(e=>setTimeout(e,100));await e.fonts?.ready;let r=Date.now();for(;Array.from(e.images).some(e=>!e.complete)&&Date.now()-r<4e3;)await new Promise(e=>setTimeout(e,100));let a=Date.now(),s=-1,c=Date.now();for(;Date.now()-a<6e3;){let t=e.body?uu(e.body).length:0;if(t!==s)s=t,c=Date.now();else if(Date.now()-c>=600)break;await new Promise(e=>setTimeout(e,150))}let l=e.createElement(`style`);l.id=`us-still`,l.textContent=`*,*::before,*::after{transition-duration:0s!important;transition-delay:0s!important;animation-duration:0s!important;animation-delay:0s!important}`,(e.head??e.documentElement).appendChild(l),await new Promise(e=>setTimeout(e,250)),i({frame:o,doc:e})}catch(e){a(e)}},o.onerror=()=>a(Error(`frame failed to load`)),setTimeout(()=>{let e=o.contentDocument;e?.body&&i({frame:o,doc:e})},15e3),o.src=e,t.appendChild(o)})}var vu=(e,t,n)=>`${e},${t},${n}`,yu=(e,t,n)=>{let r=e.get(t);r?r.push(n):e.set(t,[n])},bu=new Set([`0,0,238`,`85,26,139`,`118,118,118`,`239,239,239`,`16,16,16`,`133,133,133`]),xu=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);return t?t[4]!==void 0&&parseFloat(t[4])===0?`transparent`:vu(+t[1],+t[2],+t[3]):null};function Su(e){let t=kl(e);return{kit:t,kitValues:t?au(e,t):{}}}function Cu(e,t,n){let r=e.defaultView,i=new Map,a=new Map,o=new Map,s=new Map,c=new Map,l=parseFloat(r.getComputedStyle(e.documentElement).fontSize)||16,u=new Map,d=new Map,f=e.createElement(`i`);f.style.cssText=`position:absolute;left:-9999px;top:0;width:0;height:0;overflow:hidden`,(e.body??e.documentElement).appendChild(f);let p=r.getComputedStyle(f);try{for(let e of t.entries){let t=n[No(e.id)]??e.value,r=t.replace(/^hsl:/,``);if(e.kind===`color`){let n=t.startsWith(`hsl:`)?`hsl(${r})`:/^\d{1,3}(\s*,\s*|\s+)\d{1,3}(\s*,\s*|\s+)\d{1,3}$/.test(r)?`rgb(${r})`:r;f.style.color=``,f.style.color=n;let a=xu(p.color);if(a&&a!==`transparent`)yu(i,a,e.id);else{let t=V(r);if(t){let[n,r,a]=Tu(t.L,t.C,t.H);yu(i,vu(n,r,a),e.id)}}}else if(e.kind===`font-family`)yu(a,r.split(`,`)[0].trim().replace(/^["']|["']$/g,``).toLowerCase(),e.id);else if(e.kind===`font-size`){let t=r.match(/^(-?\d*\.?\d+)em$/);if(t){yu(u,+t[1],e.id);continue}f.style.fontSize=``,f.style.fontSize=r;let n=parseFloat(p.fontSize);n&&yu(o,Math.round(n*2)/2,e.id)}else if(e.kind===`radius`){let t=r.match(/^(-?\d*\.?\d+)em$/);if(t){yu(d,+t[1],e.id);continue}f.style.borderTopLeftRadius=``,f.style.borderTopLeftRadius=r;let n=parseFloat(p.borderTopLeftRadius);Number.isFinite(n)&&yu(s,Math.round(n*2)/2,e.id)}}}finally{f.remove()}let m={colours:{hit:0,total:0},fonts:{hit:0,total:0},sizes:{hit:0,total:0},radii:{hit:0,total:0},outside:{images:0,canvas:0,video:0,backgroundImages:0},elements:0,painted:c,anchors:wu(e,r),...Su(e)},h=uu(e.body).filter(hu).slice(0,4e3),g=(e,t)=>{for(let[n,r]of e)if(Math.abs(n-t)<=.75)return r;return null},_=(e,t,n)=>{for(let[r,i]of e)if(Math.abs(r*n-t)<=.75)return i;return null},v=(e,t=null)=>{if(!e)return!1;for(let n of e){let e=c.get(n);e||(e={text:0,surface:0,border:0,total:0},c.set(n,e)),e.total++,t&&e[t]++}return!0};for(let e of h){if(e.tagName===`SCRIPT`||e.tagName===`STYLE`)continue;let t=e.getBoundingClientRect();if(t.width<2||t.height<2)continue;if(m.elements++,e.tagName===`IMG`||e.tagName===`PICTURE`){m.outside.images++;continue}if(e.tagName===`CANVAS`){m.outside.canvas++;continue}if(e.tagName===`VIDEO`){m.outside.video++;continue}let n=e.ownerDocument.defaultView??r,c=n.getComputedStyle(e),f=xu(c.backgroundColor);if(f&&f!==`transparent`&&(!bu.has(f)||i.has(f))&&(m.colours.total++,v(i.get(f),`surface`)&&m.colours.hit++),c.backgroundImage&&c.backgroundImage!==`none`&&/url\((?!"data:image\/svg)/.test(c.backgroundImage)&&m.outside.backgroundImages++,parseFloat(c.fontSize)>0&&Array.from(e.childNodes).some(e=>e.nodeType===3&&(e.textContent??``).trim().length>0)){let t=xu(c.color);t&&t!==`transparent`&&(!bu.has(t)||i.has(t))&&(m.colours.total++,v(i.get(t),`text`)&&m.colours.hit++);let r=c.fontFamily.split(`,`)[0].trim().replace(/^["']|["']$/g,``).toLowerCase();/^(monospace|serif|sans-serif|system-ui|ui-monospace|cursive|fantasy)$/.test(r)&&!a.has(r)||(m.fonts.total++,(v(a.get(r))||a.size===0)&&m.fonts.hit++),m.sizes.total++;let s=parseFloat(c.fontSize),d=e.parentElement?parseFloat(n.getComputedStyle(e.parentElement).fontSize):l;(v(g(o,s))||v(_(u,s,d))||o.size===0&&u.size===0)&&m.sizes.hit++}if(parseFloat(c.borderTopWidth)>0){let e=xu(c.borderTopColor);e&&e!==`transparent`&&(!bu.has(e)||i.has(e))&&(m.colours.total++,v(i.get(e),`border`)&&m.colours.hit++)}let p=parseFloat(c.borderTopLeftRadius);p>0&&p<100&&p<Math.min(t.width,t.height)/2-.5&&(m.radii.total++,(v(g(s,p))||v(_(d,p,parseFloat(c.fontSize))))&&m.radii.hit++)}return m}function wu(e,t){try{if(!e.body)return{};let n=t.getComputedStyle(e.body),r=t.getComputedStyle(e.documentElement),i=e=>e&&!/^rgba\(0, 0, 0, 0\)$|^transparent$/.test(e)?e:void 0,a=n=>{if(!n)return;let r=n.getBoundingClientRect();if(n!==e.body&&(r.width<2||r.height<2))return;let i=t.getComputedStyle(n);if(parseFloat(i.fontSize))return{fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight,lineHeight:i.lineHeight}},o=n=>{let r=null,i=0;for(let a of Array.from(e.querySelectorAll(n)).slice(0,40)){let e=a.getBoundingClientRect();if(e.width<2||e.height<2)continue;let n=parseFloat(t.getComputedStyle(a).fontSize);n>i&&(i=n,r=a)}return r};return{text:i(n.color),background:i(n.backgroundColor)??i(r.backgroundColor),type:{body:a(e.body),display:a(o(`h1`)),heading:a(o(`h2, h3`))}}}catch{return{}}}function Tu(e,t,n){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,c=e-.0894841775*i-1.291485548*a,l=o**3,u=s**3,d=c**3;return[4.0767416621*l-3.3077115913*u+.2309699292*d,-1.2684380046*l+2.6097574011*u-.3413193965*d,-.0041960863*l-.7034186147*u+1.707614701*d].map(e=>{let t=e<=.0031308?12.92*e:1.055*Math.max(e,0)**(1/2.4)-.055;return Math.round(Math.max(0,Math.min(1,t))*255)})}var Eu=e=>e.total?Math.round(100*e.hit/e.total):100,Du=[{id:`fetch`,label:`Fetching`},{id:`read`,label:`Reading & tokenising`},{id:`derive`,label:`Deriving the knobs`},{id:`open`,label:`Opening`}],Ou=e=>e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`,ku=e=>`${e.name}${e.version?` `+e.version:``}`,Au=(e,t=` `)=>Object.entries(e).map(([e,n])=>`${t}${e}: ${n};`).join(`
|
|
27
|
+
`),ju={tailwind:(e,t)=>`/* ${ku(t)}: semantic names Tailwind does not ship.
|
|
28
|
+
These generate utilities: bg-brand, text-ink, border-line, rounded-lg. */
|
|
29
|
+
@theme {
|
|
30
|
+
${Au(e.vars)}
|
|
31
|
+
}`,shadcn:(e,t)=>{let n={...t.modes.light,...e.vars},r=Object.fromEntries(Object.keys(n).filter(e=>e!==`--radius`).map(e=>[e.replace(/^--/,`--color-`),`var(${e})`])),i=n[`--radius`];return`/* ${ku(t)}: the variables its components read, its published
|
|
32
|
+
defaults with your values over them. The dark half is below. */
|
|
33
|
+
:root {
|
|
34
|
+
${Au(n)}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* The bridge into Tailwind's namespace, so bg-primary and border-input exist.
|
|
38
|
+
Without it the variables above are set and nothing reads them. */
|
|
39
|
+
@theme inline {
|
|
40
|
+
${Au(r)}${i?`
|
|
41
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
42
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
43
|
+
--radius-lg: var(--radius);
|
|
44
|
+
--radius-xl: calc(var(--radius) + 4px);`:``}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* The base layer shadcn's own installation prescribes, and the third thing this
|
|
48
|
+
* kit has needed that we were not sending.
|
|
49
|
+
*
|
|
50
|
+
* Its components use the BARE border utility, which in Tailwind v4 sets a
|
|
51
|
+
* width and leaves the colour at currentColor. (No backticks in here: this
|
|
52
|
+
* whole block is a JS template literal, and one backtick in a comment breaks
|
|
53
|
+
* the file at a line far from the edit. Fourth time.) Without this rule every card,
|
|
54
|
+
* input and table in a shadcn app draws its border in the TEXT colour — a
|
|
55
|
+
* near-black hairline where a #e5e5e5 one belongs. It looked wrong on the wall
|
|
56
|
+
* and it was wrong in the package we hand people. */
|
|
57
|
+
@layer base {
|
|
58
|
+
* { @apply border-border outline-ring/50; }
|
|
59
|
+
body { @apply bg-background text-foreground; }
|
|
60
|
+
}`},daisyui:(e,t)=>`/* ${ku(t)}: a named theme, registered as the default.
|
|
61
|
+
Their published defaults with your values over them: a theme block replaces
|
|
62
|
+
the theme, so anything left out would be missing rather than inherited.
|
|
63
|
+
SET data-theme="yourkit" ON YOUR <html>. A dark theme is registered below with
|
|
64
|
+
prefersdark, which is the flag daisyUI's own dark theme uses to beat
|
|
65
|
+
default:true the moment a visitor's OS is dark. Without one of ours there,
|
|
66
|
+
theirs won and none of these values applied, which is exactly what happened
|
|
67
|
+
the first time, and turned the whole wall its factory purple. */
|
|
68
|
+
@plugin "daisyui/theme" {
|
|
69
|
+
name: "yourkit";
|
|
70
|
+
default: true;
|
|
71
|
+
${Au(t.plain?.light??{})}
|
|
72
|
+
${Au({...t.modes.light,...e.vars})}
|
|
73
|
+
}`,bootstrap:(e,t)=>`/* ${ku(t)}: what a running page can change.
|
|
74
|
+
The brand is NOT here: see _custom.scss. \`var(--bs-primary)\` appears zero
|
|
75
|
+
times in Bootstrap's own stylesheet, so setting it would change nothing. */
|
|
76
|
+
:root {
|
|
77
|
+
${Au(e.vars)}
|
|
78
|
+
}`,material:(e,t)=>`/* ${ku(t)}: the seed and the corner ramp.
|
|
79
|
+
M3 computes its other 46 colour roles from the seed; generate them with
|
|
80
|
+
@material/material-color-utilities rather than setting them by hand. */
|
|
81
|
+
:root {
|
|
82
|
+
${Au(e.vars)}
|
|
83
|
+
}`,radix:(e,t)=>`/* ${ku(t)}: the half that IS a variable.
|
|
84
|
+
The other half is on your <Theme>:
|
|
85
|
+
${Mu(e)||`(no choices matched)`}
|
|
86
|
+
Set those there, not here: Radix's accent is a twelve-step scale it ships,
|
|
87
|
+
and one step written by hand is eleven steps out of step. */
|
|
88
|
+
${Ru.radix} {
|
|
89
|
+
${Au(e.vars)}
|
|
90
|
+
}`,mantine:(e,t)=>`/* ${ku(t)}: its variables, all settable at runtime.
|
|
91
|
+
Its COMPONENT class names are content hashes (.m_77c9d27d is Button), so use
|
|
92
|
+
its React components; these variables are what they read.
|
|
93
|
+
The selector is theirs, not :root: Mantine's own block is
|
|
94
|
+
:root[data-mantine-color-scheme='light'] and a plain :root loses the tie. */
|
|
95
|
+
${Ru.mantine} {
|
|
96
|
+
${Au(e.vars)}
|
|
97
|
+
}`,antd:(e,t)=>`/* ${ku(t)}: the leftovers.
|
|
98
|
+
Ant Design derives everything from the tokens in antd.theme.ts next to this
|
|
99
|
+
file; do not write these by hand unless you mean to overrule its algorithm.
|
|
100
|
+
The shadows are here because its token API takes no strength. */
|
|
101
|
+
.antd {
|
|
102
|
+
${Au(e.vars)}
|
|
103
|
+
}`,openprops:(e,t)=>`/* ${ku(t)}: variables only. Open Props ships no components.
|
|
104
|
+
Loaded UNDER whatever renders, so your own CSS agrees with it. */
|
|
105
|
+
${Ru.openprops} {
|
|
106
|
+
${Au(e.vars)}
|
|
107
|
+
}`},Mu=e=>Object.entries(e.attrs??{}).map(([e,t])=>`${e}="${t}"`).join(` `),Nu={bootstrap:(e,t,n)=>({"_custom.scss":`// ${ku(t)}: the half a running page cannot change.
|
|
108
|
+
// Bootstrap compiles component colours, so the brand is a build-time variable.
|
|
109
|
+
// Import this INSTEAD of plain bootstrap.css:
|
|
110
|
+
//
|
|
111
|
+
// @import "custom";
|
|
112
|
+
//
|
|
113
|
+
${e.needsBuild.filter(e=>n[e.role]!=null&&!String(e.sass).startsWith(`--`)).map(e=>`${e.sass}: ${e.from?e.from(n[e.role]):n[e.role]}; // ${e.why}`).join(`
|
|
114
|
+
`)||`// nothing here needs a build-time value`}
|
|
115
|
+
|
|
116
|
+
@import "bootstrap/scss/bootstrap";
|
|
117
|
+
`}),antd:e=>({"antd.theme.ts":`// The theme, because Ant Design has no stylesheet to edit.
|
|
118
|
+
// Its 1,289 variables are computed from these by its own algorithm, so this
|
|
119
|
+
// object is the whole of your kit — a variable written by hand would move one
|
|
120
|
+
// value and leave the two hundred derived from it behind.
|
|
121
|
+
import type { ThemeConfig } from 'antd'
|
|
122
|
+
|
|
123
|
+
export const theme: ThemeConfig = {
|
|
124
|
+
cssVar: { key: 'antd' },
|
|
125
|
+
hashed: false,
|
|
126
|
+
token: ${JSON.stringify(e.tokens??{},null,4).replace(/\n/g,`
|
|
127
|
+
`)},
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// <ConfigProvider theme={theme}> around your app, and nothing else to import.
|
|
131
|
+
`}),shadcn:()=>({"components.json":JSON.stringify({$schema:`https://ui.shadcn.com/schema.json`,style:`new-york`,rsc:!0,tsx:!0,tailwind:{config:``,css:`app/globals.css`,baseColor:`neutral`,cssVariables:!0},aliases:{components:`@/components`,ui:`@/components/ui`,utils:`@/lib/utils`}},null,2)+`
|
|
132
|
+
`})},Pu={tailwind:e=>[`npm install ${e.npm}@${e.version}`,`/* then in your CSS: */ @import "tailwindcss";`],daisyui:e=>[`npm install ${e.npm}@${e.version}`,`/* in your CSS: */ @plugin "daisyui";`,`<!-- and on your <html>, or daisyUI's own dark theme wins whenever the -->`,`<!-- visitor's OS is dark: it registers with prefersdark, which beats -->`,`<!-- our default:true. This is not optional. -->`,`<html data-theme="yourkit">`],bootstrap:e=>[`npm install ${e.npm}@${e.version} sass`,`/* build _custom.scss instead of importing bootstrap.css */`],material:e=>[`npm install ${e.npm}@${e.version} @material/material-color-utilities`,`<!-- Material's components are custom elements, not classes: import the -->`,`<!-- ones you use, or <md-filled-button> renders as an unknown tag. -->`,`import '@material/web/button/filled-button.js'`,`import '@material/web/textfield/outlined-text-field.js' // and so on`,`/* their typography classes ship in the package too: */`,`import { styles } from '@material/web/typography/md-typescale-styles.js'`],shadcn:e=>[`npx shadcn@latest init`,`npx shadcn@latest add button card input dialog table # whatever you picked`,...e.animates?[`npm install ${e.animates.npm}@${e.animates.version}`,`/* in your globals.css, as shadcn's own init writes it: */`,`@import "tw-animate-css";`,`/* their menu, dialog, popover and tooltip name ten utilities that live */`,`/* in that package and nowhere else. Without it those classes have no */`,`/* rule and every one of those components appears with no entrance. */`]:[]],antd:e=>[`npm install ${e.npm}@${e.version}`,`<!-- No stylesheet. Ant Design generates its CSS from the theme object -->`,`<!-- in antd.theme.ts, so the provider IS the installation. -->`,`import { ConfigProvider } from 'antd'`,`import { theme } from './antd.theme'`,`<ConfigProvider theme={theme}>`],radix:(e,t)=>[`npm install ${e.npm}@${e.version}`,`import '@radix-ui/themes/styles.css'`,`<!-- the choices go on the Theme root, not in CSS: -->`,`<Theme ${Mu(t)||`accentColor="indigo"`}>`],mantine:e=>[`npm install ${e.npm}@${e.version}`,`import '@mantine/core/styles.css'`,`<!-- use its React components; the class names in its stylesheet are -->`,`<!-- content hashes and are not an API you write by hand. -->`,`<MantineProvider>`],openprops:e=>[`npm install ${e.npm}@${e.version}`,`/* the scales, then your theme.css after them */`,`@import "open-props/style";`,`@import "open-props/normalize";`]},Fu={bootstrap:[[`footer`,`Bootstrap ships a navbar but no footer component; the one on the wall is its own utilities on plain markup`],[`chart`,`and no chart, so the bars are its own colour utilities on plain markup`],[`empty`,`and no empty state`]],shadcn:[[`footer`,`shadcn ships no footer; the one on the wall is its own tokens on plain markup`],[`chart`,`its chart is Recharts in React, which cannot be a class name; the bars here are its own --chart-1 and --chart-2, the same five colours its installation ships`]],radix:[[`navbar`,`Radix Themes ships no navigation bar; the one on the wall is rt-Link and rt-Heading in a flex row`],[`footer`,`and no footer either, the same with rt-Grid`],[`sidenav`,`and no sidebar: its TabNav runs horizontally, so the rail is rt-Text and rt-Badge rows on its own accent scale`],[`breadcrumb`,`and no breadcrumb, so rt-Link with a separator`],[`list`,`and no list; DataList is for a label and a value, which is what the key-and-value card really uses`],[`chart`,`and no chart, so the bars are its accent scale at steps 9 and 6`]],mantine:[[`navbar`,`the header and footer come from AppShell, which normally positions them for a whole app shell; on the wall they sit in flow`],[`chart`,`charts live in @mantine/charts, a separate package this page does not load; the bars are its own primary colour`]],daisyui:[[`chart`,`daisyUI ships no chart; the bars are its own primary colour on plain markup`],[`empty`,`and no empty state`]],tailwind:[[`chart`,`Tailwind ships utilities, not components, so everything on this wall is composed, the chart included`]],antd:[[`chart`,`Ant Design ships no chart; charts live in @ant-design/charts, a separate package, so the bars here are its own primary at two fills`],[`stack`,`their layout is Flex and Space, which are components; a column of ours is their spacing on a plain div`],[`sidenav`,`their Menu in inline mode is the sidebar, and it is theirs, but the rail on this wall has a count on one row, which their item API has no slot for, so that badge sits in the label`]],material:[[`navbar`,`M3 has a top app bar in the specification; @material/web ships only a bottom navigation bar, so the header is its tokens on plain markup`],[`footer`,`no footer in the specification or the package`],[`mediacard`,`no media card: md-outlined-card has no image slot, so the picture area is a plain div on their surface tokens`],[`layout`,`Material publishes colour and shape tokens but no spacing scale, and ships no layout components, so spacing between elements is yours to decide`],[`table`,`@material/web ships no data table, though the M3 spec describes one`],[`avatar`,`@material/web ships no avatar; compose one from its shape and colour tokens`],[`alert`,`@material/web ships no inline alert or banner; the closest is md-filled-card re-toned with its own container token`],[`breadcrumb`,`no breadcrumb in the specification or the package`],[`chart`,`and no chart, so the bars are its primary and primary-container tokens`],[`empty`,`and no empty state`],[`sidenav`,`M3 has a navigation drawer and @material/web ships it in labs, where it positions itself for a whole app shell; the rail on the wall is md-list, which is what a drawer is made of`]]};function Iu(e){let t=[];for(let[n,r]of Object.entries(e??{})){let e=/^'([^']+)'/.exec(String(r??``));!e||t.some(t=>t.family===e[1])||t.push({role:n,family:e[1]})}return t}var Lu=e=>e.length?`<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n<link rel="stylesheet" href="https://fonts.googleapis.com/css2?${e.map(e=>`family=${encodeURIComponent(e).replace(/%20/g,`+`)}:wght@400;500;600;700`).join(`&`)}&display=swap">`:``,Ru={mantine:`:root[data-mantine-color-scheme='light'], [data-mantine-color-scheme='light']`,radix:`.radix-themes`,openprops:`:where(html)`},zu=e=>Ru[e]??`:root`,Bu=new Set([`bootstrap`,`radix`,`mantine`,`material`,`openprops`]),Vu={tailwind:null,daisyui:`theme`,shadcn:`.dark, [data-theme="dark"]`,bootstrap:`[data-bs-theme="dark"]`,material:`@media (prefers-color-scheme: dark)`,radix:`.dark, .dark-theme`,mantine:`:root[data-mantine-color-scheme='dark'], [data-mantine-color-scheme='dark']`,openprops:`@media (prefers-color-scheme: dark)`,antd:`algorithm`};function Hu(e,t){let n=[];for(let r of e)for(let i of Object.keys(r.vars))for(let a of e){if(a.kit===r.kit)continue;let e=Object.assign({},...Object.values(t[a.kit]?.modes??{}));i in e&&(i in a.vars||n.push({variable:i,written:r.kit,read:a.kit,theirValue:e[i]}))}return n}function Uu(e,t){let n=Vu[e.kit];if(!n||!e.dark)return``;if(n===`algorithm`)return`/* ${t.name} in the dark: an ALGORITHM, not a selector.
|
|
133
|
+
theme.darkAlgorithm over the same tokens, set in antd.theme.ts:
|
|
134
|
+
import { theme as antdTheme } from 'antd'
|
|
135
|
+
<ConfigProvider theme={{ ...theme, algorithm: antdTheme.darkAlgorithm }}>
|
|
136
|
+
Nothing to write here; a block of variables would overrule the generator. */`;let r=`/* ${t.name} in the dark: your values through this kit's own
|
|
137
|
+
published light-to-dark relationship, in the switch it actually reads. */`;if(e.kit===`daisyui`)return`${r}
|
|
138
|
+
@plugin "daisyui/theme" {
|
|
139
|
+
name: "yourkitdark";
|
|
140
|
+
prefersdark: true;
|
|
141
|
+
color-scheme: dark;
|
|
142
|
+
${Au({...t.modes.dark,...e.dark})}
|
|
143
|
+
}`;let i=Bu.has(e.kit)?e.dark:{...t.modes.dark,...e.dark};return n.startsWith(`@media`)?`${r}
|
|
144
|
+
${n} {
|
|
145
|
+
${zu(e.kit)} {
|
|
146
|
+
${Au(i,` `)}
|
|
147
|
+
}
|
|
148
|
+
}`:`${r}
|
|
149
|
+
${n} {
|
|
150
|
+
${Au(i)}
|
|
151
|
+
}`}function Wu(e,t,n,r={}){let i=Gl(Kl(e,t,n),n),a={},o={},s=i.flatMap(t=>{let r=n[t.kit];if(!r)throw Error(`no fetched values for "${t.kit}", run fetch-kits.mjs`);let i=ju[t.kit];if(!i)throw Error(`no emitter for "${t.kit}": a kit without one would ship an empty theme`);Object.assign(a,Nu[t.kit]?.(t,r,e)??{});let s=[i(t,r),Uu(t,r)].filter(Boolean);return o[t.kit]=s.join(`
|
|
152
|
+
|
|
153
|
+
`),s});a[`theme.css`]=`/* YOUR DESIGN SYSTEM
|
|
154
|
+
*
|
|
155
|
+
* Generated from ${i.length} kit${i.length>1?`s`:``} and ${Object.keys(e).length} values.
|
|
156
|
+
* Every variable below belongs to the kit that publishes it — nothing here is
|
|
157
|
+
* ours. Read MANIFEST.md for what could not be set and why.
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
${s.join(`
|
|
161
|
+
|
|
162
|
+
`)}
|
|
163
|
+
`,a[`install.md`]=`# Install
|
|
164
|
+
|
|
165
|
+
${i.map(e=>{let t=n[e.kit],r=t.runsIn,i=r?`> ${r.framework?`**${r.framework} only.** `:`**Any framework.** `}${r.what}.\n\n`:``;return`## ${t.name}\n\n${i}\`\`\`bash\n${(Pu[e.kit]?.(t,e)??[]).join(`
|
|
166
|
+
`)}\n\`\`\`\n`}).join(`
|
|
167
|
+
`)}
|
|
168
|
+
Then import \`theme.css\` after the kits, so your values win.
|
|
169
|
+
`,a[`MANIFEST.md`]=qu(i,n,e,r),a[`DESIGN.md`]=Xu(i,n,e,r);let c=`.claude/skills/${Qu(r.name)}/SKILL.md`;a[c]=ed(i,n,e,r);let l=`# ${r.name??`This project`}
|
|
170
|
+
|
|
171
|
+
Before writing or changing ANY user interface, be it a colour, a spacing, a
|
|
172
|
+
component or a screen, read \`DESIGN.md\` in this directory and follow it.
|
|
173
|
+
|
|
174
|
+
It carries the design system: the values, where each one comes from, what this
|
|
175
|
+
stack cannot express, and the rules for working inside it. It is generated, so
|
|
176
|
+
do not edit it by hand; change it where it was made and export again.
|
|
177
|
+
|
|
178
|
+
The working rules — composition, motion, icons, states, the self-checks — are
|
|
179
|
+
the skill at \`${c}\`. Claude Code loads it on its own for UI work;
|
|
180
|
+
every other tool should read it like a second page of this file.
|
|
181
|
+
|
|
182
|
+
Two things it will tell you that are easy to get wrong:
|
|
183
|
+
|
|
184
|
+
- Never introduce a second UI library. This project is built on
|
|
185
|
+
${i.map(e=>n[e.kit].name).join(` + `)}.
|
|
186
|
+
- Never write a raw hex, radius or font size. Everything is a variable in
|
|
187
|
+
\`theme.css\`.
|
|
188
|
+
`;return a[`AGENTS.md`]=l,a[`CLAUDE.md`]=l,a[`.cursor/rules`]=l,a[`tokens.json`]=td(e,i,n),a._blocks=o,a._collisions=Hu(i,n),a}var Z=[[`Body text on the page`,`ink`,`page`,4.5],[`Body text on a surface`,`ink`,`surface`,4.5],[`Muted text on the page`,`inkMuted`,`page`,4.5],[`Muted text on a surface`,`inkMuted`,`surface`,4.5],[`Button text on the brand`,`onBrand`,`brand`,4.5],[`The brand against the page`,`brand`,`page`,3],[`The line that shows where a field is`,`line`,`surface`,3]];function Gu(e){let t=[];for(let[n,r,i,a]of Z){let o=e[r],s=e[i];if(!o||!s)continue;let c=Il(o,s);t.push({label:n,fg:r,bg:i,ratio:Math.round(c*100)/100,min:a,passes:c>=a})}return t}var Ku=new Set([`tailwind`,`daisyui`,`shadcn`]);function qu(e,t,n,r={}){let i=e.map(e=>{let n=t[e.kit];return`| ${n.name} | ${n.version??`live`} | ${n.license??`see project`} | ${n.runsIn?.framework??`anything`} | ${Object.keys(e.vars).length} | ${n.source} |`}),a=e.flatMap(e=>{let r=t[e.kit],i=[];for(let t of e.needsBuild??[])i.push(`- **${r.name} · ${t.role}**: not settable at runtime. \`${t.sass}\` is in \`${t.where??`_custom.scss`}\`; ${t.why}.`);for(let[t,n]of Object.entries(Object.groupBy(e.derived??[],e=>e.from))){let e=n.map(e=>e.role).join(`, `);i.push(t===`brand`?`- **${r.name} · ${e}**: computed by the kit from your brand colour. Generate the full scheme with its own tool rather than setting these by hand.`:`- **${r.name} · ${e}**: this kit ties that to \`${t}\`, so the ${t} knob already moved it. There is nothing separate to set.`)}e.unroutable?.length&&i.push(`- **${r.name} · ${e.unroutable.join(`, `)}**: this kit has no variable for that job, so the value was not written anywhere.`),e.unscaled?.length&&i.push(`- **${r.name}**: ${e.unscaled.join(`, `)} were left at their published values: no ratio could be read from a unitless input.`),e.added?.length&&i.push(`- **${r.name} · ${e.added.join(`, `)}**: this kit ships no semantic name for these, so they were ADDED. Reference them yourself (\`bg-brand\`, \`text-ink\`).`);for(let t of Ll){let a=q[e.kit]?.[t.id];a?.overrides&&n[t.id]&&i.push(`- **${r.name} · ${t.id}**: this kit derives that colour itself. Your value replaces ${a.overrides}; everything else in the scheme still comes from the seed.`)}e.noDarkMode&&i.push(`- **${r.name} · dark mode**: this kit publishes no dark values of its own, so none were generated. Anything else would be a palette we invented.`),e.greyscale?.length&&i.push(`- **${r.name} · dark mode for \`${e.greyscale.join("`, `")}\`**: this kit's own light-to-dark change does not fit your colour: carrying it through would cost more than half its chroma to stay inside sRGB, which washes it out rather than darkening it. ${r.name===`shadcn/ui`?`shadcn ships no brand colour of its own — --primary is part of its neutral ramp and simply inverts — so it has never said what to do with a colour. `:``}Left unchanged; check it against the contrast list.`);for(let t of e.chosen??[])i.push(`- **${r.name} · ${t.role}**: not a value this kit takes. You asked for \`${t.asked}\`; the nearest of its ${t.of} published ${t.attr.replace(`data-`,``)} settings is **${t.picked}** (\`${t.got}\`). ${t.why}.`);return i}),o=Hu(e,t);return`# Your design system
|
|
189
|
+
|
|
190
|
+
| Kit | Version | Licence | Runs in | Variables set | Read from |
|
|
191
|
+
|---|---|---|---|---|---|
|
|
192
|
+
${i.join(`
|
|
193
|
+
`)}
|
|
194
|
+
|
|
195
|
+
## The values
|
|
196
|
+
|
|
197
|
+
${Ll.filter(e=>n[e.id]!=null).map(e=>`- \`${e.id}\`: ${n[e.id]} *(${e.what})*`).join(`
|
|
198
|
+
`)}
|
|
199
|
+
|
|
200
|
+
## What could not be done
|
|
201
|
+
|
|
202
|
+
${a.length?a.join(`
|
|
203
|
+
`):`Nothing. Every value reached every kit you enabled.`}
|
|
204
|
+
|
|
205
|
+
## What this stack is made of
|
|
206
|
+
|
|
207
|
+
${(()=>{let n=e=>e.layer===`tokens`?0:e.layer===`utility`?1:2,r=e.map(e=>t[e.kit]).sort((e,t)=>n(e)-n(t)),i=e=>[...r].reverse().find(e),a=i(e=>e.bands?.behaviour),o=i(e=>e.bands?.engine===`own`),s=r.filter(e=>(e.bands?.tokens??0)>0),c=[...r].reverse().find(e=>e.bands?.components);return[`- **Behaviour:** ${a?`\`${a.bands.behaviour.by}\`, which ${a.name} brings with it: ${a.bands.behaviour.what}.`:`nothing here brings any. These are classes, so the keyboard order, the focus management and the ARIA are yours to write.`}`,`- **Engine:** ${o?`${o.name}${o.layer===`utility`?`, compiled from what your markup uses`:`, its own stylesheet`}.`:`none in this stack.`}`,`- **Tokens:** ${s.length?`${s.at(-1).name}${s.length>1?`, over ${s.slice(0,-1).map(e=>e.name).join(` and `)}`:``}, and your values over all of it.`:`none.`}`,`- **Components:** ${c?c.name+`.`:`none, so the parts are tokens on plain markup.`}`].join(`
|
|
208
|
+
`)})()}
|
|
209
|
+
|
|
210
|
+
## Variables in here that nothing reads
|
|
211
|
+
|
|
212
|
+
${(()=>{let n=new Set(e.map(e=>e.kit)),i=(r.unread??[]).filter(e=>n.has(e.kit)),a=[...n].filter(e=>Ku.has(e)).map(e=>t[e]?.name??e);return!i.length&&a.length?`None found, and for ${a.join(` and `)} that is not a proof: ${a.length===1?`it compiles`:`they compile`} through Tailwind, where the measurement cannot tell this theme's own declarations apart from the kit's reads. A variable here is read when your markup uses a utility that reads it.`:i.length?`Counted in each kit's own stylesheet, and in its component code where its
|
|
213
|
+
components are code rather than classes. These are written because the kit
|
|
214
|
+
publishes the name and a later release may read it. Yours to reference; the
|
|
215
|
+
kit will not.
|
|
216
|
+
|
|
217
|
+
${i.map(e=>`- **${e.name} · ${e.role}**: ${e.names.map(e=>`\`${e}\``).join(` `)}${e.tokensOnly?`. A token layer publishes for your code; its own stylesheet reads none of it.`:e.instead.length?`. What it does read is ${e.instead.slice(0,3).map(e=>`\`${e}\``).join(` `)}${e.instead.length>3?` and others`:``}.`:`.`}`).join(`
|
|
218
|
+
`)}`:`Nothing. Every variable this theme writes is read by the kit it belongs to, or by your code.`})()}
|
|
219
|
+
|
|
220
|
+
## What these kits have no component for
|
|
221
|
+
|
|
222
|
+
Not about your values: these are parts of a screen the kit itself does not
|
|
223
|
+
ship. Nothing here was substituted quietly. Where the wall shows one, it is
|
|
224
|
+
plain markup on that kit's own tokens.
|
|
225
|
+
|
|
226
|
+
${(()=>{let n=e.flatMap(e=>(Fu[e.kit]??[]).map(([n,r])=>`- **${t[e.kit].name} · ${n}**: ${r}.`));return n.length?n.join(`
|
|
227
|
+
`):`Nothing. Every part of the wall is a component these kits ship.`})()}
|
|
228
|
+
|
|
229
|
+
## Contrast
|
|
230
|
+
|
|
231
|
+
${(()=>{let e=Gu(n),t=e.filter(e=>!e.passes);return`${e.length-t.length} of ${e.length} pairs clear their floor.\n\n`+e.map(e=>`- ${e.passes?`✓`:`✗`} ${e.label}: **${e.ratio}:1**, needs ${e.min}`).join(`
|
|
232
|
+
`)})()}
|
|
233
|
+
|
|
234
|
+
${o.length?`## Names two kits both use
|
|
235
|
+
|
|
236
|
+
These variables mean different things to different kits you enabled. Whichever
|
|
237
|
+
stylesheet loads second wins, and nothing warns.
|
|
238
|
+
|
|
239
|
+
${o.map(e=>`- \`${e.variable}\`: written for **${t[e.written].name}**, but **${t[e.read].name}** also reads it (its own value: \`${e.theirValue}\`). Load their stylesheets in separate scopes, or drop one of the two.`).join(`
|
|
240
|
+
`)}
|
|
241
|
+
|
|
242
|
+
`:``}## The rule this was generated under
|
|
243
|
+
|
|
244
|
+
No value here was invented. Each kit's defaults were read from what it
|
|
245
|
+
publishes, and every variable written belongs to the kit that publishes it. Where
|
|
246
|
+
a kit could not take a value, this file says so rather than the package pretending.
|
|
247
|
+
`}var Ju={brand:`primary`,onBrand:`on-primary`,page:`surface`,surface:`surface-container`,ink:`on-surface`,inkMuted:`on-surface-variant`,line:`outline`,success:`success`,warning:`warning`,danger:`error`,focus:`focus`},Yu=e=>`"${String(e).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;function Xu(e,t,n,{name:r=`Design system`,parts:i=[],overview:a=``}={}){let o=e=>n[e]!=null&&n[e]!==``,s=e.map(e=>{let n=t[e.kit],r=n.layer===`tokens`?`variables only`:n.standalone||n.layer===`utility`?`base`:`components`;return`${n.name}${n.version?` ${n.version}`:``} (${r})`}).join(` + `),c=t[e.at(-1)?.kit],l=Ll.filter(e=>X[e.id]===`colour`&&o(e.id)).map(e=>` ${Ju[e.id]??e.id}: ${Yu(n[e.id])}`),u=(e,t,r)=>{let i=[];return t&&i.push(` fontFamily: ${Yu(t)}`),e===`body-md`&&o(`baseText`)&&i.push(` fontSize: ${Yu(n.baseText)}`),r&&i.push(` fontWeight: ${r}`),o(`lineHeight`)&&i.push(` lineHeight: ${n.lineHeight}`),o(`letterSpacing`)&&i.push(` letterSpacing: ${Yu(n.letterSpacing)}`),i.length?[` ${e}:`,...i]:[]},d=[...u(`headline-lg`,n.fontHeading,o(`fontWeight`)?n.fontWeight:null),...u(`body-md`,n.fontBody??n.fontHeading,null)],f=o(`radius`)?[` md: ${Yu(n.radius)}`]:[],p=e.flatMap(e=>Object.entries(e.vars)).find(([e])=>/^--spacing$|spacing-md$|^--size-3$/.test(e)),m=p?[` base: ${Yu(p[1])}`]:[],h=o(`brand`)?[` button-primary:`,` backgroundColor: "{colors.primary}"`,...o(`onBrand`)?[` textColor: "{colors.on-primary}"`]:[],...f.length?[` rounded: "{rounded.md}"`]:[],...o(`surface`)?[` card:`,` backgroundColor: "{colors.surface-container}"`,...o(`ink`)?[` textColor: "{colors.on-surface}"`]:[],...f.length?[` rounded: "{rounded.md}"`]:[]]:[],...o(`line`)?[` input:`,...o(`surface`)?[` backgroundColor: "{colors.surface-container}"`]:[],...o(`ink`)?[` textColor: "{colors.on-surface}"`]:[],...f.length?[` rounded: "{rounded.md}"`]:[]]:[]]:[],g=[];if(d.length||g.push([`typography`,`no family was chosen`]),f.length||g.push([`rounded`,`no radius was set`]),!m.length){let n=e.map(e=>J(e.kit).missing.includes(`space`)?t[e.kit].name:null).filter(Boolean);g.push([`spacing`,n.length?`${n.join(` and `)} publishes no spacing scale`:`this stack scales its own step rather than naming one`])}h.length||g.push([`components`,`no brand colour was set, so no component could be described`]);let _=[`version: alpha`,`name: ${Yu(r)}`,`description: ${Yu(s)}`,...g.length?[`omitted:`,...g.map(([e,t])=>` - section: ${e}\n reason: ${Yu(t)}`)]:[],...l.length?[`colors:`,...l]:[],...d.length?[`typography:`,...d]:[],...f.length?[`rounded:`,...f]:[],...m.length?[`spacing:`,...m]:[],...h.length?[`components:`,...h]:[]].join(`
|
|
248
|
+
`),v=Gu(n).filter(e=>!e.passes).map(e=>{let t=Ll.find(t=>t.id===e.fg)?.label??e.fg,n=Ll.find(t=>t.id===e.bg)?.label.toLowerCase()??e.bg,r=`${t} is ${e.ratio}:1 against ${n}, under the ${e.min}:1 it needs.`;return e.min>=4.5?`${r} That pairing fails for body text. Darken one of them, or use it only at 24px, or 19px bold, where 3:1 is the bar.`:`${r} Use it for fills and decoration, never as the only thing marking a control apart from its background.`}),y=e.flatMap(e=>(Fu[e.kit]??[]).map(([n,r])=>[t[e.kit].name,n,r])),b=Iu(n),x=e.some(e=>!J(e.kit).missing.includes(`elevation`)),S=parseFloat(n.elevation??`1`),C=x?S<=.05?`Shadows are turned off. Depth comes from the border and from the step between the page and a surface.`:`Depth comes from ${c?.name??`the kit`}'s own shadow scale at ${Math.round(S*100)}% of its published strength, together with a ${n.borderWidth??`1px`} border. Use both; do not invent a third.`:`Nothing in this stack publishes a shadow scale, so depth here is a border and a change of surface, never a drop shadow.`;return`---
|
|
249
|
+
${_}
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
# ${r}
|
|
253
|
+
|
|
254
|
+
## Overview
|
|
255
|
+
|
|
256
|
+
${a.trim()||`No brand description was written. This system is defined by its values, not by a
|
|
257
|
+
mood: ${s} with the colours, type and shape below.`}
|
|
258
|
+
|
|
259
|
+
## Colors
|
|
260
|
+
|
|
261
|
+
Every colour here is written into a variable ${s.includes(`+`)?`those kits publish`:`that kit publishes`};
|
|
262
|
+
none of them is a name invented for this file.
|
|
263
|
+
${v.length?`\n${v.join(`
|
|
264
|
+
`)}\n`:``}
|
|
265
|
+
## Typography
|
|
266
|
+
|
|
267
|
+
${n.fontHeading?`Headings are set in ${n.fontHeading}.\nBody text is set in ${n.fontBody??n.fontHeading}.`:`No family was chosen; the kit's own stack is in use.`}
|
|
268
|
+
${b.length?`\n${b.map(e=>`**${e.family}**`).join(` and `)} must be fetched. Put this in the document head,
|
|
269
|
+
or every measurement in this file is off:
|
|
270
|
+
|
|
271
|
+
\`\`\`html
|
|
272
|
+
${Lu(b.map(e=>e.family))}
|
|
273
|
+
\`\`\`
|
|
274
|
+
`:``}
|
|
275
|
+
## Layout
|
|
276
|
+
|
|
277
|
+
${m.length?"Every gap, padding and margin in this stack is a multiple of `spacing.base`. Use the\nkit's own spacing utilities rather than a pixel value.":`This stack names no spacing scale. Use the kit's own spacing utilities and keep them
|
|
278
|
+
consistent; do not introduce a scale of your own.`}
|
|
279
|
+
|
|
280
|
+
## Elevation & Depth
|
|
281
|
+
|
|
282
|
+
${C}
|
|
283
|
+
|
|
284
|
+
## Shapes
|
|
285
|
+
|
|
286
|
+
${o(`radius`)?`One radius, \`rounded.md\` at ${n.radius}. The kit scales its own smaller and larger
|
|
287
|
+
corners from it, so use its named radii rather than a literal.`:`No radius was set; the kit's own corners are in use.`}
|
|
288
|
+
|
|
289
|
+
## Components
|
|
290
|
+
|
|
291
|
+
The components come from ${s}. Use them. Do not write a new button, card or
|
|
292
|
+
input: one already exists, and the values above are what it reads.
|
|
293
|
+
${i.length?`\nThe wall this system was checked against covers: ${i.join(`, `)}.`:``}
|
|
294
|
+
${y.length?`\n${y.map(([,e,t])=>`- **${e}**: ${t}.`).join(`
|
|
295
|
+
`)}`:``}
|
|
296
|
+
|
|
297
|
+
## Do's and Don'ts
|
|
298
|
+
|
|
299
|
+
- **Never write a raw hex, radius or font size.** Every one of them is a variable
|
|
300
|
+
in \`theme.css\`, in the vocabulary of the kit you are rendering with.
|
|
301
|
+
- **Never add a second UI library.** If something is missing, compose it from the
|
|
302
|
+
components above and the values in this file.
|
|
303
|
+
${v.map(e=>`- ${e}`).join(`
|
|
304
|
+
`)}
|
|
305
|
+
${y.map(([e,t])=>`- **Do not install a dependency for a ${t}.** ${e} ships none on purpose; build it from the parts above.`).join(`
|
|
306
|
+
`)}
|
|
307
|
+
- **This project may already contain colours, radii and font sizes that are not in
|
|
308
|
+
this file.** Replace them with the nearest role here. Do not keep a value because
|
|
309
|
+
it is already in the code.
|
|
310
|
+
- **If this system cannot express something you need, say so** rather than inventing
|
|
311
|
+
it. \`MANIFEST.md\` lists what could not be set and why.
|
|
312
|
+
`}var Zu={tailwind:{ladder:`compose button recipes from utilities and keep exactly one solid brand recipe; every other action steps down to outline or plain text`,group:`a flex container with one gap-* step; attached segments are a single rounded container`,busy:"`animate-pulse` on a neutral block is the loading state; `animate-spin` marks a working control",motion:"the `transition` utilities with its own ease vars; the only keyframes it ships are `spin`, `ping` and `pulse` — write no others",icons:"Heroicons (`heroicons`, the 24/outline set) — the companion set from the same authors",sheetClasses:[]},daisyui:{ladder:"one `btn-primary` per view; the rest are `btn-ghost`, `btn-outline` or plain `btn`",group:"`join` with `join-item` children when controls are one control; a flex gap when they are neighbours",busy:"`loading` inside the control that is working; `skeleton` for content that has not arrived",motion:`its components carry their own transitions — add none on top`,icons:`daisyUI names no icon set; this system was proofed with Lucide — whichever set you pick, use one`,sheetClasses:[`btn`,`btn-primary`,`btn-ghost`,`btn-outline`,`join`,`join-item`,`loading`,`skeleton`]},shadcn:{ladder:"one Button `default` per view; the rest are `secondary`, `outline` or `ghost`, and destructive actions are `destructive`",group:`a flex container with one gap-* step — shadcn/ui ships no group wrapper on purpose`,busy:"the Skeleton component for content that has not arrived; `animate-pulse` is what it runs on",motion:null,icons:"Lucide (`lucide-react`) — the set its own installer adds",sheetClasses:[]},bootstrap:{ladder:"one `btn-primary` per view; the rest are `btn-outline-secondary` or `btn-link`",group:"`btn-group` when controls are one control; `btn-toolbar` with gap when they are neighbours",busy:"`spinner-border` inside the control that is working; `placeholder` with `placeholder-glow` for content that has not arrived",motion:"its components carry their own transitions, and `fade` and `collapse` are its words for enter and leave — add no keyframes of yours",icons:"Bootstrap Icons (`bootstrap-icons`) — the companion set from the same team",sheetClasses:[`btn`,`btn-primary`,`btn-outline-secondary`,`btn-link`,`btn-group`,`btn-toolbar`,`spinner-border`,`placeholder`,`placeholder-glow`,`fade`,`collapse`]},material:{ladder:"one `md-filled-button` per view; the rest are `md-filled-tonal-button` and `md-text-button`",group:`no group component exists; a flex gap, one step, and the filled one sits last in reading order`,busy:"`md-circular-progress` inside or beside the control that is working",motion:`its elements animate themselves to the M3 motion spec, and the package publishes no motion variables to retune — leave motion theirs`,icons:"Material Symbols (`@material-symbols/svg-400`, outlined) — the set the spec names",sheetClasses:[],elements:[`md-filled-button`,`md-filled-tonal-button`,`md-text-button`,`md-circular-progress`]},radix:{ladder:'one Button `variant="solid"` per view; the rest are `soft` and `ghost`',group:`a Flex with one gap step — Radix Themes ships no group wrapper`,busy:`the Spinner component inside the control that is working; Skeleton for content that has not arrived`,motion:`its components carry their own transitions — add none on top`,icons:"Radix Icons (`@radix-ui/react-icons`) — the companion set from the same team",sheetClasses:[`rt-Button`,`rt-Flex`,`rt-Spinner`,`rt-Skeleton`]},mantine:{ladder:'one Button `variant="filled"` per view; the rest are `light`, `subtle` or `default`',group:`the Group component with its own spacing prop; Stack for the vertical case`,busy:`the Loader component inside the control that is working; Skeleton for content that has not arrived`,motion:`its components carry their own transitions — add none on top`,icons:"Tabler (`@tabler/icons`) — the set its own docs reach for",sheetClasses:[],mantineClasses:[`Button`,`Group`,`Stack`,`Loader`,`Skeleton`]},antd:{ladder:'one Button `type="primary"` per view; the rest are `default` and `type="text"`',group:`the Space or Flex component with one size step — never margins between siblings`,busy:"the Spin component around what is working; its own `loading` prop on a Button",motion:`its components move on their own motion tokens — add no CSS transitions on top`,icons:"Ant Design's own icons (`@ant-design/icons`) — the only set its components expect",sheetClasses:[],antdClasses:[`ant-btn`,`ant-space`,`ant-flex`,`ant-spin`]},openprops:{ladder:`Open Props ships variables, not components: keep one solid brand treatment and step everything else down to outline or text`,group:`a flex container with one gap from its own size scale`,busy:"compose it: an element on its own `--animation-*` entry",motion:"the one kit here that publishes motion itself: `--ease-1` through `--ease-5`, the spring eases and the `--animation-*` set — compose from those and write no keyframes",icons:`Open Props names no icon set; pick one and use one`,sheetClasses:[]}},Qu=e=>String(e??``).trim().toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``)||`design-system`,$u=(e,t)=>{let n=Vu[e];return n===null?`${t.name} ships the \`dark:\` variant but publishes no dark values; this export carries none for it. Leave dark off rather than inventing half of one.`:n===`theme`?"dark is its second theme block in `theme.css` — switch by setting `data-theme` on `<html>`, never by overriding colours.":n===`algorithm`?"dark is `theme.darkAlgorithm` over the same seeds in `antd.theme.ts` — never a CSS override on top.":n.startsWith(`@media`)?`dark follows the operating system through ${t.name}'s own media block in \`theme.css\`.`:`the switch is \`${n.split(`,`)[0].trim()}\` on the root — their components listen for it; never write a parallel palette.`};function ed(e,t,n,{name:r=`Design system`}={}){let i=e.map(e=>e.kit),a=e.map(e=>ku(t[e.kit])).join(` + `),o=Qu(r),s=n=>e.map(e=>{let r=Zu[e.kit]?.[n];if(n===`motion`&&!r&&t[e.kit]?.animates?.npm){let n=t[e.kit].animates;return`- **${t[e.kit].name}**: motion ships as its own companion, \`${n.npm}\` ${n.version} — use its entrance and exit classes and write no keyframes.`}return r?`- **${t[e.kit].name}**: ${r}.`:null}).filter(Boolean).join(`
|
|
313
|
+
`),c=e.map(e=>`- **${t[e.kit].name}**: ${$u(e.kit,t[e.kit])}`).join(`
|
|
314
|
+
`),l=e.flatMap(e=>Object.entries(e.vars)).find(([e])=>/^--spacing$|spacing-md$|^--size-3$/.test(e)),u=l?`This stack names a spacing step (\`${l[0]}\`: ${l[1]}). Inside a group use one step; between groups, two to three; between sections, four or more. Three distances, kept apart — a screen where every gap is equal has no structure to read.`:`This stack names no spacing scale, so pick three distances from the kit's own utilities and hold them: tight inside a group, wider between groups, widest between sections. A screen where every gap is equal has no structure to read.`,d=new Set(e.map(e=>t[e.kit]?.bands?.engine).filter(e=>e&&e!==`own`)),f=Object.entries(t).filter(([e,t])=>!i.includes(e)&&!d.has(e)&&t?.npm).map(([,e])=>e.npm),p=e.flatMap(e=>(Fu[e.kit]??[]).filter(([e])=>e===`empty`).map(()=>`${t[e.kit].name} ships no empty-state component — compose one from its text styles and one quiet action, and keep it one move: say what is missing, offer the one way to fill it`));return`---
|
|
315
|
+
name: ${o}
|
|
316
|
+
description: Use when building or changing any user interface in this project — a screen, a component, a dashboard, a style, a layout. Carries the composition rules, motion, icon and state discipline for ${a}, on top of the design system in DESIGN.md.
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
# ${r} — the working skill
|
|
320
|
+
|
|
321
|
+
This project's design system is ${a}, themed in \`theme.css\` and documented
|
|
322
|
+
in \`DESIGN.md\`. That file is the contract: read it once per session before any
|
|
323
|
+
UI work. This skill is the other half — not what is true, but what to do.
|
|
324
|
+
|
|
325
|
+
## The order of work
|
|
326
|
+
|
|
327
|
+
On any new screen or component, in this order:
|
|
328
|
+
|
|
329
|
+
1. **Regions before components.** Name the regions (navigation, header, content,
|
|
330
|
+
detail) and set their distances first. A screen laid out back-to-front is
|
|
331
|
+
polish on the wrong skeleton.
|
|
332
|
+
2. **The kit's component, or nothing.** Every part you need either exists in
|
|
333
|
+
${a} — then use it, with the variables from \`theme.css\` — or it is named
|
|
334
|
+
as a gap in \`DESIGN.md\`, with what to compose it from. Never a third source.
|
|
335
|
+
3. **States with the component, not after it.** A data view is not done with its
|
|
336
|
+
happy path: empty, loading and error ship in the same change.
|
|
337
|
+
4. **Then the passes:** hierarchy (one primary action), distance (three steps,
|
|
338
|
+
held), dark (the kit's own switch), and the self-check below.
|
|
339
|
+
|
|
340
|
+
## One primary action
|
|
341
|
+
|
|
342
|
+
A view earns one solid, brand-coloured action. Everything else steps down the
|
|
343
|
+
kit's own ladder:
|
|
344
|
+
|
|
345
|
+
${s(`ladder`)}
|
|
346
|
+
|
|
347
|
+
Two solid primaries side by side is the most common AI tell there is. When two
|
|
348
|
+
actions feel equally important, one of them is not.
|
|
349
|
+
|
|
350
|
+
## Controls side by side
|
|
351
|
+
|
|
352
|
+
${s(`group`)}
|
|
353
|
+
|
|
354
|
+
Separation is spacing, never boxes-in-boxes: a toolbar is controls sharing a
|
|
355
|
+
gap, not controls sharing a border.
|
|
356
|
+
|
|
357
|
+
## Visual distance
|
|
358
|
+
|
|
359
|
+
${u}
|
|
360
|
+
|
|
361
|
+
Alignment is part of distance: one left edge per region, labels above inputs,
|
|
362
|
+
and numbers right-aligned in tables.
|
|
363
|
+
|
|
364
|
+
## Motion
|
|
365
|
+
|
|
366
|
+
Motion answers an interaction; it is never decoration. Opacity and transform
|
|
367
|
+
only — nothing that moves layout.
|
|
368
|
+
|
|
369
|
+
${s(`motion`)}
|
|
370
|
+
|
|
371
|
+
Everything respects \`prefers-reduced-motion\`; the kits' own components already
|
|
372
|
+
do, which is one more reason not to write your own.
|
|
373
|
+
|
|
374
|
+
## Icons
|
|
375
|
+
|
|
376
|
+
One set, the kit's own, at one size per context:
|
|
377
|
+
|
|
378
|
+
${s(`icons`)}
|
|
379
|
+
|
|
380
|
+
Never two sets on one screen. An icon-only control carries an \`aria-label\`,
|
|
381
|
+
and an icon next to a label is decoration — if it adds nothing, drop it.
|
|
382
|
+
|
|
383
|
+
## States
|
|
384
|
+
|
|
385
|
+
${s(`busy`)}
|
|
386
|
+
${p.length?`\n${p.map(e=>`- ${e}.`).join(`
|
|
387
|
+
`)}\n`:``}
|
|
388
|
+
Focus stays visible on everything interactive: the kits ship their own focus
|
|
389
|
+
treatment, and removing an outline without replacing it fails the people who
|
|
390
|
+
navigate by keyboard.
|
|
391
|
+
|
|
392
|
+
## Dark
|
|
393
|
+
|
|
394
|
+
${c}
|
|
395
|
+
|
|
396
|
+
## Self-check
|
|
397
|
+
|
|
398
|
+
Before calling UI work done, run these from the project root; every hit is a
|
|
399
|
+
finding:
|
|
400
|
+
|
|
401
|
+
\`\`\`bash
|
|
402
|
+
grep -rn --include='*.css' --include='*.tsx' --include='*.jsx' --include='*.html' -E '#[0-9a-fA-F]{3,8}\\b' src app 2>/dev/null | grep -v theme.css
|
|
403
|
+
\`\`\`
|
|
404
|
+
|
|
405
|
+
A raw hex outside \`theme.css\` is a value the system cannot see. Replace it
|
|
406
|
+
with the nearest variable.
|
|
407
|
+
|
|
408
|
+
\`\`\`bash
|
|
409
|
+
grep -rn --include='*.css' '@keyframes' src app 2>/dev/null
|
|
410
|
+
\`\`\`
|
|
411
|
+
|
|
412
|
+
${e.some(e=>Zu[e.kit]?.motion||t[e.kit]?.animates)?`This stack already has a motion vocabulary; a new keyframe needs a reason the kit cannot give.`:`Keep any keyframe you add to opacity and transform.`}
|
|
413
|
+
${f.length?`
|
|
414
|
+
\`\`\`bash
|
|
415
|
+
grep -rn --include='*.ts' --include='*.tsx' --include='*.js' --include='*.jsx' -E "from ['\\"](${f.join(`|`)})(/|['\\"])" src app 2>/dev/null
|
|
416
|
+
\`\`\`
|
|
417
|
+
|
|
418
|
+
A second UI library never arrives as a decision; it arrives as one import. This
|
|
419
|
+
project is ${a} — anything above is a foreign component.
|
|
420
|
+
`:``}
|
|
421
|
+
And by eye, one pass: exactly one primary action per view · three distances,
|
|
422
|
+
held · every data view has its empty, loading and error state · dark via the
|
|
423
|
+
kit's own switch · focus visible everywhere.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
Generated by [UIcockpit](https://uicockpit.com) from ${a} — the values in
|
|
428
|
+
\`theme.css\`, the reasoning in \`DESIGN.md\`, what could not be done in
|
|
429
|
+
\`MANIFEST.md\`. Do not edit by hand; change it where it was made and export
|
|
430
|
+
again.
|
|
431
|
+
`}function td(e,t,n){let r=(t,n)=>Object.fromEntries(Ll.filter(n=>e[n.id]!=null&&(t===`other`?X[n.id]!==`colour`:X[n.id]===`colour`)).map(t=>[t.id,{$type:n,$value:e[t.id],$description:t.what}]));return JSON.stringify({$description:`Generated from ${t.map(e=>n[e.kit].name).join(` + `)}. Every value belongs to the kit that publishes it.`,color:r(`colour`,`color`),size:Object.fromEntries(Object.entries(r(`other`,`dimension`)).map(([e,t])=>[e,/^[\d.]+$/.test(String(t.$value))?{...t,$type:`number`}:t]))},null,2)+`
|
|
432
|
+
`}var nd=[{kit:`bootstrap`,name:`Bootstrap`,role:`Brand`,names:[`--bs-primary`],instead:[`--bs-link-color`,`--bs-primary-rgb`],tokensOnly:!1},{kit:`bootstrap`,name:`Bootstrap`,role:`Warning`,names:[`--bs-warning`],instead:[`--bs-warning-rgb`,`--bs-warning-text-emphasis`,`--bs-warning-bg-subtle`,`--bs-warning-border-subtle`],tokensOnly:!1},{kit:`material`,name:`Material 3`,role:`Corner radius`,names:[`--md-sys-shape-corner-large`,`--md-sys-shape-corner-extra-large`,`--md-sys-shape-corner-xs`,`--md-sys-shape-corner-sm`,`--md-sys-shape-corner-md`,`--md-sys-shape-corner-lg`,`--md-sys-shape-corner-xl`,`--md-sys-shape-corner-xxl`],instead:[`--md-sys-shape-corner-medium`,`--md-sys-shape-corner-extra-small`,`--md-sys-shape-corner-small`],tokensOnly:!1},{kit:`mantine`,name:`Mantine`,role:`Elevation`,names:[`--mantine-shadow-md`],instead:[`--mantine-shadow-xs`,`--mantine-shadow-sm`,`--mantine-shadow-lg`,`--mantine-shadow-xl`],tokensOnly:!1},{kit:`mantine`,name:`Mantine`,role:`Line height`,names:[`--mantine-line-height-xs`,`--mantine-line-height-lg`,`--mantine-line-height-xl`],instead:[`--mantine-line-height`,`--mantine-line-height-sm`,`--mantine-line-height-md`,`--mantine-h1-line-height`,`--mantine-h2-line-height`,`--mantine-h3-line-height`,`--mantine-h4-line-height`,`--mantine-h5-line-height`,`--mantine-h6-line-height`],tokensOnly:!1},{kit:`mantine`,name:`Mantine`,role:`Heading weight`,names:[`--mantine-heading-font-weight`],instead:[`--mantine-h1-font-weight`,`--mantine-h2-font-weight`,`--mantine-h3-font-weight`,`--mantine-h4-font-weight`,`--mantine-h5-font-weight`,`--mantine-h6-font-weight`],tokensOnly:!1},{kit:`mantine`,name:`Mantine`,role:`Corner radius`,names:[`--mantine-radius-xs`,`--mantine-radius-lg`],instead:[`--mantine-radius-default`,`--mantine-radius-sm`,`--mantine-radius-md`,`--mantine-radius-xl`],tokensOnly:!1},{kit:`antd`,name:`Ant Design`,role:`Elevation`,names:[`--ant-box-shadow`],instead:[`--ant-box-shadow-secondary`,`--ant-box-shadow-tertiary`],tokensOnly:!1},{kit:`openprops`,name:`Open Props`,role:`Muted ink`,names:[`--text-2`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Success`,names:[`--success`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Warning`,names:[`--warning`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Danger`,names:[`--danger`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Headings`,names:[`--font-heading`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Body`,names:[`--font-sans`],instead:[],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Line height`,names:[`--font-lineheight-0`,`--font-lineheight-2`,`--font-lineheight-4`,`--font-lineheight-5`],instead:[`--font-lineheight-3`,`--font-lineheight-1`],tokensOnly:!0},{kit:`openprops`,name:`Open Props`,role:`Spacing`,names:[`--size-6`,`--size-7`,`--size-9`],instead:[`--size-3`,`--size-1`,`--size-2`,`--size-4`,`--size-5`,`--size-8`],tokensOnly:!0}],rd={antd:()=>Ji(()=>import(`./antd-DhIfMnKY.js`),[]),bootstrap:()=>Ji(()=>import(`./bootstrap-COnYSIiB.js`),[]),daisyui:()=>Ji(()=>import(`./daisyui-BMsY9tCy.js`),[]),mantine:()=>Ji(()=>import(`./mantine-_j_jRC3m.js`),[]),material:()=>Ji(()=>import(`./material-Dztr9pnA.js`),[]),openprops:()=>Ji(()=>import(`./openprops-8c8qkGJk.js`),[]),radix:()=>Ji(()=>import(`./radix-XX7gl5Rg.js`),[]),shadcn:()=>Ji(()=>import(`./shadcn-BKbCld6D.js`),[]),tailwind:()=>Ji(()=>import(`./tailwind-DqpNPM-k.js`),[])},id=nd;async function ad(e,t,n,r={}){let i=(await rd[e]()).default;return Wu(t,[e],{[e]:i},{...r,name:n,unread:id})}var od=new Set([`AGENTS.md`,`CLAUDE.md`,`.cursor/rules`]);function sd(e){return Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`&&!od.has(e[0])))}function cd(e){let t=e.indexOf(`{`),n=e.indexOf(`}`,t);return t<0||n<0?[]:[...e.slice(t+1,n).matchAll(/(--[\w-]+)\s*:/g)].map(e=>e[1])}function ld(e,t){let n=e.indexOf(`{`),r=e.indexOf(`}`,n);if(n<0||r<0)return{css:e,pinned:[]};let i=[],a=e.slice(n+1,r).replace(/(--[\w-]+)(\s*:\s*)([^;]+);/g,(e,n,r,a)=>{let o=t[n]?.trim();return!o||o===a.trim()?e:(i.push(n),`${n}${r}${o};`)}),o=i.length?`\n/* ${i.length} of these are pinned to the value your build already has, so this
|
|
433
|
+
* block changes nothing you did not turn. The engine would have derived them;
|
|
434
|
+
* your build's own variables win. The dark block below is still derived. */\n`:``;return{css:e.slice(0,n)+`{`+a+`}`+o+e.slice(r+1),pinned:i}}var ud=[`tailwind`,`daisyui`,`shadcn`,`bootstrap`,`material`,`radix`,`mantine`,`antd`,`openprops`];function dd(e){return`<script src="`+e+`/live.js"><\/script>`}function fd(e,t){let n=e.trim();if(!n)return{why:`Paste the address your app runs on.`};/^https?:\/\//i.test(n)||(n=`http://`+n);let r;try{r=new URL(n)}catch{return{why:`That is not an address a browser can open.`}}return/^https?:$/.test(r.protocol)?r.origin===t?{why:`That is UISandbox itself. Paste the address of the app you are building.`}:{url:r.href}:{why:`Only http and https addresses can be framed.`}}function pd(e,t,n=6e3){return new Promise((r,i)=>{let a=e=>{clearTimeout(s),removeEventListener(`message`,o),e()},o=n=>{if(n.source!==e.contentWindow||n.data?.type!==`uicockpit:ready`)return;let i=ud.includes(n.data.kit)?n.data.kit:null;a(()=>r({kit:i,title:String(n.data.title??``).slice(0,200),href:String(n.data.href??t).slice(0,2e3)}))},s=setTimeout(()=>a(()=>i(Error(`Nothing heard back. Is the script line in the page, and does the address load outside a frame?`))),n);addEventListener(`message`,o),e.src=t})}var md=0;function hd(e,t,n=4e3){let r=e.contentWindow;if(!r)return Promise.reject(Error(`The app frame is gone.`));let i=new URL(e.src).origin,a=++md;return new Promise((e,o)=>{let s=e=>{clearTimeout(l),removeEventListener(`message`,c),e()},c=t=>{if(t.source!==r||t.origin!==i||t.data?.type!==`uicockpit:values`||t.data.id!==a)return;let n={};for(let[e,r]of Object.entries(t.data.values??{}))/^--[\w-]+$/.test(e)&&typeof r==`string`&&(n[e]=r.slice(0,2e3));s(()=>e(n))},l=setTimeout(()=>s(()=>o(Error(`The app did not answer. Its live.js may be an old copy.`))),n);addEventListener(`message`,c),r.postMessage({type:`uicockpit:read`,id:a,names:t},i)})}async function gd(e,t,n){let r=await ad(t,iu(t,await hd(e,ru(t))),n,{overview:`These values were read off ${n} while it ran, through UISandbox's live bridge, not chosen. They are written here in the names this kit publishes, so they are the ones to build against.`}),i=r[`theme.css`];return i&&(r[`theme.css`]=ld(i,await hd(e,cd(i))).css),r}var _d=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n>>>0}return e})();function vd(e){let t=4294967295;for(let n=0;n<e.length;n++)t=_d[(t^e[n])&255]^t>>>8;return(t^4294967295)>>>0}function yd(e){let t=new TextEncoder,n=[],r=[],i=0;for(let a of e){let e=t.encode(a.name),o=t.encode(a.text),s=vd(o),c=o.length,l=new DataView(new ArrayBuffer(30));l.setUint32(0,67324752,!0),l.setUint16(4,20,!0),l.setUint16(8,0,!0),l.setUint32(14,s,!0),l.setUint32(18,c,!0),l.setUint32(22,c,!0),l.setUint16(26,e.length,!0),n.push(new Uint8Array(l.buffer),e,o);let u=new DataView(new ArrayBuffer(46));u.setUint32(0,33639248,!0),u.setUint16(4,20,!0),u.setUint16(6,20,!0),u.setUint16(10,0,!0),u.setUint32(16,s,!0),u.setUint32(20,c,!0),u.setUint32(24,c,!0),u.setUint16(28,e.length,!0),u.setUint32(42,i,!0),r.push(new Uint8Array(u.buffer),e),i+=30+e.length+c}let a=r.reduce((e,t)=>e+t.length,0),o=new DataView(new ArrayBuffer(22));o.setUint32(0,101010256,!0),o.setUint16(8,e.length,!0),o.setUint16(10,e.length,!0),o.setUint32(12,a,!0),o.setUint32(16,i,!0);let s=[...n,...r,new Uint8Array(o.buffer)],c=s.reduce((e,t)=>e+t.length,0),l=new Uint8Array(c),u=0;for(let e of s)l.set(e,u),u+=e.length;return new Blob([l],{type:`application/zip`})}var Q=e=>{let t=y.find(t=>t.id===e);return t?`${t.name}${t.version?` ${t.version}`:``}`:e};function bd(){let[e,t]=(0,_.useState)(``),[n,r]=(0,_.useState)({at:`idle`}),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(null),u=(0,_.useRef)(null),d=dd(location.origin),f=async()=>{try{await navigator.clipboard.writeText(d),a(!0),setTimeout(()=>a(!1),1400)}catch{}},p=async()=>{let n=fd(e,location.origin);if(`why`in n){r({at:`failed`,why:n.why});return}t(n.url),l(null),r({at:`connecting`});try{r({at:`connected`,hello:await pd(u.current,n.url)})}catch(e){r({at:`failed`,why:e instanceof Error?e.message:String(e)})}},m=async()=>{if(!(n.at!==`connected`||!n.hello.kit)){s(!0),l(null);try{let e=n.hello.title.trim()||new URL(n.hello.href).host,t=sd(await gd(u.current,n.hello.kit,e)),r=yd(Object.entries(t).map(([e,t])=>({name:e,text:t}))),i=document.createElement(`a`);i.href=URL.createObjectURL(r),i.download=`${e.replace(/[^\w.-]+/g,`-`).replace(/^-|-$/g,``)||`app`}-design-system.zip`,i.click(),setTimeout(()=>URL.revokeObjectURL(i.href),2e3)}catch(e){l(e instanceof Error?e.message:String(e))}s(!1)}},h=n.at===`connecting`||n.at===`connected`;return(0,B.jsxs)(`div`,{className:`intake__drop intake__drop--repo intake__drop--live`,children:[(0,B.jsxs)(`div`,{className:`intake__copy`,children:[`Put this line in your app's `,(0,B.jsx)(`code`,{children:`<head>`}),`, then paste the address it runs on.`]}),(0,B.jsxs)(`div`,{className:`live__snippet`,children:[(0,B.jsx)(`code`,{children:d}),(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:f,children:i?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(M,{size:13,strokeWidth:2}),` Copied`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(se,{size:13,strokeWidth:2}),` Copy`]})})]}),(0,B.jsxs)(`form`,{className:`intake__repo`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,B.jsx)(`input`,{className:`intake__input`,type:`url`,placeholder:`http://localhost:3000`,value:e,onChange:e=>t(e.target.value),"aria-label":`The address your app runs on`,spellCheck:!1}),(0,B.jsxs)(`button`,{type:`submit`,className:`btn btn--primary`,disabled:n.at===`connecting`,children:[(0,B.jsx)(xe,{size:15,strokeWidth:1.75}),` Connect`]})]}),(0,B.jsxs)(`p`,{className:`live__status`,role:`status`,"aria-live":`polite`,children:[n.at===`connecting`&&`Waiting for your app to say hello…`,n.at===`failed`&&n.why,n.at===`connected`&&(n.hello.kit?(0,B.jsxs)(B.Fragment,{children:[`Connected · runs on `,(0,B.jsx)(`b`,{children:Q(n.hello.kit)}),`.`]}):(0,B.jsx)(B.Fragment,{children:`Connected. This page runs on none of the nine kits as far as it shows, so there is no kit vocabulary to write its design system in. Drop its build instead, and the sandbox reads it directly.`}))]}),n.at===`connected`&&n.hello.kit&&(0,B.jsx)(`div`,{className:`intake__choices`,children:(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--primary`,onClick:()=>void m(),disabled:o,children:[(0,B.jsx)(F,{size:15,strokeWidth:1.75}),` `,o?`Reading your app…`:`Its design system (.zip)`]})}),c&&(0,B.jsx)(`p`,{className:`live__status live__status--error`,children:c}),(0,B.jsx)(`iframe`,{ref:u,className:`live__frame`,hidden:!h,title:`Your running app`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-modals`,referrerPolicy:`no-referrer`}),(0,B.jsx)(`div`,{className:`intake__note`,children:`Your app stays where it runs. The script answers only this page, and only with the values of the kit variables it is asked for by name, never your markup or your data. Nothing is sent to a server. Turning the knobs on a running app comes with the next version of this screen.`})]})}var xd=[{path:`/samples/bootstrap-docs.zip`,label:`Bootstrap docs`,title:`getbootstrap.com: the Bootstrap 5.3 docs build (114 screens, 8 MB)`},{path:`/samples/vitepress-site.zip`,label:`VitePress site`,title:`vitepress.dev (259 screens, 5 MB)`},{path:`/samples/sb-admin-dashboard.zip`,label:`Admin dashboard`,title:`Start Bootstrap SB Admin 2 (13 screens, 6 MB)`}];function Sd({onArchive:e,onUrl:t,onSample:n,busy:r,error:i,carryNote:a,standalone:o}){let[s,c]=(0,_.useState)(`zip`),[l,u]=(0,_.useState)(i||o?`build`:null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,b]=(0,_.useState)(``),x=(0,_.useRef)(null),S=(0,_.useRef)(null),C=async t=>{g(null);try{t.length===1&&Ao(t[0])?e(await ko(t[0])):t.length&&e(Mo(t))}catch(e){g(e.message)}},w=()=>{g(null);let e=v.trim().match(/^(?:https?:\/\/)?(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?(?:\/(?:tree|commits?)\/([\w./-]+))?\/?$/i),n=v.trim().match(/^(?:https?:\/\/)?(?:www\.)?gitlab\.com\/([\w./-]+?)(?:\.git)?(?:\/-\/(?:tree|commits?)\/([\w./-]+))?\/?$/i);e?t?.(`https://github.com/${e[1]}/${e[2]}${e[3]?`/tree/${e[3]}`:``}`):n?t?.(`https://gitlab.com/${n[1].replace(/\/$/,``)}${n[2]?`/-/tree/${n[2]}`:``}`):g(`Paste a public GitHub or GitLab repository URL, like https://github.com/user/repo (a branch path is fine).`)},T=[{id:`zip`,label:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`intake__way-long`,children:`Upload a `}),`zip`]}),icon:(0,B.jsx)(ce,{size:14,strokeWidth:1.75})},{id:`folder`,label:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`intake__way-long`,children:`Upload a `}),`codebase`]}),icon:(0,B.jsx)(fe,{size:14,strokeWidth:1.75})},{id:`repo`,label:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:`intake__way-long`,children:`Connect a `}),`repo`]}),icon:(0,B.jsx)(me,{size:14,strokeWidth:1.75})}],E=(e,t,n,r)=>(0,B.jsxs)(`button`,{type:`button`,className:`way__fold ${l===e?`way__fold--open`:``}`,"aria-expanded":l===e,onClick:()=>u(l===e?null:e),children:[(0,B.jsx)(`span`,{className:`way__icon`,children:r}),(0,B.jsxs)(`span`,{className:`way__text`,children:[(0,B.jsx)(`b`,{children:t}),(0,B.jsx)(`span`,{children:n})]}),(0,B.jsx)(ae,{size:15,className:`way__chev`})]});return(0,B.jsxs)(`div`,{className:`intake intake--door`,children:[d&&(0,B.jsx)(wd,{onClose:()=>f(!1)}),(0,B.jsx)(`div`,{className:`door`,children:(0,B.jsxs)(`div`,{className:`card intake__card`,children:[i&&!r&&(0,B.jsx)(`div`,{className:`intake__error intake__error--top`,children:i}),r?(0,B.jsx)(Cd,{busy:r}):(0,B.jsxs)(B.Fragment,{children:[a&&(0,B.jsx)(`p`,{className:`intake__carry`,children:a}),(0,B.jsxs)(`section`,{className:`way way--main`,children:[(0,B.jsxs)(`h3`,{children:[(0,B.jsx)(ge,{size:16,strokeWidth:1.75}),` Run it on your machine`]}),(0,B.jsxs)(`p`,{children:[`In your project folder. It finds your build (`,(0,B.jsx)(`code`,{children:`dist/`}),`, `,(0,B.jsx)(`code`,{children:`build/`}),`, `,(0,B.jsx)(`code`,{children:`out/`}),`) and opens this sandbox from `,(0,B.jsx)(`code`,{children:`127.0.0.1`}),`: your code never leaves your machine, not even to this site. Needs Node 20.`]}),(0,B.jsx)(ec,{compact:!0}),(0,B.jsxs)(`p`,{className:`way__fine`,children:[`From Claude Code, Cursor or any MCP client: say "open this app in UISandbox". `,(0,B.jsx)(`a`,{href:`/about#agents`,children:`How`})]})]}),E(`running`,`Already running? Add one line`,`Your app on localhost or anywhere: we read which kit it runs on and write its design system`,(0,B.jsx)(xe,{size:15,strokeWidth:1.75})),l===`running`&&(0,B.jsx)(`div`,{className:`way__body`,children:(0,B.jsx)(bd,{})}),E(`build`,`Or load a build here`,`A zip, a folder or a public repo, read into this tab. Or try a sample`,(0,B.jsx)(ce,{size:15,strokeWidth:1.75})),l===`build`&&(0,B.jsxs)(`div`,{className:`way__body`,children:[(0,B.jsx)(`div`,{className:`intake__ways`,role:`tablist`,children:T.map(e=>(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===e.id,className:`intake__way ${s===e.id?`intake__way--on`:``}`,onClick:()=>{c(e.id),g(null)},children:[e.icon,` `,e.label]},e.id))}),s===`repo`?(0,B.jsxs)(`div`,{className:`intake__drop intake__drop--repo`,children:[(0,B.jsxs)(`div`,{className:`intake__copy`,children:[`Paste a `,(0,B.jsx)(`b`,{children:`public`}),` GitHub or GitLab repository. Its default branch (or a `,(0,B.jsx)(`code`,{children:`/tree/branch`}),` URL) is fetched as a zip and loaded here.`]}),(0,B.jsxs)(`form`,{className:`intake__repo`,onSubmit:e=>{e.preventDefault(),w()},children:[(0,B.jsx)(`input`,{className:`intake__input`,type:`url`,placeholder:`https://github.com/user/repo`,value:v,onChange:e=>b(e.target.value),"aria-label":`GitHub or GitLab repository URL`,spellCheck:!1}),(0,B.jsxs)(`button`,{type:`submit`,className:`btn btn--primary`,children:[(0,B.jsx)(me,{size:15,strokeWidth:1.75}),` Load`]})]}),(0,B.jsx)(`div`,{className:`intake__note`,children:`GitHub and GitLab do not allow the browser to fetch a repo zip directly, so the URL goes through uisandbox.org to fetch it. Public repos only, nothing stored. Everything else stays in your browser.`})]}):(0,B.jsxs)(`div`,{className:`intake__drop ${p?`intake__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:async e=>{e.preventDefault(),m(!1);let t=Array.from(e.dataTransfer.files||[]);if(t.length===1&&Ao(t[0])){C(t);return}let n=await ho(e.dataTransfer.items);C(n.length?n:t)},children:[(0,B.jsxs)(`svg`,{className:`intake__ants`,"aria-hidden":`true`,children:[(0,B.jsx)(`rect`,{className:`intake__ants-dash`,x:`1`,y:`1`,width:`calc(100% - 2px)`,height:`calc(100% - 2px)`,rx:`12`,ry:`12`}),(0,B.jsx)(`rect`,{className:`intake__glow intake__glow--halo`,x:`1`,y:`1`,width:`calc(100% - 2px)`,height:`calc(100% - 2px)`,rx:`12`,ry:`12`,pathLength:1e3}),(0,B.jsx)(`rect`,{className:`intake__glow intake__glow--head`,x:`1`,y:`1`,width:`calc(100% - 2px)`,height:`calc(100% - 2px)`,rx:`12`,ry:`12`,pathLength:1e3})]}),(0,B.jsx)(Qs,{kind:s===`zip`?`zip`:`folder`}),s===`zip`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`intake__copy`,children:[`Drop your `,(0,B.jsx)(`b`,{children:`.zip`}),` here. Its `,(0,B.jsx)(`code`,{children:`dist/`}),`, `,(0,B.jsx)(`code`,{children:`build/`}),` or `,(0,B.jsx)(`code`,{children:`out/`}),` folder, or a whole repo that carries the build inside.`]}),(0,B.jsx)(`div`,{className:`intake__safe`,children:`A copy is read into this tab. Your folder is never touched.`}),(0,B.jsx)(`div`,{className:`intake__choices`,children:(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--primary`,onClick:()=>x.current?.click(),children:[(0,B.jsx)(ce,{size:15,strokeWidth:1.75}),` Choose a zip`]})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`intake__copy`,children:[`Drop a `,(0,B.jsx)(`b`,{children:`folder`}),` here. The build folder renders 1:1; a source folder is read for the knob stand only.`]}),(0,B.jsx)(`div`,{className:`intake__safe`,children:`Read once, into this tab. Nothing is ever written back to it.`}),(0,B.jsx)(`div`,{className:`intake__choices`,children:(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--primary`,onClick:()=>S.current?.click(),children:[(0,B.jsx)(fe,{size:15,strokeWidth:1.75}),` Choose a folder`]})})]})]}),s!==`repo`&&(0,B.jsxs)(`button`,{type:`button`,className:`intake__privacy`,onClick:()=>f(!0),children:[(0,B.jsx)(Oe,{size:13,strokeWidth:2}),` Loaded into this tab, never sent to a server. No database, no account, no analytics. `,(0,B.jsx)(`u`,{children:`How to verify`})]}),n&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`intake__samples`,children:[(0,B.jsx)(`span`,{children:`No build at hand? Try a sample:`}),xd.map(e=>(0,B.jsx)(`button`,{type:`button`,className:`intake__sample`,onClick:()=>n(e.path),title:e.title,children:e.label},e.path))]}),o&&(0,B.jsxs)(`div`,{className:`intake__samples`,children:[(0,B.jsx)(`span`,{children:`Or start from a kit:`}),y.filter(e=>e.renders).map(e=>(0,B.jsx)(`button`,{type:`button`,className:`intake__sample`,onClick:()=>n(`/kits/${e.id}.zip`),title:`${e.name}${e.version?` ${e.version}`:``}: six screens in its own components and its own defaults`,children:e.name},e.id))]})]})]}),(0,B.jsx)(`input`,{ref:x,type:`file`,accept:`.zip,application/zip`,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&C([t]),e.target.value=``}}),(0,B.jsx)(`input`,{ref:S,type:`file`,hidden:!0,webkitdirectory:``,directory:``,onChange:e=>{let t=Array.from(e.target.files??[]);t.length&&C(t),e.target.value=``}})]}),h&&(0,B.jsx)(`div`,{className:`intake__error`,children:h})]})})]})}function Cd({busy:e}){return(0,B.jsx)(`ol`,{className:`intake__stages`,"aria-live":`polite`,children:Du.filter(t=>t.id!==`fetch`||e.fromUrl).map(t=>{let n=Du.findIndex(e=>e.id===t.id),r=Du.findIndex(t=>t.id===e.stage),i=n<r?`done`:n===r?`now`:`next`,a=``;return i===`now`&&(e.stage===`fetch`&&(a=e.size?`${Ou(e.bytes??0)} of ${Ou(e.size)} from ${e.what}`:`${Ou(e.bytes??0)} from ${e.what}`),e.stage===`read`&&(a=`${e.done??0} / ${e.total??0} files · ${Ou(e.bytes??0)} of CSS`),e.stage===`derive`&&(a=`${e.total??0} values → the knobs on the stand of your code`),e.stage===`open`&&(a=`first paint…`)),(0,B.jsxs)(`li`,{className:`intake__stage intake__stage--${i}`,children:[(0,B.jsx)(`span`,{className:`intake__stage-dot`,"aria-hidden":!0,children:i===`done`?(0,B.jsx)(M,{size:11,strokeWidth:3}):null}),(0,B.jsx)(`span`,{className:`intake__stage-label`,children:t.label}),a&&(0,B.jsx)(`span`,{className:`intake__stage-detail`,children:a})]},t.id)})})}function wd({onClose:e}){return(0,_.useEffect)(()=>{let t=t=>{t.key===`Escape`&&e()};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e]),(0,B.jsx)(`div`,{className:`privacy`,role:`dialog`,"aria-modal":`true`,"aria-label":`How your files stay private`,onClick:t=>{t.target===t.currentTarget&&e()},children:(0,B.jsxs)(`div`,{className:`card privacy__card`,children:[(0,B.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--icon privacy__close`,onClick:e,"aria-label":`Close`,children:(0,B.jsx)(Le,{size:15})}),(0,B.jsxs)(`h3`,{children:[(0,B.jsx)(Oe,{size:16,strokeWidth:2}),` Your files never leave your browser`]}),(0,B.jsx)(`p`,{children:`There is no server behind the sandbox, no account, no cookies and no analytics. Your files are read here, in the page, and served to the sandbox frame by a service worker on this origin. Exports are generated here too.`}),(0,B.jsx)(`p`,{children:(0,B.jsx)(`b`,{children:`You don't have to take my word for it:`})}),(0,B.jsxs)(`ul`,{children:[(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Watch the network tab`}),` while you drop, turn knobs and export: no request carries your bytes anywhere.`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Go offline.`}),` Load the page, switch off your network, then drop the zip: everything still works, because nothing needed the network.`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Read the code.`}),` It is open source (MIT): `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/src/sandbox/host.ts`,target:`_blank`,rel:`noopener`,children:`the file that serves your files`}),` and `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/security.md`,target:`_blank`,rel:`noopener`,children:`the full security note`}),`, including what a hostile archive can and cannot do here.`]})]}),(0,B.jsxs)(`p`,{className:`privacy__fine`,children:[`The one exception, said plainly: `,(0,B.jsx)(`em`,{children:`Connect a repo`}),` sends that public GitHub/GitLab URL through uisandbox.org, because neither host lets a browser fetch an archive directly. Nothing is stored. Drop a zip or a folder and not even that leaves your browser.`]})]})})}function Td(){let[e]=(0,_.useState)(()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,B.jsxs)(`div`,{className:`landing`,children:[(0,B.jsxs)(`section`,{className:`landing__sec`,children:[(0,B.jsx)(`h2`,{children:`How it works`}),(0,B.jsx)(`p`,{className:`landing__lead`,children:`What would your app look like in a different brand colour, at a bigger type scale, or in dark mode? Find out in about a minute, on the real app, instead of guessing or spending an afternoon on it. Keep what you see and it comes out as code. Close the tab and nothing happened.`}),(0,B.jsxs)(`ol`,{className:`steps`,children:[(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Start on a kit, then bring your own app.`}),` The editor opens on shadcn/ui as it ships, so you can turn a knob before you hand over anything, and seven more kits are one pick away. Your own app comes in through the Your app tab: a zip of `,(0,B.jsx)(`code`,{children:`dist/`}),`, `,(0,B.jsx)(`code`,{children:`build/`}),` or `,(0,B.jsx)(`code`,{children:`out/`}),`, a folder, a public GitHub or GitLab repo, or your running app with one script line. What you turned on the kit comes along. It is read here in the page and served to the frame by a service worker; nothing is sent to a server.`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`It is your actual app, not a preview of one.`}),` Every CSS literal becomes a variable holding that same value, so the page renders exactly as it was, runtime styles, CDN stylesheets and nested frames included. There is a button that proves it.`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Turn one knob, the whole app follows.`}),` A colour used 144 times moves once. Brand and the colour families your CSS actually contains, background, fonts, size, spacing, radius, elevation, motion, hue, saturation, contrast, your own dark mode. Every dial has `,(0,B.jsx)(`em`,{children:`×1 = as in your code`}),` at its centre, so you always know your way back. Or pick a Look: another kit's own brand, background, font and corners, through the same knobs.`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`b`,{children:`Keep it, or bin it.`}),` Keep it and you get code. When your app runs on one of the kits, that is a design system and a `,(0,B.jsx)(`code`,{children:`SKILL.md`}),` in the kit's own names, so your agent builds the next screen the same way. Or your own files patched in place, design tokens (CSS, Tailwind, shadcn), Swift and Android constants. Share sends the same build with the same knobs as a link. Bin it by closing the tab.`]})]}),(0,B.jsxs)(`div`,{className:`cross`,"aria-label":`What crosses between your machine and this tab`,children:[(0,B.jsxs)(`div`,{className:`cross__side`,children:[(0,B.jsx)(`b`,{children:`Your folder`}),(0,B.jsx)(`span`,{children:`Where your build lives. It is read once, and never written to. UISandbox cannot change a file on your machine.`})]}),(0,B.jsxs)(`div`,{className:`cross__mid`,"aria-hidden":!0,children:[(0,B.jsxs)(`span`,{className:`cross__arrow`,children:[(0,B.jsx)(`span`,{className:`cross__label`,children:`a copy of your build`}),(0,B.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,B.jsx)(`path`,{d:`M0 4h56M52 1l4 3-4 3`})})]}),(0,B.jsx)(`span`,{className:`cross__rule`,children:`nothing crosses on its own`}),(0,B.jsxs)(`span`,{className:`cross__arrow cross__arrow--back`,children:[(0,B.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,B.jsx)(`path`,{d:`M64 4H8M12 1L8 4l4 3`})}),(0,B.jsx)(`span`,{className:`cross__label`,children:`only when you press Export`})]})]}),(0,B.jsxs)(`div`,{className:`cross__side`,children:[(0,B.jsx)(`b`,{children:`This browser tab`}),(0,B.jsx)(`span`,{children:`Where the copy is read, rendered and turned. Close the tab and it is gone: nothing is stored, nothing is sent to a server.`})]})]})]}),(0,B.jsxs)(`figure`,{className:`clip clip--wide`,children:[(0,B.jsx)(`video`,{className:`clip__vid`,src:`/how-it-works.mp4`,poster:`/how-it-works-poster.png`,width:1280,height:720,autoPlay:!e,controls:e,muted:!0,loop:!0,playsInline:!0,preload:`metadata`,"aria-label":`Four builds in the sandbox: a dashboard's brand colour swept through the spectrum, a documentation site switched to its own dark mode, a docs page's hue rotated and its type swapped to monospace, then the 1:1 check reporting no differences and the export panel`}),(0,B.jsx)(`figcaption`,{children:`Four real builds from public repos, one knob each. Nothing staged.`})]}),(0,B.jsxs)(`section`,{className:`landing__sec`,children:[(0,B.jsx)(`h2`,{children:`Isn't this just Inspect?`}),(0,B.jsx)(`p`,{children:`Same instinct, different scale. DevTools changes one declaration on one element. Here every literal in the build becomes a variable first, so a colour used 144 times moves once and moves everywhere it is used, including the runtime styles a framework injects and the stylesheets it pulls from a CDN.`}),(0,B.jsxs)(`p`,{children:[`And Inspect forgets. Reload the page and your afternoon is gone. What you turn here comes out as code: your own files patched in place, a find and replace list, design tokens, or a `,(0,B.jsx)(`code`,{children:`DESIGN.md`}),` your agent reads on every task.`]}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`b`,{children:`What Inspect does better:`}),` it is already open, it needs no build, and it works on any page on the internet. This needs a built app. When you have one, you get the whole design at once instead of one rule at a time, and a measurement that it still renders as it did.`]})]}),(0,B.jsxs)(`section`,{className:`landing__sec landing__cols`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h2`,{children:`How to check it yourself`}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`b`,{children:`"1:1" is measured.`}),` `,(0,B.jsx)(`em`,{children:`Check 1:1`}),` loads the untouched build and the tokenised build side by side and diffs the computed styles of every element (18 properties, shadow roots and nested frames included). Zero differences, or it says what differs.`]}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`b`,{children:`A reach meter`}),` says how much of what you see the knobs touch (painted colours, families, sizes, radii) and what lies outside: images, canvas, video.`]}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`b`,{children:`It says so when it can't help.`}),` iOS and Android projects, WordPress themes and source without a build get a clear message at the door; a page that asks for files the archive does not hold says so.`]})]}),(0,B.jsxs)(`figure`,{className:`shot shot--stack`,"aria-label":`Three things the tool says out loud`,children:[(0,B.jsxs)(`picture`,{children:[(0,B.jsx)(`source`,{srcSet:`/shot-verify-dark.png`,media:`(prefers-color-scheme: dark)`}),(0,B.jsx)(`img`,{src:`/shot-verify.png`,alt:`The 1:1 check card: 67 elements paired, zero computed-style differences across 18 properties`,loading:`lazy`,width:`880`,height:`296`})]}),(0,B.jsxs)(`picture`,{children:[(0,B.jsx)(`source`,{srcSet:`/shot-reach-dark.png`,media:`(prefers-color-scheme: dark)`}),(0,B.jsx)(`img`,{src:`/shot-reach.png`,alt:`The reach card: of 66 visible elements, how many colours, type and radii the knobs touch, and what lies outside`,loading:`lazy`,width:`880`,height:`376`})]}),(0,B.jsxs)(`picture`,{children:[(0,B.jsx)(`source`,{srcSet:`/shot-refusal-dark.png`,media:`(prefers-color-scheme: dark)`}),(0,B.jsx)(`img`,{src:`/shot-refusal.png`,alt:`A refusal at the door: web source without a built page. Build it first, then drop the output folder`,loading:`lazy`,width:`1148`,height:`110`})]}),(0,B.jsx)(`figcaption`,{children:`The check, the reach meter, a refusal. Each a real screenshot.`})]})]}),(0,B.jsxs)(`section`,{className:`landing__sec`,children:[(0,B.jsx)(`h2`,{id:`privacy`,children:`Your files never leave your browser`}),(0,B.jsxs)(`p`,{children:[`There is no server behind the sandbox, no account, no cookies and no analytics. Your files are read in the page and served to the frame by a service worker on this origin; the knobs are a URL hash; exports are generated here. You can check this yourself: watch the network tab while you drop and export (no request carries your bytes), or load the page, go offline and drop the zip: everything still works. The one exception is `,(0,B.jsx)(`em`,{children:`Connect a repo`}),`: a public GitHub or GitLab URL goes through uisandbox.org to fetch the zip, because neither host lets a browser fetch it directly; nothing is stored. A hostile archive cannot navigate this page away, register its own worker, or smuggle a path out of an export. `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/security.md`,target:`_blank`,rel:`noopener`,children:`The full security note.`})]})]}),(0,B.jsxs)(`section`,{className:`landing__sec`,children:[(0,B.jsx)(`h2`,{id:`agents`,children:`From your terminal, or from your agent`}),(0,B.jsxs)(`p`,{children:[`The same engine runs as an MCP server, and as a `,(0,B.jsx)(`b`,{children:`Claude Code skill`}),`, `,(0,B.jsx)(`code`,{children:`/uisandbox`}),`. Say `,(0,B.jsx)(`em`,{children:`"open this app in UISandbox"`}),` and it builds, loads and opens the real sandbox in your browser; what you turn comes back, so `,(0,B.jsx)(`em`,{children:`"export what I changed"`}),` just works. The plugin installs the skill and the server in one step; any MCP client (Cursor, Claude Desktop, Codex) gets the server and its own `,(0,B.jsx)(`code`,{children:`/uisandbox:open`}),` prompt. Or `,(0,B.jsx)(`code`,{children:`npx uisandbox-mcp open`}),` inside your project, without any agent.`]}),(0,B.jsx)(ec,{}),(0,B.jsxs)(`p`,{className:`landing__more`,children:[(0,B.jsx)(`b`,{children:`Or a link.`}),` `,(0,B.jsx)(`code`,{children:`uisandbox.org/?load=`}),` followed by a public GitHub or GitLab repository URL, or a direct link to a `,(0,B.jsx)(`code`,{children:`.zip`}),` that allows CORS, opens straight into the sandbox. It is how the samples load, and it is a way to show somebody a build without asking them to find it: `,(0,B.jsx)(`a`,{href:`https://uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`,target:`_blank`,rel:`noopener`,children:`uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`}),`.`]})]}),(0,B.jsxs)(`section`,{className:`landing__sec landing__sec--quiet`,children:[(0,B.jsx)(`h2`,{children:`Who made this`}),(0,B.jsxs)(`p`,{children:[`I'm `,(0,B.jsx)(`a`,{href:`https://github.com/AlexanderKaan`,target:`_blank`,rel:`noopener`,children:`Alexander Kaan`}),`, and I build open-source tooling for user interfaces. UISandbox came out of the design system generator I made before it: I could hand somebody a finished kit, but I could not show them what their own app would look like in it. This does that other half.`]}),(0,B.jsxs)(`p`,{children:[`I won't pretend I knew what I was doing at the start. Every decision, and every trap I fell into on the way, is written down in the repo's `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/decisions.md`,target:`_blank`,rel:`noopener`,children:`notes`}),`, including the ones I had to undo. It's `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox`,target:`_blank`,rel:`noopener`,children:`MIT`}),`, and issues and pull requests are welcome.`]})]})]})}function Ed(){let[e,t]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{document.title=`How UISandbox works · Play with your app's design, right in the browser`,document.querySelector(`link[rel="canonical"]`)?.setAttribute(`href`,`https://uisandbox.org/about`)},[]),(0,B.jsxs)(`div`,{className:`app`,children:[(0,B.jsxs)(`header`,{className:`app__topbar`,children:[(0,B.jsxs)(`a`,{className:`app__brand`,href:`/`,title:`Open the editor`,children:[(0,B.jsx)(`span`,{className:`app__brand-mark`,children:(0,B.jsx)(Xs,{size:16})}),`UISandbox `,(0,B.jsx)(`small`,{children:`Interface Design Playground`})]}),(0,B.jsx)(`span`,{className:`app__spacer`}),(0,B.jsxs)(`div`,{className:`app__group`,children:[(0,B.jsx)(tc,{}),(0,B.jsx)(ic,{})]})]}),(0,B.jsx)(`div`,{className:`app__body app__body--page`,children:(0,B.jsxs)(`div`,{className:`intake`,children:[(0,B.jsxs)(`section`,{className:`hero`,children:[(0,B.jsx)(`div`,{className:`intake__mark`,children:(0,B.jsx)(Xs,{size:44})}),(0,B.jsxs)(`h1`,{children:[(0,B.jsx)(`span`,{children:`Play with your app's design.`}),(0,B.jsx)(`span`,{children:`Right in the browser.`})]}),(0,B.jsx)(`p`,{className:`hero__beats`,children:`Start from a kit or your own app, turn the knobs, export the code.`}),(0,B.jsx)(`p`,{className:`hero__sub`,children:`In your browser, or straight from your agent via MCP. Every colour, font, radius and spacing in its CSS becomes a knob, and the real app follows 1:1. Nothing is sent to a server and nothing is stored: close the tab and it is all undone. What you keep comes out as a design system and a skill for your agent, a patch, or design tokens.`}),(0,B.jsxs)(`div`,{className:`hero__ctas`,children:[(0,B.jsxs)(`a`,{className:`btn btn--primary`,href:`/`,children:[`Open the editor `,(0,B.jsx)(j,{size:15,strokeWidth:1.75})]}),(0,B.jsxs)(`a`,{className:`btn btn--secondary`,href:`/?tab=app`,children:[(0,B.jsx)(xe,{size:15,strokeWidth:1.75}),` Bring your own app`]})]}),(0,B.jsx)(ec,{compact:!0}),(0,B.jsxs)(`ul`,{className:`hero__proof`,"aria-label":`In short`,children:[(0,B.jsxs)(`li`,{children:[(0,B.jsx)(M,{size:13,strokeWidth:2.5}),` Free`]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(M,{size:13,strokeWidth:2.5}),` Open source `,(0,B.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/LICENSE`,target:`_blank`,rel:`noopener license`,children:`(MIT)`})]}),(0,B.jsxs)(`li`,{children:[(0,B.jsx)(M,{size:13,strokeWidth:2.5}),` Your files never leave your browser `,(0,B.jsx)(`button`,{type:`button`,className:`hero__info`,onClick:()=>t(!0),"aria-label":`How your files stay private`,title:`How your files stay private`,children:(0,B.jsx)(he,{size:13})})]})]})]}),e&&(0,B.jsx)(wd,{onClose:()=>t(!1)}),(0,B.jsx)(Td,{}),(0,B.jsx)(ac,{})]})})]})}function Dd({screens:e,current:t,onPick:n,onPin:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(0),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=(0,_.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>e.label.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,o]),p=(0,_.useMemo)(()=>{let e=new Map;for(let t of f){let n=t.label.split(`/`).filter(Boolean),r=n.length>1?n.slice(0,-1).join(`/`):``;e.has(r)||e.set(r,[]),e.get(r).push(t)}return[...e.entries()].sort((e,t)=>e[0].localeCompare(t[0]))},[f]),m=(0,_.useMemo)(()=>p.flatMap(([,e])=>e),[p]);(0,_.useEffect)(()=>{i&&(s(``),l(Math.max(0,m.findIndex(e=>e.path===t.path))),setTimeout(()=>d.current?.focus(),0))},[i]),(0,_.useEffect)(()=>{l(0)},[o]),(0,_.useEffect)(()=>{if(!i)return;let e=e=>{u.current?.contains(e.target)||a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i]),(0,_.useEffect)(()=>{let r=r=>{let i=r.target;if(i&&/^(INPUT|TEXTAREA|SELECT)$/.test(i.tagName)||r.key!==`[`&&r.key!==`]`)return;let a=e[(e.findIndex(e=>e.path===t.path)+(r.key===`]`?1:e.length-1))%e.length];a&&n(a)};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e,t,n]);let h=e=>{n(e),a(!1)},g=e=>e.source===`link`?`route`:e.source===`pinned`?`pinned`:null,v=e.findIndex(e=>e.path===t.path);return(0,B.jsxs)(`div`,{className:`spick`,ref:u,children:[(0,B.jsxs)(`button`,{type:`button`,className:`spick__btn`,onClick:()=>a(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":i,title:`${t.path} · ${v+1} of ${e.length} screens · [ ] to step`,children:[(0,B.jsx)(`span`,{className:`spick__cur`,children:t.label}),(0,B.jsxs)(`span`,{className:`spick__n`,children:[v+1,`/`,e.length]}),(0,B.jsx)(N,{size:13,strokeWidth:2})]}),i&&(0,B.jsxs)(`div`,{className:`menu spick__menu`,role:`listbox`,children:[(0,B.jsxs)(`div`,{className:`spick__search`,children:[(0,B.jsx)(De,{size:13,strokeWidth:2}),(0,B.jsx)(`input`,{ref:d,className:`spick__input`,value:o,placeholder:`Search ${e.length} screens…`,onChange:e=>s(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),l(e=>Math.min(m.length-1,e+1));else if(e.key===`ArrowUp`)e.preventDefault(),l(e=>Math.max(0,e-1));else if(e.key===`Enter`){let e=m[c];e&&h(e)}else e.key===`Escape`&&a(!1)}})]}),(0,B.jsxs)(`div`,{className:`spick__list`,children:[p.map(([e,n])=>(0,B.jsxs)(`div`,{children:[e&&(0,B.jsxs)(`div`,{className:`menu__label`,children:[`/`,e]}),n.map(e=>{let n=m.indexOf(e);return(0,B.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e.path===t.path,className:`menu__item spick__item ${e.path===t.path?`menu__item--on`:``} ${n===c?`spick__item--hi`:``}`,onMouseEnter:()=>l(n),onClick:()=>h(e),title:e.path,children:[(0,B.jsx)(`span`,{className:`spick__leaf`,children:e.label.split(`/`).filter(Boolean).pop()??`/`}),g(e)&&(0,B.jsx)(`span`,{className:`spick__tag`,children:g(e)})]},e.path)})]},e)),!m.length&&(0,B.jsxs)(`div`,{className:`spick__empty`,children:[`No screen matches “`,o,`”.`]})]}),(0,B.jsxs)(`div`,{className:`spick__foot`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>{r(),a(!1)},title:`Add the route the frame is on now`,children:[(0,B.jsx)(be,{size:12,strokeWidth:2}),` Pin current route`]}),(0,B.jsxs)(`span`,{className:`spick__hint`,children:[(0,B.jsx)(`kbd`,{children:`[`}),` `,(0,B.jsx)(`kbd`,{children:`]`}),` step · `,(0,B.jsx)(`kbd`,{children:`↵`}),` open`]})]})]})]})}var Od=e=>/^(index\.html?)?$/i.test(e.path.replace(/^\//,``)),kd=[{id:`fit`,label:`Fit`,w:null},{id:`desktop`,label:`1280`,w:1280},{id:`tablet`,label:`820`,w:820},{id:`phone`,label:`390`,w:390}],Ad=`allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-pointer-lock allow-orientation-lock`;function jd(e,t){let n=`Build report: ${e.name}`,r=[`**What I dropped:** (attach the zip, or paste the public repo/URL)`,``,`**What UISandbox said:** ${t}`,``,`**Numbers:** ${e.screens.length} screens · ${e.table.entries.length} values · platform ${e.platform.label}`,`**Browser:** ${typeof navigator<`u`?navigator.userAgent:``}`].join(`
|
|
435
|
+
`);return`https://github.com/Ideelab/uisandbox/issues/new?title=${encodeURIComponent(n)}&body=${encodeURIComponent(r)}&labels=build-report`}function Md({project:e,screen:t,onScreen:n,frameRef:r,onLoaded:i,onPin:a,changedCount:o,warning:s,warningTitle:c,coverage:l,notes:u,tab:d=`app`,onTab:f,kitName:p,door:m}){let[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(`fit`),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!1),E=(0,_.useRef)(null),D=kd.find(e=>e.id===v)?.w??null,O=vl(e.id,t.path,e.base);(0,_.useEffect)(()=>{x(null),T(!1)},[e.id,t.path]);let k=async()=>{x({busy:!0}),C(!0);let n=E.current;n.replaceChildren();let i=r.current,a=i?.clientWidth??1200,o=i?.clientHeight??800;try{let[r,i]=await Promise.all([_u(vl(yl(e.id),t.path,e.base),n,a,o),_u(vl(bl(e.id),t.path,e.base),n,a,o)]),s=mu(r.doc,i.doc),c=/^(margin|padding|gap)/;if(!s.ok&&!s.refusal&&s.mismatches.length<=4&&s.mismatches.every(e=>c.test(e.prop))){await new Promise(e=>setTimeout(e,900));let e=mu(r.doc,i.doc),t=s.mismatches.filter(t=>e.mismatches.some(e=>e.index===t.index&&e.prop===t.prop));s={...e,mismatches:t,ok:t.length===0}}x(s)}catch(e){x({ok:!1,refusal:`Could not load both frames: ${e.message}`,elements:0,unpaired:{raw:0,sandbox:0},mismatches:[]})}finally{n.replaceChildren()}},A=p?e.screens.find(Od):void 0,j=p?e.screens.filter(e=>!Od(e)):e.screens,ee=!!p&&d===`app`,te=e=>{f?.(e),e===`components`&&A&&t!==A&&n(A),e===`screens`&&Od(t)&&j.length&&n(j.find(e=>/overview/i.test(e.path))??j[0])};return(0,_.useEffect)(()=>{p&&d!==`app`&&f?.(Od(t)?`components`:`screens`)},[t,p]),(0,B.jsxs)(`section`,{className:`stage`,children:[(0,B.jsxs)(`div`,{className:`stage__bar`,children:[p&&(0,B.jsxs)(`div`,{className:`stage__tabs`,role:`tablist`,"aria-label":`What the stage shows`,children:[(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":d===`components`,className:`stage__tab ${d===`components`?`stage__tab--on`:``}`,onClick:()=>te(`components`),children:`Components`}),(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":d===`screens`,className:`stage__tab ${d===`screens`?`stage__tab--on`:``}`,onClick:()=>te(`screens`),children:`Screens`}),(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":d===`app`,className:`stage__tab stage__tab--app ${d===`app`?`stage__tab--on`:``}`,onClick:()=>te(`app`),children:[(0,B.jsx)(Se,{size:13,strokeWidth:2}),` Your app`]})]}),(!p||d===`screens`)&&(0,B.jsx)(Dd,{screens:j,current:t,onPick:n,onPin:a}),!ee&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Viewport width`,children:kd.map(e=>(0,B.jsx)(`button`,{className:`seg__opt ${e.id===v?`seg__opt--on`:``}`,onClick:()=>y(e.id),children:e.label},e.id))}),(0,B.jsx)(`span`,{className:`stage__spacer`,style:{flex:1}}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>{let e=r.current;e&&(e.src=O)},title:`Reload the screen`,children:[(0,B.jsx)(we,{size:13,strokeWidth:2}),` Reload`]}),(0,B.jsxs)(`a`,{className:`btn btn--ghost btn--sm`,href:O,target:`_blank`,rel:`noreferrer`,title:`Open this screen in a new tab (same sandbox)`,children:[(0,B.jsx)(I,{size:13,strokeWidth:2}),` Open`]})]})]}),(0,B.jsxs)(`div`,{className:`stage__frame ${D?`stage__frame--w`:``} ${ee?`stage__frame--door`:``}`,children:[ee&&(0,B.jsx)(`div`,{className:`stage__door`,children:m}),(0,B.jsx)(`iframe`,{name:`us:${e.id}`,ref:r,className:`stage__iframe`,sandbox:Ad,title:`${e.name} · ${t.label}`,src:O,style:D?{width:D,maxWidth:`100%`}:void 0,onLoad:()=>{let e=!1;try{r.current?.contentDocument?.body}catch{e=!0}!e&&r.current&&!r.current.contentDocument&&(e=!0),T(e),e||i()}},e.id),!S&&u,(0,B.jsxs)(`div`,{className:`stage__low`,children:[h&&l&&(0,B.jsxs)(`div`,{className:`card popcard popcard--low verify`,role:`dialog`,"aria-label":`Reach`,children:[(0,B.jsx)(`h3`,{children:`What the knobs reach on this screen`}),(0,B.jsxs)(`div`,{children:[`Of `,l.elements,` visible elements: `,(0,B.jsxs)(`b`,{children:[l.colours.hit,`/`,l.colours.total]}),` painted colours (text, backgrounds, borders), `,(0,B.jsxs)(`b`,{children:[l.fonts.hit,`/`,l.fonts.total]}),` text families, `,(0,B.jsxs)(`b`,{children:[l.sizes.hit,`/`,l.sizes.total]}),` text sizes and `,(0,B.jsxs)(`b`,{children:[l.radii.hit,`/`,l.radii.total]}),` corner radii come from your CSS literals and follow the knobs.`]}),(0,B.jsxs)(`div`,{style:{marginTop:6},children:[`Outside any knob: `,l.outside.images,` image`,l.outside.images===1?``:`s`,`, `,l.outside.canvas,` canvas, `,l.outside.video,` video, `,l.outside.backgroundImages,` background image`,l.outside.backgroundImages===1?``:`s`,`: pixels no CSS value can move.`]}),(0,B.jsx)(`div`,{style:{marginTop:14},children:(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:()=>g(!1),children:`Close`})})]}),s&&!w&&(0,B.jsxs)(`div`,{className:`card popcard popcard--low verify`,role:`status`,children:[(0,B.jsx)(`h3`,{children:c??`Is this the built app?`}),(0,B.jsx)(`div`,{children:s}),(0,B.jsx)(`div`,{style:{marginTop:12},children:(0,B.jsx)(`a`,{className:`btn btn--secondary btn--sm`,href:jd(e,s),target:`_blank`,rel:`noopener`,children:`This is wrong? Report it`})})]}),w&&(0,B.jsxs)(`div`,{className:`card popcard popcard--low verify`,role:`status`,children:[(0,B.jsx)(`h3`,{children:`This screen left the sandbox`}),(0,B.jsx)(`div`,{children:`The page navigated to another origin (a redirect page, or a script that sends visitors elsewhere). Nothing there is yours to tune; pick another screen.`})]})]}),(0,B.jsx)(`div`,{ref:E,"aria-hidden":`true`}),S&&(0,B.jsxs)(`div`,{className:`card popcard verify`,role:`dialog`,"aria-label":`1:1 check`,children:[(0,B.jsx)(`h3`,{children:`1:1 check: untouched vs. tokenised, identity sheet`}),!b||`busy`in b?(0,B.jsx)(`div`,{children:`Loading both versions of this screen and comparing every element…`}):b.refusal?(0,B.jsxs)(`div`,{children:[`⚠ `,b.refusal]}):b.ok?(0,B.jsxs)(`div`,{children:[`✓ `,(0,B.jsx)(`b`,{children:b.elements}),` elements paired, `,(0,B.jsx)(`b`,{children:`0`}),` computed-style differences across 18 properties.`,b.unpaired.raw+b.unpaired.sandbox>0?` ${b.unpaired.raw+b.unpaired.sandbox} elements differed between the two loads (ads, widgets) and were left out.`:``,` What you see is your CSS with its literals replaced by variables holding the very same values.`]}):(0,B.jsxs)(`div`,{children:[`✗ `,b.mismatches.length,b.mismatches.length>=40?`+`:``,` differences on `,b.elements,` elements, a rewriter gap. Please report the first few:`,(0,B.jsx)(`ul`,{className:`verify__list`,children:b.mismatches.slice(0,12).map((e,t)=>(0,B.jsxs)(`li`,{children:[`<`,e.tag,`>#`,e.index,` `,e.prop,`: `,e.raw,` → `,e.sandbox]},t))})]}),(0,B.jsxs)(`div`,{style:{marginTop:10,display:`flex`,gap:8,alignItems:`center`},children:[(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:k,children:`Run again`}),(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:()=>C(!1),children:`Close`}),b&&!(`busy`in b)&&!b.ok&&!b.refusal&&(0,B.jsx)(`a`,{className:`btn btn--ghost btn--sm`,href:jd(e,`1:1 differs — ${b.mismatches.slice(0,3).map(e=>`${e.prop}: ${e.raw} → ${e.sandbox}`).join(`; `)}`),target:`_blank`,rel:`noopener`,children:`Report this build`})]})]})]}),(0,B.jsxs)(`div`,{className:`stage__foot`,children:[(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`b`,{children:e.name}),e.root?` · root ${e.root}/`:``,` · `,e.screens.length,` screen`,e.screens.length===1?``:`s`,` · `,e.table.entries.length,` values tokenised from `,Math.round(e.cssBytes/1024),` KB of CSS`]}),(0,B.jsx)(`span`,{className:`stage__spacer`}),l&&(0,B.jsxs)(`button`,{type:`button`,className:`chip ${Eu(l.colours)<80?`chip--warn`:``}`,onClick:()=>g(e=>!e),title:`How much of what you see the knobs reach, measured on this screen`,children:[`reach `,Eu(l.colours),`% colours · `,Eu(l.fonts),`% type · `,Eu(l.radii),`% radii`,l.outside.images+l.outside.canvas+l.outside.backgroundImages?` · ${l.outside.images+l.outside.canvas+l.outside.backgroundImages} outside`:``]}),o>0?(0,B.jsxs)(`span`,{className:`chip chip--warn`,children:[(0,B.jsx)(`span`,{className:`chip__dot`}),o,` value`,o===1?``:`s`,` moved`]}):(0,B.jsxs)(`span`,{className:`chip chip--ok`,children:[(0,B.jsx)(`span`,{className:`chip__dot`}),`identity: nothing turned`]}),(0,B.jsxs)(`button`,{type:`button`,className:`chip`,onClick:k,title:`Measure: compare the untouched page with the tokenised page, element by element`,children:[(0,B.jsx)(Oe,{size:12,strokeWidth:2}),` `,b&&!(`busy`in b)?b.ok?`1:1 verified`:b.refusal?`1:1 unmeasured`:`1:1 differs`:`Check 1:1`]}),(o>0||b&&!(`busy`in b)&&b.ok)&&(0,B.jsxs)(`a`,{className:`chip stage__star`,href:`https://github.com/Ideelab/uisandbox`,target:`_blank`,rel:`noopener`,title:`Useful? A star on GitHub helps others find it`,children:[(0,B.jsx)(je,{size:12,strokeWidth:2}),` Useful? Star it`]})]})]})}var $=/\.(swift|kt|kts|java|xml|dart|qml|kv|py|json|m|mm|cs|vue|jsx|tsx|js|ts|mjs)$/i,Nd=(e,t,n)=>`#`+[e,t,n].map(e=>Math.round(e).toString(16).padStart(2,`0`)).join(``);function Pd(e,t){let n=[],r=(e.split(`.`).pop()??``).toLowerCase(),i=e=>{n.some(t=>e.start<t.end&&t.start<e.end)||n.push(e)};if(r===`json`&&/\.colorset\/Contents\.json$/.test(e)){for(let e of t.matchAll(/"components"\s*:\s*\{([^}]*)\}/g)){let n=e[1],r=e.index+e[0].indexOf(n),a=e=>{let t=n.match(RegExp(`"${e}"\\s*:\\s*"([^"]+)"`));return t?{v:t[1],at:r+(t.index??0)+t[0].indexOf(t[1])}:null},o=a(`red`),s=a(`green`),c=a(`blue`);if(!o||!s||!c)continue;let l=e=>/^0x/i.test(e)?parseInt(e,16):Math.round(parseFloat(e)*255),u=Nd(l(o.v),l(s.v),l(c.v)),d=Math.min(o.at,s.at,c.at),f=[o,s,c].sort((e,t)=>t.at-e.at)[0],p=f.at+f.v.length,m=t.slice(d,p);i({start:d,end:p,kind:`color`,value:u,prop:`xcassets`,print:e=>{let t=V(e);if(!t)return m;let[n,r,i]=Nn({...t,a:1}).slice(1).match(/../g).map(e=>parseInt(e,16)),a=(e,t)=>/^0x/i.test(e)?`0x`+t.toString(16).toUpperCase().padStart(2,`0`):(t/255).toFixed(3);return m.replace(o.v,a(o.v,n)).replace(s.v,a(s.v,r)).replace(c.v,a(c.v,i))}})}return n}let a=e=>{let n=t.slice(t.lastIndexOf(`
|
|
436
|
+
`,e)+1,e),r=n.match(/name="([\w.]+)"[^"]*$/);if(r)return r[1];let i=t.slice(Math.max(0,e-160),e+160),a=i.match(/"slug"\s*:\s*"([\w-]+)"/);if(a&&/"color"\s*:/.test(i))return a[1];let o=n.match(/(?:val|let|var|const|static\s+let|final)?\s*([A-Za-z_][\w.]*)\s*[:=]\s*[^=]*$/);return o?o[1]:``};for(let e of t.matchAll(/(["'>:=,(\s])#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})(?=["'<\s;,)]|$)/gm)){let t=e[2],n=e.index+1+e[1].length,o=r===`xml`&&t.length===8,s=o?t.slice(2):t.slice(0,6),c=o?t.slice(0,2):t.length===8?t.slice(6):``;i({start:n,end:n+t.length,kind:`color`,value:`#`+s.toLowerCase(),prop:a(e.index)||`hex`,print:e=>{let n=V(e),r=n?Nn({...n,a:1}).slice(1):s,i=/[A-F]/.test(t)?r.toUpperCase():r;return o?c+i:i+c}})}for(let e of t.matchAll(/\b0x([0-9a-fA-F]{8})\b/g)){let t=e[1],n=e.index+2;i({start:n,end:n+8,kind:`color`,value:`#`+t.slice(2).toLowerCase(),prop:a(e.index)||`0xAARRGGBB`,print:e=>{let n=V(e),r=n?Nn({...n,a:1}).slice(1):t.slice(2);return t.slice(0,2)+(/[A-F]/.test(t)?r.toUpperCase():r)}})}for(let e of t.matchAll(/\brgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*([\d.]+)\s*)?\)/g)){let t=Number(e[1]),n=Number(e[2]),r=Number(e[3]);if(t>255||n>255||r>255)continue;let o=e[4],s=e[0],c=/,\s/.test(s)?`, `:`,`;i({start:e.index,end:e.index+s.length,kind:`color`,value:Nd(t,n,r),prop:a(e.index)||`rgb()`,print:e=>{let t=V(e);if(!t)return s;let n=Nn({...t,a:1}),r=[1,3,5].map(e=>parseInt(n.slice(e,e+2),16));return o===void 0?`rgb(${r.join(c)})`:`rgba(${[...r,o].join(c)})`}})}for(let e of t.matchAll(/(?:UI|NS)?Color\(\s*red:\s*([\d.]+)\s*,\s*green:\s*([\d.]+)\s*,\s*blue:\s*([\d.]+)/g)){let[n,r,a]=[e[1],e[2],e[3]];if([n,r,a].some(e=>parseFloat(e)>1))continue;let o=e.index+e[0].indexOf(n),s=e.index+e[0].length,c=t.slice(o,s);i({start:o,end:s,kind:`color`,value:Nd(n*255,r*255,a*255),prop:`Color(red:green:blue:)`,print:e=>{let t=V(e);if(!t)return c;let[i,o,s]=Nn({...t,a:1}).slice(1).match(/../g).map(e=>parseInt(e,16)/255);return c.replace(n,i.toFixed(3)).replace(r,o.toFixed(3)).replace(a,s.toFixed(3))}})}if(r===`kv`||r===`py`)for(let e of t.matchAll(/\b(?:color|rgba|background_color|foreground_color|canvas_color|bar_color|text_color|line_color)\s*[:=]\s*\(?\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/g)){let[n,r,a]=[e[1],e[2],e[3]];if([n,r,a].some(e=>parseFloat(e)>1||!Number.isFinite(parseFloat(e))))continue;let o=e.index+e[0].indexOf(n),s=e.index+e[0].length,c=t.slice(o,s);i({start:o,end:s,kind:`color`,value:Nd(n*255,r*255,a*255),prop:`kivy rgba`,print:e=>{let t=V(e);if(!t)return c;let[i,o,s]=Nn({...t,a:1}).slice(1).match(/../g).map(e=>parseInt(e,16)/255),l=(e,t)=>t.includes(`.`)||e<1?String(Math.round(e*1e3)/1e3).replace(/^0(?=\.)/,t.startsWith(`.`)?``:`0`):String(e);return c.replace(n,l(i,n)).replace(r,l(o,r)).replace(a,l(s,a))}})}if(r===`json`&&/"\$?value"\s*:/.test(t))for(let e of t.matchAll(/"([\w.-]+)"\s*:\s*\{[^{}]*?"\$?value"\s*:\s*"([^"]+)"/g)){let n=e[1],r=e[2],a=e.index+e[0].lastIndexOf(r),o=`${t.slice(Math.max(0,e.index-400),e.index).match(/"([\w.-]+)"\s*:\s*\{\s*$/m)?.[1]??``}.${n}`;if(/^#[0-9a-f]{3,8}$/i.test(r)||/^(rgb|hsl)a?\(/.test(r))continue;let s=r.match(/^(\d*\.?\d+)(px|rem|dp|pt|sp)?$/);s&&/radius|rounded|corner/i.test(o)?i({start:a,end:a+r.length,kind:`radius`,value:`${s[1]}px`,prop:o,print:e=>String(parseFloat(e))+(s[2]??``)}):s&&/size|type|font/i.test(o)&&!/line|weight|letter/i.test(o)?i({start:a,end:a+r.length,kind:`font-size`,value:`${s[1]}px`,prop:o,print:e=>String(Math.round(parseFloat(e)*10)/10)+(s[2]??``)}):s&&/spac|gap|pad|margin|inset/i.test(o)?i({start:a,end:a+r.length,kind:`space`,value:`${s[1]}px`,prop:o,print:e=>String(Math.round(parseFloat(e)*10)/10)+(s[2]??``)}):!s&&/font|family|typeface/i.test(o)&&/^[A-Za-z][\w ]{1,40}(,.*)?$/.test(r)&&i({start:a,end:a+r.length,kind:`font-family`,value:`"${r.split(`,`)[0].trim()}"`,prop:o,print:e=>e.split(`,`)[0].trim().replace(/^["']|["']$/g,``)})}if(r===`json`)for(let e of t.matchAll(/"fontFamily"\s*:\s*"((?:\\.|[^"\\])+)"/g)){let t=e[1],n=e.index+e[0].indexOf(t),r=t.replace(/\\"/g,``).split(`,`)[0].trim();!r||/^(var\(|--|system-ui|sans-serif|serif|monospace)/i.test(r)||i({start:n,end:n+t.length,kind:`font-family`,value:`"${r}"`,prop:`theme.json`,print:e=>{let n=e.split(`,`)[0].trim().replace(/^["']|["']$/g,``);return t.replace(r,n)}})}for(let e of t.matchAll(/\bR\.font\.([a-z][\w]*)|@font\/([a-z][\w]*)/g)){let t=e[1]??e[2],n=e.index+e[0].length-t.length,r=t.replace(/_(regular|medium|semibold|bold|light|italic|black|thin|variable|wght)+$/i,``).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase());i({start:n,end:n+t.length,kind:`font-family`,value:`"${r}"`,prop:`font-resource`,print:()=>t})}for(let e of t.matchAll(/(?:Font\.custom|\.custom|fontFamily\s*[:=]|font-family\s*[:=]|FontFamily\.Custom|font_name\s*[:=]|"font"\s*:)\s*\(?\s*["']([^"']{2,60})["']/g)){let t=e[1],n=e.index+e[0].lastIndexOf(t);/[\\*+?|{}\[\]$^]/.test(t)||/^\./.test(t)||i({start:n,end:n+t.length,kind:`font-family`,value:`"${t}"`,prop:`font`,print:e=>e.split(`,`)[0].trim().replace(/^["']|["']$/g,``)})}for(let e of t.matchAll(/(?:cornerRadius\(|RoundedCornerShape\(|BorderRadius\.circular\(|\bradius\s*:\s*|android:radius="|corner_radius\s*[:=]\s*|borderRadius\s*[:=]\s*)(\d+(?:\.\d+)?)/g)){let t=e[1],n=e.index+e[0].length-t.length;parseFloat(t)===0||parseFloat(t)>=100||i({start:n,end:n+t.length,kind:`radius`,value:`${t}px`,prop:`radius`,print:e=>String(parseFloat(e))})}for(let e of t.matchAll(/(?:size:\s*|fontSize\s*[:=]\s*|font\.pixelSize\s*:\s*|font\.pointSize\s*:\s*|android:textSize="|font_size\s*[:=]\s*)(\d+(?:\.\d+)?)/g)){let t=e[1],n=e.index+e[0].length-t.length;parseFloat(t)<6||parseFloat(t)>120||i({start:n,end:n+t.length,kind:`font-size`,value:`${t}px`,prop:`size`,print:e=>String(Math.round(parseFloat(e)*10)/10)})}return n.sort((e,t)=>e.start-t.start)}function Fd(e,t,n,r){let i=Pd(e,t),a=t;for(let e of[...i].reverse()){let t=n.find(e.kind,e.value);if(!t)continue;let i=r[`--us-v${t.id}`];i!==void 0&&i!==t.value&&(a=a.slice(0,e.start)+e.print(i)+a.slice(e.end))}return a}function Id(e,t){let n={};return e.entries.map(e=>{n[e.kind]=(n[e.kind]??0)+1;let r=Io(e.value),i=t[No(e.id)]??r;return{entry:e,name:`--sb-${e.kind}-${n[e.kind]}`,current:i,changed:i!==r}})}function Ld(e,t,n={}){let r=Id(e,t).filter(e=>!n.changedOnly||e.changed),i=r.map(e=>{let t=e.entry.sites.slice(0,3).map(e=>`${e.file}${e.selector?` ${e.selector}`:``} { ${e.prop} }`).join(` · `),n=e.changed?` (was ${Io(e.entry.value)})`:``;return` /* ×${e.entry.count}${n} — ${t}${e.entry.count>3?` …`:``} */\n ${e.name}: ${e.current};`});return`/* UISandbox — your values, as they stand in the sandbox.\n * ${r.length} variables${n.changedOnly?` (changed only)`:``}; every one replaced a literal in your CSS.\n */\n:root {\n${i.join(`
|
|
437
|
+
`)}\n}\n`}function Rd(e,t){let n=Id(e,t).map(e=>({name:e.name,kind:e.entry.kind,original:Io(e.entry.value),current:e.current,changed:e.changed,count:e.entry.count,sites:e.entry.sites}));return JSON.stringify({generator:`uisandbox`,variables:n},null,2)+`
|
|
438
|
+
`}function zd(e,t){let n=Id(e,t).filter(e=>e.changed),r=new Map;for(let e of n){let t=new Set(e.entry.sites.map(e=>e.file));for(let n of t)r.has(n)||r.set(n,[]),r.get(n).push({from:Io(e.entry.value),to:e.current,kind:e.entry.kind,count:e.entry.sites.filter(e=>e.file===n).length})}if(!r.size)return`# Nothing changed — the sandbox is still 1:1 with your code.
|
|
439
|
+
`;let i=[`# UISandbox patch — replace these literals in your source to apply what you see.`,`# One line per value: kind original → current (occurrences seen in the built CSS)`,``];for(let[e,t]of[...r.entries()].sort((e,t)=>e[0].localeCompare(t[0]))){i.push(`## ${e}`);for(let e of t)i.push(`${e.kind.padEnd(11)} ${e.from} → ${e.to} (×${e.count})`);i.push(``)}return i.join(`
|
|
440
|
+
`)}function Bd(e,t){if(/(^|\/)(node_modules|\.next|_next|\.nuxt|\.svelte-kit)\//.test(e)||/\.min\.[a-z]+$/i.test(e))return!0;if(t.length<2e4)return!1;let n=1;for(let e=0;e<t.length;e++)t.charCodeAt(e)===10&&n++;return t.length/n>400}async function Vd(e,t,n,r=``){let i=[],a=new Map,o=[...r.matchAll(/family=([^:&'"]+)|font-family:'([^']+)'/g)].map(e=>(e[1]??e[2]??``).replace(/\+/g,` `)).filter(Boolean);for(let[s,c]of e)if(/\.css$/i.test(s)){let e=await c.blob.text(),l=ys(e,t,s,{mode:`values`,vars:n,cache:a});if(l!==e&&r&&o.some(e=>l.includes(e))){let e=l.match(/^@charset[^;]*;\s*/i);l=e?e[0]+r+`
|
|
441
|
+
`+l.slice(e[0].length):r+`
|
|
442
|
+
`+l}l!==e&&i.push({path:s,text:l})}else if(/\.html?$/i.test(s)){let e=await c.blob.text();if(!/<style|\sstyle\s*=/i.test(e))continue;let r=Cs(e,t,s,{mode:`values`,vars:n,cache:a});r!==e&&i.push({path:s,text:r})}else if($.test(s)){let e=await c.blob.text();if(Bd(s,e))continue;let r=Fd(s,e,t,n);r!==e&&i.push({path:s,text:r})}return i}function Hd(e){if(!e)return`#000000`;if(e.startsWith(`#`))return e;if(e.startsWith(`oklch`))return dt(e);let t=e.match(/hsl\(\s*([\d.]+)\s+([\d.]+)%\s+([\d.]+)%\s*\)/);if(t)return z(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]));if(/(^|[\s,])(radial|linear|conic)-gradient\(/.test(e)){let t=0,n=``,r=``;for(let i of e)i===`(`&&t++,i===`)`&&t--,i===`,`&&t===0?(r.trim()&&(n=r.trim()),r=``):r+=i;let i=(r.trim()||n).trim();if(i&&!/gradient\(/.test(i))return Hd(i)}let n=e.match(/color-mix\(\s*in\s+srgb\s*,\s*(.+?)\s+([\d.]+)%\s*,\s*(.+?)\s*\)\s*$/);if(n){let e=Hd(n[1]),t=Hd(n[3]),r=parseFloat(n[2])/100,i=(e,t)=>parseInt(e.slice(1+t*2,3+t*2),16);return`#${[0,1,2].map(n=>Math.round(i(e,n)*r+i(t,n)*(1-r))).map(e=>Math.max(0,Math.min(255,e)).toString(16).padStart(2,`0`)).join(``)}`}return typeof console<`u`&&console.warn(`[uicockpit] contrast audit cannot parse: ${e}`),`#ff00ff`}var Ud={base:0,dropdown:50,sticky:100,fixed:200,drawer:300,modal:1e3,popover:1100,toast:1200,tooltip:1300},Wd={compact:`600px`,medium:`840px`,expanded:`1200px`,large:`1600px`},Gd={fixed:`360px`,"fixed-xl":`412px`,spacer:`24px`,"margin-compact":`16px`,margin:`24px`},Kd={sm:`640px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`},qd={narrow:`640px`,regular:`1024px`,wide:`1280px`,max:`1536px`};function Jd(e){let t=or(e).vars,n=e=>t[e]??``,r={};for(let e=1;e<=6;e++)r[`accent-${e}`]=n(`--k-accent-${e}`),r[`accent-${e}-ink`]=n(`--k-accent-${e}-ink`),r[`accent-${e}-soft`]=n(`--k-accent-${e}-soft`),r[`accent-${e}-soft-fg`]=n(`--k-accent-${e}-soft-fg`),r[`grad-${e}`]=n(`--k-grad-${e}`),r[`chart-${e}`]=n(`--k-chart-${e}`);return r}function Yd(e){let t=or(e).vars,n=e=>parseFloat(t[e]??`0`),r=e=>`${Math.round(e*1e3)/1e3}rem`,i=n(`--k-type-h3`),a=n(`--k-type-body`);return{h4:r((i+a)/2),h5:r(a*1.05)}}var Xd=[2,4,6,8,10,12,14,16,20,24,28,32];function Zd(){let e={"s-0":`0`};for(let t of Xd)e[`s-${t}`]=`${+(t/16).toFixed(4)}rem`;return e}function Qd(e){return Zd()}var $d={"Body text on background":`Try Background: Crisp, or pick a darker neutral ramp.`,"Body text on surface":`Try Background: Crisp, or pick a darker neutral.`,"Body text on raised surface":`Try Background: Crisp — raised surfaces tint lighter than base.`,"Body text on overlay":`Try Background: Crisp — overlay surfaces tint lighter than base.`,"Muted text on background":`Try Background: Crisp — muted text is intentionally low-contrast.`,"Muted text on surface-2":`Try Background: Crisp — muted text is intentionally low-contrast.`,"Button text on primary":`Pick a darker primary, or switch to Mono.`,"Button text on primary hover":`Pick a darker primary — the hover state derives from it.`,"Secondary button text":`Pick a darker secondary-soft, or a lighter secondary-soft-fg.`,"Success text on success-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Warning text on warning-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Danger text on danger-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Info text on info-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Primary against background":`Primary as a SURFACE is fine here; for colored TEXT, use primary-soft tints.`,"Input border against background":`Common in modern UIs (Apple, Stripe both subtle here). Set Borders: Strong if you need strict WCAG, otherwise rely on labels + placeholders for affordance.`,"Input border against its fill":`The border is floored at 3:1 against the field fill at every Borders setting; if this fails, the fill token was changed by hand.`,"Focus ring against background":`Pick a higher-saturation primary, or set Background: Crisp.`};function ef(e){let t=e.vars;return[[`Body text on background`,`--k-fg`,`--k-bg`,4.5],[`Body text on surface`,`--k-fg`,`--k-surface`,4.5],[`Body text on raised surface`,`--k-fg`,`--k-surface-raised`,4.5],[`Body text on overlay`,`--k-fg`,`--k-surface-overlay`,4.5],[`Muted text on background`,`--k-fg-muted`,`--k-bg`,4.5],[`Muted text on surface-2`,`--k-fg-muted`,`--k-surface-2`,4.5],[`Button text on primary`,`--k-primary-fg`,`--k-primary`,4.5],[`Button text on primary hover`,`--k-primary-fg`,`--k-primary-hover`,4.5],[`Secondary button text`,`--k-secondary-soft-fg`,`--k-secondary-soft`,4.5],[`Success text on success-soft`,`--k-success-soft-fg`,`--k-success-soft`,4.5],[`Warning text on warning-soft`,`--k-warning-soft-fg`,`--k-warning-soft`,4.5],[`Danger text on danger-soft`,`--k-danger-soft-fg`,`--k-danger-soft`,4.5],[`Info text on info-soft`,`--k-info-soft-fg`,`--k-info-soft`,4.5],[`Danger text on surface`,`--k-danger-text`,`--k-surface`,4.5],[`Link text on surface`,`--k-primary-text`,`--k-surface`,4.5],[`Link hover on surface`,`--k-primary-text-hover`,`--k-surface`,4.5],[t[`--k-primary-edge`]&&t[`--k-primary-edge`]!==`transparent`?`Primary boundary against background`:`Primary against background`,t[`--k-primary-edge`]&&t[`--k-primary-edge`]!==`transparent`?`--k-primary-edge`:`--k-primary`,`--k-bg`,3],[`Input border against background`,`--k-input-border`,`--k-bg`,3],[`Input border against its fill`,`--k-input-border`,`--k-input-bg`,3],[`Focus ring against background`,`--k-ring`,`--k-bg`,3]].map(([e,n,r,i])=>{let a=t[n],o=t[r],s=a&&o?xt(Hd(a),Hd(o)):0,c=s>=i;return{label:e,fg:a||``,bg:o||``,ratio:Math.round(s*100)/100,required:i,passes:c,remedy:c?null:$d[e]??null}})}function tf(e){let t=or({...e,mode:`light`}).vars,n=or({...e,mode:`dark`}).vars,r=e=>Object.entries(e).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
443
|
+
`),i=Yd(e),a=[`
|
|
444
|
+
/* --- Z-index stack --- */`,...Object.entries(Ud).map(([e,t])=>` --k-z-${e}: ${t};`),`
|
|
445
|
+
/* --- Breakpoints --- */`,...Object.entries(Kd).map(([e,t])=>` --k-bp-${e}: ${t};`),`
|
|
446
|
+
/* --- Container widths --- */`,...Object.entries(qd).map(([e,t])=>` --k-container-${e}: ${t};`),`
|
|
447
|
+
/* --- Window classes (shell thresholds) + pane constants --- */`,...Object.entries(Wd).map(([e,t])=>` --k-win-${e}: ${t};`),...Object.entries(Gd).map(([e,t])=>` --k-pane-${e}: ${t};`),`
|
|
448
|
+
/* --- Extended type scale: h4/h5 in-between steps (the rest ship in :root above) --- */`,...Object.entries(i).map(([e,t])=>` --k-type-${e}: ${t};`)].join(`
|
|
449
|
+
`),o=[[`primary`,`--k-primary`],[`on-primary`,`--k-primary-fg`],[`primary-container`,`--k-primary-soft`],[`on-primary-container`,`--k-primary-soft-fg`],[`secondary`,`--k-secondary`],[`on-secondary`,`--k-secondary-fg`],[`secondary-container`,`--k-secondary-soft`],[`on-secondary-container`,`--k-secondary-soft-fg`],[`tertiary`,`--k-accent`],[`on-tertiary`,`--k-accent-fg`],[`tertiary-container`,`--k-accent-soft`],[`on-tertiary-container`,`--k-accent-soft-fg`],[`error`,`--k-danger`],[`on-error`,`--k-danger-fg`],[`error-container`,`--k-danger-soft`],[`on-error-container`,`--k-danger-soft-fg`],[`surface`,`--k-bg`],[`on-surface`,`--k-fg`],[`on-surface-variant`,`--k-fg-muted`],[`surface-dim`,`--k-surface-sunken`],[`surface-bright`,`--k-surface-raised`],[`surface-container-lowest`,`--k-surface-container-lowest`],[`surface-container-low`,`--k-surface-container-low`],[`surface-container`,`--k-surface-container`],[`surface-container-high`,`--k-surface-container-high`],[`surface-container-highest`,`--k-surface-container-highest`],[`outline`,`--k-input-border`],[`outline-variant`,`--k-border`],[`inverse-surface`,`--k-inverse-surface`],[`inverse-on-surface`,`--k-inverse-fg`],[`inverse-primary`,`--k-inverse-primary`],[`scrim`,`--k-scrim`]].map(([e,t])=>` --md-sys-color-${e}: var(${t});`).join(`
|
|
450
|
+
`);return`/* tokens.css — UISandbox tokens
|
|
451
|
+
*
|
|
452
|
+
* Drop-in usage:
|
|
453
|
+
* <link rel="stylesheet" href="tokens.css"> (or @import in your CSS)
|
|
454
|
+
*
|
|
455
|
+
* Dark mode:
|
|
456
|
+
* <html class="dark"> or any ancestor element — the .dark block
|
|
457
|
+
* re-resolves every --k-* token.
|
|
458
|
+
*
|
|
459
|
+
* Fonts are pulled from Google Fonts. To self-host, remove the @import
|
|
460
|
+
* and add your own @font-face declarations.
|
|
461
|
+
*/
|
|
462
|
+
|
|
463
|
+
${it(e.fontDisplay,e.fontBody)}
|
|
464
|
+
${[e.fontDisplay,e.fontBody].filter((e,t,n)=>He(e)&&n.indexOf(e)===t).map(at).join(`
|
|
465
|
+
|
|
466
|
+
`)}
|
|
467
|
+
|
|
468
|
+
:root {
|
|
469
|
+
${r(t)}
|
|
470
|
+
${a}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.dark {
|
|
474
|
+
${r(n)}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/* --- Material 3 compatibility aliases (optional bridge) ---
|
|
478
|
+
* For codebases/agents written against the M3 sys-color vocabulary:
|
|
479
|
+
* every --md-sys-color-* resolves to its --k-* counterpart. The
|
|
480
|
+
* aliases are var() references, so they follow light/dark automatically.
|
|
481
|
+
* Safe to delete if you don't need them. */
|
|
482
|
+
:root {
|
|
483
|
+
${o}
|
|
484
|
+
}
|
|
485
|
+
`}var nf={hairline:{label:`Iconoir (1.5px stroke, rounded joins)`,pkg:`iconoir-react`,install:`npm install iconoir-react`,importExample:`import { Bell } from 'iconoir-react'
|
|
486
|
+
<Bell width={20} height={20} strokeWidth={1.5} />`,sw:1.5,fill:!1},line:{label:`Lucide (1.75px stroke, balanced)`,pkg:`lucide-react`,install:`npm install lucide-react`,importExample:`import { Bell } from 'lucide-react'
|
|
487
|
+
<Bell size={20} strokeWidth={1.75} />`,sw:1.75,fill:!1},rounded:{label:`Phosphor regular (rounded terminals)`,pkg:`@phosphor-icons/react`,install:`npm install @phosphor-icons/react`,importExample:`import { Bell } from '@phosphor-icons/react'
|
|
488
|
+
<Bell size={20} weight="regular" />`,sw:1.5,fill:!1},bold:{label:`Phosphor bold (heavy weight)`,pkg:`@phosphor-icons/react`,install:`npm install @phosphor-icons/react`,importExample:`import { Bell } from '@phosphor-icons/react'
|
|
489
|
+
<Bell size={20} weight="bold" />`,sw:2,fill:!1},solid:{label:`Heroicons solid (filled)`,pkg:`@heroicons/react`,install:`npm install @heroicons/react`,importExample:`import { BellIcon } from '@heroicons/react/24/solid'
|
|
490
|
+
<BellIcon className="w-5 h-5" />`,sw:0,fill:!0}};function rf(e){let t=or(e),n=or({...e,mode:`dark`}).vars,r=t.vars,i=e=>({value:r[e]}),a=Object.fromEntries(t.sysList.map(e=>[e.k,{value:r[`--k-`+e.k],foreground:r[`--k-`+e.k+`-fg`],soft:r[`--k-`+e.k+`-soft`],"soft-foreground":r[`--k-`+e.k+`-soft-fg`]}])),o={format:`uisandbox-kit/1`,name:`cockpit-ui-kit`,meta:{generator:`Cockpit`,interchange:`For the W3C Design Tokens format, export design.tokens.json instead.`},decisions:e,tokens:{color:{background:i(`--k-bg`),foreground:i(`--k-fg`),"foreground-muted":i(`--k-fg-muted`),"foreground-faint":i(`--k-fg-faint`),surface:i(`--k-surface`),"surface-sunken":i(`--k-surface-sunken`),"surface-2":i(`--k-surface-2`),"surface-raised":i(`--k-surface-raised`),"surface-overlay":i(`--k-surface-overlay`),primary:{value:r[`--k-primary`],name:jt(t.primaryHex)},"primary-hover":i(`--k-primary-hover`),"primary-foreground":i(`--k-primary-fg`),"primary-soft":i(`--k-primary-soft`),secondary:{value:r[`--k-secondary`],name:jt(t.secHex)},"secondary-foreground":i(`--k-secondary-fg`),"secondary-soft":i(`--k-secondary-soft`),accent:{value:r[`--k-accent`],name:jt(t.accentHex)},"accent-foreground":i(`--k-accent-fg`),fill:{value:r[`--k-fill`]},border:i(`--k-border`),"input-border":i(`--k-input-border`),ring:i(`--k-ring`),"ring-soft":i(`--k-ring-soft`),"secondary-soft-foreground":i(`--k-secondary-soft-fg`),selection:i(`--k-selection`)},system:a,state:{"disabled-bg":i(`--k-disabled-bg`),"disabled-foreground":i(`--k-disabled-fg`),"disabled-opacity":i(`--k-disabled-opacity`),"focus-ring-width":i(`--k-focus-ring-width`),"focus-ring-offset":i(`--k-focus-ring-offset`),"input-error-border":i(`--k-input-error-border`),"input-success-border":i(`--k-input-success-border`),"input-warning-border":i(`--k-input-warning-border`)},radius:{md:i(`--k-radius-md`),lg:i(`--k-radius-lg`),pill:i(`--k-radius-pill`),button:i(`--k-radius-button`)},shadow:{sm:i(`--k-shadow-sm`),md:i(`--k-shadow-md`),lg:i(`--k-shadow-lg`)},spacing:{base:i(`--k-space`)},border:{width:i(`--k-bw`)},typography:{"font-display":i(`--k-font-display`),"font-body":i(`--k-font-body`),"font-mono":i(`--k-font-mono`),"size-h1":i(`--k-type-h1`),"size-h2":i(`--k-type-h2`),"size-h3":i(`--k-type-h3`),"size-body":i(`--k-type-body`),"size-small":i(`--k-type-small`),"size-eyebrow":i(`--k-type-eyebrow`),"ui-weight":i(`--k-ui-weight`)},motion:{"duration-fast":i(`--k-dur-fast`),duration:i(`--k-dur`),"duration-slow":i(`--k-dur-slow`),easing:i(`--k-ease`),"easing-out":i(`--k-ease-out`),"easing-in":i(`--k-ease-in`),animations:{"fade-in":i(`--k-anim-fade-in`),"fade-out":i(`--k-anim-fade-out`),"slide-up":i(`--k-anim-slide-up`),"slide-down":i(`--k-anim-slide-down`),"scale-in":i(`--k-anim-scale-in`),"scale-out":i(`--k-anim-scale-out`),spin:i(`--k-anim-spin`)},"state-hover":i(`--k-state-hover`)},icon:{style:{value:e.iconSet},library:{value:nf[e.iconSet].label},package:{value:nf[e.iconSet].pkg},install:{value:nf[e.iconSet].install},"stroke-width":{value:nf[e.iconSet].fill?`filled`:nf[e.iconSet].sw}},"z-index":Object.fromEntries(Object.entries(Ud).map(([e,t])=>[e,{value:t}])),breakpoint:Object.fromEntries(Object.entries(Kd).map(([e,t])=>[e,{value:t}])),container:Object.fromEntries(Object.entries(qd).map(([e,t])=>[e,{value:t}])),palette:Object.fromEntries(Object.entries(Jd(e)).map(([e,t])=>[e,{value:t}])),"type-scale-extended":Object.fromEntries(Object.entries(Yd(e)).map(([e,t])=>[e,{value:t}])),"spacing-scale":Object.fromEntries(Object.entries(Qd(e)).map(([e,t])=>[e,{value:t}]))},accessibility:{pairs:ef(t).map(e=>({label:e.label,ratio:e.ratio,required:e.required,passes:e.passes}))},dark:Object.fromEntries(Object.keys(n).filter(e=>n[e]!==r[e]).map(e=>[e,n[e]]))};return JSON.stringify(o,null,2)}function af(e){let t=or({...e,mode:`light`}),n=or({...e,mode:`dark`}).vars,r=t.vars,i=[[`background`,`--k-bg`],[`foreground`,`--k-fg`],[`muted`,`--k-fg-muted`],[`faint`,`--k-fg-faint`],[`surface`,`--k-surface`],[`surface-sunken`,`--k-surface-sunken`],[`surface-2`,`--k-surface-2`],[`surface-raised`,`--k-surface-raised`],[`surface-overlay`,`--k-surface-overlay`],[`primary`,`--k-primary`],[`primary-hover`,`--k-primary-hover`],[`primary-foreground`,`--k-primary-fg`],[`primary-soft`,`--k-primary-soft`],[`secondary`,`--k-secondary`],[`secondary-foreground`,`--k-secondary-fg`],[`secondary-soft`,`--k-secondary-soft`],[`accent`,`--k-accent`],[`accent-foreground`,`--k-accent-fg`],[`fill`,`--k-fill`],[`border`,`--k-border`],[`input-border`,`--k-input-border`],[`ring`,`--k-ring`],[`ring-soft`,`--k-ring-soft`],[`secondary-soft-foreground`,`--k-secondary-soft-fg`],[`selection`,`--k-selection`],[`disabled-bg`,`--k-disabled-bg`],[`disabled-foreground`,`--k-disabled-fg`],[`input-error-border`,`--k-input-error-border`],[`input-success-border`,`--k-input-success-border`],[`input-warning-border`,`--k-input-warning-border`]];t.sysList.forEach(e=>{i.push([e.k,`--k-`+e.k],[e.k+`-foreground`,`--k-`+e.k+`-fg`],[e.k+`-soft`,`--k-`+e.k+`-soft`])});let a=i.map(([e,t])=>` --color-${e}: ${r[t]};`).join(`
|
|
491
|
+
`),o=` --radius-sm: calc(${r[`--k-radius-md`]} * 0.6);
|
|
492
|
+
--radius-md: ${r[`--k-radius-md`]};
|
|
493
|
+
--radius-lg: ${r[`--k-radius-lg`]};
|
|
494
|
+
--radius-pill: ${r[`--k-radius-pill`]};
|
|
495
|
+
--radius-button: ${r[`--k-radius-button`]};
|
|
496
|
+
--shadow-sm: ${r[`--k-shadow-sm`]};
|
|
497
|
+
--shadow-md: ${r[`--k-shadow-md`]};
|
|
498
|
+
--shadow-lg: ${r[`--k-shadow-lg`]};
|
|
499
|
+
--spacing-base: ${r[`--k-space`]};
|
|
500
|
+
--font-display: ${r[`--k-font-display`]};
|
|
501
|
+
--font-sans: ${r[`--k-font-body`]};
|
|
502
|
+
--font-mono: ${r[`--k-font-mono`]};
|
|
503
|
+
--text-h1: ${r[`--k-type-h1`]};
|
|
504
|
+
--text-h2: ${r[`--k-type-h2`]};
|
|
505
|
+
--text-h3: ${r[`--k-type-h3`]};
|
|
506
|
+
--text-body: ${r[`--k-type-body`]};
|
|
507
|
+
--text-small: ${r[`--k-type-small`]};
|
|
508
|
+
--text-eyebrow: ${r[`--k-type-eyebrow`]};
|
|
509
|
+
/* Motion — three-tier durations + direction-aware easings.
|
|
510
|
+
Use duration-fast / duration / duration-slow for transition-duration utils,
|
|
511
|
+
ease-out for enter animations, ease-in for exit. */
|
|
512
|
+
--default-transition-duration: ${r[`--k-dur`]};
|
|
513
|
+
--default-transition-timing-function: ${r[`--k-ease`]};
|
|
514
|
+
--duration-fast: ${r[`--k-dur-fast`]};
|
|
515
|
+
--duration: ${r[`--k-dur`]};
|
|
516
|
+
--duration-slow: ${r[`--k-dur-slow`]};
|
|
517
|
+
--ease: ${r[`--k-ease`]};
|
|
518
|
+
--ease-out: ${r[`--k-ease-out`]};
|
|
519
|
+
--ease-in: ${r[`--k-ease-in`]};
|
|
520
|
+
/* Named animation shorthands — use with: animate-[var(--animate-fade-in)] */
|
|
521
|
+
--animate-fade-in: ${r[`--k-anim-fade-in`]};
|
|
522
|
+
--animate-fade-out: ${r[`--k-anim-fade-out`]};
|
|
523
|
+
--animate-slide-up: ${r[`--k-anim-slide-up`]};
|
|
524
|
+
--animate-slide-down: ${r[`--k-anim-slide-down`]};
|
|
525
|
+
--animate-scale-in: ${r[`--k-anim-scale-in`]};
|
|
526
|
+
--animate-scale-out: ${r[`--k-anim-scale-out`]};
|
|
527
|
+
--animate-spin-default: ${r[`--k-anim-spin`]};
|
|
528
|
+
/* Menu "roll-down" signature — panel + staggered items (see tokens.css keyframes) */
|
|
529
|
+
--animate-menu: ${r[`--k-anim-menu`]};
|
|
530
|
+
--animate-menu-item: ${r[`--k-anim-menu-item`]};
|
|
531
|
+
--menu-stagger: ${r[`--k-menu-stagger`]};
|
|
532
|
+
/* UI text — applies to buttons, badges, tabs, nav rows, form labels.
|
|
533
|
+
Sentence case at the 14px body floor; uppercase only via the eyebrow role. */
|
|
534
|
+
--ui-font-weight: ${r[`--k-ui-weight`]};
|
|
535
|
+
/* State + focus ring + disabled opacity */
|
|
536
|
+
--opacity-disabled: ${r[`--k-disabled-opacity`]};
|
|
537
|
+
--width-focus-ring: ${r[`--k-focus-ring-width`]};
|
|
538
|
+
--offset-focus-ring: ${r[`--k-focus-ring-offset`]};
|
|
539
|
+
/* Z-index stack (Tailwind utilities: z-dropdown, z-modal, etc.) */
|
|
540
|
+
${Object.entries(Ud).map(([e,t])=>` --z-${e}: ${t};`).join(`
|
|
541
|
+
`)}
|
|
542
|
+
/* Breakpoints (mobile-first, Tailwind defaults) */
|
|
543
|
+
${Object.entries(Kd).map(([e,t])=>` --breakpoint-${e}: ${t};`).join(`
|
|
544
|
+
`)}
|
|
545
|
+
/* Container widths */
|
|
546
|
+
${Object.entries(qd).map(([e,t])=>` --container-${e}: ${t};`).join(`
|
|
547
|
+
`)}
|
|
548
|
+
/* Decorative + chart palette — accent-1..6 (avatars/tiles/labels) and
|
|
549
|
+
chart-1..6 (same colours). Gradient pairs ship in tokens.css as
|
|
550
|
+
--k-grad-1..6. */
|
|
551
|
+
${Object.entries(Jd(e)).filter(([e])=>!e.startsWith(`grad-`)&&!e.endsWith(`-ink`)).map(([e,t])=>` --color-${e}: ${t};`).join(`
|
|
552
|
+
`)}
|
|
553
|
+
/* Extended type scale — h3/h4/h5/caption/eyebrow + display */
|
|
554
|
+
${Object.entries(Yd(e)).map(([e,t])=>` --text-${e}: ${t};`).join(`
|
|
555
|
+
`)}
|
|
556
|
+
/* Spacing scale — s-0 through s-12 (multiples of --k-space) */
|
|
557
|
+
${Object.entries(Qd(e)).map(([e,t])=>` --spacing-${e.replace(`s-`,``)}: ${t};`).join(`
|
|
558
|
+
`)}`,s=i.filter(([,e])=>n[e]!==r[e]).map(([e,t])=>` --color-${e}: ${n[t]};`).join(`
|
|
559
|
+
`),c=nf[e.iconSet];return`/* globals.css — UIcockpit design system, Tailwind v4
|
|
560
|
+
*
|
|
561
|
+
* Standalone: imports Tailwind v4 and registers the Cockpit theme.
|
|
562
|
+
* Place in src/app/globals.css (Next) or src/styles/globals.css (Vite),
|
|
563
|
+
* then import once from your root layout.
|
|
564
|
+
*
|
|
565
|
+
* Dark mode: add the class .dark to a parent element. Tailwind v4 reads
|
|
566
|
+
* the @theme block at build time, so every utility (bg-primary, text-muted,
|
|
567
|
+
* shadow-md, font-display, …) resolves to the current values.
|
|
568
|
+
*
|
|
569
|
+
* Icons (this kit uses ${c.label}):
|
|
570
|
+
* ${c.install}
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
@import "tailwindcss";
|
|
574
|
+
|
|
575
|
+
${it(e.fontDisplay,e.fontBody)}
|
|
576
|
+
${[e.fontDisplay,e.fontBody].filter((e,t,n)=>He(e)&&n.indexOf(e)===t).map(at).join(`
|
|
577
|
+
|
|
578
|
+
`)}
|
|
579
|
+
|
|
580
|
+
@custom-variant dark (&:is(.dark *));
|
|
581
|
+
|
|
582
|
+
@theme {
|
|
583
|
+
${a}
|
|
584
|
+
${o}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/* Dark mode — apply class="dark" to <html> or any parent element */
|
|
588
|
+
.dark {
|
|
589
|
+
${s}
|
|
590
|
+
}
|
|
591
|
+
`}var of=[{shadcn:`background`,cockpit:`--k-bg`},{shadcn:`foreground`,cockpit:`--k-fg`},{shadcn:`card`,cockpit:`--k-surface`},{shadcn:`card-foreground`,cockpit:`--k-fg`},{shadcn:`popover`,cockpit:`--k-surface-overlay`},{shadcn:`popover-foreground`,cockpit:`--k-fg`},{shadcn:`primary`,cockpit:`--k-primary`},{shadcn:`primary-foreground`,cockpit:`--k-primary-fg`},{shadcn:`secondary`,cockpit:`--k-secondary-soft`},{shadcn:`secondary-foreground`,cockpit:`--k-secondary-soft-fg`},{shadcn:`muted`,cockpit:`--k-surface-2`},{shadcn:`muted-foreground`,cockpit:`--k-fg-muted`},{shadcn:`accent`,cockpit:`--k-accent`},{shadcn:`accent-foreground`,cockpit:`--k-accent-fg`},{shadcn:`destructive`,cockpit:`--k-danger`},{shadcn:`destructive-foreground`,cockpit:`--k-danger-fg`},{shadcn:`border`,cockpit:`--k-border`},{shadcn:`input`,cockpit:`--k-input-border`},{shadcn:`ring`,cockpit:`--k-ring`},{shadcn:`chart-1`,cockpit:`--k-chart-1`},{shadcn:`chart-2`,cockpit:`--k-chart-2`},{shadcn:`chart-3`,cockpit:`--k-chart-3`},{shadcn:`chart-4`,cockpit:`--k-chart-4`},{shadcn:`chart-5`,cockpit:`--k-chart-5`},{shadcn:`sidebar`,cockpit:`--k-surface-sunken`},{shadcn:`sidebar-foreground`,cockpit:`--k-fg`},{shadcn:`sidebar-primary`,cockpit:`--k-primary`},{shadcn:`sidebar-primary-foreground`,cockpit:`--k-primary-fg`},{shadcn:`sidebar-accent`,cockpit:`--k-primary-soft`},{shadcn:`sidebar-accent-foreground`,cockpit:`--k-primary`},{shadcn:`sidebar-border`,cockpit:`--k-border`},{shadcn:`sidebar-ring`,cockpit:`--k-ring`}];function sf(e){let t=of.filter(({cockpit:t})=>e[t]!==void 0).map(({shadcn:t,cockpit:n})=>` --${t}: ${e[n]};`),n=e[`--k-radius-md`];return n&&t.push(` --radius: ${n};`),t.join(`
|
|
592
|
+
`)}function cf(){return`${of.map(({shadcn:e})=>` --color-${e}: var(--${e});`).join(`
|
|
593
|
+
`)}
|
|
594
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
595
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
596
|
+
--radius-lg: var(--radius);
|
|
597
|
+
--radius-xl: calc(var(--radius) + 4px);`}function lf(e){let t=or({...e,mode:`light`}).vars,n=or({...e,mode:`dark`}).vars,r=nf[e.iconSet];return`/* globals.css — UIcockpit theme for shadcn/ui (Tailwind v4)
|
|
598
|
+
*
|
|
599
|
+
* Standalone: replaces the globals.css that \`npx shadcn@latest init\`
|
|
600
|
+
* generates. Drop into src/app/globals.css (Next.js) or your equivalent,
|
|
601
|
+
* then \`npx shadcn@latest add button card …\` — every component will
|
|
602
|
+
* theme itself from this file without further config.
|
|
603
|
+
*
|
|
604
|
+
* Dark mode: add class="dark" to <html> or a parent.
|
|
605
|
+
*
|
|
606
|
+
* Icons (this kit uses ${r.label}):
|
|
607
|
+
* ${r.install}${r.pkg===`lucide-react`?`
|
|
608
|
+
* (shadcn defaults to lucide-react — no overrides needed)`:`
|
|
609
|
+
*
|
|
610
|
+
* shadcn defaults to lucide-react. Override icon imports in shadcn
|
|
611
|
+
* components by search & replacing "lucide-react" → "`+r.pkg+`".`}
|
|
612
|
+
*/
|
|
613
|
+
|
|
614
|
+
@import "tailwindcss";
|
|
615
|
+
@plugin "tailwindcss-animate";
|
|
616
|
+
|
|
617
|
+
${it(e.fontDisplay,e.fontBody)}
|
|
618
|
+
${[e.fontDisplay,e.fontBody].filter((e,t,n)=>He(e)&&n.indexOf(e)===t).map(at).join(`
|
|
619
|
+
|
|
620
|
+
`)}
|
|
621
|
+
|
|
622
|
+
@custom-variant dark (&:is(.dark *));
|
|
623
|
+
|
|
624
|
+
@theme inline {
|
|
625
|
+
${cf()}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
:root {
|
|
629
|
+
${sf(t)}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.dark {
|
|
633
|
+
${sf(n)}
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
@layer base {
|
|
637
|
+
* {
|
|
638
|
+
@apply border-border outline-ring/50;
|
|
639
|
+
}
|
|
640
|
+
body {
|
|
641
|
+
@apply bg-background text-foreground;
|
|
642
|
+
font-family: ${t[`--k-font-body`]};
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
`}var uf=[[`primary`,`--k-primary`],[`primaryHover`,`--k-primary-hover`],[`primaryForeground`,`--k-primary-fg`],[`primarySoft`,`--k-primary-soft`],[`secondary`,`--k-secondary`],[`accent`,`--k-accent`],[`background`,`--k-bg`],[`surface`,`--k-surface`],[`surfaceSunken`,`--k-surface-sunken`],[`surfaceRaised`,`--k-surface-raised`],[`foreground`,`--k-fg`],[`foregroundMuted`,`--k-fg-muted`],[`foregroundFaint`,`--k-fg-faint`],[`border`,`--k-border`],[`inputBorder`,`--k-input-border`],[`ring`,`--k-ring`],[`success`,`--k-success`],[`warning`,`--k-warning`],[`danger`,`--k-danger`],[`info`,`--k-info`]],df=[[`radiusSmall`,`--k-radius-sm`],[`radiusMedium`,`--k-radius-md`],[`radiusLarge`,`--k-radius-lg`],[`space`,`--k-space`],[`pad`,`--k-pad`],[`gap`,`--k-gap`],[`spacing2`,`--k-s-2`],[`spacing4`,`--k-s-4`],[`spacing8`,`--k-s-8`],[`spacing12`,`--k-s-12`],[`spacing16`,`--k-s-16`],[`spacing24`,`--k-s-24`],[`spacing32`,`--k-s-32`],[`controlHeight`,`--k-in-h-default`],[`buttonHeight`,`--k-btn-h-default`]],ff=[[`display`,`--k-type-display`],[`h1`,`--k-type-h1`],[`h2`,`--k-type-h2`],[`h3`,`--k-type-h3`],[`body`,`--k-type-body`],[`small`,`--k-type-small`],[`caption`,`--k-type-caption`]];function pf(e){if(e===void 0)return null;let t=String(e).trim();if(/^#[0-9a-f]{6}$/i.test(t))return t.toLowerCase();if(/^oklch\(/i.test(t))try{return dt(t)}catch{return null}return null}var mf=e=>{let t=String(e??``).trim().match(/^(-?\d*\.?\d+)(px|rem)$/);if(!t)return null;let n=parseFloat(t[1]);return Math.round((t[2]===`rem`?n*16:n)*100)/100},hf=e=>{let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return`Color(red: ${t.toFixed(4)}, green: ${n.toFixed(4)}, blue: ${r.toFixed(4)})`};function gf(e){let t=or({...e,mode:`light`}).vars,n=or({...e,mode:`dark`}).vars,r=uf.map(([e,r])=>{let i=pf(t[r]),a=pf(n[r]);return i?` static let ${e} = Color(light: ${hf(i)}, dark: ${hf(a??i)}) // ${i} / ${a??i}`:` // ${e}: ${t[r]} (not a flat colour — see tokens.css)`}),i=df.map(([e,n])=>{let r=mf(t[n]);return r===null?` // ${e}: ${t[n]}`:` static let ${e}: CGFloat = ${r}`}),a=ff.map(([e,n])=>{let r=mf(t[n]);return r===null?` // ${e}: ${t[n]}`:` static let ${e}: CGFloat = ${r}`}),o=e=>e===`System`?null:Ue(e),s=o(e.fontDisplay),c=o(e.fontBody);return`// DesignTokens.swift — generated by UISandbox from the values in the sandbox.
|
|
646
|
+
// Drop into your Xcode project. Custom fonts must be added to the bundle + Info.plist.
|
|
647
|
+
import SwiftUI
|
|
648
|
+
|
|
649
|
+
extension Color {
|
|
650
|
+
/// A colour that follows the system appearance.
|
|
651
|
+
init(light: Color, dark: Color) {
|
|
652
|
+
self.init(uiColor: UIColor { trait in
|
|
653
|
+
trait.userInterfaceStyle == .dark ? UIColor(dark) : UIColor(light)
|
|
654
|
+
})
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
enum DesignTokens {
|
|
659
|
+
enum Colors {
|
|
660
|
+
${r.join(`
|
|
661
|
+
`)}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
enum Metrics {
|
|
665
|
+
${i.join(`
|
|
666
|
+
`)}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
enum TypeSize {
|
|
670
|
+
${a.join(`
|
|
671
|
+
`)}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
enum Fonts {
|
|
675
|
+
static let displayFamily: String? = ${s?`"${s}"`:`nil // system`}
|
|
676
|
+
static let bodyFamily: String? = ${c?`"${c}"`:`nil // system`}
|
|
677
|
+
static func display(_ size: CGFloat, weight: Font.Weight = .semibold) -> Font {
|
|
678
|
+
displayFamily.map { Font.custom($0, size: size).weight(weight) } ?? .system(size: size, weight: weight, design: .default)
|
|
679
|
+
}
|
|
680
|
+
static func body(_ size: CGFloat = TypeSize.body, weight: Font.Weight = .regular) -> Font {
|
|
681
|
+
bodyFamily.map { Font.custom($0, size: size).weight(weight) } ?? .system(size: size, weight: weight, design: .default)
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
`}function _f(e){let t=or({...e,mode:`light`}).vars,n=or({...e,mode:`dark`}).vars,r=[{path:`DesignTokens.xcassets/Contents.json`,content:JSON.stringify({info:{author:`uisandbox`,version:1}},null,2)+`
|
|
686
|
+
`}],i=e=>({"color-space":`srgb`,components:{red:`0x${e.slice(1,3).toUpperCase()}`,green:`0x${e.slice(3,5).toUpperCase()}`,blue:`0x${e.slice(5,7).toUpperCase()}`,alpha:`1.000`}});for(let[e,a]of uf){let o=pf(t[a]),s=pf(n[a]);if(!o)continue;let c={info:{author:`uisandbox`,version:1},colors:[{idiom:`universal`,color:i(o)},{idiom:`universal`,appearances:[{appearance:`luminosity`,value:`dark`}],color:i(s??o)}]},l=e.charAt(0).toUpperCase()+e.slice(1);r.push({path:`DesignTokens.xcassets/${l}.colorset/Contents.json`,content:JSON.stringify(c,null,2)+`
|
|
687
|
+
`})}return r}var vf=[[`primary`,`--k-primary`],[`primary_hover`,`--k-primary-hover`],[`on_primary`,`--k-primary-fg`],[`primary_container`,`--k-primary-soft`],[`secondary`,`--k-secondary`],[`tertiary`,`--k-accent`],[`background`,`--k-bg`],[`surface`,`--k-surface`],[`surface_variant`,`--k-surface-sunken`],[`on_surface`,`--k-fg`],[`on_surface_muted`,`--k-fg-muted`],[`outline`,`--k-input-border`],[`outline_variant`,`--k-border`],[`success`,`--k-success`],[`warning`,`--k-warning`],[`error`,`--k-danger`],[`info`,`--k-info`]],yf=e=>`#FF`+e.slice(1).toUpperCase(),bf=e=>e.split(`_`).map((e,t)=>t?e[0].toUpperCase()+e.slice(1):e).join(``);function xf(e,t=`light`){let n=or({...e,mode:t}).vars,r=vf.map(([e,t])=>{let r=pf(n[t]);return r?` <color name="${e}">${yf(r)}</color>`:` <!-- ${e}: ${n[t]} (not a flat colour) -->`});return`<?xml version="1.0" encoding="utf-8"?>\n<!-- generated by UISandbox — values${t===`dark`?`-night`:``}/colors.xml -->\n<resources>\n${r.join(`
|
|
688
|
+
`)}\n</resources>\n`}function Sf(e){let t=or({...e,mode:`light`}).vars,n=or({...e,mode:`dark`}).vars,r=e=>{let t=String(e??``).match(/^(-?\d*\.?\d+)(px|rem)$/);return t?Math.round((t[2]===`rem`?t[1]*16:+t[1])*10)/10:null},i=e=>vf.map(([t,n])=>{let r=pf(e[n]);return r?` val ${bf(t)} = Color(0xFF${r.slice(1).toUpperCase()})`:` // ${t}: ${e[n]}`});return`// DesignTokens.kt — generated by UISandbox from the values in the sandbox.
|
|
689
|
+
package design
|
|
690
|
+
|
|
691
|
+
import androidx.compose.ui.graphics.Color
|
|
692
|
+
import androidx.compose.ui.unit.dp
|
|
693
|
+
import androidx.compose.ui.unit.sp
|
|
694
|
+
|
|
695
|
+
object DesignTokens {
|
|
696
|
+
object Light {
|
|
697
|
+
${i(t).join(`
|
|
698
|
+
`)}
|
|
699
|
+
}
|
|
700
|
+
object Dark {
|
|
701
|
+
${i(n).join(`
|
|
702
|
+
`)}
|
|
703
|
+
}
|
|
704
|
+
object Radius {
|
|
705
|
+
val small = ${r(t[`--k-radius-sm`])??6}.dp
|
|
706
|
+
val medium = ${r(t[`--k-radius-md`])??10}.dp
|
|
707
|
+
val large = ${r(t[`--k-radius-lg`])??12}.dp
|
|
708
|
+
}
|
|
709
|
+
object Space {
|
|
710
|
+
val unit = ${r(t[`--k-space`])??16}.dp
|
|
711
|
+
val pad = ${r(t[`--k-pad`])??24}.dp
|
|
712
|
+
val gap = ${r(t[`--k-gap`])??8}.dp
|
|
713
|
+
}
|
|
714
|
+
object Type {
|
|
715
|
+
val display = ${r(t[`--k-type-display`])??48}.sp
|
|
716
|
+
val h1 = ${r(t[`--k-type-h1`])??30}.sp
|
|
717
|
+
val h2 = ${r(t[`--k-type-h2`])??22}.sp
|
|
718
|
+
val body = ${r(t[`--k-type-body`])??14}.sp
|
|
719
|
+
val small = ${r(t[`--k-type-small`])??12}.sp
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
`}function Cf(e){if(typeof e==`number`)return String(e);let t=e.trim();return/^[A-Za-z][A-Za-z0-9 ._-]*$/.test(t)&&!/^(y|n|yes|no|true|false|on|off|null)$/i.test(t)?t:JSON.stringify(t)}var wf=e=>/^-?\d*\.?\d+$/.test(e.trim())?`${e.trim()}px`:e.trim();function Tf(e){let t=[],n=new Set,r=e=>{!e||n.has(e.fontSize)||(n.add(e.fontSize),t.push(e))},i=e.anchors.type,a=(e,t)=>{if(!t)return;let n=parseFloat(t.fontSize);if(!Number.isFinite(n)||n<8||n>200)return;let r=parseInt(t.fontWeight,10),i=parseFloat(t.lineHeight);return{name:e,fontFamily:t.fontFamily,fontSize:t.fontSize,...Number.isFinite(r)?{fontWeight:r}:{},...Number.isFinite(i)&&n?{lineHeight:Math.round(i/n*100)/100}:{}}},o=a(`display`,i?.display),s=a(`heading`,i?.heading),c=o&&s&&parseFloat(s.fontSize)>parseFloat(o.fontSize)?s:o,l=c===s?o:s;r(c&&{...c,name:`display`}),r(l&&{...l,name:`heading`}),r(a(`body`,i?.body));let u=e.sizes;if(u.length){let n=[...u].sort((e,t)=>t.count-e.count),i=[[`display`,u[0]],[`heading`,u[1]],[`body`,n[0]],[`small`,u[u.length-1]]];for(let[n,a]of i)!a||t.some(e=>e.name===n)||r({name:n,fontFamily:n===`display`||n===`heading`?e.fonts.display:e.fonts.body,fontSize:wf(a.value)})}let d=[`display`,`heading`,`body`,`small`];return t.sort((e,t)=>d.indexOf(e.name)-d.indexOf(t.name))}var Ef=e=>e.map(e=>` ${e.name}: ${Cf(wf(e.value))}`).join(`
|
|
723
|
+
`);function Df(e,t,n,r,i={}){let a=Ql(e,t,n.cPrimary,{display:n.fontDisplay,body:n.fontBody},{painted:i.painted,anchors:i.anchors}),o=i.date??new Date().toISOString().slice(0,10),s=r.replace(/\.(zip|tar|gz)$/i,``).replace(/[-_]+/g,` `).trim()||`Untitled`,c=Tf(a),l=[{section:`components`,reason:`UISandbox reads values out of a built app; component structure was not observed.`}];a.spacing.length||l.push({section:`spacing`,reason:`No spacing literals could be told apart from other lengths in this build.`}),a.radii.length||l.push({section:`rounded`,reason:`This build paints no corner radius.`});let u=[`---`,`version: alpha`,`name: ${Cf(s)}`];u.push(`description: ${Cf(`Measured from the built app by UISandbox on ${o}. ${a.totals.moved} of ${a.totals.values} design values were changed in this pass; the tokens below are what the interface paints now.`)}`),u.push(`omitted:`);for(let e of l)u.push(` - section: ${e.section}\n reason: ${Cf(e.reason)}`);if(a.palette.length){u.push(`colors:`);for(let e of a.palette)u.push(` ${e.name}: ${Cf(e.value)}`)}if(c.length){u.push(`typography:`);for(let e of c)u.push(` ${e.name}:`),u.push(` fontFamily: ${Cf(e.fontFamily)}`),u.push(` fontSize: ${Cf(e.fontSize)}`),e.fontWeight&&u.push(` fontWeight: ${e.fontWeight}`),e.lineHeight!==void 0&&u.push(` lineHeight: ${typeof e.lineHeight==`number`?e.lineHeight:Cf(e.lineHeight)}`)}a.radii.length&&u.push(`rounded:
|
|
724
|
+
`+Ef(a.radii)),a.spacing.length&&u.push(`spacing:
|
|
725
|
+
`+Ef(a.spacing)),u.push(`---`);let d=[`# ${s}`,``];if(d.push(`## Overview`,``),d.push(`This file was measured, not written: UISandbox read ${a.totals.values} design values out of this app's own built stylesheets and ${a.totals.moved===0?`none were changed`:`${a.totals.moved} of them were changed`} in this pass. The tokens in the front matter are the values the interface paints right now, so they are the ones to build against.`,``,a.fromScreen?`Which value got which name was decided on the rendered screen, not on how often a stylesheet mentions it. A utility class nobody used does not become a token here.`:`Names were assigned from how often the stylesheets use a value; the rendered screen was not available to check them against, so treat the roles as a strong guess and the values as exact.`,``),i.notes?.length){d.push(`Where the readings came from:`,``);for(let e of i.notes.slice(0,6))d.push(`- ${e}`);d.push(``)}if(d.push(`## Colors`,``),a.palette.length){for(let e of a.palette){let t=e.count?`${kf(e)}, used ${e.count} time${e.count===1?``:`s`} in the build`:e.name===`primary`?`the brand colour`:kf(e);d.push(`- **${Of(e.name)} (${e.value})** — ${t}.${e.changed?` Was ${e.was}.`:``}`)}let e=a.palette[0]&&/^#[0-9a-f]{6}$/i.test(a.palette[0].value)?jt(a.palette[0].value):``;d.push(``,`The brand colour reads as ${e||`the primary`}. Use it for the single most important action on a screen; everything else comes from the neutrals above.`)}else d.push(`No colour could be placed in a role from this build.`);if(d.push(``),d.push(`## Typography`,``),c.length){let e=e=>c.find(t=>t.name===e)?.fontFamily,t=e(`display`)??e(`heading`)??a.fonts.display,n=e(`body`)??a.fonts.body;d.push(t===n?`Everything is set in **${n}**.`:`Headings are set in **${t}**, body copy in **${n}**.`,``);for(let e of c)d.push(`- **${Of(e.name)}:** ${e.fontFamily} at ${e.fontSize}${e.fontWeight?`, weight ${e.fontWeight}`:``}.`);a.sizes.length>c.length&&d.push(``,`The build paints ${a.sizes.length} distinct font sizes; the four above are the ones that carry the page. Snap a new size onto the nearest of them rather than adding another step.`)}else d.push(`Headings in **${a.fonts.display}**, body in **${a.fonts.body}**. No size ladder could be read from this build.`);d.push(``),d.push(`## Layout`,``),d.push(a.spacing.length?`Spacing runs on the measured steps in the front matter (${a.spacing.map(e=>wf(e.value)).join(`, `)}). Keep to them: they are the rhythm the existing screens already have.`:`No spacing scale could be read from this build; follow the padding already on the surrounding elements.`),d.push(``),d.push(`## Elevation & Depth`,``);let f=a.shadows.find(e=>e.value.trim().split(/\s+/).length>=3);if(f?d.push(`Depth comes from ${a.shadows.length} shadow${a.shadows.length===1?``:`s`}. The one the build leans on most is \`${f.value}\`${f.changed?` (was \`${f.was}\`)`:``}. Reuse it rather than inventing a new blur.`):a.shadows.length?d.push(`The build holds ${a.shadows.length} shadow value${a.shadows.length===1?``:`s`}, none of them a complete shadow this reader could restate. Copy the elevation off the existing components rather than from here.`):d.push(`This build paints no shadows. Hierarchy is carried by colour and borders, so keep new surfaces flat.`),d.push(``),d.push(`## Shapes`,``),a.radii.length){let e=a.radii.every(e=>ql(e.value)===0);d.push(e?`Every corner in this build is square. Keep them square.`:`Corners run ${a.radii.map(e=>wf(e.value)).join(` · `)}. The one used most is ${wf([...a.radii].sort((e,t)=>t.count-e.count)[0].value)}; treat that as the default and step up only for large surfaces.`)}else d.push(`No corner radius is set anywhere in this build. The corners are square; keep them square.`);d.push(``),d.push(`## Do's and Don'ts`,``),d.push(`- Do take colours, sizes and radii from the front matter above instead of typing new literals.`),a.palette[0]&&d.push("- Do use `{colors.primary}` for the one most important action per screen.");let p=a.palette.filter(e=>e.changed);return p.length&&d.push(`- Don't reintroduce ${p.map(e=>`\`${e.was}\``).join(` or `)}: ${p.length===1?`it was`:`they were`} replaced everywhere in this pass.`),a.radii.every(e=>ql(e.value)===0)&&d.push(`- Don't add rounded corners: this build is square throughout.`),a.shadows.length||d.push(`- Don't add shadows: this build has none, and one new card with a shadow reads as a mistake.`),d.push(`- Don't treat this file as a component spec. It records values, not structure — check the existing components before adding a new one.`),d.push(``),u.join(`
|
|
726
|
+
`)+`
|
|
727
|
+
|
|
728
|
+
`+d.join(`
|
|
729
|
+
`)}var Of=e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g,` `);function kf(e){if(e.anchor===`text`)return`the body ink, read off the page`;if(e.anchor===`surface`)return`the page ground, read off the page`;if(e.paintRole&&e.painted)return`${e.paintRole===`text`?`painted on text`:e.paintRole===`surface`?`painted as a background`:`painted on borders`} on ${e.painted} element${e.painted===1?``:`s`} of this screen`;let t=e.props[0]??``;return t===`color`?`painted on text`:t.startsWith(`background`)?`painted as a background`:t.includes(`border`)?`painted on borders`:t===`fill`||t===`stroke`?`painted in icons`:t?`used on \`${t}\``:`measured in the build`}function Af(e,t={}){let n=t.date??new Date().toISOString().slice(0,10);return`<!-- Append this to AGENTS.md in your repo root. The same block works in
|
|
730
|
+
CLAUDE.md, GEMINI.md or .cursorrules — whichever your agent reads. -->
|
|
731
|
+
|
|
732
|
+
## Design
|
|
733
|
+
|
|
734
|
+
The visual system for ${e.replace(/\.(zip|tar|gz)$/i,``).replace(/[-_]+/g,` `).trim()||`this app`} is defined in [DESIGN.md](./DESIGN.md).
|
|
735
|
+
|
|
736
|
+
- Read DESIGN.md before writing or changing any UI.
|
|
737
|
+
- Take colours, type, corner radii and spacing from its front matter tokens.
|
|
738
|
+
Reference them by name (\`{colors.primary}\`, \`{rounded.md}\`) rather than
|
|
739
|
+
pasting hex values into components.
|
|
740
|
+
- If a value you need is not in DESIGN.md, use the nearest token that is, and
|
|
741
|
+
say in your summary which one you picked and why. Do not add a new literal
|
|
742
|
+
without flagging it.
|
|
743
|
+
- DESIGN.md records VALUES, not component structure. Check the existing
|
|
744
|
+
components before inventing a new one.
|
|
745
|
+
- It was measured from the built app with UISandbox on ${n}${t.moved?` (${t.moved} value${t.moved===1?``:`s`} changed in that pass)`:``}. If the UI and DESIGN.md disagree, DESIGN.md is the intent and the UI is the thing to fix.
|
|
746
|
+
`}function jf(e){let t=V(e);if(!t)return null;let{components:n,alpha:r,hex:i}=Pn(t),a={colorSpace:`srgb`,components:n,hex:i};return r<1&&(a.alpha=r),a}function Mf(e){let t=e.trim(),n=t.match(/^(-?\d*\.?\d+)\s*(px|rem)$/i);if(n)return{value:parseFloat(n[1]),unit:n[2].toLowerCase()};let r=ql(t);return r===null?null:{value:Math.round(r*1e3)/1e3,unit:`px`}}function Nf(e,t){let n=[],r=0,i=``;for(let a of e)a===`(`?r++:a===`)`&&r--,a===t&&r===0?(n.push(i),i=``):i+=a;return i.trim()&&n.push(i),n.map(e=>e.trim()).filter(Boolean)}function Pf(e){let t=Nf(e,`,`),n=[];for(let e of t){if(/\binset\b/i.test(e))return null;let t=Nf(e,` `),r=[],i=null;for(let e of t){let t=Mf(e);if(t&&r.length<4){r.push(t);continue}let n=jf(e);if(n&&!i){i=n;continue}return null}if(!i||r.length<3)return null;n.push({color:i,offsetX:r[0],offsetY:r[1],blur:r[2],spread:r[3]??{value:0,unit:`px`}})}return n.length?n.length===1?n[0]:n:null}var Ff=(e,t)=>`${t}; used ${e.count} time${e.count===1?``:`s`} in the build${e.changed?`, was ${e.was}`:``}`;function If(e,t,n,r,i={}){let a=Ql(e,t,n.cPrimary,{display:n.fontDisplay,body:n.fontBody},{painted:i.painted,anchors:i.anchors}),o={$description:`${r} — measured from the built app by UISandbox on ${i.date??new Date().toISOString().slice(0,10)}. ${a.totals.moved} of ${a.totals.values} values changed in this pass. W3C Design Tokens Format Module 2025.10.`},s={$type:`color`},c=[];for(let e of a.palette){let t=jf(e.value);t?s[e.name]={$value:t,$description:Ff(e,e.name===`primary`?`the brand colour`:`measured on ${e.props[0]??`the build`}`)}:c.push(`${e.name} (${e.value})`)}c.length&&(s.$description=`Not exported, could not be expressed as sRGB components: ${c.join(`, `)}. DESIGN.md carries them as written.`),Object.keys(s).length>1&&(o.color=s);let l={$type:`fontFamily`};l.display={$value:Lf(a.fonts.display),$description:`headings`},l.body={$value:Lf(a.fonts.body),$description:`body copy`},o.font=l;let u={$type:`dimension`};for(let[e,t]of a.sizes.slice(0,8).entries()){let n=Mf(t.value);n&&(u[`step-${e+1}`]={$value:n,$description:Ff(t,`font size`)})}Object.keys(u).length>1&&(o.fontSize=u);let d={$type:`fontWeight`};for(let e of a.weights.slice(0,6)){let t=parseInt(e.value,10);Number.isFinite(t)&&t>=1&&t<=1e3&&(d[`w-${t}`]={$value:t,$description:Ff(e,`font weight`)})}Object.keys(d).length>1&&(o.fontWeight=d);let f=(e,t)=>{let n={$type:`dimension`};for(let r of e){let e=Mf(r.value);e&&(n[r.name]={$value:e,$description:Ff(r,t)})}return Object.keys(n).length>1?n:null},p=f(a.radii,`corner radius`);p&&(o.radius=p);let m=f(a.spacing,`spacing step`);m&&(o.spacing=m);let h={$type:`shadow`};for(let[e,t]of a.shadows.slice(0,6).entries()){let n=Pf(t.value);n&&(h[`level-${e+1}`]={$value:n,$description:Ff(t,`elevation`)})}return Object.keys(h).length>1&&(o.shadow=h),JSON.stringify(o,null,2)+`
|
|
747
|
+
`}function Lf(e){let t=e.split(`,`).map(e=>e.trim().replace(/^["']|["']$/g,``)).filter(Boolean);return t.length>1?t:t[0]??e}function Rf(e){if(!e)return;let t=V(e);if(!(!t||t.a<.999))return Nn(t)}function zf(e){if(!e)return;let t=e.trim().match(/^(-?\d*\.?\d+)px$/);return t?parseFloat(t[1]):void 0}var Bf=(e,t)=>e.find(e=>e.name===t)?.value;function Vf(e,t={}){let n={},r=(e,t)=>{t!==void 0&&t!==``&&(n[e]=t)};r(`brand`,Rf(Bf(e.palette,`primary`)??e.brand)),r(`ink`,Rf(Bf(e.palette,`text`))),r(`page`,Rf(Bf(e.palette,`surface`))),r(`surface`,Rf(Bf(e.palette,`surface-alt`)??Bf(e.palette,`fill`))),r(`inkMuted`,Rf(Bf(e.palette,`text-muted`))),r(`line`,Rf(Bf(e.palette,`border`))),r(`success`,Rf(t.success)),r(`warning`,Rf(t.warning)),r(`danger`,Rf(t.danger));let i=e.anchors.type?.body,a=e.anchors.type?.display??e.anchors.type?.heading;r(`fontBody`,i?.fontFamily),r(`fontHeading`,a?.fontFamily);let o=zf(i?.fontSize);o&&r(`baseText`,`${o}px`);let s=zf(i?.lineHeight);s&&o&&r(`lineHeight`,Math.round(s/o*1e3)/1e3);let c=a?parseInt(a.fontWeight,10):NaN;Number.isFinite(c)&&r(`fontWeight`,c);let l=e.radii.filter(e=>e.name!==`none`&&e.name!==`full`).sort((e,t)=>(t.painted??0)-(e.painted??0)||t.count-e.count)[0],u=l?ql(l.value)??void 0:void 0;return u!==void 0&&r(`radius`,`${u}px`),n}var Hf=[[`bgTone`,`Background tone`],[`dark`,`Dark mode`],[`cBackground`,`Background`],[`cPrimary`,`Brand`],[`cSecondary`,`Secondary`],[`cAccent`,`Accent`],[`cSuccess`,`Success`],[`cWarning`,`Warning`],[`cDanger`,`Danger`],[`cInfo`,`Info`],[`fontDisplay`,`Display font`],[`fontBody`,`Body font`],[`radius`,`Radius`],[`typeScale`,`Text size`],[`neutral`,`Grey tint`],[`colorTheme`,`Colour theme`]],Uf=Object.fromEntries([...Yt.map(e=>[e.key,e.label]),...Hf]),Wf=e=>{let t=e.replace(/^sb\./,``);return Uf[t]??t.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase())},Gf=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Kf(e,t){let n=[];for(let r of new Set([...Object.keys(e),...Object.keys(t)]))r!==`sb`&&!Gf(e[r],t[r])&&n.push(r);let r=e.sb,i=t.sb;for(let e of new Set([...Object.keys(r),...Object.keys(i)]))Gf(r[e],i[e])||n.push(`sb.${e}`);return n}function qf(e,t,n){let r={...e,sb:{...e.sb}},i=t,a=t.sb;for(let e of n)e.startsWith(`sb.`)?r.sb[e.slice(3)]=a[e.slice(3)]:r[e]=i[e];return r}function Jf(e,t,n){let r=Kf(e,t);return{cfg:qf(n,t,r),keys:r}}function Yf(e,t,n){let r=n.date??new Date().toISOString().slice(0,10),i=new Map;for(let e of t){let t=e.name.startsWith(`patched/`)?`patched/`:`root`;i.has(t)||i.set(t,[]),i.get(t).push(e)}let a=(i.get(`root`)??[]).map(e=>`| \`${e.name}\` | ${e.what} |`).join(`
|
|
748
|
+
`),o=(i.get(`patched/`)??[]).length;return`# ${e} — UISandbox export
|
|
749
|
+
|
|
750
|
+
${n.moved} of ${n.total} design values were changed, across ${n.changedFiles} file${n.changedFiles===1?``:`s`}. Exported ${r}.
|
|
751
|
+
|
|
752
|
+
## Start here
|
|
753
|
+
|
|
754
|
+
**If an agent writes your code** (Claude Code, Cursor, Codex):
|
|
755
|
+
|
|
756
|
+
1. Copy \`DESIGN.md\` into the root of your repo.
|
|
757
|
+
2. Paste the block from \`AGENTS.md.snippet\` into your \`AGENTS.md\` (or \`CLAUDE.md\`). Create the file if you do not have one.
|
|
758
|
+
3. Ask your agent: *apply DESIGN.md to the UI*.
|
|
759
|
+
|
|
760
|
+
**If you edit the code yourself:**
|
|
761
|
+
|
|
762
|
+
1. Open \`patched/\` — those are your own files with the new values already written in, in their original folders.
|
|
763
|
+
2. Diff them against your source, take what you want.
|
|
764
|
+
3. \`sandbox-patch.txt\` is the same change as a find-and-replace list if you would rather do it by hand.
|
|
765
|
+
|
|
766
|
+
## What is in here
|
|
767
|
+
|
|
768
|
+
| File | What it is |
|
|
769
|
+
|---|---|
|
|
770
|
+
${a}
|
|
771
|
+
${o?`| \`patched/…\` | ${o} of your own file${o===1?``:`s`}, rewritten with the new values in place. The complete change. |\n`:``}
|
|
772
|
+
## Notes
|
|
773
|
+
|
|
774
|
+
- Values here are the ones on screen in the sandbox, not a re-derivation. What you saw is what these files say.
|
|
775
|
+
- \`DESIGN.md\` and \`design.tokens.json\` describe **your app as measured**. \`tokens.css\`, \`tokens.json\`, the Tailwind and shadcn files and the native ones describe **a fresh token system seeded from these values** — a different thing, useful if you are starting a system rather than patching one.
|
|
776
|
+
- \`sandbox-values.css\` is a reference list of every value found, under names of our own. It is not a drop-in stylesheet; your CSS does not read those variable names.
|
|
777
|
+
|
|
778
|
+
Made with [UISandbox](https://uisandbox.org). Your files never left your browser.
|
|
779
|
+
`}var Xf={css:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M1.5 0h21l-1.91 21.563L11.977 24l-8.565-2.438L1.5 0zm17.09 4.413L5.41 4.41l.213 2.622 10.125.002-.255 2.716h-6.64l.24 2.573h6.182l-.366 3.523-2.91.804-2.956-.81-.188-2.11h-2.61l.29 3.855L12 19.288l5.373-1.53L18.59 4.414z`})}),html:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M1.5 0h21l-1.91 21.563L11.977 24l-8.564-2.438L1.5 0zm7.031 9.75l-.232-2.718 10.059.003.23-2.622L5.412 4.41l.698 8.01h9.126l-.326 3.426-2.91.804-2.955-.81-.188-2.11H6.248l.33 4.171L12 19.351l5.379-1.443.744-8.157H8.531z`})}),tailwind:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z`})}),shadcn:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M22.219 11.784 11.784 22.219c-.407.407-.407 1.068 0 1.476.407.407 1.068.407 1.476 0L23.695 13.26c.407-.408.407-1.069 0-1.476-.408-.407-1.069-.407-1.476 0ZM20.132.305.305 20.132c-.407.407-.407 1.068 0 1.476.408.407 1.069.407 1.476 0L21.608 1.781c.407-.407.407-1.068 0-1.476-.408-.407-1.069-.407-1.476 0Z`})}),claude:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`})}),openai:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`})}),cursor:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23`})}),figma:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z`})}),swift:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M7.508 0c-.287 0-.573 0-.86.002-.241.002-.483.003-.724.01-.132.003-.263.009-.395.015A9.154 9.154 0 0 0 4.348.15 5.492 5.492 0 0 0 2.85.645 5.04 5.04 0 0 0 .645 2.848c-.245.48-.4.972-.495 1.5-.093.52-.122 1.05-.136 1.576a35.2 35.2 0 0 0-.012.724C0 6.935 0 7.221 0 7.508v8.984c0 .287 0 .575.002.862.002.24.005.481.012.722.014.526.043 1.057.136 1.576.095.528.25 1.02.495 1.5a5.03 5.03 0 0 0 2.205 2.203c.48.244.97.4 1.498.495.52.093 1.05.124 1.576.138.241.007.483.009.724.01.287.002.573.002.86.002h8.984c.287 0 .573 0 .86-.002.241-.001.483-.003.724-.01a10.523 10.523 0 0 0 1.578-.138 5.322 5.322 0 0 0 1.498-.495 5.035 5.035 0 0 0 2.203-2.203c.245-.48.4-.972.495-1.5.093-.52.124-1.05.138-1.576.007-.241.009-.481.01-.722.002-.287.002-.575.002-.862V7.508c0-.287 0-.573-.002-.86a33.662 33.662 0 0 0-.01-.724 10.5 10.5 0 0 0-.138-1.576 5.328 5.328 0 0 0-.495-1.5A5.039 5.039 0 0 0 21.152.645 5.32 5.32 0 0 0 19.654.15a10.493 10.493 0 0 0-1.578-.138 34.98 34.98 0 0 0-.722-.01C17.067 0 16.779 0 16.492 0H7.508zm6.035 3.41c4.114 2.47 6.545 7.162 5.549 11.131-.024.093-.05.181-.076.272l.002.001c2.062 2.538 1.5 5.258 1.236 4.745-1.072-2.086-3.066-1.568-4.088-1.043a6.803 6.803 0 0 1-.281.158l-.02.012-.002.002c-2.115 1.123-4.957 1.205-7.812-.022a12.568 12.568 0 0 1-5.64-4.838c.649.48 1.35.902 2.097 1.252 3.019 1.414 6.051 1.311 8.197-.002C9.651 12.73 7.101 9.67 5.146 7.191a10.628 10.628 0 0 1-1.005-1.384c2.34 2.142 6.038 4.83 7.365 5.576C8.69 8.408 6.208 4.743 6.324 4.86c4.436 4.47 8.528 6.996 8.528 6.996.154.085.27.154.36.213.085-.215.16-.437.224-.668.708-2.588-.09-5.548-1.893-7.992z`})}),android:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M18.4395 5.5586c-.675 1.1664-1.352 2.3318-2.0274 3.498-.0366-.0155-.0742-.0286-.1113-.043-1.8249-.6957-3.484-.8-4.42-.787-1.8551.0185-3.3544.4643-4.2597.8203-.084-.1494-1.7526-3.021-2.0215-3.4864a1.1451 1.1451 0 0 0-.1406-.1914c-.3312-.364-.9054-.4859-1.379-.203-.475.282-.7136.9361-.3886 1.5019 1.9466 3.3696-.0966-.2158 1.9473 3.3593.0172.031-.4946.2642-1.3926 1.0177C2.8987 12.176.452 14.772 0 18.9902h24c-.119-1.1108-.3686-2.099-.7461-3.0683-.7438-1.9118-1.8435-3.2928-2.7402-4.1836a12.1048 12.1048 0 0 0-2.1309-1.6875c.6594-1.122 1.312-2.2559 1.9649-3.3848.2077-.3615.1886-.7956-.0079-1.1191a1.1001 1.1001 0 0 0-.8515-.5332c-.5225-.0536-.9392.3128-1.0488.5449zm-.0391 8.461c.3944.5926.324 1.3306-.1563 1.6503-.4799.3197-1.188.0985-1.582-.4941-.3944-.5927-.324-1.3307.1563-1.6504.4727-.315 1.1812-.1086 1.582.4941zM7.207 13.5273c.4803.3197.5506 1.0577.1563 1.6504-.394.5926-1.1038.8138-1.584.4941-.48-.3197-.5503-1.0577-.1563-1.6504.4008-.6021 1.1087-.8106 1.584-.4941z`})}),lovable:(0,B.jsx)(`svg`,{viewBox:`0 0 180 180`,fill:`currentColor`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M54.6052 0C83.9389 0 107.719 23.8424 107.719 53.2535V73.4931H125.395C154.729 73.4931 178.508 97.3355 178.508 126.747C178.508 156.158 154.729 180 125.395 180H1.4917V53.2535C1.4917 23.8424 25.2714 0 54.6052 0Z`})}),json:(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{d:`M8 3.5A2.5 2.5 0 0 0 5.5 6v3A2.5 2.5 0 0 1 3 11.5 2.5 2.5 0 0 1 5.5 14v4A2.5 2.5 0 0 0 8 20.5M16 3.5A2.5 2.5 0 0 1 18.5 6v3a2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0-2.5 2.5v4a2.5 2.5 0 0 1-2.5 2.5`})})},Zf=new Set([`DESIGN.md`,`tokens.json`,`theme.css`,`install.md`,`MANIFEST.md`]),Qf={antd:`Ant Design`,bootstrap:`Bootstrap`,daisyui:`daisyUI`,mantine:`Mantine`,material:`Material`,openprops:`Open Props`,radix:`Radix Themes`,shadcn:`shadcn/ui`,tailwind:`Tailwind`};function $f({cfg:e,base:t,table:n,vars:r,projectName:i,kitDoorName:a,files:o,fontCss:s,notes:c,painted:l,anchors:u,kit:d,kitValues:f,readPageVars:p,onClose:m}){let[h,g]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=!0;return Vd(o,n,r,s).then(t=>{e&&g(t)}),()=>{e=!1}},[o,n,r,s]);let v=(0,_.useMemo)(()=>{let e=n.identityVars();return Object.keys(r).filter(t=>r[t]!==e[t]).length},[n,r]),[y,b]=(0,_.useState)(null),[x,S]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(S(null),!d){b(null);return}let t=!0,o=Ql(n,r,e.cPrimary,{display:e.fontDisplay,body:e.fontBody},{painted:l,anchors:u}),s=v===0?`none of them changed`:`${v} of them changed`,c=a?`These values start from ${a} as it ships, read off the build UISandbox made of it: ${o.totals.values} design values, ${s} in this pass. They are written here in the names this kit publishes, so they are the ones to build against.`:`These values were read off ${i}'s own build in UISandbox, not chosen: ${o.totals.values} design values out of its stylesheets, ${s} in this pass. They are written here in the names this kit publishes, so they are the ones to build against.`;return ad(d,{...Vf(o),...f},i,{overview:c}).then(e=>{p&&e[`theme.css`]&&(e={...e,"theme.css":ld(e[`theme.css`],p(cd(e[`theme.css`]))).css}),t&&b(sd(e))}).catch(e=>{t&&(b(null),S(e instanceof Error?e.message:String(e)))}),()=>{t=!1}},[d,f,p,n,r,e,i,a,l,u,v]);let C=y?Object.keys(y).find(e=>e.endsWith(`/SKILL.md`)):void 0,w=(0,_.useMemo)(()=>[{id:`design-md`,label:`DESIGN.md`,sub:`your design system, as agents read it`,icon:(0,B.jsx)(de,{size:15,strokeWidth:1.75}),file:`DESIGN.md`,how:y?[`Save this as DESIGN.md in the root of your repo, and SKILL.md where its tab says.`,`It is written in ${Qf[d]}'s own variable names, because that is what this build runs on.`,`Then ask: apply DESIGN.md and SKILL.md, screen by screen.`]:[`Save this as DESIGN.md in the root of your repo.`,`Add the AGENTS.md block (next tab) so your agent picks it up on every task.`,`Then ask: apply DESIGN.md to the UI.`],make:()=>y?.[`DESIGN.md`]??Df(n,r,e,i,{notes:c,painted:l,anchors:u})},{id:`agents-md`,label:`AGENTS.md`,sub:`the one line that points at it`,icon:(0,B.jsx)(te,{size:15,strokeWidth:1.75}),file:`AGENTS.snippet.md`,how:[`Append this to AGENTS.md in your repo root. No AGENTS.md yet? Make one with this in it.`,`Claude Code reads CLAUDE.md instead. The same block works there, and in GEMINI.md or .cursorrules.`,`It is a block to add, not a file to overwrite: your build and test instructions stay where they are.`],make:()=>Af(i,{moved:v})},{id:`dtcg`,label:`Design tokens`,sub:`W3C format, for Figma and Style Dictionary`,icon:(0,B.jsx)(Ne,{size:15,strokeWidth:1.75}),file:`design.tokens.json`,how:[`Save as design.tokens.json. This is the W3C Design Tokens format (2025.10), not a format of ours.`,`Import it in Tokens Studio for Figma, or point Style Dictionary at it to build for any platform.`,`It describes the app we measured. Values we could not express in the format were left out rather than bent to fit.`],make:()=>y?.[`tokens.json`]??If(n,r,e,i,{painted:l,anchors:u})},...y&&C?[{id:`skill-md`,label:`SKILL.md`,sub:`how to build screens in this system`,icon:(0,B.jsx)(te,{size:15,strokeWidth:1.75}),file:C,how:[`Save it at ${C}. Claude Code loads it on its own when the work is UI, so nobody has to remember to paste it.`,`DESIGN.md says what is true; this says what to do: one primary action per view, how controls group, where motion comes from, in ${Qf[d]}'s own classes.`,`Every class it names is one that kit publishes.`],make:()=>y[C]},{id:`kit-theme`,label:`theme.css`,sub:`${Qf[d]}'s own variables, set`,icon:(0,B.jsx)(re,{size:15,strokeWidth:1.75}),file:`theme.css`,how:[`Import it after the kit, so your values win.`,`Every variable in it belongs to the kit that publishes it; nothing in it is ours.`,`install.md says how, and what has to be rebuilt.`],make:()=>y[`theme.css`]},{id:`kit-install`,label:`install.md`,sub:`what to run, in order`,icon:(0,B.jsx)(de,{size:15,strokeWidth:1.75}),file:`install.md`,how:[`The steps to make the kit wear these values, including any it compiles rather than reads at runtime.`],make:()=>y[`install.md`]},{id:`kit-manifest`,label:`MANIFEST.md`,sub:`what could not be set, and why`,icon:(0,B.jsx)(de,{size:15,strokeWidth:1.75}),file:`MANIFEST.md`,how:[`What this theme writes that the kit never reads, and what the kit has no component for. Read it before you trust a knob that seems to do nothing.`],make:()=>y[`MANIFEST.md`]},...Object.keys(y).filter(e=>!Zf.has(e)&&e!==C).map(e=>({id:`kit-extra:${e}`,label:e,sub:`install.md says where it goes`,icon:(0,B.jsx)(ue,{size:15,strokeWidth:1.75}),file:e,how:[`${Qf[d]} needs this beside theme.css; install.md says how to use it.`],make:()=>y[e]}))]:[],{id:`files`,label:h===null?`Preparing…`:h.length?`${h.length} file${h.length===1?``:`s`} changed`:`Nothing changed yet`,sub:`your CSS and HTML, new values in place`,icon:(0,B.jsx)(ue,{size:15,strokeWidth:1.75}),file:`patched-files.txt`,how:[`Your own files, whole, with the new values written in place.`,`Use Everything (.zip) at the top right to get them as real files in their original folders, ready to diff.`,`This is the complete change: a find and replace cannot tell a 12px radius from 12px of padding, and this can.`],make:()=>(h??[]).map(e=>`/* ===== ${e.path} ===== */\n${e.text}`).join(`
|
|
780
|
+
|
|
781
|
+
`)||`/* Turn a knob first, then your CSS and HTML appear here with the new values written in. */`},{id:`sheet-patch`,label:`Find and replace`,sub:`one line per value, per file`,icon:(0,B.jsx)(Te,{size:15,strokeWidth:1.75}),file:`sandbox-patch.txt`,how:[`One line per value: what it was, what it is now, and the file it sits in.`,`Hand it to an agent ("apply this patch list to my source"), or run the replacements yourself.`,`Shorter to read than the patched files, but blind to context: check radius against padding before replacing.`],make:()=>zd(n,r)},{id:`sheet-changed`,label:`Changed only`,sub:`just what you turned`,icon:(0,B.jsx)(P,{size:15,strokeWidth:1.75}),file:`sandbox-changes.css`,how:[`The values you turned, under names of our own making.`,`A reference to read, diff or hand over as a spec. It is not a drop-in stylesheet: your CSS never mentions these names, so pasting it on its own changes nothing.`,`To make the change land, use Patch your own files.`],make:()=>Ld(n,r,{changedOnly:!0})},{id:`sheet-css`,label:`Every value`,sub:`the whole sheet, as a list`,icon:(0,B.jsx)(re,{size:15,strokeWidth:1.75}),file:`sandbox-values.css`,how:[`Every design value we found in the build, with how often it is used and where.`,`The census behind everything else in this dialog. Useful to read, not to paste.`],make:()=>Ld(n,r)},{id:`sheet-json`,label:`JSON`,sub:`the same, machine-readable`,icon:(0,B.jsx)(le,{size:15,strokeWidth:1.75}),file:`sandbox-values.json`,how:[`Every value with its kind, its old value, its new one, and the places it is used.`,`For scripts and codemods: this is the sheet in the shape a program wants.`],make:()=>Rd(n,r)},{id:`tokens-tw`,label:`Tailwind`,sub:`theme block for your config`,icon:(0,B.jsx)(Ie,{size:15,strokeWidth:1.75}),file:`tailwind.tokens.js`,how:[`Paste into the theme block of your tailwind.config.`,`Names are ours, not your app's. This starts a system rather than patching one.`],make:()=>af(e)},{id:`tokens-shadcn`,label:`shadcn`,sub:`--background, --primary, …`,icon:(0,B.jsx)(ne,{size:15,strokeWidth:1.75}),file:`shadcn.css`,how:[`Replace the :root and .dark blocks in your globals.css with these.`,`The variable names are the ones shadcn/ui components already read.`],make:()=>lf(e)},{id:`tokens-css`,label:`tokens.css`,sub:`a full --k-* system`,icon:(0,B.jsx)(Ne,{size:15,strokeWidth:1.75}),file:`tokens.css`,how:[`A complete token system seeded from your values: colour ramps, a type scale, spacing, z-index, breakpoints.`,`Link it before your own stylesheet and build against the variables.`,`These are new names, not the ones your app uses. To change the app you already have, use Patch your own files instead.`],make:()=>tf(e)},{id:`tokens-json`,label:`tokens.json`,sub:`the same system, as JSON`,icon:(0,B.jsx)(le,{size:15,strokeWidth:1.75}),file:`tokens.json`,how:[`The same generated system in JSON, with the decisions that produced it.`,`For the W3C interchange format, use Design tokens under Hand it to your agent.`],make:()=>rf(e)},{id:`ios-swift`,label:`Swift`,sub:`constants for SwiftUI and UIKit`,icon:(0,B.jsx)(A,{size:15,strokeWidth:1.75}),file:`DesignTokens.swift`,how:[`Drop into your Xcode target and reference the constants from SwiftUI or UIKit.`],make:()=>gf(e)},{id:`ios-assets`,label:`Asset catalog`,sub:`colour sets, light and dark`,icon:(0,B.jsx)(pe,{size:15,strokeWidth:1.75}),file:`DesignTokens.xcassets.txt`,how:[`Colour sets with light and dark variants.`,`Everything (.zip) writes these out as a real .xcassets folder you can drag into Xcode.`],make:()=>_f(e).map(e=>`// ${e.path}\n${e.content}`).join(`
|
|
782
|
+
`)},{id:`android-xml`,label:`colors.xml`,sub:`resources, light and night`,icon:(0,B.jsx)(Ae,{size:15,strokeWidth:1.75}),file:`colors.xml`,how:[`The first block goes in res/values/colors.xml, the second in res/values-night/colors.xml.`],make:()=>xf(e)+`
|
|
783
|
+
`+xf(e,`dark`)},{id:`android-kt`,label:`Compose`,sub:`Kotlin constants`,icon:(0,B.jsx)(Ae,{size:15,strokeWidth:1.75}),file:`DesignTokens.kt`,how:[`Drop into your theme package and reference from your Compose theme.`],make:()=>Sf(e)}],[e,n,r,h,i,c,l,u,v,y,C,d]),T={bgTone:`ΔL`},E=(e,t)=>{if(t===void 0)return`as is`;let n=String(t);if(!/^-?[\d.]+$/.test(n))return n;let r=Number(n),i=Yt.find(t=>t.key===e)?.unit??T[e]??`×`;return i===`×`?`×${n}`:i===`°`?`${n}°`:i===`em`?`${n}em`:r>0?`+${n}`:n},D=(0,_.useMemo)(()=>{let n=[],r=(e,t,r)=>{n.push({label:Wf(e),from:t,to:r,swatch:/^#/.test(r)})},i=new Set([...Object.keys(t),...Object.keys(e)]);for(let n of i){let i=t[n],a=e[n];if(JSON.stringify(i)!==JSON.stringify(a)){if(n===`sb`){let e=i??{},t=a??{};for(let n of new Set([...Object.keys(e),...Object.keys(t)]))JSON.stringify(e[n])!==JSON.stringify(t[n])&&r(n,E(n,e[n]),E(n,t[n]));continue}r(String(n),String(i),String(a))}}return n},[e,t]),O=[{title:y?`Design system + Skill`:`Hand it to your agent`,sub:y?`DESIGN.md and a SKILL.md in ${Qf[d]}'s own classes, so Claude Code, Cursor or Codex builds in this look`:d&&x?`DESIGN.md and one line in AGENTS.md. This build runs on ${Qf[d]}, but its SKILL.md could not be written: ${x}`:d?`DESIGN.md and one line in AGENTS.md. Writing the SKILL.md in ${Qf[d]}'s own classes…`:d===null?`DESIGN.md and one line in AGENTS.md. No SKILL.md: this build runs on none of the nine kits, so there are no published classes for one to cite`:`DESIGN.md and one line in AGENTS.md. Still reading which kit this build runs on…`,icon:(0,B.jsx)(te,{size:15,strokeWidth:1.75}),ids:y?[`design-md`,`skill-md`,`agents-md`,`dtcg`,`kit-theme`,`kit-install`,`kit-manifest`,...Object.keys(y).filter(e=>!Zf.has(e)&&e!==C).map(e=>`kit-extra:${e}`)]:[`design-md`,`agents-md`,`dtcg`],reco:!0,uses:[[Xf.claude,`Claude Code`],[Xf.cursor,`Cursor`],[Xf.openai,`Codex`],[Xf.figma,`Figma`]]},{title:`Patch your own files`,sub:`your CSS and HTML with the new values written in, or a find and replace list`,icon:(0,B.jsx)(ue,{size:15,strokeWidth:1.75}),ids:[`files`,`sheet-patch`],uses:[[Xf.css,`CSS`],[Xf.html,`HTML`],[null,`any repo`]]},{title:`The raw sheet`,sub:`every value we found and what it is now. A reference to read, not a stylesheet to paste`,icon:(0,B.jsx)(re,{size:15,strokeWidth:1.75}),ids:[`sheet-changed`,`sheet-css`,`sheet-json`],uses:[[Xf.css,`CSS`],[Xf.json,`JSON`]]},{title:`Tailwind or shadcn`,sub:`a theme block for your config, or the block shadcn/ui components already read`,icon:(0,B.jsx)(Ie,{size:15,strokeWidth:1.75}),ids:[`tokens-tw`,`tokens-shadcn`],uses:[[Xf.tailwind,`Tailwind`],[Xf.shadcn,`shadcn/ui`],[Xf.lovable,`Lovable`]]},{title:`A fresh token system`,sub:`a full set seeded from these values, under new names. For starting a system, not patching one`,icon:(0,B.jsx)(Ne,{size:15,strokeWidth:1.75}),ids:[`tokens-css`,`tokens-json`],uses:[[Xf.css,`CSS`],[Xf.json,`JSON`],[null,`Style Dictionary`]]},{title:`Native apps`,sub:`Swift constants, an asset catalog, Android resources`,icon:(0,B.jsx)(Ae,{size:15,strokeWidth:1.75}),ids:[`ios-swift`,`ios-assets`,`android-xml`,`android-kt`],uses:[[Xf.swift,`SwiftUI`],[Xf.android,`Android`]]}],k=new Set([`Patch your own files`,`The raw sheet`]),j=a?O.filter(e=>!k.has(e.title)):O,[ee,N]=(0,_.useState)(`overview`);(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[m]);let[ae,oe]=(0,_.useState)(!1),I=w.find(e=>e.id===ee),ce=I?j.find(e=>e.ids.includes(I.id)):void 0,fe=(0,_.useMemo)(()=>I?I.make():``,[I]),me=(e,t)=>{let n=document.createElement(`a`);n.href=URL.createObjectURL(t),n.download=e,n.click(),setTimeout(()=>URL.revokeObjectURL(n.href),2e3)};return(0,B.jsx)(`div`,{className:`dialog__backdrop`,onClick:m,children:(0,B.jsxs)(`div`,{className:`card dialog dialog--narrow`,role:`dialog`,"aria-label":`Export`,onClick:e=>e.stopPropagation(),children:[(0,B.jsxs)(`div`,{className:`dialog__head`,children:[I?(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>{N(`overview`),oe(!1)},children:[(0,B.jsx)(ie,{size:14}),` Export`]}):(0,B.jsx)(`h2`,{children:`Export: exactly what is in the sandbox`}),(0,B.jsx)(`span`,{className:`stage__spacer`,style:{flex:1}}),a?(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--primary btn--sm`,onClick:()=>{y&&me(`${(a??i).replace(/[^\w.-]+/g,`-`).replace(/^-|-$/g,``)}-design-system.zip`,yd(Object.entries(y).map(([e,t])=>({name:e,text:t}))))},disabled:!y,title:y?`theme.css, DESIGN.md, SKILL.md, tokens.json, install.md and MANIFEST.md`:`Writing the design system…`,children:[(0,B.jsx)(F,{size:13,strokeWidth:2}),` Design system + Skill (.zip)`]}):(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:()=>{let t=w.filter(e=>e.id!==`files`).map(e=>({name:e.file,data:e.make()}));for(let n of _f(e))t.push({name:n.path,data:n.content});for(let e of h??[])t.push({name:`patched/${e.path}`,data:e.text});t.unshift({name:`README.md`,data:Yf(i,w.filter(e=>e.id!==`files`).map(e=>({name:e.file,what:e.sub??e.label})),{moved:v,total:n.entries.length,changedFiles:h?.length??0})}),me(`${i.replace(/[^\w.-]+/g,`-`)}-uisandbox.zip`,yd(t.map(e=>({name:e.name,text:e.data}))))},children:[(0,B.jsx)(F,{size:13,strokeWidth:2}),` Everything (.zip)`]}),(0,B.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--icon`,onClick:m,"aria-label":`Close`,children:(0,B.jsx)(Le,{size:15})})]}),I?(0,B.jsxs)(`div`,{className:`dialog__pane`,children:[(0,B.jsxs)(`div`,{className:`exp__head`,children:[(0,B.jsx)(`span`,{className:`exp__ico exp__ico--lg`,children:ce?.icon}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`b`,{children:ce?.title}),(0,B.jsx)(`span`,{className:`exp__headsub`,children:ce?.sub})]}),(0,B.jsx)(`span`,{className:`stage__spacer`,style:{flex:1}}),(0,B.jsx)(`div`,{className:`exp__tabs`,role:`tablist`,children:(ce?.ids??[]).map(e=>{let t=w.find(t=>t.id===e);return(0,B.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===ee,className:`exp__tab ${e===ee?`exp__tab--on`:``}`,onClick:()=>{N(e),oe(!1)},children:t.label},e)})})]}),(0,B.jsx)(`ol`,{className:`exp__how`,children:I.how.map((e,t)=>(0,B.jsx)(`li`,{children:e},t))}),(0,B.jsx)(`pre`,{children:fe}),(0,B.jsxs)(`div`,{className:`dialog__tools`,children:[(0,B.jsxs)(`span`,{children:[I.file,` · `,fe.length.toLocaleString(),` chars`]}),(0,B.jsx)(`span`,{className:`stage__spacer`}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:async()=>{await navigator.clipboard.writeText(fe),oe(!0),setTimeout(()=>oe(!1),1500)},children:[ae?(0,B.jsx)(M,{size:13,strokeWidth:2}):(0,B.jsx)(se,{size:13,strokeWidth:2}),` `,ae?`Copied`:`Copy`]}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:()=>me(I.file,new Blob([fe],{type:`text/plain`})),children:[(0,B.jsx)(F,{size:13,strokeWidth:2}),` Download`]})]})]}):(0,B.jsxs)(`div`,{className:`exp__overview`,children:[(0,B.jsxs)(`div`,{className:`exp__stats`,children:[(0,B.jsxs)(`div`,{className:`exp__stat`,children:[(0,B.jsx)(`b`,{children:v}),(0,B.jsxs)(`span`,{children:[`of `,n.entries.length,` values moved`]})]}),!a&&(0,B.jsxs)(`div`,{className:`exp__stat`,children:[(0,B.jsx)(`b`,{children:h?.length??0}),(0,B.jsxs)(`span`,{children:[`file`,(h?.length??0)===1?``:`s`,` changed`]})]}),(0,B.jsxs)(`div`,{className:`exp__stat`,children:[(0,B.jsx)(`b`,{children:D.length}),(0,B.jsxs)(`span`,{children:[`knob`,D.length===1?``:`s`,` turned`]})]})]}),(0,B.jsxs)(`div`,{className:`exp__dest`,children:[(0,B.jsx)(`h3`,{className:`exp__sec`,children:`How do you want to apply it?`}),(0,B.jsx)(`div`,{className:`exp__destgrid`,children:j.map(e=>(0,B.jsxs)(`button`,{type:`button`,className:`exp__card`,onClick:()=>{N(e.ids[0]),oe(!1)},children:[(0,B.jsx)(`span`,{className:`exp__ico`,children:e.icon}),(0,B.jsxs)(`span`,{className:`exp__text`,children:[(0,B.jsxs)(`span`,{className:`exp__label`,children:[e.title,e.reco&&(0,B.jsx)(`em`,{className:`exp__reco`,children:`start here`})]}),(0,B.jsx)(`span`,{className:`exp__sub2`,children:e.sub}),(0,B.jsx)(`span`,{className:`exp__uses`,children:e.uses.map(([e,t])=>(0,B.jsxs)(`span`,{className:`exp__use`,children:[e,t]},t))})]})]},e.title))})]}),D.length?(0,B.jsxs)(`div`,{className:`exp__turned`,children:[(0,B.jsxs)(`h3`,{className:`exp__sec`,children:[`Settings, from `,a?`the kit`:`your code`,` → the sandbox`]}),(0,B.jsx)(`div`,{className:`exp__cols`,children:D.map((e,t)=>(0,B.jsxs)(`div`,{className:`exp__row`,children:[(0,B.jsx)(`span`,{className:`exp__rowlabel`,children:e.label}),(0,B.jsxs)(`span`,{className:`exp__from`,children:[/^#/.test(e.from)&&(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e.from,width:10,height:10}}),e.from]}),(0,B.jsx)(`span`,{className:`exp__arrow`,children:`→`}),(0,B.jsxs)(`span`,{className:`exp__to`,children:[e.swatch&&(0,B.jsx)(`span`,{className:`fmrow__dot`,style:{background:e.to,width:10,height:10}}),e.to]})]},t))})]}):(0,B.jsxs)(`p`,{className:`exp__none`,children:[`Nothing turned yet: every export is `,a?`${a} as it ships`:`your code's own stand`,` (the identity). Turn a knob and this list says exactly what changed.`]})]})]})})}var ep=[{id:`tailwind`,name:`Tailwind CSS`,values:{brand:`#4f39f6`,page:`#ffffff`,fontBody:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial,
|
|
784
|
+
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,radius:`6px`}},{id:`daisyui`,name:`daisyUI`,values:{brand:`#422ad5`,page:`#ffffff`,success:`#00d390`,warning:`#fcb700`,danger:`#ff627d`,radius:`4px`}},{id:`shadcn`,name:`shadcn/ui`,values:{brand:`#171717`,page:`#ffffff`,danger:`#e7000b`,radius:`10px`}},{id:`bootstrap`,name:`Bootstrap`,values:{brand:`#0d6efd`,page:`#ffffff`,success:`#198754`,warning:`#ffc107`,danger:`#dc3545`,fontBody:`system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,radius:`6px`}},{id:`material`,name:`Material 3`,values:{brand:`#6750a4`,page:`#fef7ff`,danger:`#b3261e`,fontBody:`Roboto Flex, Roboto, Noto Sans, system-ui, sans-serif`,radius:`12px`}},{id:`radix`,name:`Radix Themes`,values:{brand:`#3e63dd`,page:`#ffffff`,fontBody:`-apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'`}},{id:`mantine`,name:`Mantine`,values:{brand:`#228be6`,page:`#ffffff`,danger:`#fa5252`,fontBody:`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif,
|
|
785
|
+
Apple Color Emoji, Segoe UI Emoji`,radius:`8px`}},{id:`antd`,name:`Ant Design`,values:{brand:`#1677ff`,page:`#ffffff`,success:`#52c41a`,warning:`#faad14`,danger:`#ff4d4f`,fontBody:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
786
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
787
|
+
'Noto Color Emoji'`,radius:`6px`}}],tp=/^(system-ui|-apple-system|blinkmacsystemfont|ui-sans-serif|sans-serif)$/i;function np(e){for(let t of e.split(`,`)){let e=t.trim().replace(/^["']|["']$/g,``);if(tp.test(e))return ze;let n=et.find(t=>t.toLowerCase()===e.toLowerCase());if(n)return n}return null}function rp(e,t,n){let r=t.values,i={...e.sb},a={...e,sb:i};r.brand&&(a.cPrimary=r.brand),r.page&&(i.cBackground=r.page),r.success&&(i.cSuccess=r.success),r.warning&&(i.cWarning=r.warning),r.danger&&(i.cDanger=r.danger);let o=r.fontBody?np(r.fontBody):null;o&&(a.fontBody=o,a.fontDisplay=o);let s=r.radius?gc(r.radius)?.px??null:null;return s!=null&&n&&(i.radius=Math.min(2,Math.max(0,Math.round(s/n*20)/20))),a}var ip=y.filter(e=>e.renders),ap=e=>y.find(t=>t.id===e)?.name??e;function op({kitId:e,ownApp:t,detected:n,onPick:r}){let i=t?n?`Your app · runs on ${ap(n)}`:n===null?`Your app · none of the nine`:`Your app`:``;return(0,B.jsxs)(`label`,{className:`ebar__engine`,title:`Which kit the stage shows. Your own app stays what it is: switching loads a kit in its place.`,children:[(0,B.jsx)(`span`,{className:`ebar__label`,children:`Engine`}),(0,B.jsxs)(`select`,{value:t?``:e??``,onChange:e=>{e.target.value&&r(e.target.value)},"aria-label":`Engine: the kit on the stage`,children:[t&&(0,B.jsx)(`option`,{value:``,children:i}),ip.map(e=>(0,B.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})}function sp({value:e,onChange:t}){return(0,B.jsxs)(`div`,{className:`seg ebar__scheme`,role:`group`,"aria-label":`Colour scheme`,children:[(0,B.jsx)(`button`,{type:`button`,className:`seg__opt ${e===`light`?`seg__opt--on`:``}`,"aria-pressed":e===`light`,onClick:()=>t(`light`),title:`Light`,children:(0,B.jsx)(Me,{size:13,strokeWidth:2})}),(0,B.jsx)(`button`,{type:`button`,className:`seg__opt ${e===`dark`?`seg__opt--on`:``}`,"aria-pressed":e===`dark`,onClick:()=>t(`dark`),title:`Dark`,children:(0,B.jsx)(L,{size:13,strokeWidth:2})})]})}function cp({url:e}){let[t,n]=(0,_.useState)(null),r=(0,_.useRef)(null);(0,_.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let i=(e,t)=>{n(e),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(null),t)},a=async()=>{if(!e){i(`Your app came from your own machine, so there is no address to send. A link carries the knobs only for a build that has one: a public repo, or a zip URL.`,6e3);return}try{await navigator.clipboard.writeText(e),i(`Link copied: the same build, with these knobs.`,2200)}catch{i(e,8e3)}};return(0,B.jsxs)(`span`,{className:`ebar__share`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>void a(),title:`Copy a link to this build with these knobs`,children:[t&&e&&t.startsWith(`Link copied`)?(0,B.jsx)(M,{size:14}):(0,B.jsx)(_e,{size:14}),(0,B.jsx)(`span`,{className:`ebar__txt`,children:` Share`})]}),t&&(0,B.jsx)(`span`,{className:`ebar__pop`,role:`status`,children:t})]})}function lp({current:e,onPick:t}){return(0,B.jsxs)(`label`,{className:`ebar__engine ebar__look`,title:`Another kit's own start values on what the stage shows: its brand, background, status colours, body font and corners. Undo, Reset and Export treat it like any knob.`,children:[(0,B.jsx)(`span`,{className:`ebar__label`,children:`Look`}),(0,B.jsxs)(`select`,{value:e??``,onChange:e=>{e.target.value&&t(e.target.value)},"aria-label":`Look: another kit's start values`,children:[(0,B.jsx)(`option`,{value:``,children:e?`Custom`:`As it is`}),ep.map(e=>(0,B.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})}var up=`shadcn`,dp=()=>/^\/about\/?$/.test(location.pathname);function fp(){return dp()?(0,B.jsx)(Ed,{}):(0,B.jsx)(pp,{})}function pp(){let{cfg:e,tokens:t,dispatch:n,undo:r,redo:i,reset:a,canUndo:o,canRedo:s}=Tr(),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),f=(0,_.useRef)(!1),p=e=>d(e?{...e,fromUrl:f.current}:null),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(()=>typeof window>`u`||window.innerWidth>820),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(()=>new URLSearchParams(location.search).get(`tab`)===`app`?`app`:`components`),E=(0,_.useRef)(fr()),D=(0,_.useRef)(new URLSearchParams(location.search).get(`tab`)===`app`),O=(0,_.useRef)(null),k=(0,_.useRef)(e);k.current=e;let A=(0,_.useRef)(c);A.current=c;let[j,te]=(0,_.useState)(0),ne=(0,_.useRef)(null),re=(0,_.useMemo)(()=>c?Vc(c.project.table,c.report.baseline,e,t):{},[c,e,t,j]),M=(0,_.useRef)(re);M.current=re;let N=(0,_.useMemo)(()=>{if(!c)return``;let t=c.report.baseline.cfg,n=[e.fontDisplay,e.fontBody].filter((e,n)=>e!==(n===0?t.fontDisplay:t.fontBody)&&e!==`System`);if(!n.length)return``;let r=n.filter(e=>!He(e)),i=n.filter(He),a=[];r.length&&a.push(it(r[0],r[1]??r[0]));for(let e of i){let t=Ut(e);t&&a.push(`@font-face{font-family:'${Ue(e)}';src:url(${t});font-weight:100 900;font-display:swap}`)}if(e.fontDisplay!==t.fontDisplay){let t=String(or(e).vars[`--k-font-display`]);a.push(`h1,h2,h3,h4,h5,h6,[class*="title"],[class*="heading"],[class*="hero"],[class*="display"]{font-family:${t} !important}`)}return a.join(`
|
|
788
|
+
`)},[e.fontDisplay,e.fontBody,c]),ie=(0,_.useRef)(null),ae=(0,_.useRef)(N);ae.current=N,(0,_.useEffect)(()=>{},[c,e,re,n,N]),(0,_.useEffect)(()=>{document.title=c&&!c.kit?`UISandbox · ${c.project.name}`:`UISandbox · Play with your app's design. Right in the browser`},[c]);let oe=(0,_.useMemo)(()=>{if(!c)return 0;let e=c.project.table.identityVars();return Object.keys(re).filter(t=>re[t]!==e[t]).length},[re,c]),se=(0,_.useCallback)(()=>{let e=O.current?.contentDocument;if(!e)return;for(let n of[e,...lu(e)])t(n);function t(e){let t=e.getElementById(`us-vars`);t||(t=e.createElement(`style`),t.id=`us-vars`,(e.head??e.documentElement).prepend(t));let n=Us(M.current),r=n.slice(n.indexOf(`>`)+1,n.lastIndexOf(`<`));t.textContent!==r&&(t.textContent=r);let i=e.getElementById(`us-fonts`);i||(i=e.createElement(`style`),i.id=`us-fonts`,t.after(i));let a=ae.current;i.textContent!==a&&(i.textContent=a);let o=A.current;if(o)try{Ms(e,o.project.scheme,k.current.sb.dark??null)}catch{}}},[]);(0,_.useEffect)(()=>{se()},[re,N,e.sb.dark,se]),(0,_.useEffect)(()=>{let t=new URLSearchParams(location.search).get(`sync`);if(!t||!c||!/^(127\.0\.0\.1|localhost)$/.test(location.hostname))return;let n=setTimeout(()=>{fetch(`/__state/${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({cfg:e})}).catch(()=>{})},400);return()=>clearTimeout(n)},[e,c]);let P=(0,_.useCallback)(()=>{let e=A.current,t=O.current?.contentDocument;if(!e||!t||!t.body)return;let n=e.report.baseline.cfg;if(!Object.keys(n).every(e=>k.current[e]===n[e]))return;let r=sl(e.project.table,n),i={...n,...r??{}},o=e.brandSeen?!1:!e.report.brandDeclared||`if-absent`;e.brandSeen=!0;let s=ol(t,i,{brand:o}),c;try{let e=t.defaultView,n=[e.getComputedStyle(t.body).backgroundColor,e.getComputedStyle(t.documentElement).backgroundColor].find(e=>e&&!/^rgba\(0, 0, 0, 0\)$|^transparent$/.test(e));n&&(c=n)}catch{}let u={...i,...s??{}},d=Nc(e.project.table,u.cPrimary,{paintedCanvas:c}),f=d.canvasId!==e.report.baseline.families?.canvasId;!r&&!s&&!f||(e.report.baseline={cfg:u,tokens:or(u),families:d},r&&e.report.notes.push(`Corrected from rules inserted by JS at runtime: ${Object.entries(r).map(([e,t])=>`${e} ${t}`).join(`, `)}.`),s&&e.report.notes.push(`Corrected from the rendered page: ${Object.entries(s).map(([e,t])=>`${e} ${t}`).join(`, `)}.`),a(u),l({...e}))},[a]),I=(0,_.useCallback)(()=>{let e=A.current,t=O.current?.contentDocument;if(!e||!t?.body)return;let n=Js(t,e.project.screens);n.length&&(e.project.screens=[...e.project.screens,...n],l({...e}))},[]),ce=(0,_.useCallback)(()=>{let e=A.current,t=O.current?.contentWindow;if(!e||!t)return;let n=t.location.pathname.replace(/^\/__sb\/[^/]+\//,`/`).replace(/\/+$/,``)||`/`;e.project.base&&n.startsWith(`/`+e.project.base)&&(n=n.slice(e.project.base.length+1)||`/`),!e.project.screens.some(e=>e.label===n)&&(e.project.screens=[...e.project.screens,{path:n.replace(/^\//,``),label:n,source:`pinned`}],l({...e}))},[]),[le,ue]=(0,_.useState)(null),de=!!c&&c.project.archive.entries.some(e=>/(^|\/)(main\.dart\.js|flutter_bootstrap\.js)$/.test(e.path))&&c.project.table.entries.length<40,[fe,pe]=(0,_.useState)([]);(0,_.useEffect)(()=>pl(e=>{A.current?.project.id===e.id&&pe(ml(e))}),[]),(0,_.useEffect)(()=>{pe(c?ml(c.project):[])},[c]);let[me,ge]=(0,_.useState)(null);ie.current=me;let _e=(0,_.useRef)(null),L=(0,_.useCallback)(e=>{let t=O.current?.contentDocument;if(!t?.documentElement)return{};let n=(t.defaultView??window).getComputedStyle(t.documentElement);return Object.fromEntries(e.map(e=>[e,n.getPropertyValue(e).trim()]).filter(([,e])=>e))},[]),ve=(0,_.useCallback)(()=>{_e.current&&clearTimeout(_e.current),_e.current=setTimeout(()=>{let e=A.current,t=O.current?.contentDocument;if(!(!e||!t?.body))try{ge(Cu(t,e.project.table,M.current))}catch{}},900)},[]),be=(0,_.useCallback)(()=>{se(),ne.current?.();let e=O.current?.contentDocument;if(e?.body){let t=()=>{let t=[e,...lu(e)],n=t.reduce((e,t)=>e+t.body.querySelectorAll(`*`).length,0),r=t.reduce((e,t)=>e+Array.from(t.styleSheets).reduce((e,t)=>{try{return e+t.cssRules.length}catch{return e}},0),0),i=t.reduce((e,t)=>e+(t.body.innerText??``).trim().length,0);return{shell:t.reduce((e,t)=>e+t.body.querySelectorAll(`img, svg, canvas, video, picture`).length,0)===0&&(n<6||r<3||i<20&&n<40),els:n,rules:r,text:i}};setTimeout(()=>{if(!t().shell){ue(null);return}setTimeout(()=>{let e=t();ue(e.shell?`This screen rendered ${e.els} element${e.els===1?``:`s`}, ${e.rules} style rules and ${e.text} characters of visible text. It looks like a shell, not the app (a page the server fills in, a build that needs its API, or a folder without its CSS). What you see here is not what your users see.`:null)},2800)},1200)}e&&c&&(ne.current=Ol(e,c.project.table,()=>{te(e=>e+1),P(),ve()})),P();let t=A.current;if(t?.pendingCarry){let{cfg:e,keys:r}=t.pendingCarry;t.pendingCarry=void 0,n({type:`REPLACE`,cfg:qf(t.report.baseline.cfg,e,r)})}I(),ve(),setTimeout(I,800)},[se,c,P,I,ve]);(0,_.useEffect)(()=>()=>{ne.current?.()},[]),(0,_.useEffect)(()=>{let e=null;return hl(()=>{e&&clearTimeout(e),e=setTimeout(()=>{te(e=>e+1),P()},80)})},[P]);let xe=async(e,t,r,i)=>{h(null),u||(f.current=!1);try{p({stage:`read`,done:0,total:e.entries.length,bytes:0,what:e.rootName}),await xl();let o=0,s=await Hs(e,{root:t,onProgress:(t,n,r)=>{let i=Date.now();(i-o>120||t===n)&&(o=i,p({stage:`read`,done:t,total:n,bytes:r,what:e.rootName}))}});if(!s.platform.renders||!s.screens.length)throw Error(Ds(s.platform,{files:e.entries.length}));p({stage:`derive`,total:s.table.entries.length,what:e.rootName});let u=await il(e,s.table);p({stage:`open`,what:e.rootName});let d=A.current?.kit?{name:A.current.kit.name,base:A.current.report.baseline.cfg,cfg:k.current}:null;c&&Cl(c.project),Dl(),Sl(s,()=>M.current),a(u.baseline.cfg);let f;if(E.current)n({type:`REPLACE`,cfg:E.current}),E.current=null;else if(d&&!r){let e=Jf(d.base,d.cfg,u.baseline.cfg);e.keys.length&&(f={cfg:e.cfg,keys:e.keys},u.notes.unshift(`Carried over from ${d.name}: ${e.keys.map(Wf).join(`, `)}. Every other knob starts where your code puts it; Reset puts it all back.`))}let m=new URLSearchParams(location.search).get(`screen`),h=m&&s.screens.find(e=>e.path===m||e.label===m)||s.screens[0];l({project:s,report:u,screen:h,archive:e,kit:r,source:i,pendingCarry:f}),r?(T(D.current?`app`:`components`),D.current=!1):(T(`app`),C(!0))}catch(e){h(e.message)}finally{p(null)}},Se=(0,_.useRef)(!1),Ce=async e=>{h(null),f.current=!0;try{let t=(()=>{try{let t=new URL(e,location.href);return t.pathname.startsWith(`/__repo/`)?new URL(t.searchParams.get(`u`)??``,location.href).host||`github.com`:t.host}catch{return e}})();p({stage:`fetch`,what:t,bytes:0});let n;try{n=await fetch(e)}catch{throw Error(`The browser could not fetch that URL from ${t}: the server must allow CORS (or it is offline). A public GitHub repository URL works regardless: it goes through this site's repo route.`)}if(!n.ok)throw Error(n.status===404?`Nothing at ${t} for that URL (${n.status}).`:`${n.status} fetching from ${t}.`);let r=n.headers.get(`content-type`)||``;if(/text\/html/i.test(r))throw Error(`That URL answered with a web page, not a zip. Check the link (a direct link to a .zip file, or a public GitHub repository).`);let i=Number(n.headers.get(`content-length`)||0)||void 0,a=[],o=0,s=n.body?.getReader();if(s)for(;;){let{done:e,value:n}=await s.read();if(e)break;a.push(n),o+=n.byteLength,p({stage:`fetch`,what:t,bytes:o,size:i})}let c=s?new Blob(a):await n.blob(),l=decodeURIComponent(n.headers.get(`content-disposition`)?.match(/filename="?([^";]+)"?/)?.[1]||e.split(`/`).pop()||`archive.zip`),u=(()=>{try{let t=new URL(e,location.href);return t.origin===location.origin?t.pathname.match(/^\/kits\/([a-z0-9]+)\.zip$/)?.[1]:void 0}catch{return}})(),d=u?y.find(e=>e.id===u):void 0,f=(()=>{try{let t=new URL(e,location.href);return t.pathname.startsWith(`/__repo/`)?t.searchParams.get(`u`)??void 0:t.pathname.startsWith(`/__archive/`)?void 0:t.origin===location.origin?t.pathname:t.href}catch{return}})();await xe(await ko(new File([c],l.endsWith(`.zip`)?l:`${l}.zip`,{type:`application/zip`})),void 0,d?{id:d.id,name:d.name}:void 0,f)}catch(e){h(e.message),p(null)}};(0,_.useEffect)(()=>{if(Se.current)return;let e=new URLSearchParams(location.search).get(`load`)??`/kits/${up}.zip`;Se.current=!0;let t=e.match(/^(?:https?:\/\/)?(?:www\.)?(github|gitlab)\.com\/[\w.-]+\/[\w.-]+/i)&&!/\.zip($|\?)/i.test(e)&&!/\/archive\//i.test(e);Ce(t?`/__repo/?u=${encodeURIComponent(e.startsWith(`http`)?e:`https://${e}`)}`:e)},[]),(0,_.useEffect)(()=>{let e=setTimeout(()=>{xl().catch(()=>{})},800);return()=>clearTimeout(e)},[]),(0,_.useEffect)(()=>{let e=e=>{!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`z`||(e.preventDefault(),e.shiftKey?i():r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,i]);let we=()=>{if((location.search||location.hash)&&history.replaceState(null,``,`/`),c?.kit?.id===up&&!u){T(`components`),n({type:`REPLACE`,cfg:c.report.baseline.cfg});return}Ce(`/kits/${up}.zip`)},Te=we,Ee=(()=>{if(!c)return null;let t=c.kit?.id===up?`${location.origin}/`:c.source?`${location.origin}/?load=${encodeURIComponent(c.source)}`:null;return t?ur(e)===ur(c.report.baseline.cfg)?t:`${t}#${ur(e)}`:null})(),De=e=>{c&&!c.kit&&!confirm(`Switch to ${y.find(t=>t.id===e)?.name??e}? Your app was only in this tab: switching closes it, and you can bring it again from the Your app tab.`)||Ce(`/kits/${e}.zip`)},[Oe,ke]=(0,_.useState)(null),Ae=(()=>{if(!c)return null;let e=c.kit?ep.find(e=>e.id===c.kit.id)?.values.radius:void 0;return e?gc(e)?.px??null:[...c.project.table.ofKind(`radius`)].map(e=>({px:gc(e.value)?.px??0,n:e.count})).filter(e=>e.px>0&&e.px<100).sort((e,t)=>t.n-e.n)[0]?.px??null})(),je=t=>{let r=ep.find(e=>e.id===t);if(!r||!c)return;let i=rp(e,r,Ae);n({type:`REPLACE`,cfg:i}),ke({id:t,cfg:i})};(0,_.useEffect)(()=>{ke(null)},[c?.project.id]);let Me=!c||ur(e)===ur(c.report.baseline.cfg)?null:Oe&&ur(Oe.cfg)===ur(e)?Oe.id:Oe?``:null,Ne=!!c&&(c.project.scheme.media||c.project.scheme.hooks.length>0),Pe=c?.kit?Kf(c.report.baseline.cfg,e):[],Fe=Pe.length?`What you turned on ${c.kit.name} comes with it: ${Pe.map(Wf).join(`, `)}. Everything else starts as your code has it.`:void 0,Ie=(e=!1)=>(0,B.jsx)(Sd,{standalone:e,carryNote:e?void 0:Fe,onArchive:xe,onUrl:e=>void Ce(`/__repo/?u=${encodeURIComponent(e)}`),onSample:e=>void Ce(e),busy:u,error:m});return(0,B.jsxs)(`div`,{className:`app`,children:[(0,B.jsxs)(`header`,{className:`app__topbar`,children:[(0,B.jsxs)(`a`,{className:`app__brand`,href:`/`,title:c&&!c.kit?`Close your app and start over`:`UISandbox`,onClick:e=>{c&&(e.preventDefault(),we())},children:[(0,B.jsx)(`span`,{className:`app__brand-mark`,children:(0,B.jsx)(Xs,{size:16})}),(0,B.jsx)(`span`,{className:`app__brand-name`,children:`UISandbox`}),` `,(0,B.jsx)(`small`,{children:c?c.kit?c.kit.name:c.project.name:`Interface Design Playground`})]}),(0,B.jsx)(`span`,{className:`app__spacer`}),(0,B.jsxs)(`div`,{className:`app__group`,children:[(0,B.jsxs)(`a`,{className:`btn btn--ghost btn--sm app__how`,href:`/about`,title:`How it works`,children:[(0,B.jsx)(ee,{size:14}),(0,B.jsx)(`span`,{className:`ebar__txt`,children:` How it works`})]}),!c&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(tc,{}),(0,B.jsx)(ic,{})]}),c&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(lp,{current:Me,onPick:je}),(0,B.jsx)(op,{kitId:c.kit?.id,ownApp:!c.kit,detected:me?me.kit:void 0,onPick:De}),Ne&&(0,B.jsx)(sp,{value:e.sb.dark??`light`,onChange:t=>n({type:`SET`,patch:{sb:{...e.sb,dark:t}}})}),(0,B.jsx)(cp,{url:Ee}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:()=>C(e=>!e),title:c.kit?`What we read from the kit`:`What we read from your code`,children:[(0,B.jsx)(he,{size:14}),(0,B.jsx)(`span`,{className:`ebar__txt`,children:` Read`})]}),(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--primary btn--sm`,onClick:()=>x(!0),children:[(0,B.jsx)(F,{size:14}),` Export`]}),!c.kit&&(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--sm`,onClick:Te,title:`Close your app and go back to the kit`,children:[(0,B.jsx)(Le,{size:14}),` Close`]})]})]})]}),!c&&!m&&(0,B.jsxs)(`div`,{className:`app__intro`,children:[(0,B.jsx)(`h1`,{children:`Play with your app's design, right in the browser.`}),(0,B.jsx)(`span`,{children:`Start from a kit or your own app, turn the knobs, export the code.`})]}),c?.kit&&(0,B.jsxs)(`div`,{className:`app__intro`,children:[(0,B.jsx)(`h1`,{children:`Play with your app's design, right in the browser.`}),(0,B.jsxs)(`span`,{children:[`This is `,c.kit.name,` as it ships. Turn a knob`,(0,B.jsx)(`span`,{className:`app__intro-where`,children:` on the left`}),`, then `,(0,B.jsx)(`button`,{type:`button`,className:`app__intro-link`,onClick:()=>T(`app`),children:`try it on your own app`}),`.`]}),(0,B.jsx)(`a`,{className:`app__intro-link app__intro-how`,href:`/about`,children:`How it works`})]}),(0,B.jsxs)(`div`,{className:`app__body`,children:[c&&(0,B.jsxs)(B.Fragment,{children:[!g&&(0,B.jsxs)(`button`,{type:`button`,className:`btn btn--ghost btn--icon app__knobs-open`,onClick:()=>v(!0),title:`Show the knobs`,children:[(0,B.jsx)(ye,{size:16}),(0,B.jsx)(`span`,{className:`app__knobs-label`,children:`Knobs`})]}),g&&(0,B.jsx)(Rn,{cfg:e,tokens:t,base:c.report.baseline.cfg,families:c.report.baseline.families,scheme:c.project.scheme,codeFonts:el(c.project.table),hasGradients:c.project.table.ofKind(`angle`).length>0,varNow:e=>re[No(e)],dispatch:n,onCollapse:()=>v(!1),onRandomize:()=>n({type:`REPLACE`,cfg:Er(e,c.report.baseline)}),onReset:()=>n({type:`REPLACE`,cfg:c.report.baseline.cfg}),history:{undo:r,redo:i,canUndo:o,canRedo:s},radiiOnScreen:me?me.radii.total:void 0,kitName:c.kit?.name}),(0,B.jsx)(Md,{project:c.project,screen:c.screen,onScreen:e=>l({...c,screen:e}),frameRef:O,onLoaded:be,onPin:ce,changedCount:oe,warningTitle:!le&&!fe.length&&de?`A Flutter web build`:void 0,warning:le??(fe.length?`${fe.length===1?`A file`:`${fe.length} files`} this page asked for ${fe.length===1?`is`:`are`} not in the archive: ${fe.slice(0,3).join(`, `)}${fe.length>3?`…`:``}. That usually means source, not the built output: parts of the page cannot run here.`:de?`Flutter paints this app into a <canvas>: there is almost no CSS for the knobs to move (${c.project.table.entries.length} values found). The 1:1 check and the reach meter still tell the truth about it; a design pass on a Flutter app belongs in its ThemeData.`:null),coverage:me,tab:w,onTab:T,kitName:c.kit?.name,door:Ie(),notes:S?(0,B.jsxs)(`div`,{className:`card popcard`,role:`dialog`,"aria-label":`What was read`,children:[(0,B.jsx)(`h3`,{children:c.kit?`What we read from ${c.kit.name}`:`What we read from your code`}),(0,B.jsxs)(`ul`,{className:`notes`,children:[c.report.notes.map((e,t)=>(0,B.jsx)(`li`,{children:e},t)),(0,B.jsxs)(`li`,{children:[c.project.table.entries.length,` distinct values in `,Math.round(c.project.cssBytes/1024),` KB of CSS: `,[`color`,`radius`,`font-size`,`font-family`,`space`,`shadow`,`angle`].map(e=>`${c.project.table.ofKind(e).length} ${e===`angle`?`gradient angle`:e}`).join(` · `),`.`]}),c.project.candidates.length>1&&(0,B.jsxs)(`li`,{children:[`Other roots in the archive:`,` `,c.project.candidates.filter(e=>e!==c.project.root).slice(0,6).map(e=>(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,style:{marginRight:6,marginTop:4},onClick:()=>{let t=c.archive;Cl(c.project),l(null),xe(t,e,c.kit,c.source)},children:e||`/`},e))]})]}),(0,B.jsx)(`div`,{style:{marginTop:14},children:(0,B.jsx)(`button`,{type:`button`,className:`btn btn--secondary btn--sm`,onClick:()=>C(!1),children:`Close`})})]}):null})]}),!c&&(m?Ie(!0):(0,B.jsxs)(`div`,{className:`skel`,children:[(0,B.jsx)(`aside`,{className:`skel__panel`,"aria-hidden":!0}),(0,B.jsx)(`section`,{className:`skel__stage`,children:u?(0,B.jsx)(`div`,{className:`skel__load`,children:(0,B.jsx)(Cd,{busy:u})}):null})]}))]}),(c||!m)&&(0,B.jsx)(ac,{}),b&&c&&(0,B.jsx)($f,{cfg:e,base:c.report.baseline.cfg,table:c.project.table,vars:re,projectName:c.project.name,kitDoorName:c.kit?.name,files:c.project.raw,fontCss:N,notes:c.report.notes,painted:me?.painted,anchors:me?.anchors,kit:me?me.kit:void 0,kitValues:me?.kitValues,readPageVars:L,onClose:()=>x(!1)})]})}var mp=document.documentElement;for(let[e,t]of Object.entries(or(zn).vars))mp.style.setProperty(e,String(t));(0,v.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(_.StrictMode,{children:(0,B.jsx)(fp,{})}));
|