@hubspot/cms-dev-server 0.18.22 → 0.18.23

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.
Files changed (43) hide show
  1. package/dist/index.js +6 -6
  2. package/dist/run.js +6 -8
  3. package/package.json +4 -5
  4. package/types/routes/meta.d.ts +2 -0
  5. package/dist/.DS_Store +0 -0
  6. package/dist/App.js +0 -168
  7. package/dist/App.js.map +0 -7
  8. package/dist/_.._/.DS_Store +0 -0
  9. package/dist/_.._/app/serverEntry.js +0 -8
  10. package/dist/_.._/app/serverEntry.js.map +0 -7
  11. package/dist/clientEntry.css +0 -2
  12. package/dist/clientEntry.css.map +0 -7
  13. package/dist/clientEntry.js +0 -168
  14. package/dist/clientEntry.js.map +0 -7
  15. package/dist/components.json +0 -20
  16. package/dist/fonts/LexendDeca-Bold-PSGSBIWW.woff2 +0 -0
  17. package/dist/fonts/LexendDeca-Bold.woff2 +0 -0
  18. package/dist/fonts/LexendDeca-Light-IDG5XLZG.woff2 +0 -0
  19. package/dist/fonts/LexendDeca-Light.woff2 +0 -0
  20. package/dist/fonts/LexendDeca-Medium-ZCTJP7FU.woff2 +0 -0
  21. package/dist/fonts/LexendDeca-Medium.woff2 +0 -0
  22. package/dist/fonts/LexendDeca-SemiBold-LCAJGQDV.woff2 +0 -0
  23. package/dist/fonts/LexendDeca-SemiBold.woff2 +0 -0
  24. package/dist/generateJsonFromJsx.js.map +0 -7
  25. package/dist/index.css +0 -2
  26. package/dist/index.css.map +0 -7
  27. package/dist/index.html +0 -14
  28. package/dist/index.js.map +0 -7
  29. package/dist/internalSsr.js.map +0 -7
  30. package/dist/island-runtime.js.map +0 -7
  31. package/dist/postcss.config.js +0 -6
  32. package/dist/run.js.map +0 -7
  33. package/dist/storybook/index.js.map +0 -7
  34. package/dist/storybook-main/main.js.map +0 -7
  35. package/dist/storybook-main/preview.js.map +0 -7
  36. package/dist/tailwind.config.js +0 -67
  37. package/types/constants/errors.d.ts +0 -5
  38. package/types/createAppViteConfig.d.ts +0 -2
  39. package/types/lib/cli.d.ts +0 -22
  40. package/types/lib/cliUtils.d.ts +0 -14
  41. package/types/routes/api.d.ts +0 -2
  42. package/types/routes/appServerRoutes.d.ts +0 -5
  43. package/types/storybook-main/preview.d.ts +0 -9
