glyphx 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -17
- package/dist/index.css +1 -0
- package/dist/index.js +581 -558
- package/dist/index.umd.cjs +12 -16
- package/package.json +14 -7
- package/dist/vite.svg +0 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(me,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],G):(me=typeof globalThis<"u"?globalThis:me||self,G(me.Glyph={},me.React,me.ReactDOM))})(this,(function(me,G,dt){"use strict";function vt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=vt(G),
|
|
1
|
+
(function(me,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],G):(me=typeof globalThis<"u"?globalThis:me||self,G(me.Glyph={},me.React,me.ReactDOM))})(this,(function(me,G,dt){"use strict";function vt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=vt(G),mn=vt(dt);function hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var je={exports:{}},Ae={};var pt;function gn(){if(pt)return Ae;pt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var c=null;if(a!==void 0&&(c=""+a),o.key!==void 0&&(c=""+o.key),"key"in o){a={};for(var s in o)s!=="key"&&(a[s]=o[s])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:c,ref:o!==void 0?o:null,props:a}}return Ae.Fragment=t,Ae.jsx=n,Ae.jsxs=n,Ae}var De={};var mt;function yn(){return mt||(mt=1,process.env.NODE_ENV!=="production"&&(function(){function e(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===Q?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case R:return"Fragment";case j:return"Profiler";case T:return"StrictMode";case X:return"Suspense";case I:return"SuspenseList";case ce:return"Activity"}if(typeof f=="object")switch(typeof f.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case g:return"Portal";case B:return f.displayName||"Context";case M:return(f._context.displayName||"Context")+".Consumer";case Y:var O=f.render;return f=f.displayName,f||(f=O.displayName||O.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case K:return O=f.displayName||null,O!==null?O:e(f.type)||"Memo";case re:O=f._payload,f=f._init;try{return e(f(O))}catch{}}return null}function t(f){return""+f}function n(f){try{t(f);var O=!1}catch{O=!0}if(O){O=console;var U=O.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return U.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),t(f)}}function r(f){if(f===R)return"<>";if(typeof f=="object"&&f!==null&&f.$$typeof===re)return"<...>";try{var O=e(f);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function o(){var f=ae.A;return f===null?null:f.getOwner()}function a(){return Error("react-stack-top-frame")}function c(f){if(Pe.call(f,"key")){var O=Object.getOwnPropertyDescriptor(f,"key").get;if(O&&O.isReactWarning)return!1}return f.key!==void 0}function s(f,O){function U(){de||(de=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",O))}U.isReactWarning=!0,Object.defineProperty(f,"key",{get:U,configurable:!0})}function h(){var f=e(this.type);return Te[f]||(Te[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function d(f,O,U,u,l,v){var p=U.ref;return f={$$typeof:$,type:f,key:O,props:U,_owner:u},(p!==void 0?p:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:h}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:v}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function E(f,O,U,u,l,v){var p=O.children;if(p!==void 0)if(u)if(ye(p)){for(u=0;u<p.length;u++)y(p[u]);Object.freeze&&Object.freeze(p)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(p);if(Pe.call(O,"key")){p=e(f);var w=Object.keys(O).filter(function(m){return m!=="key"});u=0<w.length?"{key: someKey, "+w.join(": ..., ")+": ...}":"{key: someKey}",H[p+u]||(w=0<w.length?"{"+w.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,l,p,w,p),H[p+l]=!0)}if(p=null,U!==void 0&&(n(U),p=""+U),c(P)&&(n(P.key),p=""+P.key),"key"in P){U={};for(var x in P)x!=="key"&&(U[x]=P[x])}else U=P;return p&&s(U,typeof f=="function"?f.displayName||f.name||"Unknown":f),d(f,p,U,o(),u,v)}function y(f){C(f)?f._store&&(f._store.validated=1):typeof f=="object"&&f!==null&&f.$$typeof===re&&(f._payload.status==="fulfilled"?C(f._payload.value)&&f._payload.value._store&&(f._payload.value._store.validated=1):f._store&&(f._store.validated=1))}function C(f){return typeof f=="object"&&f!==null&&f.$$typeof===$}var _=G,$=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),B=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),ae=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ne=Object.prototype.hasOwnProperty,ye=Array.isArray,be=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(f){return f()}};var de,Te={},ee=_.react_stack_bottom_frame.bind(_,a)(),Ae=be(r(a)),H={};De.Fragment=R,De.jsx=function(f,P,U){var l=1e4>ae.recentlyCreatedOwnerStacks++;return E(f,P,U,!1,l?Error("react-stack-top-frame"):ee,l?be(r(f)):Ae)},De.jsxs=function(f,P,U){var l=1e4>ae.recentlyCreatedOwnerStacks++;return E(f,P,U,!0,l?Error("react-stack-top-frame"):ee,l?be(r(f)):Ae)}})()),De}var ht;function gn(){return ht||(ht=1,process.env.NODE_ENV==="production"?je.exports=mn():je.exports=hn()),je.exports}var b=gn();const gt=e=>{let t;const n=new Set,r=(d,E)=>{const y=typeof d=="function"?d(t):d;if(!Object.is(y,t)){const C=t;t=E??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(_=>_(t,C))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>h,subscribe:d=>(n.add(d),()=>n.delete(d))},h=t=e(r,o,s);return s},yn=(e=>e?gt(e):gt),bn=e=>e;function En(e,t=bn){const n=G.useSyncExternalStore(e.subscribe,G.useCallback(()=>t(e.getState()),[e,t]),G.useCallback(()=>t(e.getInitialState()),[e,t]));return G.useDebugValue(n),n}const yt=e=>{const t=yn(e),n=r=>En(t,r);return Object.assign(n,t),n},xn=(e=>e?yt(e):yt);function wn(e){return e.map(t=>{const n=[t.title,t.subtitle,...t.keywords??[]];return{...t,searchText:n.join(" ").toLowerCase()}})}var Me={exports:{}},Sn=Me.exports,bt;function _n(){return bt||(bt=1,(function(e){((t,n)=>{e.exports?e.exports=n():t.fuzzysort=n()})(Sn,t=>{var n=(l,u)=>{if(!l||!u)return H;var v=$(l);de(u)||(u=_(u));var p=v.bitflags;return(p&u._bitflags)!==p?H:R(v,u)},r=(l,u,v)=>{if(!l)return v?.all?g(u,v):Ae;var p=$(l),w=p.bitflags,x=p.containsSpace,m=y(v?.threshold||0),O=v?.limit||Te,S=0,k=0,I=u.length;function se(_e){S<O?(U.add(_e),++S):(++k,_e._score>U.peek()._score&&U.replaceTop(_e))}if(v?.key)for(var te=v.key,L=0;L<I;++L){var oe=u[L],F=be(oe,te);if(F&&(de(F)||(F=_(F)),(w&F._bitflags)===w)){var z=R(p,F);z!==H&&(z._score<m||(z.obj=oe,se(z)))}}else if(v?.keys){var Ee=v.keys,ue=Ee.length;e:for(var L=0;L<I;++L){var oe=u[L];{for(var ne=0,D=0;D<ue;++D){var te=Ee[D],F=be(oe,te);if(!F){Ne[D]=f;continue}de(F)||(F=_(F)),Ne[D]=F,ne|=F._bitflags}if((w&ne)!==w)continue}if(x)for(let W=0;W<p.spaceSearches.length;W++)Q[W]=ee;for(var D=0;D<ue;++D){if(F=Ne[D],F===f){ye[D]=f;continue}if(ye[D]=R(p,F,!1,x),ye[D]===H){ye[D]=f;continue}if(x)for(let V=0;V<p.spaceSearches.length;V++){if(ae[V]>-1e3&&Q[V]>ee){var Z=(Q[V]+ae[V])/4;Z>Q[V]&&(Q[V]=Z)}ae[V]>Q[V]&&(Q[V]=ae[V])}}if(x){for(let W=0;W<p.spaceSearches.length;W++)if(Q[W]===ee)continue e}else{var N=!1;for(let W=0;W<ue;W++)if(ye[W]._score!==ee){N=!0;break}if(!N)continue}var ie=new h(ue);for(let W=0;W<ue;W++)ie[W]=ye[W];if(x){var q=0;for(let W=0;W<p.spaceSearches.length;W++)q+=Q[W]}else{var q=ee;for(let V=0;V<ue;V++){var z=ie[V];if(z._score>-1e3&&q>ee){var Z=(q+z._score)/4;Z>q&&(q=Z)}z._score>q&&(q=z._score)}}if(ie.obj=oe,ie._score=q,v?.scoreFn){if(q=v.scoreFn(ie),!q)continue;q=y(q),ie._score=q}q<m||se(ie)}}else for(var L=0;L<I;++L){var F=u[L];if(F&&(de(F)||(F=_(F)),(w&F._bitflags)===w)){var z=R(p,F);z!==H&&(z._score<m||se(z))}}if(S===0)return Ae;for(var xe=new Array(S),L=S-1;L>=0;--L)xe[L]=U.poll();return xe.total=S+k,xe},o=(l,u="<b>",v="</b>")=>{for(var p=typeof u=="function"?u:void 0,w=l.target,x=w.length,m=l.indexes,O="",S=0,k=0,I=!1,se=[],te=0;te<x;++te){var L=w[te];if(m[k]===te){if(++k,I||(I=!0,p?(se.push(O),O=""):O+=u),k===m.length){p?(O+=L,se.push(p(O,S++)),O="",se.push(w.substr(te+1))):O+=L+v+w.substr(te+1);break}}else I&&(I=!1,p?(se.push(p(O,S++)),O=""):O+=v);O+=L}return p?se:O},a=l=>{typeof l=="number"?l=""+l:typeof l!="string"&&(l="");var u=M(l);return d(l,{_targetLower:u._lower,_targetLowerCodes:u.lowerCodes,_bitflags:u.bitflags})},c=()=>{X.clear(),A.clear()};class s{get indexes(){return this._indexes.slice(0,this._indexes.len).sort((u,v)=>u-v)}set indexes(u){return this._indexes=u}highlight(u,v){return o(this,u,v)}get score(){return E(this._score)}set score(u){this._score=y(u)}}class h extends Array{get score(){return E(this._score)}set score(u){this._score=y(u)}}var d=(l,u)=>{const v=new s;return v.target=l,v.obj=u.obj??H,v._score=u._score??ee,v._indexes=u._indexes??[],v._targetLower=u._targetLower??"",v._targetLowerCodes=u._targetLowerCodes??H,v._nextBeginningIndexes=u._nextBeginningIndexes??H,v._bitflags=u._bitflags??0,v},E=l=>l===ee?0:l>1?l:Math.E**(((-l+1)**.04307-1)*-2),y=l=>l===0?ee:l>1?l:1-Math.pow(Math.log(l)/-2+1,1/.04307),C=l=>{typeof l=="number"?l=""+l:typeof l!="string"&&(l=""),l=l.trim();var u=M(l),v=[];if(u.containsSpace){var p=l.split(/\s+/);p=[...new Set(p)];for(var w=0;w<p.length;w++)if(p[w]!==""){var x=M(p[w]);v.push({lowerCodes:x.lowerCodes,_lower:p[w].toLowerCase(),containsSpace:!1})}}return{lowerCodes:u.lowerCodes,_lower:u._lower,containsSpace:u.containsSpace,bitflags:u.bitflags,spaceSearches:v}},_=l=>{if(l.length>999)return a(l);var u=X.get(l);return u!==void 0||(u=a(l),X.set(l,u)),u},$=l=>{if(l.length>999)return C(l);var u=A.get(l);return u!==void 0||(u=C(l),A.set(l,u)),u},g=(l,u)=>{var v=[];v.total=l.length;var p=u?.limit||Te;if(u?.key)for(var w=0;w<l.length;w++){var x=l[w],m=be(x,u.key);if(m!=H){de(m)||(m=_(m));var O=d(m.target,{_score:m._score,obj:x});if(v.push(O),v.length>=p)return v}}else if(u?.keys)for(var w=0;w<l.length;w++){for(var x=l[w],S=new h(u.keys.length),k=u.keys.length-1;k>=0;--k){var m=be(x,u.keys[k]);if(!m){S[k]=f;continue}de(m)||(m=_(m)),m._score=ee,m._indexes.len=0,S[k]=m}if(S.obj=x,S._score=ee,v.push(S),v.length>=p)return v}else for(var w=0;w<l.length;w++){var m=l[w];if(m!=H&&(de(m)||(m=_(m)),m._score=ee,m._indexes.len=0,v.push(m),v.length>=p))return v}return v},R=(l,u,v=!1,p=!1)=>{if(v===!1&&l.containsSpace)return T(l,u,p);for(var w=l._lower,x=l.lowerCodes,m=x[0],O=u._targetLowerCodes,S=x.length,k=O.length,L=0,I=0,se=0;;){var te=m===O[I];if(te){if(K[se++]=I,++L,L===S)break;m=x[L]}if(++I,I>=k)return H}var L=0,oe=!1,F=0,z=u._nextBeginningIndexes;z===H&&(z=u._nextBeginningIndexes=Y(u.target)),I=K[0]===0?0:z[K[0]-1];var Ee=0;if(I!==k)for(;;)if(I>=k){if(L<=0||(++Ee,Ee>200))break;--L;var ue=re[--F];I=z[ue]}else{var te=x[L]===O[I];if(te){if(re[F++]=I,++L,L===S){oe=!0;break}++I}else I=z[I]}var ne=S<=1?-1:u._targetLower.indexOf(w,K[0]),D=!!~ne,Z=D?ne===0||u._nextBeginningIndexes[ne-1]===ne:!1;if(D&&!Z){for(var N=0;N<z.length;N=z[N])if(!(N<=ne)){for(var ie=0;ie<S&&x[ie]===u._targetLowerCodes[N+ie];ie++);if(ie===S){ne=N,Z=!0;break}}}var q=W=>{for(var V=0,dn=0,pe=1;pe<S;++pe)W[pe]-W[pe-1]!==1&&(V-=W[pe],++dn);var Wo=W[S-1]-W[0]-(S-1);if(V-=(12+Wo)*dn,W[0]!==0&&(V-=W[0]*W[0]*.2),!oe)V*=1e3;else{for(var ft=1,pe=z[0];pe<k;pe=z[pe])++ft;ft>24&&(V*=(ft-24)*10)}return V-=(k-S)/2,D&&(V/=1+S*S*1),Z&&(V/=1+S*S*1),V-=(k-S)/2,V};if(oe)if(Z){for(var N=0;N<S;++N)K[N]=ne+N;var xe=K,_e=q(K)}else var xe=re,_e=q(re);else{if(D)for(var N=0;N<S;++N)K[N]=ne+N;var xe=K,_e=q(xe)}u._score=_e;for(var N=0;N<S;++N)u._indexes[N]=xe[N];u._indexes.len=S;const Xe=new s;return Xe.target=u.target,Xe._score=u._score,Xe._indexes=u._indexes,Xe},T=(l,u,v)=>{for(var p=new Set,w=0,x=H,m=0,O=l.spaceSearches,S=O.length,k=0,I=()=>{for(let Z=k-1;Z>=0;Z--)u._nextBeginningIndexes[ce[Z*2+0]]=ce[Z*2+1]},se=!1,D=0;D<S;++D){ae[D]=ee;var te=O[D];if(x=R(te,u),v){if(x===H)continue;se=!0}else if(x===H)return I(),H;var L=D===S-1;if(!L){var oe=x._indexes,F=!0;for(let N=0;N<oe.len-1;N++)if(oe[N+1]-oe[N]!==1){F=!1;break}if(F){var z=oe[oe.len-1]+1,Ee=u._nextBeginningIndexes[z-1];for(let N=z-1;N>=0&&Ee===u._nextBeginningIndexes[N];N--)u._nextBeginningIndexes[N]=z,ce[k*2+0]=N,ce[k*2+1]=Ee,k++}}w+=x._score/S,ae[D]=x._score/S,x._indexes[0]<m&&(w-=(m-x._indexes[0])*2),m=x._indexes[0];for(var ue=0;ue<x._indexes.len;++ue)p.add(x._indexes[ue])}if(v&&!se)return H;I();var ne=R(l,u,!0);if(ne!==H&&ne._score>w){if(v)for(var D=0;D<S;++D)ae[D]=ne._score/S;return ne}v&&(x=u),x._score=w;var D=0;for(let Z of p)x._indexes[D++]=Z;return x._indexes.len=D,x},j=l=>l.replace(new RegExp("\\p{Script=Latin}+","gu"),u=>u.normalize("NFD")).replace(/[\u0300-\u036f]/g,""),M=l=>{l=j(l);for(var u=l.length,v=l.toLowerCase(),p=[],w=0,x=!1,m=0;m<u;++m){var O=p[m]=v.charCodeAt(m);if(O===32){x=!0;continue}var S=O>=97&&O<=122?O-97:O>=48&&O<=57?26:O<=127?30:31;w|=1<<S}return{lowerCodes:p,bitflags:w,containsSpace:x,_lower:v}},B=l=>{for(var u=l.length,v=[],p=0,w=!1,x=!1,m=0;m<u;++m){var O=l.charCodeAt(m),S=O>=65&&O<=90,k=S||O>=97&&O<=122||O>=48&&O<=57,I=S&&!w||!x||!k;w=S,x=k,I&&(v[p++]=m)}return v},Y=l=>{l=j(l);for(var u=l.length,v=B(l),p=[],w=v[0],x=0,m=0;m<u;++m)w>m?p[m]=w:(w=v[++x],p[m]=w===void 0?u:w);return p},X=new Map,A=new Map,K=[],re=[],ce=[],Q=[],ae=[],Ne=[],ye=[],be=(l,u)=>{var v=l[u];if(v!==void 0)return v;if(typeof u=="function")return u(l);var p=u;Array.isArray(u)||(p=u.split("."));for(var w=p.length,x=-1;l&&++x<w;)l=l[p[x]];return l},de=l=>typeof l=="object"&&typeof l._bitflags=="number",Te=1/0,ee=-Te,Ae=[];Ae.total=0;var H=null,f=a(""),P=l=>{var u=[],v=0,p={},w=x=>{for(var m=0,O=u[m],S=1;S<v;){var k=S+1;m=S,k<v&&u[k]._score<u[S]._score&&(m=k),u[m-1>>1]=u[m],S=1+(m<<1)}for(var I=m-1>>1;m>0&&O._score<u[I]._score;I=(m=I)-1>>1)u[m]=u[I];u[m]=O};return p.add=(x=>{var m=v;u[v++]=x;for(var O=m-1>>1;m>0&&x._score<u[O]._score;O=(m=O)-1>>1)u[m]=u[O];u[m]=x}),p.poll=(x=>{if(v!==0){var m=u[0];return u[0]=u[--v],w(),m}}),p.peek=(x=>{if(v!==0)return u[0]}),p.replaceTop=(x=>{u[0]=x,w()}),p},U=P();return{single:n,go:r,prepare:a,cleanup:c}})})(Me)),Me.exports}var Cn=_n();const Rn=pn(Cn);function On(e,t){return t.trim()?Rn.go(t,e,{key:"searchText",threshold:-1e3}).map(r=>({item:r.obj,indexes:r.indexes})):e.map(r=>({item:r,indexes:null}))}async function Pn(e){try{await e.run()}catch(t){console.error(`[command-palette] Command failed: ${e.id}`,t)}}const J=xn((e,t)=>({commands:[],normalized:[],results:[],query:"",isOpen:!1,selectedIndex:0,registerCommands:n=>{const r=wn(n);e({commands:n,normalized:r,results:r.map(o=>({item:o,indexes:null})),selectedIndex:0})},setQuery:n=>{const{normalized:r}=t(),o=On(r,n);e({query:n,results:o,selectedIndex:0})},selectNext:()=>{const{selectedIndex:n,results:r}=t();e({selectedIndex:r.length===0?0:(n+1)%r.length})},selectPrev:()=>{const{selectedIndex:n,results:r}=t();e({selectedIndex:r.length===0?0:(n-1+r.length)%r.length})},selectFirst:()=>e({selectedIndex:0}),open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1,query:"",selectedIndex:0})}));function Nn(e){G.useEffect(()=>{const t=n=>{const r=n.key.toLowerCase()==="k";if(navigator.platform.startsWith("Mac")){n.metaKey&&r&&(n.preventDefault(),e());return}n.ctrlKey&&r&&(n.preventDefault(),e())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e])}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Et(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ze(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Et(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Et(e[o],null)}}}}function we(...e){return i.useCallback(Ze(...e),e)}function Tn(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,h=i.useMemo(()=>s,Object.values(s));return b.jsx(n.Provider,{value:h,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function An(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),h=n.length;n=[...n,c];const d=y=>{const{scope:C,children:_,...$}=y,g=C?.[e]?.[h]||s,R=i.useMemo(()=>$,Object.values($));return b.jsx(g.Provider,{value:R,children:_})};d.displayName=a+"Provider";function E(y,C){const _=C?.[e]?.[h]||s,$=i.useContext(_);if($)return $;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${a}\``)}return[d,E]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const h=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:h}}),[s,h])}};return o.scopeName=e,[r,In(o,...t)]}function In(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:h,scopeName:d})=>{const y=h(a)[`__scope${d}`];return{...s,...y}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var ke=globalThis?.document?i.useLayoutEffect:()=>{},Dn=i[" useId ".trim().toString()]||(()=>{}),kn=0;function Je(e){const[t,n]=i.useState(Dn());return ke(()=>{n(r=>r??String(kn++))},[e]),e||(t?`radix-${t}`:"")}var Ln=i[" useInsertionEffect ".trim().toString()]||ke;function jn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=Mn({defaultProp:t,onChange:n}),s=e!==void 0,h=s?e:o;{const E=i.useRef(e!==void 0);i.useEffect(()=>{const y=E.current;y!==s&&console.warn(`${r} is changing from ${y?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),E.current=s},[s,r])}const d=i.useCallback(E=>{if(s){const y=Fn(E)?E(e):E;y!==e&&c.current?.(y)}else a(E)},[s,e,a,c]);return[h,d]}function Mn({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return Ln(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Fn(e){return typeof e=="function"}function xt(e){const t=Wn(e),n=i.forwardRef((r,o)=>{const{children:a,...c}=r,s=i.Children.toArray(a),h=s.find(Bn);if(h){const d=h.props.children,E=s.map(y=>y===h?i.Children.count(d)>1?i.Children.only(null):i.isValidElement(d)?d.props.children:null:y);return b.jsx(t,{...c,ref:o,children:i.isValidElement(d)?i.cloneElement(d,void 0,E):null})}return b.jsx(t,{...c,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Wn(e){const t=i.forwardRef((n,r)=>{const{children:o,...a}=n;if(i.isValidElement(o)){const c=zn(o),s=Un(a,o.props);return o.type!==i.Fragment&&(s.ref=r?Ze(r,c):c),i.cloneElement(o,s)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $n=Symbol("radix.slottable");function Bn(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$n}function Un(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const h=a(...s);return o(...s),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function zn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=Vn.reduce((e,t)=>{const n=xt(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(h,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yn(e,t){e&&vn.flushSync(()=>e.dispatchEvent(t))}function Le(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Hn(e,t=globalThis?.document){const n=Le(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gn="DismissableLayer",Qe="dismissableLayer.update",Kn="dismissableLayer.pointerDownOutside",qn="dismissableLayer.focusOutside",wt,St=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_t=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...h}=e,d=i.useContext(St),[E,y]=i.useState(null),C=E?.ownerDocument??globalThis?.document,[,_]=i.useState({}),$=we(t,A=>y(A)),g=Array.from(d.layers),[R]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),T=g.indexOf(R),j=E?g.indexOf(E):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,B=j>=T,Y=Jn(A=>{const K=A.target,re=[...d.branches].some(ce=>ce.contains(K));!B||re||(o?.(A),c?.(A),A.defaultPrevented||s?.())},C),X=Qn(A=>{const K=A.target;[...d.branches].some(ce=>ce.contains(K))||(a?.(A),c?.(A),A.defaultPrevented||s?.())},C);return Hn(A=>{j===d.layers.size-1&&(r?.(A),!A.defaultPrevented&&s&&(A.preventDefault(),s()))},C),i.useEffect(()=>{if(E)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(wt=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(E)),d.layers.add(E),Ct(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=wt)}},[E,C,n,d]),i.useEffect(()=>()=>{E&&(d.layers.delete(E),d.layersWithOutsidePointerEventsDisabled.delete(E),Ct())},[E,d]),i.useEffect(()=>{const A=()=>_({});return document.addEventListener(Qe,A),()=>document.removeEventListener(Qe,A)},[]),b.jsx(ve.div,{...h,ref:$,style:{pointerEvents:M?B?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,X.onFocusCapture),onBlurCapture:he(e.onBlurCapture,X.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,Y.onPointerDownCapture)})});_t.displayName=Gn;var Xn="DismissableLayerBranch",Zn=i.forwardRef((e,t)=>{const n=i.useContext(St),r=i.useRef(null),o=we(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),b.jsx(ve.div,{...e,ref:o})});Zn.displayName=Xn;function Jn(e,t=globalThis?.document){const n=Le(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let h=function(){Rt(Kn,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qn(e,t=globalThis?.document){const n=Le(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&Rt(qn,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ct(){const e=new CustomEvent(Qe);document.dispatchEvent(e)}function Rt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yn(o,a):o.dispatchEvent(a)}var et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",Ot={bubbles:!1,cancelable:!0},er="FocusScope",Pt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,h]=i.useState(null),d=Le(o),E=Le(a),y=i.useRef(null),C=we(t,g=>h(g)),_=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let g=function(M){if(_.paused||!s)return;const B=M.target;s.contains(B)?y.current=B:ge(y.current,{select:!0})},R=function(M){if(_.paused||!s)return;const B=M.relatedTarget;B!==null&&(s.contains(B)||ge(y.current,{select:!0}))},T=function(M){if(document.activeElement===document.body)for(const Y of M)Y.removedNodes.length>0&&ge(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",R);const j=new MutationObserver(T);return s&&j.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",R),j.disconnect()}}},[r,s,_.paused]),i.useEffect(()=>{if(s){At.add(_);const g=document.activeElement;if(!s.contains(g)){const T=new CustomEvent(et,Ot);s.addEventListener(et,d),s.dispatchEvent(T),T.defaultPrevented||(tr(sr(Nt(s)),{select:!0}),document.activeElement===g&&ge(s))}return()=>{s.removeEventListener(et,d),setTimeout(()=>{const T=new CustomEvent(tt,Ot);s.addEventListener(tt,E),s.dispatchEvent(T),T.defaultPrevented||ge(g??document.body,{select:!0}),s.removeEventListener(tt,E),At.remove(_)},0)}}},[s,d,E,_]);const $=i.useCallback(g=>{if(!n&&!r||_.paused)return;const R=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,T=document.activeElement;if(R&&T){const j=g.currentTarget,[M,B]=nr(j);M&&B?!g.shiftKey&&T===B?(g.preventDefault(),n&&ge(M,{select:!0})):g.shiftKey&&T===M&&(g.preventDefault(),n&&ge(B,{select:!0})):T===j&&g.preventDefault()}},[n,r,_.paused]);return b.jsx(ve.div,{tabIndex:-1,...c,ref:C,onKeyDown:$})});Pt.displayName=er;function tr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ge(r,{select:t}),document.activeElement!==n)return}function nr(e){const t=Nt(e),n=Tt(t,e),r=Tt(t.reverse(),e);return[n,r]}function Nt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tt(e,t){for(const n of e)if(!rr(n,{upTo:t}))return n}function rr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function or(e){return e instanceof HTMLInputElement&&"select"in e}function ge(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&or(e)&&t&&e.select()}}var At=ar();function ar(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=It(e,t),e.unshift(t)},remove(t){e=It(e,t),e[0]?.resume()}}}function It(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sr(e){return e.filter(t=>t.tagName!=="A")}var ir="Portal",Dt=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);ke(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?dt.createPortal(b.jsx(ve.div,{...r,ref:t}),c):null});Dt.displayName=ir;function cr(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=ur(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=we(r.ref,lr(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};Fe.displayName="Presence";function ur(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,h]=cr(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=We(r.current);a.current=s==="mounted"?d:"none"},[s]),ke(()=>{const d=r.current,E=o.current;if(E!==e){const C=a.current,_=We(d);e?h("MOUNT"):_==="none"||d?.display==="none"?h("UNMOUNT"):h(E&&C!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),ke(()=>{if(t){let d;const E=t.ownerDocument.defaultView??window,y=_=>{const g=We(r.current).includes(CSS.escape(_.animationName));if(_.target===t&&g&&(h("ANIMATION_END"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",d=E.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},C=_=>{_.target===t&&(a.current=We(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{E.clearTimeout(d),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function We(e){return e?.animationName||"none"}function lr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nt=0;function fr(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kt()),document.body.insertAdjacentElement("beforeend",e[1]??kt()),nt++,()=>{nt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nt--}},[])}function kt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fe.apply(this,arguments)};function Lt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dr(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $e="right-scroll-bar-position",Be="width-before-scroll-bar",vr="with-scroll-bars-hidden",pr="--removed-body-scroll-bar-size";function rt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mr(e,t){var n=G.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var hr=typeof window<"u"?i.useLayoutEffect:i.useEffect,jt=new WeakMap;function gr(e,t){var n=mr(null,function(r){return e.forEach(function(o){return rt(o,r)})});return hr(function(){var r=jt.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||rt(s,null)}),a.forEach(function(s){o.has(s)||rt(s,c)})}jt.set(n,e)},[e]),n}function yr(e){return e}function br(e,t){t===void 0&&(t=yr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var h=function(){var E=c;c=[],E.forEach(a)},d=function(){return Promise.resolve().then(h)};d(),n={push:function(E){c.push(E),d()},filter:function(E){return c=c.filter(E),n}}}};return o}function Er(e){e===void 0&&(e={});var t=br(null);return t.options=fe({async:!0,ssr:!1},e),t}var Mt=function(e){var t=e.sideCar,n=Lt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,fe({},n))};Mt.isSideCarExport=!0;function xr(e,t){return e.useMedium(t),Mt}var Ft=Er(),ot=function(){},Ue=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ot,onWheelCapture:ot,onTouchMoveCapture:ot}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,h=e.className,d=e.removeScrollBar,E=e.enabled,y=e.shards,C=e.sideCar,_=e.noRelative,$=e.noIsolation,g=e.inert,R=e.allowPinchZoom,T=e.as,j=T===void 0?"div":T,M=e.gapMode,B=Lt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Y=C,X=gr([n,t]),A=fe(fe({},B),o);return i.createElement(i.Fragment,null,E&&i.createElement(Y,{sideCar:Ft,removeScrollBar:d,shards:y,noRelative:_,noIsolation:$,inert:g,setCallbacks:a,allowPinchZoom:!!R,lockRef:n,gapMode:M}),c?i.cloneElement(i.Children.only(s),fe(fe({},A),{ref:X})):i.createElement(j,fe({},A,{className:h,ref:X}),s))});Ue.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ue.classNames={fullWidth:Be,zeroRight:$e};var wr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wr();return t&&e.setAttribute("nonce",t),e}function _r(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sr())&&(_r(t,n),Cr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Or=function(){var e=Rr();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wt=function(){var e=Or(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Pr={left:0,top:0,right:0,gap:0},at=function(e){return parseInt(e||"",10)||0},Nr=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[at(n),at(r),at(o)]},Tr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pr;var t=Nr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ar=Wt(),Ce="data-scroll-locked",Ir=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
7
|
-
.`.concat(
|
|
6
|
+
<%s key={someKey} {...props} />`,u,p,w,p),H[p+u]=!0)}if(p=null,U!==void 0&&(n(U),p=""+U),c(O)&&(n(O.key),p=""+O.key),"key"in O){U={};for(var x in O)x!=="key"&&(U[x]=O[x])}else U=O;return p&&s(U,typeof f=="function"?f.displayName||f.name||"Unknown":f),d(f,p,U,o(),l,v)}function y(f){C(f)?f._store&&(f._store.validated=1):typeof f=="object"&&f!==null&&f.$$typeof===re&&(f._payload.status==="fulfilled"?C(f._payload.value)&&f._payload.value._store&&(f._payload.value._store.validated=1):f._store&&(f._store.validated=1))}function C(f){return typeof f=="object"&&f!==null&&f.$$typeof===$}var _=G,$=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),B=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),ae=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pe=Object.prototype.hasOwnProperty,ye=Array.isArray,be=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(f){return f()}};var de,Te={},ee=_.react_stack_bottom_frame.bind(_,a)(),Ie=be(r(a)),H={};De.Fragment=R,De.jsx=function(f,O,U){var u=1e4>ae.recentlyCreatedOwnerStacks++;return E(f,O,U,!1,u?Error("react-stack-top-frame"):ee,u?be(r(f)):Ie)},De.jsxs=function(f,O,U){var u=1e4>ae.recentlyCreatedOwnerStacks++;return E(f,O,U,!0,u?Error("react-stack-top-frame"):ee,u?be(r(f)):Ie)}})()),De}var ht;function bn(){return ht||(ht=1,process.env.NODE_ENV==="production"?je.exports=gn():je.exports=yn()),je.exports}var b=bn();const gt=e=>{let t;const n=new Set,r=(d,E)=>{const y=typeof d=="function"?d(t):d;if(!Object.is(y,t)){const C=t;t=E??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(_=>_(t,C))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>h,subscribe:d=>(n.add(d),()=>n.delete(d))},h=t=e(r,o,s);return s},En=(e=>e?gt(e):gt),xn=e=>e;function wn(e,t=xn){const n=G.useSyncExternalStore(e.subscribe,G.useCallback(()=>t(e.getState()),[e,t]),G.useCallback(()=>t(e.getInitialState()),[e,t]));return G.useDebugValue(n),n}const yt=e=>{const t=En(e),n=r=>wn(t,r);return Object.assign(n,t),n},Sn=(e=>e?yt(e):yt);function _n(e){return e.map(t=>{const n=[t.title,t.subtitle,...t.keywords??[]].filter(r=>!!r);return{...t,searchText:n.join(" ").toLowerCase(),titleLength:t.title.toLowerCase().length,subtitleLength:t.subtitle?.toLowerCase().length??0}})}var Me={exports:{}},Cn=Me.exports,bt;function Rn(){return bt||(bt=1,(function(e){((t,n)=>{e.exports?e.exports=n():t.fuzzysort=n()})(Cn,t=>{var n=(u,l)=>{if(!u||!l)return H;var v=$(u);de(l)||(l=_(l));var p=v.bitflags;return(p&l._bitflags)!==p?H:R(v,l)},r=(u,l,v)=>{if(!u)return v?.all?g(l,v):Ie;var p=$(u),w=p.bitflags,x=p.containsSpace,m=y(v?.threshold||0),N=v?.limit||Te,S=0,k=0,A=l.length;function se(_e){S<N?(U.add(_e),++S):(++k,_e._score>U.peek()._score&&U.replaceTop(_e))}if(v?.key)for(var te=v.key,L=0;L<A;++L){var oe=l[L],F=be(oe,te);if(F&&(de(F)||(F=_(F)),(w&F._bitflags)===w)){var z=R(p,F);z!==H&&(z._score<m||(z.obj=oe,se(z)))}}else if(v?.keys){var Ee=v.keys,le=Ee.length;e:for(var L=0;L<A;++L){var oe=l[L];{for(var ne=0,D=0;D<le;++D){var te=Ee[D],F=be(oe,te);if(!F){Pe[D]=f;continue}de(F)||(F=_(F)),Pe[D]=F,ne|=F._bitflags}if((w&ne)!==w)continue}if(x)for(let W=0;W<p.spaceSearches.length;W++)Q[W]=ee;for(var D=0;D<le;++D){if(F=Pe[D],F===f){ye[D]=f;continue}if(ye[D]=R(p,F,!1,x),ye[D]===H){ye[D]=f;continue}if(x)for(let V=0;V<p.spaceSearches.length;V++){if(ae[V]>-1e3&&Q[V]>ee){var Z=(Q[V]+ae[V])/4;Z>Q[V]&&(Q[V]=Z)}ae[V]>Q[V]&&(Q[V]=ae[V])}}if(x){for(let W=0;W<p.spaceSearches.length;W++)if(Q[W]===ee)continue e}else{var P=!1;for(let W=0;W<le;W++)if(ye[W]._score!==ee){P=!0;break}if(!P)continue}var ie=new h(le);for(let W=0;W<le;W++)ie[W]=ye[W];if(x){var q=0;for(let W=0;W<p.spaceSearches.length;W++)q+=Q[W]}else{var q=ee;for(let V=0;V<le;V++){var z=ie[V];if(z._score>-1e3&&q>ee){var Z=(q+z._score)/4;Z>q&&(q=Z)}z._score>q&&(q=z._score)}}if(ie.obj=oe,ie._score=q,v?.scoreFn){if(q=v.scoreFn(ie),!q)continue;q=y(q),ie._score=q}q<m||se(ie)}}else for(var L=0;L<A;++L){var F=l[L];if(F&&(de(F)||(F=_(F)),(w&F._bitflags)===w)){var z=R(p,F);z!==H&&(z._score<m||se(z))}}if(S===0)return Ie;for(var xe=new Array(S),L=S-1;L>=0;--L)xe[L]=U.poll();return xe.total=S+k,xe},o=(u,l="<b>",v="</b>")=>{for(var p=typeof l=="function"?l:void 0,w=u.target,x=w.length,m=u.indexes,N="",S=0,k=0,A=!1,se=[],te=0;te<x;++te){var L=w[te];if(m[k]===te){if(++k,A||(A=!0,p?(se.push(N),N=""):N+=l),k===m.length){p?(N+=L,se.push(p(N,S++)),N="",se.push(w.substr(te+1))):N+=L+v+w.substr(te+1);break}}else A&&(A=!1,p?(se.push(p(N,S++)),N=""):N+=v);N+=L}return p?se:N},a=u=>{typeof u=="number"?u=""+u:typeof u!="string"&&(u="");var l=M(u);return d(u,{_targetLower:l._lower,_targetLowerCodes:l.lowerCodes,_bitflags:l.bitflags})},c=()=>{X.clear(),I.clear()};class s{get indexes(){return this._indexes.slice(0,this._indexes.len).sort((l,v)=>l-v)}set indexes(l){return this._indexes=l}highlight(l,v){return o(this,l,v)}get score(){return E(this._score)}set score(l){this._score=y(l)}}class h extends Array{get score(){return E(this._score)}set score(l){this._score=y(l)}}var d=(u,l)=>{const v=new s;return v.target=u,v.obj=l.obj??H,v._score=l._score??ee,v._indexes=l._indexes??[],v._targetLower=l._targetLower??"",v._targetLowerCodes=l._targetLowerCodes??H,v._nextBeginningIndexes=l._nextBeginningIndexes??H,v._bitflags=l._bitflags??0,v},E=u=>u===ee?0:u>1?u:Math.E**(((-u+1)**.04307-1)*-2),y=u=>u===0?ee:u>1?u:1-Math.pow(Math.log(u)/-2+1,1/.04307),C=u=>{typeof u=="number"?u=""+u:typeof u!="string"&&(u=""),u=u.trim();var l=M(u),v=[];if(l.containsSpace){var p=u.split(/\s+/);p=[...new Set(p)];for(var w=0;w<p.length;w++)if(p[w]!==""){var x=M(p[w]);v.push({lowerCodes:x.lowerCodes,_lower:p[w].toLowerCase(),containsSpace:!1})}}return{lowerCodes:l.lowerCodes,_lower:l._lower,containsSpace:l.containsSpace,bitflags:l.bitflags,spaceSearches:v}},_=u=>{if(u.length>999)return a(u);var l=X.get(u);return l!==void 0||(l=a(u),X.set(u,l)),l},$=u=>{if(u.length>999)return C(u);var l=I.get(u);return l!==void 0||(l=C(u),I.set(u,l)),l},g=(u,l)=>{var v=[];v.total=u.length;var p=l?.limit||Te;if(l?.key)for(var w=0;w<u.length;w++){var x=u[w],m=be(x,l.key);if(m!=H){de(m)||(m=_(m));var N=d(m.target,{_score:m._score,obj:x});if(v.push(N),v.length>=p)return v}}else if(l?.keys)for(var w=0;w<u.length;w++){for(var x=u[w],S=new h(l.keys.length),k=l.keys.length-1;k>=0;--k){var m=be(x,l.keys[k]);if(!m){S[k]=f;continue}de(m)||(m=_(m)),m._score=ee,m._indexes.len=0,S[k]=m}if(S.obj=x,S._score=ee,v.push(S),v.length>=p)return v}else for(var w=0;w<u.length;w++){var m=u[w];if(m!=H&&(de(m)||(m=_(m)),m._score=ee,m._indexes.len=0,v.push(m),v.length>=p))return v}return v},R=(u,l,v=!1,p=!1)=>{if(v===!1&&u.containsSpace)return T(u,l,p);for(var w=u._lower,x=u.lowerCodes,m=x[0],N=l._targetLowerCodes,S=x.length,k=N.length,L=0,A=0,se=0;;){var te=m===N[A];if(te){if(K[se++]=A,++L,L===S)break;m=x[L]}if(++A,A>=k)return H}var L=0,oe=!1,F=0,z=l._nextBeginningIndexes;z===H&&(z=l._nextBeginningIndexes=Y(l.target)),A=K[0]===0?0:z[K[0]-1];var Ee=0;if(A!==k)for(;;)if(A>=k){if(L<=0||(++Ee,Ee>200))break;--L;var le=re[--F];A=z[le]}else{var te=x[L]===N[A];if(te){if(re[F++]=A,++L,L===S){oe=!0;break}++A}else A=z[A]}var ne=S<=1?-1:l._targetLower.indexOf(w,K[0]),D=!!~ne,Z=D?ne===0||l._nextBeginningIndexes[ne-1]===ne:!1;if(D&&!Z){for(var P=0;P<z.length;P=z[P])if(!(P<=ne)){for(var ie=0;ie<S&&x[ie]===l._targetLowerCodes[P+ie];ie++);if(ie===S){ne=P,Z=!0;break}}}var q=W=>{for(var V=0,pn=0,pe=1;pe<S;++pe)W[pe]-W[pe-1]!==1&&(V-=W[pe],++pn);var Uo=W[S-1]-W[0]-(S-1);if(V-=(12+Uo)*pn,W[0]!==0&&(V-=W[0]*W[0]*.2),!oe)V*=1e3;else{for(var ft=1,pe=z[0];pe<k;pe=z[pe])++ft;ft>24&&(V*=(ft-24)*10)}return V-=(k-S)/2,D&&(V/=1+S*S*1),Z&&(V/=1+S*S*1),V-=(k-S)/2,V};if(oe)if(Z){for(var P=0;P<S;++P)K[P]=ne+P;var xe=K,_e=q(K)}else var xe=re,_e=q(re);else{if(D)for(var P=0;P<S;++P)K[P]=ne+P;var xe=K,_e=q(xe)}l._score=_e;for(var P=0;P<S;++P)l._indexes[P]=xe[P];l._indexes.len=S;const Xe=new s;return Xe.target=l.target,Xe._score=l._score,Xe._indexes=l._indexes,Xe},T=(u,l,v)=>{for(var p=new Set,w=0,x=H,m=0,N=u.spaceSearches,S=N.length,k=0,A=()=>{for(let Z=k-1;Z>=0;Z--)l._nextBeginningIndexes[ce[Z*2+0]]=ce[Z*2+1]},se=!1,D=0;D<S;++D){ae[D]=ee;var te=N[D];if(x=R(te,l),v){if(x===H)continue;se=!0}else if(x===H)return A(),H;var L=D===S-1;if(!L){var oe=x._indexes,F=!0;for(let P=0;P<oe.len-1;P++)if(oe[P+1]-oe[P]!==1){F=!1;break}if(F){var z=oe[oe.len-1]+1,Ee=l._nextBeginningIndexes[z-1];for(let P=z-1;P>=0&&Ee===l._nextBeginningIndexes[P];P--)l._nextBeginningIndexes[P]=z,ce[k*2+0]=P,ce[k*2+1]=Ee,k++}}w+=x._score/S,ae[D]=x._score/S,x._indexes[0]<m&&(w-=(m-x._indexes[0])*2),m=x._indexes[0];for(var le=0;le<x._indexes.len;++le)p.add(x._indexes[le])}if(v&&!se)return H;A();var ne=R(u,l,!0);if(ne!==H&&ne._score>w){if(v)for(var D=0;D<S;++D)ae[D]=ne._score/S;return ne}v&&(x=l),x._score=w;var D=0;for(let Z of p)x._indexes[D++]=Z;return x._indexes.len=D,x},j=u=>u.replace(new RegExp("\\p{Script=Latin}+","gu"),l=>l.normalize("NFD")).replace(/[\u0300-\u036f]/g,""),M=u=>{u=j(u);for(var l=u.length,v=u.toLowerCase(),p=[],w=0,x=!1,m=0;m<l;++m){var N=p[m]=v.charCodeAt(m);if(N===32){x=!0;continue}var S=N>=97&&N<=122?N-97:N>=48&&N<=57?26:N<=127?30:31;w|=1<<S}return{lowerCodes:p,bitflags:w,containsSpace:x,_lower:v}},B=u=>{for(var l=u.length,v=[],p=0,w=!1,x=!1,m=0;m<l;++m){var N=u.charCodeAt(m),S=N>=65&&N<=90,k=S||N>=97&&N<=122||N>=48&&N<=57,A=S&&!w||!x||!k;w=S,x=k,A&&(v[p++]=m)}return v},Y=u=>{u=j(u);for(var l=u.length,v=B(u),p=[],w=v[0],x=0,m=0;m<l;++m)w>m?p[m]=w:(w=v[++x],p[m]=w===void 0?l:w);return p},X=new Map,I=new Map,K=[],re=[],ce=[],Q=[],ae=[],Pe=[],ye=[],be=(u,l)=>{var v=u[l];if(v!==void 0)return v;if(typeof l=="function")return l(u);var p=l;Array.isArray(l)||(p=l.split("."));for(var w=p.length,x=-1;u&&++x<w;)u=u[p[x]];return u},de=u=>typeof u=="object"&&typeof u._bitflags=="number",Te=1/0,ee=-Te,Ie=[];Ie.total=0;var H=null,f=a(""),O=u=>{var l=[],v=0,p={},w=x=>{for(var m=0,N=l[m],S=1;S<v;){var k=S+1;m=S,k<v&&l[k]._score<l[S]._score&&(m=k),l[m-1>>1]=l[m],S=1+(m<<1)}for(var A=m-1>>1;m>0&&N._score<l[A]._score;A=(m=A)-1>>1)l[m]=l[A];l[m]=N};return p.add=(x=>{var m=v;l[v++]=x;for(var N=m-1>>1;m>0&&x._score<l[N]._score;N=(m=N)-1>>1)l[m]=l[N];l[m]=x}),p.poll=(x=>{if(v!==0){var m=l[0];return l[0]=l[--v],w(),m}}),p.peek=(x=>{if(v!==0)return l[0]}),p.replaceTop=(x=>{l[0]=x,w()}),p},U=O();return{single:n,go:r,prepare:a,cleanup:c}})})(Me)),Me.exports}var Nn=Rn();const On=hn(Nn);function Pn(e,t,n){const r=t+1,o=r+n,a=[],c=[];for(const s of e)s<t?a.push(s):n>0&&s>=r&&s<o&&c.push(s-r);return{titleIndexes:a,subtitleIndexes:c}}function Tn(e,t){return t.trim()?On.go(t,e,{key:"searchText",threshold:-1e3}).map(r=>{const{titleIndexes:o,subtitleIndexes:a}=Pn(r.indexes,r.obj.titleLength,r.obj.subtitleLength);return{item:r.obj,titleIndexes:o.length>0?o:null,subtitleIndexes:a.length>0?a:null}}):e.map(r=>({item:r,titleIndexes:null,subtitleIndexes:null}))}async function Et(e){try{await e.run()}catch(t){console.error(`[command-palette] Command failed: ${e.id}`,t)}}const J=Sn((e,t)=>({commands:[],normalized:[],results:[],query:"",isOpen:!1,selectedIndex:0,registerCommands:n=>{const r=_n(n);e({commands:n,normalized:r,results:r.map(o=>({item:o,titleIndexes:null,subtitleIndexes:null})),selectedIndex:0})},setQuery:n=>{const{normalized:r}=t(),o=Tn(r,n);e({query:n,results:o,selectedIndex:0})},selectNext:()=>{const{selectedIndex:n,results:r}=t();e({selectedIndex:r.length===0?0:(n+1)%r.length})},selectPrev:()=>{const{selectedIndex:n,results:r}=t();e({selectedIndex:r.length===0?0:(n-1+r.length)%r.length})},selectFirst:()=>e({selectedIndex:0}),open:()=>e({isOpen:!0}),close:()=>e(n=>({isOpen:!1,query:"",selectedIndex:0,results:n.normalized.map(r=>({item:r,titleIndexes:null,subtitleIndexes:null}))}))})),In={key:"p",shift:!0};function An(e,t=In){G.useEffect(()=>{const n=(navigator.userAgentData?.platform??navigator.platform).toLowerCase().startsWith("mac"),r=o=>{(n?o.metaKey:o.ctrlKey)&&o.key.toLowerCase()===t.key.toLowerCase()&&!!o.shiftKey==!!t.shift&&!!o.altKey==!!t.alt&&(o.preventDefault(),o.stopPropagation(),e())};return window.addEventListener("keydown",r,{capture:!0}),()=>window.removeEventListener("keydown",r,{capture:!0})},[e,t])}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function xt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ze(...e){return t=>{let n=!1;const r=e.map(o=>{const a=xt(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():xt(e[o],null)}}}}function we(...e){return i.useCallback(Ze(...e),e)}function Dn(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,h=i.useMemo(()=>s,Object.values(s));return b.jsx(n.Provider,{value:h,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function kn(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),h=n.length;n=[...n,c];const d=y=>{const{scope:C,children:_,...$}=y,g=C?.[e]?.[h]||s,R=i.useMemo(()=>$,Object.values($));return b.jsx(g.Provider,{value:R,children:_})};d.displayName=a+"Provider";function E(y,C){const _=C?.[e]?.[h]||s,$=i.useContext(_);if($)return $;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${a}\``)}return[d,E]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const h=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:h}}),[s,h])}};return o.scopeName=e,[r,Ln(o,...t)]}function Ln(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:h,scopeName:d})=>{const y=h(a)[`__scope${d}`];return{...s,...y}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var ke=globalThis?.document?i.useLayoutEffect:()=>{},jn=i[" useId ".trim().toString()]||(()=>{}),Mn=0;function Je(e){const[t,n]=i.useState(jn());return ke(()=>{n(r=>r??String(Mn++))},[e]),e||(t?`radix-${t}`:"")}var Fn=i[" useInsertionEffect ".trim().toString()]||ke;function Wn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=$n({defaultProp:t,onChange:n}),s=e!==void 0,h=s?e:o;{const E=i.useRef(e!==void 0);i.useEffect(()=>{const y=E.current;y!==s&&console.warn(`${r} is changing from ${y?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),E.current=s},[s,r])}const d=i.useCallback(E=>{if(s){const y=Bn(E)?E(e):E;y!==e&&c.current?.(y)}else a(E)},[s,e,a,c]);return[h,d]}function $n({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return Fn(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Bn(e){return typeof e=="function"}function wt(e){const t=Un(e),n=i.forwardRef((r,o)=>{const{children:a,...c}=r,s=i.Children.toArray(a),h=s.find(Vn);if(h){const d=h.props.children,E=s.map(y=>y===h?i.Children.count(d)>1?i.Children.only(null):i.isValidElement(d)?d.props.children:null:y);return b.jsx(t,{...c,ref:o,children:i.isValidElement(d)?i.cloneElement(d,void 0,E):null})}return b.jsx(t,{...c,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Un(e){const t=i.forwardRef((n,r)=>{const{children:o,...a}=n;if(i.isValidElement(o)){const c=Hn(o),s=Yn(a,o.props);return o.type!==i.Fragment&&(s.ref=r?Ze(r,c):c),i.cloneElement(o,s)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zn=Symbol("radix.slottable");function Vn(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zn}function Yn(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const h=a(...s);return o(...s),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Hn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=Gn.reduce((e,t)=>{const n=wt(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(h,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Kn(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}function Le(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function qn(e,t=globalThis?.document){const n=Le(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Xn="DismissableLayer",Qe="dismissableLayer.update",Zn="dismissableLayer.pointerDownOutside",Jn="dismissableLayer.focusOutside",St,_t=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ct=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...h}=e,d=i.useContext(_t),[E,y]=i.useState(null),C=E?.ownerDocument??globalThis?.document,[,_]=i.useState({}),$=we(t,I=>y(I)),g=Array.from(d.layers),[R]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),T=g.indexOf(R),j=E?g.indexOf(E):-1,M=d.layersWithOutsidePointerEventsDisabled.size>0,B=j>=T,Y=tr(I=>{const K=I.target,re=[...d.branches].some(ce=>ce.contains(K));!B||re||(o?.(I),c?.(I),I.defaultPrevented||s?.())},C),X=nr(I=>{const K=I.target;[...d.branches].some(ce=>ce.contains(K))||(a?.(I),c?.(I),I.defaultPrevented||s?.())},C);return qn(I=>{j===d.layers.size-1&&(r?.(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},C),i.useEffect(()=>{if(E)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(St=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(E)),d.layers.add(E),Rt(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=St)}},[E,C,n,d]),i.useEffect(()=>()=>{E&&(d.layers.delete(E),d.layersWithOutsidePointerEventsDisabled.delete(E),Rt())},[E,d]),i.useEffect(()=>{const I=()=>_({});return document.addEventListener(Qe,I),()=>document.removeEventListener(Qe,I)},[]),b.jsx(ve.div,{...h,ref:$,style:{pointerEvents:M?B?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,X.onFocusCapture),onBlurCapture:he(e.onBlurCapture,X.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,Y.onPointerDownCapture)})});Ct.displayName=Xn;var Qn="DismissableLayerBranch",er=i.forwardRef((e,t)=>{const n=i.useContext(_t),r=i.useRef(null),o=we(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),b.jsx(ve.div,{...e,ref:o})});er.displayName=Qn;function tr(e,t=globalThis?.document){const n=Le(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let h=function(){Nt(Zn,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nr(e,t=globalThis?.document){const n=Le(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&Nt(Jn,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Rt(){const e=new CustomEvent(Qe);document.dispatchEvent(e)}function Nt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Kn(o,a):o.dispatchEvent(a)}var et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",Ot={bubbles:!1,cancelable:!0},rr="FocusScope",Pt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,h]=i.useState(null),d=Le(o),E=Le(a),y=i.useRef(null),C=we(t,g=>h(g)),_=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let g=function(M){if(_.paused||!s)return;const B=M.target;s.contains(B)?y.current=B:ge(y.current,{select:!0})},R=function(M){if(_.paused||!s)return;const B=M.relatedTarget;B!==null&&(s.contains(B)||ge(y.current,{select:!0}))},T=function(M){if(document.activeElement===document.body)for(const Y of M)Y.removedNodes.length>0&&ge(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",R);const j=new MutationObserver(T);return s&&j.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",R),j.disconnect()}}},[r,s,_.paused]),i.useEffect(()=>{if(s){At.add(_);const g=document.activeElement;if(!s.contains(g)){const T=new CustomEvent(et,Ot);s.addEventListener(et,d),s.dispatchEvent(T),T.defaultPrevented||(or(lr(Tt(s)),{select:!0}),document.activeElement===g&&ge(s))}return()=>{s.removeEventListener(et,d),setTimeout(()=>{const T=new CustomEvent(tt,Ot);s.addEventListener(tt,E),s.dispatchEvent(T),T.defaultPrevented||ge(g??document.body,{select:!0}),s.removeEventListener(tt,E),At.remove(_)},0)}}},[s,d,E,_]);const $=i.useCallback(g=>{if(!n&&!r||_.paused)return;const R=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,T=document.activeElement;if(R&&T){const j=g.currentTarget,[M,B]=ar(j);M&&B?!g.shiftKey&&T===B?(g.preventDefault(),n&&ge(M,{select:!0})):g.shiftKey&&T===M&&(g.preventDefault(),n&&ge(B,{select:!0})):T===j&&g.preventDefault()}},[n,r,_.paused]);return b.jsx(ve.div,{tabIndex:-1,...c,ref:C,onKeyDown:$})});Pt.displayName=rr;function or(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ge(r,{select:t}),document.activeElement!==n)return}function ar(e){const t=Tt(e),n=It(t,e),r=It(t.reverse(),e);return[n,r]}function Tt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function It(e,t){for(const n of e)if(!sr(n,{upTo:t}))return n}function sr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ir(e){return e instanceof HTMLInputElement&&"select"in e}function ge(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ir(e)&&t&&e.select()}}var At=cr();function cr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Dt(e,t),e.unshift(t)},remove(t){e=Dt(e,t),e[0]?.resume()}}}function Dt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lr(e){return e.filter(t=>t.tagName!=="A")}var ur="Portal",kt=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);ke(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?dt.createPortal(b.jsx(ve.div,{...r,ref:t}),c):null});kt.displayName=ur;function fr(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var Fe=e=>{const{present:t,children:n}=e,r=dr(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=we(r.ref,vr(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};Fe.displayName="Presence";function dr(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,h]=fr(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=We(r.current);a.current=s==="mounted"?d:"none"},[s]),ke(()=>{const d=r.current,E=o.current;if(E!==e){const C=a.current,_=We(d);e?h("MOUNT"):_==="none"||d?.display==="none"?h("UNMOUNT"):h(E&&C!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),ke(()=>{if(t){let d;const E=t.ownerDocument.defaultView??window,y=_=>{const g=We(r.current).includes(CSS.escape(_.animationName));if(_.target===t&&g&&(h("ANIMATION_END"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",d=E.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},C=_=>{_.target===t&&(a.current=We(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{E.clearTimeout(d),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function We(e){return e?.animationName||"none"}function vr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nt=0;function pr(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Lt()),document.body.insertAdjacentElement("beforeend",e[1]??Lt()),nt++,()=>{nt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nt--}},[])}function Lt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fe.apply(this,arguments)};function jt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function mr(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $e="right-scroll-bar-position",Be="width-before-scroll-bar",hr="with-scroll-bars-hidden",gr="--removed-body-scroll-bar-size";function rt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yr(e,t){var n=G.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var br=typeof window<"u"?i.useLayoutEffect:i.useEffect,Mt=new WeakMap;function Er(e,t){var n=yr(null,function(r){return e.forEach(function(o){return rt(o,r)})});return br(function(){var r=Mt.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||rt(s,null)}),a.forEach(function(s){o.has(s)||rt(s,c)})}Mt.set(n,e)},[e]),n}function xr(e){return e}function wr(e,t){t===void 0&&(t=xr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var h=function(){var E=c;c=[],E.forEach(a)},d=function(){return Promise.resolve().then(h)};d(),n={push:function(E){c.push(E),d()},filter:function(E){return c=c.filter(E),n}}}};return o}function Sr(e){e===void 0&&(e={});var t=wr(null);return t.options=fe({async:!0,ssr:!1},e),t}var Ft=function(e){var t=e.sideCar,n=jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,fe({},n))};Ft.isSideCarExport=!0;function _r(e,t){return e.useMedium(t),Ft}var Wt=Sr(),ot=function(){},Ue=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ot,onWheelCapture:ot,onTouchMoveCapture:ot}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,h=e.className,d=e.removeScrollBar,E=e.enabled,y=e.shards,C=e.sideCar,_=e.noRelative,$=e.noIsolation,g=e.inert,R=e.allowPinchZoom,T=e.as,j=T===void 0?"div":T,M=e.gapMode,B=jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Y=C,X=Er([n,t]),I=fe(fe({},B),o);return i.createElement(i.Fragment,null,E&&i.createElement(Y,{sideCar:Wt,removeScrollBar:d,shards:y,noRelative:_,noIsolation:$,inert:g,setCallbacks:a,allowPinchZoom:!!R,lockRef:n,gapMode:M}),c?i.cloneElement(i.Children.only(s),fe(fe({},I),{ref:X})):i.createElement(j,fe({},I,{className:h,ref:X}),s))});Ue.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ue.classNames={fullWidth:Be,zeroRight:$e};var Cr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cr();return t&&e.setAttribute("nonce",t),e}function Nr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Or(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rr())&&(Nr(t,n),Or(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tr=function(){var e=Pr();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$t=function(){var e=Tr(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ir={left:0,top:0,right:0,gap:0},at=function(e){return parseInt(e||"",10)||0},Ar=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[at(n),at(r),at(o)]},Dr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ir;var t=Ar(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},kr=$t(),Ce="data-scroll-locked",Lr=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
7
|
+
.`.concat(hr,` {
|
|
8
8
|
overflow: hidden `).concat(r,`;
|
|
9
9
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
10
10
|
}
|
|
@@ -38,30 +38,29 @@ React keys must be passed directly to JSX without using spread:
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
body[`).concat(Ce,`] {
|
|
41
|
-
`).concat(
|
|
41
|
+
`).concat(gr,": ").concat(s,`px;
|
|
42
42
|
}
|
|
43
|
-
`)}
|
|
43
|
+
`)},Bt=function(){var e=parseInt(document.body.getAttribute(Ce)||"0",10);return isFinite(e)?e:0},jr=function(){i.useEffect(function(){return document.body.setAttribute(Ce,(Bt()+1).toString()),function(){var e=Bt()-1;e<=0?document.body.removeAttribute(Ce):document.body.setAttribute(Ce,e.toString())}},[])},Mr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;jr();var a=i.useMemo(function(){return Dr(o)},[o]);return i.createElement(kr,{styles:Lr(a,!t,o,n?"":"!important")})},st=!1;if(typeof window<"u")try{var ze=Object.defineProperty({},"passive",{get:function(){return st=!0,!0}});window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch{st=!1}var Re=st?{passive:!1}:!1,Fr=function(e){return e.tagName==="TEXTAREA"},Ut=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fr(e)&&n[t]==="visible")},Wr=function(e){return Ut(e,"overflowY")},$r=function(e){return Ut(e,"overflowX")},zt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Vt(e,r);if(o){var a=Yt(e,r),c=a[1],s=a[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Br=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ur=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vt=function(e,t){return e==="v"?Wr(t):$r(t)},Yt=function(e,t){return e==="v"?Br(t):Ur(t)},zr=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vr=function(e,t,n,r,o){var a=zr(e,window.getComputedStyle(t).direction),c=a*r,s=n.target,h=t.contains(s),d=!1,E=c>0,y=0,C=0;do{if(!s)break;var _=Yt(e,s),$=_[0],g=_[1],R=_[2],T=g-R-a*$;($||T)&&Vt(e,s)&&(y+=T,C+=$);var j=s.parentNode;s=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&s!==document.body||h&&(t.contains(s)||t===s));return(E&&Math.abs(y)<1||!E&&Math.abs(C)<1)&&(d=!0),d},Ve=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ht=function(e){return[e.deltaX,e.deltaY]},Gt=function(e){return e&&"current"in e?e.current:e},Yr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hr=function(e){return`
|
|
44
44
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
45
45
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
46
|
-
`)},
|
|
46
|
+
`)},Gr=0,Ne=[];function Kr(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Gr++)[0],a=i.useState($t)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=mr([e.lockRef.current],(e.shards||[]).map(Gt),!0).filter(Boolean);return g.forEach(function(R){return R.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(g,R){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!c.current.allowPinchZoom;var T=Ve(g),j=n.current,M="deltaX"in g?g.deltaX:j[0]-T[0],B="deltaY"in g?g.deltaY:j[1]-T[1],Y,X=g.target,I=Math.abs(M)>Math.abs(B)?"h":"v";if("touches"in g&&I==="h"&&X.type==="range")return!1;var K=window.getSelection(),re=K&&K.anchorNode,ce=re?re===X||re.contains(X):!1;if(ce)return!1;var Q=zt(I,X);if(!Q)return!0;if(Q?Y=I:(Y=I==="v"?"h":"v",Q=zt(I,X)),!Q)return!1;if(!r.current&&"changedTouches"in g&&(M||B)&&(r.current=Y),!Y)return!0;var ae=r.current||Y;return Vr(ae,R,g,ae==="h"?M:B)},[]),h=i.useCallback(function(g){var R=g;if(!(!Ne.length||Ne[Ne.length-1]!==a)){var T="deltaY"in R?Ht(R):Ve(R),j=t.current.filter(function(Y){return Y.name===R.type&&(Y.target===R.target||R.target===Y.shadowParent)&&Yr(Y.delta,T)})[0];if(j&&j.should){R.cancelable&&R.preventDefault();return}if(!j){var M=(c.current.shards||[]).map(Gt).filter(Boolean).filter(function(Y){return Y.contains(R.target)}),B=M.length>0?s(R,M[0]):!c.current.noIsolation;B&&R.cancelable&&R.preventDefault()}}},[]),d=i.useCallback(function(g,R,T,j){var M={name:g,delta:R,target:T,should:j,shadowParent:qr(T)};t.current.push(M),setTimeout(function(){t.current=t.current.filter(function(B){return B!==M})},1)},[]),E=i.useCallback(function(g){n.current=Ve(g),r.current=void 0},[]),y=i.useCallback(function(g){d(g.type,Ht(g),g.target,s(g,e.lockRef.current))},[]),C=i.useCallback(function(g){d(g.type,Ve(g),g.target,s(g,e.lockRef.current))},[]);i.useEffect(function(){return Ne.push(a),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:C}),document.addEventListener("wheel",h,Re),document.addEventListener("touchmove",h,Re),document.addEventListener("touchstart",E,Re),function(){Ne=Ne.filter(function(g){return g!==a}),document.removeEventListener("wheel",h,Re),document.removeEventListener("touchmove",h,Re),document.removeEventListener("touchstart",E,Re)}},[]);var _=e.removeScrollBar,$=e.inert;return i.createElement(i.Fragment,null,$?i.createElement(a,{styles:Hr(o)}):null,_?i.createElement(Mr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qr(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xr=_r(Wt,Kr);var Kt=i.forwardRef(function(e,t){return i.createElement(Ue,fe({},e,{ref:t,sideCar:Xr}))});Kt.classNames=Ue.classNames;var Zr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oe=new WeakMap,Ye=new WeakMap,He={},it=0,qt=function(e){return e&&(e.host||qt(e.parentNode))},Jr=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qt(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qr=function(e,t,n,r){var o=Jr(t,Array.isArray(e)?e:[e]);He[n]||(He[n]=new WeakMap);var a=He[n],c=[],s=new Set,h=new Set(o),d=function(y){!y||s.has(y)||(s.add(y),d(y.parentNode))};o.forEach(d);var E=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(C){if(s.has(C))E(C);else try{var _=C.getAttribute(r),$=_!==null&&_!=="false",g=(Oe.get(C)||0)+1,R=(a.get(C)||0)+1;Oe.set(C,g),a.set(C,R),c.push(C),g===1&&$&&Ye.set(C,!0),R===1&&C.setAttribute(n,"true"),$||C.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",C,T)}})};return E(t),s.clear(),it++,function(){c.forEach(function(y){var C=Oe.get(y)-1,_=a.get(y)-1;Oe.set(y,C),a.set(y,_),C||(Ye.has(y)||y.removeAttribute(r),Ye.delete(y)),_||y.removeAttribute(n)}),it--,it||(Oe=new WeakMap,Oe=new WeakMap,Ye=new WeakMap,He={})}},eo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zr(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qr(r,o,n,"aria-hidden")):function(){return null}},Ge="Dialog",[Xt]=kn(Ge),[to,ue]=Xt(Ge),Zt=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,s=i.useRef(null),h=i.useRef(null),[d,E]=Wn({prop:r,defaultProp:o??!1,onChange:a,caller:Ge});return b.jsx(to,{scope:t,triggerRef:s,contentRef:h,contentId:Je(),titleId:Je(),descriptionId:Je(),open:d,onOpenChange:E,onOpenToggle:i.useCallback(()=>E(y=>!y),[E]),modal:c,children:n})};Zt.displayName=Ge;var Jt="DialogTrigger",no=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ue(Jt,n),a=we(t,o.triggerRef);return b.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ut(o.open),...r,ref:a,onClick:he(e.onClick,o.onOpenToggle)})});no.displayName=Jt;var ct="DialogPortal",[ro,Qt]=Xt(ct,{forceMount:void 0}),en=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ue(ct,t);return b.jsx(ro,{scope:t,forceMount:n,children:i.Children.map(r,c=>b.jsx(Fe,{present:n||a.open,children:b.jsx(kt,{asChild:!0,container:o,children:c})}))})};en.displayName=ct;var Ke="DialogOverlay",tn=i.forwardRef((e,t)=>{const n=Qt(Ke,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ue(Ke,e.__scopeDialog);return a.modal?b.jsx(Fe,{present:r||a.open,children:b.jsx(ao,{...o,ref:t})}):null});tn.displayName=Ke;var oo=wt("DialogOverlay.RemoveScroll"),ao=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ue(Ke,n);return b.jsx(Kt,{as:oo,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(ve.div,{"data-state":ut(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Se="DialogContent",nn=i.forwardRef((e,t)=>{const n=Qt(Se,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ue(Se,e.__scopeDialog);return b.jsx(Fe,{present:r||a.open,children:a.modal?b.jsx(so,{...o,ref:t}):b.jsx(io,{...o,ref:t})})});nn.displayName=Se;var so=i.forwardRef((e,t)=>{const n=ue(Se,e.__scopeDialog),r=i.useRef(null),o=we(t,n.contentRef,r);return i.useEffect(()=>{const a=r.current;if(a)return eo(a)},[]),b.jsx(rn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&a.preventDefault()}),onFocusOutside:he(e.onFocusOutside,a=>a.preventDefault())})}),io=i.forwardRef((e,t)=>{const n=ue(Se,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return b.jsx(rn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),rn=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,s=ue(Se,n),h=i.useRef(null),d=we(t,h);return pr(),b.jsxs(b.Fragment,{children:[b.jsx(Pt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:b.jsx(Ct,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ut(s.open),...c,ref:d,onDismiss:()=>s.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(lo,{titleId:s.titleId}),b.jsx(fo,{contentRef:h,descriptionId:s.descriptionId})]})]})}),lt="DialogTitle",on=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ue(lt,n);return b.jsx(ve.h2,{id:o.titleId,...r,ref:t})});on.displayName=lt;var an="DialogDescription",sn=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ue(an,n);return b.jsx(ve.p,{id:o.descriptionId,...r,ref:t})});sn.displayName=an;var cn="DialogClose",co=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ue(cn,n);return b.jsx(ve.button,{type:"button",...r,ref:t,onClick:he(e.onClick,()=>o.onOpenChange(!1))})});co.displayName=cn;function ut(e){return e?"open":"closed"}var ln="DialogTitleWarning",[zo,un]=Dn(ln,{contentName:Se,titleName:lt,docsSlug:"dialog"}),lo=({titleId:e})=>{const t=un(ln),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
47
47
|
|
|
48
48
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
49
49
|
|
|
50
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
50
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},uo="DialogDescriptionWarning",fo=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${un(uo).contentName}}.`;return i.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vo=Zt,po=en,mo=tn,ho=nn,go=on,yo=sn,bo=Symbol.for("react.lazy"),qe=i[" use ".trim().toString()];function Eo(e){return typeof e=="object"&&e!==null&&"then"in e}function fn(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===bo&&"_payload"in e&&Eo(e._payload)}function xo(e){const t=wo(e),n=i.forwardRef((r,o)=>{let{children:a,...c}=r;fn(a)&&typeof qe=="function"&&(a=qe(a._payload));const s=i.Children.toArray(a),h=s.find(_o);if(h){const d=h.props.children,E=s.map(y=>y===h?i.Children.count(d)>1?i.Children.only(null):i.isValidElement(d)?d.props.children:null:y);return b.jsx(t,{...c,ref:o,children:i.isValidElement(d)?i.cloneElement(d,void 0,E):null})}return b.jsx(t,{...c,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function wo(e){const t=i.forwardRef((n,r)=>{let{children:o,...a}=n;if(fn(o)&&typeof qe=="function"&&(o=qe(o._payload)),i.isValidElement(o)){const c=Ro(o),s=Co(a,o.props);return o.type!==i.Fragment&&(s.ref=r?Ze(r,c):c),i.cloneElement(o,s)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var So=Symbol("radix.slottable");function _o(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===So}function Co(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{const h=a(...s);return o(...s),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Ro(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var No=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oo=No.reduce((e,t)=>{const n=xo(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(h,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Po=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),To="VisuallyHidden",dn=i.forwardRef((e,t)=>b.jsx(Oo.span,{...e,ref:t,style:{...Po,...e.style}}));dn.displayName=To;var Io=dn;function Ao({open:e,onOpenChange:t,children:n}){return b.jsx(vo,{open:e,onOpenChange:t,children:b.jsxs(po,{children:[b.jsx(mo,{className:"fixed inset-0 bg-black/40"}),b.jsx("div",{className:`
|
|
51
51
|
fixed left-1/2 top-[20%]
|
|
52
52
|
-translate-x-1/2
|
|
53
53
|
will-change-transform will-change-opacity
|
|
54
54
|
data-[state=open]:animate-[spotlight-in_180ms_cubic-bezier(0.16,1,0.3,1)]
|
|
55
55
|
data-[state=closed]:animate-[spotlight-out_120ms_ease-out]
|
|
56
|
-
`,"data-state":e?"open":"closed",children:b.jsxs(
|
|
56
|
+
`,"data-state":e?"open":"closed",children:b.jsxs(ho,{"aria-describedby":"command-palette-description",className:`
|
|
57
57
|
w-[520px] max-w-[90vw]
|
|
58
58
|
rounded-xl
|
|
59
59
|
border border-[rgb(var(--border))]
|
|
60
60
|
bg-[rgb(var(--glass))]
|
|
61
61
|
text-[rgb(var(--fg))]
|
|
62
|
-
backdrop-blur-xl
|
|
63
62
|
shadow-xl
|
|
64
|
-
`,children:[b.jsxs(
|
|
63
|
+
`,children:[b.jsxs(Io,{children:[b.jsx(go,{children:"Command Palette"}),b.jsx(yo,{id:"command-palette-description",children:"Type to search and run commands"})]}),n]})})]})})}function Do(){const e=J(r=>r.query),t=J(r=>r.setQuery),n=G.useRef(null);return G.useEffect(()=>{const r=requestAnimationFrame(()=>{n.current?.focus()});return()=>cancelAnimationFrame(r)},[]),b.jsx("input",{ref:n,value:e,onChange:r=>t(r.target.value),placeholder:"Type a command…",spellCheck:!1,autoComplete:"off",className:`
|
|
65
64
|
w-full
|
|
66
65
|
bg-transparent
|
|
67
66
|
px-3 py-2
|
|
@@ -69,16 +68,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
69
68
|
placeholder:text-[rgb(var(--muted))]
|
|
70
69
|
caret-color-[rgb(var(--fg))]
|
|
71
70
|
focus:outline-none
|
|
72
|
-
`})}function
|
|
71
|
+
`})}function ko(e){const t=new Map;for(const n of e){const r=n.item.group??"Other";t.has(r)||t.set(r,[]),t.get(r).push(n)}return Array.from(t.entries()).map(([n,r])=>({group:n,items:r}))}function Lo(e,t){G.useEffect(()=>{t&&e.current&&e.current.scrollIntoView({block:"nearest",inline:"nearest"})},[t,e])}function vn(e,t){if(!t||t.length===0)return e;const n=new Set(t),r=[];for(let o=0;o<e.length;o++){const a=n.has(o),c=r[r.length-1];c&&c.highlight===a?c.text+=e[o]:r.push({text:e[o],highlight:a})}return r.map((o,a)=>o.highlight?b.jsx("span",{className:"text-blue-400",children:o.text},a):b.jsx("span",{children:o.text},a))}function jo({command:e,titleIndexes:t,subtitleIndexes:n,index:r}){const o=J(s=>s.close),a=J(s=>s.selectedIndex===r),c=G.useRef(null);return Lo(c,a),b.jsx("li",{children:b.jsxs("button",{ref:c,"aria-label":e.title,onClick:async()=>{await Et(e),o()},className:`
|
|
73
72
|
flex w-full items-center justify-between
|
|
74
73
|
rounded-md px-3 py-2 text-left text-sm
|
|
75
74
|
${a?"bg-zinc-800 text-white":"text-zinc-100 hover:bg-zinc-800"}
|
|
76
|
-
`,children:[b.jsx("span",{children:
|
|
77
|
-
duration-150
|
|
78
|
-
opacity-100
|
|
79
|
-
data-[empty=true]:opacity-60`,children:t.map(({group:r,items:o})=>b.jsxs("div",{children:[b.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-zinc-500",children:r}),b.jsx("ul",{children:o.map(a=>{const c=n++;return b.jsx(ko,{command:a.item,matchIndexes:a.indexes,index:c},a.item.id)})})]},r))})}function jo(){const e=J(c=>c.isOpen),t=J(c=>c.close),n=J(c=>c.selectNext),r=J(c=>c.selectPrev),o=J(c=>c.results),a=J(c=>c.selectedIndex);G.useEffect(()=>{if(!e)return;const c=s=>{switch(s.key){case"ArrowDown":s.preventDefault(),n();break;case"ArrowUp":s.preventDefault(),r();break;case"Enter":s.preventDefault();const h=o[a];h&&(h.item.run(),t());break;case"Escape":s.preventDefault(),t();break}};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,n,r,t,o,a])}function Mo({onOpenChange:e}){const t=J(r=>r.isOpen),n=J(r=>r.close);return jo(),b.jsx(No,{open:t,onOpenChange:r=>{r||n(),e?.(r)},children:b.jsxs("div",{className:"relative flex flex-col gap-2 p-2",children:[b.jsxs("span",{className:`
|
|
75
|
+
`,children:[b.jsxs("span",{className:"flex flex-col",children:[b.jsx("span",{children:vn(e.title,t)}),e.subtitle&&b.jsx("span",{className:"text-xs text-[rgb(var(--muted))]",children:vn(e.subtitle,n)})]}),e.shortcut&&b.jsx("span",{className:"text-xs text-zinc-500",children:e.shortcut})]})})}const Mo=G.memo(jo);function Fo(){const e=J(r=>r.results);if(e.length===0)return b.jsxs("div",{className:"px-3 py-8 text-center text-sm text-[rgb(var(--muted))]",children:[b.jsx("p",{children:"No matching commands"}),b.jsx("p",{className:"mt-1 text-xs",children:"Try a different keyword"})]});const t=ko(e);let n=0;return b.jsx("div",{className:"max-h-64 overflow-y-auto overscroll-contain [contain:layout_paint] transition-opacity duration-150 opacity-100",children:t.map(({group:r,items:o})=>b.jsxs("div",{children:[b.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-zinc-500",children:r}),b.jsx("ul",{children:o.map(a=>{const c=n++;return b.jsx(Mo,{command:a.item,titleIndexes:a.titleIndexes,subtitleIndexes:a.subtitleIndexes,index:c},a.item.id)})})]},r))})}function Wo(){const e=J(c=>c.isOpen),t=J(c=>c.close),n=J(c=>c.selectNext),r=J(c=>c.selectPrev),o=J(c=>c.results),a=J(c=>c.selectedIndex);G.useEffect(()=>{if(!e)return;const c=s=>{switch(s.key){case"ArrowDown":s.preventDefault(),n();break;case"ArrowUp":s.preventDefault(),r();break;case"Enter":s.preventDefault();const h=o[a];h&&(Et(h.item),t());break;case"Escape":s.preventDefault(),t();break}};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,n,r,t,o,a])}function $o({onOpenChange:e}){const t=J(r=>r.isOpen),n=J(r=>r.close);return Wo(),b.jsx(Ao,{open:t,onOpenChange:r=>{r||n(),e?.(r)},children:b.jsxs("div",{className:"relative flex flex-col gap-2 p-2",children:[b.jsxs("span",{className:`
|
|
80
76
|
absolute right-3 top-3
|
|
81
77
|
text-xs text-[rgb(var(--muted))]
|
|
82
78
|
pointer-events-none
|
|
83
79
|
select-none
|
|
84
|
-
`,children:[b.jsx("kbd",{className:"rounded border px-1.5 py-0.5 text-[10px]",children:"Esc"})," to close"]}),b.jsx(
|
|
80
|
+
`,children:[b.jsx("kbd",{className:"rounded border px-1.5 py-0.5 text-[10px]",children:"Esc"})," to close"]}),b.jsx(Do,{}),b.jsx(Fo,{})]})})}function Bo({commands:e,open:t,onOpenChange:n,shortcut:r}){const o=J(s=>s.open),a=J(s=>s.close),c=J(s=>s.registerCommands);return An(()=>{n?.(!0),o()},r),G.useEffect(()=>{c(e)},[e,c]),G.useEffect(()=>{t!==void 0&&(t?o():a())},[t,o,a]),b.jsx($o,{onOpenChange:s=>{n?.(s),s||a()}})}me.GlyphX=Bo,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glyphx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A fast, keyboard-first, Spotlight-style command palette for React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,13 +12,17 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js"
|
|
16
|
-
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.umd.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/index.css"
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
21
|
"dev": "vite",
|
|
20
22
|
"build": "vite build",
|
|
21
|
-
"preview": "vite preview"
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest"
|
|
22
26
|
},
|
|
23
27
|
"peerDependencies": {
|
|
24
28
|
"react": "^18 || ^19",
|
|
@@ -27,8 +31,6 @@
|
|
|
27
31
|
"dependencies": {
|
|
28
32
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
29
33
|
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
30
|
-
"clsx": "^2.1.1",
|
|
31
|
-
"cmdk": "^1.1.1",
|
|
32
34
|
"fuzzysort": "^3.1.0",
|
|
33
35
|
"zustand": "^5.0.9"
|
|
34
36
|
},
|
|
@@ -36,6 +38,9 @@
|
|
|
36
38
|
"@eslint/js": "^9.39.1",
|
|
37
39
|
"@tailwindcss/cli": "^4.1.18",
|
|
38
40
|
"@tailwindcss/postcss": "^4.1.18",
|
|
41
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
42
|
+
"@testing-library/react": "^16.3.2",
|
|
43
|
+
"@testing-library/user-event": "^14.6.1",
|
|
39
44
|
"@types/node": "^24.10.1",
|
|
40
45
|
"@types/react": "^19.2.5",
|
|
41
46
|
"@types/react-dom": "^19.2.3",
|
|
@@ -45,11 +50,13 @@
|
|
|
45
50
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
46
51
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
47
52
|
"globals": "^16.5.0",
|
|
53
|
+
"jsdom": "^29.1.1",
|
|
48
54
|
"postcss": "^8.5.6",
|
|
49
55
|
"tailwindcss": "^4.1.18",
|
|
50
56
|
"typescript": "~5.9.3",
|
|
51
57
|
"typescript-eslint": "^8.46.4",
|
|
52
|
-
"vite": "^7.2.4"
|
|
58
|
+
"vite": "^7.2.4",
|
|
59
|
+
"vitest": "^4.1.8"
|
|
53
60
|
},
|
|
54
61
|
"keywords": [
|
|
55
62
|
"react",
|
package/dist/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|