dslinter 0.1.5 → 0.1.13

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.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardLayoutAuto-Dp3bAQxH.js","assets/DashboardLayoutAuto-BPPtPsYh.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardLayoutAuto-DgwO_itB.js","assets/DashboardLayoutAuto-Bm7yfyC-.css"])))=>i.map(i=>d[i]);
2
2
  function p$(e,n){for(var r=0;r<n.length;r++){const s=n[r];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const c=Object.getOwnPropertyDescriptor(s,l);c&&Object.defineProperty(e,l,c.get?c:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(l){if(l.ep)return;l.ep=!0;const c=r(l);fetch(l.href,c)}})();function Ev(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hf={exports:{}},Bo={};var Ty;function h$(){if(Ty)return Bo;Ty=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:e,type:s,key:u,ref:l!==void 0?l:null,props:c}}return Bo.Fragment=n,Bo.jsx=r,Bo.jsxs=r,Bo}var Ry;function g$(){return Ry||(Ry=1,hf.exports=h$()),hf.exports}var g=g$(),gf={exports:{}},ve={};var My;function b$(){if(My)return ve;My=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),_=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=_&&T[_]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,E={};function N(T,R,q){this.props=T,this.context=R,this.refs=E,this.updater=q||S}N.prototype.isReactComponent={},N.prototype.setState=function(T,R){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,R,"setState")},N.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function k(){}k.prototype=N.prototype;function j(T,R,q){this.props=T,this.context=R,this.refs=E,this.updater=q||S}var z=j.prototype=new k;z.constructor=j,$(z,N.prototype),z.isPureReactComponent=!0;var I=Array.isArray;function F(){}var U={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function re(T,R,q){var Q=q.ref;return{$$typeof:e,type:T,key:R,ref:Q!==void 0?Q:null,props:q}}function pe(T,R){return re(T.type,R,T.props)}function fe(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function se(T){var R={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(q){return R[q]})}var ye=/\/+/g;function ae(T,R){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):R.toString(36)}function le(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(F,F):(T.status="pending",T.then(function(R){T.status==="pending"&&(T.status="fulfilled",T.value=R)},function(R){T.status==="pending"&&(T.status="rejected",T.reason=R)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,R,q,Q,K){var ne=typeof T;(ne==="undefined"||ne==="boolean")&&(T=null);var W=!1;if(T===null)W=!0;else switch(ne){case"bigint":case"string":case"number":W=!0;break;case"object":switch(T.$$typeof){case e:case n:W=!0;break;case b:return W=T._init,O(W(T._payload),R,q,Q,K)}}if(W)return K=K(T),W=Q===""?"."+ae(T,0):Q,I(K)?(q="",W!=null&&(q=W.replace(ye,"$&/")+"/"),O(K,R,q,"",function(Ee){return Ee})):K!=null&&(fe(K)&&(K=pe(K,q+(K.key==null||T&&T.key===K.key?"":(""+K.key).replace(ye,"$&/")+"/")+W)),R.push(K)),1;W=0;var he=Q===""?".":Q+":";if(I(T))for(var oe=0;oe<T.length;oe++)Q=T[oe],ne=he+ae(Q,oe),W+=O(Q,R,q,ne,K);else if(oe=w(T),typeof oe=="function")for(T=oe.call(T),oe=0;!(Q=T.next()).done;)Q=Q.value,ne=he+ae(Q,oe++),W+=O(Q,R,q,ne,K);else if(ne==="object"){if(typeof T.then=="function")return O(le(T),R,q,Q,K);throw R=String(T),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return W}function Y(T,R,q){if(T==null)return T;var Q=[],K=0;return O(T,Q,"","",function(ne){return R.call(q,ne,K++)}),Q}function J(T){if(T._status===-1){var R=T._result;R=R(),R.then(function(q){(T._status===0||T._status===-1)&&(T._status=1,T._result=q)},function(q){(T._status===0||T._status===-1)&&(T._status=2,T._result=q)}),T._status===-1&&(T._status=0,T._result=R)}if(T._status===1)return T._result.default;throw T._result}var de=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ee={map:Y,forEach:function(T,R,q){Y(T,function(){R.apply(this,arguments)},q)},count:function(T){var R=0;return Y(T,function(){R++}),R},toArray:function(T){return Y(T,function(R){return R})||[]},only:function(T){if(!fe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ve.Activity=y,ve.Children=ee,ve.Component=N,ve.Fragment=r,ve.Profiler=l,ve.PureComponent=j,ve.StrictMode=s,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,ve.__COMPILER_RUNTIME={__proto__:null,c:function(T){return U.H.useMemoCache(T)}},ve.cache=function(T){return function(){return T.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(T,R,q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=$({},T.props),K=T.key;if(R!=null)for(ne in R.key!==void 0&&(K=""+R.key),R)!H.call(R,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&R.ref===void 0||(Q[ne]=R[ne]);var ne=arguments.length-2;if(ne===1)Q.children=q;else if(1<ne){for(var W=Array(ne),he=0;he<ne;he++)W[he]=arguments[he+2];Q.children=W}return re(T.type,K,Q)},ve.createContext=function(T){return T={$$typeof:u,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:c,_context:T},T},ve.createElement=function(T,R,q){var Q,K={},ne=null;if(R!=null)for(Q in R.key!==void 0&&(ne=""+R.key),R)H.call(R,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(K[Q]=R[Q]);var W=arguments.length-2;if(W===1)K.children=q;else if(1<W){for(var he=Array(W),oe=0;oe<W;oe++)he[oe]=arguments[oe+2];K.children=he}if(T&&T.defaultProps)for(Q in W=T.defaultProps,W)K[Q]===void 0&&(K[Q]=W[Q]);return re(T,ne,K)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(T){return{$$typeof:f,render:T}},ve.isValidElement=fe,ve.lazy=function(T){return{$$typeof:b,_payload:{_status:-1,_result:T},_init:J}},ve.memo=function(T,R){return{$$typeof:h,type:T,compare:R===void 0?null:R}},ve.startTransition=function(T){var R=U.T,q={};U.T=q;try{var Q=T(),K=U.S;K!==null&&K(q,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(F,de)}catch(ne){de(ne)}finally{R!==null&&q.types!==null&&(R.types=q.types),U.T=R}},ve.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},ve.use=function(T){return U.H.use(T)},ve.useActionState=function(T,R,q){return U.H.useActionState(T,R,q)},ve.useCallback=function(T,R){return U.H.useCallback(T,R)},ve.useContext=function(T){return U.H.useContext(T)},ve.useDebugValue=function(){},ve.useDeferredValue=function(T,R){return U.H.useDeferredValue(T,R)},ve.useEffect=function(T,R){return U.H.useEffect(T,R)},ve.useEffectEvent=function(T){return U.H.useEffectEvent(T)},ve.useId=function(){return U.H.useId()},ve.useImperativeHandle=function(T,R,q){return U.H.useImperativeHandle(T,R,q)},ve.useInsertionEffect=function(T,R){return U.H.useInsertionEffect(T,R)},ve.useLayoutEffect=function(T,R){return U.H.useLayoutEffect(T,R)},ve.useMemo=function(T,R){return U.H.useMemo(T,R)},ve.useOptimistic=function(T,R){return U.H.useOptimistic(T,R)},ve.useReducer=function(T,R,q){return U.H.useReducer(T,R,q)},ve.useRef=function(T){return U.H.useRef(T)},ve.useState=function(T){return U.H.useState(T)},ve.useSyncExternalStore=function(T,R,q){return U.H.useSyncExternalStore(T,R,q)},ve.useTransition=function(){return U.H.useTransition()},ve.version="19.2.6",ve}var Oy;function Gm(){return Oy||(Oy=1,gf.exports=b$()),gf.exports}var v=Gm();const ut=Ev(v),Im=p$({__proto__:null,default:ut},[v]);var bf={exports:{}},Uo={},yf={exports:{}},xf={};var Dy;function y$(){return Dy||(Dy=1,(function(e){function n(O,Y){var J=O.length;O.push(Y);e:for(;0<J;){var de=J-1>>>1,ee=O[de];if(0<l(ee,Y))O[de]=Y,O[J]=ee,J=de;else break e}}function r(O){return O.length===0?null:O[0]}function s(O){if(O.length===0)return null;var Y=O[0],J=O.pop();if(J!==Y){O[0]=J;e:for(var de=0,ee=O.length,T=ee>>>1;de<T;){var R=2*(de+1)-1,q=O[R],Q=R+1,K=O[Q];if(0>l(q,J))Q<ee&&0>l(K,q)?(O[de]=K,O[Q]=J,de=Q):(O[de]=q,O[R]=J,de=R);else if(Q<ee&&0>l(K,J))O[de]=K,O[Q]=J,de=Q;else break e}}return Y}function l(O,Y){var J=O.sortIndex-Y.sortIndex;return J!==0?J:O.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],h=[],b=1,y=null,_=3,w=!1,S=!1,$=!1,E=!1,N=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function z(O){for(var Y=r(h);Y!==null;){if(Y.callback===null)s(h);else if(Y.startTime<=O)s(h),Y.sortIndex=Y.expirationTime,n(p,Y);else break;Y=r(h)}}function I(O){if($=!1,z(O),!S)if(r(p)!==null)S=!0,F||(F=!0,se());else{var Y=r(h);Y!==null&&le(I,Y.startTime-O)}}var F=!1,U=-1,H=5,re=-1;function pe(){return E?!0:!(e.unstable_now()-re<H)}function fe(){if(E=!1,F){var O=e.unstable_now();re=O;var Y=!0;try{e:{S=!1,$&&($=!1,k(U),U=-1),w=!0;var J=_;try{t:{for(z(O),y=r(p);y!==null&&!(y.expirationTime>O&&pe());){var de=y.callback;if(typeof de=="function"){y.callback=null,_=y.priorityLevel;var ee=de(y.expirationTime<=O);if(O=e.unstable_now(),typeof ee=="function"){y.callback=ee,z(O),Y=!0;break t}y===r(p)&&s(p),z(O)}else s(p);y=r(p)}if(y!==null)Y=!0;else{var T=r(h);T!==null&&le(I,T.startTime-O),Y=!1}}break e}finally{y=null,_=J,w=!1}Y=void 0}}finally{Y?se():F=!1}}}var se;if(typeof j=="function")se=function(){j(fe)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,ae=ye.port2;ye.port1.onmessage=fe,se=function(){ae.postMessage(null)}}else se=function(){N(fe,0)};function le(O,Y){U=N(function(){O(e.unstable_now())},Y)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(O){switch(_){case 1:case 2:case 3:var Y=3;break;default:Y=_}var J=_;_=Y;try{return O()}finally{_=J}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(O,Y){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var J=_;_=O;try{return Y()}finally{_=J}},e.unstable_scheduleCallback=function(O,Y,J){var de=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?de+J:de):J=de,O){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=J+ee,O={id:b++,callback:Y,priorityLevel:O,startTime:J,expirationTime:ee,sortIndex:-1},J>de?(O.sortIndex=J,n(h,O),r(p)===null&&O===r(h)&&($?(k(U),U=-1):$=!0,le(I,J-de))):(O.sortIndex=ee,n(p,O),S||w||(S=!0,F||(F=!0,se()))),O},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(O){var Y=_;return function(){var J=_;_=Y;try{return O.apply(this,arguments)}finally{_=J}}}})(xf)),xf}var zy;function x$(){return zy||(zy=1,yf.exports=y$()),yf.exports}var vf={exports:{}},$t={};var Ly;function v$(){if(Ly)return $t;Ly=1;var e=Gm();function n(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={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},l=Symbol.for("react.portal");function c(p,h,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:p,containerInfo:h,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,$t.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return c(p,h,null,b)},$t.flushSync=function(p){var h=u.T,b=s.p;try{if(u.T=null,s.p=2,p)return p()}finally{u.T=h,s.p=b,s.d.f()}},$t.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(p,h))},$t.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},$t.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,y=f(b,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?s.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:_,fetchPriority:w}):b==="script"&&s.d.X(p,{crossOrigin:y,integrity:_,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},$t.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);s.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(p)},$t.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,y=f(b,h.crossOrigin);s.d.L(p,b,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},$t.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=f(h.as,h.crossOrigin);s.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(p)},$t.requestFormReset=function(p){s.d.r(p)},$t.unstable_batchedUpdates=function(p,h){return p(h)},$t.useFormState=function(p,h,b){return u.H.useFormState(p,h,b)},$t.useFormStatus=function(){return u.H.useHostTransitionStatus()},$t.version="19.2.6",$t}var By;function kv(){if(By)return vf.exports;By=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),vf.exports=v$(),vf.exports}var Uy;function _$(){if(Uy)return Uo;Uy=1;var e=x$(),n=Gm(),r=kv();function s(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function u(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function p(t){if(c(t)!==t)throw Error(s(188))}function h(t){var a=t.alternate;if(!a){if(a=c(t),a===null)throw Error(s(188));return a!==t?null:t}for(var o=t,i=a;;){var d=o.return;if(d===null)break;var m=d.alternate;if(m===null){if(i=d.return,i!==null){o=i;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===o)return p(d),t;if(m===i)return p(d),a;m=m.sibling}throw Error(s(188))}if(o.return!==i.return)o=d,i=m;else{for(var x=!1,C=d.child;C;){if(C===o){x=!0,o=d,i=m;break}if(C===i){x=!0,i=d,o=m;break}C=C.sibling}if(!x){for(C=m.child;C;){if(C===o){x=!0,o=m,i=d;break}if(C===i){x=!0,i=m,o=d;break}C=C.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==i)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:a}function b(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=b(t),a!==null)return a;t=t.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),pe=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function se(t){return t===null||typeof t!="object"?null:(t=fe&&t[fe]||t["@@iterator"],typeof t=="function"?t:null)}var ye=Symbol.for("react.client.reference");function ae(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ye?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case $:return"Fragment";case N:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case F:return"SuspenseList";case re:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case j:return t.displayName||"Context";case k:return(t._context.displayName||"Context")+".Consumer";case z:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case U:return a=t.displayName||null,a!==null?a:ae(t.type)||"Memo";case H:a=t._payload,t=t._init;try{return ae(t(a))}catch{}}return null}var le=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},de=[],ee=-1;function T(t){return{current:t}}function R(t){0>ee||(t.current=de[ee],de[ee]=null,ee--)}function q(t,a){ee++,de[ee]=t.current,t.current=a}var Q=T(null),K=T(null),ne=T(null),W=T(null);function he(t,a){switch(q(ne,a),q(K,t),q(Q,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?ey(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=ey(a),t=ty(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}R(Q),q(Q,t)}function oe(){R(Q),R(K),R(ne)}function Ee(t){t.memoizedState!==null&&q(W,t);var a=Q.current,o=ty(a,t.type);a!==o&&(q(K,t),q(Q,o))}function ze(t){K.current===t&&(R(Q),R(K)),W.current===t&&(R(W),Oo._currentValue=J)}var Ge,ft;function rt(t){if(Ge===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Ge=a&&a[1]||"",ft=-1<o.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+Ge+t+ft}var Ka=!1;function Za(t,a){if(!t||Ka)return"";Ka=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(a){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(P){var G=P}Reflect.construct(t,[],Z)}else{try{Z.call()}catch(P){G=P}t.call(Z.prototype)}}else{try{throw Error()}catch(P){G=P}(Z=t())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(P){if(P&&G&&typeof P.stack=="string")return[P.stack,G.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=i.DetermineComponentFrameRoot(),x=m[0],C=m[1];if(x&&C){var A=x.split(`
@@ -203,4 +203,4 @@ XID_Start XIDS`.split(/\s/).map(e=>[Kc(e),e])),CO=new Map([["s",ht(383)],[ht(383
203
203
  ]`:`(?>\r
204
204
  ?|[
205
205
  \v\f…\u2028\u2029])`),n));else if(p==="posix")if(!l&&(b==="graph"||b==="print")){if(s==="strict")throw new Error(`POSIX class "${b}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[b];h&&(y=`\0-${ht(y.codePointAt(0)-1)}${ht(y.codePointAt(2)+1)}-􏿿`),r(at(ta(`[${y}]`),n))}else r(at(Xf(ta(kO.get(b)),h),n));else if(p==="property")$p.has(Kc(b))||(e.key="sc");else if(p==="space")r(za($s("space",{negate:h}),n));else if(p==="word")r(at(Xf(ta(ea),h),n));else throw new Error(`Unexpected character set kind "${p}"`)},Directive({node:e,parent:n,root:r,remove:s,replaceWith:l,removeAllPrevSiblings:c,removeAllNextSiblings:u}){const{kind:f,flags:p}=e;if(f==="flags")if(!p.enable&&!p.disable)s();else{const h=bn({flags:p});h.body[0].body=u(),l(at(h,n),{traverse:!0})}else if(f==="keep"){const h=r.body[0],y=r.body.length===1&&pS(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:r;if(n.parent!==y||y.body.length>1)throw new Error(_e`Uses "\K" in a way that's unsupported`);const _=vr({behind:!0});_.body[0].body=c(),l(at(_,n))}else throw new Error(`Unexpected directive kind "${f}"`)},Flags({node:e,parent:n}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:n,disable:r}=e.flags;n?.extended&&delete n.extended,r?.extended&&delete r.extended,n?.dotAll&&r?.dotAll&&delete n.dotAll,n?.ignoreCase&&r?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},n){const{kind:r}=e;r==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:e,parent:n,replaceWith:r}){const{kind:s}=e;if(s==="fail")r(at(vr({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${s.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const n=bn();n.body[0].body.push(e.body),e.body=at(n,e)}},Regex:{enter({node:e},{supportedGNodes:n}){const r=[];let s=!1,l=!1;for(const c of e.body)if(c.body.length===1&&c.body[0].kind==="search_start")c.body.pop();else{const u=jS(c.body);u?(s=!0,Array.isArray(u)?r.push(...u):r.push(u)):l=!0}s&&!l&&r.forEach(c=>n.add(c))},exit(e,{accuracy:n,passedLookbehind:r,strategy:s}){if(n==="strict"&&r&&s)throw new Error(_e`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:n}){let{ref:r}=e;typeof r=="string"&&!Yf(r)&&(r=Ff(r,n),e.ref=r)}},TO={Backreference({node:e},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:r}){const{orphan:s,ref:l}=e;s||r.set(e,[...n.get(l).map(({node:c})=>c)])},CapturingGroup:{enter({node:e,parent:n,replaceWith:r,skip:s},{groupOriginByCopy:l,groupsByName:c,multiplexCapturesToLeftByRef:u,openRefs:f,reffedNodesByReferencer:p}){const h=l.get(e);if(h&&f.has(e.number)){const y=za(mv(e.number),n);p.set(y,f.get(e.number)),r(y);return}f.set(e.number,e),u.set(e.number,[]),e.name&&rl(u,e.name,[]);const b=u.get(e.name??e.number);for(let y=0;y<b.length;y++){const _=b[y];if(h===_.node||h&&h===_.origin||e===_.origin){b.splice(y,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const y=rl(c,e.name,new Map);let _=!1;if(h)_=!0;else for(const w of y.values())if(!w.hasDuplicateNameToRemove){_=!0;break}c.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:n}){n.get(e.number)===e&&n.delete(e.number)}},Group:{enter({node:e},n){n.prevFlags=n.currentFlags,e.flags&&(n.currentFlags=xc(n.currentFlags,e.flags))},exit(e,n){n.currentFlags=n.prevFlags}},Subroutine({node:e,parent:n,replaceWith:r},s){const{isRecursive:l,ref:c}=e;if(l){let b=n;for(;(b=b.parent)&&!(b.type==="CapturingGroup"&&(b.name===c||b.number===c)););s.reffedNodesByReferencer.set(e,b);return}const u=s.subroutineRefMap.get(c),f=c===0,p=f?mv(0):kS(u,s.groupOriginByCopy,null);let h=p;if(!f){const b=NS(DO(u,_=>_.type==="Group"&&!!_.flags)),y=b?xc(s.globalFlags,b):s.globalFlags;MO(y,s.currentFlags)||(h=bn({flags:zO(y)}),h.body[0].body.push(p))}r(at(h,n),{traverse:!f})}},RO={Backreference({node:e,parent:n,replaceWith:r},s){if(e.orphan){s.highestOrphanBackref=Math.max(s.highestOrphanBackref,e.ref);return}const c=s.reffedNodesByReferencer.get(e).filter(u=>OO(u,e));if(!c.length)r(at(vr({negate:!0}),n));else if(c.length>1){const u=bn({atomic:!0,body:c.reverse().map(f=>Ar({body:[Rm(f.number)]}))});r(at(u,n))}else e.ref=c[0].number},CapturingGroup({node:e},n){e.number=++n.numCapturesToLeft,e.name&&n.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},n){const r=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let s=0;s<r;s++){const l=gS();e.body.at(-1).body.push(l)}}},Subroutine({node:e},n){!e.isRecursive||e.ref===0||(e.ref=n.reffedNodesByReferencer.get(e).number)}};function ES(e){Ko(e,{"*"({node:n,parent:r}){n.parent=r}})}function MO(e,n){return e.dotAll===n.dotAll&&e.ignoreCase===n.ignoreCase}function OO(e,n){let r=n;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const s=AS(r.parent);for(const l of s){if(l===r)break;if(l===e||TS(l,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function kS(e,n,r,s){const l=Array.isArray(e)?[]:{};for(const[c,u]of Object.entries(e))c==="parent"?l.parent=Array.isArray(r)?s:r:u&&typeof u=="object"?l[c]=kS(u,n,l,r):(c==="type"&&u==="CapturingGroup"&&n.set(l,n.get(e)??e),l[c]=u);return l}function mv(e){const n=yS(e);return n.isRecursive=!0,n}function DO(e,n){const r=[];for(;e=e.parent;)(!n||n(e))&&r.push(e);return r}function Ff(e,n){if(n.has(e))return n.get(e);const r=`$${n.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(e,r),r}function NS(e){const n=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:s})=>{n.forEach(l=>{s.enable?.[l]&&(delete r.disable[l],r.enable[l]=!0),s.disable?.[l]&&(r.disable[l]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function zO({dotAll:e,ignoreCase:n}){const r={};return(e||n)&&(r.enable={},e&&(r.enable.dotAll=!0),n&&(r.enable.ignoreCase=!0)),(!e||!n)&&(r.disable={},!e&&(r.disable.dotAll=!0),!n&&(r.disable.ignoreCase=!0)),r}function AS(e){if(!e)throw new Error("Node expected");const{body:n}=e;return Array.isArray(n)?n:n?[n]:null}function jS(e){const n=e.find(r=>r.kind==="search_start"||UO(r,{negate:!1})||!LO(r));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const r=[];for(const s of n.body){const l=jS(s.body);if(!l)return null;Array.isArray(l)?r.push(...l):r.push(l)}return r}return null}function TS(e,n){const r=AS(e)??[];for(const s of r)if(s===n||TS(s,n))return!0;return!1}function LO({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function BO(e){const n=["Character","CharacterClass","CharacterSet"];return n.includes(e.type)||e.type==="Quantifier"&&e.min&&n.includes(e.body.type)}function UO(e,n){const r={negate:null,...n};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&pS(e.body[0],{type:"Assertion",kind:"search_start"})}function Yf(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ta(e,n){const s=hS(e,{...n,unicodePropertyMap:$p}).body;return s.length>1||s[0].body.length>1?bn({body:s}):s[0].body[0]}function Xf(e,n){return e.negate=n,e}function za(e,n){return e.parent=n,e}function at(e,n){return ES(e),e.parent=n,e}function GO(e,n){const r=SS(n),s=Dm(r.target,"ES2024"),l=Dm(r.target,"ES2025"),c=r.rules.recursionLimit;if(!Number.isInteger(c)||c<2||c>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,f=null;if(!l){const w=[e.flags.ignoreCase];Ko(e,IO,{getCurrentModI:()=>w.at(-1),popModI(){w.pop()},pushModI(S){w.push(S)},setHasCasedChar(){w.at(-1)?u=!0:f=!0}})}const p={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!f)};let h=e;const b={accuracy:r.accuracy,appliedGlobalFlags:p,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:c,useAppliedIgnoreCase:!!(!l&&u&&f),useFlagMods:l,useFlagV:s,verbose:r.verbose};function y(w){return b.lastNode=h,h=w,vO(HO[w.type],`Unexpected node type "${w.type}"`)(w,b,y)}const _={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return s||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],b.captureMap.forEach((w,S)=>{w.hidden&&_._hiddenCaptures.push(S),w.transferTo&&rl(_._captureTransfers,w.transferTo,[]).push(S)}),_}var IO={"*":{enter({node:e},n){if(hv(e)){const r=n.getCurrentModI();n.pushModI(e.flags?xc({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},n){hv(e)&&n.popModI()}},Backreference(e,n){n.setHasCasedChar()},Character({node:e},n){Ep(ht(e.value))&&n.setHasCasedChar()},CharacterClassRange({node:e,skip:n},r){n(),RS(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},n){e.kind==="property"&&$S.has(e.value)&&n.setHasCasedChar()}},HO={Alternative({body:e},n,r){return e.map(r).join("")},Assertion({kind:e,negate:n}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return n?_e`\B`:_e`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},n){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,n,r){const{body:s,name:l,number:c}=e,u={ignoreCase:n.currentFlags.ignoreCase},f=n.originMap.get(e);return f&&(u.hidden=!0,c>f.number&&(u.transferTo=f.number)),n.captureMap.set(c,u),`(${l?`?<${l}>`:""}${s.map(r).join("|")})`},Character({value:e},n){const r=ht(e),s=Ss(e,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(s!==r)return s;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&Ep(r)){const l=CS(r);return n.inCharClass?l.join(""):l.length>1?`[${l.join("")}]`:l[0]}return r},CharacterClass(e,n,r){const{kind:s,negate:l,parent:c}=e;let{body:u}=e;if(s==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");yn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&u.some(gv)&&(u=[Xc(45),...u.filter(h=>!gv(h))]);const f=()=>`[${l?"^":""}${u.map(r).join(s==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||yn.bugNestedClassIgnoresNegation)&&!l){const b=u.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(b.length){const y=bn(),_=y.body[0];return y.parent=c,_.parent=y,u=u.filter(w=>!b.includes(w)),e.body=u,u.length?(e.parent=_,_.body.push(e)):y.body.pop(),b.forEach(w=>{const S=Ar({body:[w]});w.parent=S,S.parent=y,y.body.push(S)}),r(y)}}n.inCharClass=!0;const h=f();return n.inCharClass=!1,h}const p=u[0];if(s==="union"&&!l&&p&&((!n.useFlagV||!n.verbose)&&c.kind==="union"&&!(yn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&c.kind==="intersection"&&u.length===1&&p.type!=="CharacterClassRange"))return u.map(r).join("");if(!n.useFlagV&&c.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return f()},CharacterClassRange(e,n){const r=e.min.value,s=e.max.value,l={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},c=Ss(r,l),u=Ss(s,l),f=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const p=RS(e);YO(p).forEach(b=>{f.add(Array.isArray(b)?`${Ss(b[0],l)}-${Ss(b[1],l)}`:Ss(b,l))})}return`${c}-${u}${[...f].join("")}`},CharacterSet({kind:e,negate:n,value:r,key:s},l){if(e==="dot")return l.currentFlags.dotAll?l.appliedGlobalFlags.dotAll||l.useFlagMods?".":"[^]":_e`[^\n]`;if(e==="digit")return n?_e`\D`:_e`\d`;if(e==="property"){if(l.useAppliedIgnoreCase&&l.currentFlags.ignoreCase&&$S.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${n?_e`\P`:_e`\p`}{${s?`${s}=`:""}${r}}`}if(e==="word")return n?_e`\W`:_e`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:n,flags:r,parent:s},l,c){const u=l.currentFlags;r&&(l.currentFlags=xc(u,r));const f=n.map(c).join("|"),p=!l.verbose&&n.length===1&&s.type!=="Quantifier"&&!e&&(!l.useFlagMods||!r)?f:`(?${XO(e,r,l.useFlagMods)}${f})`;return l.currentFlags=u,p},LookaroundAssertion({body:e,kind:n,negate:r},s,l){return`(?${`${n==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(l).join("|")})`},Quantifier(e,n,r){return r(e.body)+KO(e)},Subroutine({isRecursive:e,ref:n},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const s=r.recursionLimit;return n===0?`(?R=${s})`:_e`\g<${n}&R=${s}>`}},PO=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),qO=new Set(["-","\\","]","^","["]),VO=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),pv=new Map([[9,_e`\t`],[10,_e`\n`],[11,_e`\v`],[12,_e`\f`],[13,_e`\r`],[8232,_e`\u2028`],[8233,_e`\u2029`],[65279,_e`\uFEFF`]]),FO=new RegExp("^\\p{Cased}$","u");function Ep(e){return FO.test(e)}function RS(e,n){const r=!!n?.firstOnly,s=e.min.value,l=e.max.value,c=[];if(s<65&&(l===65535||l>=131071)||s===65536&&l>=131071)return c;for(let u=s;u<=l;u++){const f=ht(u);if(!Ep(f))continue;const p=CS(f).filter(h=>{const b=h.codePointAt(0);return b<s||b>l});if(p.length&&(c.push(...p),r))break}return c}function Ss(e,{escDigit:n,inCharClass:r,useFlagV:s}){if(pv.has(e))return pv.get(e);if(e<32||e>126&&e<160||e>262143||n&&ZO(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const l=r?s?VO:qO:PO,c=ht(e);return(l.has(c)?"\\":"")+c}function YO(e){const n=e.map(l=>l.codePointAt(0)).sort((l,c)=>l-c),r=[];let s=null;for(let l=0;l<n.length;l++)n[l+1]===n[l]+1?s??=n[l]:s===null?r.push(n[l]):(r.push([s,n[l]]),s=null);return r}function XO(e,n,r){if(e)return">";let s="";if(n&&r){const{enable:l,disable:c}=n;s=(l?.ignoreCase?"i":"")+(l?.dotAll?"s":"")+(c?"-":"")+(c?.ignoreCase?"i":"")+(c?.dotAll?"s":"")}return`${s}:`}function KO({kind:e,max:n,min:r}){let s;return!r&&n===1?s="?":!r&&n===1/0?s="*":r===1&&n===1/0?s="+":r===n?s=`{${r}}`:s=`{${r},${n===1/0?"":n}}`,s+{greedy:"",lazy:"?",possessive:"+"}[e]}function hv({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function ZO(e){return e>47&&e<58}function gv({type:e,value:n}){return e==="Character"&&n===45}var QO=class zm extends RegExp{#t=new Map;#e=null;#a;#n=null;#r=null;rawOptions={};get source(){return this.#a||"(?:)"}constructor(n,r,s){const l=!!s?.lazyCompile;if(n instanceof RegExp){if(s)throw new Error("Cannot provide options when copying a regexp");const c=n;super(c,r),this.#a=c.source,c instanceof zm&&(this.#t=c.#t,this.#n=c.#n,this.#r=c.#r,this.rawOptions=c.rawOptions)}else{const c={hiddenCaptures:[],strategy:null,transfers:[],...s};super(l?"":n,r),this.#a=n,this.#t=JO(c.hiddenCaptures,c.transfers),this.#r=c.strategy,this.rawOptions=s??{}}l||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:l,...c}=this.rawOptions;this.#e=new zm(this.#a,this.flags,c)}const r=this.global||this.sticky,s=this.lastIndex;if(this.#r==="clip_search"&&r&&s){this.lastIndex=0;const l=this.#s(n.slice(s));return l&&(WO(l,s,n,this.hasIndices),this.lastIndex+=s),l}return this.#s(n)}#s(n){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const s=[...r];r.length=1;let l;this.hasIndices&&(l=[...r.indices],r.indices.length=1);const c=[0];for(let u=1;u<s.length;u++){const{hidden:f,transferTo:p}=this.#t.get(u)??{};if(f?c.push(null):(c.push(r.length),r.push(s[u]),this.hasIndices&&r.indices.push(l[u])),p&&s[u]!==void 0){const h=c[p];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=s[u],this.hasIndices&&(r.indices[h]=l[u]),r.groups){this.#n||(this.#n=e3(this.source));const b=this.#n.get(p);b&&(r.groups[b]=s[u],this.hasIndices&&(r.indices.groups[b]=l[u]))}}}return r}};function WO(e,n,r,s){if(e.index+=n,e.input=r,s){const l=e.indices;for(let u=0;u<l.length;u++){const f=l[u];f&&(l[u]=[f[0]+n,f[1]+n])}const c=l.groups;c&&Object.keys(c).forEach(u=>{const f=c[u];f&&(c[u]=[f[0]+n,f[1]+n])})}}function JO(e,n){const r=new Map;for(const s of e)r.set(s,{hidden:!0});for(const[s,l]of n)for(const c of l)rl(r,c,{}).transferTo=s;return r}function e3(e){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let s=0,l=0,c;for(;c=n.exec(e);){const{0:u,groups:{capture:f,name:p}}=c;u==="["?s++:s?u==="]"&&s--:f&&(l++,p&&r.set(l,p))}return r}function t3(e,n){const r=n3(e,n);return r.options?new QO(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function n3(e,n){const r=SS(n),s=hS(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:$p}),l=AO(s,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),c=GO(l,r),u=yO(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),f=gO(u.pattern),p=hO(f.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:p.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const b=p.hiddenCaptures.sort((S,$)=>S-$),y=Array.from(p.captureTransfers),_=l._strategy,w=h.pattern.length>=r.lazyCompileLength;(b.length||y.length||_||w)&&(h.options={...b.length&&{hiddenCaptures:b},...y.length&&{transfers:y},..._&&{strategy:_},...w&&{lazyCompile:w}})}return h}function a3(e,n){return t3(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function r3(e={}){const n=Object.assign({target:"auto",cache:new Map},e);return n.regexConstructor||=r=>a3(r,{target:n.target}),{createScanner(r){return new xM(r,n)},createString(r){return{content:r}}}}const s3="github-dark",o3="tsx";let Kf=null;function l3(){return Kf==null&&(Kf=yM({themes:[jj],langs:[Aj],engine:r3()})),Kf}function i3(e){if(e?.aborted)throw new DOMException("Aborted","AbortError")}async function c3(e,n){const r=await l3();return i3(n),r.codeToHtml(e,{lang:o3,theme:s3})}const bv="playground-usage-shiki mt-4 overflow-x-auto rounded-lg border bg-gray-900 p-4 text-sm leading-relaxed shadow-xs [&_.shiki]:!bg-transparent [&_pre.shiki]:!m-0 [&_pre.shiki]:!bg-transparent [&_pre.shiki]:!p-0",u3="m-0 whitespace-pre font-mono text-sm leading-relaxed text-gray-100";function d3({source:e}){const[n,r]=v.useState(null),s=v.useRef(0);return v.useEffect(()=>{const l=++s.current,c=new AbortController;return r(null),(async()=>{try{const u=await c3(e,c.signal);if(l!==s.current)return;r(u)}catch(u){if(u.name==="AbortError"||l!==s.current)return;r(null)}})(),()=>c.abort()},[e]),n?g.jsx("div",{className:bv,dangerouslySetInnerHTML:{__html:n}}):g.jsx("pre",{className:bv,children:g.jsx("code",{className:u3,children:e})})}function f3({entry:e,values:n}){const r=e.usageSnippet?.(n)??`// Pass usageSnippet on this PlaygroundEntry, or derive snippets from dslint controls.
206
- <${e.id} />`;return g.jsx(Zt,{id:"usage",title:"Usage",description:"Example usage for the current playground values.",children:g.jsx(d3,{source:r})})}function m3({findings:e,reportReady:n}){return g.jsx(g.Fragment,{children:n&&e.length>0?g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:e.map((r,s)=>g.jsxs(dt,{children:[g.jsx(Me,{className:"font-mono text-xs text-muted-foreground",children:r.rule_id}),g.jsx(Me,{className:"font-mono text-xs text-muted-foreground",children:r.line??"—"}),g.jsx(Me,{children:g.jsx(Os,{variant:"secondary",size:"sm",children:r.severity})}),g.jsx(Me,{children:r.message})]},`${r.rule_id}-${r.line??"x"}-${s}`))})]}):n&&e.length===0?g.jsx(Cr,{children:"No hardcoded or arbitrary token color findings on this file in the current report."}):g.jsxs(Cr,{children:["Token findings update when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function p3({codeScore:e,reportReady:n}){const{findings:r}=e,s=n&&r.length>0;return g.jsx(g.Fragment,{children:s?g.jsx(g.Fragment,{children:g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:r.map((l,c)=>g.jsxs(dt,{children:[g.jsx(Me,{children:l.rule_id}),g.jsx(Me,{children:l.line??"—"}),g.jsx(Me,{children:l.severity}),g.jsx(Me,{children:l.message})]},`${l.rule_id}-${l.line??"x"}-${c}`))})]})}):n&&r.length===0?g.jsx(Cr,{children:"No quality findings on this file in the current report."}):g.jsxs(Cr,{children:["Code score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function h3({a11y:e,reportReady:n}){const r=n&&e.findings.length>0;return g.jsx(g.Fragment,{children:r?g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:e.findings.map((s,l)=>g.jsxs(dt,{children:[g.jsx(Me,{children:s.rule_id}),g.jsx(Me,{children:s.line??"—"}),g.jsx(Me,{children:s.severity}),g.jsx(Me,{children:s.message})]},`${s.rule_id}-${s.line??"x"}-${l}`))})]}):n&&e.issueCount===0?g.jsx(Cr,{children:"No accessibility findings on this file in the current report."}):g.jsxs(Cr,{children:["A11y score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function yv(e,n=6){if(!e||Object.keys(e).length===0)return"—";const r=Object.entries(e).sort((c,u)=>u[1]-c[1]),s=r.slice(0,n),l=Math.max(0,r.length-n);return s.map(([c,u])=>`${JSON.stringify(c)} ×${u}`).join(" · ")+(l>0?` · +${l}`:"")}function g3({controls:e,values:n,onChange:r,onReset:s,reportUsage:l,declaredPropsFromScan:c=[],governanceReportLoaded:u=!1}){if(e.length===0)return null;const f=v.useCallback((S,$)=>{r({...n,[S]:$})},[r,n]),p=_j(e),h=l!=null,b=l?.prop_frequencies??{},y=l?.prop_value_frequencies??{},_=new Set(p.map(S=>S.prop)),w=h?Object.keys(b).filter(S=>!_.has(S)).sort((S,$)=>S.localeCompare($)):[];return g.jsxs(Zt,{id:"api-reference",title:"API reference",description:"",actions:g.jsx(_c,{type:"button",variant:"outline",size:"sm",onClick:s,children:"Reset defaults"}),children:[g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Prop"}),g.jsx(Re,{children:"Type"}),g.jsx(Re,{children:"Value"}),h?g.jsxs(g.Fragment,{children:[g.jsx(Re,{children:"Usage"}),g.jsx(Re,{children:"Values"})]}):null]})}),g.jsx(Mn,{children:e.map(S=>{const $=p.find(k=>k.prop===S.key);if(!$)return null;const E=h?b[$.prop]??0:0,N=yv(y[$.prop]);return g.jsxs(dt,{children:[g.jsx(Me,{className:"font-medium",children:$.prop}),g.jsx(Me,{children:S.type==="select"?g.jsx("div",{className:"flex flex-wrap items-center gap-1",children:S.options.map(k=>{const z=String(n[S.key]??S.default??"")===k.value;return g.jsx(Os,{variant:"outline",size:"sm",asChild:!0,className:xe(z&&"border-transparent bg-primary text-primary-foreground hover:bg-primary/90"),children:g.jsx("button",{type:"button",className:"cursor-pointer",onClick:()=>f(S.key,k.value),"aria-pressed":z,"aria-label":`Set ${S.label} to ${k.label}`,children:k.value})},k.value)})}):g.jsxs("span",{className:"font-mono text-xs flex items-center gap-1",children:[$.type,$.default!=="—"?g.jsx(Os,{variant:"secondary",size:"sm",children:$.default}):null]})}),g.jsx(Me,{children:g.jsx(kj,{control:S,values:n,patch:f,idPrefix:"api",layout:"table"})}),h?g.jsxs(g.Fragment,{children:[g.jsx(Me,{children:E}),g.jsx(Me,{children:N})]}):null]},$.prop)})})]}),h&&w.length>0?g.jsxs("div",{className:"mt-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Also seen in repo (not in playground)"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"These prop names appear in scanned JSX but are not wired as playground controls on this page."}),g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Prop"}),g.jsx(Re,{children:"Repo call sites"}),g.jsx(Re,{children:"Repo literals"})]})}),g.jsx(Mn,{children:w.map(S=>g.jsxs(dt,{children:[g.jsx(Me,{children:S}),g.jsxs(Me,{children:["×",b[S]??0]}),g.jsx(Me,{children:yv(y[S])})]},S))})]})]}):null]})}const Lm=200;function b3(e){const n=[];for(const r of e)r.type==="boolean"?n.push({key:r.key,values:[!1,!0]}):r.type==="select"&&r.options.length>0&&n.push({key:r.key,values:r.options.map(s=>s.value)});return n}function y3(e,n){const r=b3(e);if(r.length===0)return{combinations:[],totalCount:0,capped:!1,finiteAxisKeys:[]};let s=1;for(const p of r)s*=p.values.length;const l=r.map(p=>p.key),c=[],u=s>Lm,f=(p,h)=>{if(c.length>=Lm)return;if(p>=r.length){c.push({...h});return}const b=r[p];for(const y of b.values)f(p+1,{...h,[b.key]:y})};return f(0,{...n}),{combinations:c,totalCount:s,capped:u,finiteAxisKeys:l}}function xv(e){return typeof e=="string"?e:JSON.stringify(e)}function x3({Preview:e,combinations:n,finiteAxisKeys:r,totalCount:s,capped:l}){return n.length===0?null:g.jsxs(g.Fragment,{children:[l?g.jsxs("p",{className:"rounded-md border border-border bg-muted/60 px-3 py-2 text-sm text-muted-foreground",children:["Showing ",n.length," of ",s," combinations (limit"," ",Lm,"). Reduce select options or split controls to preview more here."]}):null,g.jsx("div",{className:"mt-4 flex flex-col gap-4",children:n.map(c=>g.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xs",children:[g.jsx("div",{className:"flex flex-wrap gap-1 border-b p-2",children:r.map(u=>{const f=c[u];return g.jsxs(Os,{variant:"outline",size:"sm",className:"font-mono text-xs",children:[u,"=",f===void 0?"?":xv(f)]},u)})}),g.jsx("div",{className:"min-w-0 bg-card p-3",children:g.jsx(e,{values:c})})]},r.map(u=>`${u}:${xv(c[u]??"")}`).join("|")))})]})}const v3=280,_3=1024;function Yo(e,n){if(!Number.isFinite(n)||n<=0)return e;const r=Math.min(v3,n);return Math.min(Math.max(e,r),n)}function w3(e,n,r){return n<=0?Yo(r,r):r<n?Yo(e,r):Math.abs(e-n)<=2?Yo(r,r):Yo(e,r)}function yr({href:e,children:n}){const r=s=>{if(s.defaultPrevented||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)return;const l=e.startsWith("#")?e.slice(1):e,c=l?document.getElementById(l):null;c&&(s.preventDefault(),c.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${l}`))};return g.jsx("a",{href:e,onClick:r,className:"block rounded-md py-1 text-muted-foreground transition hover:bg-accent hover:text-accent-foreground",children:n})}function S3({entry:e,formatModulePath:n,workspaceReport:r,reportReady:s}){const{Preview:l}=e,c=n?n(e.modulePath):e.modulePath.replace(/^\.\.\//,""),[u,f]=v.useState(()=>_f(e.controls));v.useEffect(()=>{f(_f(e.controls))},[e.id]);const p=v.useMemo(()=>mj(s?r:null,e.modulePath),[r,e.modulePath,s]),h=v.useMemo(()=>bj(s?r:null,e.modulePath),[r,e.modulePath,s]),b=v.useMemo(()=>hj(s?r:null,e.modulePath),[r,e.modulePath,s]),y=v.useMemo(()=>{if(!(!s||!r))return Cc(r).get(e.id)},[r,e.id,s]),_=v.useMemo(()=>!s||!r?[]:Sc(r).get(e.id)??[],[r,e.id,s]),w=v.useRef(null),S=v.useRef(null),$=v.useRef(0),[E,N]=v.useState(0),[k,j]=v.useState(_3),[z,I]=v.useState(null),[F,U]=v.useState(null),H=v.useCallback(ae=>{if(!Number.isFinite(ae)||ae<=0)return;const le=$.current;$.current=ae,N(ae),j(O=>w3(O,le,ae))},[]);v.useLayoutEffect(()=>{const ae=w.current;if(!ae)return;const le=new ResizeObserver(()=>{H(ae.clientWidth)});return le.observe(ae),H(ae.clientWidth),()=>le.disconnect()},[H]);const re=v.useCallback(()=>{I(tk());const ae=S.current;U(ae?nk(ae):null)},[]);v.useLayoutEffect(()=>{const ae=S.current;if(!ae)return;const le=new ResizeObserver(()=>{re()});return le.observe(ae),re(),()=>le.disconnect()},[re]),v.useEffect(()=>(re(),window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)),[re]);const pe=v.useCallback(ae=>le=>{if(le.button!==0)return;le.preventDefault();const O=le.currentTarget;O.setPointerCapture(le.pointerId);let Y=le.clientX;const J=ae==="right"?1:-1,de=T=>{const R=T.clientX-Y;Y=T.clientX,j(q=>Yo(q+J*2*R,$.current))},ee=T=>{O.releasePointerCapture(T.pointerId),window.removeEventListener("pointermove",de),window.removeEventListener("pointerup",ee),window.removeEventListener("pointercancel",ee)};window.addEventListener("pointermove",de),window.addEventListener("pointerup",ee),window.addEventListener("pointercancel",ee)},[]),fe=e.controls.length>0,se=v.useMemo(()=>y3(e.controls,u),[e.controls,u]),ye=fe&&(se.combinations.length>0||se.combinations.length===0&&se.totalCount===0);return g.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[g.jsx("header",{id:"source",className:"scroll-mt-20 border-b border-border bg-card p-6",children:g.jsx("div",{className:"mx-auto",children:g.jsx("div",{className:"flex flex-wrap items-start justify-between gap-4",children:g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.meta.group?g.jsxs(g.Fragment,{children:["Components ",g.jsx("span",{className:"text-muted-foreground/40",children:"/"})," ",g.jsx("span",{className:"capitalize text-foreground/80",children:e.meta.group})]}):"Components"}),g.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:e.meta.title}),g.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",title:c,children:c})]})})})}),g.jsx("section",{id:"examples",className:"ds-playground-dot-surface border-b px-16 py-10",children:g.jsxs("div",{ref:w,children:[g.jsx("div",{className:"flex justify-center",children:g.jsxs("div",{ref:S,className:"relative min-w-0 shrink-0 select-none rounded-lg border border-border bg-muted/50 shadow-xs",style:{width:k},children:[g.jsx("button",{type:"button",className:"absolute left-0 top-0 bottom-0 z-10 flex w-4 -translate-x-1/2 cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Resize preview from center (drag left or right)",onPointerDown:pe("left"),children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})}),g.jsx("button",{type:"button",className:"absolute right-0 top-0 bottom-0 z-10 flex w-4 translate-x-1/2 cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Resize preview from center (drag left or right)",onPointerDown:pe("right"),children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})}),g.jsx("div",{className:"min-w-0 bg-card p-8",children:g.jsx(l,{values:u})})]})}),E>0?g.jsxs("div",{className:"mt-4 divide-x divide-border h-6 overflow-hidden items-center mx-auto flex w-fit border border-border bg-card text-center text-xs/none tabular-nums font-mono rounded-sm text-muted-foreground",children:[g.jsxs("span",{className:"p-2.5",children:[Math.round(k),"px"]}),g.jsxs("span",{className:" p-2.5",title:"usemods detectBreakpoint",children:["Screen: ",z??"—"]}),g.jsxs("span",{className:" p-2.5",title:"usemods detectContainerBreakpoint",children:["Container: ",F??"—"]})]}):null]})}),g.jsx("div",{className:"min-w-0 w-full px-6 py-10 lg:px-12",children:g.jsxs("div",{className:"xl:grid xl:grid-cols-[minmax(0,1fr)_12rem] xl:gap-14",children:[g.jsxs("div",{className:"min-w-0 space-y-14",children:[fe?g.jsx(g3,{controls:e.controls,values:u,onChange:f,onReset:()=>f(_f(e.controls)),reportUsage:y,declaredPropsFromScan:_,governanceReportLoaded:s&&r!=null}):null,g.jsx(f3,{entry:e,values:u}),g.jsx(Zt,{id:"repo-usage",title:"Repo usage",description:"",children:g.jsx(Wv,{report:s?r:null,componentId:e.id})}),g.jsx(Zt,{id:"design-tokens",title:"Design tokens and colors",description:"Hardcoded colors and non-token styling flagged by DSLinter for this module's source file.",children:g.jsx(m3,{findings:h,reportReady:s})}),g.jsx(Zt,{id:"code-score",title:`Code score: ${s?b.score:"—"}/100`,description:"Static quality rules and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(p3,{codeScore:b,reportReady:s})}),g.jsx(Zt,{id:"accessibility",title:`Accessibility: ${s?p.score:"—"}/100`,description:"Accessibility checks and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(h3,{a11y:p,reportReady:s})})]}),g.jsx("aside",{className:"mt-12 hidden self-start sticky top-8 xl:mt-0 xl:block",children:g.jsxs("nav",{"aria-label":"On this page",className:"space-y-0.5 border-l border-border pl-4 text-sm",children:[g.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"On this page"}),fe?g.jsx(yr,{href:"#api-reference",children:"API reference"}):null,g.jsx(yr,{href:"#usage",children:"Usage"}),g.jsx(yr,{href:"#repo-usage",children:"Repo usage"}),g.jsx(yr,{href:"#design-tokens",children:"Design tokens"}),g.jsx(yr,{href:"#code-score",children:"Code score"}),g.jsx(yr,{href:"#accessibility",children:"Accessibility"}),ye?g.jsx(yr,{href:"#variants",children:"Variants"}):null]})})]})}),se.combinations.length>0?g.jsx("section",{id:"variants",className:"ds-playground-dot-surface mt-8 w-full scroll-mt-20 border-t pt-10 pb-12",children:g.jsxs("div",{className:"min-w-0 w-full px-6 lg:px-12",children:[g.jsx("h2",{className:"w-fit bg-card text-xl font-semibold tracking-tight text-foreground",children:"All variants"}),g.jsx(x3,{Preview:l,combinations:se.combinations,finiteAxisKeys:se.finiteAxisKeys,totalCount:se.totalCount,capped:se.capped})]})}):null]})})}function kp({...e}){return g.jsx(C2,{"data-slot":"hover-card",...e})}function Np({...e}){return g.jsx($2,{"data-slot":"hover-card-trigger",...e})}function Ap({className:e,align:n="center",sideOffset:r=4,...s}){return g.jsx(E2,{"data-slot":"hover-card-portal",children:g.jsx(k2,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:xe("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})})}function C3(e){const n=new Set,r=Sc(e);for(const[s,l]of r){const c=Zv(e,s,l);for(const u of c)n.add(u)}return n}const MS="cursor-default text-xs underline decoration-dotted underline-offset-2 hover:text-foreground";function $3({component:e,declared:n,unusedProps:r,usedPropCount:s}){const l=$c(n);return g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsx("button",{type:"button",className:MS,children:g.jsxs("span",{className:"text-muted-foreground",children:[s,"/",l.length," ",Ji("prop",s)," used"]})})}),g.jsx(Ap,{align:"start",className:"w-56 p-3",children:g.jsx(Qv,{component:e,declared:n,unusedProps:r})})]})}function E3({root:e,fileCount:n,files:r}){const s=[...r].sort((l,c)=>l.localeCompare(c));return g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsxs("button",{type:"button",className:MS,children:[n," ",Ji("file",n)]})}),g.jsxs(Ap,{align:"start",className:"w-72 p-3",children:[g.jsxs("p",{className:"text-xs font-medium text-foreground",children:[n," ",Ji("file",n)]}),g.jsx("ul",{className:"mt-2 max-h-48 space-y-0.5 overflow-y-auto font-mono text-xs text-muted-foreground",children:s.map(l=>g.jsx("li",{className:"truncate",title:Ms(e,l),children:Ms(e,l)},l))})]})]})}function k3({report:e,onOpenComponent:n}){const r=wc(e),s=Cc(e),l=Kv(r,s),c=v.useMemo(()=>C3(e),[e]),u=v.useMemo(()=>Sc(e),[e]);return g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{scope:"col",children:"Component"}),g.jsx(Re,{scope:"col",children:"Prop Usage"}),g.jsx(Re,{scope:"col",children:"App Usage"})]})}),g.jsx(Mn,{children:l.map(f=>{const p=s.get(f),h=u.get(f)??[],b=$c(h),y=b.filter(_=>!c.has(`${f}/${_}`)).length;return g.jsxs(dt,{children:[g.jsx(Me,{children:n?g.jsx("button",{type:"button",onClick:()=>n(f),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:f}):f}),g.jsx(Me,{children:b.length>0?g.jsx($3,{component:f,declared:h,unusedProps:c,usedPropCount:y}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})}),g.jsx(Me,{children:p&&p.files.length>0?g.jsx(E3,{root:e.root,fileCount:p.file_count,files:p.files}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})})]},f)})})]})}function N3({scores:e}){const n=[{label:"System health",value:e.design_system_health},{label:"UX consistency",value:e.ux_consistency},{label:"Accessibility",value:e.accessibility},{label:"Maintainability",value:e.maintainability}];return g.jsx("section",{className:"grid grid-cols-2 gap-1 rounded-xl border border-border bg-muted/30 p-1 md:grid-cols-4",children:n.map(({label:r,value:s})=>g.jsxs("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-card-foreground shadow-xs",children:[g.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:r}),g.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:s})]},r))})}function A3({report:e,onOpenComponent:n}){return g.jsxs("div",{className:"space-y-10",children:[g.jsx(N3,{scores:e.scores}),e.duplicate_components.length>0?g.jsxs("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-xs text-amber-950",children:[g.jsx("span",{className:"font-semibold",children:"Duplicate component names: "}),e.duplicate_components.map(r=>r.name).join(", ")]}):null,e.ownership.length>0?g.jsx(Zt,{id:"ownership",title:"Ownership",description:"Prefix match from <span className='font-mono'>.dslint.json</span> — useful for adoption rollups.",children:g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Owner"}),g.jsx(Re,{children:"Files"}),g.jsx(Re,{children:"Definitions"})]})}),g.jsx(Mn,{children:e.ownership.map(r=>g.jsxs(dt,{children:[g.jsx(Me,{children:r.owner}),g.jsx(Me,{children:r.files}),g.jsx(Me,{children:r.definitions})]},r.owner))})]})}):null,g.jsx(Zt,{id:"components",title:"Components",description:"Definitions and JSX usage from the latest snapshot.",children:g.jsx(k3,{report:e,onOpenComponent:n})}),g.jsx(Zt,{id:"issues",title:"Issues",description:"Findings from the workspace DSLinter report scoped to this file.",children:g.jsx(gw,{findings:e.findings,root:e.root})})]})}function j3({landing:e,reportUrl:n="/dslint-report.json",dslinterReportHint:r="npm run dslint:report",dslinterReport:s,onOpenComponent:l}){const{report:c,error:u,loading:f}=s,p=c?Vm(c).length:0;return u?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"Governance"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:u}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:r})]})]})]}):f||!c?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[e,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading inventory…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["Governance",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",p," components"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Scores, component catalog, token wall, and findings from the latest DSLinter snapshot"})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(A3,{report:c,onOpenComponent:l})})]})}function T3(){const[e,n]=v.useState("⌘K");return v.useEffect(()=>{const r=/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent);n(r?"⌘K":"Ctrl+K")},[]),g.jsx("kbd",{className:"pointer-events-none select-none rounded border border-sidebar-border bg-sidebar-accent px-1 py-px font-mono text-[10px] font-medium leading-tight text-sidebar-foreground/80 tabular-nums",children:e})}function Zf(e){return`w-full rounded-md px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function vv(e){return g.jsx("p",{className:"mb-1.5 mt-4 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50 first:mt-0",children:e})}function R3({report:e,reportLoading:n,reportError:r,route:s,onNavigate:l,onOpenCommandPalette:c,theme:u,onThemeChange:f}){const p=v.useMemo(()=>Vm(e),[e]),h=s.view==="tokens",b=s.view==="governance"&&s.catalog==null,y=_=>{_!=="light"&&_!=="dark"||f(_)};return g.jsxs("aside",{className:"fixed flex h-full w-[240px] shrink-0 flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground",children:[g.jsx("div",{className:"sticky top-0 z-10 shrink-0 border-b border-sidebar-border bg-sidebar px-6 py-4",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"flex items-center text-sidebar-foreground",children:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:g.jsxs("g",{fill:"currentColor",children:[g.jsx("path",{d:"m22.346,4.836l-3.182-3.182c-.779-.78-2.049-.78-2.828,0l-3.182,3.182c-.78.78-.78,2.048,0,2.828l3.182,3.182c.39.39.902.585,1.414.585s1.024-.195,1.414-.585l3.182-3.182c.78-.78.78-2.048,0-2.828Z",fill:"currentColor",strokeWidth:"0"}),g.jsx("rect",{x:"2",y:"2",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"13",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"2",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"})]})})}),g.jsxs("button",{type:"button",onClick:c,className:"flex shrink-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-sidebar-foreground/70 transition hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","aria-label":"Search components and views",children:[g.jsx(fp,{className:"size-4 shrink-0","aria-hidden":!0}),g.jsx(T3,{})]})]})}),g.jsxs("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[vv("Explore"),g.jsx("button",{type:"button",onClick:()=>l({view:"governance"}),className:Zf(b),children:"Governance"}),g.jsx("button",{type:"button",onClick:()=>l({view:"tokens"}),className:Zf(h),children:"Design tokens"}),vv(p.length>0?`Components (${p.length})`:"Components"),g.jsxs("div",{className:"space-y-0.5",children:[n&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Loading components…"}):null,r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Could not load report"}):null,!n&&!r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"No components in scan"}):null,p.map(_=>{const w=s.view==="component"&&s.componentId===_;return g.jsx("button",{type:"button",onClick:()=>l({view:"component",componentId:_}),className:Zf(w),children:_},_)})]})]}),g.jsxs("div",{className:"shrink-0 border-t border-sidebar-border px-3 py-3",children:[g.jsx("p",{className:"mb-2 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:"Appearance"}),g.jsxs(hw,{type:"single",variant:"outline",size:"sm",spacing:0,className:"w-full",value:u,onValueChange:y,"aria-label":"Color theme",children:[g.jsx(Ns,{value:"light",className:"flex-1","aria-label":"Light theme",title:"Light",children:g.jsx(xw,{className:"size-4","aria-hidden":!0})}),g.jsx(Ns,{value:"dark",className:"flex-1","aria-label":"Dark theme",title:"Dark",children:g.jsx(vw,{className:"size-4","aria-hidden":!0})})]})]})]})}function M3(e){const n=e.typography;return n?n.families.length>0||n.sizes.length>0||(n.weights?.length??0)>0:!1}function O3({catalog:e}){const n=e.typography,r=n?.weights??[];return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Colors"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"From Tailwind theme extensions."}),g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:e.colors.map(s=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:s.value,children:[g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:s.value})}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"truncate font-mono text-xs text-foreground",children:[s.token,"/",s.shade]}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s.value}),g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:s.tw})]})]},`${s.token}-${s.shade}`))})]}),M3(e)&&n?g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Typography"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Font stacks and Tailwind utilities — preview matches your theme tokens."})]}),n.families.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font families"}),g.jsx("ul",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:n.families.map(s=>g.jsxs("li",{className:"rounded-lg border border-border bg-card px-3 py-3",title:s.value,children:[g.jsx("p",{className:`${s.tw} text-sm text-foreground`,children:"The quick brown fox jumps over the lazy dog."}),g.jsx("p",{className:"mt-2 truncate font-mono text-xs text-foreground",children:s.tw}),g.jsx("p",{className:"mt-1 break-all text-xs leading-snug text-muted-foreground",children:s.value})]},s.key))})]}):null,n.families.length>0&&n.sizes.length>0?n.families.map(s=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Type scale · ",s.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(l=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:l.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:l.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate ${s.tw} ${l.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},`${s.key}-${l.token}`))})]},s.key)):n.sizes.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Type scale · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(s=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:s.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:s.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate font-sans ${s.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},s.token))})]}):null,n.families.length>0&&r.length>0?n.families.map(s=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Font weights · ",s.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(l=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:l.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:l.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 ${s.tw} ${l.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},`${s.key}-${l.token}`))})]},`w-${s.key}`)):r.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font weights · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(s=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:s.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:s.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 font-sans ${s.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},s.token))})]}):null]}):null,g.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Spacing"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.spacing.map(s=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:s.token}),g.jsx("span",{className:"text-muted-foreground",children:s.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:s.tw})]},s.token))})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Radius"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.radius.map(s=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:s.token}),g.jsx("span",{className:"text-muted-foreground",children:s.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:s.tw})]},s.token))})]})]})]})}const D3=[{id:"all",label:"All"},{id:"used",label:"Used"},{id:"unused",label:"Unused"}];function OS({title:e,subtitle:n,children:r}){return g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n}),r]})}function _v({row:e}){return e.isUnused?g.jsx("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"unused"}):g.jsxs("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary",children:[e.fileCount," ",e.fileCount===1?"file":"files"]})}function DS({row:e}){return e.referenceCount===0?g.jsx(_v,{row:e}):g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsx("button",{type:"button",className:"shrink-0",children:g.jsx(_v,{row:e})})}),g.jsxs(Ap,{className:"w-80 text-xs",align:"end",children:[g.jsxs("p",{className:"font-medium text-foreground",children:[e.referenceCount," reference",e.referenceCount===1?"":"s"]}),g.jsxs("ul",{className:"mt-2 max-h-40 space-y-1 overflow-y-auto text-muted-foreground",children:[e.usageFiles.slice(0,12).map(n=>g.jsx("li",{className:"truncate font-mono",children:Ms(n)},n)),e.usageFiles.length>12?g.jsxs("li",{className:"text-muted-foreground/80",children:["+",e.usageFiles.length-12," more"]}):null]})]})]})}function zS({row:e,className:n}){return g.jsxs("div",{className:xe("min-w-0",n),children:[g.jsx("p",{className:"truncate font-mono text-xs text-foreground",children:e.cssName}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.value}),e.tw?g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:e.tw}):null]})}function z3({rows:e}){const n=e.filter(r=>r.category==="color");return n.length===0?null:g.jsx(OS,{title:"Colors",subtitle:"CSS custom properties from @theme and :root.",children:g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:n.map(r=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:r.value,children:[r.displayValue&&/^(#|rgb|oklch|hsl)/.test(r.displayValue.trim())?g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:r.displayValue})}):g.jsx("div",{className:"h-9 w-9 shrink-0 rounded border border-border bg-muted"}),g.jsx(zS,{row:r,className:"flex-1"}),g.jsx(DS,{row:r})]},r.cssName))})})}function qi({title:e,subtitle:n,rows:r,category:s}){const l=r.filter(c=>c.category===s);return l.length===0?null:g.jsx(OS,{title:e,subtitle:n,children:g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:l.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2 text-xs",children:[g.jsx(zS,{row:c,className:"flex-1"}),g.jsx(DS,{row:c})]},c.cssName))})})}function L3({view:e}){const[n,r]=v.useState("all"),s=v.useMemo(()=>X$(e.rows,n),[e.rows,n]);return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-medium text-foreground",children:[e.usedCount,"/",e.totalCount," theme tokens used"]}),g.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Scanned from CSS sources",e.source==="hybrid"?" · enriched with manual catalog":""]})]}),g.jsx("div",{className:"flex gap-1 rounded-lg border border-border bg-muted/50 p-0.5",children:D3.map(l=>g.jsx("button",{type:"button",onClick:()=>r(l.id),className:xe("rounded-md px-3 py-1 text-xs font-medium transition-colors",n===l.id?"bg-card text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),children:l.label},l.id))})]}),g.jsx(z3,{rows:s}),g.jsx(qi,{title:"Spacing",subtitle:"--spacing-* custom properties.",rows:s,category:"spacing"}),g.jsx(qi,{title:"Radius",subtitle:"--radius-* custom properties.",rows:s,category:"radius"}),g.jsx(qi,{title:"Typography",subtitle:"--font-* custom properties.",rows:s,category:"typography"}),g.jsx(qi,{title:"Other",subtitle:"Additional CSS variables.",rows:s,category:"other"})]})}function B3({tokenCatalog:e,dslinterReport:n}){const r=v.useMemo(()=>Y$(n,e),[n,e]),s=r!=null&&r.rows.length>0,l=e!=null;return g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"System"}),g.jsx("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:"Design tokens"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:s?"CSS variables discovered from your stylesheets, with used vs unused usage across the repo.":"Supply a catalog object (same shape as your Tailwind theme docs) — keep it aligned with your design tokens."})]}),g.jsx("div",{className:"min-w-0 w-full px-8 py-8",children:g.jsx("div",{className:"rounded-ds-lg border border-border bg-card p-6 text-card-foreground shadow-xs",children:s&&r?g.jsx(L3,{view:r}):l?g.jsx(O3,{catalog:e}):g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Run ",g.jsx("span",{className:"font-mono",children:"dslinter --json"})," on a project with CSS token sources, or pass a"," ",g.jsx("span",{className:"font-mono",children:"tokenCatalog"})," prop."]})})})]})}var wv=1,U3=.9,G3=.8,I3=.17,Qf=.1,Wf=.999,H3=.9999,P3=.99,q3=/[\\\/_+.#"@\[\(\{&]/,V3=/[\\\/_+.#"@\[\(\{&]/g,F3=/[\s-]/,LS=/[\s-]/g;function Bm(e,n,r,s,l,c,u){if(c===n.length)return l===e.length?wv:P3;var f=`${l},${c}`;if(u[f]!==void 0)return u[f];for(var p=s.charAt(c),h=r.indexOf(p,l),b=0,y,_,w,S;h>=0;)y=Bm(e,n,r,s,h+1,c+1,u),y>b&&(h===l?y*=wv:q3.test(e.charAt(h-1))?(y*=G3,w=e.slice(l,h-1).match(V3),w&&l>0&&(y*=Math.pow(Wf,w.length))):F3.test(e.charAt(h-1))?(y*=U3,S=e.slice(l,h-1).match(LS),S&&l>0&&(y*=Math.pow(Wf,S.length))):(y*=I3,l>0&&(y*=Math.pow(Wf,h-l))),e.charAt(h)!==n.charAt(c)&&(y*=H3)),(y<Qf&&r.charAt(h-1)===s.charAt(c+1)||s.charAt(c+1)===s.charAt(c)&&r.charAt(h-1)!==s.charAt(c))&&(_=Bm(e,n,r,s,h+1,c+2,u),_*Qf>y&&(y=_*Qf)),y>b&&(b=y),h=r.indexOf(p,h+1);return u[f]=b,b}function Sv(e){return e.toLowerCase().replace(LS," ")}function Y3(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Bm(e,n,Sv(e),Sv(n),0,0,{})}var Ho='[cmdk-group=""]',Jf='[cmdk-group-items=""]',X3='[cmdk-group-heading=""]',BS='[cmdk-item=""]',Cv=`${BS}:not([aria-disabled="true"])`,Um="cmdk-item-select",Es="data-value",K3=(e,n,r)=>Y3(e,n,r),US=v.createContext(void 0),dl=()=>v.useContext(US),GS=v.createContext(void 0),jp=()=>v.useContext(GS),IS=v.createContext(void 0),HS=v.forwardRef((e,n)=>{let r=ks(()=>{var R,q;return{search:"",value:(q=(R=e.value)!=null?R:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=ks(()=>new Set),l=ks(()=>new Map),c=ks(()=>new Map),u=ks(()=>new Set),f=PS(e),{label:p,children:h,value:b,onValueChange:y,filter:_,shouldFilter:w,loop:S,disablePointerSelection:$=!1,vimBindings:E=!0,...N}=e,k=Qt(),j=Qt(),z=Qt(),I=v.useRef(null),F=oD();jr(()=>{if(b!==void 0){let R=b.trim();r.current.value=R,U.emit()}},[b]),jr(()=>{F(6,ye)},[]);let U=v.useMemo(()=>({subscribe:R=>(u.current.add(R),()=>u.current.delete(R)),snapshot:()=>r.current,setState:(R,q,Q)=>{var K,ne,W,he;if(!Object.is(r.current[R],q)){if(r.current[R]=q,R==="search")se(),pe(),F(1,fe);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let oe=document.getElementById(z);oe?oe.focus():(K=document.getElementById(k))==null||K.focus()}if(F(7,()=>{var oe;r.current.selectedItemId=(oe=ae())==null?void 0:oe.id,U.emit()}),Q||F(5,ye),((ne=f.current)==null?void 0:ne.value)!==void 0){let oe=q??"";(he=(W=f.current).onValueChange)==null||he.call(W,oe);return}}U.emit()}},emit:()=>{u.current.forEach(R=>R())}}),[]),H=v.useMemo(()=>({value:(R,q,Q)=>{var K;q!==((K=c.current.get(R))==null?void 0:K.value)&&(c.current.set(R,{value:q,keywords:Q}),r.current.filtered.items.set(R,re(q,Q)),F(2,()=>{pe(),U.emit()}))},item:(R,q)=>(s.current.add(R),q&&(l.current.has(q)?l.current.get(q).add(R):l.current.set(q,new Set([R]))),F(3,()=>{se(),pe(),r.current.value||fe(),U.emit()}),()=>{c.current.delete(R),s.current.delete(R),r.current.filtered.items.delete(R);let Q=ae();F(4,()=>{se(),Q?.getAttribute("id")===R&&fe(),U.emit()})}),group:R=>(l.current.has(R)||l.current.set(R,new Set),()=>{c.current.delete(R),l.current.delete(R)}),filter:()=>f.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:k,inputId:z,labelId:j,listInnerRef:I}),[]);function re(R,q){var Q,K;let ne=(K=(Q=f.current)==null?void 0:Q.filter)!=null?K:K3;return R?ne(R,r.current.search,q):0}function pe(){if(!r.current.search||f.current.shouldFilter===!1)return;let R=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(K=>{let ne=l.current.get(K),W=0;ne.forEach(he=>{let oe=R.get(he);W=Math.max(oe,W)}),q.push([K,W])});let Q=I.current;le().sort((K,ne)=>{var W,he;let oe=K.getAttribute("id"),Ee=ne.getAttribute("id");return((W=R.get(Ee))!=null?W:0)-((he=R.get(oe))!=null?he:0)}).forEach(K=>{let ne=K.closest(Jf);ne?ne.appendChild(K.parentElement===ne?K:K.closest(`${Jf} > *`)):Q.appendChild(K.parentElement===Q?K:K.closest(`${Jf} > *`))}),q.sort((K,ne)=>ne[1]-K[1]).forEach(K=>{var ne;let W=(ne=I.current)==null?void 0:ne.querySelector(`${Ho}[${Es}="${encodeURIComponent(K[0])}"]`);W?.parentElement.appendChild(W)})}function fe(){let R=le().find(Q=>Q.getAttribute("aria-disabled")!=="true"),q=R?.getAttribute(Es);U.setState("value",q||void 0)}function se(){var R,q,Q,K;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=s.current.size;return}r.current.filtered.groups=new Set;let ne=0;for(let W of s.current){let he=(q=(R=c.current.get(W))==null?void 0:R.value)!=null?q:"",oe=(K=(Q=c.current.get(W))==null?void 0:Q.keywords)!=null?K:[],Ee=re(he,oe);r.current.filtered.items.set(W,Ee),Ee>0&&ne++}for(let[W,he]of l.current)for(let oe of he)if(r.current.filtered.items.get(oe)>0){r.current.filtered.groups.add(W);break}r.current.filtered.count=ne}function ye(){var R,q,Q;let K=ae();K&&(((R=K.parentElement)==null?void 0:R.firstChild)===K&&((Q=(q=K.closest(Ho))==null?void 0:q.querySelector(X3))==null||Q.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function ae(){var R;return(R=I.current)==null?void 0:R.querySelector(`${BS}[aria-selected="true"]`)}function le(){var R;return Array.from(((R=I.current)==null?void 0:R.querySelectorAll(Cv))||[])}function O(R){let q=le()[R];q&&U.setState("value",q.getAttribute(Es))}function Y(R){var q;let Q=ae(),K=le(),ne=K.findIndex(he=>he===Q),W=K[ne+R];(q=f.current)!=null&&q.loop&&(W=ne+R<0?K[K.length-1]:ne+R===K.length?K[0]:K[ne+R]),W&&U.setState("value",W.getAttribute(Es))}function J(R){let q=ae(),Q=q?.closest(Ho),K;for(;Q&&!K;)Q=R>0?rD(Q,Ho):sD(Q,Ho),K=Q?.querySelector(Cv);K?U.setState("value",K.getAttribute(Es)):Y(R)}let de=()=>O(le().length-1),ee=R=>{R.preventDefault(),R.metaKey?de():R.altKey?J(1):Y(1)},T=R=>{R.preventDefault(),R.metaKey?O(0):R.altKey?J(-1):Y(-1)};return v.createElement(la.div,{ref:n,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:R=>{var q;(q=N.onKeyDown)==null||q.call(N,R);let Q=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||Q))switch(R.key){case"n":case"j":{E&&R.ctrlKey&&ee(R);break}case"ArrowDown":{ee(R);break}case"p":case"k":{E&&R.ctrlKey&&T(R);break}case"ArrowUp":{T(R);break}case"Home":{R.preventDefault(),O(0);break}case"End":{R.preventDefault(),de();break}case"Enter":{R.preventDefault();let K=ae();if(K){let ne=new Event(Um);K.dispatchEvent(ne)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:iD},p),Wc(e,R=>v.createElement(GS.Provider,{value:U},v.createElement(US.Provider,{value:H},R))))}),Z3=v.forwardRef((e,n)=>{var r,s;let l=Qt(),c=v.useRef(null),u=v.useContext(IS),f=dl(),p=PS(e),h=(s=(r=p.current)==null?void 0:r.forceMount)!=null?s:u?.forceMount;jr(()=>{if(!h)return f.item(l,u?.id)},[h]);let b=qS(l,c,[e.value,e.children,c],e.keywords),y=jp(),_=Pa(F=>F.value&&F.value===b.current),w=Pa(F=>h||f.filter()===!1?!0:F.search?F.filtered.items.get(l)>0:!0);v.useEffect(()=>{let F=c.current;if(!(!F||e.disabled))return F.addEventListener(Um,S),()=>F.removeEventListener(Um,S)},[w,e.onSelect,e.disabled]);function S(){var F,U;$(),(U=(F=p.current).onSelect)==null||U.call(F,b.current)}function $(){y.setState("value",b.current,!0)}if(!w)return null;let{disabled:E,value:N,onSelect:k,forceMount:j,keywords:z,...I}=e;return v.createElement(la.div,{ref:Ua(c,n),...I,id:l,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!_,"data-disabled":!!E,"data-selected":!!_,onPointerMove:E||f.getDisablePointerSelection()?void 0:$,onClick:E?void 0:S},e.children)}),Q3=v.forwardRef((e,n)=>{let{heading:r,children:s,forceMount:l,...c}=e,u=Qt(),f=v.useRef(null),p=v.useRef(null),h=Qt(),b=dl(),y=Pa(w=>l||b.filter()===!1?!0:w.search?w.filtered.groups.has(u):!0);jr(()=>b.group(u),[]),qS(u,f,[e.value,e.heading,p]);let _=v.useMemo(()=>({id:u,forceMount:l}),[l]);return v.createElement(la.div,{ref:Ua(f,n),...c,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),Wc(e,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(IS.Provider,{value:_},w))))}),W3=v.forwardRef((e,n)=>{let{alwaysRender:r,...s}=e,l=v.useRef(null),c=Pa(u=>!u.search);return!r&&!c?null:v.createElement(la.div,{ref:Ua(l,n),...s,"cmdk-separator":"",role:"separator"})}),J3=v.forwardRef((e,n)=>{let{onValueChange:r,...s}=e,l=e.value!=null,c=jp(),u=Pa(h=>h.search),f=Pa(h=>h.selectedItemId),p=dl();return v.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),v.createElement(la.input,{ref:n,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":f,id:p.inputId,type:"text",value:l?e.value:u,onChange:h=>{l||c.setState("search",h.target.value),r?.(h.target.value)}})}),eD=v.forwardRef((e,n)=>{let{children:r,label:s="Suggestions",...l}=e,c=v.useRef(null),u=v.useRef(null),f=Pa(h=>h.selectedItemId),p=dl();return v.useEffect(()=>{if(u.current&&c.current){let h=u.current,b=c.current,y,_=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=h.offsetHeight;b.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return _.observe(h),()=>{cancelAnimationFrame(y),_.unobserve(h)}}},[]),v.createElement(la.div,{ref:Ua(c,n),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":s,id:p.listId},Wc(e,h=>v.createElement("div",{ref:Ua(u,p.listInnerRef),"cmdk-list-sizer":""},h)))}),tD=v.forwardRef((e,n)=>{let{open:r,onOpenChange:s,overlayClassName:l,contentClassName:c,container:u,...f}=e;return v.createElement(A0,{open:r,onOpenChange:s},v.createElement(j0,{container:u},v.createElement(T0,{"cmdk-overlay":"",className:l}),v.createElement(R0,{"aria-label":e.label,"cmdk-dialog":"",className:c},v.createElement(HS,{ref:n,...f}))))}),nD=v.forwardRef((e,n)=>Pa(r=>r.filtered.count===0)?v.createElement(la.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),aD=v.forwardRef((e,n)=>{let{progress:r,children:s,label:l="Loading...",...c}=e;return v.createElement(la.div,{ref:n,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},Wc(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),Ps=Object.assign(HS,{List:eD,Item:Z3,Input:J3,Group:Q3,Separator:W3,Dialog:tD,Empty:nD,Loading:aD});function rD(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function sD(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function PS(e){let n=v.useRef(e);return jr(()=>{n.current=e}),n}var jr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ks(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function Pa(e){let n=jp(),r=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,r,r)}function qS(e,n,r,s=[]){let l=v.useRef(),c=dl();return jr(()=>{var u;let f=(()=>{var h;for(let b of r){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(h=b.current.textContent)==null?void 0:h.trim():l.current}})(),p=s.map(h=>h.trim());c.value(e,f,p),(u=n.current)==null||u.setAttribute(Es,f),l.current=f}),l}var oD=()=>{let[e,n]=v.useState(),r=ks(()=>new Map);return jr(()=>{r.current.forEach(s=>s()),r.current=new Map},[e]),(s,l)=>{r.current.set(s,l),n({})}};function lD(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Wc({asChild:e,children:n},r){return e&&v.isValidElement(n)?v.cloneElement(lD(n),{ref:n.ref},r(n.props.children)):r(n)}var iD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function cD({...e}){return g.jsx(A0,{"data-slot":"dialog",...e})}function uD({...e}){return g.jsx(j0,{"data-slot":"dialog-portal",...e})}function dD({className:e,...n}){return g.jsx(T0,{"data-slot":"dialog-overlay",className:xe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...n})}function fD({className:e,children:n,showCloseButton:r=!0,...s}){return g.jsxs(uD,{"data-slot":"dialog-portal",children:[g.jsx(dD,{}),g.jsxs(R0,{"data-slot":"dialog-content",className:xe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...s,children:[n,r&&g.jsxs(HN,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(yw,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function mD({className:e,...n}){return g.jsx("div",{"data-slot":"dialog-header",className:xe("flex flex-col gap-2 text-center sm:text-left",e),...n})}function pD({className:e,...n}){return g.jsx(GN,{"data-slot":"dialog-title",className:xe("text-lg leading-none font-semibold",e),...n})}function hD({className:e,...n}){return g.jsx(IN,{"data-slot":"dialog-description",className:xe("text-sm text-muted-foreground",e),...n})}function gD({className:e,...n}){return g.jsx(Ps,{"data-slot":"command",className:xe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n})}function bD({title:e="Command Palette",description:n="Search for a command to run...",children:r,className:s,showCloseButton:l=!0,...c}){return g.jsxs(cD,{...c,children:[g.jsxs(mD,{className:"sr-only",children:[g.jsx(pD,{children:e}),g.jsx(hD,{children:n})]}),g.jsx(fD,{className:xe("overflow-hidden p-0",s),showCloseButton:l,children:g.jsx(gD,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function yD({className:e,...n}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(fp,{className:"size-4 shrink-0 opacity-50","aria-hidden":!0}),g.jsx(Ps.Input,{"data-slot":"command-input",className:xe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function xD({className:e,...n}){return g.jsx(Ps.List,{"data-slot":"command-list",className:xe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function vD({...e}){return g.jsx(Ps.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function em({className:e,...n}){return g.jsx(Ps.Group,{"data-slot":"command-group",className:xe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n})}function tm({className:e,...n}){return g.jsx(Ps.Item,{"data-slot":"command-item",className:xe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n})}function _D(e){if(!e||!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"}function wD({catalogNames:e,onNavigate:n,open:r,onOpenChange:s}){const l=v.useCallback(()=>s(!1),[s]);return v.useEffect(()=>{const c=u=>{!(u.metaKey||u.ctrlKey)||u.key!=="k"||!r&&_D(u.target)||(u.preventDefault(),s(!r))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[r,s]),g.jsxs(bD,{open:r,onOpenChange:s,title:"Jump to",description:"Search components and views",children:[g.jsx(yD,{placeholder:"Search components…"}),g.jsxs(xD,{children:[g.jsx(vD,{children:"No matches."}),g.jsx(em,{heading:"Explore",children:g.jsx(tm,{value:"governance explore overview",onSelect:()=>{n({view:"governance"}),l()},children:"Governance"})}),e.length>0?g.jsx(em,{heading:"Components",children:e.map(c=>g.jsx(tm,{value:c,onSelect:()=>{n({view:"component",componentId:c}),l()},children:c},c))}):null,g.jsx(em,{heading:"System",children:g.jsx(tm,{value:"tokens design system colors",onSelect:()=>{n({view:"tokens"}),l()},children:"Design tokens"})})]})]})}const _r="#!/";function SD(e){return e.startsWith(_r)?e.slice(_r.length):e.startsWith("#")?e.slice(1):e}function CD(e){const n=SD(e).trim();if(n===""||n==="overview")return{view:"governance"};if(n==="tokens")return{view:"tokens"};if(n==="governance")return{view:"governance"};if(n.startsWith("governance/")){const r=decodeURIComponent(n.slice(11));if(r.length>0)return{view:"component",componentId:r}}if(n.startsWith("component/")){const r=decodeURIComponent(n.slice(10));if(r.length>0)return{view:"component",componentId:r}}return{view:"governance"}}function $D(e){switch(e.view){case"tokens":return`${_r}tokens`;case"governance":return e.catalog?`${_r}governance/${encodeURIComponent(e.catalog)}`:`${_r}governance`;case"component":return`${_r}component/${encodeURIComponent(e.componentId)}`;default:return`${_r}governance`}}function ED(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function kD(){return window.location.hash||"#!/governance"}function ND(){return"#!/governance"}function AD(){const e=v.useSyncExternalStore(ED,kD,ND),n=CD(e),r=v.useCallback(s=>{const l=$D(s);l!==window.location.hash&&(window.location.hash=l)},[]);return[n,r]}const jD=v.lazy(()=>eE(()=>import("./DashboardLayoutAuto-Dp3bAQxH.js"),__vite__mapDeps([0,1]))),Zo="dslinter-dashboard-theme";function TD(){if(typeof window>"u")return null;try{const e="dslinter-workbench-theme";let n=localStorage.getItem(Zo);if(n==null&&(n=localStorage.getItem(e),(n==="light"||n==="dark")&&(localStorage.setItem(Zo,n),localStorage.removeItem(e))),n==="light"||n==="dark")return n;if(n==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return localStorage.setItem(Zo,r),r}}catch{}return null}function RD(){return TD()??"light"}const VS=v.createContext(null);function $v({children:e}){const[n,r]=v.useState(()=>RD()),s=v.useCallback(c=>{r(c)},[]);v.useEffect(()=>{try{localStorage.setItem(Zo,n)}catch{}},[n]),v.useEffect(()=>{const c=u=>{u.key!==Zo||u.newValue==null||(u.newValue==="light"||u.newValue==="dark")&&r(u.newValue)};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]);const l=v.useMemo(()=>({theme:n,setTheme:s,resolvedTheme:n}),[n,s]);return g.jsx(VS.Provider,{value:l,children:e})}function MD(){const e=v.useContext(VS);if(!e)throw new Error("useDashboardTheme must be used within DashboardThemeProvider");return e}function OD({playgroundEntries:e,playgroundJoinSkips:n,tokenCatalog:r,overview:s,reportUrl:l,dslinterReportHint:c,formatModulePath:u,dslinterReport:f}){const[p,h]=AD(),[b,y]=v.useState(!1),{theme:_,setTheme:w,resolvedTheme:S}=MD(),$=v.useMemo(()=>Vm(f.report),[f.report]),E=!f.loading&&f.error==null&&f.report!=null;let N;if(p.view==="tokens")N=g.jsx(B3,{tokenCatalog:r,dslinterReport:f.report});else if(p.view==="governance")N=g.jsx(j3,{landing:s,reportUrl:l,dslinterReportHint:c,dslinterReport:f,onOpenComponent:k=>h({view:"component",componentId:k})});else{const k=p.componentId,j=P$(e,k),z=$.includes(k),I=f.report?.playgrounds?.some(F=>F.export_name===k||F.id===k)??!1;j?N=g.jsx(S3,{entry:j,formatModulePath:u,workspaceReport:f.report,reportReady:E}):z?N=g.jsx(fj,{componentId:k,workspaceReport:f.report,reportReady:E,hasPlaygroundSpec:I,playgroundJoinSkip:j$(n,k),onBackToGovernance:()=>h({view:"governance"})}):N=g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-muted/40 px-8 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Unknown component"}),g.jsxs("p",{className:"max-w-md text-xs text-muted-foreground",children:[g.jsx("span",{className:"font-mono",children:k})," is not in the latest scan catalog."]}),g.jsx(_c,{type:"button",size:"sm",onClick:()=>h({view:"governance"}),children:"Back to governance"})]})}return g.jsxs("div",{className:xe("flex h-screen min-h-0 bg-background text-foreground",S==="dark"&&"dark"),children:[g.jsx(wD,{catalogNames:$,onNavigate:h,open:b,onOpenChange:y}),g.jsx(R3,{report:f.report,reportLoading:f.loading,reportError:f.error,route:p,onNavigate:h,onOpenCommandPalette:()=>y(!0),theme:_,onThemeChange:w}),g.jsx("div",{className:"ml-[240px] flex min-h-0 min-w-0 flex-1 flex-col",children:N})]})}function DD(e){return e.autoPlayground?g.jsx($v,{children:g.jsx(v.Suspense,{fallback:null,children:g.jsx(jD,{...e})})}):g.jsx($v,{children:g.jsx(OD,{...e,playgroundEntries:e.playgroundEntries??[],playgroundJoinSkips:e.playgroundJoinSkips})})}async function zD(e){const n=await fetch(e,{cache:"no-store"});if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);return n.json()}function LD(e="/dslint-report.json"){const{reportUrl:n="/dslint-report.json",watchUrl:r,refreshIntervalMs:s=0}=typeof e=="string"?{reportUrl:e}:e,[l,c]=v.useState(null),[u,f]=v.useState(null),[p,h]=v.useState(!0),b=v.useRef(null),y=(_,w,S)=>{const $=S?.showLoading!==!1;$&&(f(null),h(!0)),zD(_).then(E=>{w.value||c(E)}).catch(E=>{w.value||f(E instanceof Error?E.message:"Failed to load report")}).finally(()=>{!w.value&&$&&h(!1)})};return v.useEffect(()=>{const _={value:!1};return y(n,_,{showLoading:!0}),()=>{_.value=!0}},[n]),v.useEffect(()=>{if(!r)return;const _=new EventSource(r),w={value:!1};return _.onmessage=S=>{w.value||S.data==="updated"&&y(n,w,{showLoading:!1})},_.onerror=()=>{},()=>{w.value=!0,_.close()}},[r,n]),v.useEffect(()=>{if(r||s<=0)return;const _={value:!1},w=setInterval(async()=>{if(!_.value)try{const S=await fetch(n,{method:"HEAD",cache:"no-store"}),$=S.headers.get("ETag")??S.headers.get("Last-Modified")??null;if($&&$===b.current)return;b.current=$,y(n,_,{showLoading:!1})}catch{}},s);return()=>{_.value=!0,clearInterval(w)}},[r,s,n]),{report:l,error:u,loading:p}}const BD={colors:[{token:"primary",shade:"DEFAULT",value:"#2563eb",tw:"bg-primary"},{token:"primary",shade:"foreground",value:"#ffffff",tw:"text-primary-foreground"},{token:"surface",shade:"DEFAULT",value:"#f8fafc",tw:"bg-surface"},{token:"surface",shade:"elevated",value:"#ffffff",tw:"bg-surface-elevated"},{token:"surface",shade:"border",value:"#e2e8f0",tw:"border-surface-border"},{token:"danger",shade:"DEFAULT",value:"#dc2626",tw:"text-danger"}],spacing:[{token:"layout-xs",value:"0.5rem",tw:"p-layout-xs"},{token:"layout-sm",value:"1rem",tw:"p-layout-sm"},{token:"layout-md",value:"1.5rem",tw:"p-layout-md"},{token:"layout-lg",value:"2rem",tw:"p-layout-lg"}],radius:[{token:"ds",value:"0.5rem",tw:"rounded-ds"},{token:"ds-lg",value:"0.75rem",tw:"rounded-ds-lg"}],typography:{families:[...Q$],sizes:[...K$],weights:[...Z$]}};function UD(){const e=LD({reportUrl:"/dslint-report.json",watchUrl:"/events",refreshIntervalMs:0});return g.jsx(DD,{autoPlayground:!0,tokenCatalog:BD,dslinterReport:e,dslinterReportHint:"dslinter (watch + serve)"})}S$.createRoot(document.getElementById("root")).render(g.jsx(ut.StrictMode,{children:g.jsx(UD,{})}));export{DD as D,ut as R,OD as a,ID as b,S$ as c,$$ as d,GD as e,Q$ as f,K$ as g,Z$ as h,g as j,v as r,LD as u};
206
+ <${e.id} />`;return g.jsx(Zt,{id:"usage",title:"Usage",description:"Example usage for the current playground values.",children:g.jsx(d3,{source:r})})}function m3({findings:e,reportReady:n}){return g.jsx(g.Fragment,{children:n&&e.length>0?g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:e.map((r,s)=>g.jsxs(dt,{children:[g.jsx(Me,{className:"font-mono text-xs text-muted-foreground",children:r.rule_id}),g.jsx(Me,{className:"font-mono text-xs text-muted-foreground",children:r.line??"—"}),g.jsx(Me,{children:g.jsx(Os,{variant:"secondary",size:"sm",children:r.severity})}),g.jsx(Me,{children:r.message})]},`${r.rule_id}-${r.line??"x"}-${s}`))})]}):n&&e.length===0?g.jsx(Cr,{children:"No hardcoded or arbitrary token color findings on this file in the current report."}):g.jsxs(Cr,{children:["Token findings update when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function p3({codeScore:e,reportReady:n}){const{findings:r}=e,s=n&&r.length>0;return g.jsx(g.Fragment,{children:s?g.jsx(g.Fragment,{children:g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:r.map((l,c)=>g.jsxs(dt,{children:[g.jsx(Me,{children:l.rule_id}),g.jsx(Me,{children:l.line??"—"}),g.jsx(Me,{children:l.severity}),g.jsx(Me,{children:l.message})]},`${l.rule_id}-${l.line??"x"}-${c}`))})]})}):n&&r.length===0?g.jsx(Cr,{children:"No quality findings on this file in the current report."}):g.jsxs(Cr,{children:["Code score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function h3({a11y:e,reportReady:n}){const r=n&&e.findings.length>0;return g.jsx(g.Fragment,{children:r?g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Rule"}),g.jsx(Re,{children:"Line"}),g.jsx(Re,{children:"Severity"}),g.jsx(Re,{children:"Message"})]})}),g.jsx(Mn,{children:e.findings.map((s,l)=>g.jsxs(dt,{children:[g.jsx(Me,{children:s.rule_id}),g.jsx(Me,{children:s.line??"—"}),g.jsx(Me,{children:s.severity}),g.jsx(Me,{children:s.message})]},`${s.rule_id}-${s.line??"x"}-${l}`))})]}):n&&e.issueCount===0?g.jsx(Cr,{children:"No accessibility findings on this file in the current report."}):g.jsxs(Cr,{children:["A11y score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslint-report.json"})," is available (same fetch as Governance)."]})})}function yv(e,n=6){if(!e||Object.keys(e).length===0)return"—";const r=Object.entries(e).sort((c,u)=>u[1]-c[1]),s=r.slice(0,n),l=Math.max(0,r.length-n);return s.map(([c,u])=>`${JSON.stringify(c)} ×${u}`).join(" · ")+(l>0?` · +${l}`:"")}function g3({controls:e,values:n,onChange:r,onReset:s,reportUsage:l,declaredPropsFromScan:c=[],governanceReportLoaded:u=!1}){if(e.length===0)return null;const f=v.useCallback((S,$)=>{r({...n,[S]:$})},[r,n]),p=_j(e),h=l!=null,b=l?.prop_frequencies??{},y=l?.prop_value_frequencies??{},_=new Set(p.map(S=>S.prop)),w=h?Object.keys(b).filter(S=>!_.has(S)).sort((S,$)=>S.localeCompare($)):[];return g.jsxs(Zt,{id:"api-reference",title:"API reference",description:"",actions:g.jsx(_c,{type:"button",variant:"outline",size:"sm",onClick:s,children:"Reset defaults"}),children:[g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Prop"}),g.jsx(Re,{children:"Type"}),g.jsx(Re,{children:"Value"}),h?g.jsxs(g.Fragment,{children:[g.jsx(Re,{children:"Usage"}),g.jsx(Re,{children:"Values"})]}):null]})}),g.jsx(Mn,{children:e.map(S=>{const $=p.find(k=>k.prop===S.key);if(!$)return null;const E=h?b[$.prop]??0:0,N=yv(y[$.prop]);return g.jsxs(dt,{children:[g.jsx(Me,{className:"font-medium",children:$.prop}),g.jsx(Me,{children:S.type==="select"?g.jsx("div",{className:"flex flex-wrap items-center gap-1",children:S.options.map(k=>{const z=String(n[S.key]??S.default??"")===k.value;return g.jsx(Os,{variant:"outline",size:"sm",asChild:!0,className:xe(z&&"border-transparent bg-primary text-primary-foreground hover:bg-primary/90"),children:g.jsx("button",{type:"button",className:"cursor-pointer",onClick:()=>f(S.key,k.value),"aria-pressed":z,"aria-label":`Set ${S.label} to ${k.label}`,children:k.value})},k.value)})}):g.jsxs("span",{className:"font-mono text-xs flex items-center gap-1",children:[$.type,$.default!=="—"?g.jsx(Os,{variant:"secondary",size:"sm",children:$.default}):null]})}),g.jsx(Me,{children:g.jsx(kj,{control:S,values:n,patch:f,idPrefix:"api",layout:"table"})}),h?g.jsxs(g.Fragment,{children:[g.jsx(Me,{children:E}),g.jsx(Me,{children:N})]}):null]},$.prop)})})]}),h&&w.length>0?g.jsxs("div",{className:"mt-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Also seen in repo (not in playground)"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"These prop names appear in scanned JSX but are not wired as playground controls on this page."}),g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Prop"}),g.jsx(Re,{children:"Repo call sites"}),g.jsx(Re,{children:"Repo literals"})]})}),g.jsx(Mn,{children:w.map(S=>g.jsxs(dt,{children:[g.jsx(Me,{children:S}),g.jsxs(Me,{children:["×",b[S]??0]}),g.jsx(Me,{children:yv(y[S])})]},S))})]})]}):null]})}const Lm=200;function b3(e){const n=[];for(const r of e)r.type==="boolean"?n.push({key:r.key,values:[!1,!0]}):r.type==="select"&&r.options.length>0&&n.push({key:r.key,values:r.options.map(s=>s.value)});return n}function y3(e,n){const r=b3(e);if(r.length===0)return{combinations:[],totalCount:0,capped:!1,finiteAxisKeys:[]};let s=1;for(const p of r)s*=p.values.length;const l=r.map(p=>p.key),c=[],u=s>Lm,f=(p,h)=>{if(c.length>=Lm)return;if(p>=r.length){c.push({...h});return}const b=r[p];for(const y of b.values)f(p+1,{...h,[b.key]:y})};return f(0,{...n}),{combinations:c,totalCount:s,capped:u,finiteAxisKeys:l}}function xv(e){return typeof e=="string"?e:JSON.stringify(e)}function x3({Preview:e,combinations:n,finiteAxisKeys:r,totalCount:s,capped:l}){return n.length===0?null:g.jsxs(g.Fragment,{children:[l?g.jsxs("p",{className:"rounded-md border border-border bg-muted/60 px-3 py-2 text-sm text-muted-foreground",children:["Showing ",n.length," of ",s," combinations (limit"," ",Lm,"). Reduce select options or split controls to preview more here."]}):null,g.jsx("div",{className:"mt-4 flex flex-col gap-4",children:n.map(c=>g.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xs",children:[g.jsx("div",{className:"flex flex-wrap gap-1 border-b p-2",children:r.map(u=>{const f=c[u];return g.jsxs(Os,{variant:"outline",size:"sm",className:"font-mono text-xs",children:[u,"=",f===void 0?"?":xv(f)]},u)})}),g.jsx("div",{className:"min-w-0 bg-card p-3",children:g.jsx(e,{values:c})})]},r.map(u=>`${u}:${xv(c[u]??"")}`).join("|")))})]})}const v3=280,_3=1024;function Yo(e,n){if(!Number.isFinite(n)||n<=0)return e;const r=Math.min(v3,n);return Math.min(Math.max(e,r),n)}function w3(e,n,r){return n<=0?Yo(r,r):r<n?Yo(e,r):Math.abs(e-n)<=2?Yo(r,r):Yo(e,r)}function yr({href:e,children:n}){const r=s=>{if(s.defaultPrevented||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)return;const l=e.startsWith("#")?e.slice(1):e,c=l?document.getElementById(l):null;c&&(s.preventDefault(),c.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${l}`))};return g.jsx("a",{href:e,onClick:r,className:"block rounded-md py-1 text-muted-foreground transition hover:bg-accent hover:text-accent-foreground",children:n})}function S3({entry:e,formatModulePath:n,workspaceReport:r,reportReady:s}){const{Preview:l}=e,c=n?n(e.modulePath):e.modulePath.replace(/^\.\.\//,""),[u,f]=v.useState(()=>_f(e.controls));v.useEffect(()=>{f(_f(e.controls))},[e.id]);const p=v.useMemo(()=>mj(s?r:null,e.modulePath),[r,e.modulePath,s]),h=v.useMemo(()=>bj(s?r:null,e.modulePath),[r,e.modulePath,s]),b=v.useMemo(()=>hj(s?r:null,e.modulePath),[r,e.modulePath,s]),y=v.useMemo(()=>{if(!(!s||!r))return Cc(r).get(e.id)},[r,e.id,s]),_=v.useMemo(()=>!s||!r?[]:Sc(r).get(e.id)??[],[r,e.id,s]),w=v.useRef(null),S=v.useRef(null),$=v.useRef(0),[E,N]=v.useState(0),[k,j]=v.useState(_3),[z,I]=v.useState(null),[F,U]=v.useState(null),H=v.useCallback(ae=>{if(!Number.isFinite(ae)||ae<=0)return;const le=$.current;$.current=ae,N(ae),j(O=>w3(O,le,ae))},[]);v.useLayoutEffect(()=>{const ae=w.current;if(!ae)return;const le=new ResizeObserver(()=>{H(ae.clientWidth)});return le.observe(ae),H(ae.clientWidth),()=>le.disconnect()},[H]);const re=v.useCallback(()=>{I(tk());const ae=S.current;U(ae?nk(ae):null)},[]);v.useLayoutEffect(()=>{const ae=S.current;if(!ae)return;const le=new ResizeObserver(()=>{re()});return le.observe(ae),re(),()=>le.disconnect()},[re]),v.useEffect(()=>(re(),window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)),[re]);const pe=v.useCallback(ae=>le=>{if(le.button!==0)return;le.preventDefault();const O=le.currentTarget;O.setPointerCapture(le.pointerId);let Y=le.clientX;const J=ae==="right"?1:-1,de=T=>{const R=T.clientX-Y;Y=T.clientX,j(q=>Yo(q+J*2*R,$.current))},ee=T=>{O.releasePointerCapture(T.pointerId),window.removeEventListener("pointermove",de),window.removeEventListener("pointerup",ee),window.removeEventListener("pointercancel",ee)};window.addEventListener("pointermove",de),window.addEventListener("pointerup",ee),window.addEventListener("pointercancel",ee)},[]),fe=e.controls.length>0,se=v.useMemo(()=>y3(e.controls,u),[e.controls,u]),ye=fe&&(se.combinations.length>0||se.combinations.length===0&&se.totalCount===0);return g.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[g.jsx("header",{id:"source",className:"scroll-mt-20 border-b border-border bg-card p-6",children:g.jsx("div",{className:"mx-auto",children:g.jsx("div",{className:"flex flex-wrap items-start justify-between gap-4",children:g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.meta.group?g.jsxs(g.Fragment,{children:["Components ",g.jsx("span",{className:"text-muted-foreground/40",children:"/"})," ",g.jsx("span",{className:"capitalize text-foreground/80",children:e.meta.group})]}):"Components"}),g.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:e.meta.title}),g.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",title:c,children:c})]})})})}),g.jsx("section",{id:"examples",className:"ds-playground-dot-surface border-b px-16 py-10",children:g.jsxs("div",{ref:w,children:[g.jsx("div",{className:"flex justify-center",children:g.jsxs("div",{ref:S,className:"relative min-w-0 shrink-0 select-none rounded-lg border border-border bg-muted/50 shadow-xs",style:{width:k},children:[g.jsx("button",{type:"button",className:"absolute left-0 top-0 bottom-0 z-10 flex w-4 -translate-x-1/2 cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Resize preview from center (drag left or right)",onPointerDown:pe("left"),children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})}),g.jsx("button",{type:"button",className:"absolute right-0 top-0 bottom-0 z-10 flex w-4 translate-x-1/2 cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Resize preview from center (drag left or right)",onPointerDown:pe("right"),children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})}),g.jsx("div",{className:"min-w-0 bg-card p-8",children:g.jsx(l,{values:u})})]})}),E>0?g.jsxs("div",{className:"mt-4 divide-x divide-border h-6 overflow-hidden items-center mx-auto flex w-fit border border-border bg-card text-center text-xs/none tabular-nums font-mono rounded-sm text-muted-foreground",children:[g.jsxs("span",{className:"p-2.5",children:[Math.round(k),"px"]}),g.jsxs("span",{className:" p-2.5",title:"usemods detectBreakpoint",children:["Screen: ",z??"—"]}),g.jsxs("span",{className:" p-2.5",title:"usemods detectContainerBreakpoint",children:["Container: ",F??"—"]})]}):null]})}),g.jsx("div",{className:"min-w-0 w-full px-6 py-10 lg:px-12",children:g.jsxs("div",{className:"xl:grid xl:grid-cols-[minmax(0,1fr)_12rem] xl:gap-14",children:[g.jsxs("div",{className:"min-w-0 space-y-14",children:[fe?g.jsx(g3,{controls:e.controls,values:u,onChange:f,onReset:()=>f(_f(e.controls)),reportUsage:y,declaredPropsFromScan:_,governanceReportLoaded:s&&r!=null}):null,g.jsx(f3,{entry:e,values:u}),g.jsx(Zt,{id:"repo-usage",title:"Repo usage",description:"",children:g.jsx(Wv,{report:s?r:null,componentId:e.id})}),g.jsx(Zt,{id:"design-tokens",title:"Design tokens and colors",description:"Hardcoded colors and non-token styling flagged by DSLinter for this module's source file.",children:g.jsx(m3,{findings:h,reportReady:s})}),g.jsx(Zt,{id:"code-score",title:`Code score: ${s?b.score:"—"}/100`,description:"Static quality rules and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(p3,{codeScore:b,reportReady:s})}),g.jsx(Zt,{id:"accessibility",title:`Accessibility: ${s?p.score:"—"}/100`,description:"Accessibility checks and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(h3,{a11y:p,reportReady:s})})]}),g.jsx("aside",{className:"mt-12 hidden self-start sticky top-8 xl:mt-0 xl:block",children:g.jsxs("nav",{"aria-label":"On this page",className:"space-y-0.5 border-l border-border pl-4 text-sm",children:[g.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"On this page"}),fe?g.jsx(yr,{href:"#api-reference",children:"API reference"}):null,g.jsx(yr,{href:"#usage",children:"Usage"}),g.jsx(yr,{href:"#repo-usage",children:"Repo usage"}),g.jsx(yr,{href:"#design-tokens",children:"Design tokens"}),g.jsx(yr,{href:"#code-score",children:"Code score"}),g.jsx(yr,{href:"#accessibility",children:"Accessibility"}),ye?g.jsx(yr,{href:"#variants",children:"Variants"}):null]})})]})}),se.combinations.length>0?g.jsx("section",{id:"variants",className:"ds-playground-dot-surface mt-8 w-full scroll-mt-20 border-t pt-10 pb-12",children:g.jsxs("div",{className:"min-w-0 w-full px-6 lg:px-12",children:[g.jsx("h2",{className:"w-fit bg-card text-xl font-semibold tracking-tight text-foreground",children:"All variants"}),g.jsx(x3,{Preview:l,combinations:se.combinations,finiteAxisKeys:se.finiteAxisKeys,totalCount:se.totalCount,capped:se.capped})]})}):null]})})}function kp({...e}){return g.jsx(C2,{"data-slot":"hover-card",...e})}function Np({...e}){return g.jsx($2,{"data-slot":"hover-card-trigger",...e})}function Ap({className:e,align:n="center",sideOffset:r=4,...s}){return g.jsx(E2,{"data-slot":"hover-card-portal",children:g.jsx(k2,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:xe("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})})}function C3(e){const n=new Set,r=Sc(e);for(const[s,l]of r){const c=Zv(e,s,l);for(const u of c)n.add(u)}return n}const MS="cursor-default text-xs underline decoration-dotted underline-offset-2 hover:text-foreground";function $3({component:e,declared:n,unusedProps:r,usedPropCount:s}){const l=$c(n);return g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsx("button",{type:"button",className:MS,children:g.jsxs("span",{className:"text-muted-foreground",children:[s,"/",l.length," ",Ji("prop",s)," used"]})})}),g.jsx(Ap,{align:"start",className:"w-56 p-3",children:g.jsx(Qv,{component:e,declared:n,unusedProps:r})})]})}function E3({root:e,fileCount:n,files:r}){const s=[...r].sort((l,c)=>l.localeCompare(c));return g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsxs("button",{type:"button",className:MS,children:[n," ",Ji("file",n)]})}),g.jsxs(Ap,{align:"start",className:"w-72 p-3",children:[g.jsxs("p",{className:"text-xs font-medium text-foreground",children:[n," ",Ji("file",n)]}),g.jsx("ul",{className:"mt-2 max-h-48 space-y-0.5 overflow-y-auto font-mono text-xs text-muted-foreground",children:s.map(l=>g.jsx("li",{className:"truncate",title:Ms(e,l),children:Ms(e,l)},l))})]})]})}function k3({report:e,onOpenComponent:n}){const r=wc(e),s=Cc(e),l=Kv(r,s),c=v.useMemo(()=>C3(e),[e]),u=v.useMemo(()=>Sc(e),[e]);return g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{scope:"col",children:"Component"}),g.jsx(Re,{scope:"col",children:"Prop Usage"}),g.jsx(Re,{scope:"col",children:"App Usage"})]})}),g.jsx(Mn,{children:l.map(f=>{const p=s.get(f),h=u.get(f)??[],b=$c(h),y=b.filter(_=>!c.has(`${f}/${_}`)).length;return g.jsxs(dt,{children:[g.jsx(Me,{children:n?g.jsx("button",{type:"button",onClick:()=>n(f),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:f}):f}),g.jsx(Me,{children:b.length>0?g.jsx($3,{component:f,declared:h,unusedProps:c,usedPropCount:y}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})}),g.jsx(Me,{children:p&&p.files.length>0?g.jsx(E3,{root:e.root,fileCount:p.file_count,files:p.files}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})})]},f)})})]})}function N3({scores:e}){const n=[{label:"System health",value:e.design_system_health},{label:"UX consistency",value:e.ux_consistency},{label:"Accessibility",value:e.accessibility},{label:"Maintainability",value:e.maintainability}];return g.jsx("section",{className:"grid grid-cols-2 gap-1 rounded-xl border border-border bg-muted/30 p-1 md:grid-cols-4",children:n.map(({label:r,value:s})=>g.jsxs("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-card-foreground shadow-xs",children:[g.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:r}),g.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:s})]},r))})}function A3({report:e,onOpenComponent:n}){return g.jsxs("div",{className:"space-y-10",children:[g.jsx(N3,{scores:e.scores}),e.duplicate_components.length>0?g.jsxs("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-xs text-amber-950",children:[g.jsx("span",{className:"font-semibold",children:"Duplicate component names: "}),e.duplicate_components.map(r=>r.name).join(", ")]}):null,e.ownership.length>0?g.jsx(Zt,{id:"ownership",title:"Ownership",description:"Prefix match from <span className='font-mono'>.dslint.json</span> — useful for adoption rollups.",children:g.jsxs(Tn,{children:[g.jsx(Rn,{children:g.jsxs(dt,{children:[g.jsx(Re,{children:"Owner"}),g.jsx(Re,{children:"Files"}),g.jsx(Re,{children:"Definitions"})]})}),g.jsx(Mn,{children:e.ownership.map(r=>g.jsxs(dt,{children:[g.jsx(Me,{children:r.owner}),g.jsx(Me,{children:r.files}),g.jsx(Me,{children:r.definitions})]},r.owner))})]})}):null,g.jsx(Zt,{id:"components",title:"Components",description:"Definitions and JSX usage from the latest snapshot.",children:g.jsx(k3,{report:e,onOpenComponent:n})}),g.jsx(Zt,{id:"issues",title:"Issues",description:"Findings from the workspace DSLinter report scoped to this file.",children:g.jsx(gw,{findings:e.findings,root:e.root})})]})}function j3({landing:e,reportUrl:n="/dslint-report.json",dslinterReportHint:r="npm run dslint:report",dslinterReport:s,onOpenComponent:l}){const{report:c,error:u,loading:f}=s,p=c?Vm(c).length:0;return u?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"Governance"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:u}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:r})]})]})]}):f||!c?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[e,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading inventory…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["Governance",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",p," components"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Scores, component catalog, token wall, and findings from the latest DSLinter snapshot"})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(A3,{report:c,onOpenComponent:l})})]})}function T3(){const[e,n]=v.useState("⌘K");return v.useEffect(()=>{const r=/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent);n(r?"⌘K":"Ctrl+K")},[]),g.jsx("kbd",{className:"pointer-events-none select-none rounded border border-sidebar-border bg-sidebar-accent px-1 py-px font-mono text-[10px] font-medium leading-tight text-sidebar-foreground/80 tabular-nums",children:e})}function Zf(e){return`w-full rounded-md px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function vv(e){return g.jsx("p",{className:"mb-1.5 mt-4 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50 first:mt-0",children:e})}function R3({report:e,reportLoading:n,reportError:r,route:s,onNavigate:l,onOpenCommandPalette:c,theme:u,onThemeChange:f}){const p=v.useMemo(()=>Vm(e),[e]),h=s.view==="tokens",b=s.view==="governance"&&s.catalog==null,y=_=>{_!=="light"&&_!=="dark"||f(_)};return g.jsxs("aside",{className:"fixed flex h-full w-[240px] shrink-0 flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground",children:[g.jsx("div",{className:"sticky top-0 z-10 shrink-0 border-b border-sidebar-border bg-sidebar px-6 py-4",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"flex items-center text-sidebar-foreground",children:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:g.jsxs("g",{fill:"currentColor",children:[g.jsx("path",{d:"m22.346,4.836l-3.182-3.182c-.779-.78-2.049-.78-2.828,0l-3.182,3.182c-.78.78-.78,2.048,0,2.828l3.182,3.182c.39.39.902.585,1.414.585s1.024-.195,1.414-.585l3.182-3.182c.78-.78.78-2.048,0-2.828Z",fill:"currentColor",strokeWidth:"0"}),g.jsx("rect",{x:"2",y:"2",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"13",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"2",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"})]})})}),g.jsxs("button",{type:"button",onClick:c,className:"flex shrink-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-sidebar-foreground/70 transition hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","aria-label":"Search components and views",children:[g.jsx(fp,{className:"size-4 shrink-0","aria-hidden":!0}),g.jsx(T3,{})]})]})}),g.jsxs("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[vv("Explore"),g.jsx("button",{type:"button",onClick:()=>l({view:"governance"}),className:Zf(b),children:"Governance"}),g.jsx("button",{type:"button",onClick:()=>l({view:"tokens"}),className:Zf(h),children:"Design tokens"}),vv(p.length>0?`Components (${p.length})`:"Components"),g.jsxs("div",{className:"space-y-0.5",children:[n&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Loading components…"}):null,r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Could not load report"}):null,!n&&!r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"No components in scan"}):null,p.map(_=>{const w=s.view==="component"&&s.componentId===_;return g.jsx("button",{type:"button",onClick:()=>l({view:"component",componentId:_}),className:Zf(w),children:_},_)})]})]}),g.jsxs("div",{className:"shrink-0 border-t border-sidebar-border px-3 py-3",children:[g.jsx("p",{className:"mb-2 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:"Appearance"}),g.jsxs(hw,{type:"single",variant:"outline",size:"sm",spacing:0,className:"w-full",value:u,onValueChange:y,"aria-label":"Color theme",children:[g.jsx(Ns,{value:"light",className:"flex-1","aria-label":"Light theme",title:"Light",children:g.jsx(xw,{className:"size-4","aria-hidden":!0})}),g.jsx(Ns,{value:"dark",className:"flex-1","aria-label":"Dark theme",title:"Dark",children:g.jsx(vw,{className:"size-4","aria-hidden":!0})})]})]})]})}function M3(e){const n=e.typography;return n?n.families.length>0||n.sizes.length>0||(n.weights?.length??0)>0:!1}function O3({catalog:e}){const n=e.typography,r=n?.weights??[];return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Colors"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"From Tailwind theme extensions."}),g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:e.colors.map(s=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:s.value,children:[g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:s.value})}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"truncate font-mono text-xs text-foreground",children:[s.token,"/",s.shade]}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s.value}),g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:s.tw})]})]},`${s.token}-${s.shade}`))})]}),M3(e)&&n?g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Typography"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Font stacks and Tailwind utilities — preview matches your theme tokens."})]}),n.families.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font families"}),g.jsx("ul",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:n.families.map(s=>g.jsxs("li",{className:"rounded-lg border border-border bg-card px-3 py-3",title:s.value,children:[g.jsx("p",{className:`${s.tw} text-sm text-foreground`,children:"The quick brown fox jumps over the lazy dog."}),g.jsx("p",{className:"mt-2 truncate font-mono text-xs text-foreground",children:s.tw}),g.jsx("p",{className:"mt-1 break-all text-xs leading-snug text-muted-foreground",children:s.value})]},s.key))})]}):null,n.families.length>0&&n.sizes.length>0?n.families.map(s=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Type scale · ",s.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(l=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:l.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:l.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate ${s.tw} ${l.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},`${s.key}-${l.token}`))})]},s.key)):n.sizes.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Type scale · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(s=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:s.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:s.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate font-sans ${s.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},s.token))})]}):null,n.families.length>0&&r.length>0?n.families.map(s=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Font weights · ",s.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(l=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:l.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:l.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 ${s.tw} ${l.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},`${s.key}-${l.token}`))})]},`w-${s.key}`)):r.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font weights · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(s=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:s.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:s.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 font-sans ${s.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},s.token))})]}):null]}):null,g.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Spacing"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.spacing.map(s=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:s.token}),g.jsx("span",{className:"text-muted-foreground",children:s.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:s.tw})]},s.token))})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Radius"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.radius.map(s=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:s.token}),g.jsx("span",{className:"text-muted-foreground",children:s.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:s.tw})]},s.token))})]})]})]})}const D3=[{id:"all",label:"All"},{id:"used",label:"Used"},{id:"unused",label:"Unused"}];function OS({title:e,subtitle:n,children:r}){return g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n}),r]})}function _v({row:e}){return e.isUnused?g.jsx("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"unused"}):g.jsxs("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary",children:[e.fileCount," ",e.fileCount===1?"file":"files"]})}function DS({row:e}){return e.referenceCount===0?g.jsx(_v,{row:e}):g.jsxs(kp,{openDelay:200,closeDelay:100,children:[g.jsx(Np,{asChild:!0,children:g.jsx("button",{type:"button",className:"shrink-0",children:g.jsx(_v,{row:e})})}),g.jsxs(Ap,{className:"w-80 text-xs",align:"end",children:[g.jsxs("p",{className:"font-medium text-foreground",children:[e.referenceCount," reference",e.referenceCount===1?"":"s"]}),g.jsxs("ul",{className:"mt-2 max-h-40 space-y-1 overflow-y-auto text-muted-foreground",children:[e.usageFiles.slice(0,12).map(n=>g.jsx("li",{className:"truncate font-mono",children:Ms(n)},n)),e.usageFiles.length>12?g.jsxs("li",{className:"text-muted-foreground/80",children:["+",e.usageFiles.length-12," more"]}):null]})]})]})}function zS({row:e,className:n}){return g.jsxs("div",{className:xe("min-w-0",n),children:[g.jsx("p",{className:"truncate font-mono text-xs text-foreground",children:e.cssName}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.value}),e.tw?g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:e.tw}):null]})}function z3({rows:e}){const n=e.filter(r=>r.category==="color");return n.length===0?null:g.jsx(OS,{title:"Colors",subtitle:"CSS custom properties from @theme and :root.",children:g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:n.map(r=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:r.value,children:[r.displayValue&&/^(#|rgb|oklch|hsl)/.test(r.displayValue.trim())?g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:r.displayValue})}):g.jsx("div",{className:"h-9 w-9 shrink-0 rounded border border-border bg-muted"}),g.jsx(zS,{row:r,className:"flex-1"}),g.jsx(DS,{row:r})]},r.cssName))})})}function qi({title:e,subtitle:n,rows:r,category:s}){const l=r.filter(c=>c.category===s);return l.length===0?null:g.jsx(OS,{title:e,subtitle:n,children:g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:l.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2 text-xs",children:[g.jsx(zS,{row:c,className:"flex-1"}),g.jsx(DS,{row:c})]},c.cssName))})})}function L3({view:e}){const[n,r]=v.useState("all"),s=v.useMemo(()=>X$(e.rows,n),[e.rows,n]);return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-medium text-foreground",children:[e.usedCount,"/",e.totalCount," theme tokens used"]}),g.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Scanned from CSS sources",e.source==="hybrid"?" · enriched with manual catalog":""]})]}),g.jsx("div",{className:"flex gap-1 rounded-lg border border-border bg-muted/50 p-0.5",children:D3.map(l=>g.jsx("button",{type:"button",onClick:()=>r(l.id),className:xe("rounded-md px-3 py-1 text-xs font-medium transition-colors",n===l.id?"bg-card text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),children:l.label},l.id))})]}),g.jsx(z3,{rows:s}),g.jsx(qi,{title:"Spacing",subtitle:"--spacing-* custom properties.",rows:s,category:"spacing"}),g.jsx(qi,{title:"Radius",subtitle:"--radius-* custom properties.",rows:s,category:"radius"}),g.jsx(qi,{title:"Typography",subtitle:"--font-* custom properties.",rows:s,category:"typography"}),g.jsx(qi,{title:"Other",subtitle:"Additional CSS variables.",rows:s,category:"other"})]})}function B3({tokenCatalog:e,dslinterReport:n}){const r=v.useMemo(()=>Y$(n,e),[n,e]),s=r!=null&&r.rows.length>0,l=e!=null;return g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"System"}),g.jsx("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:"Design tokens"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:s?"CSS variables discovered from your stylesheets, with used vs unused usage across the repo.":"Supply a catalog object (same shape as your Tailwind theme docs) — keep it aligned with your design tokens."})]}),g.jsx("div",{className:"min-w-0 w-full px-8 py-8",children:g.jsx("div",{className:"rounded-ds-lg border border-border bg-card p-6 text-card-foreground shadow-xs",children:s&&r?g.jsx(L3,{view:r}):l?g.jsx(O3,{catalog:e}):g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Run ",g.jsx("span",{className:"font-mono",children:"dslinter --json"})," on a project with CSS token sources, or pass a"," ",g.jsx("span",{className:"font-mono",children:"tokenCatalog"})," prop."]})})})]})}var wv=1,U3=.9,G3=.8,I3=.17,Qf=.1,Wf=.999,H3=.9999,P3=.99,q3=/[\\\/_+.#"@\[\(\{&]/,V3=/[\\\/_+.#"@\[\(\{&]/g,F3=/[\s-]/,LS=/[\s-]/g;function Bm(e,n,r,s,l,c,u){if(c===n.length)return l===e.length?wv:P3;var f=`${l},${c}`;if(u[f]!==void 0)return u[f];for(var p=s.charAt(c),h=r.indexOf(p,l),b=0,y,_,w,S;h>=0;)y=Bm(e,n,r,s,h+1,c+1,u),y>b&&(h===l?y*=wv:q3.test(e.charAt(h-1))?(y*=G3,w=e.slice(l,h-1).match(V3),w&&l>0&&(y*=Math.pow(Wf,w.length))):F3.test(e.charAt(h-1))?(y*=U3,S=e.slice(l,h-1).match(LS),S&&l>0&&(y*=Math.pow(Wf,S.length))):(y*=I3,l>0&&(y*=Math.pow(Wf,h-l))),e.charAt(h)!==n.charAt(c)&&(y*=H3)),(y<Qf&&r.charAt(h-1)===s.charAt(c+1)||s.charAt(c+1)===s.charAt(c)&&r.charAt(h-1)!==s.charAt(c))&&(_=Bm(e,n,r,s,h+1,c+2,u),_*Qf>y&&(y=_*Qf)),y>b&&(b=y),h=r.indexOf(p,h+1);return u[f]=b,b}function Sv(e){return e.toLowerCase().replace(LS," ")}function Y3(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Bm(e,n,Sv(e),Sv(n),0,0,{})}var Ho='[cmdk-group=""]',Jf='[cmdk-group-items=""]',X3='[cmdk-group-heading=""]',BS='[cmdk-item=""]',Cv=`${BS}:not([aria-disabled="true"])`,Um="cmdk-item-select",Es="data-value",K3=(e,n,r)=>Y3(e,n,r),US=v.createContext(void 0),dl=()=>v.useContext(US),GS=v.createContext(void 0),jp=()=>v.useContext(GS),IS=v.createContext(void 0),HS=v.forwardRef((e,n)=>{let r=ks(()=>{var R,q;return{search:"",value:(q=(R=e.value)!=null?R:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=ks(()=>new Set),l=ks(()=>new Map),c=ks(()=>new Map),u=ks(()=>new Set),f=PS(e),{label:p,children:h,value:b,onValueChange:y,filter:_,shouldFilter:w,loop:S,disablePointerSelection:$=!1,vimBindings:E=!0,...N}=e,k=Qt(),j=Qt(),z=Qt(),I=v.useRef(null),F=oD();jr(()=>{if(b!==void 0){let R=b.trim();r.current.value=R,U.emit()}},[b]),jr(()=>{F(6,ye)},[]);let U=v.useMemo(()=>({subscribe:R=>(u.current.add(R),()=>u.current.delete(R)),snapshot:()=>r.current,setState:(R,q,Q)=>{var K,ne,W,he;if(!Object.is(r.current[R],q)){if(r.current[R]=q,R==="search")se(),pe(),F(1,fe);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let oe=document.getElementById(z);oe?oe.focus():(K=document.getElementById(k))==null||K.focus()}if(F(7,()=>{var oe;r.current.selectedItemId=(oe=ae())==null?void 0:oe.id,U.emit()}),Q||F(5,ye),((ne=f.current)==null?void 0:ne.value)!==void 0){let oe=q??"";(he=(W=f.current).onValueChange)==null||he.call(W,oe);return}}U.emit()}},emit:()=>{u.current.forEach(R=>R())}}),[]),H=v.useMemo(()=>({value:(R,q,Q)=>{var K;q!==((K=c.current.get(R))==null?void 0:K.value)&&(c.current.set(R,{value:q,keywords:Q}),r.current.filtered.items.set(R,re(q,Q)),F(2,()=>{pe(),U.emit()}))},item:(R,q)=>(s.current.add(R),q&&(l.current.has(q)?l.current.get(q).add(R):l.current.set(q,new Set([R]))),F(3,()=>{se(),pe(),r.current.value||fe(),U.emit()}),()=>{c.current.delete(R),s.current.delete(R),r.current.filtered.items.delete(R);let Q=ae();F(4,()=>{se(),Q?.getAttribute("id")===R&&fe(),U.emit()})}),group:R=>(l.current.has(R)||l.current.set(R,new Set),()=>{c.current.delete(R),l.current.delete(R)}),filter:()=>f.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:k,inputId:z,labelId:j,listInnerRef:I}),[]);function re(R,q){var Q,K;let ne=(K=(Q=f.current)==null?void 0:Q.filter)!=null?K:K3;return R?ne(R,r.current.search,q):0}function pe(){if(!r.current.search||f.current.shouldFilter===!1)return;let R=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(K=>{let ne=l.current.get(K),W=0;ne.forEach(he=>{let oe=R.get(he);W=Math.max(oe,W)}),q.push([K,W])});let Q=I.current;le().sort((K,ne)=>{var W,he;let oe=K.getAttribute("id"),Ee=ne.getAttribute("id");return((W=R.get(Ee))!=null?W:0)-((he=R.get(oe))!=null?he:0)}).forEach(K=>{let ne=K.closest(Jf);ne?ne.appendChild(K.parentElement===ne?K:K.closest(`${Jf} > *`)):Q.appendChild(K.parentElement===Q?K:K.closest(`${Jf} > *`))}),q.sort((K,ne)=>ne[1]-K[1]).forEach(K=>{var ne;let W=(ne=I.current)==null?void 0:ne.querySelector(`${Ho}[${Es}="${encodeURIComponent(K[0])}"]`);W?.parentElement.appendChild(W)})}function fe(){let R=le().find(Q=>Q.getAttribute("aria-disabled")!=="true"),q=R?.getAttribute(Es);U.setState("value",q||void 0)}function se(){var R,q,Q,K;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=s.current.size;return}r.current.filtered.groups=new Set;let ne=0;for(let W of s.current){let he=(q=(R=c.current.get(W))==null?void 0:R.value)!=null?q:"",oe=(K=(Q=c.current.get(W))==null?void 0:Q.keywords)!=null?K:[],Ee=re(he,oe);r.current.filtered.items.set(W,Ee),Ee>0&&ne++}for(let[W,he]of l.current)for(let oe of he)if(r.current.filtered.items.get(oe)>0){r.current.filtered.groups.add(W);break}r.current.filtered.count=ne}function ye(){var R,q,Q;let K=ae();K&&(((R=K.parentElement)==null?void 0:R.firstChild)===K&&((Q=(q=K.closest(Ho))==null?void 0:q.querySelector(X3))==null||Q.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function ae(){var R;return(R=I.current)==null?void 0:R.querySelector(`${BS}[aria-selected="true"]`)}function le(){var R;return Array.from(((R=I.current)==null?void 0:R.querySelectorAll(Cv))||[])}function O(R){let q=le()[R];q&&U.setState("value",q.getAttribute(Es))}function Y(R){var q;let Q=ae(),K=le(),ne=K.findIndex(he=>he===Q),W=K[ne+R];(q=f.current)!=null&&q.loop&&(W=ne+R<0?K[K.length-1]:ne+R===K.length?K[0]:K[ne+R]),W&&U.setState("value",W.getAttribute(Es))}function J(R){let q=ae(),Q=q?.closest(Ho),K;for(;Q&&!K;)Q=R>0?rD(Q,Ho):sD(Q,Ho),K=Q?.querySelector(Cv);K?U.setState("value",K.getAttribute(Es)):Y(R)}let de=()=>O(le().length-1),ee=R=>{R.preventDefault(),R.metaKey?de():R.altKey?J(1):Y(1)},T=R=>{R.preventDefault(),R.metaKey?O(0):R.altKey?J(-1):Y(-1)};return v.createElement(la.div,{ref:n,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:R=>{var q;(q=N.onKeyDown)==null||q.call(N,R);let Q=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||Q))switch(R.key){case"n":case"j":{E&&R.ctrlKey&&ee(R);break}case"ArrowDown":{ee(R);break}case"p":case"k":{E&&R.ctrlKey&&T(R);break}case"ArrowUp":{T(R);break}case"Home":{R.preventDefault(),O(0);break}case"End":{R.preventDefault(),de();break}case"Enter":{R.preventDefault();let K=ae();if(K){let ne=new Event(Um);K.dispatchEvent(ne)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:iD},p),Wc(e,R=>v.createElement(GS.Provider,{value:U},v.createElement(US.Provider,{value:H},R))))}),Z3=v.forwardRef((e,n)=>{var r,s;let l=Qt(),c=v.useRef(null),u=v.useContext(IS),f=dl(),p=PS(e),h=(s=(r=p.current)==null?void 0:r.forceMount)!=null?s:u?.forceMount;jr(()=>{if(!h)return f.item(l,u?.id)},[h]);let b=qS(l,c,[e.value,e.children,c],e.keywords),y=jp(),_=Pa(F=>F.value&&F.value===b.current),w=Pa(F=>h||f.filter()===!1?!0:F.search?F.filtered.items.get(l)>0:!0);v.useEffect(()=>{let F=c.current;if(!(!F||e.disabled))return F.addEventListener(Um,S),()=>F.removeEventListener(Um,S)},[w,e.onSelect,e.disabled]);function S(){var F,U;$(),(U=(F=p.current).onSelect)==null||U.call(F,b.current)}function $(){y.setState("value",b.current,!0)}if(!w)return null;let{disabled:E,value:N,onSelect:k,forceMount:j,keywords:z,...I}=e;return v.createElement(la.div,{ref:Ua(c,n),...I,id:l,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!_,"data-disabled":!!E,"data-selected":!!_,onPointerMove:E||f.getDisablePointerSelection()?void 0:$,onClick:E?void 0:S},e.children)}),Q3=v.forwardRef((e,n)=>{let{heading:r,children:s,forceMount:l,...c}=e,u=Qt(),f=v.useRef(null),p=v.useRef(null),h=Qt(),b=dl(),y=Pa(w=>l||b.filter()===!1?!0:w.search?w.filtered.groups.has(u):!0);jr(()=>b.group(u),[]),qS(u,f,[e.value,e.heading,p]);let _=v.useMemo(()=>({id:u,forceMount:l}),[l]);return v.createElement(la.div,{ref:Ua(f,n),...c,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),Wc(e,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(IS.Provider,{value:_},w))))}),W3=v.forwardRef((e,n)=>{let{alwaysRender:r,...s}=e,l=v.useRef(null),c=Pa(u=>!u.search);return!r&&!c?null:v.createElement(la.div,{ref:Ua(l,n),...s,"cmdk-separator":"",role:"separator"})}),J3=v.forwardRef((e,n)=>{let{onValueChange:r,...s}=e,l=e.value!=null,c=jp(),u=Pa(h=>h.search),f=Pa(h=>h.selectedItemId),p=dl();return v.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),v.createElement(la.input,{ref:n,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":f,id:p.inputId,type:"text",value:l?e.value:u,onChange:h=>{l||c.setState("search",h.target.value),r?.(h.target.value)}})}),eD=v.forwardRef((e,n)=>{let{children:r,label:s="Suggestions",...l}=e,c=v.useRef(null),u=v.useRef(null),f=Pa(h=>h.selectedItemId),p=dl();return v.useEffect(()=>{if(u.current&&c.current){let h=u.current,b=c.current,y,_=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=h.offsetHeight;b.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return _.observe(h),()=>{cancelAnimationFrame(y),_.unobserve(h)}}},[]),v.createElement(la.div,{ref:Ua(c,n),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":s,id:p.listId},Wc(e,h=>v.createElement("div",{ref:Ua(u,p.listInnerRef),"cmdk-list-sizer":""},h)))}),tD=v.forwardRef((e,n)=>{let{open:r,onOpenChange:s,overlayClassName:l,contentClassName:c,container:u,...f}=e;return v.createElement(A0,{open:r,onOpenChange:s},v.createElement(j0,{container:u},v.createElement(T0,{"cmdk-overlay":"",className:l}),v.createElement(R0,{"aria-label":e.label,"cmdk-dialog":"",className:c},v.createElement(HS,{ref:n,...f}))))}),nD=v.forwardRef((e,n)=>Pa(r=>r.filtered.count===0)?v.createElement(la.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),aD=v.forwardRef((e,n)=>{let{progress:r,children:s,label:l="Loading...",...c}=e;return v.createElement(la.div,{ref:n,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},Wc(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),Ps=Object.assign(HS,{List:eD,Item:Z3,Input:J3,Group:Q3,Separator:W3,Dialog:tD,Empty:nD,Loading:aD});function rD(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function sD(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function PS(e){let n=v.useRef(e);return jr(()=>{n.current=e}),n}var jr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ks(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function Pa(e){let n=jp(),r=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,r,r)}function qS(e,n,r,s=[]){let l=v.useRef(),c=dl();return jr(()=>{var u;let f=(()=>{var h;for(let b of r){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(h=b.current.textContent)==null?void 0:h.trim():l.current}})(),p=s.map(h=>h.trim());c.value(e,f,p),(u=n.current)==null||u.setAttribute(Es,f),l.current=f}),l}var oD=()=>{let[e,n]=v.useState(),r=ks(()=>new Map);return jr(()=>{r.current.forEach(s=>s()),r.current=new Map},[e]),(s,l)=>{r.current.set(s,l),n({})}};function lD(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Wc({asChild:e,children:n},r){return e&&v.isValidElement(n)?v.cloneElement(lD(n),{ref:n.ref},r(n.props.children)):r(n)}var iD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function cD({...e}){return g.jsx(A0,{"data-slot":"dialog",...e})}function uD({...e}){return g.jsx(j0,{"data-slot":"dialog-portal",...e})}function dD({className:e,...n}){return g.jsx(T0,{"data-slot":"dialog-overlay",className:xe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...n})}function fD({className:e,children:n,showCloseButton:r=!0,...s}){return g.jsxs(uD,{"data-slot":"dialog-portal",children:[g.jsx(dD,{}),g.jsxs(R0,{"data-slot":"dialog-content",className:xe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...s,children:[n,r&&g.jsxs(HN,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(yw,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function mD({className:e,...n}){return g.jsx("div",{"data-slot":"dialog-header",className:xe("flex flex-col gap-2 text-center sm:text-left",e),...n})}function pD({className:e,...n}){return g.jsx(GN,{"data-slot":"dialog-title",className:xe("text-lg leading-none font-semibold",e),...n})}function hD({className:e,...n}){return g.jsx(IN,{"data-slot":"dialog-description",className:xe("text-sm text-muted-foreground",e),...n})}function gD({className:e,...n}){return g.jsx(Ps,{"data-slot":"command",className:xe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n})}function bD({title:e="Command Palette",description:n="Search for a command to run...",children:r,className:s,showCloseButton:l=!0,...c}){return g.jsxs(cD,{...c,children:[g.jsxs(mD,{className:"sr-only",children:[g.jsx(pD,{children:e}),g.jsx(hD,{children:n})]}),g.jsx(fD,{className:xe("overflow-hidden p-0",s),showCloseButton:l,children:g.jsx(gD,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function yD({className:e,...n}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(fp,{className:"size-4 shrink-0 opacity-50","aria-hidden":!0}),g.jsx(Ps.Input,{"data-slot":"command-input",className:xe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function xD({className:e,...n}){return g.jsx(Ps.List,{"data-slot":"command-list",className:xe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function vD({...e}){return g.jsx(Ps.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function em({className:e,...n}){return g.jsx(Ps.Group,{"data-slot":"command-group",className:xe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n})}function tm({className:e,...n}){return g.jsx(Ps.Item,{"data-slot":"command-item",className:xe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n})}function _D(e){if(!e||!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"}function wD({catalogNames:e,onNavigate:n,open:r,onOpenChange:s}){const l=v.useCallback(()=>s(!1),[s]);return v.useEffect(()=>{const c=u=>{!(u.metaKey||u.ctrlKey)||u.key!=="k"||!r&&_D(u.target)||(u.preventDefault(),s(!r))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[r,s]),g.jsxs(bD,{open:r,onOpenChange:s,title:"Jump to",description:"Search components and views",children:[g.jsx(yD,{placeholder:"Search components…"}),g.jsxs(xD,{children:[g.jsx(vD,{children:"No matches."}),g.jsx(em,{heading:"Explore",children:g.jsx(tm,{value:"governance explore overview",onSelect:()=>{n({view:"governance"}),l()},children:"Governance"})}),e.length>0?g.jsx(em,{heading:"Components",children:e.map(c=>g.jsx(tm,{value:c,onSelect:()=>{n({view:"component",componentId:c}),l()},children:c},c))}):null,g.jsx(em,{heading:"System",children:g.jsx(tm,{value:"tokens design system colors",onSelect:()=>{n({view:"tokens"}),l()},children:"Design tokens"})})]})]})}const _r="#!/";function SD(e){return e.startsWith(_r)?e.slice(_r.length):e.startsWith("#")?e.slice(1):e}function CD(e){const n=SD(e).trim();if(n===""||n==="overview")return{view:"governance"};if(n==="tokens")return{view:"tokens"};if(n==="governance")return{view:"governance"};if(n.startsWith("governance/")){const r=decodeURIComponent(n.slice(11));if(r.length>0)return{view:"component",componentId:r}}if(n.startsWith("component/")){const r=decodeURIComponent(n.slice(10));if(r.length>0)return{view:"component",componentId:r}}return{view:"governance"}}function $D(e){switch(e.view){case"tokens":return`${_r}tokens`;case"governance":return e.catalog?`${_r}governance/${encodeURIComponent(e.catalog)}`:`${_r}governance`;case"component":return`${_r}component/${encodeURIComponent(e.componentId)}`;default:return`${_r}governance`}}function ED(e){return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)}function kD(){return window.location.hash||"#!/governance"}function ND(){return"#!/governance"}function AD(){const e=v.useSyncExternalStore(ED,kD,ND),n=CD(e),r=v.useCallback(s=>{const l=$D(s);l!==window.location.hash&&(window.location.hash=l)},[]);return[n,r]}const jD=v.lazy(()=>eE(()=>import("./DashboardLayoutAuto-DgwO_itB.js"),__vite__mapDeps([0,1]))),Zo="dslinter-dashboard-theme";function TD(){if(typeof window>"u")return null;try{const e="dslinter-workbench-theme";let n=localStorage.getItem(Zo);if(n==null&&(n=localStorage.getItem(e),(n==="light"||n==="dark")&&(localStorage.setItem(Zo,n),localStorage.removeItem(e))),n==="light"||n==="dark")return n;if(n==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return localStorage.setItem(Zo,r),r}}catch{}return null}function RD(){return TD()??"light"}const VS=v.createContext(null);function $v({children:e}){const[n,r]=v.useState(()=>RD()),s=v.useCallback(c=>{r(c)},[]);v.useEffect(()=>{try{localStorage.setItem(Zo,n)}catch{}},[n]),v.useEffect(()=>{const c=u=>{u.key!==Zo||u.newValue==null||(u.newValue==="light"||u.newValue==="dark")&&r(u.newValue)};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]);const l=v.useMemo(()=>({theme:n,setTheme:s,resolvedTheme:n}),[n,s]);return g.jsx(VS.Provider,{value:l,children:e})}function MD(){const e=v.useContext(VS);if(!e)throw new Error("useDashboardTheme must be used within DashboardThemeProvider");return e}function OD({playgroundEntries:e,playgroundJoinSkips:n,tokenCatalog:r,overview:s,reportUrl:l,dslinterReportHint:c,formatModulePath:u,dslinterReport:f}){const[p,h]=AD(),[b,y]=v.useState(!1),{theme:_,setTheme:w,resolvedTheme:S}=MD(),$=v.useMemo(()=>Vm(f.report),[f.report]),E=!f.loading&&f.error==null&&f.report!=null;let N;if(p.view==="tokens")N=g.jsx(B3,{tokenCatalog:r,dslinterReport:f.report});else if(p.view==="governance")N=g.jsx(j3,{landing:s,reportUrl:l,dslinterReportHint:c,dslinterReport:f,onOpenComponent:k=>h({view:"component",componentId:k})});else{const k=p.componentId,j=P$(e,k),z=$.includes(k),I=f.report?.playgrounds?.some(F=>F.export_name===k||F.id===k)??!1;j?N=g.jsx(S3,{entry:j,formatModulePath:u,workspaceReport:f.report,reportReady:E}):z?N=g.jsx(fj,{componentId:k,workspaceReport:f.report,reportReady:E,hasPlaygroundSpec:I,playgroundJoinSkip:j$(n,k),onBackToGovernance:()=>h({view:"governance"})}):N=g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-muted/40 px-8 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Unknown component"}),g.jsxs("p",{className:"max-w-md text-xs text-muted-foreground",children:[g.jsx("span",{className:"font-mono",children:k})," is not in the latest scan catalog."]}),g.jsx(_c,{type:"button",size:"sm",onClick:()=>h({view:"governance"}),children:"Back to governance"})]})}return g.jsxs("div",{className:xe("flex h-screen min-h-0 bg-background text-foreground",S==="dark"&&"dark"),children:[g.jsx(wD,{catalogNames:$,onNavigate:h,open:b,onOpenChange:y}),g.jsx(R3,{report:f.report,reportLoading:f.loading,reportError:f.error,route:p,onNavigate:h,onOpenCommandPalette:()=>y(!0),theme:_,onThemeChange:w}),g.jsx("div",{className:"ml-[240px] flex min-h-0 min-w-0 flex-1 flex-col",children:N})]})}function DD(e){return e.autoPlayground?g.jsx($v,{children:g.jsx(v.Suspense,{fallback:null,children:g.jsx(jD,{...e})})}):g.jsx($v,{children:g.jsx(OD,{...e,playgroundEntries:e.playgroundEntries??[],playgroundJoinSkips:e.playgroundJoinSkips})})}async function zD(e){const n=await fetch(e,{cache:"no-store"});if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);return n.json()}function LD(e="/dslint-report.json"){const{reportUrl:n="/dslint-report.json",watchUrl:r,refreshIntervalMs:s=0}=typeof e=="string"?{reportUrl:e}:e,[l,c]=v.useState(null),[u,f]=v.useState(null),[p,h]=v.useState(!0),b=v.useRef(null),y=(_,w,S)=>{const $=S?.showLoading!==!1;$&&(f(null),h(!0)),zD(_).then(E=>{w.value||c(E)}).catch(E=>{w.value||f(E instanceof Error?E.message:"Failed to load report")}).finally(()=>{!w.value&&$&&h(!1)})};return v.useEffect(()=>{const _={value:!1};return y(n,_,{showLoading:!0}),()=>{_.value=!0}},[n]),v.useEffect(()=>{if(!r)return;const _=new EventSource(r),w={value:!1};return _.onmessage=S=>{w.value||S.data==="updated"&&y(n,w,{showLoading:!1})},_.onerror=()=>{},()=>{w.value=!0,_.close()}},[r,n]),v.useEffect(()=>{if(r||s<=0)return;const _={value:!1},w=setInterval(async()=>{if(!_.value)try{const S=await fetch(n,{method:"HEAD",cache:"no-store"}),$=S.headers.get("ETag")??S.headers.get("Last-Modified")??null;if($&&$===b.current)return;b.current=$,y(n,_,{showLoading:!1})}catch{}},s);return()=>{_.value=!0,clearInterval(w)}},[r,s,n]),{report:l,error:u,loading:p}}const BD={colors:[{token:"primary",shade:"DEFAULT",value:"#2563eb",tw:"bg-primary"},{token:"primary",shade:"foreground",value:"#ffffff",tw:"text-primary-foreground"},{token:"surface",shade:"DEFAULT",value:"#f8fafc",tw:"bg-surface"},{token:"surface",shade:"elevated",value:"#ffffff",tw:"bg-surface-elevated"},{token:"surface",shade:"border",value:"#e2e8f0",tw:"border-surface-border"},{token:"danger",shade:"DEFAULT",value:"#dc2626",tw:"text-danger"}],spacing:[{token:"layout-xs",value:"0.5rem",tw:"p-layout-xs"},{token:"layout-sm",value:"1rem",tw:"p-layout-sm"},{token:"layout-md",value:"1.5rem",tw:"p-layout-md"},{token:"layout-lg",value:"2rem",tw:"p-layout-lg"}],radius:[{token:"ds",value:"0.5rem",tw:"rounded-ds"},{token:"ds-lg",value:"0.75rem",tw:"rounded-ds-lg"}],typography:{families:[...Q$],sizes:[...K$],weights:[...Z$]}};function UD(){const e=LD({reportUrl:"/dslint-report.json",watchUrl:"/events",refreshIntervalMs:0});return g.jsx(DD,{autoPlayground:!0,tokenCatalog:BD,dslinterReport:e,dslinterReportHint:"dslinter (watch + serve)"})}S$.createRoot(document.getElementById("root")).render(g.jsx(ut.StrictMode,{children:g.jsx(UD,{})}));export{DD as D,ut as R,OD as a,ID as b,S$ as c,$$ as d,GD as e,Q$ as f,K$ as g,Z$ as h,g as j,v as r,LD as u};
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>DSLinter</title>
7
- <script type="module" crossorigin src="/assets/index-DsjwnDdX.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-jaCmZJlW.css">
7
+ <script type="module" crossorigin src="/assets/index-e20cwqnb.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-Cbv7vXvH.css">
9
9
  </head>
10
10
  <body class="bg-background antialiased">
11
11
  <div id="root"></div>