@@ -1,168 +0,0 @@
1
- import{StrictMode as tf}from"react";import{hydrateRoot as of}from"react-dom/client";import{useState as ef}from"react";import*as y from"react";function K(e,a,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),t===!1||!r.defaultPrevented)return a?.(r)}}import*as jo from"react";function yn(e,a){typeof e=="function"?e(a):e!=null&&(e.current=a)}function kt(...e){return a=>e.forEach(t=>yn(t,a))}function Z(...e){return jo.useCallback(kt(...e),e)}import*as fe from"react";import{jsx as Xo}from"react/jsx-runtime";function $o(e,a){let t=fe.createContext(a),o=l=>{let{children:s,...n}=l,d=fe.useMemo(()=>n,Object.values(n));return Xo(t.Provider,{value:d,children:s})};o.displayName=e+"Provider";function r(l){let s=fe.useContext(t);if(s)return s;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,r]}function Ka(e,a=[]){let t=[];function o(l,s){let n=fe.createContext(s),d=t.length;t=[...t,s];let u=f=>{let{scope:m,children:p,...x}=f,c=m?.[e]?.[d]||n,h=fe.useMemo(()=>x,Object.values(x));return Xo(c.Provider,{value:h,children:p})};u.displayName=l+"Provider";function i(f,m){let p=m?.[e]?.[d]||n,x=fe.useContext(p);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[u,i]}let r=()=>{let l=t.map(s=>fe.createContext(s));return function(n){let d=n?.[e]||l;return fe.useMemo(()=>({[`__scope${e}`]:{...n,[e]:d}}),[n,d])}};return r.scopeName=e,[o,bn(r,...a)]}function bn(...e){let a=e[0];if(e.length===1)return a;let t=()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let s=o.reduce((n,{useScope:d,scopeName:u})=>{let f=d(l)[`__scope${u}`];return{...n,...f}},{});return fe.useMemo(()=>({[`__scope${a.scopeName}`]:s}),[s])}};return t.scopeName=a.scopeName,t}import*as H from"react";import*as Ko from"react";import*as Zo from"react-dom";import*as J from"react";import{Fragment as Pn,jsx as Tt}from"react/jsx-runtime";var ze=J.forwardRef((e,a)=>{let{children:t,...o}=e,r=J.Children.toArray(t),l=r.find(Rn);if(l){let s=l.props.children,n=r.map(d=>d===l?J.Children.count(s)>1?J.Children.only(null):J.isValidElement(s)?s.props.children:null:d);return Tt(Dt,{...o,ref:a,children:J.isValidElement(s)?J.cloneElement(s,void 0,n):null})}return Tt(Dt,{...o,ref:a,children:t})});ze.displayName="Slot";var Dt=J.forwardRef((e,a)=>{let{children:t,...o}=e;if(J.isValidElement(t)){let r=kn(t);return J.cloneElement(t,{...An(o,t.props),ref:a?kt(a,r):r})}return J.Children.count(t)>1?J.Children.only(null):null});Dt.displayName="SlotClone";var Mt=({children:e})=>Tt(Pn,{children:e});function Rn(e){return J.isValidElement(e)&&e.type===Mt}function An(e,a){let t={...a};for(let o in a){let r=e[o],l=a[o];/^on[A-Z]/.test(o)?r&&l?t[o]=(...n)=>{l(...n),r(...n)}:r&&(t[o]=r):o==="style"?t[o]={...r,...l}:o==="className"&&(t[o]=[r,l].filter(Boolean).join(" "))}return{...e,...t}}function kn(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning;return t?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}import{jsx as Tn}from"react/jsx-runtime";var Dn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q=Dn.reduce((e,a)=>{let t=Ko.forwardRef((o,r)=>{let{asChild:l,...s}=o,n=l?ze:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Tn(n,{...s,ref:r})});return t.displayName=`Primitive.${a}`,{...e,[a]:t}},{});function Jo(e,a){e&&Zo.flushSync(()=>e.dispatchEvent(a))}import*as la from"react";function ne(e){let a=la.useRef(e);return la.useEffect(()=>{a.current=e}),la.useMemo(()=>(...t)=>a.current?.(...t),[])}import*as Yo from"react";function Qo(e,a=globalThis?.document){let t=ne(e);Yo.useEffect(()=>{let o=r=>{r.key==="Escape"&&t(r)};return a.addEventListener("keydown",o,{capture:!0}),()=>a.removeEventListener("keydown",o,{capture:!0})},[t,a])}import{jsx as tr}from"react/jsx-runtime";var Mn="DismissableLayer",Bt="dismissableLayer.update",Bn="dismissableLayer.pointerDownOutside",Fn="dismissableLayer.focusOutside",er,or=H.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sa=H.forwardRef((e,a)=>{let{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:l,onInteractOutside:s,onDismiss:n,...d}=e,u=H.useContext(or),[i,f]=H.useState(null),m=i?.ownerDocument??globalThis?.document,[,p]=H.useState({}),x=Z(a,S=>f(S)),c=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=c.indexOf(h),L=i?c.indexOf(i):-1,I=u.layersWithOutsidePointerEventsDisabled.size>0,C=L>=g,w=Nn(S=>{let A=S.target,E=[...u.branches].some(M=>M.contains(A));!C||E||(r?.(S),s?.(S),S.defaultPrevented||n?.())},m),v=qn(S=>{let A=S.target;[...u.branches].some(M=>M.contains(A))||(l?.(S),s?.(S),S.defaultPrevented||n?.())},m);return Qo(S=>{L===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&n&&(S.preventDefault(),n()))},m),H.useEffect(()=>{if(i)return t&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(er=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(i)),u.layers.add(i),ar(),()=>{t&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=er)}},[i,m,t,u]),H.useEffect(()=>()=>{i&&(u.layers.delete(i),u.layersWithOutsidePointerEventsDisabled.delete(i),ar())},[i,u]),H.useEffect(()=>{let S=()=>p({});return document.addEventListener(Bt,S),()=>document.removeEventListener(Bt,S)},[]),tr(q.div,{...d,ref:x,style:{pointerEvents:I?C?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,v.onFocusCapture),onBlurCapture:K(e.onBlurCapture,v.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,w.onPointerDownCapture)})});Sa.displayName=Mn;var On="DismissableLayerBranch",En=H.forwardRef((e,a)=>{let t=H.useContext(or),o=H.useRef(null),r=Z(a,o);return H.useEffect(()=>{let l=o.current;if(l)return t.branches.add(l),()=>{t.branches.delete(l)}},[t.branches]),tr(q.div,{...e,ref:r})});En.displayName=On;function Nn(e,a=globalThis?.document){let t=ne(e),o=H.useRef(!1),r=H.useRef(()=>{});return H.useEffect(()=>{let l=n=>{if(n.target&&!o.current){let u=function(){rr(Bn,t,i,{discrete:!0})};var d=u;let i={originalEvent:n};n.pointerType==="touch"?(a.removeEventListener("click",r.current),r.current=u,a.addEventListener("click",r.current,{once:!0})):u()}else a.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{a.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(s),a.removeEventListener("pointerdown",l),a.removeEventListener("click",r.current)}},[a,t]),{onPointerDownCapture:()=>o.current=!0}}function qn(e,a=globalThis?.document){let t=ne(e),o=H.useRef(!1);return H.useEffect(()=>{let r=l=>{l.target&&!o.current&&rr(Fn,t,{originalEvent:l},{discrete:!1})};return a.addEventListener("focusin",r),()=>a.removeEventListener("focusin",r)},[a,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ar(){let e=new CustomEvent(Bt);document.dispatchEvent(e)}function rr(e,a,t,{discrete:o}){let r=t.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});a&&r.addEventListener(e,a,{once:!0}),o?Jo(r,l):r.dispatchEvent(l)}import*as Ft from"react";import*as lr from"react";var ce=Boolean(globalThis?.document)?lr.useLayoutEffect:()=>{};var Hn=Ft["useId".toString()]||(()=>{}),Un=0;function sa(e){let[a,t]=Ft.useState(Hn());return ce(()=>{e||t(o=>o??String(Un++))},[e]),e||(a?`radix-${a}`:"")}import*as ue from"react";var sr=["top","right","bottom","left"];var we=Math.min,te=Math.max,ya=Math.round,ba=Math.floor,ge=e=>({x:e,y:e}),_n={left:"right",right:"left",bottom:"top",top:"bottom"},Wn={start:"end",end:"start"};function Ja(e,a,t){return te(e,we(a,t))}function Se(e,a){return typeof e=="function"?e(a):e}function ve(e){return e.split("-")[0]}function Ge(e){return e.split("-")[1]}function Ya(e){return e==="x"?"y":"x"}function Qa(e){return e==="y"?"height":"width"}function Pe(e){return["top","bottom"].includes(ve(e))?"y":"x"}function et(e){return Ya(Pe(e))}function nr(e,a,t){t===void 0&&(t=!1);let o=Ge(e),r=et(e),l=Qa(r),s=r==="x"?o===(t?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[l]>a.floating[l]&&(s=va(s)),[s,va(s)]}function ur(e){let a=va(e);return[Za(e),a,Za(a)]}function Za(e){return e.replace(/start|end/g,a=>Wn[a])}function Vn(e,a,t){let o=["left","right"],r=["right","left"],l=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return t?a?r:o:a?o:r;case"left":case"right":return a?l:s;default:return[]}}function dr(e,a,t,o){let r=Ge(e),l=Vn(ve(e),t==="start",o);return r&&(l=l.map(s=>s+"-"+r),a&&(l=l.concat(l.map(Za)))),l}function va(e){return e.replace(/left|right|bottom|top/g,a=>_n[a])}function zn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ot(e){return typeof e!="number"?zn(e):{top:e,right:e,bottom:e,left:e}}function je(e){let{x:a,y:t,width:o,height:r}=e;return{width:o,height:r,top:t,left:a,right:a+o,bottom:t+r,x:a,y:t}}function ir(e,a,t){let{reference:o,floating:r}=e,l=Pe(a),s=et(a),n=Qa(s),d=ve(a),u=l==="y",i=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[n]/2-r[n]/2,p;switch(d){case"top":p={x:i,y:o.y-r.height};break;case"bottom":p={x:i,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(Ge(a)){case"start":p[s]-=m*(t&&u?-1:1);break;case"end":p[s]+=m*(t&&u?-1:1);break}return p}var pr=async(e,a,t)=>{let{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:s}=t,n=l.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(a)),u=await s.getElementRects({reference:e,floating:a,strategy:r}),{x:i,y:f}=ir(u,o,d),m=o,p={},x=0;for(let c=0;c<n.length;c++){let{name:h,fn:g}=n[c],{x:L,y:I,data:C,reset:w}=await g({x:i,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:a}});i=L??i,f=I??f,p={...p,[h]:{...p[h],...C}},w&&x<=50&&(x++,typeof w=="object"&&(w.placement&&(m=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:e,floating:a,strategy:r}):w.rects),{x:i,y:f}=ir(u,m,d)),c=-1)}return{x:i,y:f,placement:m,strategy:r,middlewareData:p}};async function na(e,a){var t;a===void 0&&(a={});let{x:o,y:r,platform:l,rects:s,elements:n,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:i="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Se(a,e),x=Ot(p),h=n[m?f==="floating"?"reference":"floating":f],g=je(await l.getClippingRect({element:(t=await(l.isElement==null?void 0:l.isElement(h)))==null||t?h:h.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(n.floating)),boundary:u,rootBoundary:i,strategy:d})),L=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n.floating)),C=await(l.isElement==null?void 0:l.isElement(I))?await(l.getScale==null?void 0:l.getScale(I))||{x:1,y:1}:{x:1,y:1},w=je(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:L,offsetParent:I,strategy:d}):L);return{top:(g.top-w.top+x.top)/C.y,bottom:(w.bottom-g.bottom+x.bottom)/C.y,left:(g.left-w.left+x.left)/C.x,right:(w.right-g.right+x.right)/C.x}}var mr=e=>({name:"arrow",options:e,async fn(a){let{x:t,y:o,placement:r,rects:l,platform:s,elements:n,middlewareData:d}=a,{element:u,padding:i=0}=Se(e,a)||{};if(u==null)return{};let f=Ot(i),m={x:t,y:o},p=et(r),x=Qa(p),c=await s.getDimensions(u),h=p==="y",g=h?"top":"left",L=h?"bottom":"right",I=h?"clientHeight":"clientWidth",C=l.reference[x]+l.reference[p]-m[p]-l.floating[x],w=m[p]-l.reference[p],v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),S=v?v[I]:0;(!S||!await(s.isElement==null?void 0:s.isElement(v)))&&(S=n.floating[I]||l.floating[x]);let A=C/2-w/2,E=S/2-c[x]/2-1,M=we(f[g],E),j=we(f[L],E),P=M,U=S-c[x]-j,T=S/2-c[x]/2+A,ae=Ja(P,T,U),N=!d.arrow&&Ge(r)!=null&&T!==ae&&l.reference[x]/2-(T<P?M:j)-c[x]/2<0,W=N?T<P?T-P:T-U:0;return{[p]:m[p]+W,data:{[p]:ae,centerOffset:T-ae-W,...N&&{alignmentOffset:W}},reset:N}}});var hr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var t,o;let{placement:r,middlewareData:l,rects:s,initialPlacement:n,platform:d,elements:u}=a,{mainAxis:i=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:c=!0,...h}=Se(e,a);if((t=l.arrow)!=null&&t.alignmentOffset)return{};let g=ve(r),L=Pe(n),I=ve(n)===n,C=await(d.isRTL==null?void 0:d.isRTL(u.floating)),w=m||(I||!c?[va(n)]:ur(n)),v=x!=="none";!m&&v&&w.push(...dr(n,c,x,C));let S=[n,...w],A=await na(a,h),E=[],M=((o=l.flip)==null?void 0:o.overflows)||[];if(i&&E.push(A[g]),f){let T=nr(r,s,C);E.push(A[T[0]],A[T[1]])}if(M=[...M,{placement:r,overflows:E}],!E.every(T=>T<=0)){var j,P;let T=(((j=l.flip)==null?void 0:j.index)||0)+1,ae=S[T];if(ae)return{data:{index:T,overflows:M},reset:{placement:ae}};let N=(P=M.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(p){case"bestFit":{var U;let W=(U=M.filter(R=>{if(v){let _=Pe(R.placement);return _===L||_==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(_=>_>0).reduce((_,se)=>_+se,0)]).sort((R,_)=>R[1]-_[1])[0])==null?void 0:U[0];W&&(N=W);break}case"initialPlacement":N=n;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function fr(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function cr(e){return sr.some(a=>e[a]>=0)}var xr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){let{rects:t}=a,{strategy:o="referenceHidden",...r}=Se(e,a);switch(o){case"referenceHidden":{let l=await na(a,{...r,elementContext:"reference"}),s=fr(l,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:cr(s)}}}case"escaped":{let l=await na(a,{...r,altBoundary:!0}),s=fr(l,t.floating);return{data:{escapedOffsets:s,escaped:cr(s)}}}default:return{}}}}};async function Gn(e,a){let{placement:t,platform:o,elements:r}=e,l=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=ve(t),n=Ge(t),d=Pe(t)==="y",u=["left","top"].includes(s)?-1:1,i=l&&d?-1:1,f=Se(a,e),{mainAxis:m,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return n&&typeof x=="number"&&(p=n==="end"?x*-1:x),d?{x:p*i,y:m*u}:{x:m*u,y:p*i}}var gr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var t,o;let{x:r,y:l,placement:s,middlewareData:n}=a,d=await Gn(a,e);return s===((t=n.offset)==null?void 0:t.placement)&&(o=n.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:l+d.y,data:{...d,placement:s}}}}},Lr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){let{x:t,y:o,placement:r}=a,{mainAxis:l=!0,crossAxis:s=!1,limiter:n={fn:h=>{let{x:g,y:L}=h;return{x:g,y:L}}},...d}=Se(e,a),u={x:t,y:o},i=await na(a,d),f=Pe(ve(r)),m=Ya(f),p=u[m],x=u[f];if(l){let h=m==="y"?"top":"left",g=m==="y"?"bottom":"right",L=p+i[h],I=p-i[g];p=Ja(L,p,I)}if(s){let h=f==="y"?"top":"left",g=f==="y"?"bottom":"right",L=x+i[h],I=x-i[g];x=Ja(L,x,I)}let c=n.fn({...a,[m]:p,[f]:x});return{...c,data:{x:c.x-t,y:c.y-o,enabled:{[m]:l,[f]:s}}}}}},Cr=function(e){return e===void 0&&(e={}),{options:e,fn(a){let{x:t,y:o,placement:r,rects:l,middlewareData:s}=a,{offset:n=0,mainAxis:d=!0,crossAxis:u=!0}=Se(e,a),i={x:t,y:o},f=Pe(r),m=Ya(f),p=i[m],x=i[f],c=Se(n,a),h=typeof c=="number"?{mainAxis:c,crossAxis:0}:{mainAxis:0,crossAxis:0,...c};if(d){let I=m==="y"?"height":"width",C=l.reference[m]-l.floating[I]+h.mainAxis,w=l.reference[m]+l.reference[I]-h.mainAxis;p<C?p=C:p>w&&(p=w)}if(u){var g,L;let I=m==="y"?"width":"height",C=["top","left"].includes(ve(r)),w=l.reference[f]-l.floating[I]+(C&&((g=s.offset)==null?void 0:g[f])||0)+(C?0:h.crossAxis),v=l.reference[f]+l.reference[I]+(C?0:((L=s.offset)==null?void 0:L[f])||0)-(C?h.crossAxis:0);x<w?x=w:x>v&&(x=v)}return{[m]:p,[f]:x}}}},Ir=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(a){var t,o;let{placement:r,rects:l,platform:s,elements:n}=a,{apply:d=()=>{},...u}=Se(e,a),i=await na(a,u),f=ve(r),m=Ge(r),p=Pe(r)==="y",{width:x,height:c}=l.floating,h,g;f==="top"||f==="bottom"?(h=f,g=m===(await(s.isRTL==null?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(g=f,h=m==="end"?"top":"bottom");let L=c-i.top-i.bottom,I=x-i.left-i.right,C=we(c-i[h],L),w=we(x-i[g],I),v=!a.middlewareData.shift,S=C,A=w;if((t=a.middlewareData.shift)!=null&&t.enabled.x&&(A=I),(o=a.middlewareData.shift)!=null&&o.enabled.y&&(S=L),v&&!m){let M=te(i.left,0),j=te(i.right,0),P=te(i.top,0),U=te(i.bottom,0);p?A=x-2*(M!==0||j!==0?M+j:te(i.left,i.right)):S=c-2*(P!==0||U!==0?P+U:te(i.top,i.bottom))}await d({...a,availableWidth:A,availableHeight:S});let E=await s.getDimensions(n.floating);return x!==E.width||c!==E.height?{reset:{rects:!0}}:{}}}};function at(){return typeof window<"u"}function $e(e){return Sr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function Le(e){var a;return(a=(Sr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function Sr(e){return at()?e instanceof Node||e instanceof oe(e).Node:!1}function pe(e){return at()?e instanceof Element||e instanceof oe(e).Element:!1}function Ce(e){return at()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function wr(e){return!at()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}function ua(e){let{overflow:a,overflowX:t,overflowY:o,display:r}=me(e);return/auto|scroll|overlay|hidden|clip/.test(a+o+t)&&!["inline","contents"].includes(r)}function vr(e){return["table","td","th"].includes($e(e))}function Pa(e){return[":popover-open",":modal"].some(a=>{try{return e.matches(a)}catch{return!1}})}function tt(e){let a=ot(),t=pe(e)?me(e):e;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!a&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!a&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function yr(e){let a=Re(e);for(;Ce(a)&&!Ke(a);){if(tt(a))return a;if(Pa(a))return null;a=Re(a)}return null}function ot(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ke(e){return["html","body","#document"].includes($e(e))}function me(e){return oe(e).getComputedStyle(e)}function Ra(e){return pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if($e(e)==="html")return e;let a=e.assignedSlot||e.parentNode||wr(e)&&e.host||Le(e);return wr(a)?a.host:a}function br(e){let a=Re(e);return Ke(a)?e.ownerDocument?e.ownerDocument.body:e.body:Ce(a)&&ua(a)?a:br(a)}function Xe(e,a,t){var o;a===void 0&&(a=[]),t===void 0&&(t=!0);let r=br(e),l=r===((o=e.ownerDocument)==null?void 0:o.body),s=oe(r);if(l){let n=rt(s);return a.concat(s,s.visualViewport||[],ua(r)?r:[],n&&t?Xe(n):[])}return a.concat(r,Xe(r,[],t))}function rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ar(e){let a=me(e),t=parseFloat(a.width)||0,o=parseFloat(a.height)||0,r=Ce(e),l=r?e.offsetWidth:t,s=r?e.offsetHeight:o,n=ya(t)!==l||ya(o)!==s;return n&&(t=l,o=s),{width:t,height:o,$:n}}function Nt(e){return pe(e)?e:e.contextElement}function da(e){let a=Nt(e);if(!Ce(a))return ge(1);let t=a.getBoundingClientRect(),{width:o,height:r,$:l}=Ar(a),s=(l?ya(t.width):t.width)/o,n=(l?ya(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!n||!Number.isFinite(n))&&(n=1),{x:s,y:n}}var jn=ge(0);function kr(e){let a=oe(e);return!ot()||!a.visualViewport?jn:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Xn(e,a,t){return a===void 0&&(a=!1),!t||a&&t!==oe(e)?!1:a}function Ze(e,a,t,o){a===void 0&&(a=!1),t===void 0&&(t=!1);let r=e.getBoundingClientRect(),l=Nt(e),s=ge(1);a&&(o?pe(o)&&(s=da(o)):s=da(e));let n=Xn(l,t,o)?kr(l):ge(0),d=(r.left+n.x)/s.x,u=(r.top+n.y)/s.y,i=r.width/s.x,f=r.height/s.y;if(l){let m=oe(l),p=o&&pe(o)?oe(o):o,x=m,c=rt(x);for(;c&&o&&p!==x;){let h=da(c),g=c.getBoundingClientRect(),L=me(c),I=g.left+(c.clientLeft+parseFloat(L.paddingLeft))*h.x,C=g.top+(c.clientTop+parseFloat(L.paddingTop))*h.y;d*=h.x,u*=h.y,i*=h.x,f*=h.y,d+=I,u+=C,x=oe(c),c=rt(x)}}return je({width:i,height:f,x:d,y:u})}function qt(e,a){let t=Ra(e).scrollLeft;return a?a.left+t:Ze(Le(e)).left+t}function Tr(e,a,t){t===void 0&&(t=!1);let o=e.getBoundingClientRect(),r=o.left+a.scrollLeft-(t?0:qt(e,o)),l=o.top+a.scrollTop;return{x:r,y:l}}function $n(e){let{elements:a,rect:t,offsetParent:o,strategy:r}=e,l=r==="fixed",s=Le(o),n=a?Pa(a.floating):!1;if(o===s||n&&l)return t;let d={scrollLeft:0,scrollTop:0},u=ge(1),i=ge(0),f=Ce(o);if((f||!f&&!l)&&(($e(o)!=="body"||ua(s))&&(d=Ra(o)),Ce(o))){let p=Ze(o);u=da(o),i.x=p.x+o.clientLeft,i.y=p.y+o.clientTop}let m=s&&!f&&!l?Tr(s,d,!0):ge(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-d.scrollLeft*u.x+i.x+m.x,y:t.y*u.y-d.scrollTop*u.y+i.y+m.y}}function Kn(e){return Array.from(e.getClientRects())}function Zn(e){let a=Le(e),t=Ra(e),o=e.ownerDocument.body,r=te(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),l=te(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+qt(e),n=-t.scrollTop;return me(o).direction==="rtl"&&(s+=te(a.clientWidth,o.clientWidth)-r),{width:r,height:l,x:s,y:n}}function Jn(e,a){let t=oe(e),o=Le(e),r=t.visualViewport,l=o.clientWidth,s=o.clientHeight,n=0,d=0;if(r){l=r.width,s=r.height;let u=ot();(!u||u&&a==="fixed")&&(n=r.offsetLeft,d=r.offsetTop)}return{width:l,height:s,x:n,y:d}}function Yn(e,a){let t=Ze(e,!0,a==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,l=Ce(e)?da(e):ge(1),s=e.clientWidth*l.x,n=e.clientHeight*l.y,d=r*l.x,u=o*l.y;return{width:s,height:n,x:d,y:u}}function Pr(e,a,t){let o;if(a==="viewport")o=Jn(e,t);else if(a==="document")o=Zn(Le(e));else if(pe(a))o=Yn(a,t);else{let r=kr(e);o={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return je(o)}function Dr(e,a){let t=Re(e);return t===a||!pe(t)||Ke(t)?!1:me(t).position==="fixed"||Dr(t,a)}function Qn(e,a){let t=a.get(e);if(t)return t;let o=Xe(e,[],!1).filter(n=>pe(n)&&$e(n)!=="body"),r=null,l=me(e).position==="fixed",s=l?Re(e):e;for(;pe(s)&&!Ke(s);){let n=me(s),d=tt(s);!d&&n.position==="fixed"&&(r=null),(l?!d&&!r:!d&&n.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ua(s)&&!d&&Dr(e,s))?o=o.filter(i=>i!==s):r=n,s=Re(s)}return a.set(e,o),o}function eu(e){let{element:a,boundary:t,rootBoundary:o,strategy:r}=e,s=[...t==="clippingAncestors"?Pa(a)?[]:Qn(a,this._c):[].concat(t),o],n=s[0],d=s.reduce((u,i)=>{let f=Pr(a,i,r);return u.top=te(f.top,u.top),u.right=we(f.right,u.right),u.bottom=we(f.bottom,u.bottom),u.left=te(f.left,u.left),u},Pr(a,n,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function au(e){let{width:a,height:t}=Ar(e);return{width:a,height:t}}function tu(e,a,t){let o=Ce(a),r=Le(a),l=t==="fixed",s=Ze(e,!0,l,a),n={scrollLeft:0,scrollTop:0},d=ge(0);if(o||!o&&!l)if(($e(a)!=="body"||ua(r))&&(n=Ra(a)),o){let m=Ze(a,!0,l,a);d.x=m.x+a.clientLeft,d.y=m.y+a.clientTop}else r&&(d.x=qt(r));let u=r&&!o&&!l?Tr(r,n):ge(0),i=s.left+n.scrollLeft-d.x-u.x,f=s.top+n.scrollTop-d.y-u.y;return{x:i,y:f,width:s.width,height:s.height}}function Et(e){return me(e).position==="static"}function Rr(e,a){if(!Ce(e)||me(e).position==="fixed")return null;if(a)return a(e);let t=e.offsetParent;return Le(e)===t&&(t=t.ownerDocument.body),t}function Mr(e,a){let t=oe(e);if(Pa(e))return t;if(!Ce(e)){let r=Re(e);for(;r&&!Ke(r);){if(pe(r)&&!Et(r))return r;r=Re(r)}return t}let o=Rr(e,a);for(;o&&vr(o)&&Et(o);)o=Rr(o,a);return o&&Ke(o)&&Et(o)&&!tt(o)?t:o||yr(e)||t}var ou=async function(e){let a=this.getOffsetParent||Mr,t=this.getDimensions,o=await t(e.floating);return{reference:tu(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ru(e){return me(e).direction==="rtl"}var Br={convertOffsetParentRelativeRectToViewportRelativeRect:$n,getDocumentElement:Le,getClippingRect:eu,getOffsetParent:Mr,getElementRects:ou,getClientRects:Kn,getDimensions:au,getScale:da,isElement:pe,isRTL:ru};function lu(e,a){let t=null,o,r=Le(e);function l(){var n;clearTimeout(o),(n=t)==null||n.disconnect(),t=null}function s(n,d){n===void 0&&(n=!1),d===void 0&&(d=1),l();let{left:u,top:i,width:f,height:m}=e.getBoundingClientRect();if(n||a(),!f||!m)return;let p=ba(i),x=ba(r.clientWidth-(u+f)),c=ba(r.clientHeight-(i+m)),h=ba(u),L={rootMargin:-p+"px "+-x+"px "+-c+"px "+-h+"px",threshold:te(0,we(1,d))||1},I=!0;function C(w){let v=w[0].intersectionRatio;if(v!==d){if(!I)return s();v?s(!1,v):o=setTimeout(()=>{s(!1,1e-7)},1e3)}I=!1}try{t=new IntersectionObserver(C,{...L,root:r.ownerDocument})}catch{t=new IntersectionObserver(C,L)}t.observe(e)}return s(!0),l}function Ht(e,a,t,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:n=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,u=Nt(e),i=r||l?[...u?Xe(u):[],...Xe(a)]:[];i.forEach(g=>{r&&g.addEventListener("scroll",t,{passive:!0}),l&&g.addEventListener("resize",t)});let f=u&&n?lu(u,t):null,m=-1,p=null;s&&(p=new ResizeObserver(g=>{let[L]=g;L&&L.target===u&&p&&(p.unobserve(a),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var I;(I=p)==null||I.observe(a)})),t()}),u&&!d&&p.observe(u),p.observe(a));let x,c=d?Ze(e):null;d&&h();function h(){let g=Ze(e);c&&(g.x!==c.x||g.y!==c.y||g.width!==c.width||g.height!==c.height)&&t(),c=g,x=requestAnimationFrame(h)}return t(),()=>{var g;i.forEach(L=>{r&&L.removeEventListener("scroll",t),l&&L.removeEventListener("resize",t)}),f?.(),(g=p)==null||g.disconnect(),p=null,d&&cancelAnimationFrame(x)}}var Fr=gr;var Or=Lr,Er=hr,Nr=Ir,qr=xr,Ut=mr;var Hr=Cr,_t=(e,a,t)=>{let o=new Map,r={platform:Br,...t},l={...r.platform,_c:o};return pr(e,a,{...r,platform:l})};import*as z from"react";import{useLayoutEffect as su,useEffect as nu}from"react";import*as _r from"react-dom";var lt=typeof document<"u"?su:nu;function st(e,a){if(e===a)return!0;if(typeof e!=typeof a)return!1;if(typeof e=="function"&&e.toString()===a.toString())return!0;let t,o,r;if(e&&a&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==a.length)return!1;for(o=t;o--!==0;)if(!st(e[o],a[o]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(a).length)return!1;for(o=t;o--!==0;)if(!{}.hasOwnProperty.call(a,r[o]))return!1;for(o=t;o--!==0;){let l=r[o];if(!(l==="_owner"&&e.$$typeof)&&!st(e[l],a[l]))return!1}return!0}return e!==e&&a!==a}function Wr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ur(e,a){let t=Wr(e);return Math.round(a*t)/t}function Wt(e){let a=z.useRef(e);return lt(()=>{a.current=e}),a}function Vr(e){e===void 0&&(e={});let{placement:a="bottom",strategy:t="absolute",middleware:o=[],platform:r,elements:{reference:l,floating:s}={},transform:n=!0,whileElementsMounted:d,open:u}=e,[i,f]=z.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[m,p]=z.useState(o);st(m,o)||p(o);let[x,c]=z.useState(null),[h,g]=z.useState(null),L=z.useCallback(R=>{R!==v.current&&(v.current=R,c(R))},[]),I=z.useCallback(R=>{R!==S.current&&(S.current=R,g(R))},[]),C=l||x,w=s||h,v=z.useRef(null),S=z.useRef(null),A=z.useRef(i),E=d!=null,M=Wt(d),j=Wt(r),P=Wt(u),U=z.useCallback(()=>{if(!v.current||!S.current)return;let R={placement:a,strategy:t,middleware:m};j.current&&(R.platform=j.current),_t(v.current,S.current,R).then(_=>{let se={..._,isPositioned:P.current!==!1};T.current&&!st(A.current,se)&&(A.current=se,_r.flushSync(()=>{f(se)}))})},[m,a,t,j,P]);lt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);let T=z.useRef(!1);lt(()=>(T.current=!0,()=>{T.current=!1}),[]),lt(()=>{if(C&&(v.current=C),w&&(S.current=w),C&&w){if(M.current)return M.current(C,w,U);U()}},[C,w,U,M,E]);let ae=z.useMemo(()=>({reference:v,floating:S,setReference:L,setFloating:I}),[L,I]),N=z.useMemo(()=>({reference:C,floating:w}),[C,w]),W=z.useMemo(()=>{let R={position:t,left:0,top:0};if(!N.floating)return R;let _=Ur(N.floating,i.x),se=Ur(N.floating,i.y);return n?{...R,transform:"translate("+_+"px, "+se+"px)",...Wr(N.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:_,top:se}},[t,n,N.floating,i.x,i.y]);return z.useMemo(()=>({...i,update:U,refs:ae,elements:N,floatingStyles:W}),[i,U,ae,N,W])}var uu=e=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){let{element:o,padding:r}=typeof e=="function"?e(t):e;return o&&a(o)?o.current!=null?Ut({element:o.current,padding:r}).fn(t):{}:o?Ut({element:o,padding:r}).fn(t):{}}}},zr=(e,a)=>({...Fr(e),options:[e,a]}),Gr=(e,a)=>({...Or(e),options:[e,a]}),jr=(e,a)=>({...Hr(e),options:[e,a]}),Xr=(e,a)=>({...Er(e),options:[e,a]}),$r=(e,a)=>({...Nr(e),options:[e,a]});var Kr=(e,a)=>({...qr(e),options:[e,a]});var Zr=(e,a)=>({...uu(e),options:[e,a]});import*as Yr from"react";import{jsx as Jr}from"react/jsx-runtime";var du="Arrow",Qr=Yr.forwardRef((e,a)=>{let{children:t,width:o=10,height:r=5,...l}=e;return Jr(q.svg,{...l,ref:a,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:Jr("polygon",{points:"0,0 30,0 15,10"})})});Qr.displayName=du;var el=Qr;import*as Ae from"react";import{jsx as fu}from"react/jsx-runtime";function al(e,a=[]){let t=[];function o(l,s){let n=Ae.createContext(s),d=t.length;t=[...t,s];function u(f){let{scope:m,children:p,...x}=f,c=m?.[e][d]||n,h=Ae.useMemo(()=>x,Object.values(x));return fu(c.Provider,{value:h,children:p})}function i(f,m){let p=m?.[e][d]||n,x=Ae.useContext(p);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${l}\``)}return u.displayName=l+"Provider",[u,i]}let r=()=>{let l=t.map(s=>Ae.createContext(s));return function(n){let d=n?.[e]||l;return Ae.useMemo(()=>({[`__scope${e}`]:{...n,[e]:d}}),[n,d])}};return r.scopeName=e,[o,cu(r,...a)]}function cu(...e){let a=e[0];if(e.length===1)return a;let t=()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let s=o.reduce((n,{useScope:d,scopeName:u})=>{let f=d(l)[`__scope${u}`];return{...n,...f}},{});return Ae.useMemo(()=>({[`__scope${a.scopeName}`]:s}),[s])}};return t.scopeName=a.scopeName,t}import*as tl from"react";function ol(e){let[a,t]=tl.useState(void 0);return ce(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let l=r[0],s,n;if("borderBoxSize"in l){let d=l.borderBoxSize,u=Array.isArray(d)?d[0]:d;s=u.inlineSize,n=u.blockSize}else s=e.offsetWidth,n=e.offsetHeight;t({width:s,height:n})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else t(void 0)},[e]),a}import{jsx as Je}from"react/jsx-runtime";var Vt="Popper",[rl,zt]=al(Vt),[pu,ll]=rl(Vt),sl=e=>{let{__scopePopper:a,children:t}=e,[o,r]=ue.useState(null);return Je(pu,{scope:a,anchor:o,onAnchorChange:r,children:t})};sl.displayName=Vt;var nl="PopperAnchor",ul=ue.forwardRef((e,a)=>{let{__scopePopper:t,virtualRef:o,...r}=e,l=ll(nl,t),s=ue.useRef(null),n=Z(a,s);return ue.useEffect(()=>{l.onAnchorChange(o?.current||s.current)}),o?null:Je(q.div,{...r,ref:n})});ul.displayName=nl;var Gt="PopperContent",[mu,hu]=rl(Gt),dl=ue.forwardRef((e,a)=>{let{__scopePopper:t,side:o="bottom",sideOffset:r=0,align:l="center",alignOffset:s=0,arrowPadding:n=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:i=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:x,...c}=e,h=ll(Gt,t),[g,L]=ue.useState(null),I=Z(a,wa=>L(wa)),[C,w]=ue.useState(null),v=ol(C),S=v?.width??0,A=v?.height??0,E=o+(l!=="center"?"-"+l:""),M=typeof i=="number"?i:{top:0,right:0,bottom:0,left:0,...i},j=Array.isArray(u)?u:[u],P=j.length>0,U={padding:M,boundary:j.filter(gu),altBoundary:P},{refs:T,floatingStyles:ae,placement:N,isPositioned:W,middlewareData:R}=Vr({strategy:"fixed",placement:E,whileElementsMounted:(...wa)=>Ht(...wa,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[zr({mainAxis:r+A,alignmentAxis:s}),d&&Gr({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?jr():void 0,...U}),d&&Xr({...U}),$r({...U,apply:({elements:wa,rects:Go,availableWidth:In,availableHeight:wn})=>{let{width:Sn,height:vn}=Go.reference,$a=wa.floating.style;$a.setProperty("--radix-popper-available-width",`${In}px`),$a.setProperty("--radix-popper-available-height",`${wn}px`),$a.setProperty("--radix-popper-anchor-width",`${Sn}px`),$a.setProperty("--radix-popper-anchor-height",`${vn}px`)}}),C&&Zr({element:C,padding:n}),Lu({arrowWidth:S,arrowHeight:A}),m&&Kr({strategy:"referenceHidden",...U})]}),[_,se]=cl(N),ie=ne(x);ce(()=>{W&&ie?.()},[W,ie]);let hn=R.arrow?.x,xn=R.arrow?.y,gn=R.arrow?.centerOffset!==0,[Ln,Cn]=ue.useState();return ce(()=>{g&&Cn(window.getComputedStyle(g).zIndex)},[g]),Je("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:W?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ln,["--radix-popper-transform-origin"]:[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Je(mu,{scope:t,placedSide:_,onArrowChange:w,arrowX:hn,arrowY:xn,shouldHideArrow:gn,children:Je(q.div,{"data-side":_,"data-align":se,...c,ref:I,style:{...c.style,animation:W?void 0:"none"}})})})});dl.displayName=Gt;var il="PopperArrow",xu={top:"bottom",right:"left",bottom:"top",left:"right"},fl=ue.forwardRef(function(a,t){let{__scopePopper:o,...r}=a,l=hu(il,o),s=xu[l.placedSide];return Je("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:Je(el,{...r,ref:t,style:{...r.style,display:"block"}})})});fl.displayName=il;function gu(e){return e!==null}var Lu=e=>({name:"transformOrigin",options:e,fn(a){let{placement:t,rects:o,middlewareData:r}=a,s=r.arrow?.centerOffset!==0,n=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,i]=cl(t),f={start:"0%",center:"50%",end:"100%"}[i],m=(r.arrow?.x??0)+n/2,p=(r.arrow?.y??0)+d/2,x="",c="";return u==="bottom"?(x=s?f:`${m}px`,c=`${-d}px`):u==="top"?(x=s?f:`${m}px`,c=`${o.floating.height+d}px`):u==="right"?(x=`${-d}px`,c=s?f:`${p}px`):u==="left"&&(x=`${o.floating.width+d}px`,c=s?f:`${p}px`),{data:{x,y:c}}}});function cl(e){let[a,t="center"]=e.split("-");return[a,t]}var pl=sl,ml=ul,hl=dl,xl=fl;import*as nt from"react";import Iu from"react-dom";import{jsx as wu}from"react/jsx-runtime";var Su="Portal",Aa=nt.forwardRef((e,a)=>{let{container:t,...o}=e,[r,l]=nt.useState(!1);ce(()=>l(!0),[]);let s=t||r&&globalThis?.document?.body;return s?Iu.createPortal(wu(q.div,{...o,ref:a}),s):null});Aa.displayName=Su;import*as re from"react";import*as gl from"react";function vu(e,a){return gl.useReducer((t,o)=>a[t][o]??t,e)}var Me=e=>{let{present:a,children:t}=e,o=yu(a),r=typeof t=="function"?t({present:o.isPresent}):re.Children.only(t),l=Z(o.ref,bu(r));return typeof t=="function"||o.isPresent?re.cloneElement(r,{ref:l}):null};Me.displayName="Presence";function yu(e){let[a,t]=re.useState(),o=re.useRef({}),r=re.useRef(e),l=re.useRef("none"),s=e?"mounted":"unmounted",[n,d]=vu(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return re.useEffect(()=>{let u=ut(o.current);l.current=n==="mounted"?u:"none"},[n]),ce(()=>{let u=o.current,i=r.current;if(i!==e){let m=l.current,p=ut(u);e?d("MOUNT"):p==="none"||u?.display==="none"?d("UNMOUNT"):d(i&&m!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ce(()=>{if(a){let u,i=a.ownerDocument.defaultView??window,f=p=>{let c=ut(o.current).includes(p.animationName);if(p.target===a&&c&&(d("ANIMATION_END"),!r.current)){let h=a.style.animationFillMode;a.style.animationFillMode="forwards",u=i.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=h)})}},m=p=>{p.target===a&&(l.current=ut(o.current))};return a.addEventListener("animationstart",m),a.addEventListener("animationcancel",f),a.addEventListener("animationend",f),()=>{i.clearTimeout(u),a.removeEventListener("animationstart",m),a.removeEventListener("animationcancel",f),a.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[a,d]),{isPresent:["mounted","unmountSuspended"].includes(n),ref:re.useCallback(u=>{u&&(o.current=getComputedStyle(u)),t(u)},[])}}function ut(e){return e?.animationName||"none"}function bu(e){let a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning;return t?e.ref:(a=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=a&&"isReactWarning"in a&&a.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}import*as Be from"react";function dt({prop:e,defaultProp:a,onChange:t=()=>{}}){let[o,r]=Pu({defaultProp:a,onChange:t}),l=e!==void 0,s=l?e:o,n=ne(t),d=Be.useCallback(u=>{if(l){let f=typeof u=="function"?u(e):u;f!==e&&n(f)}else r(u)},[l,e,r,n]);return[s,d]}function Pu({defaultProp:e,onChange:a}){let t=Be.useState(e),[o]=t,r=Be.useRef(o),l=ne(a);return Be.useEffect(()=>{r.current!==o&&(l(o),r.current=o)},[o,r,l]),t}import*as Ll from"react";import{jsx as Ru}from"react/jsx-runtime";var Au="VisuallyHidden",Cl=Ll.forwardRef((e,a)=>Ru(q.span,{...e,ref:a,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Cl.displayName=Au;var Il=Cl;import{jsx as Y,jsxs as Tu}from"react/jsx-runtime";var[it,Fc]=Ka("Tooltip",[zt]),ft=zt(),wl="TooltipProvider",Du=700,jt="tooltip.open",[Mu,$t]=it(wl),Kt=e=>{let{__scopeTooltip:a,delayDuration:t=Du,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:l}=e,[s,n]=y.useState(!0),d=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{let i=u.current;return()=>window.clearTimeout(i)},[]),Y(Mu,{scope:a,isOpenDelayed:s,delayDuration:t,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),n(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>n(!0),o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:y.useCallback(i=>{d.current=i},[]),disableHoverableContent:r,children:l})};Kt.displayName=wl;var ct="Tooltip",[Bu,ka]=it(ct),Sl=e=>{let{__scopeTooltip:a,children:t,open:o,defaultOpen:r=!1,onOpenChange:l,disableHoverableContent:s,delayDuration:n}=e,d=$t(ct,e.__scopeTooltip),u=ft(a),[i,f]=y.useState(null),m=sa(),p=y.useRef(0),x=s??d.disableHoverableContent,c=n??d.delayDuration,h=y.useRef(!1),[g=!1,L]=dt({prop:o,defaultProp:r,onChange:S=>{S?(d.onOpen(),document.dispatchEvent(new CustomEvent(jt))):d.onClose(),l?.(S)}}),I=y.useMemo(()=>g?h.current?"delayed-open":"instant-open":"closed",[g]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,L(!0)},[L]),w=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,L(!1)},[L]),v=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,L(!0),p.current=0},c)},[c,L]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),Y(pl,{...u,children:Y(Bu,{scope:a,contentId:m,open:g,stateAttribute:I,trigger:i,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{d.isOpenDelayed?v():C()},[d.isOpenDelayed,v,C]),onTriggerLeave:y.useCallback(()=>{x?w():(window.clearTimeout(p.current),p.current=0)},[w,x]),onOpen:C,onClose:w,disableHoverableContent:x,children:t})})};Sl.displayName=ct;var Xt="TooltipTrigger",vl=y.forwardRef((e,a)=>{let{__scopeTooltip:t,...o}=e,r=ka(Xt,t),l=$t(Xt,t),s=ft(t),n=y.useRef(null),d=Z(a,n,r.onTriggerChange),u=y.useRef(!1),i=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),Y(ml,{asChild:!0,...s,children:Y(q.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:K(e.onPointerMove,m=>{m.pointerType!=="touch"&&!i.current&&!l.isPointerInTransitRef.current&&(r.onTriggerEnter(),i.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{r.onTriggerLeave(),i.current=!1}),onPointerDown:K(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:K(e.onBlur,r.onClose),onClick:K(e.onClick,r.onClose)})})});vl.displayName=Xt;var Zt="TooltipPortal",[Fu,Ou]=it(Zt,{forceMount:void 0}),Eu=e=>{let{__scopeTooltip:a,forceMount:t,children:o,container:r}=e,l=ka(Zt,a);return Y(Fu,{scope:a,forceMount:t,children:Y(Me,{present:t||l.open,children:Y(Aa,{asChild:!0,container:r,children:o})})})};Eu.displayName=Zt;var ia="TooltipContent",yl=y.forwardRef((e,a)=>{let t=Ou(ia,e.__scopeTooltip),{forceMount:o=t.forceMount,side:r="top",...l}=e,s=ka(ia,e.__scopeTooltip);return Y(Me,{present:o||s.open,children:s.disableHoverableContent?Y(bl,{side:r,...l,ref:a}):Y(Nu,{side:r,...l,ref:a})})}),Nu=y.forwardRef((e,a)=>{let t=ka(ia,e.__scopeTooltip),o=$t(ia,e.__scopeTooltip),r=y.useRef(null),l=Z(a,r),[s,n]=y.useState(null),{trigger:d,onClose:u}=t,i=r.current,{onPointerInTransitChange:f}=o,m=y.useCallback(()=>{n(null),f(!1)},[f]),p=y.useCallback((x,c)=>{let h=x.currentTarget,g={x:x.clientX,y:x.clientY},L=_u(g,h.getBoundingClientRect()),I=Wu(g,L),C=Vu(c.getBoundingClientRect()),w=Gu([...I,...C]);n(w),f(!0)},[f]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(d&&i){let x=h=>p(h,i),c=h=>p(h,d);return d.addEventListener("pointerleave",x),i.addEventListener("pointerleave",c),()=>{d.removeEventListener("pointerleave",x),i.removeEventListener("pointerleave",c)}}},[d,i,p,m]),y.useEffect(()=>{if(s){let x=c=>{let h=c.target,g={x:c.clientX,y:c.clientY},L=d?.contains(h)||i?.contains(h),I=!zu(g,s);L?m():I&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,i,s,u,m]),Y(bl,{...e,ref:l})}),[qu,Hu]=it(ct,{isInside:!1}),bl=y.forwardRef((e,a)=>{let{__scopeTooltip:t,children:o,"aria-label":r,onEscapeKeyDown:l,onPointerDownOutside:s,...n}=e,d=ka(ia,t),u=ft(t),{onClose:i}=d;return y.useEffect(()=>(document.addEventListener(jt,i),()=>document.removeEventListener(jt,i)),[i]),y.useEffect(()=>{if(d.trigger){let f=m=>{m.target?.contains(d.trigger)&&i()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,i]),Y(Sa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:i,children:Tu(hl,{"data-state":d.stateAttribute,...u,...n,ref:a,style:{...n.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[Y(Mt,{children:o}),Y(qu,{scope:t,isInside:!0,children:Y(Il,{id:d.contentId,role:"tooltip",children:r||o})})]})})});yl.displayName=ia;var Pl="TooltipArrow",Uu=y.forwardRef((e,a)=>{let{__scopeTooltip:t,...o}=e,r=ft(t);return Hu(Pl,t).isInside?null:Y(xl,{...r,...o,ref:a})});Uu.displayName=Pl;function _u(e,a){let t=Math.abs(a.top-e.y),o=Math.abs(a.bottom-e.y),r=Math.abs(a.right-e.x),l=Math.abs(a.left-e.x);switch(Math.min(t,o,r,l)){case l:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Wu(e,a,t=5){let o=[];switch(a){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function Vu(e){let{top:a,right:t,bottom:o,left:r}=e;return[{x:r,y:a},{x:t,y:a},{x:t,y:o},{x:r,y:o}]}function zu(e,a){let{x:t,y:o}=e,r=!1;for(let l=0,s=a.length-1;l<a.length;s=l++){let n=a[l].x,d=a[l].y,u=a[s].x,i=a[s].y;d>o!=i>o&&t<(u-n)*(o-d)/(i-d)+n&&(r=!r)}return r}function Gu(e){let a=e.slice();return a.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),ju(a)}function ju(e){if(e.length<=1)return e.slice();let a=[];for(let o=0;o<e.length;o++){let r=e[o];for(;a.length>=2;){let l=a[a.length-1],s=a[a.length-2];if((l.x-s.x)*(r.y-s.y)>=(l.y-s.y)*(r.x-s.x))a.pop();else break}a.push(r)}a.pop();let t=[];for(let o=e.length-1;o>=0;o--){let r=e[o];for(;t.length>=2;){let l=t[t.length-1],s=t[t.length-2];if((l.x-s.x)*(r.y-s.y)>=(l.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}return t.pop(),a.length===1&&t.length===1&&a[0].x===t[0].x&&a[0].y===t[0].y?a:a.concat(t)}var Rl=Sl,Al=vl;var Jt=yl;import*as Vl from"react";function kl(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(a=0;a<e.length;a++)e[a]&&(t=kl(e[a]))&&(o&&(o+=" "),o+=t);else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function Tl(){for(var e,a,t=0,o="";t<arguments.length;)(e=arguments[t++])&&(a=kl(e))&&(o&&(o+=" "),o+=a);return o}var Dl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ml=Tl,pt=(e,a)=>t=>{var o;if(a?.variants==null)return Ml(e,t?.class,t?.className);let{variants:r,defaultVariants:l}=a,s=Object.keys(r).map(u=>{let i=t?.[u],f=l?.[u];if(i===null)return null;let m=Dl(i)||Dl(f);return r[u][m]}),n=t&&Object.entries(t).reduce((u,i)=>{let[f,m]=i;return m===void 0||(u[f]=m),u},{}),d=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((u,i)=>{let{class:f,className:m,...p}=i;return Object.entries(p).every(x=>{let[c,h]=x;return Array.isArray(h)?h.includes({...l,...n}[c]):{...l,...n}[c]===h})?[...u,f,m]:u},[]);return Ml(e,s,d,t?.class,t?.className)};function Bl(e){var a,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(a=0;a<r;a++)e[a]&&(t=Bl(e[a]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Fl(){for(var e,a,t=0,o="",r=arguments.length;t<r;t++)(e=arguments[t])&&(a=Bl(e))&&(o&&(o+=" "),o+=a);return o}var eo="-",$u=e=>{let a=Zu(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let n=s.split(eo);return n[0]===""&&n.length!==1&&n.shift(),Nl(n,a)||Ku(s)},getConflictingClassGroupIds:(s,n)=>{let d=t[s]||[];return n&&o[s]?[...d,...o[s]]:d}}},Nl=(e,a)=>{if(e.length===0)return a.classGroupId;let t=e[0],o=a.nextPart.get(t),r=o?Nl(e.slice(1),o):void 0;if(r)return r;if(a.validators.length===0)return;let l=e.join(eo);return a.validators.find(({validator:s})=>s(l))?.classGroupId},Ol=/^\[(.+)\]$/,Ku=e=>{if(Ol.test(e)){let a=Ol.exec(e)[1],t=a?.substring(0,a.indexOf(":"));if(t)return"arbitrary.."+t}},Zu=e=>{let{theme:a,prefix:t}=e,o={nextPart:new Map,validators:[]};return Yu(Object.entries(e.classGroups),t).forEach(([l,s])=>{Qt(s,o,l,a)}),o},Qt=(e,a,t,o)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?a:El(a,r);l.classGroupId=t;return}if(typeof r=="function"){if(Ju(r)){Qt(r(o),a,t,o);return}a.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([l,s])=>{Qt(s,El(a,l),t,o)})})},El=(e,a)=>{let t=e;return a.split(eo).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},Ju=e=>e.isThemeGetter,Yu=(e,a)=>a?e.map(([t,o])=>{let r=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([s,n])=>[a+s,n])):l);return[t,r]}):e,Qu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,t=new Map,o=new Map,r=(l,s)=>{t.set(l,s),a++,a>e&&(a=0,o=t,t=new Map)};return{get(l){let s=t.get(l);if(s!==void 0)return s;if((s=o.get(l))!==void 0)return r(l,s),s},set(l,s){t.has(l)?t.set(l,s):r(l,s)}}},ql="!",ed=e=>{let{separator:a,experimentalParseClassName:t}=e,o=a.length===1,r=a[0],l=a.length,s=n=>{let d=[],u=0,i=0,f;for(let h=0;h<n.length;h++){let g=n[h];if(u===0){if(g===r&&(o||n.slice(h,h+l)===a)){d.push(n.slice(i,h)),i=h+l;continue}if(g==="/"){f=h;continue}}g==="["?u++:g==="]"&&u--}let m=d.length===0?n:n.substring(i),p=m.startsWith(ql),x=p?m.substring(1):m,c=f&&f>i?f-i:void 0;return{modifiers:d,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:c}};return t?n=>t({className:n,parseClassName:s}):s},ad=e=>{if(e.length<=1)return e;let a=[],t=[];return e.forEach(o=>{o[0]==="["?(a.push(...t.sort(),o),t=[]):t.push(o)}),a.push(...t.sort()),a},td=e=>({cache:Qu(e.cacheSize),parseClassName:ed(e),...$u(e)}),od=/\s+/,rd=(e,a)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:r}=a,l=[],s=e.trim().split(od),n="";for(let d=s.length-1;d>=0;d-=1){let u=s[d],{modifiers:i,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}=t(u),x=Boolean(p),c=o(x?m.substring(0,p):m);if(!c){if(!x){n=u+(n.length>0?" "+n:n);continue}if(c=o(m),!c){n=u+(n.length>0?" "+n:n);continue}x=!1}let h=ad(i).join(":"),g=f?h+ql:h,L=g+c;if(l.includes(L))continue;l.push(L);let I=r(c,x);for(let C=0;C<I.length;++C){let w=I[C];l.push(g+w)}n=u+(n.length>0?" "+n:n)}return n};function ld(){let e=0,a,t,o="";for(;e<arguments.length;)(a=arguments[e++])&&(t=Hl(a))&&(o&&(o+=" "),o+=t);return o}var Hl=e=>{if(typeof e=="string")return e;let a,t="";for(let o=0;o<e.length;o++)e[o]&&(a=Hl(e[o]))&&(t&&(t+=" "),t+=a);return t};function sd(e,...a){let t,o,r,l=s;function s(d){let u=a.reduce((i,f)=>f(i),e());return t=td(u),o=t.cache.get,r=t.cache.set,l=n,n(d)}function n(d){let u=o(d);if(u)return u;let i=rd(d,t);return r(d,i),i}return function(){return l(ld.apply(null,arguments))}}var B=e=>{let a=t=>t[e]||[];return a.isThemeGetter=!0,a},Ul=/^\[(?:([a-z-]+):)?(.+)\]$/i,nd=/^\d+\/\d+$/,ud=new Set(["px","full","screen"]),dd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,id=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ke=e=>fa(e)||ud.has(e)||nd.test(e),Fe=e=>ca(e,"length",wd),fa=e=>Boolean(e)&&!Number.isNaN(Number(e)),Yt=e=>ca(e,"number",fa),Ta=e=>Boolean(e)&&Number.isInteger(Number(e)),md=e=>e.endsWith("%")&&fa(e.slice(0,-1)),b=e=>Ul.test(e),Oe=e=>dd.test(e),hd=new Set(["length","size","percentage"]),xd=e=>ca(e,hd,_l),gd=e=>ca(e,"position",_l),Ld=new Set(["image","url"]),Cd=e=>ca(e,Ld,vd),Id=e=>ca(e,"",Sd),Da=()=>!0,ca=(e,a,t)=>{let o=Ul.exec(e);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):t(o[2]):!1},wd=e=>id.test(e)&&!fd.test(e),_l=()=>!1,Sd=e=>cd.test(e),vd=e=>pd.test(e);var yd=()=>{let e=B("colors"),a=B("spacing"),t=B("blur"),o=B("brightness"),r=B("borderColor"),l=B("borderRadius"),s=B("borderSpacing"),n=B("borderWidth"),d=B("contrast"),u=B("grayscale"),i=B("hueRotate"),f=B("invert"),m=B("gap"),p=B("gradientColorStops"),x=B("gradientColorStopPositions"),c=B("inset"),h=B("margin"),g=B("opacity"),L=B("padding"),I=B("saturate"),C=B("scale"),w=B("sepia"),v=B("skew"),S=B("space"),A=B("translate"),E=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",b,a],P=()=>[b,a],U=()=>["",ke,Fe],T=()=>["auto",fa,b],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",b],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[fa,b];return{cacheSize:500,separator:":",theme:{colors:[Da],spacing:[ke,Fe],blur:["none","",Oe,b],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Oe,b],borderSpacing:P(),borderWidth:U(),contrast:ie(),grayscale:_(),hueRotate:ie(),invert:_(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[md,Fe],inset:j(),margin:j(),opacity:ie(),padding:P(),saturate:ie(),scale:ie(),sepia:_(),skew:ie(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[Oe]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),b]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[c]}],"inset-x":[{"inset-x":[c]}],"inset-y":[{"inset-y":[c]}],start:[{start:[c]}],end:[{end:[c]}],top:[{top:[c]}],right:[{right:[c]}],bottom:[{bottom:[c]}],left:[{left:[c]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ta,b]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Ta,b]}],"grid-cols":[{"grid-cols":[Da]}],"col-start-end":[{col:["auto",{span:["full",Ta,b]},b]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[Da]}],"row-start-end":[{row:["auto",{span:[Ta,b]},b]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,a]}],"min-w":[{"min-w":[b,a,"min","max","fit"]}],"max-w":[{"max-w":[b,a,"none","full","min","max","fit","prose",{screen:[Oe]},Oe]}],h:[{h:[b,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,a,"auto","min","max","fit"]}],"font-size":[{text:["base",Oe,Fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yt]}],"font-family":[{font:[Da]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",b]}],"line-clamp":[{"line-clamp":["none",fa,Yt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ke,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ke,Fe]}],"underline-offset":[{"underline-offset":["auto",ke,b]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),gd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Cd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:N()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[ke,b]}],"outline-w":[{outline:[ke,Fe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[ke,Fe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oe,Id]}],"shadow-color":[{shadow:[Da]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Oe,b]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[i]}],invert:[{invert:[f]}],saturate:[{saturate:[I]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[i]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Ta,b]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[v]}],"skew-y":[{"skew-y":[v]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ke,Fe,Yt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Wl=sd(yd);function F(...e){return Wl(Fl(e))}import{jsx as Pd}from"react/jsx-runtime";var bd=pt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Q=Vl.forwardRef(({className:e,variant:a,size:t,asChild:o=!1,...r},l)=>Pd(o?ze:"button",{className:F(bd({variant:a,size:t,className:e})),ref:l,...r}));Q.displayName="Button";import{jsx as ao,jsxs as Ad}from"react/jsx-runtime";var Rd=({text:e,url:a,Icon:t})=>Ad(Q,{variant:"ghost",children:[t&&ao(t,{className:"w-6 h-6 mr-2 text-black"}),a?ao("a",{href:a,target:"_blank",children:e}):ao("div",{children:e})]}),to=Rd;import Kl from"react";import{forwardRef as Td,createElement as Dd}from"react";var zl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mt=(...e)=>e.filter((a,t,o)=>Boolean(a)&&a.trim()!==""&&o.indexOf(a)===t).join(" ").trim();import{forwardRef as kd,createElement as jl}from"react";var Gl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Xl=kd(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:r="",children:l,iconNode:s,...n},d)=>jl("svg",{ref:d,...Gl,width:a,height:a,stroke:e,strokeWidth:o?Number(t)*24/Number(a):t,className:mt("lucide",r),...n},[...s.map(([u,i])=>jl(u,i)),...Array.isArray(l)?l:[l]]));var G=(e,a)=>{let t=Td(({className:o,...r},l)=>Dd(Xl,{ref:l,iconNode:a,className:mt(`lucide-${zl(e)}`,o),...r}));return t.displayName=`${e}`,t};var Ma=G("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);var Ee=G("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);var Ba=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Ne=G("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Ye=G("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);var Fa=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var pa=G("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var Oa=G("ServerCrash",[["path",{d:"M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2",key:"4b9dqc"}],["path",{d:"M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2",key:"22nnkd"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m13 6-4 6h6l-4 6",key:"14hqih"}]]);var qe=G("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var Ea=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);import*as $l from"react";import{jsx as Md}from"react/jsx-runtime";var ht=Rl,xt=Al,Na=$l.forwardRef(({className:e,sideOffset:a=4,...t},o)=>Md(Jt,{ref:o,sideOffset:a,className:F("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Na.displayName=Jt.displayName;import{jsx as qa,jsxs as Od}from"react/jsx-runtime";var Bd=e=>{navigator.clipboard.writeText(e)},Fd=({Icon:e,iconClassName:a,tooltipText:t,isCircle:o=!1,canCopy:r=!1,...l})=>{let[s,n]=Kl.useState(!1);return Kl.useEffect(()=>{if(s){let u=setTimeout(()=>{n(!1)},2e3);return()=>clearTimeout(u)}},[s]),Od(ht,{delayDuration:100,children:[qa(xt,{asChild:!0,children:qa(Q,{variant:"outline",size:"icon",className:`w-10 h-10 min-w-10 p-0 flex items-center justify-center ${o?"rounded-full":""}`,onClick:()=>{r&&(Bd(t?.toString()||""),n(!0))},children:s?qa(Ba,{className:a,strokeWidth:3,...l}):e&&qa(e,{className:a,strokeWidth:3,...l})})}),qa(Na,{side:"bottom",className:"bg-white max-w-[200px] font-medium",children:t})]})},gt=Fd;import{jsx as k,jsxs as de}from"react/jsx-runtime";var Zl=({count:e,label:a,subText:t,onClick:o})=>de("div",{onClick:o,className:"w-[170px] h-36 px-8 py-6 bg-white rounded-lg flex flex-col justify-center items-center gap-1 text-gray-900 cursor-pointer",children:[k("div",{className:"text-2xl font-light",children:e}),k("div",{className:"text-xs font-semibold uppercase leading-4",children:a}),k("div",{className:"text-xs font-light leading-8",children:t})]}),Ed=({modulesData:e,partialsData:a})=>de("div",{className:"flex justify-start gap-2",children:[k(Zl,{count:e.length,label:e.length===1?"Module":"Modules",subText:"In this Project",onClick:()=>document.getElementById("modules-table")?.scrollIntoView({behavior:"smooth"})}),k(Zl,{count:a.length,label:a.length===1?"Partial":"Partials",subText:"In this Project",onClick:()=>document.getElementById("partials-table")?.scrollIntoView({behavior:"smooth"})})]});var Nd=()=>k("div",{className:"flex flex-col justify-end items-start min-h-36 p-6 bg-slate-900 rounded-xl gap-6 overflow-hidden",children:de("div",{className:"flex flex-col justify-start items-start gap-6 w-full",children:[k("div",{className:"text-white text-xl font-medium leading-7",children:"Copy CLI Commands"}),k("div",{className:"flex flex-wrap w-full px-1 py-1 bg-white rounded-md border border-slate-300 text-black text-sm font-medium leading-tight",children:[{command:"Start",description:"npm start"},{command:"Run Test",description:"npm test"},{command:"Build",description:"npm run build"},{command:"Deploy",description:"npm run deploy"},{command:"Dev Environment",description:"npm run dev"}].map(({command:e,description:a})=>de(ht,{delayDuration:100,children:[k(xt,{asChild:!0,children:k("div",{className:"flex-grow h-8 px-3 py-1.5 bg-white flex items-center justify-center relative group cursor-pointer hover:bg-gray-100 active:bg-gray-200 min-w-[120px] m-1",children:k("span",{className:"",children:e})})}),de(Na,{side:"bottom",className:"bg-white font-medium p-4",children:[de("div",{children:[k("div",{className:"font-medium text-base leading-none",children:"Copy Command"}),k("div",{className:"font-light text-sm leading-5 mt-2 mb-4",children:a})]}),k("div",{className:"flex justify-end",children:de(Q,{size:"sm",className:"px-2 py-1 primary rounded",onClick:()=>navigator.clipboard.writeText(a),children:[k(Ye,{})," Copy"]})})]})]},e))})]})}),qd=({projectName:e,authedPortalId:a,modulesData:t,partialsData:o,hubLModules:r})=>{let l=e||"",s=!!a,n=s?"You are connected to your HubSpot account":'You are not connected to your HubSpot Account. Use the "hs init" command to connect to view content in the dev server.',d=[...t,...r];return de("div",{className:"w-full h-full bg-gray-200 rounded-3xl px-10 py-8",children:[de("div",{className:"flex items-center justify-between gap-4",children:[de("div",{className:"text-gray-900 text-2xl font-semibold flex items-center gap-2",children:["CMS Developer Server",s?k(gt,{Icon:Ne,iconClassName:"text-green-500 w-4 h-4",tooltipText:n,isCircle:!0}):k(gt,{Icon:qe,iconClassName:"text-red-500 w-4 h-4",tooltipText:n,isCircle:!0})]}),de("div",{className:"flex items-center gap-4",children:[k(to,{text:"Slack Community",Icon:pa,url:"https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack"}),k(to,{text:"Getting started docs",Icon:pa,url:"https://developers.hubspot.com/docs/cms/cms-react-quickstart?hs_preview=XztBJnma-168859451746"})]})]}),k("div",{className:"w-full text-gray-900 text-4xl font-extrabold mt-5 mb-4",children:l}),k("div",{className:"flex items-center space-x-4 text-black text-sm font-light",children:a&&de("div",{className:"flex items-center gap-2",children:[k("strong",{children:"Portal ID:"}),k("span",{className:"mr-2",children:a}),k(gt,{Icon:Fa,canCopy:!0,tooltipText:a})]})}),de("div",{className:"flex w-full mt-10",children:[k("div",{className:"flex-none",children:k(Ed,{modulesData:d,partialsData:o})}),k("div",{className:"flex-grow ml-14",children:k(Nd,{})})]})]})},Jl=qd;import*as De from"react";import{jsx as Te}from"react/jsx-runtime";var Ha=De.forwardRef(({className:e,containerClassName:a,...t},o)=>Te("div",{className:F("relative w-full",a),children:Te("table",{ref:o,className:F("w-full caption-bottom text-sm",e),...t})}));Ha.displayName="Table";var Ua=De.forwardRef(({className:e,...a},t)=>Te("thead",{ref:t,className:F("[&_tr]:border-b",e),...a}));Ua.displayName="TableHeader";var _a=De.forwardRef(({className:e,...a},t)=>Te("tbody",{ref:t,className:F("[&_tr:last-child]:border-0",e),...a}));_a.displayName="TableBody";var Hd=De.forwardRef(({className:e,...a},t)=>Te("tfoot",{ref:t,className:F("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));Hd.displayName="TableFooter";var Qe=De.forwardRef(({className:e,...a},t)=>Te("tr",{ref:t,className:F("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));Qe.displayName="TableRow";var ma=De.forwardRef(({className:e,...a},t)=>Te("th",{ref:t,className:F("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...a}));ma.displayName="TableHead";var ye=De.forwardRef(({className:e,...a},t)=>Te("td",{ref:t,className:F("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...a}));ye.displayName="TableCell";var Ud=De.forwardRef(({className:e,...a},t)=>Te("caption",{ref:t,className:F("mt-4 text-sm text-muted-foreground",e),...a}));Ud.displayName="TableCaption";import{jsx as Wa,jsxs as Wd}from"react/jsx-runtime";function _d(){return Wd("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Wa("g",{clipPath:"url(#clip0_5814_65268)",children:Wa("path",{d:"M19.7328 7.77091C19.4838 7.67469 19.2259 7.58365 18.9602 7.49755C19.0039 7.29749 19.044 7.10001 19.0796 6.90589C19.6644 3.71841 19.282 1.15055 17.9763 0.305104C16.7243 -0.505568 14.6767 0.339688 12.6087 2.3604C12.4099 2.55471 12.2104 2.76043 12.0111 2.97604C11.8783 2.83339 11.7457 2.69554 11.6134 2.56368C9.44613 0.403003 7.27375 -0.507535 5.96931 0.340359C4.71847 1.15338 4.34805 3.56741 4.87449 6.58821C4.92532 6.87999 4.98475 7.17795 5.05194 7.48091C4.74449 7.5789 4.44767 7.68337 4.16367 7.79451C1.62275 8.78918 0 10.3481 0 11.9651C0 13.6351 1.74202 15.3101 4.38859 16.3258C4.59745 16.406 4.81417 16.4818 5.0375 16.5537C4.96501 16.8814 4.90195 17.2025 4.84903 17.5156C4.34707 20.484 4.73906 22.841 5.98656 23.6489C7.27512 24.4832 9.43767 23.6256 11.5435 21.5589C11.7099 21.3955 11.8769 21.2222 12.0443 21.0406C12.2611 21.2751 12.4777 21.4971 12.6931 21.7053C14.7328 23.676 16.7473 24.4718 17.9937 23.6617C19.2809 22.825 19.6993 20.293 19.1561 17.2124C19.1147 16.9772 19.0664 16.7368 19.0122 16.4922C19.164 16.4418 19.3131 16.3897 19.4585 16.3356C22.2099 15.3121 24 13.6574 24 11.9651C24 10.3422 22.3249 8.77282 19.7328 7.77091ZM19.1361 15.2429C19.0048 15.2917 18.8702 15.3388 18.733 15.3845C18.4292 14.3049 18.0193 13.1568 17.5176 11.9707C17.9963 10.8128 18.3904 9.67938 18.6857 8.60672C18.9312 8.68648 19.1695 8.77062 19.3991 8.8594C21.62 9.71785 22.9747 10.9871 22.9747 11.9651C22.9747 13.0068 21.5117 14.3591 19.1361 15.2429ZM18.1504 17.436C18.3905 18.7982 18.4248 20.0298 18.2657 20.9925C18.1228 21.8576 17.8353 22.4344 17.4799 22.6654C16.7236 23.157 15.1061 22.518 13.3617 20.8326C13.1618 20.6394 12.9603 20.4331 12.7583 20.2148C13.4345 19.3843 14.1104 18.4189 14.77 17.3467C15.9303 17.2311 17.0264 17.0422 18.0204 16.7841C18.0694 17.0059 18.1129 17.2234 18.1504 17.436ZM8.18214 22.5805C7.44318 22.8735 6.85463 22.8819 6.49886 22.6516C5.74182 22.1613 5.42711 20.2689 5.8564 17.7303C5.90557 17.4396 5.96409 17.141 6.03155 16.8357C7.0147 17.0798 8.10281 17.2555 9.26581 17.3613C9.92989 18.4105 10.6253 19.3748 11.3261 20.2192C11.1729 20.3852 11.0204 20.5432 10.8688 20.6921C9.93762 21.606 9.0045 22.2544 8.18214 22.5805ZM4.72018 15.2365C3.54992 14.7874 2.58347 14.2037 1.92102 13.5668C1.32576 12.9944 1.02523 12.4261 1.02523 11.9651C1.02523 10.9838 2.32814 9.73224 4.50116 8.88156C4.76482 8.77834 5.04084 8.68106 5.32727 8.58969C5.62759 9.68657 6.02155 10.8334 6.49698 11.9931C6.0154 13.17 5.61584 14.3351 5.31258 15.4448C5.10838 15.3789 4.91054 15.3095 4.72018 15.2365ZM5.88066 6.36714C5.42963 3.77899 5.72918 1.82658 6.48297 1.33666C7.28588 0.814743 9.06136 1.55889 10.9326 3.42452C11.0523 3.54377 11.1723 3.66857 11.2928 3.7977C10.5955 4.6384 9.90644 5.59551 9.24825 6.63848C8.11952 6.75595 7.03905 6.94465 6.04565 7.19733C5.98319 6.91524 5.92787 6.6381 5.88066 6.36714ZM16.2332 9.23737C15.9957 8.7768 15.7519 8.32712 15.5034 7.88972C16.2691 7.99841 17.0028 8.14269 17.6918 8.31926C17.4849 9.06359 17.2271 9.84184 16.9236 10.6397C16.7059 10.1756 16.4757 9.70768 16.2332 9.23737ZM12.0114 4.62041C12.4844 5.19567 12.9579 5.83793 13.4238 6.53478C12.9544 6.50988 12.4791 6.49693 12 6.49693C11.5254 6.49693 11.0537 6.5096 10.5872 6.53406C11.0535 5.84369 11.5312 5.20228 12.0114 4.62041ZM7.76268 9.24533C7.52546 9.7072 7.29947 10.1726 7.08519 10.6388C6.78662 9.84376 6.5312 9.06196 6.32255 8.30707C7.00731 8.13502 7.73752 7.99433 8.4984 7.88771C8.24635 8.32914 8.00054 8.78213 7.76268 9.24524V9.24533ZM8.52031 16.1245C7.73418 16.026 6.993 15.8926 6.30841 15.7253C6.52039 14.9569 6.78145 14.1584 7.08634 13.3463C7.30118 13.8122 7.52806 14.2777 7.76674 14.7406H7.76678C8.0099 15.2122 8.26177 15.6741 8.52031 16.1245ZM12.0398 19.3909C11.5539 18.8022 11.0692 18.151 10.5958 17.4505C11.0553 17.4708 11.5238 17.4811 12 17.4811C12.4892 17.4811 12.9728 17.4688 13.4488 17.445C12.9814 18.158 12.5095 18.8102 12.0398 19.3909ZM16.9334 13.3049C17.2542 14.1258 17.5246 14.9201 17.7393 15.6754C17.0434 15.8537 16.2921 15.9972 15.5005 16.1039C15.7497 15.6606 15.9956 15.2032 16.2373 14.7327C16.4818 14.2567 16.7139 13.7799 16.9334 13.3049ZM15.3492 14.1576C14.974 14.888 14.5889 15.5852 14.1978 16.2433C13.4857 16.3005 12.7499 16.33 12 16.33C11.2531 16.33 10.5266 16.3039 9.82706 16.2529C9.42029 15.5861 9.02675 14.8869 8.65398 14.1639H8.65407C8.28228 13.4428 7.94009 12.7157 7.63003 11.9927C7.94001 11.268 8.28129 10.54 8.65095 9.8203L8.65086 9.82045C9.0215 9.0988 9.41157 8.40291 9.81459 7.74031C10.5283 7.67973 11.2603 7.64812 12 7.64812H12C12.743 7.64812 13.4759 7.67997 14.1894 7.74107C14.5863 8.39883 14.9737 9.09247 15.3458 9.81421C15.7221 10.5441 16.0678 11.2671 16.3804 11.9763C16.0688 12.6977 15.7238 13.4281 15.3492 14.1576ZM17.4642 1.30241C18.2679 1.8228 18.5804 3.9215 18.0755 6.67354C18.0433 6.84915 18.007 7.02801 17.9676 7.20928C16.9719 6.95131 15.8907 6.75936 14.7586 6.64011C14.0992 5.58568 13.4158 4.62708 12.7298 3.79717C12.9142 3.59797 13.0984 3.40802 13.2818 3.22877C15.0536 1.49744 16.7097 0.813879 17.4642 1.30241ZM12 9.55874C13.1836 9.55874 14.1431 10.6361 14.1431 11.9651C14.1431 13.294 13.1836 14.3714 12 14.3714C10.8164 14.3714 9.85688 13.294 9.85688 11.9651C9.85688 10.6361 10.8164 9.55874 12 9.55874Z",fill:"black"})}),Wa("defs",{children:Wa("clipPath",{id:"clip0_5814_65268",children:Wa("rect",{width:"24",height:"24",fill:"white"})})})]})}var Yl=_d;import*as ja from"react";import*as D from"react";import*as he from"react";import{jsx as Vd}from"react/jsx-runtime";var oo="focusScope.autoFocusOnMount",ro="focusScope.autoFocusOnUnmount",Ql={bubbles:!1,cancelable:!0},zd="FocusScope",lo=he.forwardRef((e,a)=>{let{loop:t=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:l,...s}=e,[n,d]=he.useState(null),u=ne(r),i=ne(l),f=he.useRef(null),m=Z(a,c=>d(c)),p=he.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;he.useEffect(()=>{if(o){let L=function(v){if(p.paused||!n)return;let S=v.target;n.contains(S)?f.current=S:He(f.current,{select:!0})},I=function(v){if(p.paused||!n)return;let S=v.relatedTarget;S!==null&&(n.contains(S)||He(f.current,{select:!0}))},C=function(v){if(document.activeElement===document.body)for(let A of v)A.removedNodes.length>0&&He(n)};var c=L,h=I,g=C;document.addEventListener("focusin",L),document.addEventListener("focusout",I);let w=new MutationObserver(C);return n&&w.observe(n,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",L),document.removeEventListener("focusout",I),w.disconnect()}}},[o,n,p.paused]),he.useEffect(()=>{if(n){as.add(p);let c=document.activeElement;if(!n.contains(c)){let g=new CustomEvent(oo,Ql);n.addEventListener(oo,u),n.dispatchEvent(g),g.defaultPrevented||(Gd(Zd(os(n)),{select:!0}),document.activeElement===c&&He(n))}return()=>{n.removeEventListener(oo,u),setTimeout(()=>{let g=new CustomEvent(ro,Ql);n.addEventListener(ro,i),n.dispatchEvent(g),g.defaultPrevented||He(c??document.body,{select:!0}),n.removeEventListener(ro,i),as.remove(p)},0)}}},[n,u,i,p]);let x=he.useCallback(c=>{if(!t&&!o||p.paused)return;let h=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,g=document.activeElement;if(h&&g){let L=c.currentTarget,[I,C]=jd(L);I&&C?!c.shiftKey&&g===C?(c.preventDefault(),t&&He(I,{select:!0})):c.shiftKey&&g===I&&(c.preventDefault(),t&&He(C,{select:!0})):g===L&&c.preventDefault()}},[t,o,p.paused]);return Vd(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:x})});lo.displayName=zd;function Gd(e,{select:a=!1}={}){let t=document.activeElement;for(let o of e)if(He(o,{select:a}),document.activeElement!==t)return}function jd(e){let a=os(e),t=es(a,e),o=es(a.reverse(),e);return[t,o]}function os(e){let a=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)a.push(t.currentNode);return a}function es(e,a){for(let t of e)if(!Xd(t,{upTo:a}))return t}function Xd(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $d(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:a=!1}={}){if(e&&e.focus){let t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&$d(e)&&a&&e.select()}}var as=Kd();function Kd(){let e=[];return{add(a){let t=e[0];a!==t&&t?.pause(),e=ts(e,a),e.unshift(a)},remove(a){e=ts(e,a),e[0]?.resume()}}}function ts(e,a){let t=[...e],o=t.indexOf(a);return o!==-1&&t.splice(o,1),t}function Zd(e){return e.filter(a=>a.tagName!=="A")}import*as ls from"react";var so=0;function ss(){ls.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rs()),document.body.insertAdjacentElement("beforeend",e[1]??rs()),so++,()=>{so===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),so--}},[])}function rs(){let 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 be=function(){return be=Object.assign||function(a){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(a[l]=t[l])}return a},be.apply(this,arguments)};function ns(e,a){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&a.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)a.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function us(e,a,t){if(t||arguments.length===2)for(var o=0,r=a.length,l;o<r;o++)(l||!(o in a))&&(l||(l=Array.prototype.slice.call(a,0,o)),l[o]=a[o]);return e.concat(l||Array.prototype.slice.call(a))}import*as St from"react";import*as ee from"react";var ea="right-scroll-bar-position",aa="width-before-scroll-bar",no="with-scroll-bars-hidden",uo="--removed-body-scroll-bar-size";function Lt(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}import{useState as Jd}from"react";function ds(e,a){var t=Jd(function(){return{value:e,callback:a,facade:{get current(){return t.value},set current(o){var r=t.value;r!==o&&(t.value=o,t.callback(o,r))}}}})[0];return t.callback=a,t.facade}import*as Ct from"react";var Yd=typeof window<"u"?Ct.useLayoutEffect:Ct.useEffect,is=new WeakMap;function io(e,a){var t=ds(a||null,function(o){return e.forEach(function(r){return Lt(r,o)})});return Yd(function(){var o=is.get(t);if(o){var r=new Set(o),l=new Set(e),s=t.current;r.forEach(function(n){l.has(n)||Lt(n,null)}),l.forEach(function(n){r.has(n)||Lt(n,s)})}is.set(t,e)},[e]),t}var ha=function(){return ha=Object.assign||function(a){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(a[l]=t[l])}return a},ha.apply(this,arguments)};function fs(e,a){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&a.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)a.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);return t}function Qd(e){return e}function ei(e,a){a===void 0&&(a=Qd);var t=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(l){var s=a(l,o);return t.push(s),function(){t=t.filter(function(n){return n!==s})}},assignSyncMedium:function(l){for(o=!0;t.length;){var s=t;t=[],s.forEach(l)}t={push:function(n){return l(n)},filter:function(){return t}}},assignMedium:function(l){o=!0;var s=[];if(t.length){var n=t;t=[],n.forEach(l),s=t}var d=function(){var i=s;s=[],i.forEach(l)},u=function(){return Promise.resolve().then(d)};u(),t={push:function(i){s.push(i),u()},filter:function(i){return s=s.filter(i),t}}}};return r}function fo(e){e===void 0&&(e={});var a=ei(null);return a.options=ha({async:!0,ssr:!1},e),a}import*as cs from"react";var ps=function(e){var a=e.sideCar,t=fs(e,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=a.read();if(!o)throw new Error("Sidecar medium not found");return cs.createElement(o,ha({},t))};ps.isSideCarExport=!0;function co(e,a){return e.useMedium(a),ps}var It=fo();var po=function(){},Va=ee.forwardRef(function(e,a){var t=ee.useRef(null),o=ee.useState({onScrollCapture:po,onWheelCapture:po,onTouchMoveCapture:po}),r=o[0],l=o[1],s=e.forwardProps,n=e.children,d=e.className,u=e.removeScrollBar,i=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,x=e.inert,c=e.allowPinchZoom,h=e.as,g=h===void 0?"div":h,L=e.gapMode,I=ns(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,w=io([t,a]),v=be(be({},I),r);return ee.createElement(ee.Fragment,null,i&&ee.createElement(C,{sideCar:It,removeScrollBar:u,shards:f,noIsolation:p,inert:x,setCallbacks:l,allowPinchZoom:!!c,lockRef:t,gapMode:L}),s?ee.cloneElement(ee.Children.only(n),be(be({},v),{ref:w})):ee.createElement(g,be({},v,{className:d,ref:w}),n))});Va.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Va.classNames={fullWidth:aa,zeroRight:ea};import*as O from"react";import*as ga from"react";import*as xs from"react";var ms;var hs=function(){if(ms)return ms;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ai(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=hs();return a&&e.setAttribute("nonce",a),e}function ti(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function oi(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var mo=function(){var e=0,a=null;return{add:function(t){e==0&&(a=ai())&&(ti(a,t),oi(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}};var ho=function(){var e=mo();return function(a,t){xs.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&t])}};var za=function(){var e=ho(),a=function(t){var o=t.styles,r=t.dynamic;return e(o,r),null};return a};var ri={left:0,top:0,right:0,gap:0},xo=function(e){return parseInt(e||"",10)||0},li=function(e){var a=window.getComputedStyle(document.body),t=a[e==="padding"?"paddingLeft":"marginLeft"],o=a[e==="padding"?"paddingTop":"marginTop"],r=a[e==="padding"?"paddingRight":"marginRight"];return[xo(t),xo(o),xo(r)]},go=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ri;var a=li(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,o-t+a[2]-a[0])}};var si=za(),xa="data-scroll-locked",ni=function(e,a,t,o){var r=e.left,l=e.top,s=e.right,n=e.gap;return t===void 0&&(t="margin"),`
2
- .`.concat(no,` {
3
- overflow: hidden `).concat(o,`;
4
- padding-right: `).concat(n,"px ").concat(o,`;
5
- }
6
- body[`).concat(xa,`] {
7
- overflow: hidden `).concat(o,`;
8
- overscroll-behavior: contain;
9
- `).concat([a&&"position: relative ".concat(o,";"),t==="margin"&&`
10
- padding-left: `.concat(r,`px;
11
- padding-top: `).concat(l,`px;
12
- padding-right: `).concat(s,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(n,"px ").concat(o,`;
16
- `),t==="padding"&&"padding-right: ".concat(n,"px ").concat(o,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(ea,` {
20
- right: `).concat(n,"px ").concat(o,`;
21
- }
22
-
23
- .`).concat(aa,` {
24
- margin-right: `).concat(n,"px ").concat(o,`;
25
- }
26
-
27
- .`).concat(ea," .").concat(ea,` {
28
- right: 0 `).concat(o,`;
29
- }
30
-
31
- .`).concat(aa," .").concat(aa,` {
32
- margin-right: 0 `).concat(o,`;
33
- }
34
-
35
- body[`).concat(xa,`] {
36
- `).concat(uo,": ").concat(n,`px;
37
- }
38
- `)},gs=function(){var e=parseInt(document.body.getAttribute(xa)||"0",10);return isFinite(e)?e:0},ui=function(){ga.useEffect(function(){return document.body.setAttribute(xa,(gs()+1).toString()),function(){var e=gs()-1;e<=0?document.body.removeAttribute(xa):document.body.setAttribute(xa,e.toString())}},[])},Lo=function(e){var a=e.noRelative,t=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;ui();var l=ga.useMemo(function(){return go(r)},[r]);return ga.createElement(si,{styles:ni(l,!a,r,t?"":"!important")})};var Co=!1;if(typeof window<"u")try{Ga=Object.defineProperty({},"passive",{get:function(){return Co=!0,!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Co=!1}var Ga,ta=Co?{passive:!1}:!1;var di=function(e){return e.tagName==="TEXTAREA"},Ls=function(e,a){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[a]!=="hidden"&&!(t.overflowY===t.overflowX&&!di(e)&&t[a]==="visible")},ii=function(e){return Ls(e,"overflowY")},fi=function(e){return Ls(e,"overflowX")},Io=function(e,a){var t=a.ownerDocument,o=a;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Cs(e,o);if(r){var l=Is(e,o),s=l[1],n=l[2];if(s>n)return!0}o=o.parentNode}while(o&&o!==t.body);return!1},ci=function(e){var a=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[a,t,o]},pi=function(e){var a=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[a,t,o]},Cs=function(e,a){return e==="v"?ii(a):fi(a)},Is=function(e,a){return e==="v"?ci(a):pi(a)},mi=function(e,a){return e==="h"&&a==="rtl"?-1:1},ws=function(e,a,t,o,r){var l=mi(e,window.getComputedStyle(a).direction),s=l*o,n=t.target,d=a.contains(n),u=!1,i=s>0,f=0,m=0;do{var p=Is(e,n),x=p[0],c=p[1],h=p[2],g=c-h-l*x;(x||g)&&Cs(e,n)&&(f+=g,m+=x),n instanceof ShadowRoot?n=n.host:n=n.parentNode}while(!d&&n!==document.body||d&&(a.contains(n)||a===n));return(i&&(r&&Math.abs(f)<1||!r&&s>f)||!i&&(r&&Math.abs(m)<1||!r&&-s>m))&&(u=!0),u};var wt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},vs=function(e){return e&&"current"in e?e.current:e},hi=function(e,a){return e[0]===a[0]&&e[1]===a[1]},xi=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},gi=0,La=[];function ys(e){var a=O.useRef([]),t=O.useRef([0,0]),o=O.useRef(),r=O.useState(gi++)[0],l=O.useState(za)[0],s=O.useRef(e);O.useEffect(function(){s.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var c=us([e.lockRef.current],(e.shards||[]).map(vs),!0).filter(Boolean);return c.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),c.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var n=O.useCallback(function(c,h){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!s.current.allowPinchZoom;var g=wt(c),L=t.current,I="deltaX"in c?c.deltaX:L[0]-g[0],C="deltaY"in c?c.deltaY:L[1]-g[1],w,v=c.target,S=Math.abs(I)>Math.abs(C)?"h":"v";if("touches"in c&&S==="h"&&v.type==="range")return!1;var A=Io(S,v);if(!A)return!0;if(A?w=S:(w=S==="v"?"h":"v",A=Io(S,v)),!A)return!1;if(!o.current&&"changedTouches"in c&&(I||C)&&(o.current=w),!w)return!0;var E=o.current||w;return ws(E,h,c,E==="h"?I:C,!0)},[]),d=O.useCallback(function(c){var h=c;if(!(!La.length||La[La.length-1]!==l)){var g="deltaY"in h?Ss(h):wt(h),L=a.current.filter(function(w){return w.name===h.type&&(w.target===h.target||h.target===w.shadowParent)&&hi(w.delta,g)})[0];if(L&&L.should){h.cancelable&&h.preventDefault();return}if(!L){var I=(s.current.shards||[]).map(vs).filter(Boolean).filter(function(w){return w.contains(h.target)}),C=I.length>0?n(h,I[0]):!s.current.noIsolation;C&&h.cancelable&&h.preventDefault()}}},[]),u=O.useCallback(function(c,h,g,L){var I={name:c,delta:h,target:g,should:L,shadowParent:Li(g)};a.current.push(I),setTimeout(function(){a.current=a.current.filter(function(C){return C!==I})},1)},[]),i=O.useCallback(function(c){t.current=wt(c),o.current=void 0},[]),f=O.useCallback(function(c){u(c.type,Ss(c),c.target,n(c,e.lockRef.current))},[]),m=O.useCallback(function(c){u(c.type,wt(c),c.target,n(c,e.lockRef.current))},[]);O.useEffect(function(){return La.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",d,ta),document.addEventListener("touchmove",d,ta),document.addEventListener("touchstart",i,ta),function(){La=La.filter(function(c){return c!==l}),document.removeEventListener("wheel",d,ta),document.removeEventListener("touchmove",d,ta),document.removeEventListener("touchstart",i,ta)}},[]);var p=e.removeScrollBar,x=e.inert;return O.createElement(O.Fragment,null,x?O.createElement(l,{styles:xi(r)}):null,p?O.createElement(Lo,{gapMode:e.gapMode}):null)}function Li(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}var bs=co(It,ys);var Ps=St.forwardRef(function(e,a){return St.createElement(Va,be({},e,{ref:a,sideCar:bs}))});Ps.classNames=Va.classNames;var wo=Ps;var Ci=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},Ca=new WeakMap,vt=new WeakMap,yt={},So=0,Rs=function(e){return e&&(e.host||Rs(e.parentNode))},Ii=function(e,a){return a.map(function(t){if(e.contains(t))return t;var o=Rs(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return Boolean(t)})},wi=function(e,a,t,o){var r=Ii(a,Array.isArray(e)?e:[e]);yt[t]||(yt[t]=new WeakMap);var l=yt[t],s=[],n=new Set,d=new Set(r),u=function(f){!f||n.has(f)||(n.add(f),u(f.parentNode))};r.forEach(u);var i=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(m){if(n.has(m))i(m);else try{var p=m.getAttribute(o),x=p!==null&&p!=="false",c=(Ca.get(m)||0)+1,h=(l.get(m)||0)+1;Ca.set(m,c),l.set(m,h),s.push(m),c===1&&x&&vt.set(m,!0),h===1&&m.setAttribute(t,"true"),x||m.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return i(a),n.clear(),So++,function(){s.forEach(function(f){var m=Ca.get(f)-1,p=l.get(f)-1;Ca.set(f,m),l.set(f,p),m||(vt.has(f)||f.removeAttribute(o),vt.delete(f)),p||f.removeAttribute(t)}),So--,So||(Ca=new WeakMap,Ca=new WeakMap,vt=new WeakMap,yt={})}},As=function(e,a,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=a||Ci(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),wi(o,r,t,"aria-hidden")):function(){return null}};import{Fragment as ks,jsx as V,jsxs as Ts}from"react/jsx-runtime";var vo="Dialog",[Ds,Hh]=Ka(vo),[Si,Ie]=Ds(vo),Ms=e=>{let{__scopeDialog:a,children:t,open:o,defaultOpen:r,onOpenChange:l,modal:s=!0}=e,n=D.useRef(null),d=D.useRef(null),[u=!1,i]=dt({prop:o,defaultProp:r,onChange:l});return V(Si,{scope:a,triggerRef:n,contentRef:d,contentId:sa(),titleId:sa(),descriptionId:sa(),open:u,onOpenChange:i,onOpenToggle:D.useCallback(()=>i(f=>!f),[i]),modal:s,children:t})};Ms.displayName=vo;var Bs="DialogTrigger",Fs=D.forwardRef((e,a)=>{let{__scopeDialog:t,...o}=e,r=Ie(Bs,t),l=Z(a,r.triggerRef);return V(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Po(r.open),...o,ref:l,onClick:K(e.onClick,r.onOpenToggle)})});Fs.displayName=Bs;var yo="DialogPortal",[vi,Os]=Ds(yo,{forceMount:void 0}),Es=e=>{let{__scopeDialog:a,forceMount:t,children:o,container:r}=e,l=Ie(yo,a);return V(vi,{scope:a,forceMount:t,children:D.Children.map(o,s=>V(Me,{present:t||l.open,children:V(Aa,{asChild:!0,container:r,children:s})}))})};Es.displayName=yo;var bt="DialogOverlay",Ns=D.forwardRef((e,a)=>{let t=Os(bt,e.__scopeDialog),{forceMount:o=t.forceMount,...r}=e,l=Ie(bt,e.__scopeDialog);return l.modal?V(Me,{present:o||l.open,children:V(yi,{...r,ref:a})}):null});Ns.displayName=bt;var yi=D.forwardRef((e,a)=>{let{__scopeDialog:t,...o}=e,r=Ie(bt,t);return V(wo,{as:ze,allowPinchZoom:!0,shards:[r.contentRef],children:V(q.div,{"data-state":Po(r.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})}),oa="DialogContent",qs=D.forwardRef((e,a)=>{let t=Os(oa,e.__scopeDialog),{forceMount:o=t.forceMount,...r}=e,l=Ie(oa,e.__scopeDialog);return V(Me,{present:o||l.open,children:l.modal?V(bi,{...r,ref:a}):V(Pi,{...r,ref:a})})});qs.displayName=oa;var bi=D.forwardRef((e,a)=>{let t=Ie(oa,e.__scopeDialog),o=D.useRef(null),r=Z(a,t.contentRef,o);return D.useEffect(()=>{let l=o.current;if(l)return As(l)},[]),V(Hs,{...e,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,l=>{l.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,l=>{let s=l.detail.originalEvent,n=s.button===0&&s.ctrlKey===!0;(s.button===2||n)&&l.preventDefault()}),onFocusOutside:K(e.onFocusOutside,l=>l.preventDefault())})}),Pi=D.forwardRef((e,a)=>{let t=Ie(oa,e.__scopeDialog),o=D.useRef(!1),r=D.useRef(!1);return V(Hs,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(o.current||t.triggerRef.current?.focus(),l.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(r.current=!0));let s=l.target;t.triggerRef.current?.contains(s)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&r.current&&l.preventDefault()}})}),Hs=D.forwardRef((e,a)=>{let{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:l,...s}=e,n=Ie(oa,t),d=D.useRef(null),u=Z(a,d);return ss(),Ts(ks,{children:[V(lo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:l,children:V(Sa,{role:"dialog",id:n.contentId,"aria-describedby":n.descriptionId,"aria-labelledby":n.titleId,"data-state":Po(n.open),...s,ref:u,onDismiss:()=>n.onOpenChange(!1)})}),Ts(ks,{children:[V(Ri,{titleId:n.titleId}),V(ki,{contentRef:d,descriptionId:n.descriptionId})]})]})}),bo="DialogTitle",Us=D.forwardRef((e,a)=>{let{__scopeDialog:t,...o}=e,r=Ie(bo,t);return V(q.h2,{id:r.titleId,...o,ref:a})});Us.displayName=bo;var _s="DialogDescription",Ws=D.forwardRef((e,a)=>{let{__scopeDialog:t,...o}=e,r=Ie(_s,t);return V(q.p,{id:r.descriptionId,...o,ref:a})});Ws.displayName=_s;var Vs="DialogClose",zs=D.forwardRef((e,a)=>{let{__scopeDialog:t,...o}=e,r=Ie(Vs,t);return V(q.button,{type:"button",...o,ref:a,onClick:K(e.onClick,()=>r.onOpenChange(!1))})});zs.displayName=Vs;function Po(e){return e?"open":"closed"}var Gs="DialogTitleWarning",[Uh,js]=$o(Gs,{contentName:oa,titleName:bo,docsSlug:"dialog"}),Ri=({titleId:e})=>{let a=js(Gs),t=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return D.useEffect(()=>{e&&(document.getElementById(e)||console.error(t))},[t,e]),null},Ai="DialogDescriptionWarning",ki=({contentRef:e,descriptionId:a})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${js(Ai).contentName}}.`;return D.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");a&&r&&(document.getElementById(a)||console.warn(o))},[o,e,a]),null},Xs=Ms,$s=Fs,Ks=Es,Ro=Ns,Ao=qs,ko=Us,To=Ws,Do=zs;import{jsx as Ue,jsxs as Mo}from"react/jsx-runtime";var Zs=Xs,Js=$s,Ys=Do,Di=Ks,Qs=ja.forwardRef(({className:e,...a},t)=>Ue(Ro,{className:F("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a,ref:t}));Qs.displayName=Ro.displayName;var Mi=pt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Bo=ja.forwardRef(({side:e="right",className:a,children:t,...o},r)=>Mo(Di,{children:[Ue(Qs,{}),Mo(Ao,{ref:r,className:F(Mi({side:e}),a),...o,children:[t,Mo(Do,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[Ue(Ea,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Close"})]})]})]}));Bo.displayName=Ao.displayName;var Fo=({className:e,...a})=>Ue("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...a});Fo.displayName="SheetHeader";var Oo=({className:e,...a})=>Ue("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});Oo.displayName="SheetFooter";var Eo=ja.forwardRef(({className:e,...a},t)=>Ue(ko,{ref:t,className:F("text-lg font-semibold text-foreground",e),...a}));Eo.displayName=ko.displayName;var No=ja.forwardRef(({className:e,...a},t)=>Ue(To,{ref:t,className:F("text-sm text-muted-foreground",e),...a}));No.displayName=To.displayName;import{useState as qi}from"react";import{jsx as Bi}from"react/jsx-runtime";function Pt({className:e,...a}){return Bi("div",{className:F("animate-pulse rounded-md bg-muted",e),...a})}import{useState as Fi,useEffect as Oi}from"react";function en(e,a){let[t,o]=Fi({moduleDependencies:null,isLoading:!1,error:null});return Oi(()=>{e&&(o(r=>({...r,isLoading:!0})),fetch(`/api/module-pages?path=${encodeURIComponent(e)}&portalId=${a}`).then(r=>r.ok?r.json():Promise.reject(new Error("Failed to fetch module pages"))).then(r=>o({moduleDependencies:r,isLoading:!1,error:null})).catch(r=>o({moduleDependencies:null,isLoading:!1,error:String(r)})))},[e]),t}import{jsx as xe,jsxs as _e}from"react/jsx-runtime";var Ei=({pages:e,componentType:a})=>{if(e.length===0)return _e("div",{children:["No pages found using this ",a]});function t(o){return o?o.split("_").map(r=>r.charAt(0)+r.slice(1).toLowerCase()).join(" "):""}return _e(Ha,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[xe(Ua,{children:_e(Qe,{children:[xe(ma,{className:"border",children:"Page Name"}),xe(ma,{className:"border",children:"Page Type"})]})}),xe(_a,{className:"overflow-y-auto",children:e.map((o,r)=>_e(Qe,{className:"odd:bg-white even:bg-gray-50",children:[xe(ye,{className:"border",children:o.label}),xe(ye,{className:"border",children:t(o.subType)})]},r))})]})},Ni=({componentType:e,authedPortalId:a,projectName:t,webRootProjectComponentFolder:o,isOpen:r,moduleData:l})=>{let s=l.type==="react"?`@projects/${t}/${o}/components/modules/${l.nameWithExtension}`:l.subPath,{moduleDependencies:n,isLoading:d,error:u}=en(r?s:null,a);return _e("div",{className:"flex flex-col",children:[_e("div",{className:"flex justify-between items-center mb-3 gap-8",children:[xe("h2",{className:"text-2xl font-semibold leading-9 decoration-skip-ink",children:"Dependencies"}),d?xe(Pt,{className:"h-[20px] flex-1"}):n&&xe("span",{className:"text-lg font-bold leading-8",children:`${n.length} ${n.length===1?"page uses":"pages use"} this ${e}`})]}),d?_e("div",{className:"space-y-2",children:[xe(Pt,{className:"h-[20px] w-full"}),xe(Pt,{className:"h-[20px] w-full"})]}):u?_e("div",{className:"text-red-500",children:["Error loading dependencies: ",u]}):xe(Ei,{pages:n||[],componentType:e})]})},an=Ni;import{Fragment as on,jsx as X,jsxs as We}from"react/jsx-runtime";var Hi=({moduleData:e,themeWebRoot:a})=>{let t=JSON.stringify(e.fieldsJson,null,2),o=e.type==="react"?e.subPath:`hubl/${e.subPath?.split("/hubl/")[1]}`,r=e.type==="react"?`${a}/${o}.${e.extension}`:`${a}/${o}.module/fields.json`;return We("div",{className:"flex flex-col",children:[X("h2",{className:"text-2xl font-semibold leading-8",children:"JSON Fields"}),t?We(on,{children:[We("div",{className:"relative mt-6 mb-3",children:[X(Q,{variant:"outline",size:"icon",className:"w-6 h-6 text-xs rounded absolute top-1.5 right-1.5 z-10 opacity-90",onClick:()=>navigator.clipboard.writeText(t),children:X(Ye,{})}),X("div",{className:"rounded-xl overflow-hidden p-4 bg-[#0F172A]",children:X("pre",{className:"text-[14px] font-medium leading-6 text-[#9CDCFE] whitespace-pre-wrap",children:t})})]}),X("div",{children:X(Q,{variant:"outline",onClick:()=>{r&&fetch(`/api/open-file?path=${encodeURIComponent(r)}`).catch(s=>console.error("Failed to open file:",s))},children:"View Editor"})})]}):X("p",{children:"No fields found"})]})},Ui=({moduleData:e,componentType:a,themeWebRoot:t,authedPortalId:o,projectName:r,webRootProjectComponentFolder:l,children:s})=>{let[n,d]=qi(!1),u=a.charAt(0).toUpperCase()+a.slice(1);return We(Zs,{onOpenChange:d,children:[X(Js,{asChild:!0,children:s}),We(Bo,{className:"sm:max-w-xl overflow-y-scroll","aria-describedby":"sheet-title",children:[We(Fo,{children:[X(Eo,{className:"text-xl font-semibold leading-8 pb-8",children:X("span",{id:"sheet-title",children:We(on,{children:[e.name," - ",u," Details"]})})}),We(No,{className:"text-sm leading-5",children:[X("strong",{children:"Directory Path:"})," ",e.type==="react"?e.subPath:`hubl/${e.subPath?.split("/hubl/")[1]||e.subPath}`]})]}),X("div",{className:"grid gap-6 pb-6 my-6 border-b border-gray-300",children:X(an,{componentType:a,authedPortalId:o,projectName:r,webRootProjectComponentFolder:l,isOpen:n,moduleData:e})}),X("div",{className:"grid gap-6 my-6",children:X(Hi,{moduleData:e,themeWebRoot:t})}),X(Oo,{className:"",children:X(Ys,{asChild:!0,children:X(Q,{variant:"outline",type:"submit",children:"Close"})})})]})]})},tn=Ui;import{jsx as $,jsxs as Rt}from"react/jsx-runtime";var _i=(e,a,t,o,r)=>{if(!t.nameWithExtension)throw new Error(`Could not find component: ${t.name}`);let l=t.type==="react"?`@projects/${e}/${a}/components/modules/${t.nameWithExtension}`:t.subPath;return`https://app.hubspot${r==="qa"?"qa":""}.com/design-previewer/${o}/modules/p/${l}`},Wi=({component:e,componentType:a,onPreviewClick:t,onViewLocalClick:o})=>Rt("div",{className:"flex gap-2",children:[a==="module"&&$(Q,{variant:"outline",onClick:()=>t(e),children:"View in app"}),$(Q,{variant:"outline",onClick:()=>o(e),children:"View local version"})]});function rn({componentList:e,headers:a,webRootProjectComponentFolder:t,themeWebRoot:o,projectName:r,authedPortalId:l,componentType:s,authedEnv:n}){let d=i=>{try{let f=_i(r,t,i,l,n);window.open(f,"_blank")}catch(f){console.error("Failed to open preview:",f)}},u=i=>{try{let f;switch(s){case"module":f=i.type==="react"?`https://localhost:3000/preview/module/${i.name}`:`https://localhost:3000/hublmodule/${i.subPath}`;break;case"template":f=`https://localhost:3000/template/${i.subPath}`;break;case"partial":f=`https://localhost:3000/partial/${i.name}`;break;default:throw new Error(`Unknown component type: ${s}`)}window.open(f,"_blank")}catch(f){console.error("Failed to open preview:",f)}};return Rt(Ha,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[$(Ua,{children:$(Qe,{className:"",children:a.map((i,f)=>$(ma,{className:"border",children:i},f))})}),$(_a,{className:"overflow-y-auto",children:e.map((i,f)=>Rt(Qe,{className:"odd:bg-white even:bg-gray-50",children:[i.name&&$(ye,{className:"border",children:s==="module"?$(tn,{moduleData:i,componentType:s,themeWebRoot:o,authedPortalId:l,projectName:r,webRootProjectComponentFolder:t,children:$("span",{className:"underline cursor-pointer",children:i.name})}):$("span",{children:i.name})}),i.type&&$(ye,{className:"border",children:Rt("div",{className:"flex items-center gap-2",children:[i.type==="react"?$(Yl,{}):$(Ee,{}),$("span",{children:i.type==="react"?"React":"HuBL"})]})}),i.dateCreated&&$(ye,{className:"border",children:i.dateCreated}),i.status&&$(ye,{className:"border",children:i.status}),$(ye,{className:"border",children:$(Wi,{component:i,componentType:s,onPreviewClick:d,onViewLocalClick:u})})]},f))})]})}import{jsx as Ia,jsxs as sn}from"react/jsx-runtime";var Ho=({id:e,header:a,componentType:t,subtext:o,headers:r,data:l,webRootProjectComponentFolder:s,themeWebRoot:n,projectName:d,authedPortalId:u,authedEnv:i})=>sn("div",{id:e,className:"mb-16",children:[Ia("h2",{className:"font-inter text-2xl font-semibold leading-9 tracking-tight text-left",children:a}),Ia("p",{className:"font-inter text-base font-normal leading-7 text-left mb-5",children:o}),Ia(rn,{authedEnv:i,componentList:l,headers:r,webRootProjectComponentFolder:s,themeWebRoot:n,projectName:d,authedPortalId:u,componentType:t})]}),Vi=({modulesData:e,partialsData:a,hubLModules:t,hubLTemplates:o,webRootProjectComponentFolder:r,themeWebRoot:l,projectName:s,authedPortalId:n,authedEnv:d})=>{let u=(p,x)=>p.map(c=>({...c,type:x})),i=[...u(e,"react"),...t.map(p=>({...p,type:"hubl"}))],f=[...u(a,"react")],m=o.map(p=>({...p,type:"hubl"}));return sn("div",{className:"mt-12",children:[Ia(Ho,{id:"modules-table",header:"Modules",componentType:"module",subtext:"Describe what this is",headers:["Name","Type","Actions"],data:i,webRootProjectComponentFolder:r,themeWebRoot:l,projectName:s,authedPortalId:n,authedEnv:d}),Ia(Ho,{id:"partials-table",header:"Partials",componentType:"partial",subtext:"Describe what this is",headers:["Name","Type","Actions"],data:f}),Ia(Ho,{id:"templates-table",header:"Templates",componentType:"template",subtext:"Describe what this is",headers:["Name","Type","Actions"],data:m})]})},ln=Vi;import Zi from"react";import*as fn from"react";import*as un from"react";import{jsx as zi}from"react/jsx-runtime";var Gi="Separator",nn="horizontal",ji=["horizontal","vertical"],dn=un.forwardRef((e,a)=>{let{decorative:t,orientation:o=nn,...r}=e,l=Xi(o)?o:nn,n=t?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return zi(q.div,{"data-orientation":l,...n,...r,ref:a})});dn.displayName=Gi;function Xi(e){return ji.includes(e)}var Uo=dn;import{jsx as Ki}from"react/jsx-runtime";var _o=fn.forwardRef(({className:e,orientation:a="horizontal",decorative:t=!0,...o},r)=>Ki(Uo,{ref:r,decorative:t,orientation:a,className:F("shrink-0 bg-border",a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));_o.displayName=Uo.displayName;import{jsx as At,jsxs as Yi}from"react/jsx-runtime";var Ji=()=>{let e=[{href:"https://www.youtube.com/playlist?list=PLjtLN8FCj4SljVFvkJbSk9J5hq4KTKYcB&jct=pci9oBKT6ttPIJIGKv-rVg",text:"CMS React Videos"},{href:"https://developers.hubspot.com/beta-docs/guides/cms/content/modules/build-modules-and-partials-with-react",text:"React Docs"},{href:"https://react.dev",text:"Learn React"},{href:"https://github.com/HubSpot/cms-react/tree/main/examples",text:"Github Examples"}];return At("footer",{className:"w-full py-16",children:At("nav",{className:"flex justify-center items-center gap-4 text-gray-900 text-sm font-normal",children:e.map((a,t)=>Yi(Zi.Fragment,{children:[At("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",children:a.text}),t<e.length-1&&At(_o,{className:"bg-gray-200 h-4",orientation:"vertical"})]},t))})})},cn=Ji;import{useCallback as Qi}from"react";import{jsx as Ve,jsxs as pn}from"react/jsx-runtime";function Wo({size:e=24,...a}){return pn("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ve("circle",{cx:"20",cy:"20",r:"20",fill:"url(#paint0_linear_6129_76863)"}),Ve("mask",{id:"mask0_6129_76863",maskUnits:"userSpaceOnUse",x:"8",y:"7",width:"24",height:"28",children:Ve("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.18164 7.27271H31.6885V34.3423H8.18164V7.27271Z",fill:"white"})}),Ve("g",{mask:"url(#mask0_6129_76863)",children:Ve("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2583 26.7794C23.4375 26.7794 21.9612 25.1574 21.9612 23.1566C21.9612 21.1557 23.4375 19.5336 25.2583 19.5336C27.0789 19.5336 28.555 21.1557 28.555 23.1566C28.555 25.1574 27.0789 26.7794 25.2583 26.7794ZM26.2452 16.1818V12.9592C27.0106 12.5618 27.5471 11.7108 27.5471 10.7231V10.6487C27.5471 9.28578 26.532 8.17055 25.292 8.17055H25.2242C23.984 8.17055 22.969 9.28578 22.969 10.6487V10.7231C22.969 11.7108 23.5055 12.5618 24.2709 12.9592V16.182C23.1313 16.3754 22.0899 16.892 21.2306 17.6522L13.1786 10.7689C13.2315 10.5449 13.2687 10.314 13.269 10.0716C13.2708 8.52773 12.1334 7.27469 10.7285 7.27271C9.32372 7.27072 8.1833 8.52062 8.18164 10.0645C8.17984 11.6082 9.31724 12.8613 10.7222 12.8632C11.18 12.8639 11.6036 12.721 11.9752 12.4889L19.8959 19.26C19.2222 20.3773 18.8278 21.7158 18.8278 23.1566C18.8278 24.665 19.2614 26.0602 19.9943 27.2079L17.5855 29.8549C17.395 29.7922 17.1973 29.7482 16.9881 29.7482C15.8338 29.7482 14.8978 30.7767 14.8978 32.0453C14.8978 33.3139 15.8338 34.3423 16.9881 34.3423C18.1426 34.3423 19.0785 33.3139 19.0785 32.0453C19.0785 31.8155 19.0386 31.5981 18.9814 31.389L21.3641 28.7706C22.4457 29.678 23.7925 30.2228 25.2582 30.2228C28.8096 30.2228 31.6885 27.0591 31.6885 23.1566C31.6885 19.6236 29.3267 16.7049 26.2452 16.1818Z",fill:"white"})}),Ve("defs",{children:pn("linearGradient",{id:"paint0_linear_6129_76863",x1:"0",y1:"0",x2:"0",y2:"40",gradientUnits:"userSpaceOnUse",children:[Ve("stop",{stopColor:"#FF8F59"}),Ve("stop",{offset:"1",stopColor:"#FF7A59"})]})})]})}import{jsx as le,jsxs as Xa}from"react/jsx-runtime";function Vo({onClose:e}){let a=Qi(()=>{navigator.clipboard.writeText("hs init"),window.open("terminal://open?path=.","_blank"),window.location.reload()},[]);return le("div",{className:"w-full max-w-2xl bg-background border rounded-lg shadow-lg p-8 mx-4",children:Xa("div",{className:"flex flex-col items-center justify-center space-y-6 text-center",children:[le("div",{className:"bg-slate-900/90 rounded-lg p-6 w-full",children:Xa("div",{className:"flex items-center justify-center gap-3",children:[le(Oa,{className:"w-8 h-8 text-white"}),le(Ma,{className:"w-8 h-8 text-slate-400"}),le(Wo,{size:32,className:"text-[#ff7a59]"})]})}),le("div",{className:"space-y-2",children:le("h2",{className:"text-2xl font-semibold tracking-tight",children:"Enjoy the full preview experience by connecting to HubSpot"})}),le("div",{className:"space-y-4 max-w-md",children:Xa("div",{className:"space-y-2 text-sm text-muted-foreground",children:[Xa("p",{children:["Connect by using the"," ",le("code",{className:"bg-slate-100 px-1.5 py-0.5 rounded text-slate-900",children:"hs init"})," ","command to create a new config file. Ensure there's a"," ",le("code",{className:"bg-muted px-1.5 py-0.5 rounded",children:"hubspot.config.yaml"})," ","in the folder (or a parent)."]}),le("p",{children:"By connecting and authenticating you can use local proxy functionality and module preview routes."}),le("p",{className:"italic",children:`You can work on modules locally at "/module/[module_name]", but we won't have all your account data to display in this server.`})]})}),Xa("div",{className:"flex gap-4",children:[le(Q,{variant:"outline",onClick:e,children:"Close"}),le(Q,{onClick:a,children:"Connect Now"})]})]})})}import{jsx as ra,jsxs as af}from"react/jsx-runtime";function zo({initialProps:e}){let{projectName:a,authedEnv:t,authedPortalId:o,modulesData:r,hubLModules:l,partialsData:s,hubLTemplates:n,webRootProjectComponentFolder:d,themeWebRoot:u}=e,[i,f]=ef(!o);return ra(Kt,{children:af("div",{className:"container relative pt-8",children:[ra(Jl,{projectName:a,authedPortalId:o,modulesData:r,partialsData:s,hubLModules:l}),ra(ln,{modulesData:r,hubLModules:l,partialsData:s,hubLTemplates:n,webRootProjectComponentFolder:d,themeWebRoot:u,projectName:a,authedPortalId:o,authedEnv:t}),ra(cn,{}),i&&ra("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm",children:ra("div",{className:"fixed inset-0 flex items-center justify-center",children:ra(Vo,{onClose:()=>{f(!1)}})})})]})})}import{jsx as mn}from"react/jsx-runtime";var rf=window?.__hsInitialProps;of(document.getElementById("root"),mn(tf,{children:mn(zo,{initialProps:rf})}));
46
- /*! Bundled license information:
47
-
48
- lucide-react/dist/esm/shared/src/utils.js:
49
- (**
50
- * @license lucide-react v0.454.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- *)
55
-
56
- lucide-react/dist/esm/defaultAttributes.js:
57
- (**
58
- * @license lucide-react v0.454.0 - ISC
59
- *
60
- * This source code is licensed under the ISC license.
61
- * See the LICENSE file in the root directory of this source tree.
62
- *)
63
-
64
- lucide-react/dist/esm/Icon.js:
65
- (**
66
- * @license lucide-react v0.454.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- *)
71
-
72
- lucide-react/dist/esm/createLucideIcon.js:
73
- (**
74
- * @license lucide-react v0.454.0 - ISC
75
- *
76
- * This source code is licensed under the ISC license.
77
- * See the LICENSE file in the root directory of this source tree.
78
- *)
79
-
80
- lucide-react/dist/esm/icons/arrow-right-left.js:
81
- (**
82
- * @license lucide-react v0.454.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- *)
87
-
88
- lucide-react/dist/esm/icons/braces.js:
89
- (**
90
- * @license lucide-react v0.454.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- *)
95
-
96
- lucide-react/dist/esm/icons/check.js:
97
- (**
98
- * @license lucide-react v0.454.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- *)
103
-
104
- lucide-react/dist/esm/icons/circle-check.js:
105
- (**
106
- * @license lucide-react v0.454.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- *)
111
-
112
- lucide-react/dist/esm/icons/clipboard-copy.js:
113
- (**
114
- * @license lucide-react v0.454.0 - ISC
115
- *
116
- * This source code is licensed under the ISC license.
117
- * See the LICENSE file in the root directory of this source tree.
118
- *)
119
-
120
- lucide-react/dist/esm/icons/copy.js:
121
- (**
122
- * @license lucide-react v0.454.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- *)
127
-
128
- lucide-react/dist/esm/icons/external-link.js:
129
- (**
130
- * @license lucide-react v0.454.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- *)
135
-
136
- lucide-react/dist/esm/icons/server-crash.js:
137
- (**
138
- * @license lucide-react v0.454.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- *)
143
-
144
- lucide-react/dist/esm/icons/triangle-alert.js:
145
- (**
146
- * @license lucide-react v0.454.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- *)
151
-
152
- lucide-react/dist/esm/icons/x.js:
153
- (**
154
- * @license lucide-react v0.454.0 - ISC
155
- *
156
- * This source code is licensed under the ISC license.
157
- * See the LICENSE file in the root directory of this source tree.
158
- *)
159
-
160
- lucide-react/dist/esm/lucide-react.js:
161
- (**
162
- * @license lucide-react v0.454.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- *)
167
- */
168
- //# sourceMappingURL=/clientEntry.js.map