@vasf/ragnar-web 1.0.2 → 1.0.4

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 (3) hide show
  1. package/dist/index.cjs +595 -10
  2. package/dist/index.js +46593 -2417
  3. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -1,4 +1,589 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),es=require("react"),v=require("class-variance-authority"),ts=require("clsx"),as=require("tailwind-merge"),J=require("lucide-react"),y=require("@vasf/ragnar-core");function rs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const o=rs(es);function n(...t){return as.twMerge(ts.clsx(t))}const os=v.cva("relative flex flex-col items-center justify-center overflow-hidden",{variants:{size:{sm:"min-h-[40vh] py-16",default:"min-h-[60vh] py-20",lg:"min-h-[80vh] py-24",full:"min-h-screen py-24"},align:{left:"items-start text-left",center:"items-center text-center",right:"items-end text-right"}},defaultVariants:{size:"default",align:"center"}}),Ae=o.forwardRef(({className:t,size:e,align:a,backgroundImage:s,backgroundOverlay:l=!0,overlayOpacity:i=.5,children:c,style:d,...m},u)=>r.jsxs("section",{ref:u,className:n(os({size:e,align:a}),t),style:{...d,backgroundImage:s?`url(${s})`:void 0,backgroundSize:"cover",backgroundPosition:"center"},...m,children:[s&&l&&r.jsx("div",{className:"absolute inset-0 bg-background",style:{opacity:i}}),r.jsx("div",{className:n("container relative z-10 mx-auto px-4",a==="center"&&"flex flex-col items-center"),children:c})]}));Ae.displayName="Hero";const Be=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("mb-4 inline-flex items-center rounded-full border bg-muted px-4 py-1.5 text-sm font-medium text-muted-foreground",t),...e}));Be.displayName="HeroBadge";const Fe=o.forwardRef(({className:t,...e},a)=>r.jsx("h1",{ref:a,className:n("max-w-4xl font-heading text-4xl font-bold tracking-tight text-foreground sm:text-5xl md:text-6xl lg:text-7xl",t),...e}));Fe.displayName="HeroTitle";const Me=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-6 max-w-2xl text-lg text-muted-foreground sm:text-xl md:text-2xl",t),...e}));Me.displayName="HeroSubtitle";const Le=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-8 flex flex-wrap items-center justify-center gap-4",t),...e}));Le.displayName="HeroActions";const Ie=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("div",{ref:s,className:n("mt-12 w-full max-w-5xl",t),...a,children:e}));Ie.displayName="HeroImage";const ss=v.cva("flex flex-col gap-6 py-12 md:py-16 lg:py-20",{variants:{layout:{default:"items-center text-center",left:"items-start text-left",right:"items-end text-right"},size:{sm:"max-w-xl",default:"max-w-2xl",lg:"max-w-3xl",xl:"max-w-4xl",full:"max-w-full"}},defaultVariants:{layout:"default",size:"default"}}),Ee=o.forwardRef(({className:t,layout:e,size:a,container:s=!0,children:l,...i},c)=>r.jsx("section",{ref:c,className:n(s&&"container mx-auto px-4",t),...i,children:r.jsx("div",{className:n(ss({layout:e,size:a}),e==="default"&&"mx-auto"),children:l})}));Ee.displayName="ContentSpot";const Ve=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("text-sm font-semibold uppercase tracking-wider text-primary",t),...e}));Ve.displayName="ContentSpotEyebrow";const Pe=o.forwardRef(({className:t,as:e="h2",...a},s)=>r.jsx(e,{ref:s,className:n("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl lg:text-5xl",t),...a}));Pe.displayName="ContentSpotTitle";const De=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-lg text-muted-foreground sm:text-xl",t),...e}));De.displayName="ContentSpotDescription";const ze=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-wrap items-center gap-4",t),...e}));ze.displayName="ContentSpotActions";const ns=v.cva("py-12 md:py-16 lg:py-20",{variants:{layout:{grid:"",imageLeft:"",imageRight:""}},defaultVariants:{layout:"grid"}}),He=o.forwardRef(({className:t,layout:e,container:a=!0,children:s,...l},i)=>r.jsx("section",{ref:i,className:n(ns({layout:e}),a&&"container mx-auto px-4",t),...l,children:s}));He.displayName="FeatureSpot";const Ge=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mx-auto mb-12 max-w-2xl text-center",t),...e}));Ge.displayName="FeatureSpotHeader";const _e=o.forwardRef(({className:t,as:e="h2",...a},s)=>r.jsx(e,{ref:s,className:n("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...a}));_e.displayName="FeatureSpotTitle";const Qe=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-4 text-lg text-muted-foreground",t),...e}));Qe.displayName="FeatureSpotDescription";const qe=o.forwardRef(({className:t,columns:e=3,...a},s)=>{const l={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return r.jsx("div",{ref:s,className:n("grid gap-8",l[e],t),...a})});qe.displayName="FeatureSpotGrid";const $e=o.forwardRef(({className:t,icon:e,children:a,...s},l)=>r.jsxs("div",{ref:l,className:n("flex flex-col gap-4",t),...s,children:[e&&r.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e}),a]}));$e.displayName="FeatureSpotItem";const Oe=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-lg font-semibold text-foreground",t),...e}));Oe.displayName="FeatureSpotItemTitle";const Ue=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-muted-foreground",t),...e}));Ue.displayName="FeatureSpotItemDescription";const We=o.forwardRef(({className:t,reverse:e=!1,...a},s)=>r.jsx("div",{ref:s,className:n("grid items-center gap-8 md:grid-cols-2 md:gap-12 lg:gap-16",e&&"md:[&>*:first-child]:order-2",t),...a}));We.displayName="FeatureSpotSplit";const Xe=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-col gap-6",t),...e}));Xe.displayName="FeatureSpotContent";const Ye=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("relative overflow-hidden rounded-xl",t),...e}));Ye.displayName="FeatureSpotMedia";const ls=v.cva("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground",dark:"bg-zinc-900 text-white",bordered:"border-y bg-background"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),Je=o.forwardRef(({className:t,variant:e,size:a,children:s,...l},i)=>r.jsx("section",{ref:i,className:n(ls({variant:e,size:a}),t),...l,children:r.jsx("div",{className:"container mx-auto px-4",children:s})}));Je.displayName="CTASection";const is=v.cva("mx-auto",{variants:{align:{left:"text-left",center:"text-center",split:"flex flex-col items-center justify-between gap-8 text-center md:flex-row md:text-left"},maxWidth:{sm:"max-w-xl",md:"max-w-2xl",lg:"max-w-4xl",full:"max-w-none"}},defaultVariants:{align:"center",maxWidth:"lg"}}),Ke=o.forwardRef(({className:t,align:e,maxWidth:a,...s},l)=>r.jsx("div",{ref:l,className:n(is({align:e,maxWidth:a}),t),...s}));Ke.displayName="CTAContent";const Ze=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));Ze.displayName="CTATitle";const et=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-4 text-lg opacity-90",t),...e}));et.displayName="CTADescription";const tt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-8 flex flex-wrap items-center gap-4",t),...e}));tt.displayName="CTAActions";const at=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("div",{ref:s,className:n("rounded-2xl bg-card p-8 shadow-lg md:p-12",t),...a,children:e}));at.displayName="CTACard";const ds=v.cva("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",dark:"bg-zinc-900 text-white"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),rt=o.forwardRef(({className:t,variant:e,size:a,children:s,...l},i)=>r.jsx("section",{ref:i,className:n(ds({variant:e,size:a}),t),...l,children:r.jsx("div",{className:"container mx-auto px-4",children:s})}));rt.displayName="StatsSection";const ot=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-12 text-center",t),...e}));ot.displayName="StatsHeader";const st=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));st.displayName="StatsTitle";const nt=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mx-auto mt-4 max-w-2xl text-lg opacity-80",t),...e}));nt.displayName="StatsDescription";const cs=v.cva("grid gap-8",{variants:{columns:{2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:4}}),lt=o.forwardRef(({className:t,columns:e,...a},s)=>r.jsx("div",{ref:s,className:n(cs({columns:e}),t),...a}));lt.displayName="StatsGrid";const ms=v.cva("text-center",{variants:{variant:{default:"",bordered:"border-l first:border-l-0 pl-8 first:pl-0",card:"rounded-lg border bg-card p-6 shadow-sm"}},defaultVariants:{variant:"default"}}),it=o.forwardRef(({className:t,variant:e,...a},s)=>r.jsx("div",{ref:s,className:n(ms({variant:e}),t),...a}));it.displayName="StatItem";const dt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("font-heading text-4xl font-bold tracking-tight lg:text-5xl",t),...e}));dt.displayName="StatValue";const ct=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-2 text-sm font-medium opacity-80",t),...e}));ct.displayName="StatLabel";const mt=o.forwardRef(({className:t,direction:e="neutral",...a},s)=>r.jsx("div",{ref:s,className:n("mt-1 text-sm font-medium",e==="up"&&"text-green-500",e==="down"&&"text-red-500",e==="neutral"&&"opacity-60",t),...a}));mt.displayName="StatTrend";const fs=v.cva("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),ft=o.forwardRef(({className:t,size:e,children:a,...s},l)=>r.jsx("section",{ref:l,className:n(fs({size:e}),t),...s,children:r.jsx("div",{className:"container mx-auto px-4",children:a})}));ft.displayName="TeamSection";const ut=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-12 text-center",t),...e}));ut.displayName="TeamHeader";const xt=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));xt.displayName="TeamTitle";const pt=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));pt.displayName="TeamDescription";const us=v.cva("grid gap-8",{variants:{columns:{2:"md:grid-cols-2",3:"md:grid-cols-2 lg:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:4}}),gt=o.forwardRef(({className:t,columns:e,...a},s)=>r.jsx("div",{ref:s,className:n(us({columns:e}),t),...a}));gt.displayName="TeamGrid";const xs=v.cva("group text-center",{variants:{variant:{default:"",card:"rounded-lg border bg-card p-6 shadow-sm transition-shadow hover:shadow-md"}},defaultVariants:{variant:"default"}}),ht=o.forwardRef(({className:t,variant:e,...a},s)=>r.jsx("div",{ref:s,className:n(xs({variant:e}),t),...a}));ht.displayName="TeamMember";const vt=o.forwardRef(({className:t,alt:e,fallback:a,...s},l)=>r.jsx("div",{className:"relative mx-auto mb-4 h-32 w-32 overflow-hidden rounded-full bg-muted",children:s.src?r.jsx("img",{ref:l,alt:e,className:n("h-full w-full object-cover transition-transform group-hover:scale-105",t),...s}):r.jsx("div",{className:"flex h-full w-full items-center justify-center text-4xl font-medium text-muted-foreground",children:a||(e==null?void 0:e.charAt(0).toUpperCase())})}));vt.displayName="TeamMemberImage";const Nt=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-lg font-semibold text-foreground",t),...e}));Nt.displayName="TeamMemberName";const wt=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-sm text-muted-foreground",t),...e}));wt.displayName="TeamMemberRole";const yt=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-2 text-sm text-muted-foreground",t),...e}));yt.displayName="TeamMemberBio";const bt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-4 flex justify-center gap-3",t),...e}));bt.displayName="TeamMemberLinks";const jt=o.forwardRef(({className:t,label:e,children:a,...s},l)=>r.jsx("a",{ref:l,"aria-label":e,className:n("text-muted-foreground transition-colors hover:text-foreground",t),...s,children:a}));jt.displayName="TeamMemberLink";const ps=v.cva("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",bordered:"border-y bg-background"},size:{sm:"py-8",default:"py-12",lg:"py-16"}},defaultVariants:{variant:"default",size:"default"}}),Ct=o.forwardRef(({className:t,variant:e,size:a,title:s,children:l,...i},c)=>r.jsx("section",{ref:c,className:n(ps({variant:e,size:a}),t),...i,children:r.jsxs("div",{className:"container mx-auto px-4",children:[s&&r.jsx("p",{className:"mb-8 text-center text-sm font-medium text-muted-foreground",children:s}),r.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 md:gap-12 lg:gap-16",children:l})]})}));Ct.displayName="LogoCloud";const gs=v.cva("flex items-center justify-center transition-opacity",{variants:{grayscale:{true:"opacity-60 grayscale hover:opacity-100 hover:grayscale-0",false:"opacity-100"}},defaultVariants:{grayscale:!0}}),Rt=o.forwardRef(({className:t,grayscale:e,href:a,name:s,children:l,...i},c)=>{const d=r.jsx("div",{ref:c,className:n(gs({grayscale:e}),t),...i,children:l});return a?r.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer","aria-label":s,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:d}):d});Rt.displayName="LogoCloudItem";v.cva("",{variants:{variant:{default:"",card:"",minimal:"",featured:""}},defaultVariants:{variant:"default"}});const ue=o.forwardRef(({className:t,variant:e,author:a,rating:s,showQuoteIcon:l=!0,children:i,...c},d)=>{const m=r.jsxs(r.Fragment,{children:[l&&e!=="minimal"&&r.jsx(J.Quote,{className:"mb-4 h-8 w-8 text-primary/20"}),r.jsx("div",{className:"mb-6 text-lg text-foreground",children:i}),s!==void 0&&r.jsx("div",{className:"mb-4 flex gap-1",children:Array.from({length:5}).map((u,g)=>r.jsx(J.Star,{className:n("h-5 w-5",g<s?"fill-yellow-400 text-yellow-400":"text-muted-foreground/30")},g))}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsxs(y.Avatar,{children:[a.avatar&&r.jsx(y.AvatarImage,{src:a.avatar,alt:a.name}),r.jsx(y.AvatarFallback,{children:a.name.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2)})]}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"font-semibold text-foreground",children:a.name}),(a.title||a.company)&&r.jsxs("span",{className:"text-sm text-muted-foreground",children:[a.title,a.title&&a.company&&" at ",a.company]})]})]})]});return e==="card"?r.jsx(y.Card,{ref:d,className:n("",t),...c,children:r.jsx(y.CardContent,{className:"pt-6",children:m})}):e==="featured"?r.jsx("div",{ref:d,className:n("relative rounded-2xl bg-gradient-to-br from-primary/5 to-primary/10 p-8 md:p-12",t),...c,children:m}):r.jsx("div",{ref:d,className:n("",t),...c,children:m})});ue.displayName="Testimonial";const St=o.forwardRef(({className:t,columns:e=3,...a},s)=>{const l={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"};return r.jsx("div",{ref:s,className:n("grid gap-6",l[e],t),...a})});St.displayName="TestimonialGrid";const kt=o.forwardRef(({className:t,testimonials:e,autoPlay:a=!0,interval:s=5e3,...l},i)=>{const[c,d]=o.useState(0);return o.useEffect(()=>{if(!a)return;const m=setInterval(()=>{d(u=>(u+1)%e.length)},s);return()=>clearInterval(m)},[a,s,e.length]),r.jsxs("div",{ref:i,className:n("relative overflow-hidden",t),...l,children:[r.jsx("div",{className:"flex transition-transform duration-500 ease-out",style:{transform:`translateX(-${c*100}%)`},children:e.map((m,u)=>r.jsx("div",{className:"w-full shrink-0 px-4",children:r.jsx(ue,{author:m.author,rating:m.rating,variant:"featured",className:"mx-auto max-w-3xl",children:m.content})},u))}),r.jsx("div",{className:"mt-6 flex justify-center gap-2",children:e.map((m,u)=>r.jsx("button",{onClick:()=>d(u),className:n("h-2 w-2 rounded-full transition-colors",u===c?"bg-primary":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),"aria-label":`Go to testimonial ${u+1}`},u))})]})});kt.displayName="TestimonialCarousel";const hs=v.cva("relative",{variants:{variant:{default:"border-l-4 border-primary pl-6",centered:"text-center",card:"rounded-lg border bg-card p-6 shadow-sm",minimal:""},size:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",size:"default"}}),vs={sm:"text-base sm:text-lg",default:"text-lg sm:text-xl md:text-2xl",lg:"text-xl sm:text-2xl md:text-3xl"},Tt=o.forwardRef(({className:t,variant:e,size:a,showIcon:s=!1,children:l,...i},c)=>r.jsxs("blockquote",{ref:c,className:n(hs({variant:e,size:a}),t),...i,children:[s&&e==="centered"&&r.jsx(J.Quote,{className:"mx-auto mb-4 h-8 w-8 text-muted-foreground/30"}),l]}));Tt.displayName="Quote";const At=o.forwardRef(({className:t,size:e="default",...a},s)=>r.jsx("p",{ref:s,className:n("font-medium italic text-foreground leading-relaxed",vs[e],t),...a}));At.displayName="QuoteText";const Bt=o.forwardRef(({className:t,...e},a)=>r.jsx("footer",{ref:a,className:n("mt-4 flex items-center gap-4",t),...e}));Bt.displayName="QuoteAuthor";const Ft=o.forwardRef(({className:t,src:e,alt:a,...s},l)=>r.jsx("div",{ref:l,className:n("h-12 w-12 shrink-0 overflow-hidden rounded-full bg-muted",t),...s,children:e&&r.jsx("img",{src:e,alt:a??"",className:"h-full w-full object-cover"})}));Ft.displayName="QuoteAuthorAvatar";const Mt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-col",t),...e}));Mt.displayName="QuoteAuthorInfo";const Lt=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("font-semibold text-foreground",t),...e}));Lt.displayName="QuoteAuthorName";const It=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("text-sm text-muted-foreground",t),...e}));It.displayName="QuoteAuthorTitle";const Ns=v.cva("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),Et=o.forwardRef(({className:t,size:e,children:a,...s},l)=>r.jsx("section",{ref:l,className:n(Ns({size:e}),t),...s,children:r.jsx("div",{className:"container mx-auto px-4",children:a})}));Et.displayName="FAQSection";const Vt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-12 text-center",t),...e}));Vt.displayName="FAQHeader";const Pt=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));Pt.displayName="FAQTitle";const Dt=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));Dt.displayName="FAQDescription";const ws=v.cva("mx-auto",{variants:{variant:{default:"divide-y divide-border",separated:"space-y-4",cards:"space-y-4"},maxWidth:{sm:"max-w-xl",md:"max-w-2xl",lg:"max-w-3xl",full:"max-w-none"}},defaultVariants:{variant:"default",maxWidth:"lg"}}),zt=o.forwardRef(({className:t,variant:e,maxWidth:a,...s},l)=>r.jsx("div",{ref:l,className:n(ws({variant:e,maxWidth:a}),t),...s}));zt.displayName="FAQList";const Ht=o.forwardRef(({className:t,defaultOpen:e=!1,children:a,...s},l)=>{const[i,c]=o.useState(e);return r.jsx("div",{ref:l,className:n("py-4",t),...s,children:o.Children.map(a,d=>{if(o.isValidElement(d)){if(d.type===ne)return o.cloneElement(d,{isOpen:i,onToggle:()=>c(!i)});if(d.type===le)return o.cloneElement(d,{isOpen:i})}return d})})});Ht.displayName="FAQItem";const Gt=o.forwardRef(({className:t,defaultOpen:e=!1,children:a,...s},l)=>{const[i,c]=o.useState(e);return r.jsx("div",{ref:l,className:n("rounded-lg border bg-card p-4 transition-shadow hover:shadow-sm",t),...s,children:o.Children.map(a,d=>{if(o.isValidElement(d)){if(d.type===ne)return o.cloneElement(d,{isOpen:i,onToggle:()=>c(!i)});if(d.type===le)return o.cloneElement(d,{isOpen:i})}return d})})});Gt.displayName="FAQItemCard";const ne=o.forwardRef(({className:t,isOpen:e,onToggle:a,children:s,...l},i)=>r.jsxs("button",{ref:i,type:"button",onClick:a,className:n("flex w-full items-center justify-between text-left font-medium text-foreground transition-colors hover:text-foreground/80",t),"aria-expanded":e,...l,children:[r.jsx("span",{className:"pr-4",children:s}),r.jsx("svg",{className:n("h-5 w-5 shrink-0 text-muted-foreground transition-transform duration-200",e&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}));ne.displayName="FAQQuestion";const le=o.forwardRef(({className:t,isOpen:e,children:a,...s},l)=>r.jsx("div",{ref:l,className:n("grid transition-all duration-200",e?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),...s,children:r.jsx("div",{className:"overflow-hidden",children:r.jsx("div",{className:n("pt-4 text-muted-foreground",t),children:a})})}));le.displayName="FAQAnswer";const _t=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-12 text-center",t),...e}));_t.displayName="FAQContact";const ys=v.cva("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),Qt=o.forwardRef(({className:t,size:e,children:a,...s},l)=>r.jsx("section",{ref:l,className:n(ys({size:e}),t),...s,children:r.jsx("div",{className:"container mx-auto px-4",children:a})}));Qt.displayName="ComparisonSection";const qt=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-12 text-center",t),...e}));qt.displayName="ComparisonHeader";const $t=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));$t.displayName="ComparisonTitle";const Ot=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));Ot.displayName="ComparisonDescription";const Ut=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("overflow-x-auto",t),...e}));Ut.displayName="ComparisonTable";const Wt=o.forwardRef(({className:t,...e},a)=>r.jsx("table",{ref:a,className:n("w-full border-collapse text-left",t),...e}));Wt.displayName="ComparisonTableInner";const Xt=o.forwardRef(({className:t,...e},a)=>r.jsx("thead",{ref:a,className:n("",t),...e}));Xt.displayName="ComparisonTableHead";const Yt=o.forwardRef(({className:t,...e},a)=>r.jsx("tbody",{ref:a,className:n("divide-y divide-border",t),...e}));Yt.displayName="ComparisonTableBody";const Jt=o.forwardRef(({className:t,...e},a)=>r.jsx("tr",{ref:a,className:n("",t),...e}));Jt.displayName="ComparisonTableRow";const bs=v.cva("px-4 py-4 text-sm font-semibold",{variants:{highlight:{true:"bg-primary/5",false:""}},defaultVariants:{highlight:!1}}),Kt=o.forwardRef(({className:t,highlight:e,...a},s)=>r.jsx("th",{ref:s,className:n(bs({highlight:e}),t),...a}));Kt.displayName="ComparisonHeaderCell";const js=v.cva("px-4 py-4 text-sm",{variants:{highlight:{true:"bg-primary/5",false:""}},defaultVariants:{highlight:!1}}),Zt=o.forwardRef(({className:t,highlight:e,...a},s)=>r.jsx("td",{ref:s,className:n(js({highlight:e}),t),...a}));Zt.displayName="ComparisonCell";const ea=o.forwardRef(({className:t,...e},a)=>r.jsx("td",{ref:a,className:n("px-4 py-4 text-sm font-medium text-foreground",t),...e}));ea.displayName="ComparisonFeatureCell";const ta=o.forwardRef(({className:t,...e},a)=>r.jsx("svg",{ref:a,className:n("mx-auto h-5 w-5 text-green-500",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}));ta.displayName="ComparisonCheck";const aa=o.forwardRef(({className:t,...e},a)=>r.jsx("svg",{ref:a,className:n("mx-auto h-5 w-5 text-muted-foreground/40",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}));aa.displayName="ComparisonX";const ra=o.forwardRef(({className:t,...e},a)=>r.jsx("svg",{ref:a,className:n("mx-auto h-5 w-5 text-muted-foreground/40",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 12H4"})}));ra.displayName="ComparisonMinus";const oa=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("text-center",t),...e}));oa.displayName="ComparisonPlanHeader";const sa=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("font-heading font-semibold text-foreground",t),...e}));sa.displayName="ComparisonPlanName";const na=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-1 font-heading text-2xl font-bold text-foreground",t),...e}));na.displayName="ComparisonPlanPrice";const la=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("tr",{ref:s,className:n("bg-muted/50",t),...a,children:r.jsx("td",{colSpan:100,className:"px-4 py-3 text-sm font-semibold text-foreground",children:e})}));la.displayName="ComparisonCategory";const Te=v.cva("flex w-full gap-2",{variants:{layout:{inline:"flex-row items-center",stacked:"flex-col"},size:{sm:"max-w-sm",default:"max-w-md",lg:"max-w-lg",full:"max-w-full"}},defaultVariants:{layout:"inline",size:"default"}}),ia=o.forwardRef(({className:t,layout:e,size:a,onSubmit:s,placeholder:l="Enter your email",buttonText:i="Subscribe",loading:c=!1,disabled:d=!1,helperText:m,successMessage:u,errorMessage:g,...h},p)=>{const[x,N]=o.useState(""),[b,j]=o.useState("idle"),R=async T=>{if(T.preventDefault(),!(!x||!s)){j("loading");try{await s(x),j("success"),N("")}catch{j("error")}}},F=c||b==="loading",M=d||F;return r.jsxs("div",{className:n("w-full",a!=="full"&&Te({size:a})),children:[r.jsxs("form",{ref:p,onSubmit:R,className:n(Te({layout:e,size:"full"}),t),...h,children:[r.jsx(y.Input,{type:"email",value:x,onChange:T=>N(T.target.value),placeholder:l,disabled:M,required:!0,className:n(e==="inline"&&"flex-1")}),r.jsx(y.Button,{type:"submit",disabled:M,className:n(e==="stacked"&&"w-full"),children:F?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):i})]}),m&&b==="idle"&&r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:m}),b==="success"&&u&&r.jsx("p",{className:"mt-2 text-sm text-green-600 dark:text-green-400",children:u}),b==="error"&&g&&r.jsx("p",{className:"mt-2 text-sm text-destructive",children:g})]})});ia.displayName="EmailForm";const Cs=v.cva("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground",dark:"bg-zinc-900 text-white",card:"bg-background"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),da=o.forwardRef(({className:t,variant:e,size:a,children:s,...l},i)=>{const c=e==="card";return r.jsx("section",{ref:i,className:n(Cs({variant:e,size:a}),t),...l,children:r.jsx("div",{className:"container mx-auto px-4",children:c?r.jsx("div",{className:"mx-auto max-w-2xl rounded-2xl border bg-card p-8 shadow-sm md:p-12",children:s}):r.jsx("div",{className:"mx-auto max-w-2xl text-center",children:s})})})});da.displayName="Newsletter";const ca=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("div",{ref:s,className:n("mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",t),...a,children:e||r.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}));ca.displayName="NewsletterIcon";const ma=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-2xl font-bold tracking-tight sm:text-3xl",t),...e}));ma.displayName="NewsletterTitle";const fa=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-4 text-lg opacity-90",t),...e}));fa.displayName="NewsletterDescription";const ua=o.forwardRef(({className:t,...e},a)=>r.jsx("form",{ref:a,className:n("mt-8 flex flex-col gap-3 sm:flex-row sm:gap-4",t),...e}));ua.displayName="NewsletterForm";const xa=o.forwardRef(({className:t,...e},a)=>r.jsx("input",{ref:a,type:"email",className:n("flex-1 rounded-lg border border-input bg-background px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",t),...e}));xa.displayName="NewsletterInput";const pa=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-4 text-xs opacity-70",t),...e}));pa.displayName="NewsletterDisclaimer";const ga=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-8 flex items-center justify-center gap-2 text-green-500",t),...e}));ga.displayName="NewsletterSuccess";const Rs=v.cva("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),ha=o.forwardRef(({className:t,size:e,children:a,...s},l)=>r.jsx("section",{ref:l,className:n(Rs({size:e}),t),...s,children:r.jsx("div",{className:"container mx-auto px-4",children:a})}));ha.displayName="ContactSection";const va=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("grid gap-12 lg:grid-cols-2",t),...e}));va.displayName="ContactContent";const Na=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-8",t),...e}));Na.displayName="ContactInfo";const wa=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-4",t),...e}));wa.displayName="ContactHeader";const ya=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));ya.displayName="ContactTitle";const ba=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-lg text-muted-foreground",t),...e}));ba.displayName="ContactDescription";const ja=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-4",t),...e}));ja.displayName="ContactDetails";const Ca=o.forwardRef(({className:t,icon:e,label:a,value:s,href:l,...i},c)=>r.jsxs("div",{ref:c,className:n("flex items-start gap-4",t),...i,children:[e&&r.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:a}),l?r.jsx("a",{href:l,className:"text-foreground hover:text-primary hover:underline",children:s}):r.jsx("p",{className:"text-foreground",children:s})]})]}));Ca.displayName="ContactDetailItem";const Ra=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex gap-4",t),...e}));Ra.displayName="ContactSocials";const Sa=o.forwardRef(({className:t,label:e,children:a,...s},l)=>r.jsx("a",{ref:l,"aria-label":e,className:n("flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground transition-colors hover:bg-primary hover:text-primary-foreground",t),...s,children:a}));Sa.displayName="ContactSocialLink";const Ss=v.cva("space-y-6",{variants:{variant:{default:"",card:"rounded-xl border bg-card p-6 shadow-sm md:p-8"}},defaultVariants:{variant:"default"}}),ka=o.forwardRef(({className:t,variant:e,...a},s)=>r.jsx("form",{ref:s,className:n(Ss({variant:e}),t),...a}));ka.displayName="ContactForm";const Ta=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("grid gap-4 sm:grid-cols-2",t),...e}));Ta.displayName="ContactFormRow";const Aa=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-2",t),...e}));Aa.displayName="ContactFormField";const Ba=o.forwardRef(({className:t,required:e,children:a,...s},l)=>r.jsxs("label",{ref:l,className:n("text-sm font-medium text-foreground",t),...s,children:[a,e&&r.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}));Ba.displayName="ContactFormLabel";const Fa=o.forwardRef(({className:t,...e},a)=>r.jsx("input",{ref:a,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));Fa.displayName="ContactFormInput";const Ma=o.forwardRef(({className:t,...e},a)=>r.jsx("textarea",{ref:a,className:n("flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));Ma.displayName="ContactFormTextarea";const La=o.forwardRef(({className:t,...e},a)=>r.jsx("select",{ref:a,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));La.displayName="ContactFormSelect";const Ia=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-sm text-red-500",t),...e}));Ia.displayName="ContactFormError";const Ea=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex items-center gap-2 rounded-lg bg-green-50 p-4 text-green-700",t),...e}));Ea.displayName="ContactFormSuccess";const Va=o.forwardRef(({className:t,logo:e,items:a=[],actions:s,sticky:l=!1,transparent:i=!1,mobileBreakpoint:c="md",...d},m)=>{const[u,g]=o.useState(!1),h={sm:{desktop:"hidden sm:flex",mobile:"sm:hidden"},md:{desktop:"hidden md:flex",mobile:"md:hidden"},lg:{desktop:"hidden lg:flex",mobile:"lg:hidden"}},p=(x,N=!1)=>{const b=N?"block w-full px-4 py-2 text-base font-medium text-foreground hover:bg-accent hover:text-accent-foreground rounded-md transition-colors":"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors";return x.href?r.jsx("a",{href:x.href,className:n(b,x.active&&(N?"bg-accent":"text-foreground")),onClick:()=>N&&g(!1),children:x.label},x.label):r.jsx("button",{onClick:()=>{var j;(j=x.onClick)==null||j.call(x),N&&g(!1)},className:n(b,"cursor-pointer text-left",x.active&&(N?"bg-accent":"text-foreground")),children:x.label},x.label)};return r.jsx("header",{ref:m,className:n("w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",l&&"sticky top-0 z-50",i&&"border-transparent bg-transparent",t),...d,children:r.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-4",children:[r.jsx("div",{className:"flex items-center",children:e}),r.jsx("nav",{className:n("items-center gap-6",h[c].desktop),children:a.map(x=>p(x))}),r.jsx("div",{className:n("items-center gap-4",h[c].desktop),children:s}),r.jsx("div",{className:h[c].mobile,children:r.jsxs(y.Sheet,{open:u,onOpenChange:g,children:[r.jsx(y.SheetTrigger,{asChild:!0,children:r.jsxs(y.Button,{variant:"ghost",size:"icon",children:[r.jsx(J.Menu,{className:"h-5 w-5"}),r.jsx("span",{className:"sr-only",children:"Toggle menu"})]})}),r.jsx(y.SheetContent,{side:"right",className:"w-[300px] sm:w-[400px]",children:r.jsxs("div",{className:"flex flex-col gap-6 pt-6",children:[r.jsx("nav",{className:"flex flex-col gap-2",children:a.map(x=>p(x,!0))}),s&&r.jsx("div",{className:"flex flex-col gap-2 border-t pt-6",children:s})]})})]})})]})})});Va.displayName="HeaderNavigation";const ks=v.cva("w-full border-t bg-background",{variants:{size:{sm:"py-8",default:"py-12",lg:"py-16"}},defaultVariants:{size:"default"}}),Pa=o.forwardRef(({className:t,size:e,children:a,...s},l)=>r.jsx("footer",{ref:l,className:n(ks({size:e}),t),...s,children:r.jsx("div",{className:"container mx-auto px-4",children:a})}));Pa.displayName="Footer";const Da=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("grid gap-8 md:grid-cols-2 lg:grid-cols-4",t),...e}));Da.displayName="FooterContent";const za=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-4",t),...e}));za.displayName="FooterSection";const Ha=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-sm font-semibold uppercase tracking-wider text-foreground",t),...e}));Ha.displayName="FooterTitle";const Ga=o.forwardRef(({className:t,...e},a)=>r.jsx("ul",{ref:a,className:n("space-y-2",t),...e}));Ga.displayName="FooterLinks";const _a=o.forwardRef(({className:t,...e},a)=>r.jsx("li",{children:r.jsx("a",{ref:a,className:n("text-sm text-muted-foreground transition-colors hover:text-foreground",t),...e})}));_a.displayName="FooterLink";const Qa=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-8 flex flex-col items-center justify-between gap-4 border-t pt-8 md:flex-row",t),...e}));Qa.displayName="FooterBottom";const qa=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-sm text-muted-foreground",t),...e}));qa.displayName="FooterCopyright";const $a=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex items-center gap-4",t),...e}));$a.displayName="FooterSocial";const Oa=o.forwardRef(({className:t,label:e,children:a,...s},l)=>r.jsx("a",{ref:l,"aria-label":e,className:n("text-muted-foreground transition-colors hover:text-foreground",t),...s,children:a}));Oa.displayName="FooterSocialLink";const Ts=v.cva("relative w-full px-4 py-2 text-center text-sm font-medium",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",muted:"bg-muted text-muted-foreground",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-black",error:"bg-red-500 text-white",gradient:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 text-white",dark:"bg-zinc-900 text-white"},size:{sm:"py-1.5 text-xs",default:"py-2 text-sm",lg:"py-3 text-base"}},defaultVariants:{variant:"default",size:"default"}}),ie=o.forwardRef(({className:t,variant:e,size:a,dismissible:s=!0,onDismiss:l,isVisible:i=!0,href:c,icon:d,children:m,...u},g)=>{const[h,p]=o.useState(i);if(o.useEffect(()=>{p(i)},[i]),!h)return null;const x=()=>{p(!1),l==null||l()},N=r.jsxs(r.Fragment,{children:[d&&r.jsx("span",{className:"mr-2 inline-flex",children:d}),m]});return r.jsx("div",{ref:g,className:n(Ts({variant:e,size:a}),t),role:"banner",...u,children:r.jsxs("div",{className:"container mx-auto flex items-center justify-center",children:[c?r.jsxs("a",{href:c,className:"flex items-center hover:underline",children:[N,r.jsx("svg",{className:"ml-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}):r.jsx("span",{className:"flex items-center",children:N}),s&&r.jsx("button",{onClick:x,className:"absolute right-4 top-1/2 -translate-y-1/2 rounded-full p-1 opacity-70 transition-opacity hover:opacity-100","aria-label":"Dismiss announcement",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})})});ie.displayName="AnnouncementBar";const Ua=o.forwardRef(({messages:t,interval:e=5e3,className:a,variant:s,size:l,dismissible:i,onDismiss:c,icon:d,...m},u)=>{const[g,h]=o.useState(0);o.useEffect(()=>{if(t.length<=1)return;const x=setInterval(()=>{h(N=>(N+1)%t.length)},e);return()=>clearInterval(x)},[t.length,e]);const p=t[g];return r.jsx(ie,{ref:u,className:a,variant:s,size:l,dismissible:i,onDismiss:c,href:p==null?void 0:p.href,icon:d,...m,children:r.jsx("span",{className:"animate-fade-in",children:p==null?void 0:p.text})})});Ua.displayName="RotatingAnnouncementBar";const Wa=o.forwardRef(({targetDate:t,prefix:e="Sale ends in",suffix:a,onComplete:s,className:l,variant:i,size:c,dismissible:d,onDismiss:m,href:u,icon:g,...h},p)=>{const[x,N]=o.useState("");return o.useEffect(()=>{const b=()=>{const R=t.getTime()-new Date().getTime();if(R<=0)return s==null||s(),"00:00:00";const F=Math.floor(R/(1e3*60*60)),M=Math.floor(R/(1e3*60)%60),T=Math.floor(R/1e3%60);return`${String(F).padStart(2,"0")}:${String(M).padStart(2,"0")}:${String(T).padStart(2,"0")}`};N(b());const j=setInterval(()=>{N(b())},1e3);return()=>clearInterval(j)},[t,s]),r.jsxs(ie,{ref:p,className:l,variant:i,size:c,dismissible:d,onDismiss:m,href:u,icon:g,...h,children:[e," ",r.jsx("span",{className:"mx-2 font-mono font-bold",children:x}),a]})});Wa.displayName="CountdownAnnouncementBar";const As=v.cva("grid gap-6",{variants:{columns:{2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:3}}),Xa=o.forwardRef(({className:t,columns:e,options:a,...s},l)=>r.jsx("div",{ref:l,className:n(As({columns:e}),t),...s,children:a.map(i=>r.jsx(xe,{option:i},i.id))}));Xa.displayName="PricingOptions";const xe=o.forwardRef(({option:t},e)=>r.jsxs(y.Card,{ref:e,className:n("relative flex flex-col",t.highlighted&&"border-primary shadow-lg scale-105"),children:[t.highlighted&&t.highlightLabel&&r.jsx(y.Badge,{className:"absolute -top-3 left-1/2 -translate-x-1/2",variant:"default",children:t.highlightLabel}),r.jsxs(y.CardHeader,{className:"text-center",children:[r.jsx(y.CardTitle,{className:"text-xl",children:t.name}),t.description&&r.jsx(y.CardDescription,{children:t.description}),r.jsxs("div",{className:"mt-4",children:[t.originalPrice&&r.jsx("span",{className:"mr-2 text-lg text-muted-foreground line-through",children:typeof t.originalPrice=="number"?`$${t.originalPrice}`:t.originalPrice}),r.jsx("span",{className:"font-heading text-4xl font-bold",children:typeof t.price=="number"?`$${t.price}`:t.price}),t.period&&r.jsxs("span",{className:"text-muted-foreground",children:["/",t.period]})]})]}),r.jsx(y.CardContent,{className:"flex-1",children:r.jsx("ul",{className:"space-y-3",children:t.features.map((a,s)=>r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(J.Check,{className:"h-5 w-5 shrink-0 text-primary"}),r.jsx("span",{className:"text-sm text-muted-foreground",children:a})]},s))})}),r.jsx(y.CardFooter,{children:r.jsx(y.Button,{className:"w-full",variant:t.buttonVariant??(t.highlighted?"default":"outline"),disabled:t.disabled,onClick:t.onSelect,children:t.buttonText??"Get Started"})})]}));xe.displayName="PricingCard";const Ya=o.forwardRef(({className:t,plans:e,features:a,featureGroupTitle:s="Features",...l},i)=>{const c=d=>typeof d=="boolean"?d?r.jsx(J.Check,{className:"mx-auto h-5 w-5 text-green-500"}):r.jsx(J.X,{className:"mx-auto h-5 w-5 text-muted-foreground/40"}):r.jsx("span",{className:"text-sm",children:d});return r.jsx("div",{ref:i,className:n("w-full overflow-auto",t),...l,children:r.jsxs(y.Table,{children:[r.jsx(y.TableHeader,{children:r.jsxs(y.TableRow,{children:[r.jsx(y.TableHead,{className:"w-[200px]",children:s}),e.map(d=>r.jsx(y.TableHead,{className:n("text-center",d.highlighted&&"bg-primary/5"),children:r.jsxs("div",{className:"flex flex-col gap-1",children:[d.highlighted&&r.jsx("span",{className:"text-xs font-medium text-primary",children:"Most Popular"}),r.jsx("span",{className:"font-heading text-lg font-semibold text-foreground",children:d.name}),r.jsxs("div",{className:"font-heading text-2xl font-bold text-foreground",children:[typeof d.price=="number"?`$${d.price}`:d.price,d.period&&r.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:["/",d.period]})]}),d.description&&r.jsx("span",{className:"text-xs text-muted-foreground",children:d.description})]})},d.id))]})}),r.jsx(y.TableBody,{children:a.map((d,m)=>r.jsxs(y.TableRow,{children:[r.jsx(y.TableCell,{className:"font-medium",children:d.name}),e.map(u=>r.jsx(y.TableCell,{className:n("text-center",u.highlighted&&"bg-primary/5"),children:c(d.values[u.id]??!1)},u.id))]},m))})]})})});Ya.displayName="PricingTable";const Bs=v.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:3}}),Ja=o.forwardRef(({className:t,columns:e,...a},s)=>r.jsx("div",{ref:s,className:n(Bs({columns:e}),t),...a}));Ja.displayName="BlogGrid";const Fs=v.cva("group flex flex-col overflow-hidden rounded-lg transition-shadow",{variants:{variant:{default:"bg-card",bordered:"border bg-card hover:shadow-md",elevated:"bg-card shadow-sm hover:shadow-lg",minimal:"bg-transparent"}},defaultVariants:{variant:"bordered"}}),Ka=o.forwardRef(({className:t,variant:e,href:a,children:s,...l},i)=>{const c=a?"a":"article";return r.jsx(c,{ref:i,href:a,className:n(Fs({variant:e}),t),...l,children:s})});Ka.displayName="BlogCard";const Za=o.forwardRef(({className:t,aspectRatio:e="video",alt:a,...s},l)=>r.jsx("div",{ref:l,className:n("relative overflow-hidden bg-muted",e==="video"&&"aspect-video",e==="square"&&"aspect-square",e==="wide"&&"aspect-[2/1]",t),children:s.src&&r.jsx("img",{alt:a,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",...s})}));Za.displayName="BlogCardImage";const er=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-1 flex-col p-4 md:p-6",t),...e}));er.displayName="BlogCardContent";const tr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",t),...e}));tr.displayName="BlogCardMeta";const ar=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("inline-flex items-center rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary",t),...e}));ar.displayName="BlogCardCategory";const rr=o.forwardRef(({className:t,...e},a)=>r.jsx("time",{ref:a,className:n("text-muted-foreground",t),...e}));rr.displayName="BlogCardDate";const or=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("text-muted-foreground",t),...e}));or.displayName="BlogCardReadTime";const sr=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-lg font-semibold leading-tight text-foreground transition-colors group-hover:text-primary",t),...e}));sr.displayName="BlogCardTitle";const nr=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-2 line-clamp-2 text-sm text-muted-foreground",t),...e}));nr.displayName="BlogCardExcerpt";const lr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-auto flex items-center gap-3 pt-4",t),...e}));lr.displayName="BlogCardFooter";const ir=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex items-center gap-3",t),...e}));ir.displayName="BlogCardAuthor";const dr=o.forwardRef(({className:t,alt:e,fallback:a,...s},l)=>r.jsx("div",{ref:l,className:n("h-8 w-8 overflow-hidden rounded-full bg-muted",t),children:s.src?r.jsx("img",{alt:e,className:"h-full w-full object-cover",...s}):r.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm font-medium text-muted-foreground",children:a||(e==null?void 0:e.charAt(0).toUpperCase())})}));dr.displayName="BlogCardAuthorAvatar";const cr=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("text-sm font-medium text-foreground",t),...e}));cr.displayName="BlogCardAuthorName";const mr=o.forwardRef(({className:t,children:e,...a},s)=>r.jsxs("span",{ref:s,className:n("ml-auto inline-flex items-center gap-1 text-sm font-medium text-primary transition-colors group-hover:underline",t),...a,children:[e||"Read more",r.jsx("svg",{className:"h-4 w-4 transition-transform group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}));mr.displayName="BlogCardLink";const fr=o.forwardRef(({className:t,href:e,children:a,...s},l)=>{const i=e?"a":"article";return r.jsx(i,{ref:l,href:e,className:n("group grid overflow-hidden rounded-lg border bg-card md:grid-cols-2",t),...s,children:a})});fr.displayName="BlogCardFeatured";const Ms=v.cva("grid gap-4",{variants:{columns:{2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",auto:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}},defaultVariants:{columns:"auto"}}),ur=o.forwardRef(({className:t,columns:e,...a},s)=>r.jsx("div",{ref:s,className:n(Ms({columns:e}),t),...a}));ur.displayName="BentoGrid";const Ls=v.cva("group relative overflow-hidden rounded-xl border bg-card p-6 transition-all",{variants:{variant:{default:"hover:shadow-lg",ghost:"border-transparent bg-muted/50 hover:bg-muted",gradient:"border-transparent bg-gradient-to-br from-primary/10 to-primary/5"},size:{default:"",lg:"p-8"},span:{1:"col-span-1",2:"col-span-1 md:col-span-2",3:"col-span-1 md:col-span-2 lg:col-span-3",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-1 md:row-span-2"}},defaultVariants:{variant:"default",size:"default",span:1,rowSpan:1}}),xr=o.forwardRef(({className:t,variant:e,size:a,span:s,rowSpan:l,href:i,children:c,...d},m)=>{const u=r.jsx("div",{ref:m,className:n(Ls({variant:e,size:a,span:s,rowSpan:l}),t),...d,children:c});return i?r.jsx("a",{href:i,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:u}):u});xr.displayName="BentoCard";const pr=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("div",{ref:s,className:n("mb-4 inline-flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary",t),...a,children:e}));pr.displayName="BentoCardIcon";const gr=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-lg font-semibold text-foreground transition-colors group-hover:text-primary",t),...e}));gr.displayName="BentoCardTitle";const hr=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-2 text-sm text-muted-foreground",t),...e}));hr.displayName="BentoCardDescription";const vr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-4",t),...e}));vr.displayName="BentoCardContent";const Nr=o.forwardRef(({className:t,src:e,alt:a,children:s,...l},i)=>r.jsx("div",{ref:i,className:n("absolute inset-0 -z-10 opacity-10 transition-opacity group-hover:opacity-20",t),...l,children:e?r.jsx("img",{src:e,alt:a||"",className:"h-full w-full object-cover"}):s}));Nr.displayName="BentoCardImage";const wr=o.forwardRef(({className:t,...e},a)=>r.jsx("span",{ref:a,className:n("absolute right-4 top-4 inline-flex items-center rounded-full bg-primary px-2.5 py-0.5 text-xs font-medium text-primary-foreground",t),...e}));wr.displayName="BentoCardBadge";const yr=o.forwardRef(({className:t,children:e,...a},s)=>r.jsxs("div",{ref:s,className:n("mt-4 inline-flex items-center gap-1 text-sm font-medium text-primary transition-colors",t),...a,children:[e||"Learn more",r.jsx("svg",{className:"h-4 w-4 transition-transform group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}));yr.displayName="BentoCardLink";const br=o.forwardRef(({className:t,layout:e="default",...a},s)=>{const l={default:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",asymmetric:"grid-cols-1 md:grid-cols-3 lg:grid-cols-4",featured:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 auto-rows-[minmax(200px,1fr)]"};return r.jsx("div",{ref:s,className:n("grid gap-4",l[e],t),...a})});br.displayName="BentoGridPreset";const Is=v.cva("flex items-center gap-3",{variants:{size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{size:"default"}}),jr=o.forwardRef(({className:t,size:e,...a},s)=>r.jsx("div",{ref:s,className:n(Is({size:e}),t),...a}));jr.displayName="SocialProof";const Cr=o.forwardRef(({className:t,max:e=5,total:a,size:s="default",children:l,...i},c)=>{const d={sm:"h-6 w-6 -ml-2 first:ml-0",default:"h-8 w-8 -ml-3 first:ml-0",lg:"h-10 w-10 -ml-4 first:ml-0"},m=o.Children.toArray(l),u=m.slice(0,e),g=a?a-e:m.length-e;return r.jsxs("div",{ref:c,className:n("flex items-center",t),...i,children:[u.map((h,p)=>r.jsx("div",{className:n("relative inline-block overflow-hidden rounded-full border-2 border-background bg-muted",d[s]),style:{zIndex:e-p},children:h},p)),g>0&&r.jsxs("div",{className:n("relative inline-flex items-center justify-center rounded-full border-2 border-background bg-muted text-xs font-medium text-muted-foreground",d[s]),children:["+",g]})]})});Cr.displayName="AvatarStack";const Rr=o.forwardRef(({className:t,rating:e,reviewCount:a,size:s="default",showValue:l=!0,...i},c)=>{const d={sm:"h-3 w-3",default:"h-4 w-4",lg:"h-5 w-5"},m=Math.floor(e),u=e%1>=.5,g=5-m-(u?1:0);return r.jsxs("div",{ref:c,className:n("flex items-center gap-1",t),...i,children:[r.jsxs("div",{className:"flex gap-0.5",children:[Array.from({length:m}).map((h,p)=>r.jsx("svg",{className:n(d[s],"text-yellow-400"),fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})},`full-${p}`)),u&&r.jsxs("svg",{className:n(d[s],"text-yellow-400"),fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("defs",{children:r.jsxs("linearGradient",{id:"half-star",children:[r.jsx("stop",{offset:"50%",stopColor:"currentColor"}),r.jsx("stop",{offset:"50%",stopColor:"#e5e7eb"})]})}),r.jsx("path",{fill:"url(#half-star)",d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})]}),Array.from({length:g}).map((h,p)=>r.jsx("svg",{className:n(d[s],"text-gray-200"),fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})},`empty-${p}`))]}),l&&r.jsx("span",{className:"font-medium",children:e.toFixed(1)}),a!==void 0&&r.jsxs("span",{className:"text-muted-foreground",children:["(",a.toLocaleString()," reviews)"]})]})});Rr.displayName="StarRating";const Sr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-wrap items-center gap-4",t),...e}));Sr.displayName="TrustBadges";const kr=o.forwardRef(({className:t,icon:e,label:a,...s},l)=>r.jsxs("div",{ref:l,className:n("flex items-center gap-2 text-sm text-muted-foreground",t),...s,children:[e||r.jsx("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),r.jsx("span",{children:a})]}));kr.displayName="TrustBadge";const Tr=o.forwardRef(({className:t,count:e,label:a="happy customers",size:s="default",...l},i)=>{const c={sm:"text-sm",default:"text-base",lg:"text-lg"};return r.jsxs("div",{ref:i,className:n("flex items-center gap-2",c[s],t),...l,children:[r.jsxs("span",{className:"font-bold",children:[e.toLocaleString(),"+"]}),r.jsx("span",{className:"text-muted-foreground",children:a})]})});Tr.displayName="CustomerCount";const Ar=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-wrap items-center justify-center gap-6 border-y bg-muted/50 py-4 md:gap-12",t),...e}));Ar.displayName="SocialProofBanner";const Br=o.forwardRef(({className:t,title:e="Featured in",children:a,...s},l)=>r.jsxs("div",{ref:l,className:n("text-center",t),...s,children:[r.jsx("p",{className:"mb-6 text-sm font-medium uppercase tracking-wider text-muted-foreground",children:e}),r.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 opacity-60 grayscale",children:a})]}));Br.displayName="FeaturedIn";const pe=v.cva("relative overflow-hidden bg-black",{variants:{rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},aspectRatio:{video:"aspect-video",square:"aspect-square","4/3":"aspect-[4/3]","21/9":"aspect-[21/9]",auto:""}},defaultVariants:{rounded:"lg",aspectRatio:"video"}}),ge=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,src:l,poster:i,showControls:c=!0,showPlayButton:d=!0,autoPlay:m=!1,muted:u=!1,loop:g=!1,playsInline:h=!0,...p},x)=>{const N=o.useRef(null),[b,j]=o.useState(m),[R,F]=o.useState(!m),M=o.useCallback(B=>{N.current=B,typeof x=="function"?x(B):x&&(x.current=B)},[x]),T=()=>{N.current&&(N.current.play(),j(!0),F(!1))},G=()=>{N.current&&(N.current.pause(),j(!1))},A=()=>{b?G():T()};return r.jsxs("div",{className:n(pe({rounded:a,aspectRatio:s}),e),children:[r.jsx("video",{ref:M,src:l,poster:i,autoPlay:m,muted:u,loop:g,playsInline:h,controls:c&&b,onClick:A,onEnded:()=>j(!1),className:n("h-full w-full object-cover",t),...p}),d&&R&&r.jsx("button",{onClick:T,className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity hover:bg-black/40","aria-label":"Play video",children:r.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-white/90 text-black shadow-lg transition-transform hover:scale-110 md:h-20 md:w-20",children:r.jsx("svg",{className:"ml-1 h-8 w-8 md:h-10 md:w-10",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})})})]})});ge.displayName="VideoPlayer";const Fr=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,videoId:l,autoPlay:i=!1,title:c="YouTube video",...d},m)=>{const[u,g]=o.useState(!1);return r.jsxs("div",{className:n(pe({rounded:a,aspectRatio:s}),e),children:[!u&&r.jsx("button",{onClick:()=>g(!0),className:"absolute inset-0 flex items-center justify-center",style:{backgroundImage:`url(https://img.youtube.com/vi/${l}/maxresdefault.jpg)`,backgroundSize:"cover",backgroundPosition:"center"},"aria-label":"Play YouTube video",children:r.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-white shadow-lg transition-transform hover:scale-110 md:h-20 md:w-20",children:r.jsx("svg",{className:"ml-1 h-8 w-8 md:h-10 md:w-10",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})})}),u&&r.jsx("iframe",{ref:m,src:`https://www.youtube.com/embed/${l}?autoplay=${i?1:0}&rel=0`,title:c,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:n("h-full w-full",t),...d})]})});Fr.displayName="YouTubeEmbed";const Mr=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,videoId:l,autoPlay:i=!1,title:c="Vimeo video",...d},m)=>r.jsx("div",{className:n(pe({rounded:a,aspectRatio:s}),e),children:r.jsx("iframe",{ref:m,src:`https://player.vimeo.com/video/${l}?autoplay=${i?1:0}`,title:c,allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,className:n("h-full w-full",t),...d})}));Mr.displayName="VimeoEmbed";const Lr=o.forwardRef(({src:t,isOpen:e,onClose:a,title:s="Video"},l)=>(o.useEffect(()=>{const i=c=>{c.key==="Escape"&&a()};return e&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow=""}},[e,a]),e?r.jsx("div",{ref:l,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:a,children:r.jsxs("div",{className:"relative w-full max-w-4xl",onClick:i=>i.stopPropagation(),children:[r.jsx("button",{onClick:a,className:"absolute -top-12 right-0 text-white hover:text-gray-300","aria-label":"Close video",children:r.jsx("svg",{className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),r.jsx(ge,{src:t,autoPlay:!0,showPlayButton:!1,className:"w-full"})]})}):null));Lr.displayName="VideoModal";const he=v.cva("relative overflow-hidden bg-muted",{variants:{rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},aspectRatio:{auto:"",video:"aspect-video",square:"aspect-square","4/3":"aspect-[4/3]","3/2":"aspect-[3/2]"}},defaultVariants:{rounded:"lg",aspectRatio:"video"}}),Ir=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,apiKey:l,query:i,zoom:c=15,mapType:d="roadmap",title:m="Google Map",...u},g)=>{const h=encodeURIComponent(i),p=l?`https://www.google.com/maps/embed/v1/place?key=${l}&q=${h}&zoom=${c}&maptype=${d}`:`https://maps.google.com/maps?q=${h}&t=&z=${c}&ie=UTF8&iwloc=&output=embed`;return r.jsx("div",{className:n(he({rounded:a,aspectRatio:s}),e),children:r.jsx("iframe",{ref:g,src:p,title:m,allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",className:n("h-full w-full border-0",t),...u})})});Ir.displayName="GoogleMapEmbed";const Er=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,lat:l,lng:i,zoom:c=15,marker:d,title:m="OpenStreetMap",...u},g)=>{const h=Es(l,i,c),p=d?`&marker=${l}%2C${i}`:"",x=`https://www.openstreetmap.org/export/embed.html?bbox=${h.west}%2C${h.south}%2C${h.east}%2C${h.north}&layer=mapnik${p}`;return r.jsx("div",{className:n(he({rounded:a,aspectRatio:s}),e),children:r.jsx("iframe",{ref:g,src:x,title:m,loading:"lazy",className:n("h-full w-full border-0",t),...u})})});Er.displayName="OpenStreetMapEmbed";function Es(t,e,a){const s=.01*(20-a);return{west:e-s,east:e+s,north:t+s,south:t-s}}const Vr=o.forwardRef(({className:t,containerClassName:e,rounded:a,aspectRatio:s,lat:l,lng:i,zoom:c=15,width:d=600,height:m=400,alt:u="Map",...g},h)=>{const p=Math.floor((i+180)/360*Math.pow(2,c)),x=Math.floor((1-Math.log(Math.tan(l*Math.PI/180)+1/Math.cos(l*Math.PI/180))/Math.PI)/2*Math.pow(2,c)),N=`https://tile.openstreetmap.org/${c}/${p}/${x}.png`;return r.jsx("div",{className:n(he({rounded:a,aspectRatio:s}),e),children:r.jsx("img",{ref:h,src:N,alt:u,className:n("h-full w-full object-cover",t),...g})})});Vr.displayName="StaticMap";const Pr=o.forwardRef(({className:t,address:e,phone:a,email:s,hours:l,directionsUrl:i,children:c,...d},m)=>r.jsxs("div",{ref:m,className:n("relative",t),...d,children:[c,r.jsx("div",{className:"absolute bottom-4 left-4 right-4 rounded-lg border bg-card p-4 shadow-lg sm:left-auto sm:right-4 sm:max-w-xs",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsxs("svg",{className:"mt-0.5 h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),r.jsx("p",{className:"text-sm text-foreground",children:e})]}),a&&r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),r.jsx("a",{href:`tel:${a}`,className:"text-sm text-foreground hover:underline",children:a})]}),s&&r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),r.jsx("a",{href:`mailto:${s}`,className:"text-sm text-foreground hover:underline",children:s})]}),l&&r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),r.jsx("p",{className:"text-sm text-muted-foreground",children:l})]}),i&&r.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex w-full items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Get Directions",r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})})]}));Pr.displayName="MapWithInfo";const Vs=v.cva("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",dark:"bg-zinc-900 text-white",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),Dr=o.forwardRef(({className:t,variant:e,size:a,children:s,...l},i)=>r.jsx("section",{ref:i,className:n(Vs({variant:e,size:a}),t),...l,children:r.jsx("div",{className:"container mx-auto px-4",children:s})}));Dr.displayName="AppDownloadSection";const zr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("grid items-center gap-8 md:grid-cols-2 md:gap-12",t),...e}));zr.displayName="AppDownloadContent";const Hr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-6",t),...e}));Hr.displayName="AppDownloadInfo";const Gr=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));Gr.displayName="AppDownloadTitle";const _r=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-lg opacity-90",t),...e}));_r.displayName="AppDownloadDescription";const Qr=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-wrap gap-4",t),...e}));Qr.displayName="AppDownloadButtons";const qr=v.cva("inline-flex items-center gap-3 rounded-lg px-4 py-3 transition-transform hover:scale-105",{variants:{variant:{apple:"bg-black text-white",google:"bg-black text-white",custom:""}},defaultVariants:{variant:"apple"}}),$r=o.forwardRef(({className:t,variant:e,href:a,...s},l)=>r.jsxs("a",{ref:l,href:a,target:"_blank",rel:"noopener noreferrer",className:n(qr({variant:e}),t),...s,children:[r.jsx("svg",{className:"h-8 w-8",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("div",{className:"text-xs opacity-80",children:"Download on the"}),r.jsx("div",{className:"text-lg font-semibold leading-tight",children:"App Store"})]})]}));$r.displayName="AppStoreBadge";const Or=o.forwardRef(({className:t,href:e,...a},s)=>r.jsxs("a",{ref:s,href:e,target:"_blank",rel:"noopener noreferrer",className:n(qr({variant:"google"}),t),...a,children:[r.jsx("svg",{className:"h-8 w-8",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3 20.5v-17c0-.59.34-1.11.84-1.35L13.69 12l-9.85 9.85c-.5-.25-.84-.76-.84-1.35m13.81-5.38L6.05 21.34l8.49-8.49 2.27 2.27m3.35-4.31c.34.27.59.69.59 1.19s-.22.9-.57 1.18l-2.29 1.32-2.5-2.5 2.5-2.5 2.27 1.31M6.05 2.66l10.76 6.22-2.27 2.27-8.49-8.49z"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("div",{className:"text-xs opacity-80",children:"Get it on"}),r.jsx("div",{className:"text-lg font-semibold leading-tight",children:"Google Play"})]})]}));Or.displayName="GooglePlayBadge";const Ur=o.forwardRef(({className:t,children:e,...a},s)=>r.jsx("div",{ref:s,className:n("flex justify-center",t),...a,children:e}));Ur.displayName="AppDownloadMockup";const Wr=o.forwardRef(({className:t,screenshot:e,alt:a="App screenshot",children:s,...l},i)=>r.jsxs("div",{ref:i,className:n("relative mx-auto h-[500px] w-[250px] rounded-[2.5rem] border-[8px] border-gray-800 bg-gray-800 shadow-xl",t),...l,children:[r.jsx("div",{className:"absolute left-1/2 top-0 z-10 h-6 w-24 -translate-x-1/2 rounded-b-xl bg-gray-800"}),r.jsx("div",{className:"h-full w-full overflow-hidden rounded-[2rem] bg-white",children:e?r.jsx("img",{src:e,alt:a,className:"h-full w-full object-cover"}):s}),r.jsx("div",{className:"absolute -left-[10px] top-24 h-8 w-1 rounded-l bg-gray-800"}),r.jsx("div",{className:"absolute -left-[10px] top-36 h-14 w-1 rounded-l bg-gray-800"}),r.jsx("div",{className:"absolute -left-[10px] top-52 h-14 w-1 rounded-l bg-gray-800"}),r.jsx("div",{className:"absolute -right-[10px] top-32 h-16 w-1 rounded-r bg-gray-800"})]}));Wr.displayName="PhoneMockup";const Xr=o.forwardRef(({className:t,label:e="Scan to download",children:a,...s},l)=>r.jsxs("div",{ref:l,className:n("text-center",t),...s,children:[r.jsx("div",{className:"mx-auto mb-2 h-32 w-32 rounded-lg border bg-white p-2",children:a}),r.jsx("p",{className:"text-sm text-muted-foreground",children:e})]}));Xr.displayName="AppQRCode";const Ps=v.cva("inline-block bg-clip-text text-transparent",{variants:{gradient:{primary:"bg-gradient-to-r from-primary to-primary/60",secondary:"bg-gradient-to-r from-secondary to-secondary/60",rainbow:"bg-gradient-to-r from-red-500 via-yellow-500 via-green-500 via-blue-500 to-purple-500",sunset:"bg-gradient-to-r from-orange-500 via-pink-500 to-purple-500",ocean:"bg-gradient-to-r from-cyan-500 via-blue-500 to-indigo-500",forest:"bg-gradient-to-r from-green-500 via-emerald-500 to-teal-500",fire:"bg-gradient-to-r from-yellow-500 via-orange-500 to-red-500",aurora:"bg-gradient-to-r from-green-400 via-cyan-500 to-purple-500",neon:"bg-gradient-to-r from-pink-500 via-purple-500 to-cyan-500",gold:"bg-gradient-to-r from-yellow-400 via-amber-500 to-orange-500",silver:"bg-gradient-to-r from-slate-300 via-slate-400 to-slate-500",custom:""},animate:{none:"",shimmer:"animate-gradient-shimmer bg-[length:200%_auto]",pulse:"animate-pulse"}},defaultVariants:{gradient:"primary",animate:"none"}});function ve({className:t,gradient:e,animate:a,customGradient:s,as:l="span",...i}){return r.jsx(l,{className:n(Ps({gradient:e,animate:a}),e==="custom"&&s&&`bg-gradient-to-r ${s}`,t),...i})}ve.displayName="GradientText";function Yr({className:t,level:e=1,...a}){const s={1:"font-heading text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl",2:"font-heading text-3xl font-bold tracking-tight sm:text-4xl",3:"font-heading text-2xl font-bold tracking-tight sm:text-3xl",4:"font-heading text-xl font-bold tracking-tight sm:text-2xl",5:"font-heading text-lg font-bold tracking-tight",6:"font-heading text-base font-bold tracking-tight"},l=`h${e}`;return r.jsx(ve,{as:l,className:n(s[e],t),...a})}Yr.displayName="GradientHeading";const Jr=o.forwardRef(({className:t,gradient:e="from-primary via-purple-500 to-pink-500",borderWidth:a=2,children:s,...l},i)=>r.jsx("div",{ref:i,className:n("relative rounded-lg p-[2px]",`bg-gradient-to-r ${e}`,t),style:{padding:`${a}px`},...l,children:r.jsx("div",{className:"h-full w-full rounded-[calc(0.5rem-2px)] bg-background",children:s})}));Jr.displayName="GradientBorder";const Kr=o.forwardRef(({className:t,gradient:e="from-primary/20 via-purple-500/20 to-pink-500/20",animate:a=!0,...s},l)=>r.jsx("div",{ref:l,className:n("absolute inset-0 -z-10",`bg-gradient-to-r ${e}`,a&&"animate-gradient-shift bg-[length:200%_200%]",t),...s}));Kr.displayName="GradientBackground";const Zr=o.forwardRef(({className:t,gradient:e="from-transparent via-primary to-transparent",...a},s)=>r.jsx("div",{ref:s,className:n("h-px w-full",`bg-gradient-to-r ${e}`,t),...a}));Zr.displayName="GradientDivider";const eo=o.forwardRef(({className:t,color:e="bg-primary/30",size:a="lg",blur:s="xl",...l},i)=>{const c={sm:"h-32 w-32",md:"h-64 w-64",lg:"h-96 w-96",xl:"h-[32rem] w-[32rem]"},d={sm:"blur-2xl",md:"blur-3xl",lg:"blur-[100px]",xl:"blur-[200px]"};return r.jsx("div",{ref:i,className:n("absolute rounded-full",c[a],d[s],e,t),...l})});eo.displayName="GradientBlob";const Ds=v.cva("w-full overflow-hidden",{variants:{variant:{default:"",fade:"[mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)]"}},defaultVariants:{variant:"fade"}}),to=o.forwardRef(({className:t,variant:e,duration:a=40,direction:s="left",pauseOnHover:l=!0,gap:i=16,children:c,...d},m)=>r.jsx("div",{ref:m,className:n(Ds({variant:e}),t),...d,children:r.jsxs("div",{className:n("flex w-max animate-marquee",l&&"hover:[animation-play-state:paused]"),style:{gap:`${i}px`,animationDuration:`${a}s`,animationDirection:s==="right"?"reverse":"normal"},children:[c,r.jsx("div",{className:"flex",style:{gap:`${i}px`},"aria-hidden":!0,children:c})]})}));to.displayName="Marquee";const ao=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex shrink-0 items-center",t),...e}));ao.displayName="MarqueeItem";const zs=v.cva("h-full overflow-hidden",{variants:{variant:{default:"",fade:"[mask-image:linear-gradient(to_bottom,transparent,black_10%,black_90%,transparent)]"}},defaultVariants:{variant:"fade"}}),ro=o.forwardRef(({className:t,variant:e,duration:a=40,direction:s="up",pauseOnHover:l=!0,gap:i=16,children:c,...d},m)=>r.jsx("div",{ref:m,className:n(zs({variant:e}),t),...d,children:r.jsxs("div",{className:n("flex h-max flex-col animate-marquee-vertical",l&&"hover:[animation-play-state:paused]"),style:{gap:`${i}px`,animationDuration:`${a}s`,animationDirection:s==="down"?"reverse":"normal"},children:[c,r.jsx("div",{className:"flex flex-col",style:{gap:`${i}px`},"aria-hidden":!0,children:c})]})}));ro.displayName="VerticalMarquee";const oo=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("w-80 shrink-0 rounded-xl border bg-card p-6 shadow-sm",t),...e}));oo.displayName="MarqueeTestimonial";const so=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("text-sm text-muted-foreground",t),...e}));so.displayName="MarqueeTestimonialContent";const no=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-4 flex items-center gap-3",t),...e}));no.displayName="MarqueeTestimonialAuthor";const lo=o.forwardRef(({className:t,src:e,alt:a,fallback:s,...l},i)=>r.jsx("div",{ref:i,className:n("h-10 w-10 overflow-hidden rounded-full bg-muted",t),...l,children:e?r.jsx("img",{src:e,alt:a||"",className:"h-full w-full object-cover"}):r.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm font-medium text-muted-foreground",children:s||(a==null?void 0:a.charAt(0).toUpperCase())})}));lo.displayName="MarqueeTestimonialAvatar";const io=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("",t),...e}));io.displayName="MarqueeTestimonialInfo";const co=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("text-sm font-medium text-foreground",t),...e}));co.displayName="MarqueeTestimonialName";const mo=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("text-xs text-muted-foreground",t),...e}));mo.displayName="MarqueeTestimonialRole";const Hs=v.cva("tabular-nums",{variants:{size:{sm:"text-2xl font-bold",default:"text-4xl font-bold",lg:"text-5xl font-bold",xl:"text-6xl font-bold"}},defaultVariants:{size:"default"}}),Gs={linear:t=>t,easeOut:t=>1-Math.pow(1-t,3),easeInOut:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2};function _s(t,e,a,s){const l=t.toFixed(e),[i,c]=l.split("."),d=i.replace(/\B(?=(\d{3})+(?!\d))/g,a);return c?`${d}${s}${c}`:d}const Ne=o.forwardRef(({className:t,size:e,value:a,from:s=0,duration:l=2e3,prefix:i="",suffix:c="",decimals:d=0,separator:m=",",decimalSeparator:u=".",easing:g="easeOut",delay:h=0,triggerOnView:p=!0,onComplete:x,...N},b)=>{const[j,R]=o.useState(s),[F,M]=o.useState(!1),T=o.useRef(null),G=o.useCallback(B=>{T.current=B,typeof b=="function"?b(B):b&&(b.current=B)},[b]),A=o.useCallback(()=>{if(F)return;const B=performance.now(),D=Gs[g],V=K=>{const Z=K-B,_=Math.min(Z/l,1),te=D(_),L=s+(a-s)*te;R(L),_<1?requestAnimationFrame(V):(R(a),M(!0),x==null||x())};setTimeout(()=>{requestAnimationFrame(V)},h)},[a,s,l,g,h,F,x]);return o.useEffect(()=>{if(!p){A();return}const B=T.current;if(!B)return;const D=new IntersectionObserver(V=>{V[0].isIntersecting&&!F&&A()},{threshold:.1});return D.observe(B),()=>D.disconnect()},[A,p,F]),o.useEffect(()=>{M(!1),R(s)},[a,s]),r.jsxs("span",{ref:G,className:n(Hs({size:e}),t),...N,children:[i,_s(j,d,m,u),c]})});Ne.displayName="AnimatedCounter";const fo=o.forwardRef(({label:t,labelClassName:e,className:a,...s},l)=>r.jsxs("div",{ref:l,className:n("text-center",a),children:[r.jsx(Ne,{...s}),r.jsx("p",{className:n("mt-2 text-sm text-muted-foreground",e),children:t})]}));fo.displayName="CounterWithLabel";const uo=o.forwardRef(({className:t,columns:e=4,...a},s)=>{const l={2:"grid-cols-2",3:"grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 lg:grid-cols-4"};return r.jsx("div",{ref:s,className:n("grid gap-8",l[e],t),...a})});uo.displayName="CounterGrid";const xo=o.forwardRef(({className:t,targetDate:e,onComplete:a,labels:s={days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},size:l="default",...i},c)=>{const[d,m]=o.useState({days:0,hours:0,minutes:0,seconds:0});o.useEffect(()=>{const g=()=>{const p=e.getTime()-new Date().getTime();return p<=0?(a==null||a(),{days:0,hours:0,minutes:0,seconds:0}):{days:Math.floor(p/864e5),hours:Math.floor(p/36e5%24),minutes:Math.floor(p/1e3/60%60),seconds:Math.floor(p/1e3%60)}};m(g());const h=setInterval(()=>{m(g())},1e3);return()=>clearInterval(h)},[e,a]);const u={sm:{value:"text-2xl font-bold",label:"text-xs"},default:{value:"text-4xl font-bold",label:"text-sm"},lg:{value:"text-5xl font-bold",label:"text-base"}};return r.jsx("div",{ref:c,className:n("flex gap-4 md:gap-8",t),...i,children:Object.entries(d).map(([g,h])=>r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:n("tabular-nums",u[l].value),children:String(h).padStart(2,"0")}),r.jsx("div",{className:n("text-muted-foreground",u[l].label),children:s[g]})]},g))})});xo.displayName="CountdownTimer";const Qs=v.cva("fixed z-50 w-full p-4 shadow-lg transition-transform duration-300",{variants:{position:{bottom:"bottom-0 left-0",top:"top-0 left-0","bottom-left":"bottom-4 left-4 max-w-md rounded-lg","bottom-right":"bottom-4 right-4 max-w-md rounded-lg"},variant:{default:"border-t bg-background",dark:"bg-zinc-900 text-white",card:"border bg-card"}},defaultVariants:{position:"bottom",variant:"default"}}),po=o.forwardRef(({className:t,position:e,variant:a,isVisible:s=!0,children:l,...i},c)=>s?r.jsx("div",{ref:c,className:n(Qs({position:e,variant:a}),t),role:"dialog","aria-label":"Cookie consent",...i,children:r.jsx("div",{className:"container mx-auto",children:l})}):null);po.displayName="CookieBanner";const go=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-col gap-4 md:flex-row md:items-center md:justify-between",t),...e}));go.displayName="CookieBannerContent";const ho=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex-1",t),...e}));ho.displayName="CookieBannerText";const vo=o.forwardRef(({className:t,...e},a)=>r.jsx("h3",{ref:a,className:n("font-heading text-lg font-semibold",t),...e}));vo.displayName="CookieBannerTitle";const No=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-1 text-sm text-muted-foreground",t),...e}));No.displayName="CookieBannerDescription";const wo=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("flex flex-wrap items-center gap-2",t),...e}));wo.displayName="CookieBannerActions";const yo=o.forwardRef(({className:t,...e},a)=>r.jsx("a",{ref:a,className:n("text-sm text-primary underline-offset-4 hover:underline",t),...e}));yo.displayName="CookieBannerLink";const bo=o.forwardRef(({className:t,isOpen:e,onClose:a,onSave:s,children:l,...i},c)=>(o.useEffect(()=>{const d=m=>{m.key==="Escape"&&a()};return e&&(document.addEventListener("keydown",d),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}},[e,a]),e?r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:a,children:r.jsx("div",{ref:c,className:n("w-full max-w-lg rounded-lg bg-background p-6 shadow-xl",t),onClick:d=>d.stopPropagation(),role:"dialog","aria-label":"Cookie preferences",...i,children:l})}):null));bo.displayName="CookiePreferences";const jo=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mb-6",t),...e}));jo.displayName="CookiePreferencesHeader";const Co=o.forwardRef(({className:t,...e},a)=>r.jsx("h2",{ref:a,className:n("font-heading text-xl font-semibold",t),...e}));Co.displayName="CookiePreferencesTitle";const Ro=o.forwardRef(({className:t,...e},a)=>r.jsx("p",{ref:a,className:n("mt-2 text-sm text-muted-foreground",t),...e}));Ro.displayName="CookiePreferencesDescription";const So=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("space-y-4",t),...e}));So.displayName="CookiePreferencesList";const ko=o.forwardRef(({className:t,name:e,description:a,required:s=!1,checked:l=!1,onChange:i,...c},d)=>{const m=o.useId();return r.jsxs("div",{ref:d,className:n("flex items-start justify-between gap-4 rounded-lg border p-4",t),...c,children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("label",{htmlFor:m,className:"font-medium",children:[e,s&&r.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"(Required)"})]}),r.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a})]}),r.jsx("div",{className:"shrink-0",children:r.jsx("button",{id:m,type:"button",role:"switch","aria-checked":s||l,disabled:s,onClick:()=>i==null?void 0:i(!l),className:n("relative inline-flex h-6 w-11 items-center rounded-full transition-colors",s||l?"bg-primary":"bg-muted",s&&"cursor-not-allowed opacity-50"),children:r.jsx("span",{className:n("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",s||l?"translate-x-6":"translate-x-1")})})})]})});ko.displayName="CookiePreferenceItem";const To=o.forwardRef(({className:t,...e},a)=>r.jsx("div",{ref:a,className:n("mt-6 flex justify-end gap-2",t),...e}));To.displayName="CookiePreferencesFooter";const Ao=`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),T=require("react"),Ol=require("react-dom");function Dv(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const p=Dv(T),Dl=Dv(Ol);function Iv(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Iv(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pv(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Iv(t))&&(n&&(n+=" "),n+=e);return n}const Ph=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Lh=Pv,ye=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Lh(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=e,a=Object.keys(o).map(c=>{const d=r==null?void 0:r[c],f=s==null?void 0:s[c];if(d===null)return null;const h=Ph(d)||Ph(f);return o[c][h]}),i=r&&Object.entries(r).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...s,...i}[g]):{...s,...i}[g]===y})?[...c,f,h]:c},[]);return Lh(t,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},of="-",yT=t=>{const e=xT(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:a=>{const i=a.split(of);return i[0]===""&&i.length!==1&&i.shift(),Lv(i,e)||bT(a)},getConflictingClassGroupIds:(a,i)=>{const l=r[a]||[];return i&&n[a]?[...l,...n[a]]:l}}},Lv=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),o=n?Lv(t.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=t.join(of);return(a=e.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},Fh=/^\[(.+)\]$/,bT=t=>{if(Fh.test(t)){const e=Fh.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},xT=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return kT(Object.entries(t.classGroups),r).forEach(([s,a])=>{Hd(a,n,s,e)}),n},Hd=(t,e,r,n)=>{t.forEach(o=>{if(typeof o=="string"){const s=o===""?e:_h(e,o);s.classGroupId=r;return}if(typeof o=="function"){if(wT(o)){Hd(o(n),e,r,n);return}e.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Hd(a,_h(e,s),r,n)})})},_h=(t,e)=>{let r=t;return e.split(of).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},wT=t=>t.isThemeGetter,kT=(t,e)=>e?t.map(([r,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[e+a,i])):s);return[r,o]}):t,NT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),e++,e>t&&(e=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Fv="!",CT=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,o=e[0],s=e.length,a=i=>{const l=[];let c=0,d=0,f;for(let y=0;y<i.length;y++){let b=i[y];if(c===0){if(b===o&&(n||i.slice(y,y+s)===e)){l.push(i.slice(d,y)),d=y+s;continue}if(b==="/"){f=y;continue}}b==="["?c++:b==="]"&&c--}const h=l.length===0?i:i.substring(d),m=h.startsWith(Fv),v=m?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return r?i=>r({className:i,parseClassName:a}):a},ST=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},MT=t=>({cache:NT(t.cacheSize),parseClassName:CT(t),...yT(t)}),ET=/\s+/,jT=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=[],a=t.trim().split(ET);let i="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=r(c);let v=!!m,g=n(v?h.substring(0,m):h);if(!g){if(!v){i=c+(i.length>0?" "+i:i);continue}if(g=n(h),!g){i=c+(i.length>0?" "+i:i);continue}v=!1}const y=ST(d).join(":"),b=f?y+Fv:y,x=b+g;if(s.includes(x))continue;s.push(x);const w=o(g,v);for(let k=0;k<w.length;++k){const N=w[k];s.push(b+N)}i=c+(i.length>0?" "+i:i)}return i};function RT(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=_v(e))&&(n&&(n+=" "),n+=r);return n}const _v=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=_v(t[n]))&&(r&&(r+=" "),r+=e);return r};function TT(t,...e){let r,n,o,s=a;function a(l){const c=e.reduce((d,f)=>f(d),t());return r=MT(c),n=r.cache.get,o=r.cache.set,s=i,i(l)}function i(l){const c=n(l);if(c)return c;const d=jT(l,r);return o(l,d),d}return function(){return s(RT.apply(null,arguments))}}const Ee=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},zv=/^\[(?:([a-z-]+):)?(.+)\]$/i,AT=/^\d+\/\d+$/,OT=new Set(["px","full","screen"]),DT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IT=/\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$/,PT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=t=>Eo(t)||OT.has(t)||AT.test(t),Gr=t=>Yo(t,"length",UT),Eo=t=>!!t&&!Number.isNaN(Number(t)),Uc=t=>Yo(t,"number",Eo),ds=t=>!!t&&Number.isInteger(Number(t)),_T=t=>t.endsWith("%")&&Eo(t.slice(0,-1)),he=t=>zv.test(t),qr=t=>DT.test(t),zT=new Set(["length","size","percentage"]),BT=t=>Yo(t,zT,Bv),$T=t=>Yo(t,"position",Bv),HT=new Set(["image","url"]),VT=t=>Yo(t,HT,qT),WT=t=>Yo(t,"",GT),us=()=>!0,Yo=(t,e,r)=>{const n=zv.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},UT=t=>IT.test(t)&&!PT.test(t),Bv=()=>!1,GT=t=>LT.test(t),qT=t=>FT.test(t),KT=()=>{const t=Ee("colors"),e=Ee("spacing"),r=Ee("blur"),n=Ee("brightness"),o=Ee("borderColor"),s=Ee("borderRadius"),a=Ee("borderSpacing"),i=Ee("borderWidth"),l=Ee("contrast"),c=Ee("grayscale"),d=Ee("hueRotate"),f=Ee("invert"),h=Ee("gap"),m=Ee("gradientColorStops"),v=Ee("gradientColorStopPositions"),g=Ee("inset"),y=Ee("margin"),b=Ee("opacity"),x=Ee("padding"),w=Ee("saturate"),k=Ee("scale"),N=Ee("sepia"),S=Ee("skew"),C=Ee("space"),M=Ee("translate"),E=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",he,e],D=()=>[he,e],q=()=>["",jr,Gr],F=()=>["auto",Eo,he],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",he],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Eo,he];return{cacheSize:500,separator:":",theme:{colors:[us],spacing:[jr,Gr],blur:["none","",qr,he],brightness:G(),borderColor:[t],borderRadius:["none","","full",qr,he],borderSpacing:D(),borderWidth:q(),contrast:G(),grayscale:z(),hueRotate:G(),invert:z(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[_T,Gr],inset:O(),margin:O(),opacity:G(),padding:D(),saturate:G(),scale:G(),sepia:z(),skew:G(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[qr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:[...$(),he]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ds,he]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",ds,he]}],"grid-cols":[{"grid-cols":[us]}],"col-start-end":[{col:["auto",{span:["full",ds,he]},he]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[us]}],"row-start-end":[{row:["auto",{span:[ds,he]},he]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,e]}],"min-w":[{"min-w":[he,e,"min","max","fit"]}],"max-w":[{"max-w":[he,e,"none","full","min","max","fit","prose",{screen:[qr]},qr]}],h:[{h:[he,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,e,"auto","min","max","fit"]}],"font-size":[{text:["base",qr,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uc]}],"font-family":[{font:[us]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",Eo,Uc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jr,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jr,Gr]}],"underline-offset":[{"underline-offset":["auto",jr,he]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),$T]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},VT]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[jr,he]}],"outline-w":[{outline:[jr,Gr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[jr,Gr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",qr,WT]}],"shadow-color":[{shadow:[us]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qr,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[ds,he]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",t]}],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",he]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",he]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[jr,Gr,Uc]}],stroke:[{stroke:[t,"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"]}}},YT=TT(KT);function j(...t){return YT(Pv(t))}const JT=ye("relative flex flex-col items-center justify-center overflow-hidden",{variants:{size:{sm:"min-h-[40vh] py-16",default:"min-h-[60vh] py-20",lg:"min-h-[80vh] py-24",full:"min-h-screen py-24"},align:{left:"items-start text-left",center:"items-center text-center",right:"items-end text-right"}},defaultVariants:{size:"default",align:"center"}}),$v=p.forwardRef(({className:t,size:e,align:r,backgroundImage:n,backgroundOverlay:o=!0,overlayOpacity:s=.5,children:a,style:i,...l},c)=>u.jsxs("section",{ref:c,className:j(JT({size:e,align:r}),t),style:{...i,backgroundImage:n?`url(${n})`:void 0,backgroundSize:"cover",backgroundPosition:"center"},...l,children:[n&&o&&u.jsx("div",{className:"absolute inset-0 bg-background",style:{opacity:s}}),u.jsx("div",{className:j("container relative z-10 mx-auto px-4",r==="center"&&"flex flex-col items-center"),children:a})]}));$v.displayName="Hero";const Hv=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("mb-4 inline-flex items-center rounded-full border bg-muted px-4 py-1.5 text-sm font-medium text-muted-foreground",t),...e}));Hv.displayName="HeroBadge";const Vv=p.forwardRef(({className:t,...e},r)=>u.jsx("h1",{ref:r,className:j("max-w-4xl font-heading text-4xl font-bold tracking-tight text-foreground sm:text-5xl md:text-6xl lg:text-7xl",t),...e}));Vv.displayName="HeroTitle";const Wv=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-6 max-w-2xl text-lg text-muted-foreground sm:text-xl md:text-2xl",t),...e}));Wv.displayName="HeroSubtitle";const Uv=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-8 flex flex-wrap items-center justify-center gap-4",t),...e}));Uv.displayName="HeroActions";const Gv=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("div",{ref:n,className:j("mt-12 w-full max-w-5xl",t),...r,children:e}));Gv.displayName="HeroImage";const XT=ye("flex flex-col gap-6 py-12 md:py-16 lg:py-20",{variants:{layout:{default:"items-center text-center",left:"items-start text-left",right:"items-end text-right"},size:{sm:"max-w-xl",default:"max-w-2xl",lg:"max-w-3xl",xl:"max-w-4xl",full:"max-w-full"}},defaultVariants:{layout:"default",size:"default"}}),qv=p.forwardRef(({className:t,layout:e,size:r,container:n=!0,children:o,...s},a)=>u.jsx("section",{ref:a,className:j(n&&"container mx-auto px-4",t),...s,children:u.jsx("div",{className:j(XT({layout:e,size:r}),e==="default"&&"mx-auto"),children:o})}));qv.displayName="ContentSpot";const Kv=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("text-sm font-semibold uppercase tracking-wider text-primary",t),...e}));Kv.displayName="ContentSpotEyebrow";const Yv=p.forwardRef(({className:t,as:e="h2",...r},n)=>u.jsx(e,{ref:n,className:j("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl lg:text-5xl",t),...r}));Yv.displayName="ContentSpotTitle";const Jv=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-lg text-muted-foreground sm:text-xl",t),...e}));Jv.displayName="ContentSpotDescription";const Xv=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-wrap items-center gap-4",t),...e}));Xv.displayName="ContentSpotActions";const ZT=ye("py-12 md:py-16 lg:py-20",{variants:{layout:{grid:"",imageLeft:"",imageRight:""}},defaultVariants:{layout:"grid"}}),Zv=p.forwardRef(({className:t,layout:e,container:r=!0,children:n,...o},s)=>u.jsx("section",{ref:s,className:j(ZT({layout:e}),r&&"container mx-auto px-4",t),...o,children:n}));Zv.displayName="FeatureSpot";const Qv=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mx-auto mb-12 max-w-2xl text-center",t),...e}));Qv.displayName="FeatureSpotHeader";const ey=p.forwardRef(({className:t,as:e="h2",...r},n)=>u.jsx(e,{ref:n,className:j("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...r}));ey.displayName="FeatureSpotTitle";const ty=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-4 text-lg text-muted-foreground",t),...e}));ty.displayName="FeatureSpotDescription";const ry=p.forwardRef(({className:t,columns:e=3,...r},n)=>{const o={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return u.jsx("div",{ref:n,className:j("grid gap-8",o[e],t),...r})});ry.displayName="FeatureSpotGrid";const ny=p.forwardRef(({className:t,icon:e,children:r,...n},o)=>u.jsxs("div",{ref:o,className:j("flex flex-col gap-4",t),...n,children:[e&&u.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e}),r]}));ny.displayName="FeatureSpotItem";const oy=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-lg font-semibold text-foreground",t),...e}));oy.displayName="FeatureSpotItemTitle";const sy=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-muted-foreground",t),...e}));sy.displayName="FeatureSpotItemDescription";const ay=p.forwardRef(({className:t,reverse:e=!1,...r},n)=>u.jsx("div",{ref:n,className:j("grid items-center gap-8 md:grid-cols-2 md:gap-12 lg:gap-16",e&&"md:[&>*:first-child]:order-2",t),...r}));ay.displayName="FeatureSpotSplit";const iy=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-col gap-6",t),...e}));iy.displayName="FeatureSpotContent";const ly=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("relative overflow-hidden rounded-xl",t),...e}));ly.displayName="FeatureSpotMedia";const QT=ye("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground",dark:"bg-zinc-900 text-white",bordered:"border-y bg-background"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),cy=p.forwardRef(({className:t,variant:e,size:r,children:n,...o},s)=>u.jsx("section",{ref:s,className:j(QT({variant:e,size:r}),t),...o,children:u.jsx("div",{className:"container mx-auto px-4",children:n})}));cy.displayName="CTASection";const eA=ye("mx-auto",{variants:{align:{left:"text-left",center:"text-center",split:"flex flex-col items-center justify-between gap-8 text-center md:flex-row md:text-left"},maxWidth:{sm:"max-w-xl",md:"max-w-2xl",lg:"max-w-4xl",full:"max-w-none"}},defaultVariants:{align:"center",maxWidth:"lg"}}),dy=p.forwardRef(({className:t,align:e,maxWidth:r,...n},o)=>u.jsx("div",{ref:o,className:j(eA({align:e,maxWidth:r}),t),...n}));dy.displayName="CTAContent";const uy=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));uy.displayName="CTATitle";const fy=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-4 text-lg opacity-90",t),...e}));fy.displayName="CTADescription";const py=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-8 flex flex-wrap items-center gap-4",t),...e}));py.displayName="CTAActions";const hy=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("div",{ref:n,className:j("rounded-2xl bg-card p-8 shadow-lg md:p-12",t),...r,children:e}));hy.displayName="CTACard";const tA=ye("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",dark:"bg-zinc-900 text-white"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),my=p.forwardRef(({className:t,variant:e,size:r,children:n,...o},s)=>u.jsx("section",{ref:s,className:j(tA({variant:e,size:r}),t),...o,children:u.jsx("div",{className:"container mx-auto px-4",children:n})}));my.displayName="StatsSection";const gy=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-12 text-center",t),...e}));gy.displayName="StatsHeader";const vy=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));vy.displayName="StatsTitle";const yy=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mx-auto mt-4 max-w-2xl text-lg opacity-80",t),...e}));yy.displayName="StatsDescription";const rA=ye("grid gap-8",{variants:{columns:{2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:4}}),by=p.forwardRef(({className:t,columns:e,...r},n)=>u.jsx("div",{ref:n,className:j(rA({columns:e}),t),...r}));by.displayName="StatsGrid";const nA=ye("text-center",{variants:{variant:{default:"",bordered:"border-l first:border-l-0 pl-8 first:pl-0",card:"rounded-lg border bg-card p-6 shadow-sm"}},defaultVariants:{variant:"default"}}),xy=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,className:j(nA({variant:e}),t),...r}));xy.displayName="StatItem";const wy=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("font-heading text-4xl font-bold tracking-tight lg:text-5xl",t),...e}));wy.displayName="StatValue";const ky=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-2 text-sm font-medium opacity-80",t),...e}));ky.displayName="StatLabel";const Ny=p.forwardRef(({className:t,direction:e="neutral",...r},n)=>u.jsx("div",{ref:n,className:j("mt-1 text-sm font-medium",e==="up"&&"text-green-500",e==="down"&&"text-red-500",e==="neutral"&&"opacity-60",t),...r}));Ny.displayName="StatTrend";const oA=ye("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),Cy=p.forwardRef(({className:t,size:e,children:r,...n},o)=>u.jsx("section",{ref:o,className:j(oA({size:e}),t),...n,children:u.jsx("div",{className:"container mx-auto px-4",children:r})}));Cy.displayName="TeamSection";const Sy=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-12 text-center",t),...e}));Sy.displayName="TeamHeader";const My=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));My.displayName="TeamTitle";const Ey=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));Ey.displayName="TeamDescription";const sA=ye("grid gap-8",{variants:{columns:{2:"md:grid-cols-2",3:"md:grid-cols-2 lg:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:4}}),jy=p.forwardRef(({className:t,columns:e,...r},n)=>u.jsx("div",{ref:n,className:j(sA({columns:e}),t),...r}));jy.displayName="TeamGrid";const aA=ye("group text-center",{variants:{variant:{default:"",card:"rounded-lg border bg-card p-6 shadow-sm transition-shadow hover:shadow-md"}},defaultVariants:{variant:"default"}}),Ry=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,className:j(aA({variant:e}),t),...r}));Ry.displayName="TeamMember";const Ty=p.forwardRef(({className:t,alt:e,fallback:r,...n},o)=>u.jsx("div",{className:"relative mx-auto mb-4 h-32 w-32 overflow-hidden rounded-full bg-muted",children:n.src?u.jsx("img",{ref:o,alt:e,className:j("h-full w-full object-cover transition-transform group-hover:scale-105",t),...n}):u.jsx("div",{className:"flex h-full w-full items-center justify-center text-4xl font-medium text-muted-foreground",children:r||(e==null?void 0:e.charAt(0).toUpperCase())})}));Ty.displayName="TeamMemberImage";const Ay=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-lg font-semibold text-foreground",t),...e}));Ay.displayName="TeamMemberName";const Oy=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-sm text-muted-foreground",t),...e}));Oy.displayName="TeamMemberRole";const Dy=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-2 text-sm text-muted-foreground",t),...e}));Dy.displayName="TeamMemberBio";const Iy=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-4 flex justify-center gap-3",t),...e}));Iy.displayName="TeamMemberLinks";const Py=p.forwardRef(({className:t,label:e,children:r,...n},o)=>u.jsx("a",{ref:o,"aria-label":e,className:j("text-muted-foreground transition-colors hover:text-foreground",t),...n,children:r}));Py.displayName="TeamMemberLink";const iA=ye("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",bordered:"border-y bg-background"},size:{sm:"py-8",default:"py-12",lg:"py-16"}},defaultVariants:{variant:"default",size:"default"}}),Ly=p.forwardRef(({className:t,variant:e,size:r,title:n,children:o,...s},a)=>u.jsx("section",{ref:a,className:j(iA({variant:e,size:r}),t),...s,children:u.jsxs("div",{className:"container mx-auto px-4",children:[n&&u.jsx("p",{className:"mb-8 text-center text-sm font-medium text-muted-foreground",children:n}),u.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 md:gap-12 lg:gap-16",children:o})]})}));Ly.displayName="LogoCloud";const lA=ye("flex items-center justify-center transition-opacity",{variants:{grayscale:{true:"opacity-60 grayscale hover:opacity-100 hover:grayscale-0",false:"opacity-100"}},defaultVariants:{grayscale:!0}}),Fy=p.forwardRef(({className:t,grayscale:e,href:r,name:n,children:o,...s},a)=>{const i=u.jsx("div",{ref:a,className:j(lA({grayscale:e}),t),...s,children:o});return r?u.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":n,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:i}):i});Fy.displayName="LogoCloudItem";/**
2
+ * @license lucide-react v0.395.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const cA=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_y=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/**
7
+ * @license lucide-react v0.395.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */var dA={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"};/**
12
+ * @license lucide-react v0.395.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const uA=T.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},l)=>T.createElement("svg",{ref:l,...dA,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:_y("lucide",o),...i},[...a.map(([c,d])=>T.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
17
+ * @license lucide-react v0.395.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const la=(t,e)=>{const r=T.forwardRef(({className:n,...o},s)=>T.createElement(uA,{ref:s,iconNode:e,className:_y(`lucide-${cA(t)}`,n),...o}));return r.displayName=`${t}`,r};/**
22
+ * @license lucide-react v0.395.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const zy=la("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
27
+ * @license lucide-react v0.395.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const fA=la("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
32
+ * @license lucide-react v0.395.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const By=la("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
37
+ * @license lucide-react v0.395.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const pA=la("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
42
+ * @license lucide-react v0.395.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const hA=la("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function mA(t,e){const r=p.createContext(e),n=s=>{const{children:a,...i}=s,l=p.useMemo(()=>i,Object.values(i));return u.jsx(r.Provider,{value:l,children:a})};n.displayName=t+"Provider";function o(s){const a=p.useContext(r);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[n,o]}function Oe(t,e=[]){let r=[];function n(s,a){const i=p.createContext(a),l=r.length;r=[...r,a];const c=f=>{var h;const{scope:m,children:v,...g}=f,y=((h=m==null?void 0:m[t])==null?void 0:h[l])||i,b=p.useMemo(()=>g,Object.values(g));return u.jsx(y.Provider,{value:b,children:v})};c.displayName=s+"Provider";function d(f,h){var m;const v=((m=h==null?void 0:h[t])==null?void 0:m[l])||i,g=p.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=r.map(a=>p.createContext(a));return function(a){const i=(a==null?void 0:a[t])||s;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:i}}),[a,i])}};return o.scopeName=t,[n,gA(o,...e)]}function gA(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const s=n.reduce((a,{useScope:i,scopeName:l})=>{const c=i(o)[`__scope${l}`];return{...a,...c}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return r.scopeName=e.scopeName,r}function zh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function er(...t){return e=>{let r=!1;const n=t.map(o=>{const s=zh(o,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():zh(t[o],null)}}}}function oe(...t){return p.useCallback(er(...t),t)}function Un(t){const e=vA(t),r=p.forwardRef((n,o)=>{const{children:s,...a}=n,i=p.Children.toArray(s),l=i.find(yA);if(l){const c=l.props.children,d=i.map(f=>f===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:f);return u.jsx(e,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,d):null})}return u.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}function vA(t){const e=p.forwardRef((r,n)=>{const{children:o,...s}=r;if(p.isValidElement(o)){const a=xA(o),i=bA(s,o.props);return o.type!==p.Fragment&&(i.ref=n?er(n,a):a),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var $y=Symbol("radix.slottable");function Hy(t){const e=({children:r})=>u.jsx(u.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=$y,e}function yA(t){return p.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===$y}function bA(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const i=s(...a);return o(...a),i}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function xA(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function xn(t){const e=t+"CollectionProvider",[r,n]=Oe(e),[o,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:y,children:b}=g,x=T.useRef(null),w=T.useRef(new Map).current;return u.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};a.displayName=e;const i=t+"CollectionSlot",l=Un(i),c=T.forwardRef((g,y)=>{const{scope:b,children:x}=g,w=s(i,b),k=oe(y,w.collectionRef);return u.jsx(l,{ref:k,children:x})});c.displayName=i;const d=t+"CollectionItemSlot",f="data-radix-collection-item",h=Un(d),m=T.forwardRef((g,y)=>{const{scope:b,children:x,...w}=g,k=T.useRef(null),N=oe(y,k),S=s(d,b);return T.useEffect(()=>(S.itemMap.set(k,{ref:k,...w}),()=>void S.itemMap.delete(k))),u.jsx(h,{[f]:"",ref:N,children:x})});m.displayName=d;function v(g){const y=s(t+"CollectionConsumer",g);return T.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((w,k)=>x.indexOf(w.ref.current)-x.indexOf(k.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:c,ItemSlot:m},v,n]}function L(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t==null||t(n),r===!1||!n.defaultPrevented)return e==null?void 0:e(n)}}var Ae=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},wA=p[" useInsertionEffect ".trim().toString()]||Ae;function Ye({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[o,s,a]=kA({defaultProp:e,onChange:r}),i=t!==void 0,l=i?t:o;{const d=p.useRef(t!==void 0);p.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,n])}const c=p.useCallback(d=>{var f;if(i){const h=NA(d)?d(t):d;h!==t&&((f=a.current)==null||f.call(a,h))}else s(d)},[i,t,s,a]);return[l,c]}function kA({defaultProp:t,onChange:e}){const[r,n]=p.useState(t),o=p.useRef(r),s=p.useRef(e);return wA(()=>{s.current=e},[e]),p.useEffect(()=>{var a;o.current!==r&&((a=s.current)==null||a.call(s,r),o.current=r)},[r,o]),[r,n,s]}function NA(t){return typeof t=="function"}var CA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=CA.reduce((t,e)=>{const r=Un(`Primitive.${e}`),n=p.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ki(t,e){t&&Dl.flushSync(()=>t.dispatchEvent(e))}function SA(t,e){return p.useReducer((r,n)=>e[r][n]??r,t)}var De=t=>{const{present:e,children:r}=t,n=MA(e),o=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),s=oe(n.ref,EA(o));return typeof r=="function"||n.isPresent?p.cloneElement(o,{ref:s}):null};De.displayName="Presence";function MA(t){const[e,r]=p.useState(),n=p.useRef(null),o=p.useRef(t),s=p.useRef("none"),a=t?"mounted":"unmounted",[i,l]=SA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=Ha(n.current);s.current=i==="mounted"?c:"none"},[i]),Ae(()=>{const c=n.current,d=o.current;if(d!==t){const f=s.current,h=Ha(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,l]),Ae(()=>{if(e){let c;const d=e.ownerDocument.defaultView??window,f=m=>{const v=Ha(n.current).includes(CSS.escape(m.animationName));if(m.target===e&&v&&(l("ANIMATION_END"),!o.current)){const g=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},h=m=>{m.target===e&&(s.current=Ha(n.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Ha(t){return(t==null?void 0:t.animationName)||"none"}function EA(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var jA=p[" useId ".trim().toString()]||(()=>{}),RA=0;function Ke(t){const[e,r]=p.useState(jA());return Ae(()=>{r(n=>n??String(RA++))},[t]),t||(e?`radix-${e}`:"")}var Il="Collapsible",[TA,Vy]=Oe(Il),[AA,sf]=TA(Il),Wy=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:a,...i}=t,[l,c]=Ye({prop:n,defaultProp:o??!1,onChange:a,caller:Il});return u.jsx(AA,{scope:r,disabled:s,contentId:Ke(),open:l,onOpenToggle:p.useCallback(()=>c(d=>!d),[c]),children:u.jsx(Q.div,{"data-state":lf(l),"data-disabled":s?"":void 0,...i,ref:e})})});Wy.displayName=Il;var Uy="CollapsibleTrigger",Gy=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,o=sf(Uy,r);return u.jsx(Q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:e,onClick:L(t.onClick,o.onOpenToggle)})});Gy.displayName=Uy;var af="CollapsibleContent",qy=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=sf(af,t.__scopeCollapsible);return u.jsx(De,{present:r||o.open,children:({present:s})=>u.jsx(OA,{...n,ref:e,present:s})})});qy.displayName=af;var OA=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=t,a=sf(af,r),[i,l]=p.useState(n),c=p.useRef(null),d=oe(e,c),f=p.useRef(0),h=f.current,m=p.useRef(0),v=m.current,g=a.open||i,y=p.useRef(g),b=p.useRef(void 0);return p.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),Ae(()=>{const x=c.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();f.current=w.height,m.current=w.width,y.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(n)}},[a.open,n]),u.jsx(Q.div,{"data-state":lf(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:g&&o})});function lf(t){return t?"open":"closed"}var Ky=Wy,Yy=Gy,Jy=qy,DA=p.createContext(void 0);function yr(t){const e=p.useContext(DA);return t||e||"ltr"}var nr="Accordion",IA=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[cf,PA,LA]=xn(nr),[Pl]=Oe(nr,[LA,Vy]),df=Vy(),FA=T.forwardRef((t,e)=>{const{type:r,...n}=t,o=n,s=n;return u.jsx(cf.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?u.jsx($A,{...s,ref:e}):u.jsx(BA,{...o,ref:e})})});FA.displayName=nr;var[Xy,_A]=Pl(nr),[Zy,zA]=Pl(nr,{collapsible:!1}),BA=T.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...a}=t,[i,l]=Ye({prop:r,defaultProp:n??"",onChange:o,caller:nr});return u.jsx(Xy,{scope:t.__scopeAccordion,value:T.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:T.useCallback(()=>s&&l(""),[s,l]),children:u.jsx(Zy,{scope:t.__scopeAccordion,collapsible:s,children:u.jsx(Qy,{...a,ref:e})})})}),$A=T.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=t,[a,i]=Ye({prop:r,defaultProp:n??[],onChange:o,caller:nr}),l=T.useCallback(d=>i((f=[])=>[...f,d]),[i]),c=T.useCallback(d=>i((f=[])=>f.filter(h=>h!==d)),[i]);return u.jsx(Xy,{scope:t.__scopeAccordion,value:a,onItemOpen:l,onItemClose:c,children:u.jsx(Zy,{scope:t.__scopeAccordion,collapsible:!0,children:u.jsx(Qy,{...s,ref:e})})})}),[HA,Ll]=Pl(nr),Qy=T.forwardRef((t,e)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...a}=t,i=T.useRef(null),l=oe(i,e),c=PA(r),d=yr(o)==="ltr",f=L(t.onKeyDown,h=>{var m;if(!IA.includes(h.key))return;const v=h.target,g=c().filter(M=>{var E;return!((E=M.ref.current)!=null&&E.disabled)}),y=g.findIndex(M=>M.ref.current===v),b=g.length;if(y===-1)return;h.preventDefault();let x=y;const w=0,k=b-1,N=()=>{x=y+1,x>k&&(x=w)},S=()=>{x=y-1,x<w&&(x=k)};switch(h.key){case"Home":x=w;break;case"End":x=k;break;case"ArrowRight":s==="horizontal"&&(d?N():S());break;case"ArrowDown":s==="vertical"&&N();break;case"ArrowLeft":s==="horizontal"&&(d?S():N());break;case"ArrowUp":s==="vertical"&&S();break}const C=x%b;(m=g[C].ref.current)==null||m.focus()});return u.jsx(HA,{scope:r,disabled:n,direction:o,orientation:s,children:u.jsx(cf.Slot,{scope:r,children:u.jsx(Q.div,{...a,"data-orientation":s,ref:l,onKeyDown:n?void 0:f})})})}),Ni="AccordionItem",[VA,uf]=Pl(Ni),eb=T.forwardRef((t,e)=>{const{__scopeAccordion:r,value:n,...o}=t,s=Ll(Ni,r),a=_A(Ni,r),i=df(r),l=Ke(),c=n&&a.value.includes(n)||!1,d=s.disabled||t.disabled;return u.jsx(VA,{scope:r,open:c,disabled:d,triggerId:l,children:u.jsx(Ky,{"data-orientation":s.orientation,"data-state":ab(c),...i,...o,ref:e,disabled:d,open:c,onOpenChange:f=>{f?a.onItemOpen(n):a.onItemClose(n)}})})});eb.displayName=Ni;var tb="AccordionHeader",rb=T.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,o=Ll(nr,r),s=uf(tb,r);return u.jsx(Q.h3,{"data-orientation":o.orientation,"data-state":ab(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:e})});rb.displayName=tb;var Vd="AccordionTrigger",nb=T.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,o=Ll(nr,r),s=uf(Vd,r),a=zA(Vd,r),i=df(r);return u.jsx(cf.ItemSlot,{scope:r,children:u.jsx(Yy,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...n,ref:e})})});nb.displayName=Vd;var ob="AccordionContent",sb=T.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,o=Ll(nr,r),s=uf(ob,r),a=df(r);return u.jsx(Jy,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...n,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});sb.displayName=ob;function ab(t){return t?"open":"closed"}var WA=eb,UA=rb,ib=nb,lb=sb;/**
47
+ * @license lucide-react v0.395.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const GA=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cb=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/**
52
+ * @license lucide-react v0.395.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */var qA={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"};/**
57
+ * @license lucide-react v0.395.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const KA=T.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},l)=>T.createElement("svg",{ref:l,...qA,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:cb("lucide",o),...i},[...a.map(([c,d])=>T.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
62
+ * @license lucide-react v0.395.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const ae=(t,e)=>{const r=T.forwardRef(({className:n,...o},s)=>T.createElement(KA,{ref:s,iconNode:e,className:cb(`lucide-${GA(t)}`,n),...o}));return r.displayName=`${t}`,r};/**
67
+ * @license lucide-react v0.395.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const YA=ae("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
72
+ * @license lucide-react v0.395.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const JA=ae("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
77
+ * @license lucide-react v0.395.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const XA=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
82
+ * @license lucide-react v0.395.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
+ */const ZA=ae("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
87
+ * @license lucide-react v0.395.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Fl=ae("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
92
+ * @license lucide-react v0.395.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const bt=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
97
+ * @license lucide-react v0.395.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const zr=ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
102
+ * @license lucide-react v0.395.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const db=ae("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
107
+ * @license lucide-react v0.395.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const Jo=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
112
+ * @license lucide-react v0.395.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const di=ae("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
117
+ * @license lucide-react v0.395.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const QA=ae("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
122
+ * @license lucide-react v0.395.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
+ */const eO=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
127
+ * @license lucide-react v0.395.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const _l=ae("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
132
+ * @license lucide-react v0.395.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const ff=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
137
+ * @license lucide-react v0.395.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const tO=ae("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
142
+ * @license lucide-react v0.395.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const rO=ae("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"}]]);/**
147
+ * @license lucide-react v0.395.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const ub=ae("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
152
+ * @license lucide-react v0.395.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const fb=ae("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
157
+ * @license lucide-react v0.395.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */ae("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
162
+ * @license lucide-react v0.395.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
+ */const nO=ae("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"}]]);/**
167
+ * @license lucide-react v0.395.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const oO=ae("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
172
+ * @license lucide-react v0.395.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const sO=ae("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
177
+ * @license lucide-react v0.395.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const aO=ae("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
182
+ * @license lucide-react v0.395.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const pf=ae("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
187
+ * @license lucide-react v0.395.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const iO=ae("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
192
+ * @license lucide-react v0.395.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const lO=ae("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
197
+ * @license lucide-react v0.395.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const cO=ae("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
202
+ * @license lucide-react v0.395.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const dO=ae("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
207
+ * @license lucide-react v0.395.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const uO=ae("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/**
212
+ * @license lucide-react v0.395.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const fO=ae("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/**
217
+ * @license lucide-react v0.395.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const pO=ae("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
222
+ * @license lucide-react v0.395.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const hO=ae("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
227
+ * @license lucide-react v0.395.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const mO=ae("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
232
+ * @license lucide-react v0.395.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const gO=ae("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
237
+ * @license lucide-react v0.395.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const vO=ae("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
242
+ * @license lucide-react v0.395.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const Ci=ae("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
247
+ * @license lucide-react v0.395.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const pb=ae("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
252
+ * @license lucide-react v0.395.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const yO=ae("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
257
+ * @license lucide-react v0.395.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const bO=ae("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
262
+ * @license lucide-react v0.395.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const xO=ae("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
267
+ * @license lucide-react v0.395.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const hb=ae("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
272
+ * @license lucide-react v0.395.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const wO=ae("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
277
+ * @license lucide-react v0.395.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const kO=ae("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
282
+ * @license lucide-react v0.395.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const NO=ae("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
287
+ * @license lucide-react v0.395.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const CO=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
292
+ * @license lucide-react v0.395.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const SO=ae("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
297
+ * @license lucide-react v0.395.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const MO=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
302
+ * @license lucide-react v0.395.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const EO=ae("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
307
+ * @license lucide-react v0.395.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const jO=ae("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/**
312
+ * @license lucide-react v0.395.0 - ISC
313
+ *
314
+ * This source code is licensed under the ISC license.
315
+ * See the LICENSE file in the root directory of this source tree.
316
+ */const ca=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
317
+ * @license lucide-react v0.395.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const Bh=ae("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
322
+ * @license lucide-react v0.395.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */const RO=ae("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
327
+ * @license lucide-react v0.395.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */const TO=ae("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
332
+ * @license lucide-react v0.395.0 - ISC
333
+ *
334
+ * This source code is licensed under the ISC license.
335
+ * See the LICENSE file in the root directory of this source tree.
336
+ */const $h=ae("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
337
+ * @license lucide-react v0.395.0 - ISC
338
+ *
339
+ * This source code is licensed under the ISC license.
340
+ * See the LICENSE file in the root directory of this source tree.
341
+ */const AO=ae("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
342
+ * @license lucide-react v0.395.0 - ISC
343
+ *
344
+ * This source code is licensed under the ISC license.
345
+ * See the LICENSE file in the root directory of this source tree.
346
+ */const OO=ae("VolumeX",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
347
+ * @license lucide-react v0.395.0 - ISC
348
+ *
349
+ * This source code is licensed under the ISC license.
350
+ * See the LICENSE file in the root directory of this source tree.
351
+ */const xt=ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function mb(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=mb(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function gb(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=mb(t))&&(n&&(n+=" "),n+=e);return n}const hf="-",DO=t=>{const e=PO(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const s=o.split(hf);return s[0]===""&&s.length!==1&&s.shift(),vb(s,e)||IO(o)},getConflictingClassGroupIds:(o,s)=>{const a=r[o]||[];return s&&n[o]?[...a,...n[o]]:a}}},vb=(t,e)=>{var r;if(t.length===0)return e.classGroupId;const n=t[0],o=e.nextPart.get(n),s=o?vb(t.slice(1),o):void 0;if(s)return s;if(e.validators.length===0)return;const a=t.join(hf);return(r=e.validators.find(({validator:i})=>i(a)))==null?void 0:r.classGroupId},Hh=/^\[(.+)\]$/,IO=t=>{if(Hh.test(t)){const e=Hh.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},PO=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return FO(Object.entries(t.classGroups),r).forEach(([o,s])=>{Wd(s,n,o,e)}),n},Wd=(t,e,r,n)=>{t.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Vh(e,o);s.classGroupId=r;return}if(typeof o=="function"){if(LO(o)){Wd(o(n),e,r,n);return}e.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Wd(a,Vh(e,s),r,n)})})},Vh=(t,e)=>{let r=t;return e.split(hf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},LO=t=>t.isThemeGetter,FO=(t,e)=>e?t.map(([r,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,i])=>[e+a,i])):s);return[r,o]}):t,_O=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),e++,e>t&&(e=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},yb="!",zO=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,o=e[0],s=e.length,a=i=>{const l=[];let c=0,d=0,f;for(let y=0;y<i.length;y++){let b=i[y];if(c===0){if(b===o&&(n||i.slice(y,y+s)===e)){l.push(i.slice(d,y)),d=y+s;continue}if(b==="/"){f=y;continue}}b==="["?c++:b==="]"&&c--}const h=l.length===0?i:i.substring(d),m=h.startsWith(yb),v=m?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return r?i=>r({className:i,parseClassName:a}):a},BO=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},$O=t=>({cache:_O(t.cacheSize),parseClassName:zO(t),...DO(t)}),HO=/\s+/,VO=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=[],a=t.trim().split(HO);let i="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=r(c);let v=!!m,g=n(v?h.substring(0,m):h);if(!g){if(!v){i=c+(i.length>0?" "+i:i);continue}if(g=n(h),!g){i=c+(i.length>0?" "+i:i);continue}v=!1}const y=BO(d).join(":"),b=f?y+yb:y,x=b+g;if(s.includes(x))continue;s.push(x);const w=o(g,v);for(let k=0;k<w.length;++k){const N=w[k];s.push(b+N)}i=c+(i.length>0?" "+i:i)}return i};function WO(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=bb(e))&&(n&&(n+=" "),n+=r);return n}const bb=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=bb(t[n]))&&(r&&(r+=" "),r+=e);return r};function UO(t,...e){let r,n,o,s=a;function a(l){const c=e.reduce((d,f)=>f(d),t());return r=$O(c),n=r.cache.get,o=r.cache.set,s=i,i(l)}function i(l){const c=n(l);if(c)return c;const d=VO(l,r);return o(l,d),d}return function(){return s(WO.apply(null,arguments))}}const je=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},xb=/^\[(?:([a-z-]+):)?(.+)\]$/i,GO=/^\d+\/\d+$/,qO=new Set(["px","full","screen"]),KO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YO=/\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$/,JO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rr=t=>jo(t)||qO.has(t)||GO.test(t),Kr=t=>Xo(t,"length",aD),jo=t=>!!t&&!Number.isNaN(Number(t)),Gc=t=>Xo(t,"number",jo),fs=t=>!!t&&Number.isInteger(Number(t)),QO=t=>t.endsWith("%")&&jo(t.slice(0,-1)),me=t=>xb.test(t),Yr=t=>KO.test(t),eD=new Set(["length","size","percentage"]),tD=t=>Xo(t,eD,wb),rD=t=>Xo(t,"position",wb),nD=new Set(["image","url"]),oD=t=>Xo(t,nD,lD),sD=t=>Xo(t,"",iD),ps=()=>!0,Xo=(t,e,r)=>{const n=xb.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},aD=t=>YO.test(t)&&!JO.test(t),wb=()=>!1,iD=t=>XO.test(t),lD=t=>ZO.test(t),cD=()=>{const t=je("colors"),e=je("spacing"),r=je("blur"),n=je("brightness"),o=je("borderColor"),s=je("borderRadius"),a=je("borderSpacing"),i=je("borderWidth"),l=je("contrast"),c=je("grayscale"),d=je("hueRotate"),f=je("invert"),h=je("gap"),m=je("gradientColorStops"),v=je("gradientColorStopPositions"),g=je("inset"),y=je("margin"),b=je("opacity"),x=je("padding"),w=je("saturate"),k=je("scale"),N=je("sepia"),S=je("skew"),C=je("space"),M=je("translate"),E=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",me,e],D=()=>[me,e],q=()=>["",Rr,Kr],F=()=>["auto",jo,me],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",me],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[jo,me];return{cacheSize:500,separator:":",theme:{colors:[ps],spacing:[Rr,Kr],blur:["none","",Yr,me],brightness:G(),borderColor:[t],borderRadius:["none","","full",Yr,me],borderSpacing:D(),borderWidth:q(),contrast:G(),grayscale:z(),hueRotate:G(),invert:z(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[QO,Kr],inset:O(),margin:O(),opacity:G(),padding:D(),saturate:G(),scale:G(),sepia:z(),skew:G(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Yr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:[...$(),me]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fs,me]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",fs,me]}],"grid-cols":[{"grid-cols":[ps]}],"col-start-end":[{col:["auto",{span:["full",fs,me]},me]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[ps]}],"row-start-end":[{row:["auto",{span:[fs,me]},me]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,e]}],"min-w":[{"min-w":[me,e,"min","max","fit"]}],"max-w":[{"max-w":[me,e,"none","full","min","max","fit","prose",{screen:[Yr]},Yr]}],h:[{h:[me,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Yr,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gc]}],"font-family":[{font:[ps]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",jo,Gc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rr,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rr,Kr]}],"underline-offset":[{"underline-offset":["auto",Rr,me]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],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",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),rD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},oD]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Rr,me]}],"outline-w":[{outline:[Rr,Kr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Rr,Kr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Yr,sD]}],"shadow-color":[{shadow:[ps]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Yr,me]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[fs,me]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",t]}],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",me]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",me]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Rr,Kr,Gc]}],stroke:[{stroke:[t,"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"]}}},dD=UO(cD);function R(...t){return dD(gb(t))}const uD=p.forwardRef(({className:t,...e},r)=>u.jsx(WA,{ref:r,className:R("border-b border-[var(--container-border-alt)]",t),...e}));uD.displayName="AccordionItem";const fD=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx(UA,{className:"flex",children:u.jsxs(ib,{ref:n,className:R("font-[var(--font-heading)] font-weight-bold text-[var(--container-fg)] flex flex-1 items-center justify-between py-4 transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...r,children:[e,u.jsx(zr,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));fD.displayName=ib.displayName;const pD=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx(lb,{ref:n,className:"overflow-hidden text-[var(--container-fg-alt)] text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:u.jsx("div",{className:R("pb-4 pt-0",t),children:e})}));pD.displayName=lb.displayName;const Wh=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Uh=gb,Ge=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Uh(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=e,a=Object.keys(o).map(c=>{const d=r==null?void 0:r[c],f=s==null?void 0:s[c];if(d===null)return null;const h=Wh(d)||Wh(f);return o[c][h]}),i=r&&Object.entries(r).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...s,...i}[g]):{...s,...i}[g]===y})?[...c,f,h]:c},[]);return Uh(t,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},hD=Ge("relative w-full rounded-[var(--curves-xl)] border p-[var(--spacing-xs)] [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 text-green-700 dark:text-green-400 [&>svg]:text-green-600",warning:"border-yellow-500/50 text-yellow-700 dark:text-yellow-400 [&>svg]:text-yellow-600",info:"border-blue-500/50 text-blue-700 dark:text-blue-400 [&>svg]:text-blue-600"}},defaultVariants:{variant:"default"}}),mD=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,role:"alert",className:R(hD({variant:e}),t),...r}));mD.displayName="Alert";const gD=p.forwardRef(({className:t,...e},r)=>u.jsx("h5",{ref:r,className:R("font-heading mb-1 font-medium leading-none tracking-tight",t),...e}));gD.displayName="AlertTitle";const vD=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("text-sm [&_p]:leading-relaxed",t),...e}));vD.displayName="AlertDescription";function Te(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function yD(t,e=globalThis==null?void 0:globalThis.document){const r=Te(t);p.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var bD="DismissableLayer",Ud="dismissableLayer.update",xD="dismissableLayer.pointerDownOutside",wD="dismissableLayer.focusOutside",Gh,kb=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wn=p.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=t,c=p.useContext(kb),[d,f]=p.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),v=oe(e,C=>f(C)),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),x=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=b,N=CD(C=>{const M=C.target,E=[...c.branches].some(A=>A.contains(M));!k||E||(o==null||o(C),a==null||a(C),C.defaultPrevented||i==null||i())},h),S=SD(C=>{const M=C.target;[...c.branches].some(E=>E.contains(M))||(s==null||s(C),a==null||a(C),C.defaultPrevented||i==null||i())},h);return yD(C=>{x===c.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Gh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),qh(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Gh)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),qh())},[d,c]),p.useEffect(()=>{const C=()=>m({});return document.addEventListener(Ud,C),()=>document.removeEventListener(Ud,C)},[]),u.jsx(Q.div,{...l,ref:v,style:{pointerEvents:w?k?"auto":"none":void 0,...t.style},onFocusCapture:L(t.onFocusCapture,S.onFocusCapture),onBlurCapture:L(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:L(t.onPointerDownCapture,N.onPointerDownCapture)})});wn.displayName=bD;var kD="DismissableLayerBranch",ND=p.forwardRef((t,e)=>{const r=p.useContext(kb),n=p.useRef(null),o=oe(e,n);return p.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),u.jsx(Q.div,{...t,ref:o})});ND.displayName=kD;function CD(t,e=globalThis==null?void 0:globalThis.document){const r=Te(t),n=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let l=function(){Nb(xD,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=l,e.addEventListener("click",o.current,{once:!0})):l()}else e.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",o.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function SD(t,e=globalThis==null?void 0:globalThis.document){const r=Te(t),n=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!n.current&&Nb(wD,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function qh(){const t=new CustomEvent(Ud);document.dispatchEvent(t)}function Nb(t,e,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&o.addEventListener(t,e,{once:!0}),n?ki(o,s):o.dispatchEvent(s)}var qc="focusScope.autoFocusOnMount",Kc="focusScope.autoFocusOnUnmount",Kh={bubbles:!1,cancelable:!0},MD="FocusScope",da=p.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=t,[i,l]=p.useState(null),c=Te(o),d=Te(s),f=p.useRef(null),h=oe(e,g=>l(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let g=function(w){if(m.paused||!i)return;const k=w.target;i.contains(k)?f.current=k:Zr(f.current,{select:!0})},y=function(w){if(m.paused||!i)return;const k=w.relatedTarget;k!==null&&(i.contains(k)||Zr(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&Zr(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const x=new MutationObserver(b);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),x.disconnect()}}},[n,i,m.paused]),p.useEffect(()=>{if(i){Jh.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(qc,Kh);i.addEventListener(qc,c),i.dispatchEvent(y),y.defaultPrevented||(ED(OD(Cb(i)),{select:!0}),document.activeElement===g&&Zr(i))}return()=>{i.removeEventListener(qc,c),setTimeout(()=>{const y=new CustomEvent(Kc,Kh);i.addEventListener(Kc,d),i.dispatchEvent(y),y.defaultPrevented||Zr(g??document.body,{select:!0}),i.removeEventListener(Kc,d),Jh.remove(m)},0)}}},[i,c,d,m]);const v=p.useCallback(g=>{if(!r&&!n||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(y&&b){const x=g.currentTarget,[w,k]=jD(x);w&&k?!g.shiftKey&&b===k?(g.preventDefault(),r&&Zr(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),r&&Zr(k,{select:!0})):b===x&&g.preventDefault()}},[r,n,m.paused]);return u.jsx(Q.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});da.displayName=MD;function ED(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Zr(n,{select:e}),document.activeElement!==r)return}function jD(t){const e=Cb(t),r=Yh(e,t),n=Yh(e.reverse(),t);return[r,n]}function Cb(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Yh(t,e){for(const r of t)if(!RD(r,{upTo:e}))return r}function RD(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function TD(t){return t instanceof HTMLInputElement&&"select"in t}function Zr(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&TD(t)&&e&&t.select()}}var Jh=AD();function AD(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Xh(t,e),t.unshift(e)},remove(e){var r;t=Xh(t,e),(r=t[0])==null||r.resume()}}}function Xh(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function OD(t){return t.filter(e=>e.tagName!=="A")}var DD="Portal",ua=p.forwardRef((t,e)=>{var r;const{container:n,...o}=t,[s,a]=p.useState(!1);Ae(()=>a(!0),[]);const i=n||s&&((r=globalThis==null?void 0:globalThis.document)==null?void 0:r.body);return i?Ol.createPortal(u.jsx(Q.div,{...o,ref:e}),i):null});ua.displayName=DD;var Yc=0;function zl(){p.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Zh()),document.body.insertAdjacentElement("beforeend",t[1]??Zh()),Yc++,()=>{Yc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Yc--}},[])}function Zh(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var dr=function(){return dr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},dr.apply(this,arguments)};function Sb(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function ID(t,e,r){for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var ui="right-scroll-bar-position",fi="width-before-scroll-bar",PD="with-scroll-bars-hidden",LD="--removed-body-scroll-bar-size";function Jc(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function FD(t,e){var r=T.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=e,r.facade}var _D=typeof window<"u"?p.useLayoutEffect:p.useEffect,Qh=new WeakMap;function zD(t,e){var r=FD(null,function(n){return t.forEach(function(o){return Jc(o,n)})});return _D(function(){var n=Qh.get(r);if(n){var o=new Set(n),s=new Set(t),a=r.current;o.forEach(function(i){s.has(i)||Jc(i,null)}),s.forEach(function(i){o.has(i)||Jc(i,a)})}Qh.set(r,t)},[t]),r}function BD(t){return t}function $D(t,e){e===void 0&&(e=BD);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var a=e(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var l=function(){var d=a;a=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function HD(t){t===void 0&&(t={});var e=$D(null);return e.options=dr({async:!0,ssr:!1},t),e}var Mb=function(t){var e=t.sideCar,r=Sb(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,dr({},r))};Mb.isSideCarExport=!0;function VD(t,e){return t.useMedium(e),Mb}var Eb=HD(),Xc=function(){},Bl=p.forwardRef(function(t,e){var r=p.useRef(null),n=p.useState({onScrollCapture:Xc,onWheelCapture:Xc,onTouchMoveCapture:Xc}),o=n[0],s=n[1],a=t.forwardProps,i=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,h=t.sideCar,m=t.noRelative,v=t.noIsolation,g=t.inert,y=t.allowPinchZoom,b=t.as,x=b===void 0?"div":b,w=t.gapMode,k=Sb(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,S=zD([r,e]),C=dr(dr({},k),o);return p.createElement(p.Fragment,null,d&&p.createElement(N,{sideCar:Eb,removeScrollBar:c,shards:f,noRelative:m,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:w}),a?p.cloneElement(p.Children.only(i),dr(dr({},C),{ref:S})):p.createElement(x,dr({},C,{className:l,ref:S}),i))});Bl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bl.classNames={fullWidth:fi,zeroRight:ui};var WD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function UD(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=WD();return e&&t.setAttribute("nonce",e),t}function GD(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function qD(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var KD=function(){var t=0,e=null;return{add:function(r){t==0&&(e=UD())&&(GD(e,r),qD(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},YD=function(){var t=KD();return function(e,r){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},jb=function(){var t=YD(),e=function(r){var n=r.styles,o=r.dynamic;return t(n,o),null};return e},JD={left:0,top:0,right:0,gap:0},Zc=function(t){return parseInt(t||"",10)||0},XD=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Zc(r),Zc(n),Zc(o)]},ZD=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return JD;var e=XD(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},QD=jb(),Ro="data-scroll-locked",eI=function(t,e,r,n){var o=t.left,s=t.top,a=t.right,i=t.gap;return r===void 0&&(r="margin"),`
352
+ .`.concat(PD,` {
353
+ overflow: hidden `).concat(n,`;
354
+ padding-right: `).concat(i,"px ").concat(n,`;
355
+ }
356
+ body[`).concat(Ro,`] {
357
+ overflow: hidden `).concat(n,`;
358
+ overscroll-behavior: contain;
359
+ `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&`
360
+ padding-left: `.concat(o,`px;
361
+ padding-top: `).concat(s,`px;
362
+ padding-right: `).concat(a,`px;
363
+ margin-left:0;
364
+ margin-top:0;
365
+ margin-right: `).concat(i,"px ").concat(n,`;
366
+ `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
367
+ }
368
+
369
+ .`).concat(ui,` {
370
+ right: `).concat(i,"px ").concat(n,`;
371
+ }
372
+
373
+ .`).concat(fi,` {
374
+ margin-right: `).concat(i,"px ").concat(n,`;
375
+ }
376
+
377
+ .`).concat(ui," .").concat(ui,` {
378
+ right: 0 `).concat(n,`;
379
+ }
380
+
381
+ .`).concat(fi," .").concat(fi,` {
382
+ margin-right: 0 `).concat(n,`;
383
+ }
384
+
385
+ body[`).concat(Ro,`] {
386
+ `).concat(LD,": ").concat(i,`px;
387
+ }
388
+ `)},em=function(){var t=parseInt(document.body.getAttribute(Ro)||"0",10);return isFinite(t)?t:0},tI=function(){p.useEffect(function(){return document.body.setAttribute(Ro,(em()+1).toString()),function(){var t=em()-1;t<=0?document.body.removeAttribute(Ro):document.body.setAttribute(Ro,t.toString())}},[])},rI=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,o=n===void 0?"margin":n;tI();var s=p.useMemo(function(){return ZD(o)},[o]);return p.createElement(QD,{styles:eI(s,!e,o,r?"":"!important")})},Gd=!1;if(typeof window<"u")try{var Va=Object.defineProperty({},"passive",{get:function(){return Gd=!0,!0}});window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{Gd=!1}var fo=Gd?{passive:!1}:!1,nI=function(t){return t.tagName==="TEXTAREA"},Rb=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!nI(t)&&r[e]==="visible")},oI=function(t){return Rb(t,"overflowY")},sI=function(t){return Rb(t,"overflowX")},tm=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Tb(t,n);if(o){var s=Ab(t,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},aI=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},iI=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},Tb=function(t,e){return t==="v"?oI(e):sI(e)},Ab=function(t,e){return t==="v"?aI(e):iI(e)},lI=function(t,e){return t==="h"&&e==="rtl"?-1:1},cI=function(t,e,r,n,o){var s=lI(t,window.getComputedStyle(e).direction),a=s*n,i=r.target,l=e.contains(i),c=!1,d=a>0,f=0,h=0;do{if(!i)break;var m=Ab(t,i),v=m[0],g=m[1],y=m[2],b=g-y-s*v;(v||b)&&Tb(t,i)&&(f+=b,h+=v);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(e.contains(i)||e===i));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(c=!0),c},Wa=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},rm=function(t){return[t.deltaX,t.deltaY]},nm=function(t){return t&&"current"in t?t.current:t},dI=function(t,e){return t[0]===e[0]&&t[1]===e[1]},uI=function(t){return`
389
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
390
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
391
+ `)},fI=0,po=[];function pI(t){var e=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),o=p.useState(fI++)[0],s=p.useState(jb)[0],a=p.useRef(t);p.useEffect(function(){a.current=t},[t]),p.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var g=ID([t.lockRef.current],(t.shards||[]).map(nm)).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var i=p.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var b=Wa(g),x=r.current,w="deltaX"in g?g.deltaX:x[0]-b[0],k="deltaY"in g?g.deltaY:x[1]-b[1],N,S=g.target,C=Math.abs(w)>Math.abs(k)?"h":"v";if("touches"in g&&C==="h"&&S.type==="range")return!1;var M=window.getSelection(),E=M&&M.anchorNode,A=E?E===S||E.contains(S):!1;if(A)return!1;var O=tm(C,S);if(!O)return!0;if(O?N=C:(N=C==="v"?"h":"v",O=tm(C,S)),!O)return!1;if(!n.current&&"changedTouches"in g&&(w||k)&&(n.current=N),!N)return!0;var D=n.current||N;return cI(D,y,g,D==="h"?w:k)},[]),l=p.useCallback(function(g){var y=g;if(!(!po.length||po[po.length-1]!==s)){var b="deltaY"in y?rm(y):Wa(y),x=e.current.filter(function(N){return N.name===y.type&&(N.target===y.target||y.target===N.shadowParent)&&dI(N.delta,b)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(nm).filter(Boolean).filter(function(N){return N.contains(y.target)}),k=w.length>0?i(y,w[0]):!a.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),c=p.useCallback(function(g,y,b,x){var w={name:g,delta:y,target:b,should:x,shadowParent:hI(b)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(k){return k!==w})},1)},[]),d=p.useCallback(function(g){r.current=Wa(g),n.current=void 0},[]),f=p.useCallback(function(g){c(g.type,rm(g),g.target,i(g,t.lockRef.current))},[]),h=p.useCallback(function(g){c(g.type,Wa(g),g.target,i(g,t.lockRef.current))},[]);p.useEffect(function(){return po.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,fo),document.addEventListener("touchmove",l,fo),document.addEventListener("touchstart",d,fo),function(){po=po.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,fo),document.removeEventListener("touchmove",l,fo),document.removeEventListener("touchstart",d,fo)}},[]);var m=t.removeScrollBar,v=t.inert;return p.createElement(p.Fragment,null,v?p.createElement(s,{styles:uI(o)}):null,m?p.createElement(rI,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function hI(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const mI=VD(Eb,pI);var fa=p.forwardRef(function(t,e){return p.createElement(Bl,dr({},t,{ref:e,sideCar:mI}))});fa.classNames=Bl.classNames;var gI=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ho=new WeakMap,Ua=new WeakMap,Ga={},Qc=0,Ob=function(t){return t&&(t.host||Ob(t.parentNode))},vI=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Ob(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},yI=function(t,e,r,n){var o=vI(e,Array.isArray(t)?t:[t]);Ga[r]||(Ga[r]=new WeakMap);var s=Ga[r],a=[],i=new Set,l=new Set(o),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(i.has(h))d(h);else try{var m=h.getAttribute(n),v=m!==null&&m!=="false",g=(ho.get(h)||0)+1,y=(s.get(h)||0)+1;ho.set(h,g),s.set(h,y),a.push(h),g===1&&v&&Ua.set(h,!0),y===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(e),i.clear(),Qc++,function(){a.forEach(function(f){var h=ho.get(f)-1,m=s.get(f)-1;ho.set(f,h),s.set(f,m),h||(Ua.has(f)||f.removeAttribute(n),Ua.delete(f)),m||f.removeAttribute(r)}),Qc--,Qc||(ho=new WeakMap,ho=new WeakMap,Ua=new WeakMap,Ga={})}},$l=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),o=gI(t);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),yI(n,o,r,"aria-hidden")):function(){return null}},Hl="Dialog",[Db,Ib]=Oe(Hl),[bI,or]=Db(Hl),Pb=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=t,i=p.useRef(null),l=p.useRef(null),[c,d]=Ye({prop:n,defaultProp:o??!1,onChange:s,caller:Hl});return u.jsx(bI,{scope:e,triggerRef:i,contentRef:l,contentId:Ke(),titleId:Ke(),descriptionId:Ke(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(f=>!f),[d]),modal:a,children:r})};Pb.displayName=Hl;var Lb="DialogTrigger",Fb=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,o=or(Lb,r),s=oe(e,o.triggerRef);return u.jsx(Q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":vf(o.open),...n,ref:s,onClick:L(t.onClick,o.onOpenToggle)})});Fb.displayName=Lb;var mf="DialogPortal",[xI,_b]=Db(mf,{forceMount:void 0}),zb=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:o}=t,s=or(mf,e);return u.jsx(xI,{scope:e,forceMount:r,children:p.Children.map(n,a=>u.jsx(De,{present:r||s.open,children:u.jsx(ua,{asChild:!0,container:o,children:a})}))})};zb.displayName=mf;var Si="DialogOverlay",Bb=p.forwardRef((t,e)=>{const r=_b(Si,t.__scopeDialog),{forceMount:n=r.forceMount,...o}=t,s=or(Si,t.__scopeDialog);return s.modal?u.jsx(De,{present:n||s.open,children:u.jsx(kI,{...o,ref:e})}):null});Bb.displayName=Si;var wI=Un("DialogOverlay.RemoveScroll"),kI=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,o=or(Si,r);return u.jsx(fa,{as:wI,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(Q.div,{"data-state":vf(o.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),Gn="DialogContent",$b=p.forwardRef((t,e)=>{const r=_b(Gn,t.__scopeDialog),{forceMount:n=r.forceMount,...o}=t,s=or(Gn,t.__scopeDialog);return u.jsx(De,{present:n||s.open,children:s.modal?u.jsx(NI,{...o,ref:e}):u.jsx(CI,{...o,ref:e})})});$b.displayName=Gn;var NI=p.forwardRef((t,e)=>{const r=or(Gn,t.__scopeDialog),n=p.useRef(null),o=oe(e,r.contentRef,n);return p.useEffect(()=>{const s=n.current;if(s)return $l(s)},[]),u.jsx(Hb,{...t,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(t.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:L(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:L(t.onFocusOutside,s=>s.preventDefault())})}),CI=p.forwardRef((t,e)=>{const r=or(Gn,t.__scopeDialog),n=p.useRef(!1),o=p.useRef(!1);return u.jsx(Hb,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=t.onCloseAutoFocus)==null||a.call(t,s),s.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var a,i;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;(i=r.triggerRef.current)!=null&&i.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Hb=p.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=t,i=or(Gn,r),l=p.useRef(null),c=oe(e,l);return zl(),u.jsxs(u.Fragment,{children:[u.jsx(da,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:u.jsx(wn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":vf(i.open),...a,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(MI,{titleId:i.titleId}),u.jsx(jI,{contentRef:l,descriptionId:i.descriptionId})]})]})}),gf="DialogTitle",Vb=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,o=or(gf,r);return u.jsx(Q.h2,{id:o.titleId,...n,ref:e})});Vb.displayName=gf;var Wb="DialogDescription",Ub=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,o=or(Wb,r);return u.jsx(Q.p,{id:o.descriptionId,...n,ref:e})});Ub.displayName=Wb;var Gb="DialogClose",qb=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,o=or(Gb,r);return u.jsx(Q.button,{type:"button",...n,ref:e,onClick:L(t.onClick,()=>o.onOpenChange(!1))})});qb.displayName=Gb;function vf(t){return t?"open":"closed"}var Kb="DialogTitleWarning",[SI,Yb]=mA(Kb,{contentName:Gn,titleName:gf,docsSlug:"dialog"}),MI=({titleId:t})=>{const e=Yb(Kb),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
392
+
393
+ If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
394
+
395
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return p.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},EI="DialogDescriptionWarning",jI=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yb(EI).contentName}}.`;return p.useEffect(()=>{var n;const o=(n=t.current)==null?void 0:n.getAttribute("aria-describedby");e&&o&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},Jb=Pb,Xb=Fb,Vl=zb,Zo=Bb,Qo=$b,pa=Vb,ha=Ub,Wl=qb,RI="AlertDialog",[TI]=Oe(RI,[Ib]),kn=Ib(),AI="AlertDialogTrigger",OI=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,o=kn(r);return u.jsx(Xb,{...o,...n,ref:e})});OI.displayName=AI;var DI="AlertDialogPortal",Zb=t=>{const{__scopeAlertDialog:e,...r}=t,n=kn(e);return u.jsx(Vl,{...n,...r})};Zb.displayName=DI;var II="AlertDialogOverlay",Qb=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,o=kn(r);return u.jsx(Zo,{...o,...n,ref:e})});Qb.displayName=II;var To="AlertDialogContent",[PI,LI]=TI(To),FI=Hy("AlertDialogContent"),ex=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,children:n,...o}=t,s=kn(r),a=p.useRef(null),i=oe(e,a),l=p.useRef(null);return u.jsx(SI,{contentName:To,titleName:tx,docsSlug:"alert-dialog",children:u.jsx(PI,{scope:r,cancelRef:l,children:u.jsxs(Qo,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:L(o.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(FI,{children:n}),u.jsx(zI,{contentRef:a})]})})})});ex.displayName=To;var tx="AlertDialogTitle",rx=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,o=kn(r);return u.jsx(pa,{...o,...n,ref:e})});rx.displayName=tx;var nx="AlertDialogDescription",ox=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,o=kn(r);return u.jsx(ha,{...o,...n,ref:e})});ox.displayName=nx;var _I="AlertDialogAction",sx=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,o=kn(r);return u.jsx(Wl,{...o,...n,ref:e})});sx.displayName=_I;var ax="AlertDialogCancel",ix=p.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,{cancelRef:o}=LI(ax,r),s=kn(r),a=oe(e,o);return u.jsx(Wl,{...s,...n,ref:a})});ix.displayName=ax;var zI=({contentRef:t})=>{const e=`\`${To}\` requires a description for the component to be accessible for screen reader users.
396
+
397
+ You can add a description to the \`${To}\` by passing a \`${nx}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
398
+
399
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${To}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
400
+
401
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},BI=Zb,lx=Qb,cx=ex,dx=sx,ux=ix,fx=rx,px=ox,$I=Symbol.for("react.lazy"),Mi=p[" use ".trim().toString()];function HI(t){return typeof t=="object"&&t!==null&&"then"in t}function hx(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===$I&&"_payload"in t&&HI(t._payload)}function mx(t){const e=VI(t),r=p.forwardRef((n,o)=>{let{children:s,...a}=n;hx(s)&&typeof Mi=="function"&&(s=Mi(s._payload));const i=p.Children.toArray(s),l=i.find(UI);if(l){const c=l.props.children,d=i.map(f=>f===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:f);return u.jsx(e,{...a,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,d):null})}return u.jsx(e,{...a,ref:o,children:s})});return r.displayName=`${t}.Slot`,r}var Ul=mx("Slot");function VI(t){const e=p.forwardRef((r,n)=>{let{children:o,...s}=r;if(hx(o)&&typeof Mi=="function"&&(o=Mi(o._payload)),p.isValidElement(o)){const a=qI(o),i=GI(s,o.props);return o.type!==p.Fragment&&(i.ref=n?er(n,a):a),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var WI=Symbol("radix.slottable");function UI(t){return p.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===WI}function GI(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const i=s(...a);return o(...a),i}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function qI(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}const Ao=Ge("inline-flex items-center justify-center 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",{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"}}),Ut=p.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...o},s)=>u.jsx(n?Ul:"button",{className:R(Ao({variant:e,size:r,className:t})),ref:s,...o}));Ut.displayName="Button";const KI=BI,gx=p.forwardRef(({className:t,...e},r)=>u.jsx(lx,{className:R("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",t),...e,ref:r}));gx.displayName=lx.displayName;const YI=p.forwardRef(({className:t,...e},r)=>u.jsxs(KI,{children:[u.jsx(gx,{}),u.jsx(cx,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...e})]}));YI.displayName=cx.displayName;const JI=p.forwardRef(({className:t,...e},r)=>u.jsx(fx,{ref:r,className:R("font-heading text-lg font-semibold",t),...e}));JI.displayName=fx.displayName;const XI=p.forwardRef(({className:t,...e},r)=>u.jsx(px,{ref:r,className:R("text-sm text-muted-foreground",t),...e}));XI.displayName=px.displayName;const ZI=p.forwardRef(({className:t,...e},r)=>u.jsx(dx,{ref:r,className:R(Ao(),t),...e}));ZI.displayName=dx.displayName;const QI=p.forwardRef(({className:t,...e},r)=>u.jsx(ux,{ref:r,className:R(Ao({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));QI.displayName=ux.displayName;var eP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=eP.reduce((t,e)=>{const r=mx(`Primitive.${e}`),n=p.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),tP="AspectRatio",rP=p.forwardRef((t,e)=>{const{ratio:r=1/1,style:n,...o}=t;return u.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":"",children:u.jsx(mt.div,{...o,ref:e,style:{...n,position:"absolute",top:0,right:0,bottom:0,left:0}})})});rP.displayName=tP;function vx(t,e=[]){let r=[];function n(s,a){const i=p.createContext(a);i.displayName=s+"Context";const l=r.length;r=[...r,a];const c=f=>{var h;const{scope:m,children:v,...g}=f,y=((h=m==null?void 0:m[t])==null?void 0:h[l])||i,b=p.useMemo(()=>g,Object.values(g));return u.jsx(y.Provider,{value:b,children:v})};c.displayName=s+"Provider";function d(f,h){var m;const v=((m=h==null?void 0:h[t])==null?void 0:m[l])||i,g=p.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=r.map(a=>p.createContext(a));return function(a){const i=(a==null?void 0:a[t])||s;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:i}}),[a,i])}};return o.scopeName=t,[n,nP(o,...e)]}function nP(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const s=n.reduce((a,{useScope:i,scopeName:l})=>{const c=i(o)[`__scope${l}`];return{...a,...c}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return r.scopeName=e.scopeName,r}var om=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oP(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qd={exports:{}},ed={};/**
402
+ * @license React
403
+ * use-sync-external-store-shim.production.js
404
+ *
405
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
406
+ *
407
+ * This source code is licensed under the MIT license found in the
408
+ * LICENSE file in the root directory of this source tree.
409
+ */var sm;function sP(){if(sm)return ed;sm=1;var t=T;function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function i(f,h){var m=h(),v=n({inst:{value:m,getSnapshot:h}}),g=v[0].inst,y=v[1];return s(function(){g.value=m,g.getSnapshot=h,l(g)&&y({inst:g})},[f,m,h]),o(function(){return l(g)&&y({inst:g}),f(function(){l(g)&&y({inst:g})})},[f]),a(m),m}function l(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!r(f,m)}catch{return!0}}function c(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return ed.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,ed}var am={};/**
410
+ * @license React
411
+ * use-sync-external-store-shim.development.js
412
+ *
413
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
414
+ *
415
+ * This source code is licensed under the MIT license found in the
416
+ * LICENSE file in the root directory of this source tree.
417
+ */var im;function aP(){return im||(im=1,process.env.NODE_ENV!=="production"&&function(){function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}function e(m,v){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=v();if(!f){var y=v();s(g,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=a({inst:{value:g,getSnapshot:v}});var b=y[0].inst,x=y[1];return l(function(){b.value=g,b.getSnapshot=v,r(b)&&x({inst:b})},[m,g,v]),i(function(){return r(b)&&x({inst:b}),m(function(){r(b)&&x({inst:b})})},[m]),c(g),g}function r(m){var v=m.getSnapshot;m=m.value;try{var g=v();return!s(m,g)}catch{return!0}}function n(m,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,s=typeof Object.is=="function"?Object.is:t,a=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;am.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),am}process.env.NODE_ENV==="production"?qd.exports=sP():qd.exports=aP();var ma=qd.exports;function iP(){return ma.useSyncExternalStore(lP,()=>!0,()=>!1)}function lP(){return()=>{}}var yf="Avatar",[cP]=vx(yf),[dP,yx]=cP(yf),bx=p.forwardRef((t,e)=>{const{__scopeAvatar:r,...n}=t,[o,s]=p.useState("idle");return u.jsx(dP,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:u.jsx(mt.span,{...n,ref:e})})});bx.displayName=yf;var xx="AvatarImage",wx=p.forwardRef((t,e)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...s}=t,a=yx(xx,r),i=uP(n,s),l=Te(c=>{o(c),a.onImageLoadingStatusChange(c)});return Ae(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?u.jsx(mt.img,{...s,ref:e,src:n}):null});wx.displayName=xx;var kx="AvatarFallback",Nx=p.forwardRef((t,e)=>{const{__scopeAvatar:r,delayMs:n,...o}=t,s=yx(kx,r),[a,i]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&s.imageLoadingStatus!=="loaded"?u.jsx(mt.span,{...o,ref:e}):null});Nx.displayName=kx;function lm(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function uP(t,{referrerPolicy:e,crossOrigin:r}){const n=iP(),o=p.useRef(null),s=n?(o.current||(o.current=new window.Image),o.current):null,[a,i]=p.useState(()=>lm(s,t));return Ae(()=>{i(lm(s,t))},[s,t]),Ae(()=>{const l=f=>()=>{i(f)};if(!s)return;const c=l("loaded"),d=l("error");return s.addEventListener("load",c),s.addEventListener("error",d),e&&(s.referrerPolicy=e),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",c),s.removeEventListener("error",d)}},[s,r,e]),a}var Cx=bx,Sx=wx,Mx=Nx;const Ex=p.forwardRef(({className:t,...e},r)=>u.jsx(Cx,{ref:r,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Ex.displayName=Cx.displayName;const jx=p.forwardRef(({className:t,...e},r)=>u.jsx(Sx,{ref:r,className:R("aspect-square h-full w-full",t),...e}));jx.displayName=Sx.displayName;const Rx=p.forwardRef(({className:t,...e},r)=>u.jsx(Mx,{ref:r,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Rx.displayName=Mx.displayName;const fP=Ge("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Kd({className:t,variant:e,...r}){return u.jsx("div",{className:R(fP({variant:e}),t),...r})}const pP=Ge("relative flex items-center gap-4 w-full px-4 py-3 text-sm",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",warning:"bg-yellow-500 text-white",success:"bg-green-500 text-white",info:"bg-blue-500 text-white"},position:{top:"fixed top-0 left-0 right-0 z-50",bottom:"fixed bottom-0 left-0 right-0 z-50",inline:"relative"}},defaultVariants:{variant:"default",position:"inline"}}),hP=p.forwardRef(({className:t,variant:e,position:r,icon:n,action:o,dismissible:s=!1,onDismiss:a,children:i,...l},c)=>u.jsxs("div",{ref:c,role:"banner",className:R(pP({variant:e,position:r}),t),...l,children:[n&&u.jsx("span",{className:"shrink-0",children:n}),u.jsx("div",{className:"flex-1",children:i}),o&&u.jsx("div",{className:"shrink-0",children:o}),s&&u.jsx("button",{type:"button",onClick:a,className:"shrink-0 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","aria-label":"Dismiss banner",children:u.jsx(xt,{className:"h-4 w-4"})})]}));hP.displayName="Banner";const mP=p.forwardRef(({...t},e)=>u.jsx("nav",{ref:e,"aria-label":"breadcrumb",...t}));mP.displayName="Breadcrumb";const gP=p.forwardRef(({className:t,...e},r)=>u.jsx("ol",{ref:r,className:R("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));gP.displayName="BreadcrumbList";const vP=p.forwardRef(({className:t,...e},r)=>u.jsx("li",{ref:r,className:R("inline-flex items-center gap-1.5",t),...e}));vP.displayName="BreadcrumbItem";const yP=p.forwardRef(({asChild:t,className:e,...r},n)=>u.jsx(t?Ul:"a",{ref:n,className:R("transition-colors hover:text-foreground",e),...r}));yP.displayName="BreadcrumbLink";const bP=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:R("font-normal text-foreground",t),...e}));bP.displayName="BreadcrumbPage";function xP(t,e,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:r}).format(e).split(/\s/g).slice(2).join(" ")}const cm={},xs={};function Pn(t,e){try{const r=(cm[t]||(cm[t]=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format))(e).split("GMT")[1];return r in xs?xs[r]:dm(r,r.split(":"))}catch{if(t in xs)return xs[t];const r=t==null?void 0:t.match(wP);return r?dm(t,r.slice(1)):NaN}}const wP=/([+-]\d\d):?(\d\d)?/;function dm(t,e){const r=+(e[0]||0),n=+(e[1]||0),o=+(e[2]||0)/60;return xs[t]=r*60+n>0?r*60+n+o:r*60-n-o}class ur extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Pn(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Tx(this),Yd(this)):this.setTime(Date.now())}static tz(e,...r){return r.length?new ur(...r,e):new ur(Date.now(),e)}withTimeZone(e){return new ur(+this,e)}getTimezoneOffset(){const e=-Pn(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Yd(this),+this}[Symbol.for("constructDateFrom")](e){return new ur(+new Date(e),this.timeZone)}}const um=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!um.test(t))return;const e=t.replace(um,"$1UTC");ur.prototype[e]&&(t.startsWith("get")?ur.prototype[t]=function(){return this.internal[e]()}:(ur.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),kP(this),+this},ur.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),Yd(this),+this}))});function Yd(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-Pn(t.timeZone,t)*60))}function kP(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),Tx(t)}function Tx(t){const e=Pn(t.timeZone,t),r=e>0?Math.floor(e):Math.ceil(e),n=new Date(+t);n.setUTCHours(n.getUTCHours()-1);const o=-new Date(+t).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),a=o-s,i=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();a&&i&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+a);const l=o-r;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);const c=new Date(+t);c.setUTCSeconds(0);const d=o>0?c.getSeconds():(c.getSeconds()-60)%60,f=Math.round(-(Pn(t.timeZone,t)*60))%60;(f||d)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+f+d));const h=Pn(t.timeZone,t),m=h>0?Math.floor(h):Math.ceil(h),v=-new Date(+t).getTimezoneOffset()-m,g=m!==r,y=v-l;if(g&&y){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+y);const b=Pn(t.timeZone,t),x=b>0?Math.floor(b):Math.ceil(b),w=m-x;w&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+w),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+w))}}class it extends ur{static tz(e,...r){return r.length?new it(...r,e):new it(Date.now(),e)}toISOString(){const[e,r,n]=this.tzComponents(),o=`${e}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,r,n,o]=this.internal.toUTCString().split(" ");return`${e==null?void 0:e.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${e} GMT${r}${n}${o} (${xP(this.timeZone,this)})`}toLocaleString(e,r){return Date.prototype.toLocaleString.call(this,e,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}toLocaleDateString(e,r){return Date.prototype.toLocaleDateString.call(this,e,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}toLocaleTimeString(e,r){return Date.prototype.toLocaleTimeString.call(this,e,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset(),r=e>0?"-":"+",n=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),o=String(Math.abs(e)%60).padStart(2,"0");return[r,n,o]}withTimeZone(e){return new it(+this,e)}[Symbol.for("constructDateFrom")](e){return new it(+new Date(e),this.timeZone)}}const Ax=6048e5,NP=864e5,fm=Symbol.for("constructDateFrom");function Ve(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&fm in t?t[fm](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ce(t,e){return Ve(e||t,t)}function Ox(t,e,r){const n=Ce(t,void 0);return isNaN(e)?Ve(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function Dx(t,e,r){const n=Ce(t,void 0);if(isNaN(e))return Ve(t,NaN);if(!e)return n;const o=n.getDate(),s=Ve(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const a=s.getDate();return o>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),o),n)}let CP={};function ga(){return CP}function Po(t,e){var r,n,o,s;const a=ga(),i=(e==null?void 0:e.weekStartsOn)??((n=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:n.weekStartsOn)??a.weekStartsOn??((s=(o=a.locale)==null?void 0:o.options)==null?void 0:s.weekStartsOn)??0,l=Ce(t,e==null?void 0:e.in),c=l.getDay(),d=(c<i?7:0)+c-i;return l.setDate(l.getDate()-d),l.setHours(0,0,0,0),l}function Hs(t,e){return Po(t,{...e,weekStartsOn:1})}function Ix(t,e){const r=Ce(t,void 0),n=r.getFullYear(),o=Ve(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const s=Hs(o),a=Ve(r,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=Hs(a);return r.getTime()>=s.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function pm(t){const e=Ce(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function es(t,...e){const r=Ve.bind(null,e.find(n=>typeof n=="object"));return e.map(r)}function Vs(t,e){const r=Ce(t,void 0);return r.setHours(0,0,0,0),r}function bf(t,e,r){const[n,o]=es(void 0,t,e),s=Vs(n),a=Vs(o),i=+s-pm(s),l=+a-pm(a);return Math.round((i-l)/NP)}function SP(t,e){const r=Ix(t),n=Ve(t,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Hs(n)}function MP(t,e,r){return Ox(t,e*7)}function EP(t,e,r){return Dx(t,e*12)}function jP(t,e){let r,n;return t.forEach(o=>{!n&&typeof o=="object"&&(n=Ve.bind(null,o));const s=Ce(o,n);(!r||r<s||isNaN(+s))&&(r=s)}),Ve(n,r||NaN)}function RP(t,e){let r,n;return t.forEach(o=>{!n&&typeof o=="object"&&(n=Ve.bind(null,o));const s=Ce(o,n);(!r||r>s||isNaN(+s))&&(r=s)}),Ve(n,r||NaN)}function TP(t,e,r){const[n,o]=es(void 0,t,e);return+Vs(n)==+Vs(o)}function Px(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function AP(t){return!(!Px(t)&&typeof t!="number"||isNaN(+Ce(t)))}function Lx(t,e,r){const[n,o]=es(void 0,t,e),s=n.getFullYear()-o.getFullYear(),a=n.getMonth()-o.getMonth();return s*12+a}function OP(t,e){const r=Ce(t,void 0),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Fx(t,e){const[r,n]=es(t,e.start,e.end);return{start:r,end:n}}function DP(t,e){const{start:r,end:n}=Fx(void 0,t);let o=+r>+n;const s=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setDate(1);let i=1;const l=[];for(;+a<=s;)l.push(Ve(r,a)),a.setMonth(a.getMonth()+i);return o?l.reverse():l}function IP(t,e){const r=Ce(t,void 0);return r.setDate(1),r.setHours(0,0,0,0),r}function PP(t,e){const r=Ce(t,void 0),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function _x(t,e){const r=Ce(t,void 0);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function LP(t,e){const{start:r,end:n}=Fx(void 0,t);let o=+r>+n;const s=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let i=1;const l=[];for(;+a<=s;)l.push(Ve(r,a)),a.setFullYear(a.getFullYear()+i);return o?l.reverse():l}function zx(t,e){var r,n,o,s;const a=ga(),i=(e==null?void 0:e.weekStartsOn)??((n=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:n.weekStartsOn)??a.weekStartsOn??((s=(o=a.locale)==null?void 0:o.options)==null?void 0:s.weekStartsOn)??0,l=Ce(t,e==null?void 0:e.in),c=l.getDay(),d=(c<i?-7:0)+6-(c-i);return l.setDate(l.getDate()+d),l.setHours(23,59,59,999),l}function FP(t,e){return zx(t,{...e,weekStartsOn:1})}const _P={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zP=(t,e,r)=>{let n;const o=_P[t];return typeof o=="string"?n=o:e===1?n=o.one:n=o.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function td(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const BP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$P={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},HP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VP={date:td({formats:BP,defaultWidth:"full"}),time:td({formats:$P,defaultWidth:"full"}),dateTime:td({formats:HP,defaultWidth:"full"})},WP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UP=(t,e,r,n)=>WP[t];function hs(t){return(e,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let o;if(n==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,i=r!=null&&r.width?String(r.width):a;o=t.formattingValues[i]||t.formattingValues[a]}else{const a=t.defaultWidth,i=r!=null&&r.width?String(r.width):t.defaultWidth;o=t.values[i]||t.values[a]}const s=t.argumentCallback?t.argumentCallback(e):e;return o[s]}}const GP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},YP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ZP=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},QP={ordinalNumber:ZP,era:hs({values:GP,defaultWidth:"wide"}),quarter:hs({values:qP,defaultWidth:"wide",argumentCallback:t=>t-1}),month:hs({values:KP,defaultWidth:"wide"}),day:hs({values:YP,defaultWidth:"wide"}),dayPeriod:hs({values:JP,defaultWidth:"wide",formattingValues:XP,defaultFormattingWidth:"wide"})};function ms(t){return(e,r={})=>{const n=r.width,o=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],s=e.match(o);if(!s)return null;const a=s[0],i=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(i)?tL(i,f=>f.test(a)):eL(i,f=>f.test(a));let c;c=t.valueCallback?t.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const d=e.slice(a.length);return{value:c,rest:d}}}function eL(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function tL(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function rL(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const o=n[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;const i=e.slice(o.length);return{value:a,rest:i}}}const nL=/^(\d+)(th|st|nd|rd)?/i,oL=/\d+/i,sL={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aL={any:[/^b/i,/^(a|c)/i]},iL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lL={any:[/1/i,/2/i,/3/i,/4/i]},cL={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uL={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fL={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pL={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hL={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mL={ordinalNumber:rL({matchPattern:nL,parsePattern:oL,valueCallback:t=>parseInt(t,10)}),era:ms({matchPatterns:sL,defaultMatchWidth:"wide",parsePatterns:aL,defaultParseWidth:"any"}),quarter:ms({matchPatterns:iL,defaultMatchWidth:"wide",parsePatterns:lL,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ms({matchPatterns:cL,defaultMatchWidth:"wide",parsePatterns:dL,defaultParseWidth:"any"}),day:ms({matchPatterns:uL,defaultMatchWidth:"wide",parsePatterns:fL,defaultParseWidth:"any"}),dayPeriod:ms({matchPatterns:pL,defaultMatchWidth:"any",parsePatterns:hL,defaultParseWidth:"any"})},bo={code:"en-US",formatDistance:zP,formatLong:VP,formatRelative:UP,localize:QP,match:mL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gL(t,e){const r=Ce(t,void 0);return bf(r,_x(r))+1}function xf(t,e){const r=Ce(t,void 0),n=+Hs(r)-+SP(r);return Math.round(n/Ax)+1}function Bx(t,e){var r,n,o,s;const a=Ce(t,e==null?void 0:e.in),i=a.getFullYear(),l=ga(),c=(e==null?void 0:e.firstWeekContainsDate)??((n=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:n.firstWeekContainsDate)??l.firstWeekContainsDate??((s=(o=l.locale)==null?void 0:o.options)==null?void 0:s.firstWeekContainsDate)??1,d=Ve((e==null?void 0:e.in)||t,0);d.setFullYear(i+1,0,c),d.setHours(0,0,0,0);const f=Po(d,e),h=Ve((e==null?void 0:e.in)||t,0);h.setFullYear(i,0,c),h.setHours(0,0,0,0);const m=Po(h,e);return+a>=+f?i+1:+a>=+m?i:i-1}function vL(t,e){var r,n,o,s;const a=ga(),i=(e==null?void 0:e.firstWeekContainsDate)??((n=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:n.firstWeekContainsDate)??a.firstWeekContainsDate??((s=(o=a.locale)==null?void 0:o.options)==null?void 0:s.firstWeekContainsDate)??1,l=Bx(t,e),c=Ve((e==null?void 0:e.in)||t,0);return c.setFullYear(l,0,i),c.setHours(0,0,0,0),Po(c,e)}function wf(t,e){const r=Ce(t,e==null?void 0:e.in),n=+Po(r,e)-+vL(r,e);return Math.round(n/Ax)+1}function Ne(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const Jr={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return Ne(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):Ne(r+1,2)},d(t,e){return Ne(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return Ne(t.getHours()%12||12,e.length)},H(t,e){return Ne(t.getHours(),e.length)},m(t,e){return Ne(t.getMinutes(),e.length)},s(t,e){return Ne(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Ne(o,e.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hm={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return Jr.y(t,e)},Y:function(t,e,r,n){const o=Bx(t,n),s=o>0?o:1-o;if(e==="YY"){const a=s%100;return Ne(a,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ne(s,e.length)},R:function(t,e){const r=Ix(t);return Ne(r,e.length)},u:function(t,e){const r=t.getFullYear();return Ne(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Ne(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Ne(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return Jr.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return Ne(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const o=wf(t,n);return e==="wo"?r.ordinalNumber(o,{unit:"week"}):Ne(o,e.length)},I:function(t,e,r){const n=xf(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):Ne(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):Jr.d(t,e)},D:function(t,e,r){const n=gL(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Ne(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const o=t.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ne(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const o=t.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ne(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),o=n===0?7:n;switch(e){case"i":return String(o);case"ii":return Ne(o,e.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let o;switch(n===12?o=mo.noon:n===0?o=mo.midnight:o=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let o;switch(n>=17?o=mo.evening:n>=12?o=mo.afternoon:n>=4?o=mo.morning:o=mo.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Jr.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):Jr.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Ne(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):Ne(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):Jr.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):Jr.s(t,e)},S:function(t,e){return Jr.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return gm(n);case"XXXX":case"XX":return Dn(n);case"XXXXX":case"XXX":default:return Dn(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return gm(n);case"xxxx":case"xx":return Dn(n);case"xxxxx":case"xxx":default:return Dn(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+mm(n,":");case"OOOO":default:return"GMT"+Dn(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+mm(n,":");case"zzzz":default:return"GMT"+Dn(n,":")}},t:function(t,e,r){const n=Math.trunc(+t/1e3);return Ne(n,e.length)},T:function(t,e,r){return Ne(+t,e.length)}};function mm(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),o=Math.trunc(n/60),s=n%60;return s===0?r+String(o):r+String(o)+e+Ne(s,2)}function gm(t,e){return t%60===0?(t>0?"-":"+")+Ne(Math.abs(t)/60,2):Dn(t,e)}function Dn(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),o=Ne(Math.trunc(n/60),2),s=Ne(n%60,2);return r+o+e+s}const vm=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},$x=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},yL=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return vm(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",vm(n,e)).replace("{{time}}",$x(o,e))},bL={p:$x,P:yL},xL=/^D+$/,wL=/^Y+$/,kL=["D","DD","YY","YYYY"];function NL(t){return xL.test(t)}function CL(t){return wL.test(t)}function SL(t,e,r){const n=ML(t,e,r);if(console.warn(n),kL.includes(t))throw new RangeError(n)}function ML(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const EL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RL=/^'([^]*?)'?$/,TL=/''/g,AL=/[a-zA-Z]/;function fr(t,e,r){var n,o,s,a,i,l,c,d;const f=ga(),h=(r==null?void 0:r.locale)??f.locale??bo,m=(r==null?void 0:r.firstWeekContainsDate)??((o=(n=r==null?void 0:r.locale)==null?void 0:n.options)==null?void 0:o.firstWeekContainsDate)??f.firstWeekContainsDate??((a=(s=f.locale)==null?void 0:s.options)==null?void 0:a.firstWeekContainsDate)??1,v=(r==null?void 0:r.weekStartsOn)??((l=(i=r==null?void 0:r.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??f.weekStartsOn??((d=(c=f.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,g=Ce(t,r==null?void 0:r.in);if(!AP(g))throw new RangeError("Invalid time value");let y=e.match(jL).map(x=>{const w=x[0];if(w==="p"||w==="P"){const k=bL[w];return k(x,h.formatLong)}return x}).join("").match(EL).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:OL(x)};if(hm[w])return{isToken:!0,value:x};if(w.match(AL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});h.localize.preprocessor&&(y=h.localize.preprocessor(g,y));const b={firstWeekContainsDate:m,weekStartsOn:v,locale:h};return y.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&CL(w)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&NL(w))&&SL(w,e,String(t));const k=hm[w[0]];return k(g,w,h.localize,b)}).join("")}function OL(t){const e=t.match(RL);return e?e[1].replace(TL,"'"):t}function DL(t,e){const r=Ce(t,void 0),n=r.getFullYear(),o=r.getMonth(),s=Ve(r,0);return s.setFullYear(n,o+1,0),s.setHours(0,0,0,0),s.getDate()}function IL(t,e){return Ce(t,e==null?void 0:e.in).getMonth()}function PL(t,e){return Ce(t,e==null?void 0:e.in).getFullYear()}function LL(t,e){return+Ce(t)>+Ce(e)}function FL(t,e){return+Ce(t)<+Ce(e)}function _L(t,e,r){const[n,o]=es(void 0,t,e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function zL(t,e,r){const[n,o]=es(void 0,t,e);return n.getFullYear()===o.getFullYear()}function BL(t,e,r){const n=Ce(t,void 0),o=n.getFullYear(),s=n.getDate(),a=Ve(t,0);a.setFullYear(o,e,15),a.setHours(0,0,0,0);const i=DL(a);return n.setMonth(e,Math.min(s,i)),n}function $L(t,e,r){const n=Ce(t,void 0);return isNaN(+n)?Ve(t,NaN):(n.setFullYear(e),n)}const ym=5,HL=4;function VL(t,e){const r=e.startOfMonth(t),n=r.getDay()>0?r.getDay():7,o=e.addDays(t,-n+1),s=e.addDays(o,ym*7-1);return e.getMonth(t)===e.getMonth(s)?ym:HL}function Hx(t,e){const r=e.startOfMonth(t),n=r.getDay();return n===1?r:n===0?e.addDays(r,-1*6):e.addDays(r,-1*(n-1))}function WL(t,e){const r=Hx(t,e),n=VL(t,e);return e.addDays(r,n*7-1)}const Vx={...bo,labels:{labelDayButton:(t,e,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,i)=>fr(a,i,{locale:bo,...r});let s=o(t,"PPPP");return e.today&&(s=`Today, ${s}`),e.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:t=>`Week ${t}`,labelYearDropdown:"Choose the Year",labelGrid:(t,e,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>fr(o,s,{locale:bo,...e}),n(t,"LLLL yyyy")},labelGridcell:(t,e,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,i)=>fr(a,i,{locale:bo,...r});let s=o(t,"PPPP");return e!=null&&e.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(t,e,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>fr(o,s,{locale:bo,...e}),n(t,"cccc")}}};class It{constructor(e,r){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?it.tz(this.options.timeZone):new this.Date},this.newDate=(n,o,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(n,o,s):this.options.timeZone?new it(n,o,s,this.options.timeZone):new Date(n,o,s)},this.addDays=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,o):Ox(n,o)},this.addMonths=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,o):Dx(n,o)},this.addWeeks=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,o):MP(n,o)},this.addYears=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,o):EP(n,o)},this.differenceInCalendarDays=(n,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):bf(n,o)},this.differenceInCalendarMonths=(n,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):Lx(n,o)},this.eachMonthOfInterval=n=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):DP(n)},this.eachYearOfInterval=n=>{var o;const s=(o=this.overrides)!=null&&o.eachYearOfInterval?this.overrides.eachYearOfInterval(n):LP(n),a=new Set(s.map(l=>this.getYear(l)));if(a.size===s.length)return s;const i=[];return a.forEach(l=>{i.push(new Date(l,0,1))}),i},this.endOfBroadcastWeek=n=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):WL(n,this)},this.endOfISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(n):FP(n)},this.endOfMonth=n=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(n):OP(n)},this.endOfWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,o):zx(n,this.options)},this.endOfYear=n=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(n):PP(n)},this.format=(n,o,s)=>{var a;const i=(a=this.overrides)!=null&&a.format?this.overrides.format(n,o,this.options):fr(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(n):xf(n)},this.getMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):IL(n,this.options)},this.getYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):PL(n,this.options)},this.getWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):wf(n,this.options)},this.isAfter=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,o):LL(n,o)},this.isBefore=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,o):FL(n,o)},this.isDate=n=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(n):Px(n)},this.isSameDay=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,o):TP(n,o)},this.isSameMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,o):_L(n,o)},this.isSameYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,o):zL(n,o)},this.max=n=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(n):jP(n)},this.min=n=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(n):RP(n)},this.setMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,o):BL(n,o)},this.setYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,o):$L(n,o)},this.startOfBroadcastWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):Hx(n,this)},this.startOfDay=n=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(n):Vs(n)},this.startOfISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(n):Hs(n)},this.startOfMonth=n=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(n):IP(n)},this.startOfWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):Po(n,this.options)},this.startOfYear=n=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(n):_x(n)},this.options={locale:Vx,...e},this.overrides=r}getDigitMap(){const{numerals:e="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(e){const r=this.getDigitMap();return e.replace(/\d/g,n=>r[n]||n)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){var e;const r=(e=this.options.locale)==null?void 0:e.code;return r&&It.yearFirstLocales.has(r)?"year-first":"month-first"}formatMonthYear(e){const{locale:r,timeZone:n,numerals:o}=this.options,s=r==null?void 0:r.code;if(s&&It.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(e)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(e,a)}}It.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const br=new It;class Wx{constructor(e,r,n=br){this.date=e,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(e,r)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class UL{constructor(e,r){this.date=e,this.weeks=r}}class GL{constructor(e,r){this.days=r,this.weekNumber=e}}function qL(t){return T.createElement("button",{...t})}function KL(t){return T.createElement("span",{...t})}function YL(t){const{size:e=24,orientation:r="left",className:n}=t;return T.createElement("svg",{className:n,width:e,height:e,viewBox:"0 0 24 24"},r==="up"&&T.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&T.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&T.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&T.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function JL(t){const{day:e,modifiers:r,...n}=t;return T.createElement("td",{...n})}function XL(t){const{day:e,modifiers:r,...n}=t,o=T.useRef(null);return T.useEffect(()=>{var s;r.focused&&((s=o.current)==null||s.focus())},[r.focused]),T.createElement("button",{ref:o,...n})}var ie;(function(t){t.Root="root",t.Chevron="chevron",t.Day="day",t.DayButton="day_button",t.CaptionLabel="caption_label",t.Dropdowns="dropdowns",t.Dropdown="dropdown",t.DropdownRoot="dropdown_root",t.Footer="footer",t.MonthGrid="month_grid",t.MonthCaption="month_caption",t.MonthsDropdown="months_dropdown",t.Month="month",t.Months="months",t.Nav="nav",t.NextMonthButton="button_next",t.PreviousMonthButton="button_previous",t.Week="week",t.Weeks="weeks",t.Weekday="weekday",t.Weekdays="weekdays",t.WeekNumber="week_number",t.WeekNumberHeader="week_number_header",t.YearsDropdown="years_dropdown"})(ie||(ie={}));var Ie;(function(t){t.disabled="disabled",t.hidden="hidden",t.outside="outside",t.focused="focused",t.today="today"})(Ie||(Ie={}));var Xt;(function(t){t.range_end="range_end",t.range_middle="range_middle",t.range_start="range_start",t.selected="selected"})(Xt||(Xt={}));var Rt;(function(t){t.weeks_before_enter="weeks_before_enter",t.weeks_before_exit="weeks_before_exit",t.weeks_after_enter="weeks_after_enter",t.weeks_after_exit="weeks_after_exit",t.caption_after_enter="caption_after_enter",t.caption_after_exit="caption_after_exit",t.caption_before_enter="caption_before_enter",t.caption_before_exit="caption_before_exit"})(Rt||(Rt={}));function ZL(t){const{options:e,className:r,components:n,classNames:o,...s}=t,a=[o[ie.Dropdown],r].join(" "),i=e==null?void 0:e.find(({value:l})=>l===s.value);return T.createElement("span",{"data-disabled":s.disabled,className:o[ie.DropdownRoot]},T.createElement(n.Select,{className:a,...s},e==null?void 0:e.map(({value:l,label:c,disabled:d})=>T.createElement(n.Option,{key:l,value:l,disabled:d},c))),T.createElement("span",{className:o[ie.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,T.createElement(n.Chevron,{orientation:"down",size:18,className:o[ie.Chevron]})))}function QL(t){return T.createElement("div",{...t})}function eF(t){return T.createElement("div",{...t})}function tF(t){const{calendarMonth:e,displayIndex:r,...n}=t;return T.createElement("div",{...n},t.children)}function rF(t){const{calendarMonth:e,displayIndex:r,...n}=t;return T.createElement("div",{...n})}function nF(t){return T.createElement("table",{...t})}function oF(t){return T.createElement("div",{...t})}const Ux=T.createContext(void 0);function va(){const t=T.useContext(Ux);if(t===void 0)throw new Error("useDayPicker() must be used within a custom component.");return t}function sF(t){const{components:e}=va();return T.createElement(e.Dropdown,{...t})}function aF(t){const{onPreviousClick:e,onNextClick:r,previousMonth:n,nextMonth:o,...s}=t,{components:a,classNames:i,labels:{labelPrevious:l,labelNext:c}}=va(),d=T.useCallback(h=>{o&&(r==null||r(h))},[o,r]),f=T.useCallback(h=>{n&&(e==null||e(h))},[n,e]);return T.createElement("nav",{...s},T.createElement(a.PreviousMonthButton,{type:"button",className:i[ie.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":l(n),onClick:f},T.createElement(a.Chevron,{disabled:n?void 0:!0,className:i[ie.Chevron],orientation:"left"})),T.createElement(a.NextMonthButton,{type:"button",className:i[ie.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:d},T.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ie.Chevron]})))}function iF(t){const{components:e}=va();return T.createElement(e.Button,{...t})}function lF(t){return T.createElement("option",{...t})}function cF(t){const{components:e}=va();return T.createElement(e.Button,{...t})}function dF(t){const{rootRef:e,...r}=t;return T.createElement("div",{...r,ref:e})}function uF(t){return T.createElement("select",{...t})}function fF(t){const{week:e,...r}=t;return T.createElement("tr",{...r})}function pF(t){return T.createElement("th",{...t})}function hF(t){return T.createElement("thead",{"aria-hidden":!0},T.createElement("tr",{...t}))}function mF(t){const{week:e,...r}=t;return T.createElement("th",{...r})}function gF(t){return T.createElement("th",{...t})}function vF(t){return T.createElement("tbody",{...t})}function yF(t){const{components:e}=va();return T.createElement(e.Dropdown,{...t})}const bF=Object.freeze(Object.defineProperty({__proto__:null,Button:qL,CaptionLabel:KL,Chevron:YL,Day:JL,DayButton:XL,Dropdown:ZL,DropdownNav:QL,Footer:eF,Month:tF,MonthCaption:rF,MonthGrid:nF,Months:oF,MonthsDropdown:sF,Nav:aF,NextMonthButton:iF,Option:lF,PreviousMonthButton:cF,Root:dF,Select:uF,Week:fF,WeekNumber:mF,WeekNumberHeader:gF,Weekday:pF,Weekdays:hF,Weeks:vF,YearsDropdown:yF},Symbol.toStringTag,{value:"Module"}));function Pr(t,e,r=!1,n=br){let{from:o,to:s}=t;const{differenceInCalendarDays:a,isSameDay:i}=n;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(e,o)>=(r?1:0)&&a(s,e)>=(r?1:0)):!r&&s?i(s,e):!r&&o?i(o,e):!1}function kf(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function Gl(t){return!!(t&&typeof t=="object"&&"from"in t)}function Nf(t){return!!(t&&typeof t=="object"&&"after"in t)}function Cf(t){return!!(t&&typeof t=="object"&&"before"in t)}function Gx(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function qx(t,e){return Array.isArray(t)&&t.every(e.isDate)}function Lr(t,e,r=br){const n=Array.isArray(e)?e:[e],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=r;return n.some(i=>{if(typeof i=="boolean")return i;if(r.isDate(i))return o(t,i);if(qx(i,r))return i.some(l=>o(t,l));if(Gl(i))return Pr(i,t,!1,r);if(Gx(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(t.getDay()):i.dayOfWeek===t.getDay();if(kf(i)){const l=s(i.before,t),c=s(i.after,t),d=l>0,f=c<0;return a(i.before,i.after)?f&&d:d||f}return Nf(i)?s(t,i.after)>0:Cf(i)?s(i.before,t)>0:typeof i=="function"?i(t):!1})}function xF(t,e,r,n,o){const{disabled:s,hidden:a,modifiers:i,showOutsideDays:l,broadcastCalendar:c,today:d=o.today()}=e,{isSameDay:f,isSameMonth:h,startOfMonth:m,isBefore:v,endOfMonth:g,isAfter:y}=o,b=r&&m(r),x=n&&g(n),w={[Ie.focused]:[],[Ie.outside]:[],[Ie.disabled]:[],[Ie.hidden]:[],[Ie.today]:[]},k={};for(const N of t){const{date:S,displayMonth:C}=N,M=!!(C&&!h(S,C)),E=!!(b&&v(S,b)),A=!!(x&&y(S,x)),O=!!(s&&Lr(S,s,o)),D=!!(a&&Lr(S,a,o))||E||A||!c&&!l&&M||c&&l===!1&&M,q=f(S,d);M&&w.outside.push(N),O&&w.disabled.push(N),D&&w.hidden.push(N),q&&w.today.push(N),i&&Object.keys(i).forEach(F=>{const $=i==null?void 0:i[F];$&&Lr(S,$,o)&&(k[F]?k[F].push(N):k[F]=[N])})}return N=>{const S={[Ie.focused]:!1,[Ie.disabled]:!1,[Ie.hidden]:!1,[Ie.outside]:!1,[Ie.today]:!1},C={};for(const M in w){const E=w[M];S[M]=E.some(A=>A===N)}for(const M in k)C[M]=k[M].some(E=>E===N);return{...S,...C}}}function wF(t,e,r={}){return Object.entries(t).filter(([,n])=>n===!0).reduce((n,[o])=>(r[o]?n.push(r[o]):e[Ie[o]]?n.push(e[Ie[o]]):e[Xt[o]]&&n.push(e[Xt[o]]),n),[e[ie.Day]])}function kF(t){return{...bF,...t}}function NF(t){const e={"data-mode":t.mode??void 0,"data-required":"required"in t?t.required:void 0,"data-multiple-months":t.numberOfMonths&&t.numberOfMonths>1||void 0,"data-week-numbers":t.showWeekNumber||void 0,"data-broadcast-calendar":t.broadcastCalendar||void 0,"data-nav-layout":t.navLayout||void 0};return Object.entries(t).forEach(([r,n])=>{r.startsWith("data-")&&(e[r]=n)}),e}function CF(){const t={};for(const e in ie)t[ie[e]]=`rdp-${ie[e]}`;for(const e in Ie)t[Ie[e]]=`rdp-${Ie[e]}`;for(const e in Xt)t[Xt[e]]=`rdp-${Xt[e]}`;for(const e in Rt)t[Rt[e]]=`rdp-${Rt[e]}`;return t}function Kx(t,e,r){return(r??new It(e)).formatMonthYear(t)}const SF=Kx;function MF(t,e,r){return(r??new It(e)).format(t,"d")}function EF(t,e=br){return e.format(t,"LLLL")}function jF(t,e,r){return(r??new It(e)).format(t,"cccccc")}function RF(t,e=br){return t<10?e.formatNumber(`0${t.toLocaleString()}`):e.formatNumber(`${t.toLocaleString()}`)}function TF(){return""}function Yx(t,e=br){return e.format(t,"yyyy")}const AF=Yx,OF=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Kx,formatDay:MF,formatMonthCaption:SF,formatMonthDropdown:EF,formatWeekNumber:RF,formatWeekNumberHeader:TF,formatWeekdayName:jF,formatYearCaption:AF,formatYearDropdown:Yx},Symbol.toStringTag,{value:"Module"}));function DF(t){return t!=null&&t.formatMonthCaption&&!t.formatCaption&&(t.formatCaption=t.formatMonthCaption),t!=null&&t.formatYearCaption&&!t.formatYearDropdown&&(t.formatYearDropdown=t.formatYearCaption),{...OF,...t}}function Sf(t,e,r,n){let o=(n??new It(r)).format(t,"PPPP");return e.today&&(o=`Today, ${o}`),e.selected&&(o=`${o}, selected`),o}const IF=Sf;function Mf(t,e,r){return(r??new It(e)).formatMonthYear(t)}const PF=Mf;function Jx(t,e,r,n){let o=(n??new It(r)).format(t,"PPPP");return e!=null&&e.today&&(o=`Today, ${o}`),o}function Xx(t){return"Choose the Month"}function Zx(){return""}const LF="Go to the Next Month";function Qx(t,e){return LF}function e0(t){return"Go to the Previous Month"}function t0(t,e,r){return(r??new It(e)).format(t,"cccc")}function r0(t,e){return`Week ${t}`}function n0(t){return"Week Number"}function o0(t){return"Choose the Year"}const FF=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:PF,labelDay:IF,labelDayButton:Sf,labelGrid:Mf,labelGridcell:Jx,labelMonthDropdown:Xx,labelNav:Zx,labelNext:Qx,labelPrevious:e0,labelWeekNumber:r0,labelWeekNumberHeader:n0,labelWeekday:t0,labelYearDropdown:o0},Symbol.toStringTag,{value:"Module"})),Kt=(t,e,r)=>e||(r?typeof r=="function"?r:(...n)=>r:t);function _F(t,e){var r;const n=((r=e.locale)==null?void 0:r.labels)??{};return{...FF,...t??{},labelDayButton:Kt(Sf,t==null?void 0:t.labelDayButton,n.labelDayButton),labelMonthDropdown:Kt(Xx,t==null?void 0:t.labelMonthDropdown,n.labelMonthDropdown),labelNext:Kt(Qx,t==null?void 0:t.labelNext,n.labelNext),labelPrevious:Kt(e0,t==null?void 0:t.labelPrevious,n.labelPrevious),labelWeekNumber:Kt(r0,t==null?void 0:t.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Kt(o0,t==null?void 0:t.labelYearDropdown,n.labelYearDropdown),labelGrid:Kt(Mf,t==null?void 0:t.labelGrid,n.labelGrid),labelGridcell:Kt(Jx,t==null?void 0:t.labelGridcell,n.labelGridcell),labelNav:Kt(Zx,t==null?void 0:t.labelNav,n.labelNav),labelWeekNumberHeader:Kt(n0,t==null?void 0:t.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Kt(t0,t==null?void 0:t.labelWeekday,n.labelWeekday)}}function zF(t,e,r,n,o){const{startOfMonth:s,startOfYear:a,endOfYear:i,eachMonthOfInterval:l,getMonth:c}=o;return l({start:a(t),end:i(t)}).map(d=>{const f=n.formatMonthDropdown(d,o),h=c(d),m=e&&d<s(e)||r&&d>s(r)||!1;return{value:h,label:f,disabled:m}})}function BF(t,e={},r={}){let n={...e==null?void 0:e[ie.Day]};return Object.entries(t).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r==null?void 0:r[o]}}),n}function $F(t,e,r,n){const o=n??t.today(),s=r?t.startOfBroadcastWeek(o,t):e?t.startOfISOWeek(o):t.startOfWeek(o),a=[];for(let i=0;i<7;i++){const l=t.addDays(s,i);a.push(l)}return a}function HF(t,e,r,n,o=!1){if(!t||!e)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:i,getYear:l}=n,c=s(t),d=a(e),f=i({start:c,end:d});return o&&f.reverse(),f.map(h=>{const m=r.formatYearDropdown(h,n);return{value:l(h),label:m,disabled:!1}})}function VF(t,e={}){var r;const{weekStartsOn:n,locale:o}=e,s=n??((r=o==null?void 0:o.options)==null?void 0:r.weekStartsOn)??0,a=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new it(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,t)},i=l=>{const c=a(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>a(it.tz(t)),newDate:(l,c,d)=>new it(l,c,d,12,0,0,t),startOfDay:l=>a(l),startOfWeek:(l,c)=>{const d=a(l),f=(c==null?void 0:c.weekStartsOn)??s,h=(d.getDay()-f+7)%7;return d.setDate(d.getDate()-h),d},startOfISOWeek:l=>{const c=a(l),d=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-d),c},startOfMonth:l=>{const c=a(l);return c.setDate(1),c},startOfYear:l=>{const c=a(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const d=a(l),f=((((c==null?void 0:c.weekStartsOn)??s)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+f),d},endOfISOWeek:l=>{const c=a(l),d=(7-c.getDay())%7;return c.setDate(c.getDate()+d),c},endOfMonth:l=>{const c=a(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=a(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=a(l.start),d=a(l.end),f=[],h=new it(c.getFullYear(),c.getMonth(),1,12,0,0,t),m=d.getFullYear()*12+d.getMonth();for(;h.getFullYear()*12+h.getMonth()<=m;)f.push(new it(h,t)),h.setMonth(h.getMonth()+1,1);return f},addDays:(l,c)=>{const d=a(l);return d.setDate(d.getDate()+c),d},addWeeks:(l,c)=>{const d=a(l);return d.setDate(d.getDate()+c*7),d},addMonths:(l,c)=>{const d=a(l);return d.setMonth(d.getMonth()+c),d},addYears:(l,c)=>{const d=a(l);return d.setFullYear(d.getFullYear()+c),d},eachYearOfInterval:l=>{const c=a(l.start),d=a(l.end),f=[],h=new it(c.getFullYear(),0,1,12,0,0,t);for(;h.getFullYear()<=d.getFullYear();)f.push(new it(h,t)),h.setFullYear(h.getFullYear()+1,0,1);return f},getWeek:(l,c)=>{var d;const f=i(l);return wf(f,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??s,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((d=o==null?void 0:o.options)==null?void 0:d.firstWeekContainsDate)??1})},getISOWeek:l=>{const c=i(l);return xf(c)},differenceInCalendarDays:(l,c)=>{const d=i(l),f=i(c);return bf(d,f)},differenceInCalendarMonths:(l,c)=>{const d=i(l),f=i(c);return Lx(d,f)}}}const ya=t=>t instanceof HTMLElement?t:null,rd=t=>[...t.querySelectorAll("[data-animated-month]")??[]],WF=t=>ya(t.querySelector("[data-animated-month]")),nd=t=>ya(t.querySelector("[data-animated-caption]")),od=t=>ya(t.querySelector("[data-animated-weeks]")),UF=t=>ya(t.querySelector("[data-animated-nav]")),GF=t=>ya(t.querySelector("[data-animated-weekdays]"));function qF(t,e,{classNames:r,months:n,focused:o,dateLib:s}){const a=T.useRef(null),i=T.useRef(n),l=T.useRef(!1);T.useLayoutEffect(()=>{const c=i.current;if(i.current=n,!e||!t.current||!(t.current instanceof HTMLElement)||n.length===0||c.length===0||n.length!==c.length)return;const d=s.isSameMonth(n[0].date,c[0].date),f=s.isAfter(n[0].date,c[0].date),h=f?r[Rt.caption_after_enter]:r[Rt.caption_before_enter],m=f?r[Rt.weeks_after_enter]:r[Rt.weeks_before_enter],v=a.current,g=t.current.cloneNode(!0);if(g instanceof HTMLElement?(rd(g).forEach(x=>{if(!(x instanceof HTMLElement))return;const w=WF(x);w&&x.contains(w)&&x.removeChild(w);const k=nd(x);k&&k.classList.remove(h);const N=od(x);N&&N.classList.remove(m)}),a.current=g):a.current=null,l.current||d||o)return;const y=v instanceof HTMLElement?rd(v):[],b=rd(t.current);if(b!=null&&b.every(x=>x instanceof HTMLElement)&&y&&y.every(x=>x instanceof HTMLElement)){l.current=!0,t.current.style.isolation="isolate";const x=UF(t.current);x&&(x.style.zIndex="1"),b.forEach((w,k)=>{const N=y[k];if(!N)return;w.style.position="relative",w.style.overflow="hidden";const S=nd(w);S&&S.classList.add(h);const C=od(w);C&&C.classList.add(m);const M=()=>{l.current=!1,t.current&&(t.current.style.isolation=""),x&&(x.style.zIndex=""),S&&S.classList.remove(h),C&&C.classList.remove(m),w.style.position="",w.style.overflow="",w.contains(N)&&w.removeChild(N)};N.style.pointerEvents="none",N.style.position="absolute",N.style.overflow="hidden",N.setAttribute("aria-hidden","true");const E=GF(N);E&&(E.style.opacity="0");const A=nd(N);A&&(A.classList.add(f?r[Rt.caption_before_exit]:r[Rt.caption_after_exit]),A.addEventListener("animationend",M));const O=od(N);O&&O.classList.add(f?r[Rt.weeks_before_exit]:r[Rt.weeks_after_exit]),w.insertBefore(N,w.firstChild)})}})}function KF(t,e,r,n){const o=t[0],s=t[t.length-1],{ISOWeek:a,fixedWeeks:i,broadcastCalendar:l}=r??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:h,endOfISOWeek:m,endOfMonth:v,endOfWeek:g,isAfter:y,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=n,k=l?b(o,n):a?x(o):w(o),N=l?h(s):a?m(v(s)):g(v(s)),S=e&&(l?h(e):a?m(e):g(e)),C=S&&y(N,S)?S:N,M=d(C,k),E=f(s,o)+1,A=[];for(let D=0;D<=M;D++){const q=c(k,D);A.push(q)}const O=(l?35:42)*E;if(i&&A.length<O){const D=O-A.length;for(let q=0;q<D;q++){const F=c(A[A.length-1],1);A.push(F)}}return A}function YF(t){const e=[];return t.reduce((r,n)=>{const o=n.weeks.reduce((s,a)=>s.concat(a.days.slice()),e.slice());return r.concat(o.slice())},e.slice())}function JF(t,e,r,n){const{numberOfMonths:o=1}=r,s=[];for(let a=0;a<o;a++){const i=n.addMonths(t,a);if(e&&i>e)break;s.push(i)}return s}function bm(t,e,r,n){const{month:o,defaultMonth:s,today:a=n.today(),numberOfMonths:i=1}=t;let l=o||s||a;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:f}=n;if(r&&c(r,l)<i-1){const h=-1*(i-1);l=d(r,h)}return e&&c(l,e)<0&&(l=e),f(l)}function XF(t,e,r,n){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:i,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:h,startOfWeek:m}=n,v=t.reduce((g,y)=>{const b=r.broadcastCalendar?f(y,n):r.ISOWeek?h(y):m(y),x=r.broadcastCalendar?s(y):r.ISOWeek?a(i(y)):l(i(y)),w=e.filter(C=>C>=b&&C<=x),k=r.broadcastCalendar?35:42;if(r.fixedWeeks&&w.length<k){const C=e.filter(M=>{const E=k-w.length;return M>x&&M<=o(x,E)});w.push(...C)}const N=w.reduce((C,M)=>{const E=r.ISOWeek?c(M):d(M),A=C.find(D=>D.weekNumber===E),O=new Wx(M,y,n);return A?A.days.push(O):C.push(new GL(E,[O])),C},[]),S=new UL(y,N);return g.push(S),g},[]);return r.reverseMonths?v.reverse():v}function ZF(t,e){let{startMonth:r,endMonth:n}=t;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:i,addYears:l,endOfYear:c,newDate:d,today:f}=e,{fromYear:h,toYear:m,fromMonth:v,toMonth:g}=t;!r&&v&&(r=v),!r&&h&&(r=e.newDate(h,0,1)),!n&&g&&(n=g),!n&&m&&(n=d(m,11,31));const y=t.captionLayout==="dropdown"||t.captionLayout==="dropdown-years";return r?r=a(r):h?r=d(h,0,1):!r&&y&&(r=o(l(t.today??f(),-100))),n?n=i(n):m?n=d(m,11,31):!n&&y&&(n=c(t.today??f())),[r&&s(r),n&&s(n)]}function QF(t,e,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=r,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:l}=n,c=o?s:1,d=a(t);if(!e||!(l(e,t)<s))return i(d,c)}function e4(t,e,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=r,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:l}=n,c=o?s??1:1,d=a(t);if(!e||!(l(d,e)<=0))return i(d,-c)}function t4(t){const e=[];return t.reduce((r,n)=>r.concat(n.weeks.slice()),e.slice())}function ql(t,e){const[r,n]=T.useState(t);return[e===void 0?r:e,n]}function r4(t,e){var r;const[n,o]=ZF(t,e),{startOfMonth:s,endOfMonth:a}=e,i=bm(t,n,o,e),[l,c]=ql(i,t.month?i:void 0);T.useEffect(()=>{const w=bm(t,n,o,e);c(w)},[t.timeZone]);const{months:d,weeks:f,days:h,previousMonth:m,nextMonth:v}=T.useMemo(()=>{const w=JF(l,o,{numberOfMonths:t.numberOfMonths},e),k=KF(w,t.endMonth?a(t.endMonth):void 0,{ISOWeek:t.ISOWeek,fixedWeeks:t.fixedWeeks,broadcastCalendar:t.broadcastCalendar},e),N=XF(w,k,{broadcastCalendar:t.broadcastCalendar,fixedWeeks:t.fixedWeeks,ISOWeek:t.ISOWeek,reverseMonths:t.reverseMonths},e),S=t4(N),C=YF(N),M=e4(l,n,t,e),E=QF(l,o,t,e);return{months:N,weeks:S,days:C,previousMonth:M,nextMonth:E}},[e,l.getTime(),o==null?void 0:o.getTime(),n==null?void 0:n.getTime(),t.disableNavigation,t.broadcastCalendar,(r=t.endMonth)==null?void 0:r.getTime(),t.fixedWeeks,t.ISOWeek,t.numberOfMonths,t.pagedNavigation,t.reverseMonths]),{disableNavigation:g,onMonthChange:y}=t,b=w=>f.some(k=>k.days.some(N=>N.isEqualTo(w))),x=w=>{if(g)return;let k=s(w);n&&k<s(n)&&(k=s(n)),o&&k>s(o)&&(k=s(o)),c(k),y==null||y(k)};return{months:d,weeks:f,days:h,navStart:n,navEnd:o,previousMonth:m,nextMonth:v,goToMonth:x,goToDay:w=>{b(w)||x(w.date)}}}var ar;(function(t){t[t.Today=0]="Today",t[t.Selected=1]="Selected",t[t.LastFocused=2]="LastFocused",t[t.FocusedModifier=3]="FocusedModifier"})(ar||(ar={}));function xm(t){return!t[Ie.disabled]&&!t[Ie.hidden]&&!t[Ie.outside]}function n4(t,e,r,n){let o,s=-1;for(const a of t){const i=e(a);xm(i)&&(i[Ie.focused]&&s<ar.FocusedModifier?(o=a,s=ar.FocusedModifier):n!=null&&n.isEqualTo(a)&&s<ar.LastFocused?(o=a,s=ar.LastFocused):r(a.date)&&s<ar.Selected?(o=a,s=ar.Selected):i[Ie.today]&&s<ar.Today&&(o=a,s=ar.Today))}return o||(o=t.find(a=>xm(e(a)))),o}function o4(t,e,r,n,o,s,a){const{ISOWeek:i,broadcastCalendar:l}=s,{addDays:c,addMonths:d,addWeeks:f,addYears:h,endOfBroadcastWeek:m,endOfISOWeek:v,endOfWeek:g,max:y,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:k}=a;let N={day:c,week:f,month:d,year:h,startOfWeek:S=>l?x(S,a):i?w(S):k(S),endOfWeek:S=>l?m(S):i?v(S):g(S)}[t](r,e==="after"?1:-1);return e==="before"&&n?N=y([n,N]):e==="after"&&o&&(N=b([o,N])),N}function s0(t,e,r,n,o,s,a,i=0){if(i>365)return;const l=o4(t,e,r.date,n,o,s,a),c=!!(s.disabled&&Lr(l,s.disabled,a)),d=!!(s.hidden&&Lr(l,s.hidden,a)),f=l,h=new Wx(l,f,a);return!c&&!d?h:s0(t,e,h,n,o,s,a,i+1)}function s4(t,e,r,n,o){const{autoFocus:s}=t,[a,i]=T.useState(),l=n4(e.days,r,n||(()=>!1),a),[c,d]=T.useState(s?l:void 0);return{isFocusTarget:f=>!!(l!=null&&l.isEqualTo(f)),setFocused:d,focused:c,blur:()=>{i(c),d(void 0)},moveFocus:(f,h)=>{if(!c)return;const m=s0(f,h,c,e.navStart,e.navEnd,t,o);m&&(t.disableNavigation&&!e.days.some(v=>v.isEqualTo(m))||(e.goToDay(m),d(m)))}}}function a4(t,e){const{selected:r,required:n,onSelect:o}=t,[s,a]=ql(r,o?r:void 0),i=o?r:s,{isSameDay:l}=e,c=h=>(i==null?void 0:i.some(m=>l(m,h)))??!1,{min:d,max:f}=t;return{selected:i,select:(h,m,v)=>{let g=[...i??[]];if(c(h)){if((i==null?void 0:i.length)===d||n&&(i==null?void 0:i.length)===1)return;g=i==null?void 0:i.filter(y=>!l(y,h))}else(i==null?void 0:i.length)===f?g=[h]:g=[...g,h];return o||a(g),o==null||o(g,h,m,v),g},isSelected:c}}function i4(t,e,r=0,n=0,o=!1,s=br){const{from:a,to:i}=e||{},{isSameDay:l,isAfter:c,isBefore:d}=s;let f;if(!a&&!i)f={from:t,to:r>0?void 0:t};else if(a&&!i)l(a,t)?r===0?f={from:a,to:t}:o?f={from:a,to:void 0}:f=void 0:d(t,a)?f={from:t,to:a}:f={from:a,to:t};else if(a&&i)if(l(a,t)&&l(i,t))o?f={from:a,to:i}:f=void 0;else if(l(a,t))f={from:a,to:r>0?void 0:t};else if(l(i,t))f={from:t,to:r>0?void 0:t};else if(d(t,a))f={from:t,to:i};else if(c(t,a))f={from:a,to:t};else if(c(t,i))f={from:a,to:t};else throw new Error("Invalid range");if(f!=null&&f.from&&f!=null&&f.to){const h=s.differenceInCalendarDays(f.to,f.from);n>0&&h>n?f={from:t,to:void 0}:r>1&&h<r&&(f={from:t,to:void 0})}return f}function l4(t,e,r=br){const n=Array.isArray(e)?e:[e];let o=t.from;const s=r.differenceInCalendarDays(t.to,t.from),a=Math.min(s,6);for(let i=0;i<=a;i++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function wm(t,e,r=br){return Pr(t,e.from,!1,r)||Pr(t,e.to,!1,r)||Pr(e,t.from,!1,r)||Pr(e,t.to,!1,r)}function c4(t,e,r=br){const n=Array.isArray(e)?e:[e];if(n.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:r.isDate(s)?Pr(t,s,!1,r):qx(s,r)?s.some(a=>Pr(t,a,!1,r)):Gl(s)?s.from&&s.to?wm(t,{from:s.from,to:s.to},r):!1:Gx(s)?l4(t,s.dayOfWeek,r):kf(s)?r.isAfter(s.before,s.after)?wm(t,{from:r.addDays(s.after,1),to:r.addDays(s.before,-1)},r):Lr(t.from,s,r)||Lr(t.to,s,r):Nf(s)||Cf(s)?Lr(t.from,s,r)||Lr(t.to,s,r):!1))return!0;const o=n.filter(s=>typeof s=="function");if(o.length){let s=t.from;const a=r.differenceInCalendarDays(t.to,t.from);for(let i=0;i<=a;i++){if(o.some(l=>l(s)))return!0;s=r.addDays(s,1)}}return!1}function d4(t,e){const{disabled:r,excludeDisabled:n,selected:o,required:s,onSelect:a}=t,[i,l]=ql(o,a?o:void 0),c=a?o:i;return{selected:c,select:(d,f,h)=>{const{min:m,max:v}=t,g=d?i4(d,c,m,v,s,e):void 0;return n&&r&&g!=null&&g.from&&g.to&&c4({from:g.from,to:g.to},r,e)&&(g.from=d,g.to=void 0),a||l(g),a==null||a(g,d,f,h),g},isSelected:d=>c&&Pr(c,d,!1,e)}}function u4(t,e){const{selected:r,required:n,onSelect:o}=t,[s,a]=ql(r,o?r:void 0),i=o?r:s,{isSameDay:l}=e;return{selected:i,select:(c,d,f)=>{let h=c;return!n&&i&&i&&l(c,i)&&(h=void 0),o||a(h),o==null||o(h,c,d,f),h},isSelected:c=>i?l(i,c):!1}}function f4(t,e){const r=u4(t,e),n=a4(t,e),o=d4(t,e);switch(t.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function _t(t,e){return t instanceof it&&t.timeZone===e?t:new it(t,e)}function go(t,e,r){return _t(t,e)}function km(t,e,r){return typeof t=="boolean"||typeof t=="function"?t:t instanceof Date?go(t,e):Array.isArray(t)?t.map(n=>n instanceof Date?go(n,e):n):Gl(t)?{...t,from:t.from?_t(t.from,e):t.from,to:t.to?_t(t.to,e):t.to}:kf(t)?{before:go(t.before,e),after:go(t.after,e)}:Nf(t)?{after:go(t.after,e)}:Cf(t)?{before:go(t.before,e)}:t}function sd(t,e,r){return t&&(Array.isArray(t)?t.map(n=>km(n,e)):km(t,e))}function p4(t){var e;let r=t;const n=r.timeZone;if(n&&(r={...t,timeZone:n},r.today&&(r.today=_t(r.today,n)),r.month&&(r.month=_t(r.month,n)),r.defaultMonth&&(r.defaultMonth=_t(r.defaultMonth,n)),r.startMonth&&(r.startMonth=_t(r.startMonth,n)),r.endMonth&&(r.endMonth=_t(r.endMonth,n)),r.mode==="single"&&r.selected?r.selected=_t(r.selected,n):r.mode==="multiple"&&r.selected?r.selected=(e=r.selected)==null?void 0:e.map(pe=>_t(pe,n)):r.mode==="range"&&r.selected&&(r.selected={from:r.selected.from?_t(r.selected.from,n):r.selected.from,to:r.selected.to?_t(r.selected.to,n):r.selected.to}),r.disabled!==void 0&&(r.disabled=sd(r.disabled,n)),r.hidden!==void 0&&(r.hidden=sd(r.hidden,n)),r.modifiers)){const pe={};Object.keys(r.modifiers).forEach(we=>{var de;pe[we]=sd((de=r.modifiers)==null?void 0:de[we],n)}),r.modifiers=pe}const{components:o,formatters:s,labels:a,dateLib:i,locale:l,classNames:c}=T.useMemo(()=>{const pe={...Vx,...r.locale},we=r.broadcastCalendar?1:r.weekStartsOn,de=r.noonSafe&&r.timeZone?VF(r.timeZone,{weekStartsOn:we,locale:pe}):void 0,xe=r.dateLib&&de?{...de,...r.dateLib}:r.dateLib??de,vt=new It({locale:pe,weekStartsOn:we,firstWeekContainsDate:r.firstWeekContainsDate,useAdditionalWeekYearTokens:r.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:r.useAdditionalDayOfYearTokens,timeZone:r.timeZone,numerals:r.numerals},xe);return{dateLib:vt,components:kF(r.components),formatters:DF(r.formatters),labels:_F(r.labels,vt.options),locale:pe,classNames:{...CF(),...r.classNames}}},[r.locale,r.broadcastCalendar,r.weekStartsOn,r.firstWeekContainsDate,r.useAdditionalWeekYearTokens,r.useAdditionalDayOfYearTokens,r.timeZone,r.numerals,r.dateLib,r.noonSafe,r.components,r.formatters,r.labels,r.classNames]);r.today||(r={...r,today:i.today()});const{captionLayout:d,mode:f,navLayout:h,numberOfMonths:m=1,onDayBlur:v,onDayClick:g,onDayFocus:y,onDayKeyDown:b,onDayMouseEnter:x,onDayMouseLeave:w,onNextClick:k,onPrevClick:N,showWeekNumber:S,styles:C}=r,{formatCaption:M,formatDay:E,formatMonthDropdown:A,formatWeekNumber:O,formatWeekNumberHeader:D,formatWeekdayName:q,formatYearDropdown:F}=s,$=r4(r,i),{days:H,months:P,navStart:_,navEnd:z,previousMonth:B,nextMonth:G,goToMonth:I}=$,J=xF(H,r,_,z,i),{isSelected:ee,select:W,selected:Z}=f4(r,i)??{},{blur:V,focused:X,isFocusTarget:te,moveFocus:ne,setFocused:Y}=s4(r,$,J,ee??(()=>!1),i),{labelDayButton:se,labelGridcell:ue,labelGrid:Se,labelMonthDropdown:et,labelNav:$e,labelPrevious:dt,labelNext:Cr,labelWeekday:qe,labelWeekNumber:Mt,labelWeekNumberHeader:gt,labelYearDropdown:Et}=a,Ur=T.useMemo(()=>$F(i,r.ISOWeek,r.broadcastCalendar,r.today),[i,r.ISOWeek,r.broadcastCalendar,r.today]),Tn=f!==void 0||g!==void 0,Sr=T.useCallback(()=>{B&&(I(B),N==null||N(B))},[B,I,N]),Mr=T.useCallback(()=>{G&&(I(G),k==null||k(G))},[I,G,k]),An=T.useCallback((pe,we)=>de=>{de.preventDefault(),de.stopPropagation(),Y(pe),!we.disabled&&(W==null||W(pe.date,we,de),g==null||g(pe.date,we,de))},[W,g,Y]),co=T.useCallback((pe,we)=>de=>{Y(pe),y==null||y(pe.date,we,de)},[y,Y]),ut=T.useCallback((pe,we)=>de=>{V(),v==null||v(pe.date,we,de)},[V,v]),tt=T.useCallback((pe,we)=>de=>{const xe={ArrowLeft:[de.shiftKey?"month":"day",r.dir==="rtl"?"after":"before"],ArrowRight:[de.shiftKey?"month":"day",r.dir==="rtl"?"before":"after"],ArrowDown:[de.shiftKey?"year":"week","after"],ArrowUp:[de.shiftKey?"year":"week","before"],PageUp:[de.shiftKey?"year":"month","before"],PageDown:[de.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(xe[de.key]){de.preventDefault(),de.stopPropagation();const[vt,be]=xe[de.key];ne(vt,be)}b==null||b(pe.date,we,de)},[ne,b,r.dir]),Er=T.useCallback((pe,we)=>de=>{x==null||x(pe.date,we,de)},[x]),cs=T.useCallback((pe,we)=>de=>{w==null||w(pe.date,we,de)},[w]),uo=T.useCallback(pe=>we=>{const de=Number(we.target.value),xe=i.setMonth(i.startOfMonth(pe),de);I(xe)},[i,I]),_c=T.useCallback(pe=>we=>{const de=Number(we.target.value),xe=i.setYear(i.startOfMonth(pe),de);I(xe)},[i,I]),{className:zc,style:Bc}=T.useMemo(()=>({className:[c[ie.Root],r.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ie.Root],...r.style}}),[c,r.className,r.style,C]),$c=NF(r),za=T.useRef(null);qF(za,!!r.animate,{classNames:c,months:P,focused:X,dateLib:i});const Ba={dayPickerProps:r,selected:Z,select:W,isSelected:ee,months:P,nextMonth:G,previousMonth:B,goToMonth:I,getModifiers:J,components:o,classNames:c,styles:C,labels:a,formatters:s};return T.createElement(Ux.Provider,{value:Ba},T.createElement(o.Root,{rootRef:r.animate?za:void 0,className:zc,style:Bc,dir:r.dir,id:r.id,lang:r.lang,nonce:r.nonce,title:r.title,role:r.role,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],...$c},T.createElement(o.Months,{className:c[ie.Months],style:C==null?void 0:C[ie.Months]},!r.hideNavigation&&!h&&T.createElement(o.Nav,{"data-animated-nav":r.animate?"true":void 0,className:c[ie.Nav],style:C==null?void 0:C[ie.Nav],"aria-label":$e(),onPreviousClick:Sr,onNextClick:Mr,previousMonth:B,nextMonth:G}),P.map((pe,we)=>T.createElement(o.Month,{"data-animated-month":r.animate?"true":void 0,className:c[ie.Month],style:C==null?void 0:C[ie.Month],key:we,displayIndex:we,calendarMonth:pe},h==="around"&&!r.hideNavigation&&we===0&&T.createElement(o.PreviousMonthButton,{type:"button",className:c[ie.PreviousMonthButton],tabIndex:B?void 0:-1,"aria-disabled":B?void 0:!0,"aria-label":dt(B),onClick:Sr,"data-animated-button":r.animate?"true":void 0},T.createElement(o.Chevron,{disabled:B?void 0:!0,className:c[ie.Chevron],orientation:r.dir==="rtl"?"right":"left"})),T.createElement(o.MonthCaption,{"data-animated-caption":r.animate?"true":void 0,className:c[ie.MonthCaption],style:C==null?void 0:C[ie.MonthCaption],calendarMonth:pe,displayIndex:we},d!=null&&d.startsWith("dropdown")?T.createElement(o.DropdownNav,{className:c[ie.Dropdowns],style:C==null?void 0:C[ie.Dropdowns]},(()=>{const de=d==="dropdown"||d==="dropdown-months"?T.createElement(o.MonthsDropdown,{key:"month",className:c[ie.MonthsDropdown],"aria-label":et(),classNames:c,components:o,disabled:!!r.disableNavigation,onChange:uo(pe.date),options:zF(pe.date,_,z,s,i),style:C==null?void 0:C[ie.Dropdown],value:i.getMonth(pe.date)}):T.createElement("span",{key:"month"},A(pe.date,i)),xe=d==="dropdown"||d==="dropdown-years"?T.createElement(o.YearsDropdown,{key:"year",className:c[ie.YearsDropdown],"aria-label":Et(i.options),classNames:c,components:o,disabled:!!r.disableNavigation,onChange:_c(pe.date),options:HF(_,z,s,i,!!r.reverseYears),style:C==null?void 0:C[ie.Dropdown],value:i.getYear(pe.date)}):T.createElement("span",{key:"year"},F(pe.date,i));return i.getMonthYearOrder()==="year-first"?[xe,de]:[de,xe]})(),T.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},M(pe.date,i.options,i))):T.createElement(o.CaptionLabel,{className:c[ie.CaptionLabel],role:"status","aria-live":"polite"},M(pe.date,i.options,i))),h==="around"&&!r.hideNavigation&&we===m-1&&T.createElement(o.NextMonthButton,{type:"button",className:c[ie.NextMonthButton],tabIndex:G?void 0:-1,"aria-disabled":G?void 0:!0,"aria-label":Cr(G),onClick:Mr,"data-animated-button":r.animate?"true":void 0},T.createElement(o.Chevron,{disabled:G?void 0:!0,className:c[ie.Chevron],orientation:r.dir==="rtl"?"left":"right"})),we===m-1&&h==="after"&&!r.hideNavigation&&T.createElement(o.Nav,{"data-animated-nav":r.animate?"true":void 0,className:c[ie.Nav],style:C==null?void 0:C[ie.Nav],"aria-label":$e(),onPreviousClick:Sr,onNextClick:Mr,previousMonth:B,nextMonth:G}),T.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":Se(pe.date,i.options,i)||void 0,className:c[ie.MonthGrid],style:C==null?void 0:C[ie.MonthGrid]},!r.hideWeekdays&&T.createElement(o.Weekdays,{"data-animated-weekdays":r.animate?"true":void 0,className:c[ie.Weekdays],style:C==null?void 0:C[ie.Weekdays]},S&&T.createElement(o.WeekNumberHeader,{"aria-label":gt(i.options),className:c[ie.WeekNumberHeader],style:C==null?void 0:C[ie.WeekNumberHeader],scope:"col"},D()),Ur.map(de=>T.createElement(o.Weekday,{"aria-label":qe(de,i.options,i),className:c[ie.Weekday],key:String(de),style:C==null?void 0:C[ie.Weekday],scope:"col"},q(de,i.options,i)))),T.createElement(o.Weeks,{"data-animated-weeks":r.animate?"true":void 0,className:c[ie.Weeks],style:C==null?void 0:C[ie.Weeks]},pe.weeks.map(de=>T.createElement(o.Week,{className:c[ie.Week],key:de.weekNumber,style:C==null?void 0:C[ie.Week],week:de},S&&T.createElement(o.WeekNumber,{week:de,style:C==null?void 0:C[ie.WeekNumber],"aria-label":Mt(de.weekNumber,{locale:l}),className:c[ie.WeekNumber],scope:"row",role:"rowheader"},O(de.weekNumber,i)),de.days.map(xe=>{const{date:vt}=xe,be=J(xe);if(be[Ie.focused]=!be.hidden&&!!(X!=null&&X.isEqualTo(xe)),be[Xt.selected]=(ee==null?void 0:ee(vt))||be.selected,Gl(Z)){const{from:Vc,to:Wc}=Z;be[Xt.range_start]=!!(Vc&&Wc&&i.isSameDay(vt,Vc)),be[Xt.range_end]=!!(Vc&&Wc&&i.isSameDay(vt,Wc)),be[Xt.range_middle]=Pr(Z,vt,!0,i)}const $a=BF(be,C,r.modifiersStyles),Hc=wF(be,c,r.modifiersClassNames),vT=!Tn&&!be.hidden?ue(vt,be,i.options,i):void 0;return T.createElement(o.Day,{key:`${xe.isoDate}_${xe.displayMonthId}`,day:xe,modifiers:be,className:Hc.join(" "),style:$a,role:"gridcell","aria-selected":be.selected||void 0,"aria-label":vT,"data-day":xe.isoDate,"data-month":xe.outside?xe.dateMonthId:void 0,"data-selected":be.selected||void 0,"data-disabled":be.disabled||void 0,"data-hidden":be.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":be.focused||void 0,"data-today":be.today||void 0},!be.hidden&&Tn?T.createElement(o.DayButton,{className:c[ie.DayButton],style:C==null?void 0:C[ie.DayButton],type:"button",day:xe,modifiers:be,disabled:!be.focused&&be.disabled||void 0,"aria-disabled":be.focused&&be.disabled||void 0,tabIndex:te(xe)?0:-1,"aria-label":se(vt,be,i.options,i),onClick:An(xe,be),onBlur:ut(xe,be),onFocus:co(xe,be),onKeyDown:tt(xe,be),onMouseEnter:Er(xe,be),onMouseLeave:cs(xe,be)},E(vt,i.options,i)):!be.hidden&&E(xe.date,i.options,i))})))))))),r.footer&&T.createElement(o.Footer,{className:c[ie.Footer],style:C==null?void 0:C[ie.Footer],role:"status","aria-live":"polite"},r.footer)))}function Kl({className:t,classNames:e,showOutsideDays:r=!0,...n}){return u.jsx(p4,{showOutsideDays:r,className:R("p-3",t),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",button_previous:R(Ao({variant:"outline"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:R(Ao({variant:"outline"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day_button:R(Ao({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...e},components:{Chevron:({orientation:o})=>o==="left"?u.jsx(db,{className:"h-4 w-4"}):u.jsx(Jo,{className:"h-4 w-4"})},...n})}Kl.displayName="Calendar";const Ef=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Ef.displayName="Card";const a0=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex flex-col space-y-1.5 p-6",t),...e}));a0.displayName="CardHeader";const i0=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("font-heading text-2xl font-semibold leading-none tracking-tight",t),...e}));i0.displayName="CardTitle";const l0=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("text-sm text-muted-foreground",t),...e}));l0.displayName="CardDescription";const jf=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("p-6 pt-0",t),...e}));jf.displayName="CardContent";const c0=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex items-center p-6 pt-0",t),...e}));c0.displayName="CardFooter";function h4(t){return Object.prototype.toString.call(t)==="[object Object]"}function Nm(t){return h4(t)||Array.isArray(t)}function m4(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Rf(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;const o=JSON.stringify(Object.keys(t.breakpoints||{})),s=JSON.stringify(Object.keys(e.breakpoints||{}));return o!==s?!1:r.every(a=>{const i=t[a],l=e[a];return typeof i=="function"?`${i}`==`${l}`:!Nm(i)||!Nm(l)?i===l:Rf(i,l)})}function Cm(t){return t.concat().sort((e,r)=>e.name>r.name?1:-1).map(e=>e.options)}function g4(t,e){if(t.length!==e.length)return!1;const r=Cm(t),n=Cm(e);return r.every((o,s)=>{const a=n[s];return Rf(o,a)})}function Tf(t){return typeof t=="number"}function Jd(t){return typeof t=="string"}function Yl(t){return typeof t=="boolean"}function Sm(t){return Object.prototype.toString.call(t)==="[object Object]"}function Le(t){return Math.abs(t)}function Af(t){return Math.sign(t)}function As(t,e){return Le(t-e)}function v4(t,e){if(t===0||e===0||Le(t)<=Le(e))return 0;const r=As(Le(t),Le(e));return Le(r/t)}function y4(t){return Math.round(t*100)/100}function Ws(t){return Us(t).map(Number)}function Qt(t){return t[ba(t)]}function ba(t){return Math.max(0,t.length-1)}function Of(t,e){return e===ba(t)}function Mm(t,e=0){return Array.from(Array(t),(r,n)=>e+n)}function Us(t){return Object.keys(t)}function d0(t,e){return[t,e].reduce((r,n)=>(Us(n).forEach(o=>{const s=r[o],a=n[o],i=Sm(s)&&Sm(a);r[o]=i?d0(s,a):a}),r),{})}function Xd(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function b4(t,e){const r={start:n,center:o,end:s};function n(){return 0}function o(i){return s(i)/2}function s(i){return e-i}function a(i,l){return Jd(t)?r[t](i):t(e,i,l)}return{measure:a}}function Gs(){let t=[];function e(o,s,a,i={passive:!0}){let l;if("addEventListener"in o)o.addEventListener(s,a,i),l=()=>o.removeEventListener(s,a,i);else{const c=o;c.addListener(a),l=()=>c.removeListener(a)}return t.push(l),n}function r(){t=t.filter(o=>o())}const n={add:e,clear:r};return n}function x4(t,e,r,n){const o=Gs(),s=1e3/60;let a=null,i=0,l=0;function c(){o.add(t,"visibilitychange",()=>{t.hidden&&v()})}function d(){m(),o.clear()}function f(g){if(!l)return;a||(a=g,r(),r());const y=g-a;for(a=g,i+=y;i>=s;)r(),i-=s;const b=i/s;n(b),l&&(l=e.requestAnimationFrame(f))}function h(){l||(l=e.requestAnimationFrame(f))}function m(){e.cancelAnimationFrame(l),a=null,i=0,l=0}function v(){a=null,i=0}return{init:c,destroy:d,start:h,stop:m,update:r,render:n}}function w4(t,e){const r=e==="rtl",n=t==="y",o=n?"y":"x",s=n?"x":"y",a=!n&&r?-1:1,i=d(),l=f();function c(m){const{height:v,width:g}=m;return n?v:g}function d(){return n?"top":r?"right":"left"}function f(){return n?"bottom":r?"left":"right"}function h(m){return m*a}return{scroll:o,cross:s,startEdge:i,endEdge:l,measureSize:c,direction:h}}function qn(t=0,e=0){const r=Le(t-e);function n(l){return l<t}function o(l){return l>e}function s(l){return n(l)||o(l)}function a(l){return s(l)?n(l)?t:e:l}function i(l){return r?l-r*Math.ceil((l-e)/r):l}return{length:r,max:e,min:t,constrain:a,reachedAny:s,reachedMax:o,reachedMin:n,removeOffset:i}}function u0(t,e,r){const{constrain:n}=qn(0,t),o=t+1;let s=a(e);function a(h){return r?Le((o+h)%o):n(h)}function i(){return s}function l(h){return s=a(h),f}function c(h){return d().set(i()+h)}function d(){return u0(t,i(),r)}const f={get:i,set:l,add:c,clone:d};return f}function k4(t,e,r,n,o,s,a,i,l,c,d,f,h,m,v,g,y,b,x){const{cross:w,direction:k}=t,N=["INPUT","SELECT","TEXTAREA"],S={passive:!1},C=Gs(),M=Gs(),E=qn(50,225).constrain(m.measure(20)),A={mouse:300,touch:400},O={mouse:500,touch:600},D=v?43:25;let q=!1,F=0,$=0,H=!1,P=!1,_=!1,z=!1;function B(Y){if(!x)return;function se(Se){(Yl(x)||x(Y,Se))&&Z(Se)}const ue=e;C.add(ue,"dragstart",Se=>Se.preventDefault(),S).add(ue,"touchmove",()=>{},S).add(ue,"touchend",()=>{}).add(ue,"touchstart",se).add(ue,"mousedown",se).add(ue,"touchcancel",X).add(ue,"contextmenu",X).add(ue,"click",te,!0)}function G(){C.clear(),M.clear()}function I(){const Y=z?r:e;M.add(Y,"touchmove",V,S).add(Y,"touchend",X).add(Y,"mousemove",V,S).add(Y,"mouseup",X)}function J(Y){const se=Y.nodeName||"";return N.includes(se)}function ee(){return(v?O:A)[z?"mouse":"touch"]}function W(Y,se){const ue=f.add(Af(Y)*-1),Se=d.byDistance(Y,!v).distance;return v||Le(Y)<E?Se:y&&se?Se*.5:d.byIndex(ue.get(),0).distance}function Z(Y){const se=Xd(Y,n);z=se,_=v&&se&&!Y.buttons&&q,q=As(o.get(),a.get())>=2,!(se&&Y.button!==0)&&(J(Y.target)||(H=!0,s.pointerDown(Y),c.useFriction(0).useDuration(0),o.set(a),I(),F=s.readPoint(Y),$=s.readPoint(Y,w),h.emit("pointerDown")))}function V(Y){if(!Xd(Y,n)&&Y.touches.length>=2)return X(Y);const se=s.readPoint(Y),ue=s.readPoint(Y,w),Se=As(se,F),et=As(ue,$);if(!P&&!z&&(!Y.cancelable||(P=Se>et,!P)))return X(Y);const $e=s.pointerMove(Y);Se>g&&(_=!0),c.useFriction(.3).useDuration(.75),i.start(),o.add(k($e)),Y.preventDefault()}function X(Y){const se=d.byDistance(0,!1).index!==f.get(),ue=s.pointerUp(Y)*ee(),Se=W(k(ue),se),et=v4(ue,Se),$e=D-10*et,dt=b+et/50;P=!1,H=!1,M.clear(),c.useDuration($e).useFriction(dt),l.distance(Se,!v),z=!1,h.emit("pointerUp")}function te(Y){_&&(Y.stopPropagation(),Y.preventDefault(),_=!1)}function ne(){return H}return{init:B,destroy:G,pointerDown:ne}}function N4(t,e){let r,n;function o(c){return c.timeStamp}function s(c,d){const f=`client${(d||t.scroll)==="x"?"X":"Y"}`;return(Xd(c,e)?c:c.touches[0])[f]}function a(c){return r=c,n=c,s(c)}function i(c){const d=s(c)-s(n),f=o(c)-o(r)>170;return n=c,f&&(r=c),d}function l(c){if(!r||!n)return 0;const d=s(n)-s(r),f=o(c)-o(r),h=o(c)-o(n)>170,m=d/f;return f&&!h&&Le(m)>.1?m:0}return{pointerDown:a,pointerMove:i,pointerUp:l,readPoint:s}}function C4(){function t(e){const{offsetTop:r,offsetLeft:n,offsetWidth:o,offsetHeight:s}=e;return{top:r,right:n+o,bottom:r+s,left:n,width:o,height:s}}return{measure:t}}function S4(t){function e(r){return t*(r/100)}return{measure:e}}function M4(t,e,r,n,o,s,a){const i=[t].concat(n);let l,c,d=[],f=!1;function h(g){return o.measureSize(a.measure(g))}function m(g){if(!s)return;c=h(t),d=n.map(h);function y(b){for(const x of b){if(f)return;const w=x.target===t,k=n.indexOf(x.target),N=w?c:d[k],S=h(w?t:n[k]);if(Le(S-N)>=.5){g.reInit(),e.emit("resize");break}}}l=new ResizeObserver(b=>{(Yl(s)||s(g,b))&&y(b)}),r.requestAnimationFrame(()=>{i.forEach(b=>l.observe(b))})}function v(){f=!0,l&&l.disconnect()}return{init:m,destroy:v}}function E4(t,e,r,n,o,s){let a=0,i=0,l=o,c=s,d=t.get(),f=0;function h(){const S=n.get()-t.get(),C=!l;let M=0;return C?(a=0,r.set(n),t.set(n),M=S):(r.set(t),a+=S/l,a*=c,d+=a,t.add(a),M=d-f),i=Af(M),f=d,N}function m(){const S=n.get()-e.get();return Le(S)<.001}function v(){return l}function g(){return i}function y(){return a}function b(){return w(o)}function x(){return k(s)}function w(S){return l=S,N}function k(S){return c=S,N}const N={direction:g,duration:v,velocity:y,seek:h,settled:m,useBaseFriction:x,useBaseDuration:b,useFriction:k,useDuration:w};return N}function j4(t,e,r,n,o){const s=o.measure(10),a=o.measure(50),i=qn(.1,.99);let l=!1;function c(){return!(l||!t.reachedAny(r.get())||!t.reachedAny(e.get()))}function d(h){if(!c())return;const m=t.reachedMin(e.get())?"min":"max",v=Le(t[m]-e.get()),g=r.get()-e.get(),y=i.constrain(v/a);r.subtract(g*y),!h&&Le(g)<s&&(r.set(t.constrain(r.get())),n.useDuration(25).useBaseFriction())}function f(h){l=!h}return{shouldConstrain:c,constrain:d,toggleActive:f}}function R4(t,e,r,n,o){const s=qn(-e+t,0),a=f(),i=d(),l=h();function c(m,v){return As(m,v)<=1}function d(){const m=a[0],v=Qt(a),g=a.lastIndexOf(m),y=a.indexOf(v)+1;return qn(g,y)}function f(){return r.map((m,v)=>{const{min:g,max:y}=s,b=s.constrain(m),x=!v,w=Of(r,v);return x?y:w||c(g,b)?g:c(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function h(){if(e<=t+o)return[s.max];if(n==="keepSnaps")return a;const{min:m,max:v}=i;return a.slice(m,v)}return{snapsContained:l,scrollContainLimit:i}}function T4(t,e,r){const n=e[0],o=r?n-t:Qt(e);return{limit:qn(o,n)}}function A4(t,e,r,n){const o=e.min+.1,s=e.max+.1,{reachedMin:a,reachedMax:i}=qn(o,s);function l(d){return d===1?i(r.get()):d===-1?a(r.get()):!1}function c(d){if(!l(d))return;const f=t*(d*-1);n.forEach(h=>h.add(f))}return{loop:c}}function O4(t){const{max:e,length:r}=t;function n(o){const s=o-e;return r?s/-r:0}return{get:n}}function D4(t,e,r,n,o){const{startEdge:s,endEdge:a}=t,{groupSlides:i}=o,l=f().map(e.measure),c=h(),d=m();function f(){return i(n).map(v=>Qt(v)[a]-v[0][s]).map(Le)}function h(){return n.map(v=>r[s]-v[s]).map(v=>-Le(v))}function m(){return i(c).map(v=>v[0]).map((v,g)=>v+l[g])}return{snaps:c,snapsAligned:d}}function I4(t,e,r,n,o,s){const{groupSlides:a}=o,{min:i,max:l}=n,c=d();function d(){const f=a(s),h=!t||e==="keepSnaps";return r.length===1?[s]:h?f:f.slice(i,l).map((m,v,g)=>{const y=!v,b=Of(g,v);if(y){const x=Qt(g[0])+1;return Mm(x)}if(b){const x=ba(s)-Qt(g)[0]+1;return Mm(x,Qt(g)[0])}return m})}return{slideRegistry:c}}function P4(t,e,r,n,o){const{reachedAny:s,removeOffset:a,constrain:i}=n;function l(m){return m.concat().sort((v,g)=>Le(v)-Le(g))[0]}function c(m){const v=t?a(m):i(m),g=e.map((b,x)=>({diff:d(b-v,0),index:x})).sort((b,x)=>Le(b.diff)-Le(x.diff)),{index:y}=g[0];return{index:y,distance:v}}function d(m,v){const g=[m,m+r,m-r];if(!t)return m;if(!v)return l(g);const y=g.filter(b=>Af(b)===v);return y.length?l(y):Qt(g)-r}function f(m,v){const g=e[m]-o.get(),y=d(g,v);return{index:m,distance:y}}function h(m,v){const g=o.get()+m,{index:y,distance:b}=c(g),x=!t&&s(g);if(!v||x)return{index:y,distance:m};const w=e[y]-b,k=m+d(w,0);return{index:y,distance:k}}return{byDistance:h,byIndex:f,shortcut:d}}function L4(t,e,r,n,o,s,a){function i(d){const f=d.distance,h=d.index!==e.get();s.add(f),f&&(n.duration()?t.start():(t.update(),t.render(1),t.update())),h&&(r.set(e.get()),e.set(d.index),a.emit("select"))}function l(d,f){const h=o.byDistance(d,f);i(h)}function c(d,f){const h=e.clone().set(d),m=o.byIndex(h.get(),f);i(m)}return{distance:l,index:c}}function F4(t,e,r,n,o,s,a,i){const l={passive:!0,capture:!0};let c=0;function d(h){if(!i)return;function m(v){if(new Date().getTime()-c>10)return;a.emit("slideFocusStart"),t.scrollLeft=0;const g=r.findIndex(y=>y.includes(v));Tf(g)&&(o.useDuration(0),n.index(g,0),a.emit("slideFocus"))}s.add(document,"keydown",f,!1),e.forEach((v,g)=>{s.add(v,"focus",y=>{(Yl(i)||i(h,y))&&m(g)},l)})}function f(h){h.code==="Tab"&&(c=new Date().getTime())}return{init:d}}function ws(t){let e=t;function r(){return e}function n(i){e=a(i)}function o(i){e+=a(i)}function s(i){e-=a(i)}function a(i){return Tf(i)?i:i.get()}return{get:r,set:n,add:o,subtract:s}}function f0(t,e){const r=t.scroll==="x"?a:i,n=e.style;let o=null,s=!1;function a(f){return`translate3d(${f}px,0px,0px)`}function i(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(s)return;const h=y4(t.direction(f));h!==o&&(n.transform=r(h),o=h)}function c(f){s=!f}function d(){s||(n.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function _4(t,e,r,n,o,s,a,i,l){const c=Ws(o),d=Ws(o).reverse(),f=y().concat(b());function h(N,S){return N.reduce((C,M)=>C-o[M],S)}function m(N,S){return N.reduce((C,M)=>h(C,S)>0?C.concat([M]):C,[])}function v(N){return s.map((S,C)=>({start:S-n[C]+.5+N,end:S+e-.5+N}))}function g(N,S,C){const M=v(S);return N.map(E=>{const A=C?0:-r,O=C?r:0,D=C?"end":"start",q=M[E][D];return{index:E,loopPoint:q,slideLocation:ws(-1),translate:f0(t,l[E]),target:()=>i.get()>q?A:O}})}function y(){const N=a[0],S=m(d,N);return g(S,r,!1)}function b(){const N=e-a[0]-1,S=m(c,N);return g(S,-r,!0)}function x(){return f.every(({index:N})=>{const S=c.filter(C=>C!==N);return h(S,e)<=.1})}function w(){f.forEach(N=>{const{target:S,translate:C,slideLocation:M}=N,E=S();E!==M.get()&&(C.to(E),M.set(E))})}function k(){f.forEach(N=>N.translate.clear())}return{canLoop:x,clear:k,loop:w,loopPoints:f}}function z4(t,e,r){let n,o=!1;function s(i){if(!r)return;function l(c){for(const d of c)if(d.type==="childList"){i.reInit(),e.emit("slidesChanged");break}}n=new MutationObserver(c=>{o||(Yl(r)||r(i,c))&&l(c)}),n.observe(t,{childList:!0})}function a(){n&&n.disconnect(),o=!0}return{init:s,destroy:a}}function B4(t,e,r,n){const o={};let s=null,a=null,i,l=!1;function c(){i=new IntersectionObserver(m=>{l||(m.forEach(v=>{const g=e.indexOf(v.target);o[g]=v}),s=null,a=null,r.emit("slidesInView"))},{root:t.parentElement,threshold:n}),e.forEach(m=>i.observe(m))}function d(){i&&i.disconnect(),l=!0}function f(m){return Us(o).reduce((v,g)=>{const y=parseInt(g),{isIntersecting:b}=o[y];return(m&&b||!m&&!b)&&v.push(y),v},[])}function h(m=!0){if(m&&s)return s;if(!m&&a)return a;const v=f(m);return m&&(s=v),m||(a=v),v}return{init:c,destroy:d,get:h}}function $4(t,e,r,n,o,s){const{measureSize:a,startEdge:i,endEdge:l}=t,c=r[0]&&o,d=v(),f=g(),h=r.map(a),m=y();function v(){if(!c)return 0;const b=r[0];return Le(e[i]-b[i])}function g(){if(!c)return 0;const b=s.getComputedStyle(Qt(n));return parseFloat(b.getPropertyValue(`margin-${l}`))}function y(){return r.map((b,x,w)=>{const k=!x,N=Of(w,x);return k?h[x]+d:N?h[x]+f:w[x+1][i]-b[i]}).map(Le)}return{slideSizes:h,slideSizesWithGaps:m,startGap:d,endGap:f}}function H4(t,e,r,n,o,s,a,i,l){const{startEdge:c,endEdge:d,direction:f}=t,h=Tf(r);function m(y,b){return Ws(y).filter(x=>x%b===0).map(x=>y.slice(x,x+b))}function v(y){return y.length?Ws(y).reduce((b,x,w)=>{const k=Qt(b)||0,N=k===0,S=x===ba(y),C=o[c]-s[k][c],M=o[c]-s[x][d],E=!n&&N?f(a):0,A=!n&&S?f(i):0,O=Le(M-A-(C+E));return w&&O>e+l&&b.push(x),S&&b.push(y.length),b},[]).map((b,x,w)=>{const k=Math.max(w[x-1]||0);return y.slice(k,b)}):[]}function g(y){return h?m(y,r):v(y)}return{groupSlides:g}}function V4(t,e,r,n,o,s,a){const{align:i,axis:l,direction:c,startIndex:d,loop:f,duration:h,dragFree:m,dragThreshold:v,inViewThreshold:g,slidesToScroll:y,skipSnaps:b,containScroll:x,watchResize:w,watchSlides:k,watchDrag:N,watchFocus:S}=s,C=2,M=C4(),E=M.measure(e),A=r.map(M.measure),O=w4(l,c),D=O.measureSize(E),q=S4(D),F=b4(i,D),$=!f&&!!x,H=f||!!x,{slideSizes:P,slideSizesWithGaps:_,startGap:z,endGap:B}=$4(O,E,A,r,H,o),G=H4(O,D,y,f,E,A,z,B,C),{snaps:I,snapsAligned:J}=D4(O,F,E,A,G),ee=-Qt(I)+Qt(_),{snapsContained:W,scrollContainLimit:Z}=R4(D,ee,J,x,C),V=$?W:J,{limit:X}=T4(ee,V,f),te=u0(ba(V),d,f),ne=te.clone(),Y=Ws(r),se=({dragHandler:tt,scrollBody:Er,scrollBounds:cs,options:{loop:uo}})=>{uo||cs.constrain(tt.pointerDown()),Er.seek()},ue=({scrollBody:tt,translate:Er,location:cs,offsetLocation:uo,previousLocation:_c,scrollLooper:zc,slideLooper:Bc,dragHandler:$c,animation:za,eventHandler:Ba,scrollBounds:pe,options:{loop:we}},de)=>{const xe=tt.settled(),vt=!pe.shouldConstrain(),be=we?xe:xe&&vt,$a=be&&!$c.pointerDown();$a&&za.stop();const Hc=cs.get()*de+_c.get()*(1-de);uo.set(Hc),we&&(zc.loop(tt.direction()),Bc.loop()),Er.to(uo.get()),$a&&Ba.emit("settle"),be||Ba.emit("scroll")},Se=x4(n,o,()=>se(ut),tt=>ue(ut,tt)),et=.68,$e=V[te.get()],dt=ws($e),Cr=ws($e),qe=ws($e),Mt=ws($e),gt=E4(dt,qe,Cr,Mt,h,et),Et=P4(f,V,ee,X,Mt),Ur=L4(Se,te,ne,gt,Et,Mt,a),Tn=O4(X),Sr=Gs(),Mr=B4(e,r,a,g),{slideRegistry:An}=I4($,x,V,Z,G,Y),co=F4(t,r,An,Ur,gt,Sr,a,S),ut={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:E,slideRects:A,animation:Se,axis:O,dragHandler:k4(O,t,n,o,Mt,N4(O,o),dt,Se,Ur,gt,Et,te,a,q,m,v,b,et,N),eventStore:Sr,percentOfView:q,index:te,indexPrevious:ne,limit:X,location:dt,offsetLocation:qe,previousLocation:Cr,options:s,resizeHandler:M4(e,a,o,r,O,w,M),scrollBody:gt,scrollBounds:j4(X,qe,Mt,gt,q),scrollLooper:A4(ee,X,qe,[dt,qe,Cr,Mt]),scrollProgress:Tn,scrollSnapList:V.map(Tn.get),scrollSnaps:V,scrollTarget:Et,scrollTo:Ur,slideLooper:_4(O,D,ee,P,_,I,V,qe,r),slideFocus:co,slidesHandler:z4(e,a,k),slidesInView:Mr,slideIndexes:Y,slideRegistry:An,slidesToScroll:G,target:Mt,translate:f0(O,e)};return ut}function W4(){let t={},e;function r(c){e=c}function n(c){return t[c]||[]}function o(c){return n(c).forEach(d=>d(e,c)),l}function s(c,d){return t[c]=n(c).concat([d]),l}function a(c,d){return t[c]=n(c).filter(f=>f!==d),l}function i(){t={}}const l={init:r,emit:o,off:a,on:s,clear:i};return l}const U4={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function G4(t){function e(o,s){return d0(o,s||{})}function r(o){const s=o.breakpoints||{},a=Us(s).filter(i=>t.matchMedia(i).matches).map(i=>s[i]).reduce((i,l)=>e(i,l),{});return e(o,a)}function n(o){return o.map(s=>Us(s.breakpoints||{})).reduce((s,a)=>s.concat(a),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:r,optionsMediaQueries:n}}function q4(t){let e=[];function r(o,s){return e=s.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),e.forEach(a=>a.init(o,t)),s.reduce((a,i)=>Object.assign(a,{[i.name]:i}),{})}function n(){e=e.filter(o=>o.destroy())}return{init:r,destroy:n}}function Ei(t,e,r){const n=t.ownerDocument,o=n.defaultView,s=G4(o),a=q4(s),i=Gs(),l=W4(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:m,emit:v}=l,g=O;let y=!1,b,x=c(U4,Ei.globalOptions),w=c(x),k=[],N,S,C;function M(){const{container:Y,slides:se}=w;S=(Jd(Y)?t.querySelector(Y):Y)||t.children[0];const ue=Jd(se)?S.querySelectorAll(se):se;C=[].slice.call(ue||S.children)}function E(Y){const se=V4(t,S,C,n,o,Y,l);if(Y.loop&&!se.slideLooper.canLoop()){const ue=Object.assign({},Y,{loop:!1});return E(ue)}return se}function A(Y,se){y||(x=c(x,Y),w=d(x),k=se||k,M(),b=E(w),f([x,...k.map(({options:ue})=>ue)]).forEach(ue=>i.add(ue,"change",O)),w.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(ne),b.eventHandler.init(ne),b.resizeHandler.init(ne),b.slidesHandler.init(ne),b.options.loop&&b.slideLooper.loop(),S.offsetParent&&C.length&&b.dragHandler.init(ne),N=a.init(ne,k)))}function O(Y,se){const ue=G();D(),A(c({startIndex:ue},Y),se),l.emit("reInit")}function D(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),a.destroy(),i.clear()}function q(){y||(y=!0,i.clear(),D(),l.emit("destroy"),l.clear())}function F(Y,se,ue){!w.active||y||(b.scrollBody.useBaseFriction().useDuration(se===!0?0:w.duration),b.scrollTo.index(Y,ue||0))}function $(Y){const se=b.index.add(1).get();F(se,Y,-1)}function H(Y){const se=b.index.add(-1).get();F(se,Y,1)}function P(){return b.index.add(1).get()!==G()}function _(){return b.index.add(-1).get()!==G()}function z(){return b.scrollSnapList}function B(){return b.scrollProgress.get(b.offsetLocation.get())}function G(){return b.index.get()}function I(){return b.indexPrevious.get()}function J(){return b.slidesInView.get()}function ee(){return b.slidesInView.get(!1)}function W(){return N}function Z(){return b}function V(){return t}function X(){return S}function te(){return C}const ne={canScrollNext:P,canScrollPrev:_,containerNode:X,internalEngine:Z,destroy:q,off:m,on:h,emit:v,plugins:W,previousScrollSnap:I,reInit:g,rootNode:V,scrollNext:$,scrollPrev:H,scrollProgress:B,scrollSnapList:z,scrollTo:F,selectedScrollSnap:G,slideNodes:te,slidesInView:J,slidesNotInView:ee};return A(e,r),setTimeout(()=>l.emit("init"),0),ne}Ei.globalOptions=void 0;function Df(t={},e=[]){const r=T.useRef(t),n=T.useRef(e),[o,s]=T.useState(),[a,i]=T.useState(),l=T.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return T.useEffect(()=>{Rf(r.current,t)||(r.current=t,l())},[t,l]),T.useEffect(()=>{g4(n.current,e)||(n.current=e,l())},[e,l]),T.useEffect(()=>{if(m4()&&a){Ei.globalOptions=Df.globalOptions;const c=Ei(a,r.current,n.current);return s(c),()=>c.destroy()}else s(void 0)},[a,s]),[i,o]}Df.globalOptions=void 0;const p0=p.createContext(null);function Jl(){const t=p.useContext(p0);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}const K4=p.forwardRef(({orientation:t="horizontal",opts:e,setApi:r,plugins:n,className:o,children:s,...a},i)=>{const[l,c]=Df({...e,axis:t==="horizontal"?"x":"y"},n),[d,f]=p.useState(!1),[h,m]=p.useState(!1),v=p.useCallback(x=>{x&&(f(x.canScrollPrev()),m(x.canScrollNext()))},[]),g=p.useCallback(()=>{c==null||c.scrollPrev()},[c]),y=p.useCallback(()=>{c==null||c.scrollNext()},[c]),b=p.useCallback(x=>{x.key==="ArrowLeft"?(x.preventDefault(),g()):x.key==="ArrowRight"&&(x.preventDefault(),y())},[g,y]);return p.useEffect(()=>{!c||!r||r(c)},[c,r]),p.useEffect(()=>{if(c)return v(c),c.on("reInit",v),c.on("select",v),()=>{c==null||c.off("select",v)}},[c,v]),u.jsx(p0.Provider,{value:{carouselRef:l,api:c,opts:e,orientation:t||((e==null?void 0:e.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:d,canScrollNext:h},children:u.jsx("div",{ref:i,onKeyDownCapture:b,className:R("relative",o),role:"region","aria-roledescription":"carousel",...a,children:s})})});K4.displayName="Carousel";const Y4=p.forwardRef(({className:t,...e},r)=>{const{carouselRef:n,orientation:o}=Jl();return u.jsx("div",{ref:n,className:"overflow-hidden",children:u.jsx("div",{ref:r,className:R("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...e})})});Y4.displayName="CarouselContent";const J4=p.forwardRef(({className:t,...e},r)=>{const{orientation:n}=Jl();return u.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:R("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",t),...e})});J4.displayName="CarouselItem";const X4=p.forwardRef(({className:t,variant:e="outline",size:r="icon",...n},o)=>{const{orientation:s,scrollPrev:a,canScrollPrev:i}=Jl();return u.jsxs(Ut,{ref:o,variant:e,size:r,className:R("absolute h-8 w-8 rounded-full",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:a,...n,children:[u.jsx(JA,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Previous slide"})]})});X4.displayName="CarouselPrevious";const Z4=p.forwardRef(({className:t,variant:e="outline",size:r="icon",...n},o)=>{const{orientation:s,scrollNext:a,canScrollNext:i}=Jl();return u.jsxs(Ut,{ref:o,variant:e,size:r,className:R("absolute h-8 w-8 rounded-full",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:a,...n,children:[u.jsx(XA,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Next slide"})]})});Z4.displayName="CarouselNext";function ts(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function xa(t){const[e,r]=p.useState(void 0);return Ae(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,i=c.blockSize}else a=t.offsetWidth,i=t.offsetHeight;r({width:a,height:i})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Xl="Checkbox",[Q4]=Oe(Xl),[e_,If]=Q4(Xl);function t_(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:o,disabled:s,form:a,name:i,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:f}=t,[h,m]=Ye({prop:r,defaultProp:o??!1,onChange:l,caller:Xl}),[v,g]=p.useState(null),[y,b]=p.useState(null),x=p.useRef(!1),w=v?!!a||!!v.closest("form"):!0,k={checked:h,disabled:s,setChecked:m,control:v,setControl:g,name:i,form:a,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:cn(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:b};return u.jsx(e_,{scope:e,...k,children:r_(f)?f(k):n})}var h0="CheckboxTrigger",m0=p.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:r,...n},o)=>{const{control:s,value:a,disabled:i,checked:l,required:c,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:v}=If(h0,t),g=oe(o,d),y=p.useRef(l);return p.useEffect(()=>{const b=s==null?void 0:s.form;if(b){const x=()=>f(y.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[s,f]),u.jsx(Q.button,{type:"button",role:"checkbox","aria-checked":cn(l)?"mixed":l,"aria-required":c,"data-state":x0(l),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:g,onKeyDown:L(e,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:L(r,b=>{f(x=>cn(x)?!0:!x),v&&m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})})});m0.displayName=h0;var Pf=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:l,onCheckedChange:c,form:d,...f}=t;return u.jsx(t_,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:i,required:a,onCheckedChange:c,name:n,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>u.jsxs(u.Fragment,{children:[u.jsx(m0,{...f,ref:e,__scopeCheckbox:r}),h&&u.jsx(b0,{__scopeCheckbox:r})]})})});Pf.displayName=Xl;var g0="CheckboxIndicator",v0=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...o}=t,s=If(g0,r);return u.jsx(De,{present:n||cn(s.checked)||s.checked===!0,children:u.jsx(Q.span,{"data-state":x0(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e,style:{pointerEvents:"none",...t.style}})})});v0.displayName=g0;var y0="CheckboxBubbleInput",b0=p.forwardRef(({__scopeCheckbox:t,...e},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:i,disabled:l,name:c,value:d,form:f,bubbleInput:h,setBubbleInput:m}=If(y0,t),v=oe(r,m),g=ts(s),y=xa(n);p.useEffect(()=>{const x=h;if(!x)return;const w=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(w,"checked").set,N=!o.current;if(g!==s&&k){const S=new Event("click",{bubbles:N});x.indeterminate=cn(s),k.call(x,cn(s)?!1:s),x.dispatchEvent(S)}},[h,g,s,o]);const b=p.useRef(cn(s)?!1:s);return u.jsx(Q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??b.current,required:i,disabled:l,name:c,value:d,form:f,...e,tabIndex:-1,ref:v,style:{...e.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});b0.displayName=y0;function r_(t){return typeof t=="function"}function cn(t){return t==="indeterminate"}function x0(t){return cn(t)?"indeterminate":t?"checked":"unchecked"}const n_=p.forwardRef(({className:t,...e},r)=>u.jsx(Pf,{ref:r,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:u.jsx(v0,{className:R("flex items-center justify-center text-current"),children:u.jsx(bt,{className:"h-4 w-4"})})}));n_.displayName=Pf.displayName;var w0={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
418
+ * Prism: Lightweight, robust, elegant syntax highlighting
419
+ *
420
+ * @license MIT <https://opensource.org/licenses/MIT>
421
+ * @author Lea Verou <https://lea.verou.me>
422
+ * @namespace
423
+ * @public
424
+ */var r=function(n){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},i={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function x(w){return w instanceof l?new l(w.type,x(w.content),w.alias):Array.isArray(w)?w.map(x):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++s}),x.__id},clone:function x(w,k){k=k||{};var N,S;switch(i.util.type(w)){case"Object":if(S=i.util.objId(w),k[S])return k[S];N={},k[S]=N;for(var C in w)w.hasOwnProperty(C)&&(N[C]=x(w[C],k));return N;case"Array":return S=i.util.objId(w),k[S]?k[S]:(N=[],k[S]=N,w.forEach(function(M,E){N[E]=x(M,k)}),N);default:return w}},getLanguage:function(x){for(;x;){var w=o.exec(x.className);if(w)return w[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,w){x.className=x.className.replace(RegExp(o,"gi"),""),x.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(N){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(x){var w=document.getElementsByTagName("script");for(var k in w)if(w[k].src==x)return w[k]}return null}},isActive:function(x,w,k){for(var N="no-"+w;x;){var S=x.classList;if(S.contains(w))return!0;if(S.contains(N))return!1;x=x.parentElement}return!!k}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(x,w){var k=i.util.clone(i.languages[x]);for(var N in w)k[N]=w[N];return k},insertBefore:function(x,w,k,N){N=N||i.languages;var S=N[x],C={};for(var M in S)if(S.hasOwnProperty(M)){if(M==w)for(var E in k)k.hasOwnProperty(E)&&(C[E]=k[E]);k.hasOwnProperty(M)||(C[M]=S[M])}var A=N[x];return N[x]=C,i.languages.DFS(i.languages,function(O,D){D===A&&O!=x&&(this[O]=C)}),C},DFS:function x(w,k,N,S){S=S||{};var C=i.util.objId;for(var M in w)if(w.hasOwnProperty(M)){k.call(w,M,w[M],N||M);var E=w[M],A=i.util.type(E);A==="Object"&&!S[C(E)]?(S[C(E)]=!0,x(E,k,null,S)):A==="Array"&&!S[C(E)]&&(S[C(E)]=!0,x(E,k,M,S))}}},plugins:{},highlightAll:function(x,w){i.highlightAllUnder(document,x,w)},highlightAllUnder:function(x,w,k){var N={callback:k,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),i.hooks.run("before-all-elements-highlight",N);for(var S=0,C;C=N.elements[S++];)i.highlightElement(C,w===!0,N.callback)},highlightElement:function(x,w,k){var N=i.util.getLanguage(x),S=i.languages[N];i.util.setLanguage(x,N);var C=x.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(C,N);var M=x.textContent,E={element:x,language:N,grammar:S,code:M};function A(D){E.highlightedCode=D,i.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,i.hooks.run("after-highlight",E),i.hooks.run("complete",E),k&&k.call(E.element)}if(i.hooks.run("before-sanity-check",E),C=E.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!E.code){i.hooks.run("complete",E),k&&k.call(E.element);return}if(i.hooks.run("before-highlight",E),!E.grammar){A(i.util.encode(E.code));return}if(w&&n.Worker){var O=new Worker(i.filename);O.onmessage=function(D){A(D.data)},O.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else A(i.highlight(E.code,E.grammar,E.language))},highlight:function(x,w,k){var N={code:x,grammar:w,language:k};if(i.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=i.tokenize(N.code,N.grammar),i.hooks.run("after-tokenize",N),l.stringify(i.util.encode(N.tokens),N.language)},tokenize:function(x,w){var k=w.rest;if(k){for(var N in k)w[N]=k[N];delete w.rest}var S=new f;return h(S,S.head,x),d(x,S,w,S.head,0),v(S)},hooks:{all:{},add:function(x,w){var k=i.hooks.all;k[x]=k[x]||[],k[x].push(w)},run:function(x,w){var k=i.hooks.all[x];if(!(!k||!k.length))for(var N=0,S;S=k[N++];)S(w)}},Token:l};n.Prism=i;function l(x,w,k,N){this.type=x,this.content=w,this.alias=k,this.length=(N||"").length|0}l.stringify=function x(w,k){if(typeof w=="string")return w;if(Array.isArray(w)){var N="";return w.forEach(function(A){N+=x(A,k)}),N}var S={type:w.type,content:x(w.content,k),tag:"span",classes:["token",w.type],attributes:{},language:k},C=w.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(S.classes,C):S.classes.push(C)),i.hooks.run("wrap",S);var M="";for(var E in S.attributes)M+=" "+E+'="'+(S.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+M+">"+S.content+"</"+S.tag+">"};function c(x,w,k,N){x.lastIndex=w;var S=x.exec(k);if(S&&N&&S[1]){var C=S[1].length;S.index+=C,S[0]=S[0].slice(C)}return S}function d(x,w,k,N,S,C){for(var M in k)if(!(!k.hasOwnProperty(M)||!k[M])){var E=k[M];E=Array.isArray(E)?E:[E];for(var A=0;A<E.length;++A){if(C&&C.cause==M+","+A)return;var O=E[A],D=O.inside,q=!!O.lookbehind,F=!!O.greedy,$=O.alias;if(F&&!O.pattern.global){var H=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,H+"g")}for(var P=O.pattern||O,_=N.next,z=S;_!==w.tail&&!(C&&z>=C.reach);z+=_.value.length,_=_.next){var B=_.value;if(w.length>x.length)return;if(!(B instanceof l)){var G=1,I;if(F){if(I=c(P,z,x,q),!I||I.index>=x.length)break;var Z=I.index,J=I.index+I[0].length,ee=z;for(ee+=_.value.length;Z>=ee;)_=_.next,ee+=_.value.length;if(ee-=_.value.length,z=ee,_.value instanceof l)continue;for(var W=_;W!==w.tail&&(ee<J||typeof W.value=="string");W=W.next)G++,ee+=W.value.length;G--,B=x.slice(z,ee),I.index-=z}else if(I=c(P,0,B,q),!I)continue;var Z=I.index,V=I[0],X=B.slice(0,Z),te=B.slice(Z+V.length),ne=z+B.length;C&&ne>C.reach&&(C.reach=ne);var Y=_.prev;X&&(Y=h(w,Y,X),z+=X.length),m(w,Y,G);var se=new l(M,D?i.tokenize(V,D):V,$,V);if(_=h(w,Y,se),te&&h(w,_,te),G>1){var ue={cause:M+","+A,reach:ne};d(x,w,k,_.prev,z,ue),C&&ue.reach>C.reach&&(C.reach=ue.reach)}}}}}}function f(){var x={value:null,prev:null,next:null},w={value:null,prev:x,next:null};x.next=w,this.head=x,this.tail=w,this.length=0}function h(x,w,k){var N=w.next,S={value:k,prev:w,next:N};return w.next=S,N.prev=S,x.length++,S}function m(x,w,k){for(var N=w.next,S=0;S<k&&N!==x.tail;S++)N=N.next;w.next=N,N.prev=w,x.length-=S}function v(x){for(var w=[],k=x.head.next;k!==x.tail;)w.push(k.value),k=k.next;return w}if(!n.document)return n.addEventListener&&(i.disableWorkerMessageHandler||n.addEventListener("message",function(x){var w=JSON.parse(x.data),k=w.language,N=w.code,S=w.immediateClose;n.postMessage(i.highlight(N,i.languages[k],k)),S&&n.close()},!1)),i;var g=i.util.currentScript();g&&(i.filename=g.src,g.hasAttribute("data-manual")&&(i.manual=!0));function y(){i.manual||i.highlightAll()}if(!i.manual){var b=document.readyState;b==="loading"||b==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",y):window.requestAnimationFrame?window.requestAnimationFrame(y):window.setTimeout(y,16)}return i}(e);t.exports&&(t.exports=r),typeof om<"u"&&(om.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var i={};i[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:a},r.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,o){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:r.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var s=n.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",o=function(g,y){return"✖ Error "+g+" while fetching file: "+y},s="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",l="loading",c="loaded",d="failed",f="pre[data-src]:not(["+i+'="'+c+'"]):not(['+i+'="'+l+'"])';function h(g,y,b){var x=new XMLHttpRequest;x.open("GET",g,!0),x.onreadystatechange=function(){x.readyState==4&&(x.status<400&&x.responseText?y(x.responseText):x.status>=400?b(o(x.status,x.statusText)):b(s))},x.send(null)}function m(g){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(y){var b=Number(y[1]),x=y[2],w=y[3];return x?w?[b,Number(w)]:[b,void 0]:[b,b]}}r.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),r.hooks.add("before-sanity-check",function(g){var y=g.element;if(y.matches(f)){g.code="",y.setAttribute(i,l);var b=y.appendChild(document.createElement("CODE"));b.textContent=n;var x=y.getAttribute("data-src"),w=g.language;if(w==="none"){var k=(/\.(\w+)$/.exec(x)||[,"none"])[1];w=a[k]||k}r.util.setLanguage(b,w),r.util.setLanguage(y,w);var N=r.plugins.autoloader;N&&N.loadLanguages(w),h(x,function(S){y.setAttribute(i,c);var C=m(y.getAttribute("data-range"));if(C){var M=S.split(/\r\n?|\n/g),E=C[0],A=C[1]==null?M.length:C[1];E<0&&(E+=M.length),E=Math.max(0,Math.min(E-1,M.length)),A<0&&(A+=M.length),A=Math.max(0,Math.min(A,M.length)),S=M.slice(E,A).join(`
425
+ `),y.hasAttribute("data-start")||y.setAttribute("data-start",String(E+1))}b.textContent=S,r.highlightElement(b)},function(S){y.setAttribute(i,d),b.textContent=S})}}),r.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(f),b=0,x;x=y[b++];)r.highlightElement(x)}};var v=!1;r.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(w0);var o_=w0.exports;const Em=oP(o_);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var e=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,n=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(l,c){return l=l.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return n}).replace(/<SPREAD>/g,function(){return o}),RegExp(l,c)}o=s(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var a=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(a).join(""):""},i=function(l){for(var c=[],d=0;d<l.length;d++){var f=l[d],h=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===a(f.content[0].content[1])&&c.pop():f.content[f.content.length-1].content==="/>"||c.push({tagName:a(f.content[0].content[1]),openedBraces:0}):c.length>0&&f.type==="punctuation"&&f.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?c[c.length-1].openedBraces--:h=!0),(h||typeof f=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var m=a(f);d<l.length-1&&(typeof l[d+1]=="string"||l[d+1].type==="plain-text")&&(m+=a(l[d+1]),l.splice(d+1,1)),d>0&&(typeof l[d-1]=="string"||l[d-1].type==="plain-text")&&(m=a(l[d-1])+m,l.splice(d-1,1),d--),l[d]=new t.Token("plain-text",m,null,m)}f.content&&typeof f.content!="string"&&i(f.content)}};t.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||i(l.tokens)})})(Prism);(function(t){var e=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:r,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=n.variable[1].inside,a=0;a<o.length;a++)s[o[a]]=t.languages.bash[o[a]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[n,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:n.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:n.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":n,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:n.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:n.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(d){return d=d.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return n}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+s+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+s+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(d){["url","bold","italic","strike","code-snippet"].forEach(function(f){d!==f&&(t.languages.markdown[d].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(d){if(d.language!=="markdown"&&d.language!=="md")return;function f(h){if(!(!h||typeof h=="string"))for(var m=0,v=h.length;m<v;m++){var g=h[m];if(g.type!=="code"){f(g.content);continue}var y=g.content[1],b=g.content[3];if(y&&b&&y.type==="code-language"&&b.type==="code-block"&&typeof y.content=="string"){var x=y.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");x=(/[a-z][\w-]*/i.exec(x)||[""])[0].toLowerCase();var w="language-"+x;b.alias?typeof b.alias=="string"?b.alias=[b.alias,w]:b.alias.push(w):b.alias=[w]}}}f(d.tokens)}),t.hooks.add("wrap",function(d){if(d.type==="code-block"){for(var f="",h=0,m=d.classes.length;h<m;h++){var v=d.classes[h],g=/language-(.+)/.exec(v);if(g){f=g[1];break}}var y=t.languages[f];if(y)d.content=t.highlight(c(d.content),y,f);else if(f&&f!=="none"&&t.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);d.attributes.id=b,t.plugins.autoloader.loadLanguages(f,function(){var x=document.getElementById(b);x&&(x.innerHTML=t.highlight(x.textContent,t.languages[f],f))})}}});var a=RegExp(t.languages.markup.tag.pattern.source,"gi"),i={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(d){var f=d.replace(a,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,m){if(m=m.toLowerCase(),m[0]==="#"){var v;return m[1]==="x"?v=parseInt(m.slice(2),16):v=Number(m.slice(1)),l(v)}else{var g=i[m];return g||h}}),f}t.languages.md=t.languages.markdown})(Prism);(function(t){var e=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+r.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(i,l){l=(l||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<value>>/g,function(){return i});return RegExp(c,l)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(s),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Prism);const s_=p.forwardRef(({className:t,code:e,language:r="text",showLineNumbers:n=!1,showCopyButton:o=!0,filename:s,highlightLines:a=[],...i},l)=>{const[c,d]=p.useState(!1),[f,h]=p.useState("");p.useEffect(()=>{if(r!=="text"){const g=Em.languages[r];h(g?Em.highlight(e,g,r):e)}else h(e)},[e,r]);const m=async()=>{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)},v=f.split(`
426
+ `);return u.jsxs("div",{ref:l,className:R("relative rounded-lg border bg-muted/50 text-sm",t),...i,children:[(s||o)&&u.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[s&&u.jsx("span",{className:"text-xs text-muted-foreground",children:s}),o&&u.jsx("button",{type:"button",onClick:m,className:"ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:c?u.jsxs(u.Fragment,{children:[u.jsx(bt,{className:"h-3 w-3"}),"Copied"]}):u.jsxs(u.Fragment,{children:[u.jsx(rO,{className:"h-3 w-3"}),"Copy"]})})]}),u.jsx("div",{className:"overflow-x-auto p-4",children:u.jsx("pre",{className:"font-mono text-sm",children:u.jsx("code",{children:v.map((g,y)=>u.jsxs("div",{className:R("leading-6",a.includes(y+1)&&"bg-yellow-500/20 -mx-4 px-4"),children:[n&&u.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-muted-foreground",children:y+1}),u.jsx("span",{dangerouslySetInnerHTML:{__html:g||" "}})]},y))})})})]})});s_.displayName="CodeBlock";var jm=1,a_=.9,i_=.8,l_=.17,ad=.1,id=.999,c_=.9999,d_=.99,u_=/[\\\/_+.#"@\[\(\{&]/,f_=/[\\\/_+.#"@\[\(\{&]/g,p_=/[\s-]/,k0=/[\s-]/g;function Zd(t,e,r,n,o,s,a){if(s===e.length)return o===t.length?jm:d_;var i=`${o},${s}`;if(a[i]!==void 0)return a[i];for(var l=n.charAt(s),c=r.indexOf(l,o),d=0,f,h,m,v;c>=0;)f=Zd(t,e,r,n,c+1,s+1,a),f>d&&(c===o?f*=jm:u_.test(t.charAt(c-1))?(f*=i_,m=t.slice(o,c-1).match(f_),m&&o>0&&(f*=Math.pow(id,m.length))):p_.test(t.charAt(c-1))?(f*=a_,v=t.slice(o,c-1).match(k0),v&&o>0&&(f*=Math.pow(id,v.length))):(f*=l_,o>0&&(f*=Math.pow(id,c-o))),t.charAt(c)!==e.charAt(s)&&(f*=c_)),(f<ad&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(h=Zd(t,e,r,n,c+1,s+2,a),h*ad>f&&(f=h*ad)),f>d&&(d=f),c=r.indexOf(l,c+1);return a[i]=d,d}function Rm(t){return t.toLowerCase().replace(k0," ")}function h_(t,e,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,Zd(t,e,Rm(t),Rm(e),0,0,{})}var gs='[cmdk-group=""]',ld='[cmdk-group-items=""]',m_='[cmdk-group-heading=""]',N0='[cmdk-item=""]',Tm=`${N0}:not([aria-disabled="true"])`,Qd="cmdk-item-select",xo="data-value",g_=(t,e,r)=>h_(t,e,r),C0=p.createContext(void 0),wa=()=>p.useContext(C0),S0=p.createContext(void 0),Lf=()=>p.useContext(S0),M0=p.createContext(void 0),E0=p.forwardRef((t,e)=>{let r=wo(()=>{var I,J;return{search:"",value:(J=(I=t.value)!=null?I:t.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=wo(()=>new Set),o=wo(()=>new Map),s=wo(()=>new Map),a=wo(()=>new Set),i=j0(t),{label:l,children:c,value:d,onValueChange:f,filter:h,shouldFilter:m,loop:v,disablePointerSelection:g=!1,vimBindings:y=!0,...b}=t,x=Ke(),w=Ke(),k=Ke(),N=p.useRef(null),S=E_();Kn(()=>{if(d!==void 0){let I=d.trim();r.current.value=I,C.emit()}},[d]),Kn(()=>{S(6,q)},[]);let C=p.useMemo(()=>({subscribe:I=>(a.current.add(I),()=>a.current.delete(I)),snapshot:()=>r.current,setState:(I,J,ee)=>{var W,Z,V,X;if(!Object.is(r.current[I],J)){if(r.current[I]=J,I==="search")D(),A(),S(1,O);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(k);te?te.focus():(W=document.getElementById(x))==null||W.focus()}if(S(7,()=>{var te;r.current.selectedItemId=(te=F())==null?void 0:te.id,C.emit()}),ee||S(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let te=J??"";(X=(V=i.current).onValueChange)==null||X.call(V,te);return}}C.emit()}},emit:()=>{a.current.forEach(I=>I())}}),[]),M=p.useMemo(()=>({value:(I,J,ee)=>{var W;J!==((W=s.current.get(I))==null?void 0:W.value)&&(s.current.set(I,{value:J,keywords:ee}),r.current.filtered.items.set(I,E(J,ee)),S(2,()=>{A(),C.emit()}))},item:(I,J)=>(n.current.add(I),J&&(o.current.has(J)?o.current.get(J).add(I):o.current.set(J,new Set([I]))),S(3,()=>{D(),A(),r.current.value||O(),C.emit()}),()=>{s.current.delete(I),n.current.delete(I),r.current.filtered.items.delete(I);let ee=F();S(4,()=>{D(),(ee==null?void 0:ee.getAttribute("id"))===I&&O(),C.emit()})}),group:I=>(o.current.has(I)||o.current.set(I,new Set),()=>{s.current.delete(I),o.current.delete(I)}),filter:()=>i.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:k,labelId:w,listInnerRef:N}),[]);function E(I,J){var ee,W;let Z=(W=(ee=i.current)==null?void 0:ee.filter)!=null?W:g_;return I?Z(I,r.current.search,J):0}function A(){if(!r.current.search||i.current.shouldFilter===!1)return;let I=r.current.filtered.items,J=[];r.current.filtered.groups.forEach(W=>{let Z=o.current.get(W),V=0;Z.forEach(X=>{let te=I.get(X);V=Math.max(te,V)}),J.push([W,V])});let ee=N.current;$().sort((W,Z)=>{var V,X;let te=W.getAttribute("id"),ne=Z.getAttribute("id");return((V=I.get(ne))!=null?V:0)-((X=I.get(te))!=null?X:0)}).forEach(W=>{let Z=W.closest(ld);Z?Z.appendChild(W.parentElement===Z?W:W.closest(`${ld} > *`)):ee.appendChild(W.parentElement===ee?W:W.closest(`${ld} > *`))}),J.sort((W,Z)=>Z[1]-W[1]).forEach(W=>{var Z;let V=(Z=N.current)==null?void 0:Z.querySelector(`${gs}[${xo}="${encodeURIComponent(W[0])}"]`);V==null||V.parentElement.appendChild(V)})}function O(){let I=$().find(ee=>ee.getAttribute("aria-disabled")!=="true"),J=I==null?void 0:I.getAttribute(xo);C.setState("value",J||void 0)}function D(){var I,J,ee,W;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let Z=0;for(let V of n.current){let X=(J=(I=s.current.get(V))==null?void 0:I.value)!=null?J:"",te=(W=(ee=s.current.get(V))==null?void 0:ee.keywords)!=null?W:[],ne=E(X,te);r.current.filtered.items.set(V,ne),ne>0&&Z++}for(let[V,X]of o.current)for(let te of X)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(V);break}r.current.filtered.count=Z}function q(){var I,J,ee;let W=F();W&&(((I=W.parentElement)==null?void 0:I.firstChild)===W&&((ee=(J=W.closest(gs))==null?void 0:J.querySelector(m_))==null||ee.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function F(){var I;return(I=N.current)==null?void 0:I.querySelector(`${N0}[aria-selected="true"]`)}function $(){var I;return Array.from(((I=N.current)==null?void 0:I.querySelectorAll(Tm))||[])}function H(I){let J=$()[I];J&&C.setState("value",J.getAttribute(xo))}function P(I){var J;let ee=F(),W=$(),Z=W.findIndex(X=>X===ee),V=W[Z+I];(J=i.current)!=null&&J.loop&&(V=Z+I<0?W[W.length-1]:Z+I===W.length?W[0]:W[Z+I]),V&&C.setState("value",V.getAttribute(xo))}function _(I){let J=F(),ee=J==null?void 0:J.closest(gs),W;for(;ee&&!W;)ee=I>0?S_(ee,gs):M_(ee,gs),W=ee==null?void 0:ee.querySelector(Tm);W?C.setState("value",W.getAttribute(xo)):P(I)}let z=()=>H($().length-1),B=I=>{I.preventDefault(),I.metaKey?z():I.altKey?_(1):P(1)},G=I=>{I.preventDefault(),I.metaKey?H(0):I.altKey?_(-1):P(-1)};return p.createElement(mt.div,{ref:e,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:I=>{var J;(J=b.onKeyDown)==null||J.call(b,I);let ee=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||ee))switch(I.key){case"n":case"j":{y&&I.ctrlKey&&B(I);break}case"ArrowDown":{B(I);break}case"p":case"k":{y&&I.ctrlKey&&G(I);break}case"ArrowUp":{G(I);break}case"Home":{I.preventDefault(),H(0);break}case"End":{I.preventDefault(),z();break}case"Enter":{I.preventDefault();let W=F();if(W){let Z=new Event(Qd);W.dispatchEvent(Z)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:R_},l),Zl(t,I=>p.createElement(S0.Provider,{value:C},p.createElement(C0.Provider,{value:M},I))))}),v_=p.forwardRef((t,e)=>{var r,n;let o=Ke(),s=p.useRef(null),a=p.useContext(M0),i=wa(),l=j0(t),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:a==null?void 0:a.forceMount;Kn(()=>{if(!c)return i.item(o,a==null?void 0:a.id)},[c]);let d=R0(o,s,[t.value,t.children,s],t.keywords),f=Lf(),h=mn(S=>S.value&&S.value===d.current),m=mn(S=>c||i.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);p.useEffect(()=>{let S=s.current;if(!(!S||t.disabled))return S.addEventListener(Qd,v),()=>S.removeEventListener(Qd,v)},[m,t.onSelect,t.disabled]);function v(){var S,C;g(),(C=(S=l.current).onSelect)==null||C.call(S,d.current)}function g(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:y,value:b,onSelect:x,forceMount:w,keywords:k,...N}=t;return p.createElement(mt.div,{ref:er(s,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!h,"data-disabled":!!y,"data-selected":!!h,onPointerMove:y||i.getDisablePointerSelection()?void 0:g,onClick:y?void 0:v},t.children)}),y_=p.forwardRef((t,e)=>{let{heading:r,children:n,forceMount:o,...s}=t,a=Ke(),i=p.useRef(null),l=p.useRef(null),c=Ke(),d=wa(),f=mn(m=>o||d.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Kn(()=>d.group(a),[]),R0(a,i,[t.value,t.heading,l]);let h=p.useMemo(()=>({id:a,forceMount:o}),[o]);return p.createElement(mt.div,{ref:er(i,e),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&p.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),Zl(t,m=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},p.createElement(M0.Provider,{value:h},m))))}),b_=p.forwardRef((t,e)=>{let{alwaysRender:r,...n}=t,o=p.useRef(null),s=mn(a=>!a.search);return!r&&!s?null:p.createElement(mt.div,{ref:er(o,e),...n,"cmdk-separator":"",role:"separator"})}),x_=p.forwardRef((t,e)=>{let{onValueChange:r,...n}=t,o=t.value!=null,s=Lf(),a=mn(c=>c.search),i=mn(c=>c.selectedItemId),l=wa();return p.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),p.createElement(mt.input,{ref:e,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?t.value:a,onChange:c=>{o||s.setState("search",c.target.value),r==null||r(c.target.value)}})}),w_=p.forwardRef((t,e)=>{let{children:r,label:n="Suggestions",...o}=t,s=p.useRef(null),a=p.useRef(null),i=mn(c=>c.selectedItemId),l=wa();return p.useEffect(()=>{if(a.current&&s.current){let c=a.current,d=s.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),p.createElement(mt.div,{ref:er(s,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:l.listId},Zl(t,c=>p.createElement("div",{ref:er(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),k_=p.forwardRef((t,e)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:s,container:a,...i}=t;return p.createElement(Jb,{open:r,onOpenChange:n},p.createElement(Vl,{container:a},p.createElement(Zo,{"cmdk-overlay":"",className:o}),p.createElement(Qo,{"aria-label":t.label,"cmdk-dialog":"",className:s},p.createElement(E0,{ref:e,...i}))))}),N_=p.forwardRef((t,e)=>mn(r=>r.filtered.count===0)?p.createElement(mt.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),C_=p.forwardRef((t,e)=>{let{progress:r,children:n,label:o="Loading...",...s}=t;return p.createElement(mt.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Zl(t,a=>p.createElement("div",{"aria-hidden":!0},a)))}),kt=Object.assign(E0,{List:w_,Item:v_,Input:x_,Group:y_,Separator:b_,Dialog:k_,Empty:N_,Loading:C_});function S_(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return r;r=r.nextElementSibling}}function M_(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return r;r=r.previousElementSibling}}function j0(t){let e=p.useRef(t);return Kn(()=>{e.current=t}),e}var Kn=typeof window>"u"?p.useEffect:p.useLayoutEffect;function wo(t){let e=p.useRef();return e.current===void 0&&(e.current=t()),e}function mn(t){let e=Lf(),r=()=>t(e.snapshot());return p.useSyncExternalStore(e.subscribe,r,r)}function R0(t,e,r,n=[]){let o=p.useRef(),s=wa();return Kn(()=>{var a;let i=(()=>{var c;for(let d of r){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():o.current}})(),l=n.map(c=>c.trim());s.value(t,i,l),(a=e.current)==null||a.setAttribute(xo,i),o.current=i}),o}var E_=()=>{let[t,e]=p.useState(),r=wo(()=>new Map);return Kn(()=>{r.current.forEach(n=>n()),r.current=new Map},[t]),(n,o)=>{r.current.set(n,o),e({})}};function j_(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Zl({asChild:t,children:e},r){return t&&p.isValidElement(e)?p.cloneElement(j_(e),{ref:e.ref},r(e.props.children)):r(e)}var R_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const T_=Vl,T0=p.forwardRef(({className:t,...e},r)=>u.jsx(Zo,{ref:r,className:R("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",t),...e}));T0.displayName=Zo.displayName;const A_=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(T_,{children:[u.jsx(T0,{}),u.jsxs(Qo,{ref:n,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...r,children:[e,u.jsxs(Wl,{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-accent data-[state=open]:text-muted-foreground",children:[u.jsx(xt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));A_.displayName=Qo.displayName;const O_=p.forwardRef(({className:t,...e},r)=>u.jsx(pa,{ref:r,className:R("font-heading text-lg font-semibold leading-none tracking-tight",t),...e}));O_.displayName=pa.displayName;const D_=p.forwardRef(({className:t,...e},r)=>u.jsx(ha,{ref:r,className:R("text-sm text-muted-foreground",t),...e}));D_.displayName=ha.displayName;const A0=p.forwardRef(({className:t,...e},r)=>u.jsx(kt,{ref:r,className:R("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));A0.displayName=kt.displayName;const O0=p.forwardRef(({className:t,...e},r)=>u.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[u.jsx(ca,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),u.jsx(kt.Input,{ref:r,className:R("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));O0.displayName=kt.Input.displayName;const D0=p.forwardRef(({className:t,...e},r)=>u.jsx(kt.List,{ref:r,className:R("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));D0.displayName=kt.List.displayName;const I0=p.forwardRef((t,e)=>u.jsx(kt.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));I0.displayName=kt.Empty.displayName;const P0=p.forwardRef(({className:t,...e},r)=>u.jsx(kt.Group,{ref:r,className:R("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));P0.displayName=kt.Group.displayName;const I_=p.forwardRef(({className:t,...e},r)=>u.jsx(kt.Separator,{ref:r,className:R("-mx-1 h-px bg-border",t),...e}));I_.displayName=kt.Separator.displayName;const L0=p.forwardRef(({className:t,...e},r)=>u.jsx(kt.Item,{ref:r,className:R("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));L0.displayName=kt.Item.displayName;const P_=["top","right","bottom","left"],gn=Math.min,Tt=Math.max,ji=Math.round,qa=Math.floor,hr=t=>({x:t,y:t}),L_={left:"right",right:"left",bottom:"top",top:"bottom"},F_={start:"end",end:"start"};function eu(t,e,r){return Tt(t,gn(e,r))}function Hr(t,e){return typeof t=="function"?t(e):t}function Vr(t){return t.split("-")[0]}function rs(t){return t.split("-")[1]}function Ff(t){return t==="x"?"y":"x"}function _f(t){return t==="y"?"height":"width"}const __=new Set(["top","bottom"]);function pr(t){return __.has(Vr(t))?"y":"x"}function zf(t){return Ff(pr(t))}function z_(t,e,r){r===void 0&&(r=!1);const n=rs(t),o=zf(t),s=_f(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Ri(a)),[a,Ri(a)]}function B_(t){const e=Ri(t);return[tu(t),e,tu(e)]}function tu(t){return t.replace(/start|end/g,e=>F_[e])}const Am=["left","right"],Om=["right","left"],$_=["top","bottom"],H_=["bottom","top"];function V_(t,e,r){switch(t){case"top":case"bottom":return r?e?Om:Am:e?Am:Om;case"left":case"right":return e?$_:H_;default:return[]}}function W_(t,e,r,n){const o=rs(t);let s=V_(Vr(t),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(tu)))),s}function Ri(t){return t.replace(/left|right|bottom|top/g,e=>L_[e])}function U_(t){return{top:0,right:0,bottom:0,left:0,...t}}function F0(t){return typeof t!="number"?U_(t):{top:t,right:t,bottom:t,left:t}}function Ti(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function Dm(t,e,r){let{reference:n,floating:o}=t;const s=pr(e),a=zf(e),i=_f(a),l=Vr(e),c=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(rs(e)){case"start":m[a]-=h*(r&&c?-1:1);break;case"end":m[a]+=h*(r&&c?-1:1);break}return m}async function G_(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Hr(e,t),v=F0(m),g=i[h?f==="floating"?"reference":"floating":f],y=Ti(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),b=f==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),w=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Ti(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-k.top+v.top)/w.y,bottom:(k.bottom-y.bottom+v.bottom)/w.y,left:(y.left-k.left+v.left)/w.x,right:(k.right-y.right+v.right)/w.x}}const q_=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:f}=Dm(c,n,l),h=n,m={},v=0;for(let y=0;y<i.length;y++){var g;const{name:b,fn:x}=i[y],{x:w,y:k,data:N,reset:S}=await x({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:m,rects:c,platform:{...a,detectOverflow:(g=a.detectOverflow)!=null?g:G_},elements:{reference:t,floating:e}});d=w??d,f=k??f,m={...m,[b]:{...m[b],...N}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:o}):S.rects),{x:d,y:f}=Dm(c,h,l)),y=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:m}},K_=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:l}=e,{element:c,padding:d=0}=Hr(t,e)||{};if(c==null)return{};const f=F0(d),h={x:r,y:n},m=zf(o),v=_f(m),g=await a.getDimensions(c),y=m==="y",b=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",k=s.reference[v]+s.reference[m]-h[m]-s.floating[v],N=h[m]-s.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=S?S[w]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=i.floating[w]||s.floating[v]);const M=k/2-N/2,E=C/2-g[v]/2-1,A=gn(f[b],E),O=gn(f[x],E),D=A,q=C-g[v]-O,F=C/2-g[v]/2+M,$=eu(D,F,q),H=!l.arrow&&rs(o)!=null&&F!==$&&s.reference[v]/2-(F<D?A:O)-g[v]/2<0,P=H?F<D?F-D:F-q:0;return{[m]:h[m]+P,data:{[m]:$,centerOffset:F-$-P,...H&&{alignmentOffset:P}},reset:H}}}),Y_=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=Hr(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Vr(o),x=pr(i),w=Vr(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),N=h||(w||!g?[Ri(i)]:B_(i)),S=v!=="none";!h&&S&&N.push(...W_(i,g,v,k));const C=[i,...N],M=await l.detectOverflow(e,y),E=[];let A=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&E.push(M[b]),f){const F=z_(o,a,k);E.push(M[F[0]],M[F[1]])}if(A=[...A,{placement:o,overflows:E}],!E.every(F=>F<=0)){var O,D;const F=(((O=s.flip)==null?void 0:O.index)||0)+1,$=C[F];if($&&(!(f==="alignment"&&x!==pr($))||A.every(P=>pr(P.placement)===x?P.overflows[0]>0:!0)))return{data:{index:F,overflows:A},reset:{placement:$}};let H=(D=A.filter(P=>P.overflows[0]<=0).sort((P,_)=>P.overflows[1]-_.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(m){case"bestFit":{var q;const P=(q=A.filter(_=>{if(S){const z=pr(_.placement);return z===x||z==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(z=>z>0).reduce((z,B)=>z+B,0)]).sort((_,z)=>_[1]-z[1])[0])==null?void 0:q[0];P&&(H=P);break}case"initialPlacement":H=i;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function Im(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Pm(t){return P_.some(e=>t[e]>=0)}const J_=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:o="referenceHidden",...s}=Hr(t,e);switch(o){case"referenceHidden":{const a=await n.detectOverflow(e,{...s,elementContext:"reference"}),i=Im(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Pm(i)}}}case"escaped":{const a=await n.detectOverflow(e,{...s,altBoundary:!0}),i=Im(a,r.floating);return{data:{escapedOffsets:i,escaped:Pm(i)}}}default:return{}}}}},_0=new Set(["left","top"]);async function X_(t,e){const{placement:r,platform:n,elements:o}=t,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Vr(r),i=rs(r),l=pr(r)==="y",c=_0.has(a)?-1:1,d=s&&l?-1:1,f=Hr(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof v=="number"&&(m=i==="end"?v*-1:v),l?{x:m*d,y:h*c}:{x:h*c,y:m*d}}const Z_=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=e,l=await X_(e,t);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:a}}}}},Q_=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o,platform:s}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=Hr(t,e),d={x:r,y:n},f=await s.detectOverflow(e,c),h=pr(Vr(o)),m=Ff(h);let v=d[m],g=d[h];if(a){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",w=v+f[b],k=v-f[x];v=eu(w,v,k)}if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=g+f[b],k=g-f[x];g=eu(w,g,k)}const y=l.fn({...e,[m]:v,[h]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[m]:a,[h]:i}}}}}},e3=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=e,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Hr(t,e),d={x:r,y:n},f=pr(o),h=Ff(f);let m=d[h],v=d[f];const g=Hr(i,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=h==="y"?"height":"width",k=s.reference[h]-s.floating[w]+y.mainAxis,N=s.reference[h]+s.reference[w]-y.mainAxis;m<k?m=k:m>N&&(m=N)}if(c){var b,x;const w=h==="y"?"width":"height",k=_0.has(Vr(o)),N=s.reference[f]-s.floating[w]+(k&&((b=a.offset)==null?void 0:b[f])||0)+(k?0:y.crossAxis),S=s.reference[f]+s.reference[w]+(k?0:((x=a.offset)==null?void 0:x[f])||0)-(k?y.crossAxis:0);v<N?v=N:v>S&&(v=S)}return{[h]:m,[f]:v}}}},t3=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:o,rects:s,platform:a,elements:i}=e,{apply:l=()=>{},...c}=Hr(t,e),d=await a.detectOverflow(e,c),f=Vr(o),h=rs(o),m=pr(o)==="y",{width:v,height:g}=s.floating;let y,b;f==="top"||f==="bottom"?(y=f,b=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(b=f,y=h==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=v-d.left-d.right,k=gn(g-d[y],x),N=gn(v-d[b],w),S=!e.middlewareData.shift;let C=k,M=N;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(M=w),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(C=x),S&&!h){const A=Tt(d.left,0),O=Tt(d.right,0),D=Tt(d.top,0),q=Tt(d.bottom,0);m?M=v-2*(A!==0||O!==0?A+O:Tt(d.left,d.right)):C=g-2*(D!==0||q!==0?D+q:Tt(d.top,d.bottom))}await l({...e,availableWidth:M,availableHeight:C});const E=await a.getDimensions(i.floating);return v!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function Ql(){return typeof window<"u"}function ns(t){return z0(t)?(t.nodeName||"").toLowerCase():"#document"}function Ot(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function xr(t){var e;return(e=(z0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function z0(t){return Ql()?t instanceof Node||t instanceof Ot(t).Node:!1}function tr(t){return Ql()?t instanceof Element||t instanceof Ot(t).Element:!1}function mr(t){return Ql()?t instanceof HTMLElement||t instanceof Ot(t).HTMLElement:!1}function Lm(t){return!Ql()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ot(t).ShadowRoot}const r3=new Set(["inline","contents"]);function ka(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=rr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!r3.has(o)}const n3=new Set(["table","td","th"]);function o3(t){return n3.has(ns(t))}const s3=[":popover-open",":modal"];function ec(t){return s3.some(e=>{try{return t.matches(e)}catch{return!1}})}const a3=["transform","translate","scale","rotate","perspective"],i3=["transform","translate","scale","rotate","perspective","filter"],l3=["paint","layout","strict","content"];function Bf(t){const e=$f(),r=tr(t)?rr(t):t;return a3.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||i3.some(n=>(r.willChange||"").includes(n))||l3.some(n=>(r.contain||"").includes(n))}function c3(t){let e=vn(t);for(;mr(e)&&!Lo(e);){if(Bf(e))return e;if(ec(e))return null;e=vn(e)}return null}function $f(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const d3=new Set(["html","body","#document"]);function Lo(t){return d3.has(ns(t))}function rr(t){return Ot(t).getComputedStyle(t)}function tc(t){return tr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function vn(t){if(ns(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lm(t)&&t.host||xr(t);return Lm(e)?e.host:e}function B0(t){const e=vn(t);return Lo(e)?t.ownerDocument?t.ownerDocument.body:t.body:mr(e)&&ka(e)?e:B0(e)}function qs(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=B0(t),s=o===((n=t.ownerDocument)==null?void 0:n.body),a=Ot(o);if(s){const i=ru(a);return e.concat(a,a.visualViewport||[],ka(o)?o:[],i&&r?qs(i):[])}return e.concat(o,qs(o,[],r))}function ru(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $0(t){const e=rr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=mr(t),s=o?t.offsetWidth:r,a=o?t.offsetHeight:n,i=ji(r)!==s||ji(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function Hf(t){return tr(t)?t:t.contextElement}function Oo(t){const e=Hf(t);if(!mr(e))return hr(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:s}=$0(e);let a=(s?ji(r.width):r.width)/n,i=(s?ji(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const u3=hr(0);function H0(t){const e=Ot(t);return!$f()||!e.visualViewport?u3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function f3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ot(t)?!1:e}function Yn(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),s=Hf(t);let a=hr(1);e&&(n?tr(n)&&(a=Oo(n)):a=Oo(t));const i=f3(s,r,n)?H0(s):hr(0);let l=(o.left+i.x)/a.x,c=(o.top+i.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(s){const h=Ot(s),m=n&&tr(n)?Ot(n):n;let v=h,g=ru(v);for(;g&&n&&m!==v;){const y=Oo(g),b=g.getBoundingClientRect(),x=rr(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,k=b.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,f*=y.y,l+=w,c+=k,v=Ot(g),g=ru(v)}}return Ti({width:d,height:f,x:l,y:c})}function rc(t,e){const r=tc(t).scrollLeft;return e?e.left+r:Yn(xr(t)).left+r}function V0(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-rc(t,r),o=r.top+e.scrollTop;return{x:n,y:o}}function p3(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const s=o==="fixed",a=xr(n),i=e?ec(e.floating):!1;if(n===a||i&&s)return r;let l={scrollLeft:0,scrollTop:0},c=hr(1);const d=hr(0),f=mr(n);if((f||!f&&!s)&&((ns(n)!=="body"||ka(a))&&(l=tc(n)),mr(n))){const m=Yn(n);c=Oo(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const h=a&&!f&&!s?V0(a,l):hr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function h3(t){return Array.from(t.getClientRects())}function m3(t){const e=xr(t),r=tc(t),n=t.ownerDocument.body,o=Tt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Tt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+rc(t);const i=-r.scrollTop;return rr(n).direction==="rtl"&&(a+=Tt(e.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Fm=25;function g3(t,e){const r=Ot(t),n=xr(t),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const d=$f();(!d||d&&e==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const c=rc(n);if(c<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(n.clientWidth-f.clientWidth-m);v<=Fm&&(s-=v)}else c<=Fm&&(s+=c);return{width:s,height:a,x:i,y:l}}const v3=new Set(["absolute","fixed"]);function y3(t,e){const r=Yn(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,s=mr(t)?Oo(t):hr(1),a=t.clientWidth*s.x,i=t.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:a,height:i,x:l,y:c}}function _m(t,e,r){let n;if(e==="viewport")n=g3(t,r);else if(e==="document")n=m3(xr(t));else if(tr(e))n=y3(e,r);else{const o=H0(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Ti(n)}function W0(t,e){const r=vn(t);return r===e||!tr(r)||Lo(r)?!1:rr(r).position==="fixed"||W0(r,e)}function b3(t,e){const r=e.get(t);if(r)return r;let n=qs(t,[],!1).filter(i=>tr(i)&&ns(i)!=="body"),o=null;const s=rr(t).position==="fixed";let a=s?vn(t):t;for(;tr(a)&&!Lo(a);){const i=rr(a),l=Bf(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&o&&v3.has(o.position)||ka(a)&&!l&&W0(t,a))?n=n.filter(c=>c!==a):o=i,a=vn(a)}return e.set(t,n),n}function x3(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const s=[...r==="clippingAncestors"?ec(e)?[]:b3(e,this._c):[].concat(r),n],a=s[0],i=s.reduce((l,c)=>{const d=_m(e,c,o);return l.top=Tt(d.top,l.top),l.right=gn(d.right,l.right),l.bottom=gn(d.bottom,l.bottom),l.left=Tt(d.left,l.left),l},_m(e,a,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}}function w3(t){const{width:e,height:r}=$0(t);return{width:e,height:r}}function k3(t,e,r){const n=mr(e),o=xr(e),s=r==="fixed",a=Yn(t,!0,s,e);let i={scrollLeft:0,scrollTop:0};const l=hr(0);function c(){l.x=rc(o)}if(n||!n&&!s)if((ns(e)!=="body"||ka(o))&&(i=tc(e)),n){const m=Yn(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else o&&c();s&&!n&&o&&c();const d=o&&!n&&!s?V0(o,i):hr(0),f=a.left+i.scrollLeft-l.x-d.x,h=a.top+i.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function cd(t){return rr(t).position==="static"}function zm(t,e){if(!mr(t)||rr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return xr(t)===r&&(r=r.ownerDocument.body),r}function U0(t,e){const r=Ot(t);if(ec(t))return r;if(!mr(t)){let o=vn(t);for(;o&&!Lo(o);){if(tr(o)&&!cd(o))return o;o=vn(o)}return r}let n=zm(t,e);for(;n&&o3(n)&&cd(n);)n=zm(n,e);return n&&Lo(n)&&cd(n)&&!Bf(n)?r:n||c3(t)||r}const N3=async function(t){const e=this.getOffsetParent||U0,r=this.getDimensions,n=await r(t.floating);return{reference:k3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function C3(t){return rr(t).direction==="rtl"}const S3={convertOffsetParentRelativeRectToViewportRelativeRect:p3,getDocumentElement:xr,getClippingRect:x3,getOffsetParent:U0,getElementRects:N3,getClientRects:h3,getDimensions:w3,getScale:Oo,isElement:tr,isRTL:C3};function G0(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function M3(t,e){let r=null,n;const o=xr(t);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=c;if(i||e(),!h||!m)return;const v=qa(f),g=qa(o.clientWidth-(d+h)),y=qa(o.clientHeight-(f+m)),b=qa(d),x={rootMargin:-v+"px "+-g+"px "+-y+"px "+-b+"px",threshold:Tt(0,gn(1,l))||1};let w=!0;function k(N){const S=N[0].intersectionRatio;if(S!==l){if(!w)return a();S?a(!1,S):n=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!G0(c,t.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(k,x)}r.observe(t)}return a(!0),s}function E3(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Hf(t),d=o||s?[...c?qs(c):[],...qs(e)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const f=c&&i?M3(c,r):null;let h=-1,m=null;a&&(m=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(e)})),r()}),c&&!l&&m.observe(c),m.observe(e));let v,g=l?Yn(t):null;l&&y();function y(){const b=Yn(t);g&&!G0(g,b)&&r(),g=b,v=requestAnimationFrame(y)}return r(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const j3=Z_,R3=Q_,T3=Y_,A3=t3,O3=J_,Bm=K_,D3=e3,I3=(t,e,r)=>{const n=new Map,o={platform:S3,...r},s={...o.platform,_c:n};return q_(t,e,{...o,platform:s})};var P3=typeof document<"u",L3=function(){},pi=P3?T.useLayoutEffect:L3;function Ai(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Ai(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&t.$$typeof)&&!Ai(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function q0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function $m(t,e){const r=q0(t);return Math.round(e*r)/r}function dd(t){const e=p.useRef(t);return pi(()=>{e.current=t}),e}function F3(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=t,[d,f]=p.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(n);Ai(h,n)||m(n);const[v,g]=p.useState(null),[y,b]=p.useState(null),x=p.useCallback(_=>{_!==S.current&&(S.current=_,g(_))},[]),w=p.useCallback(_=>{_!==C.current&&(C.current=_,b(_))},[]),k=s||v,N=a||y,S=p.useRef(null),C=p.useRef(null),M=p.useRef(d),E=l!=null,A=dd(l),O=dd(o),D=dd(c),q=p.useCallback(()=>{if(!S.current||!C.current)return;const _={placement:e,strategy:r,middleware:h};O.current&&(_.platform=O.current),I3(S.current,C.current,_).then(z=>{const B={...z,isPositioned:D.current!==!1};F.current&&!Ai(M.current,B)&&(M.current=B,Dl.flushSync(()=>{f(B)}))})},[h,e,r,O,D]);pi(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const F=p.useRef(!1);pi(()=>(F.current=!0,()=>{F.current=!1}),[]),pi(()=>{if(k&&(S.current=k),N&&(C.current=N),k&&N){if(A.current)return A.current(k,N,q);q()}},[k,N,q,A,E]);const $=p.useMemo(()=>({reference:S,floating:C,setReference:x,setFloating:w}),[x,w]),H=p.useMemo(()=>({reference:k,floating:N}),[k,N]),P=p.useMemo(()=>{const _={position:r,left:0,top:0};if(!H.floating)return _;const z=$m(H.floating,d.x),B=$m(H.floating,d.y);return i?{..._,transform:"translate("+z+"px, "+B+"px)",...q0(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:B}},[r,i,H.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:q,refs:$,elements:H,floatingStyles:P}),[d,q,$,H,P])}const _3=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:o}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Bm({element:n.current,padding:o}).fn(r):{}:n?Bm({element:n,padding:o}).fn(r):{}}}},z3=(t,e)=>({...j3(t),options:[t,e]}),B3=(t,e)=>({...R3(t),options:[t,e]}),$3=(t,e)=>({...D3(t),options:[t,e]}),H3=(t,e)=>({...T3(t),options:[t,e]}),V3=(t,e)=>({...A3(t),options:[t,e]}),W3=(t,e)=>({...O3(t),options:[t,e]}),U3=(t,e)=>({..._3(t),options:[t,e]});var G3="Arrow",K0=p.forwardRef((t,e)=>{const{children:r,width:n=10,height:o=5,...s}=t;return u.jsx(Q.svg,{...s,ref:e,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});K0.displayName=G3;var q3=K0,Vf="Popper",[Y0,wr]=Oe(Vf),[K3,J0]=Y0(Vf),X0=t=>{const{__scopePopper:e,children:r}=t,[n,o]=p.useState(null);return u.jsx(K3,{scope:e,anchor:n,onAnchorChange:o,children:r})};X0.displayName=Vf;var Z0="PopperAnchor",Q0=p.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...o}=t,s=J0(Z0,r),a=p.useRef(null),i=oe(e,a),l=p.useRef(null);return p.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||a.current,c!==l.current&&s.onAnchorChange(l.current)}),n?null:u.jsx(Q.div,{...o,ref:i})});Q0.displayName=Z0;var Wf="PopperContent",[Y3,J3]=Y0(Wf),ew=p.forwardRef((t,e)=>{var r,n,o,s,a,i;const{__scopePopper:l,side:c="bottom",sideOffset:d=0,align:f="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:w="optimized",onPlaced:k,...N}=t,S=J0(Wf,l),[C,M]=p.useState(null),E=oe(e,ue=>M(ue)),[A,O]=p.useState(null),D=xa(A),q=(D==null?void 0:D.width)??0,F=(D==null?void 0:D.height)??0,$=c+(f!=="center"?"-"+f:""),H=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},P=Array.isArray(g)?g:[g],_=P.length>0,z={padding:H,boundary:P.filter(Z3),altBoundary:_},{refs:B,floatingStyles:G,placement:I,isPositioned:J,middlewareData:ee}=F3({strategy:"fixed",placement:$,whileElementsMounted:(...ue)=>E3(...ue,{animationFrame:w==="always"}),elements:{reference:S.anchor},middleware:[z3({mainAxis:d+F,alignmentAxis:h}),v&&B3({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?$3():void 0,...z}),v&&H3({...z}),V3({...z,apply:({elements:ue,rects:Se,availableWidth:et,availableHeight:$e})=>{const{width:dt,height:Cr}=Se.reference,qe=ue.floating.style;qe.setProperty("--radix-popper-available-width",`${et}px`),qe.setProperty("--radix-popper-available-height",`${$e}px`),qe.setProperty("--radix-popper-anchor-width",`${dt}px`),qe.setProperty("--radix-popper-anchor-height",`${Cr}px`)}}),A&&U3({element:A,padding:m}),Q3({arrowWidth:q,arrowHeight:F}),x&&W3({strategy:"referenceHidden",...z})]}),[W,Z]=nw(I),V=Te(k);Ae(()=>{J&&(V==null||V())},[J,V]);const X=(r=ee.arrow)==null?void 0:r.x,te=(n=ee.arrow)==null?void 0:n.y,ne=((o=ee.arrow)==null?void 0:o.centerOffset)!==0,[Y,se]=p.useState();return Ae(()=>{C&&se(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:J?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(s=ee.transformOrigin)==null?void 0:s.x,(a=ee.transformOrigin)==null?void 0:a.y].join(" "),...((i=ee.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(Y3,{scope:l,placedSide:W,onArrowChange:O,arrowX:X,arrowY:te,shouldHideArrow:ne,children:u.jsx(Q.div,{"data-side":W,"data-align":Z,...N,ref:E,style:{...N.style,animation:J?void 0:"none"}})})})});ew.displayName=Wf;var tw="PopperArrow",X3={top:"bottom",right:"left",bottom:"top",left:"right"},rw=p.forwardRef(function(t,e){const{__scopePopper:r,...n}=t,o=J3(tw,r),s=X3[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(q3,{...n,ref:e,style:{...n.style,display:"block"}})})});rw.displayName=tw;function Z3(t){return t!==null}var Q3=t=>({name:"transformOrigin",options:t,fn(e){var r,n,o;const{placement:s,rects:a,middlewareData:i}=e,l=((r=i.arrow)==null?void 0:r.centerOffset)!==0,c=l?0:t.arrowWidth,d=l?0:t.arrowHeight,[f,h]=nw(s),m={start:"0%",center:"50%",end:"100%"}[h],v=(((n=i.arrow)==null?void 0:n.x)??0)+c/2,g=(((o=i.arrow)==null?void 0:o.y)??0)+d/2;let y="",b="";return f==="bottom"?(y=l?m:`${v}px`,b=`${-d}px`):f==="top"?(y=l?m:`${v}px`,b=`${a.floating.height+d}px`):f==="right"?(y=`${-d}px`,b=l?m:`${g}px`):f==="left"&&(y=`${a.floating.width+d}px`,b=l?m:`${g}px`),{data:{x:y,y:b}}}});function nw(t){const[e,r="center"]=t.split("-");return[e,r]}var ow=X0,ss=Q0,Na=ew,Ca=rw,ud="rovingFocusGroup.onEntryFocus",ez={bubbles:!1,cancelable:!0},Sa="RovingFocusGroup",[nu,sw,tz]=xn(Sa),[rz,kr]=Oe(Sa,[tz]),[nz,oz]=rz(Sa),aw=p.forwardRef((t,e)=>u.jsx(nu.Provider,{scope:t.__scopeRovingFocusGroup,children:u.jsx(nu.Slot,{scope:t.__scopeRovingFocusGroup,children:u.jsx(sz,{...t,ref:e})})}));aw.displayName=Sa;var sz=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,h=p.useRef(null),m=oe(e,h),v=yr(s),[g,y]=Ye({prop:a,defaultProp:i??null,onChange:l,caller:Sa}),[b,x]=p.useState(!1),w=Te(c),k=sw(r),N=p.useRef(!1),[S,C]=p.useState(0);return p.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ud,w),()=>M.removeEventListener(ud,w)},[w]),u.jsx(nz,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:g,onItemFocus:p.useCallback(M=>y(M),[y]),onItemShiftTab:p.useCallback(()=>x(!0),[]),onFocusableItemAdd:p.useCallback(()=>C(M=>M+1),[]),onFocusableItemRemove:p.useCallback(()=>C(M=>M-1),[]),children:u.jsx(Q.div,{tabIndex:b||S===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:L(t.onMouseDown,()=>{N.current=!0}),onFocus:L(t.onFocus,M=>{const E=!N.current;if(M.target===M.currentTarget&&E&&!b){const A=new CustomEvent(ud,ez);if(M.currentTarget.dispatchEvent(A),!A.defaultPrevented){const O=k().filter($=>$.focusable),D=O.find($=>$.active),q=O.find($=>$.id===g),F=[D,q,...O].filter(Boolean).map($=>$.ref.current);cw(F,d)}}N.current=!1}),onBlur:L(t.onBlur,()=>x(!1))})})}),iw="RovingFocusGroupItem",lw=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=t,l=Ke(),c=s||l,d=oz(iw,r),f=d.currentTabStopId===c,h=sw(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:g}=d;return p.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),u.jsx(nu.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:u.jsx(Q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:e,onMouseDown:L(t.onMouseDown,y=>{n?d.onItemFocus(c):y.preventDefault()}),onFocus:L(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:L(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=lz(y,d.orientation,d.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=h().filter(w=>w.focusable).map(w=>w.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const w=x.indexOf(y.currentTarget);x=d.loop?cz(x,w+1):x.slice(w+1)}setTimeout(()=>cw(x))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:g!=null}):a})})});lw.displayName=iw;var az={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iz(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function lz(t,e,r){const n=iz(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return az[n]}function cw(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function cz(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var Ma=aw,Ea=lw,ou=["Enter"," "],dz=["ArrowDown","PageUp","Home"],dw=["ArrowUp","PageDown","End"],uz=[...dz,...dw],fz={ltr:[...ou,"ArrowRight"],rtl:[...ou,"ArrowLeft"]},pz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nc="Menu",[Ks,hz,mz]=xn(nc),[no,ja]=Oe(nc,[mz,wr,kr]),Uf=wr(),uw=kr(),[lJ,oo]=no(nc),[cJ,Ra]=no(nc),gz="MenuAnchor",Gf=p.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,o=Uf(r);return u.jsx(ss,{...o,...n,ref:e})});Gf.displayName=gz;var qf="MenuPortal",[vz,fw]=no(qf,{forceMount:void 0}),pw=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:o}=t,s=oo(qf,e);return u.jsx(vz,{scope:e,forceMount:r,children:u.jsx(De,{present:r||s.open,children:u.jsx(ua,{asChild:!0,container:o,children:n})})})};pw.displayName=qf;var Ht="MenuContent",[yz,Kf]=no(Ht),hw=p.forwardRef((t,e)=>{const r=fw(Ht,t.__scopeMenu),{forceMount:n=r.forceMount,...o}=t,s=oo(Ht,t.__scopeMenu),a=Ra(Ht,t.__scopeMenu);return u.jsx(Ks.Provider,{scope:t.__scopeMenu,children:u.jsx(De,{present:n||s.open,children:u.jsx(Ks.Slot,{scope:t.__scopeMenu,children:a.modal?u.jsx(bz,{...o,ref:e}):u.jsx(xz,{...o,ref:e})})})})}),bz=p.forwardRef((t,e)=>{const r=oo(Ht,t.__scopeMenu),n=p.useRef(null),o=oe(e,n);return p.useEffect(()=>{const s=n.current;if(s)return $l(s)},[]),u.jsx(Yf,{...t,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:L(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),xz=p.forwardRef((t,e)=>{const r=oo(Ht,t.__scopeMenu);return u.jsx(Yf,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),wz=Un("MenuContent.ScrollLock"),Yf=p.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:v,...g}=t,y=oo(Ht,r),b=Ra(Ht,r),x=Uf(r),w=uw(r),k=hz(r),[N,S]=p.useState(null),C=p.useRef(null),M=oe(e,C,y.onContentChange),E=p.useRef(0),A=p.useRef(""),O=p.useRef(0),D=p.useRef(null),q=p.useRef("right"),F=p.useRef(0),$=v?fa:p.Fragment,H=v?{as:wz,allowPinchZoom:!0}:void 0,P=z=>{var B,G;const I=A.current+z,J=k().filter(te=>!te.disabled),ee=document.activeElement,W=(B=J.find(te=>te.ref.current===ee))==null?void 0:B.textValue,Z=J.map(te=>te.textValue),V=Dz(Z,I,W),X=(G=J.find(te=>te.textValue===V))==null?void 0:G.ref.current;(function te(ne){A.current=ne,window.clearTimeout(E.current),ne!==""&&(E.current=window.setTimeout(()=>te(""),1e3))})(I),X&&setTimeout(()=>X.focus())};p.useEffect(()=>()=>window.clearTimeout(E.current),[]),zl();const _=p.useCallback(z=>{var B,G;return q.current===((B=D.current)==null?void 0:B.side)&&Pz(z,(G=D.current)==null?void 0:G.area)},[]);return u.jsx(yz,{scope:r,searchRef:A,onItemEnter:p.useCallback(z=>{_(z)&&z.preventDefault()},[_]),onItemLeave:p.useCallback(z=>{var B;_(z)||((B=C.current)==null||B.focus(),S(null))},[_]),onTriggerLeave:p.useCallback(z=>{_(z)&&z.preventDefault()},[_]),pointerGraceTimerRef:O,onPointerGraceIntentChange:p.useCallback(z=>{D.current=z},[]),children:u.jsx($,{...H,children:u.jsx(da,{asChild:!0,trapped:o,onMountAutoFocus:L(s,z=>{var B;z.preventDefault(),(B=C.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(wn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:u.jsx(Ma,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:S,onEntryFocus:L(l,z=>{b.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Na,{role:"menu","aria-orientation":"vertical","data-state":Tw(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:M,style:{outline:"none",...g.style},onKeyDown:L(g.onKeyDown,z=>{const B=z.target.closest("[data-radix-menu-content]")===z.currentTarget,G=z.ctrlKey||z.altKey||z.metaKey,I=z.key.length===1;B&&(z.key==="Tab"&&z.preventDefault(),!G&&I&&P(z.key));const J=C.current;if(z.target!==J||!uz.includes(z.key))return;z.preventDefault();const ee=k().filter(W=>!W.disabled).map(W=>W.ref.current);dw.includes(z.key)&&ee.reverse(),Az(ee)}),onBlur:L(t.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(E.current),A.current="")}),onPointerMove:L(t.onPointerMove,Ys(z=>{const B=z.target,G=F.current!==z.clientX;if(z.currentTarget.contains(B)&&G){const I=z.clientX>F.current?"right":"left";q.current=I,F.current=z.clientX}}))})})})})})})});hw.displayName=Ht;var kz="MenuGroup",Jf=p.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return u.jsx(Q.div,{role:"group",...n,ref:e})});Jf.displayName=kz;var Nz="MenuLabel",mw=p.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return u.jsx(Q.div,{...n,ref:e})});mw.displayName=Nz;var Oi="MenuItem",Hm="menu.itemSelect",oc=p.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...o}=t,s=p.useRef(null),a=Ra(Oi,t.__scopeMenu),i=Kf(Oi,t.__scopeMenu),l=oe(e,s),c=p.useRef(!1),d=()=>{const f=s.current;if(!r&&f){const h=new CustomEvent(Hm,{bubbles:!0,cancelable:!0});f.addEventListener(Hm,m=>n==null?void 0:n(m),{once:!0}),ki(f,h),h.defaultPrevented?c.current=!1:a.onClose()}};return u.jsx(gw,{...o,ref:l,disabled:r,onClick:L(t.onClick,d),onPointerDown:f=>{var h;(h=t.onPointerDown)==null||h.call(t,f),c.current=!0},onPointerUp:L(t.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:L(t.onKeyDown,f=>{const h=i.searchRef.current!=="";r||h&&f.key===" "||ou.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});oc.displayName=Oi;var gw=p.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...s}=t,a=Kf(Oi,r),i=uw(r),l=p.useRef(null),c=oe(e,l),[d,f]=p.useState(!1),[h,m]=p.useState("");return p.useEffect(()=>{const v=l.current;v&&m((v.textContent??"").trim())},[s.children]),u.jsx(Ks.ItemSlot,{scope:r,disabled:n,textValue:o??h,children:u.jsx(Ea,{asChild:!0,...i,focusable:!n,children:u.jsx(Q.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:c,onPointerMove:L(t.onPointerMove,Ys(v=>{n?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(t.onPointerLeave,Ys(v=>a.onItemLeave(v))),onFocus:L(t.onFocus,()=>f(!0)),onBlur:L(t.onBlur,()=>f(!1))})})})}),Cz="MenuCheckboxItem",vw=p.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...o}=t;return u.jsx(kw,{scope:t.__scopeMenu,checked:r,children:u.jsx(oc,{role:"menuitemcheckbox","aria-checked":Di(r)?"mixed":r,...o,ref:e,"data-state":Zf(r),onSelect:L(o.onSelect,()=>n==null?void 0:n(Di(r)?!0:!r),{checkForDefaultPrevented:!1})})})});vw.displayName=Cz;var yw="MenuRadioGroup",[Sz,Mz]=no(yw,{value:void 0,onValueChange:()=>{}}),bw=p.forwardRef((t,e)=>{const{value:r,onValueChange:n,...o}=t,s=Te(n);return u.jsx(Sz,{scope:t.__scopeMenu,value:r,onValueChange:s,children:u.jsx(Jf,{...o,ref:e})})});bw.displayName=yw;var xw="MenuRadioItem",ww=p.forwardRef((t,e)=>{const{value:r,...n}=t,o=Mz(xw,t.__scopeMenu),s=r===o.value;return u.jsx(kw,{scope:t.__scopeMenu,checked:s,children:u.jsx(oc,{role:"menuitemradio","aria-checked":s,...n,ref:e,"data-state":Zf(s),onSelect:L(n.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,r)},{checkForDefaultPrevented:!1})})})});ww.displayName=xw;var Xf="MenuItemIndicator",[kw,Ez]=no(Xf,{checked:!1}),Nw=p.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...o}=t,s=Ez(Xf,r);return u.jsx(De,{present:n||Di(s.checked)||s.checked===!0,children:u.jsx(Q.span,{...o,ref:e,"data-state":Zf(s.checked)})})});Nw.displayName=Xf;var jz="MenuSeparator",Cw=p.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return u.jsx(Q.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});Cw.displayName=jz;var Rz="MenuArrow",Sw=p.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,o=Uf(r);return u.jsx(Ca,{...o,...n,ref:e})});Sw.displayName=Rz;var Tz="MenuSub",[dJ,Mw]=no(Tz),ks="MenuSubTrigger",Ew=p.forwardRef((t,e)=>{const r=oo(ks,t.__scopeMenu),n=Ra(ks,t.__scopeMenu),o=Mw(ks,t.__scopeMenu),s=Kf(ks,t.__scopeMenu),a=p.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},d=p.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),l(null)}},[i,l]),u.jsx(Gf,{asChild:!0,...c,children:u.jsx(gw,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Tw(r.open),...t,ref:er(e,o.onTriggerChange),onClick:f=>{var h;(h=t.onClick)==null||h.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:L(t.onPointerMove,Ys(f=>{s.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:L(t.onPointerLeave,Ys(f=>{var h,m;d();const v=(h=r.content)==null?void 0:h.getBoundingClientRect();if(v){const g=(m=r.content)==null?void 0:m.dataset.side,y=g==="right",b=y?-5:5,x=v[y?"left":"right"],w=v[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x,y:v.top},{x:w,y:v.top},{x:w,y:v.bottom},{x,y:v.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:L(t.onKeyDown,f=>{var h;const m=s.searchRef.current!=="";t.disabled||m&&f.key===" "||fz[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});Ew.displayName=ks;var jw="MenuSubContent",Rw=p.forwardRef((t,e)=>{const r=fw(Ht,t.__scopeMenu),{forceMount:n=r.forceMount,...o}=t,s=oo(Ht,t.__scopeMenu),a=Ra(Ht,t.__scopeMenu),i=Mw(jw,t.__scopeMenu),l=p.useRef(null),c=oe(e,l);return u.jsx(Ks.Provider,{scope:t.__scopeMenu,children:u.jsx(De,{present:n||s.open,children:u.jsx(Ks.Slot,{scope:t.__scopeMenu,children:u.jsx(Yf,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:c,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:L(t.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:L(t.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:L(t.onKeyDown,d=>{var f;const h=d.currentTarget.contains(d.target),m=pz[a.dir].includes(d.key);h&&m&&(s.onOpenChange(!1),(f=i.trigger)==null||f.focus(),d.preventDefault())})})})})})});Rw.displayName=jw;function Tw(t){return t?"open":"closed"}function Di(t){return t==="indeterminate"}function Zf(t){return Di(t)?"indeterminate":t?"checked":"unchecked"}function Az(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function Oz(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function Dz(t,e,r){const n=e.length>1&&Array.from(e).every(i=>i===e[0])?e[0]:e,o=r?t.indexOf(r):-1;let s=Oz(t,Math.max(o,0));n.length===1&&(s=s.filter(i=>i!==r));const a=s.find(i=>i.toLowerCase().startsWith(n.toLowerCase()));return a!==r?a:void 0}function Iz(t,e){const{x:r,y:n}=t;let o=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const i=e[s],l=e[a],c=i.x,d=i.y,f=l.x,h=l.y;d>n!=h>n&&r<(f-c)*(n-d)/(h-d)+c&&(o=!o)}return o}function Pz(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return Iz(r,e)}function Ys(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Qf=Gf,ep=pw,tp=hw,rp=Jf,np=mw,op=oc,sp=vw,ap=bw,ip=ww,lp=Nw,cp=Cw,dp=Sw,up=Ew,fp=Rw,Aw="ContextMenu",[Lz]=Oe(Aw,[ja]),Nt=ja(),[uJ,Ow]=Lz(Aw),Dw="ContextMenuTrigger",Fz=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,disabled:n=!1,...o}=t,s=Ow(Dw,r),a=Nt(r),i=p.useRef({x:0,y:0}),l=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),c=p.useRef(0),d=p.useCallback(()=>window.clearTimeout(c.current),[]),f=h=>{i.current={x:h.clientX,y:h.clientY},s.onOpenChange(!0)};return p.useEffect(()=>d,[d]),p.useEffect(()=>void(n&&d()),[n,d]),u.jsxs(u.Fragment,{children:[u.jsx(Qf,{...a,virtualRef:l}),u.jsx(Q.span,{"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:n?t.onContextMenu:L(t.onContextMenu,h=>{d(),f(h),h.preventDefault()}),onPointerDown:n?t.onPointerDown:L(t.onPointerDown,Ka(h=>{d(),c.current=window.setTimeout(()=>f(h),700)})),onPointerMove:n?t.onPointerMove:L(t.onPointerMove,Ka(d)),onPointerCancel:n?t.onPointerCancel:L(t.onPointerCancel,Ka(d)),onPointerUp:n?t.onPointerUp:L(t.onPointerUp,Ka(d))})]})});Fz.displayName=Dw;var _z="ContextMenuPortal",Iw=t=>{const{__scopeContextMenu:e,...r}=t,n=Nt(e);return u.jsx(ep,{...n,...r})};Iw.displayName=_z;var Pw="ContextMenuContent",Lw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Ow(Pw,r),s=Nt(r),a=p.useRef(!1);return u.jsx(tp,{...s,...n,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var l;(l=t.onCloseAutoFocus)==null||l.call(t,i),!i.defaultPrevented&&a.current&&i.preventDefault(),a.current=!1},onInteractOutside:i=>{var l;(l=t.onInteractOutside)==null||l.call(t,i),!i.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Lw.displayName=Pw;var zz="ContextMenuGroup",Bz=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(rp,{...o,...n,ref:e})});Bz.displayName=zz;var $z="ContextMenuLabel",Fw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(np,{...o,...n,ref:e})});Fw.displayName=$z;var Hz="ContextMenuItem",_w=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(op,{...o,...n,ref:e})});_w.displayName=Hz;var Vz="ContextMenuCheckboxItem",zw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(sp,{...o,...n,ref:e})});zw.displayName=Vz;var Wz="ContextMenuRadioGroup",Uz=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(ap,{...o,...n,ref:e})});Uz.displayName=Wz;var Gz="ContextMenuRadioItem",Bw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(ip,{...o,...n,ref:e})});Bw.displayName=Gz;var qz="ContextMenuItemIndicator",$w=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(lp,{...o,...n,ref:e})});$w.displayName=qz;var Kz="ContextMenuSeparator",Hw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(cp,{...o,...n,ref:e})});Hw.displayName=Kz;var Yz="ContextMenuArrow",Jz=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(dp,{...o,...n,ref:e})});Jz.displayName=Yz;var Xz="ContextMenuSubTrigger",Vw=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(up,{...o,...n,ref:e})});Vw.displayName=Xz;var Zz="ContextMenuSubContent",Ww=p.forwardRef((t,e)=>{const{__scopeContextMenu:r,...n}=t,o=Nt(r);return u.jsx(fp,{...o,...n,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ww.displayName=Zz;function Ka(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Qz=Iw,Uw=Lw,Gw=Fw,qw=_w,Kw=zw,Yw=Bw,Jw=$w,Xw=Hw,Zw=Vw,Qw=Ww;const e5=p.forwardRef(({className:t,inset:e,children:r,...n},o)=>u.jsxs(Zw,{ref:o,className:R("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...n,children:[r,u.jsx(Jo,{className:"ml-auto h-4 w-4"})]}));e5.displayName=Zw.displayName;const t5=p.forwardRef(({className:t,...e},r)=>u.jsx(Qw,{ref:r,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));t5.displayName=Qw.displayName;const r5=p.forwardRef(({className:t,...e},r)=>u.jsx(Qz,{children:u.jsx(Uw,{ref:r,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));r5.displayName=Uw.displayName;const n5=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(qw,{ref:n,className:R("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...r}));n5.displayName=qw.displayName;const o5=p.forwardRef(({className:t,children:e,checked:r,...n},o)=>u.jsxs(Kw,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Jw,{children:u.jsx(bt,{className:"h-4 w-4"})})}),e]}));o5.displayName=Kw.displayName;const s5=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(Yw,{ref:n,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Jw,{children:u.jsx(_l,{className:"h-2 w-2 fill-current"})})}),e]}));s5.displayName=Yw.displayName;const a5=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(Gw,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...r}));a5.displayName=Gw.displayName;const i5=p.forwardRef(({className:t,...e},r)=>u.jsx(Xw,{ref:r,className:R("-mx-1 my-1 h-px bg-border",t),...e}));i5.displayName=Xw.displayName;const l5=[{type:"visa",name:"Visa",pattern:/^4/,cvvLength:3,gaps:[4,8,12],lengths:[16,18,19]},{type:"mastercard",name:"Mastercard",pattern:/^(5[1-5]|2[2-7])/,cvvLength:3,gaps:[4,8,12],lengths:[16]},{type:"amex",name:"American Express",pattern:/^3[47]/,cvvLength:4,gaps:[4,10],lengths:[15]},{type:"discover",name:"Discover",pattern:/^(6011|65|64[4-9])/,cvvLength:3,gaps:[4,8,12],lengths:[16,19]},{type:"diners",name:"Diners Club",pattern:/^(36|38|30[0-5])/,cvvLength:3,gaps:[4,10],lengths:[14,16,19]},{type:"jcb",name:"JCB",pattern:/^35/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]},{type:"unionpay",name:"UnionPay",pattern:/^62/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]}];function e1(t){const e=t.replace(/\s/g,"");return l5.find(r=>r.pattern.test(e))}function c5(t,e=[4,8,12]){const r=t.replace(/\D/g,"");let n="",o=0;for(let s=0;s<r.length;s++)o<e.length&&s===e[o]&&(n+=" ",o++),n+=r[s];return n}function d5(t){const e=t.replace(/\D/g,"");return e.length>=2?`${e.slice(0,2)}/${e.slice(2,4)}`:e}const u5=({type:t})=>{const e="h-6 w-6";switch(t){case"visa":return u.jsx("span",{className:R(e,"text-blue-600 font-bold text-xs"),children:"VISA"});case"mastercard":return u.jsxs("div",{className:"flex -space-x-1",children:[u.jsx("div",{className:"h-4 w-4 rounded-full bg-red-500"}),u.jsx("div",{className:"h-4 w-4 rounded-full bg-yellow-500 opacity-80"})]});case"amex":return u.jsx("span",{className:R(e,"text-blue-500 font-bold text-xs"),children:"AMEX"});case"discover":return u.jsx("span",{className:R(e,"text-orange-500 font-bold text-xs"),children:"DISC"});default:return u.jsx(ub,{className:R(e,"text-muted-foreground")})}},t1=p.forwardRef(({className:t,onChange:e,...r},n)=>{const[o,s]=p.useState(""),[a,i]=p.useState("unknown"),l=c=>{const d=c.target.value.replace(/\D/g,""),f=e1(d),h=(f==null?void 0:f.lengths[f.lengths.length-1])||19;if(d.length<=h){const m=c5(d,f==null?void 0:f.gaps);s(m);const v=(f==null?void 0:f.type)||"unknown";i(v),e==null||e(d,v)}};return u.jsxs("div",{className:"relative",children:[u.jsx(ub,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-number",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-12 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:n,value:o,onChange:l,placeholder:"1234 5678 9012 3456",...r}),u.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:u.jsx(u5,{type:a})})]})});t1.displayName="CreditCardNumberInput";const r1=p.forwardRef(({className:t,onChange:e,...r},n)=>{const[o,s]=p.useState(""),a=i=>{const l=i.target.value.replace(/\D/g,"");if(l.length<=4){const c=d5(l);s(c),e==null||e(l)}};return u.jsxs("div",{className:"relative",children:[u.jsx(Fl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-exp",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:n,value:o,onChange:a,placeholder:"MM/YY",...r})]})});r1.displayName="CreditCardExpiryInput";const n1=p.forwardRef(({className:t,cardType:e="unknown",onChange:r,...n},o)=>{const[s,a]=p.useState(""),i=e==="amex"?4:3,l=c=>{const d=c.target.value.replace(/\D/g,"");d.length<=i&&(a(d),r==null||r(d))};return u.jsxs("div",{className:"relative",children:[u.jsx(pb,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-csc",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:o,value:s,onChange:l,placeholder:e==="amex"?"1234":"123",maxLength:i,...n})]})});n1.displayName="CreditCardCVVInput";const f5=p.forwardRef(({className:t,onCardChange:e,disabled:r},n)=>{const[o,s]=p.useState(""),[a,i]=p.useState(""),[l,c]=p.useState(""),[d,f]=p.useState("unknown");return p.useEffect(()=>{const h=e1(o),m=h?h.lengths.includes(o.length):o.length>=13&&o.length<=19,v=a.length===4,g=d==="amex"?l.length===4:l.length===3;e==null||e({number:o,expiry:a,cvv:l,cardType:d,isValid:m&&v&&g})},[o,a,l,d,e]),u.jsxs("div",{ref:n,className:R("space-y-3",t),children:[u.jsx(t1,{onChange:(h,m)=>{s(h),f(m)},disabled:r}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(r1,{onChange:i,disabled:r}),u.jsx(n1,{cardType:d,onChange:c,disabled:r})]})]})});f5.displayName="CreditCardInput";var sc="Popover",[o1]=Oe(sc,[wr]),Ta=wr(),[p5,Nn]=o1(sc),s1=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!1}=t,i=Ta(e),l=p.useRef(null),[c,d]=p.useState(!1),[f,h]=Ye({prop:n,defaultProp:o??!1,onChange:s,caller:sc});return u.jsx(ow,{...i,children:u.jsx(p5,{scope:e,contentId:Ke(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:c,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:a,children:r})})};s1.displayName=sc;var a1="PopoverAnchor",h5=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,o=Nn(a1,r),s=Ta(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return p.useEffect(()=>(a(),()=>i()),[a,i]),u.jsx(ss,{...s,...n,ref:e})});h5.displayName=a1;var i1="PopoverTrigger",l1=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,o=Nn(i1,r),s=Ta(r),a=oe(e,o.triggerRef),i=u.jsx(Q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p1(o.open),...n,ref:a,onClick:L(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:u.jsx(ss,{asChild:!0,...s,children:i})});l1.displayName=i1;var pp="PopoverPortal",[m5,g5]=o1(pp,{forceMount:void 0}),c1=t=>{const{__scopePopover:e,forceMount:r,children:n,container:o}=t,s=Nn(pp,e);return u.jsx(m5,{scope:e,forceMount:r,children:u.jsx(De,{present:r||s.open,children:u.jsx(ua,{asChild:!0,container:o,children:n})})})};c1.displayName=pp;var Fo="PopoverContent",d1=p.forwardRef((t,e)=>{const r=g5(Fo,t.__scopePopover),{forceMount:n=r.forceMount,...o}=t,s=Nn(Fo,t.__scopePopover);return u.jsx(De,{present:n||s.open,children:s.modal?u.jsx(y5,{...o,ref:e}):u.jsx(b5,{...o,ref:e})})});d1.displayName=Fo;var v5=Un("PopoverContent.RemoveScroll"),y5=p.forwardRef((t,e)=>{const r=Nn(Fo,t.__scopePopover),n=p.useRef(null),o=oe(e,n),s=p.useRef(!1);return p.useEffect(()=>{const a=n.current;if(a)return $l(a)},[]),u.jsx(fa,{as:v5,allowPinchZoom:!0,children:u.jsx(u1,{...t,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(t.onCloseAutoFocus,a=>{var i;a.preventDefault(),s.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:L(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:L(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),b5=p.forwardRef((t,e)=>{const r=Nn(Fo,t.__scopePopover),n=p.useRef(!1),o=p.useRef(!1);return u.jsx(u1,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=t.onCloseAutoFocus)==null||a.call(t,s),s.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var a,i;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;(i=r.triggerRef.current)!=null&&i.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),u1=p.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=t,h=Nn(Fo,r),m=Ta(r);return zl(),u.jsx(da,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:u.jsx(wn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:u.jsx(Na,{"data-state":p1(h.open),role:"dialog",id:h.contentId,...m,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),f1="PopoverClose",x5=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,o=Nn(f1,r);return u.jsx(Q.button,{type:"button",...n,ref:e,onClick:L(t.onClick,()=>o.onOpenChange(!1))})});x5.displayName=f1;var w5="PopoverArrow",k5=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,o=Ta(r);return u.jsx(Ca,{...o,...n,ref:e})});k5.displayName=w5;function p1(t){return t?"open":"closed"}var N5=s1,C5=l1,S5=c1,h1=d1;const ac=N5,ic=C5,Aa=p.forwardRef(({className:t,align:e="center",sideOffset:r=4,...n},o)=>u.jsx(S5,{children:u.jsx(h1,{ref:o,align:e,sideOffset:r,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));Aa.displayName=h1.displayName;const M5=p.forwardRef(({value:t,onChange:e,placeholder:r="Pick a date",disabled:n=!1,className:o,dateFormat:s="PPP"},a)=>{const[i,l]=p.useState(!1);return u.jsxs(ac,{open:i,onOpenChange:l,children:[u.jsx(ic,{asChild:!0,children:u.jsxs(Ut,{ref:a,variant:"outline",disabled:n,className:R("w-full justify-start text-left font-normal",!t&&"text-muted-foreground",o),children:[u.jsx(Fl,{className:"mr-2 h-4 w-4"}),t?fr(t,s):u.jsx("span",{children:r})]})}),u.jsx(Aa,{className:"w-auto p-0",align:"start",children:u.jsx(Kl,{mode:"single",selected:t,onSelect:c=>{e==null||e(c),l(!1)},initialFocus:!0})})]})});M5.displayName="DatePicker";const E5=p.forwardRef(({value:t,onChange:e,placeholder:r="Pick a date range",disabled:n=!1,className:o,dateFormat:s="LLL dd, y"},a)=>{const[i,l]=p.useState(!1);return u.jsxs(ac,{open:i,onOpenChange:l,children:[u.jsx(ic,{asChild:!0,children:u.jsxs(Ut,{ref:a,variant:"outline",disabled:n,className:R("w-full justify-start text-left font-normal",!(t!=null&&t.from)&&"text-muted-foreground",o),children:[u.jsx(Fl,{className:"mr-2 h-4 w-4"}),t!=null&&t.from?t.to?u.jsxs(u.Fragment,{children:[fr(t.from,s)," -"," ",fr(t.to,s)]}):fr(t.from,s):u.jsx("span",{children:r})]})}),u.jsx(Aa,{className:"w-auto p-0",align:"start",children:u.jsx(Kl,{mode:"range",defaultMonth:t==null?void 0:t.from,selected:t,onSelect:c=>{e==null||e(c)},numberOfMonths:2,initialFocus:!0})})]})});E5.displayName="DateRangePicker";function Js(t,[e,r]){return Math.min(r,Math.max(e,t))}var m1=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),j5="VisuallyHidden",g1=p.forwardRef((t,e)=>u.jsx(Q.span,{...t,ref:e,style:{...m1,...t.style}}));g1.displayName=j5;var v1=g1,R5=[" ","Enter","ArrowUp","ArrowDown"],T5=[" ","Enter"],Jn="Select",[lc,cc,A5]=xn(Jn),[as]=Oe(Jn,[A5,wr]),dc=wr(),[O5,Cn]=as(Jn),[D5,I5]=as(Jn),y1=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:h,required:m,form:v}=t,g=dc(e),[y,b]=p.useState(null),[x,w]=p.useState(null),[k,N]=p.useState(!1),S=yr(c),[C,M]=Ye({prop:n,defaultProp:o??!1,onChange:s,caller:Jn}),[E,A]=Ye({prop:a,defaultProp:i,onChange:l,caller:Jn}),O=p.useRef(null),D=y?v||!!y.closest("form"):!0,[q,F]=p.useState(new Set),$=Array.from(q).map(H=>H.props.value).join(";");return u.jsx(ow,{...g,children:u.jsxs(O5,{required:m,scope:e,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:Ke(),value:E,onValueChange:A,open:C,onOpenChange:M,dir:S,triggerPointerDownPosRef:O,disabled:h,children:[u.jsx(lc.Provider,{scope:e,children:u.jsx(D5,{scope:t.__scopeSelect,onNativeOptionAdd:p.useCallback(H=>{F(P=>new Set(P).add(H))},[]),onNativeOptionRemove:p.useCallback(H=>{F(P=>{const _=new Set(P);return _.delete(H),_})},[]),children:r})}),D?u.jsxs(H1,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:E,onChange:H=>A(H.target.value),disabled:h,form:v,children:[E===void 0?u.jsx("option",{value:""}):null,Array.from(q)]},$):null]})})};y1.displayName=Jn;var b1="SelectTrigger",x1=p.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...o}=t,s=dc(r),a=Cn(b1,r),i=a.disabled||n,l=oe(e,a.onTriggerChange),c=cc(r),d=p.useRef("touch"),[f,h,m]=W1(g=>{const y=c().filter(w=>!w.disabled),b=y.find(w=>w.value===a.value),x=U1(y,g,b);x!==void 0&&a.onValueChange(x.value)}),v=g=>{i||(a.onOpenChange(!0),m()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return u.jsx(ss,{asChild:!0,...s,children:u.jsx(Q.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":V1(a.value)?"":void 0,...o,ref:l,onClick:L(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&v(g)}),onPointerDown:L(o.onPointerDown,g=>{d.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:L(o.onKeyDown,g=>{const y=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(y&&g.key===" ")&&R5.includes(g.key)&&(v(),g.preventDefault())})})})});x1.displayName=b1;var w1="SelectValue",k1=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:a="",...i}=t,l=Cn(w1,r),{onValueNodeHasChildrenChange:c}=l,d=s!==void 0,f=oe(e,l.onValueNodeChange);return Ae(()=>{c(d)},[c,d]),u.jsx(Q.span,{...i,ref:f,style:{pointerEvents:"none"},children:V1(l.value)?u.jsx(u.Fragment,{children:a}):s})});k1.displayName=w1;var P5="SelectIcon",N1=p.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...o}=t;return u.jsx(Q.span,{"aria-hidden":!0,...o,ref:e,children:n||"▼"})});N1.displayName=P5;var L5="SelectPortal",C1=t=>u.jsx(ua,{asChild:!0,...t});C1.displayName=L5;var Xn="SelectContent",S1=p.forwardRef((t,e)=>{const r=Cn(Xn,t.__scopeSelect),[n,o]=p.useState();if(Ae(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?Dl.createPortal(u.jsx(M1,{scope:t.__scopeSelect,children:u.jsx(lc.Slot,{scope:t.__scopeSelect,children:u.jsx("div",{children:t.children})})}),s):null}return u.jsx(E1,{...t,ref:e})});S1.displayName=Xn;var Yt=10,[M1,Sn]=as(Xn),F5="SelectContentImpl",_5=Un("SelectContent.RemoveScroll"),E1=p.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y,...b}=t,x=Cn(Xn,r),[w,k]=p.useState(null),[N,S]=p.useState(null),C=oe(e,V=>k(V)),[M,E]=p.useState(null),[A,O]=p.useState(null),D=cc(r),[q,F]=p.useState(!1),$=p.useRef(!1);p.useEffect(()=>{if(w)return $l(w)},[w]),zl();const H=p.useCallback(V=>{const[X,...te]=D().map(se=>se.ref.current),[ne]=te.slice(-1),Y=document.activeElement;for(const se of V)if(se===Y||(se==null||se.scrollIntoView({block:"nearest"}),se===X&&N&&(N.scrollTop=0),se===ne&&N&&(N.scrollTop=N.scrollHeight),se==null||se.focus(),document.activeElement!==Y))return},[D,N]),P=p.useCallback(()=>H([M,w]),[H,M,w]);p.useEffect(()=>{q&&P()},[q,P]);const{onOpenChange:_,triggerPointerDownPosRef:z}=x;p.useEffect(()=>{if(w){let V={x:0,y:0};const X=ne=>{var Y,se;V={x:Math.abs(Math.round(ne.pageX)-(((Y=z.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((se=z.current)==null?void 0:se.y)??0))}},te=ne=>{V.x<=10&&V.y<=10?ne.preventDefault():w.contains(ne.target)||_(!1),document.removeEventListener("pointermove",X),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",te,{capture:!0})}}},[w,_,z]),p.useEffect(()=>{const V=()=>_(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[_]);const[B,G]=W1(V=>{const X=D().filter(Y=>!Y.disabled),te=X.find(Y=>Y.ref.current===document.activeElement),ne=U1(X,V,te);ne&&setTimeout(()=>ne.ref.current.focus())}),I=p.useCallback((V,X,te)=>{const ne=!$.current&&!te;(x.value!==void 0&&x.value===X||ne)&&(E(V),ne&&($.current=!0))},[x.value]),J=p.useCallback(()=>w==null?void 0:w.focus(),[w]),ee=p.useCallback((V,X,te)=>{const ne=!$.current&&!te;(x.value!==void 0&&x.value===X||ne)&&O(V)},[x.value]),W=n==="popper"?su:j1,Z=W===su?{side:i,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return u.jsx(M1,{scope:r,content:w,viewport:N,onViewportChange:S,itemRefCallback:I,selectedItem:M,onItemLeave:J,itemTextRefCallback:ee,focusSelectedItem:P,selectedItemText:A,position:n,isPositioned:q,searchRef:B,children:u.jsx(fa,{as:_5,allowPinchZoom:!0,children:u.jsx(da,{asChild:!0,trapped:x.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:L(o,V=>{var X;(X=x.trigger)==null||X.focus({preventScroll:!0}),V.preventDefault()}),children:u.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:u.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:V=>V.preventDefault(),...b,...Z,onPlaced:()=>F(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:L(b.onKeyDown,V=>{const X=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!X&&V.key.length===1&&G(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let te=D().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(V.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const ne=V.target,Y=te.indexOf(ne);te=te.slice(Y+1)}setTimeout(()=>H(te)),V.preventDefault()}})})})})})})});E1.displayName=F5;var z5="SelectItemAlignedPosition",j1=p.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...o}=t,s=Cn(Xn,r),a=Sn(Xn,r),[i,l]=p.useState(null),[c,d]=p.useState(null),f=oe(e,C=>d(C)),h=cc(r),m=p.useRef(!1),v=p.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=a,w=p.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&c&&g&&y&&b){const C=s.trigger.getBoundingClientRect(),M=c.getBoundingClientRect(),E=s.valueNode.getBoundingClientRect(),A=b.getBoundingClientRect();if(s.dir!=="rtl"){const ne=A.left-M.left,Y=E.left-ne,se=C.left-Y,ue=C.width+se,Se=Math.max(ue,M.width),et=window.innerWidth-Yt,$e=Js(Y,[Yt,Math.max(Yt,et-Se)]);i.style.minWidth=ue+"px",i.style.left=$e+"px"}else{const ne=M.right-A.right,Y=window.innerWidth-E.right-ne,se=window.innerWidth-C.right-Y,ue=C.width+se,Se=Math.max(ue,M.width),et=window.innerWidth-Yt,$e=Js(Y,[Yt,Math.max(Yt,et-Se)]);i.style.minWidth=ue+"px",i.style.right=$e+"px"}const O=h(),D=window.innerHeight-Yt*2,q=g.scrollHeight,F=window.getComputedStyle(c),$=parseInt(F.borderTopWidth,10),H=parseInt(F.paddingTop,10),P=parseInt(F.borderBottomWidth,10),_=parseInt(F.paddingBottom,10),z=$+H+q+_+P,B=Math.min(y.offsetHeight*5,z),G=window.getComputedStyle(g),I=parseInt(G.paddingTop,10),J=parseInt(G.paddingBottom,10),ee=C.top+C.height/2-Yt,W=D-ee,Z=y.offsetHeight/2,V=y.offsetTop+Z,X=$+H+V,te=z-X;if(X<=ee){const ne=O.length>0&&y===O[O.length-1].ref.current;i.style.bottom="0px";const Y=c.clientHeight-g.offsetTop-g.offsetHeight,se=Math.max(W,Z+(ne?J:0)+Y+P),ue=X+se;i.style.height=ue+"px"}else{const ne=O.length>0&&y===O[0].ref.current;i.style.top="0px";const Y=Math.max(ee,$+g.offsetTop+(ne?I:0)+Z)+te;i.style.height=Y+"px",g.scrollTop=X-ee+g.offsetTop}i.style.margin=`${Yt}px 0`,i.style.minHeight=B+"px",i.style.maxHeight=D+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,i,c,g,y,b,s.dir,n]);Ae(()=>w(),[w]);const[k,N]=p.useState();Ae(()=>{c&&N(window.getComputedStyle(c).zIndex)},[c]);const S=p.useCallback(C=>{C&&v.current===!0&&(w(),x==null||x(),v.current=!1)},[w,x]);return u.jsx($5,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:u.jsx(Q.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});j1.displayName=z5;var B5="SelectPopperPosition",su=p.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Yt,...s}=t,a=dc(r);return u.jsx(Na,{...a,...s,ref:e,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});su.displayName=B5;var[$5,hp]=as(Xn,{}),au="SelectViewport",R1=p.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...o}=t,s=Sn(au,r),a=hp(au,r),i=oe(e,s.onViewportChange),l=p.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),u.jsx(lc.Slot,{scope:r,children:u.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:L(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const v=window.innerHeight-Yt*2,g=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(g,y);if(b<v){const x=b+m,w=Math.min(v,x),k=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=k>0?k:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});R1.displayName=au;var T1="SelectGroup",[H5,V5]=as(T1),W5=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=Ke();return u.jsx(H5,{scope:r,id:o,children:u.jsx(Q.div,{role:"group","aria-labelledby":o,...n,ref:e})})});W5.displayName=T1;var A1="SelectLabel",O1=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=V5(A1,r);return u.jsx(Q.div,{id:o.id,...n,ref:e})});O1.displayName=A1;var Ii="SelectItem",[U5,D1]=as(Ii),I1=p.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...a}=t,i=Cn(Ii,r),l=Sn(Ii,r),c=i.value===n,[d,f]=p.useState(s??""),[h,m]=p.useState(!1),v=oe(e,x=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,x,n,o)}),g=Ke(),y=p.useRef("touch"),b=()=>{o||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(U5,{scope:r,value:n,disabled:o,textId:g,isSelected:c,onItemTextChange:p.useCallback(x=>{f(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:u.jsx(lc.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:u.jsx(Q.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:L(a.onFocus,()=>m(!0)),onBlur:L(a.onBlur,()=>m(!1)),onClick:L(a.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:L(a.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:L(a.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:L(a.onPointerMove,x=>{var w;y.current=x.pointerType,o?(w=l.onItemLeave)==null||w.call(l):y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:L(a.onKeyDown,x=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&x.key===" "||(T5.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});I1.displayName=Ii;var Ns="SelectItemText",P1=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:o,...s}=t,a=Cn(Ns,r),i=Sn(Ns,r),l=D1(Ns,r),c=I5(Ns,r),[d,f]=p.useState(null),h=oe(e,b=>f(b),l.onItemTextChange,b=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.call(i,b,l.value,l.disabled)}),m=d==null?void 0:d.textContent,v=p.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=c;return Ae(()=>(g(v),()=>y(v)),[g,y,v]),u.jsxs(u.Fragment,{children:[u.jsx(Q.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Dl.createPortal(s.children,a.valueNode):null]})});P1.displayName=Ns;var L1="SelectItemIndicator",F1=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return D1(L1,r).isSelected?u.jsx(Q.span,{"aria-hidden":!0,...n,ref:e}):null});F1.displayName=L1;var iu="SelectScrollUpButton",_1=p.forwardRef((t,e)=>{const r=Sn(iu,t.__scopeSelect),n=hp(iu,t.__scopeSelect),[o,s]=p.useState(!1),a=oe(e,n.onScrollButtonChange);return Ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const c=l.scrollTop>0;s(c)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?u.jsx(B1,{...t,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});_1.displayName=iu;var lu="SelectScrollDownButton",z1=p.forwardRef((t,e)=>{const r=Sn(lu,t.__scopeSelect),n=hp(lu,t.__scopeSelect),[o,s]=p.useState(!1),a=oe(e,n.onScrollButtonChange);return Ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;s(d)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?u.jsx(B1,{...t,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});z1.displayName=lu;var B1=p.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=t,s=Sn("SelectScrollButton",r),a=p.useRef(null),i=cc(r),l=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),Ae(()=>{var c;const d=i().find(f=>f.ref.current===document.activeElement);(c=d==null?void 0:d.ref.current)==null||c.scrollIntoView({block:"nearest"})},[i]),u.jsx(Q.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:L(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:L(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:L(o.onPointerLeave,()=>{l()})})}),G5="SelectSeparator",$1=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return u.jsx(Q.div,{"aria-hidden":!0,...n,ref:e})});$1.displayName=G5;var cu="SelectArrow",q5=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,o=dc(r),s=Cn(cu,r),a=Sn(cu,r);return s.open&&a.position==="popper"?u.jsx(Ca,{...o,...n,ref:e}):null});q5.displayName=cu;var K5="SelectBubbleInput",H1=p.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const o=p.useRef(null),s=oe(n,o),a=ts(e);return p.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==e&&c){const d=new Event("change",{bubbles:!0});c.call(i,e),i.dispatchEvent(d)}},[a,e]),u.jsx(Q.select,{...r,style:{...m1,...r.style},ref:s,defaultValue:e})});H1.displayName=K5;function V1(t){return t===""||t===void 0}function W1(t){const e=Te(t),r=p.useRef(""),n=p.useRef(0),o=p.useCallback(a=>{const i=r.current+a;e(i),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(i)},[e]),s=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function U1(t,e,r){const n=e.length>1&&Array.from(e).every(i=>i===e[0])?e[0]:e,o=r?t.indexOf(r):-1;let s=Y5(t,Math.max(o,0));n.length===1&&(s=s.filter(i=>i!==r));const a=s.find(i=>i.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==r?a:void 0}function Y5(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var J5=y1,G1=x1,X5=k1,Z5=N1,Q5=C1,q1=S1,eB=R1,K1=O1,Y1=I1,tB=P1,rB=F1,J1=_1,X1=z1,Z1=$1;const Ya=J5,Ja=X5,Cs=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(G1,{ref:n,className:R("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[e,u.jsx(Z5,{asChild:!0,children:u.jsx(zr,{className:"h-4 w-4 opacity-50"})})]}));Cs.displayName=G1.displayName;const Q1=p.forwardRef(({className:t,...e},r)=>u.jsx(J1,{ref:r,className:R("flex cursor-default items-center justify-center py-1",t),...e,children:u.jsx(di,{className:"h-4 w-4"})}));Q1.displayName=J1.displayName;const ek=p.forwardRef(({className:t,...e},r)=>u.jsx(X1,{ref:r,className:R("flex cursor-default items-center justify-center py-1",t),...e,children:u.jsx(zr,{className:"h-4 w-4"})}));ek.displayName=X1.displayName;const Ss=p.forwardRef(({className:t,children:e,position:r="popper",...n},o)=>u.jsx(Q5,{children:u.jsxs(q1,{ref:o,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[u.jsx(Q1,{}),u.jsx(eB,{className:R("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),u.jsx(ek,{})]})}));Ss.displayName=q1.displayName;const nB=p.forwardRef(({className:t,...e},r)=>u.jsx(K1,{ref:r,className:R("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));nB.displayName=K1.displayName;const ko=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(Y1,{ref:n,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(rB,{children:u.jsx(bt,{className:"h-4 w-4"})})}),u.jsx(tB,{children:e})]}));ko.displayName=Y1.displayName;const oB=p.forwardRef(({className:t,...e},r)=>u.jsx(Z1,{ref:r,className:R("-mx-1 my-1 h-px bg-muted",t),...e}));oB.displayName=Z1.displayName;const sB=p.forwardRef(({value:t,onChange:e,placeholder:r="Pick date and time",disabled:n=!1,className:o,showSeconds:s=!1,use24Hour:a=!1},i)=>{const[l,c]=p.useState(!1),[d,f]=p.useState(t);p.useEffect(()=>{f(t)},[t]);const h=a?Array.from({length:24},(k,N)=>N):Array.from({length:12},(k,N)=>N+1),m=Array.from({length:60},(k,N)=>N),v=Array.from({length:60},(k,N)=>N),g=k=>{if(k){const N=new Date(k);d&&(N.setHours(d.getHours()),N.setMinutes(d.getMinutes()),N.setSeconds(d.getSeconds())),f(N),e==null||e(N)}},y=(k,N)=>{const S=d?new Date(d):new Date;if(k==="hour"){let C=parseInt(N);if(!a){const M=S.getHours()>=12;M&&C!==12&&(C+=12),!M&&C===12&&(C=0)}S.setHours(C)}else if(k==="minute")S.setMinutes(parseInt(N));else if(k==="second")S.setSeconds(parseInt(N));else if(k==="ampm"){const C=S.getHours();N==="PM"&&C<12?S.setHours(C+12):N==="AM"&&C>=12&&S.setHours(C-12)}f(S),e==null||e(S)},b=()=>{if(!d)return"";const k=d.getHours();return a?k.toString():(k%12||12).toString()},x=()=>d&&d.getHours()>=12?"PM":"AM",w=s?a?"PPP HH:mm:ss":"PPP hh:mm:ss a":a?"PPP HH:mm":"PPP hh:mm a";return u.jsxs(ac,{open:l,onOpenChange:c,children:[u.jsx(ic,{asChild:!0,children:u.jsxs(Ut,{ref:i,variant:"outline",disabled:n,className:R("w-full justify-start text-left font-normal",!d&&"text-muted-foreground",o),children:[u.jsx(Fl,{className:"mr-2 h-4 w-4"}),d?fr(d,w):u.jsx("span",{children:r})]})}),u.jsxs(Aa,{className:"w-auto p-0",align:"start",children:[u.jsx(Kl,{mode:"single",selected:d,onSelect:g,initialFocus:!0}),u.jsx("div",{className:"border-t p-3",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ff,{className:"h-4 w-4 text-muted-foreground"}),u.jsxs(Ya,{value:b(),onValueChange:k=>y("hour",k),children:[u.jsx(Cs,{className:"w-[70px]",children:u.jsx(Ja,{placeholder:"HH"})}),u.jsx(Ss,{children:h.map(k=>u.jsx(ko,{value:k.toString(),children:k.toString().padStart(2,"0")},k))})]}),u.jsx("span",{className:"text-muted-foreground",children:":"}),u.jsxs(Ya,{value:(d==null?void 0:d.getMinutes().toString())??"",onValueChange:k=>y("minute",k),children:[u.jsx(Cs,{className:"w-[70px]",children:u.jsx(Ja,{placeholder:"MM"})}),u.jsx(Ss,{children:m.map(k=>u.jsx(ko,{value:k.toString(),children:k.toString().padStart(2,"0")},k))})]}),s&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-muted-foreground",children:":"}),u.jsxs(Ya,{value:(d==null?void 0:d.getSeconds().toString())??"",onValueChange:k=>y("second",k),children:[u.jsx(Cs,{className:"w-[70px]",children:u.jsx(Ja,{placeholder:"SS"})}),u.jsx(Ss,{children:v.map(k=>u.jsx(ko,{value:k.toString(),children:k.toString().padStart(2,"0")},k))})]})]}),!a&&u.jsxs(Ya,{value:x(),onValueChange:k=>y("ampm",k),children:[u.jsx(Cs,{className:"w-[70px]",children:u.jsx(Ja,{})}),u.jsxs(Ss,{children:[u.jsx(ko,{value:"AM",children:"AM"}),u.jsx(ko,{value:"PM",children:"PM"})]})]})]})})]})]})});sB.displayName="DateTimePicker";const aB={USD:{code:"USD",symbol:"$",name:"US Dollar",decimals:2},EUR:{code:"EUR",symbol:"€",name:"Euro",decimals:2},GBP:{code:"GBP",symbol:"£",name:"British Pound",decimals:2},JPY:{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},CNY:{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},KRW:{code:"KRW",symbol:"₩",name:"South Korean Won",decimals:0},INR:{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},BRL:{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2},CAD:{code:"CAD",symbol:"CA$",name:"Canadian Dollar",decimals:2},AUD:{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},CHF:{code:"CHF",symbol:"Fr.",name:"Swiss Franc",decimals:2}};function Vm(t,e,r,n){const o=t.toFixed(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),o.join(n)}function iB(t,e,r){if(!t)return;const n=t.replace(new RegExp(`\\${e}`,"g"),"").replace(r,"."),o=parseFloat(n);return isNaN(o)?void 0:o}const uc=p.forwardRef(({className:t,value:e,onChange:r,decimals:n=2,min:o,max:s,prefix:a,suffix:i,currency:l,unit:c,unitPosition:d="suffix",thousandsSeparator:f=",",decimalSeparator:h=".",allowNegative:m=!1,disabled:v,...g},y)=>{const b=l?aB[l]:void 0,x=(b==null?void 0:b.decimals)??n,w=a??((b==null?void 0:b.symbol)&&b.symbol),k=i??(c&&d==="suffix"?c:void 0),N=c&&d==="prefix"?c:void 0,[S,C]=p.useState(""),[M,E]=p.useState(!1);p.useEffect(()=>{e!==void 0&&!M&&C(Vm(e,x,f,h))},[e,x,f,h,M]);const A=q=>{let F=q.target.value;const $=m?new RegExp(`[^0-9\\${h}-]`,"g"):new RegExp(`[^0-9\\${h}]`,"g");F=F.replace($,"");const H=F.split(h);if(H.length>2&&(F=H[0]+h+H.slice(1).join("")),m){const _=F.startsWith("-");F=F.replace(/-/g,""),_&&(F="-"+F)}H.length===2&&H[1].length>x&&(F=H[0]+h+H[1].slice(0,x)),C(F);const P=iB(F,f,h);if(P!==void 0){let _=P;o!==void 0&&_<o&&(_=o),s!==void 0&&_>s&&(_=s),r==null||r(_)}else r==null||r(void 0)},O=()=>{E(!0),e!==void 0&&C(e.toString().replace(".",h))},D=()=>{E(!1),e!==void 0&&C(Vm(e,x,f,h))};return u.jsxs("div",{className:"relative flex items-center",children:[(w||N)&&u.jsxs("span",{className:"absolute left-3 text-muted-foreground text-sm",children:[w,N]}),u.jsx("input",{type:"text",inputMode:"decimal",className:R("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-right ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",(w||N)&&"pl-10",k&&"pr-12",!w&&!N&&"px-3",!k&&"pr-3",t),ref:y,value:S,onChange:A,onFocus:O,onBlur:D,disabled:v,...g}),k&&u.jsx("span",{className:"absolute right-3 text-muted-foreground text-sm",children:k})]})});uc.displayName="DecimalInput";const lB=p.forwardRef(({currency:t,...e},r)=>u.jsx(uc,{ref:r,currency:t,...e}));lB.displayName="CurrencyInput";const cB=p.forwardRef(({min:t=0,max:e=100,decimals:r=1,...n},o)=>u.jsx(uc,{ref:o,suffix:"%",min:t,max:e,decimals:r,...n}));cB.displayName="PercentageInput";const dB=p.forwardRef(({unit:t,unitPosition:e="suffix",...r},n)=>u.jsx(uc,{ref:n,unit:t,unitPosition:e,...r}));dB.displayName="UnitInput";const uB=Ge("fixed z-50 bg-background shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0",right:"inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",top:"inset-x-0 top-0 h-auto max-h-[80vh] border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0",bottom:"inset-x-0 bottom-0 h-auto max-h-[80vh] border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0"}},defaultVariants:{side:"right"}}),fB=p.createContext(void 0);function Oa(){const t=p.useContext(fB);if(!t)throw new Error("Drawer components must be used within a Drawer");return t}const pB=p.forwardRef(({onClick:t,...e},r)=>{const{onOpenChange:n}=Oa();return u.jsx("button",{ref:r,onClick:o=>{n(!0),t==null||t(o)},...e})});pB.displayName="DrawerTrigger";const hB=p.forwardRef(({onClick:t,...e},r)=>{const{onOpenChange:n}=Oa();return u.jsx("button",{ref:r,onClick:o=>{n(!1),t==null||t(o)},...e})});hB.displayName="DrawerClose";const mB=({children:t})=>{const{open:e}=Oa();return e?u.jsx(u.Fragment,{children:t}):null},tk=p.forwardRef(({className:t,onClick:e,...r},n)=>{const{open:o,onOpenChange:s}=Oa();return u.jsx("div",{ref:n,className:R("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",o?"opacity-100":"pointer-events-none opacity-0",t),onClick:a=>{a.target===a.currentTarget&&s(!1),e==null||e(a)},...r})});tk.displayName="DrawerOverlay";const gB=p.forwardRef(({className:t,side:e,children:r,...n},o)=>{const{open:s,onOpenChange:a}=Oa();return p.useEffect(()=>{const i=l=>{l.key==="Escape"&&a(!1)};return s&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow=""}},[s,a]),u.jsxs(mB,{children:[u.jsx(tk,{}),u.jsx("div",{ref:o,"data-state":s?"open":"closed",className:R(uB({side:e}),t),...n,children:r})]})});gB.displayName="DrawerContent";const vB=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:R("font-heading text-lg font-semibold text-foreground",t),...e}));vB.displayName="DrawerTitle";const yB=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:R("text-sm text-muted-foreground",t),...e}));yB.displayName="DrawerDescription";const bB=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("mx-auto mt-4 h-1.5 w-12 rounded-full bg-muted",t),...e}));bB.displayName="DrawerHandle";var rk="DropdownMenu",[xB]=Oe(rk,[ja]),Ct=ja(),[fJ,nk]=xB(rk),ok="DropdownMenuTrigger",wB=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=t,s=nk(ok,r),a=Ct(r);return u.jsx(Qf,{asChild:!0,...a,children:u.jsx(Q.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:er(e,s.triggerRef),onPointerDown:L(t.onPointerDown,i=>{!n&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:L(t.onKeyDown,i=>{n||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});wB.displayName=ok;var kB="DropdownMenuPortal",sk=t=>{const{__scopeDropdownMenu:e,...r}=t,n=Ct(e);return u.jsx(ep,{...n,...r})};sk.displayName=kB;var ak="DropdownMenuContent",ik=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=nk(ak,r),s=Ct(r),a=p.useRef(!1);return u.jsx(tp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...n,ref:e,onCloseAutoFocus:L(t.onCloseAutoFocus,i=>{var l;a.current||(l=o.triggerRef.current)==null||l.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:L(t.onInteractOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ik.displayName=ak;var NB="DropdownMenuGroup",CB=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(rp,{...o,...n,ref:e})});CB.displayName=NB;var SB="DropdownMenuLabel",lk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(np,{...o,...n,ref:e})});lk.displayName=SB;var MB="DropdownMenuItem",ck=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(op,{...o,...n,ref:e})});ck.displayName=MB;var EB="DropdownMenuCheckboxItem",dk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(sp,{...o,...n,ref:e})});dk.displayName=EB;var jB="DropdownMenuRadioGroup",RB=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(ap,{...o,...n,ref:e})});RB.displayName=jB;var TB="DropdownMenuRadioItem",uk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(ip,{...o,...n,ref:e})});uk.displayName=TB;var AB="DropdownMenuItemIndicator",fk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(lp,{...o,...n,ref:e})});fk.displayName=AB;var OB="DropdownMenuSeparator",pk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(cp,{...o,...n,ref:e})});pk.displayName=OB;var DB="DropdownMenuArrow",IB=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(dp,{...o,...n,ref:e})});IB.displayName=DB;var PB="DropdownMenuSubTrigger",hk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(up,{...o,...n,ref:e})});hk.displayName=PB;var LB="DropdownMenuSubContent",mk=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,o=Ct(r);return u.jsx(fp,{...o,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mk.displayName=LB;var FB=sk,gk=ik,vk=lk,yk=ck,bk=dk,xk=uk,wk=fk,kk=pk,Nk=hk,Ck=mk;const _B=p.forwardRef(({className:t,inset:e,children:r,...n},o)=>u.jsxs(Nk,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...n,children:[r,u.jsx(Jo,{className:"ml-auto"})]}));_B.displayName=Nk.displayName;const zB=p.forwardRef(({className:t,...e},r)=>u.jsx(Ck,{ref:r,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));zB.displayName=Ck.displayName;const BB=p.forwardRef(({className:t,sideOffset:e=4,...r},n)=>u.jsx(FB,{children:u.jsx(gk,{ref:n,sideOffset:e,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));BB.displayName=gk.displayName;const $B=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(yk,{ref:n,className:R("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...r}));$B.displayName=yk.displayName;const HB=p.forwardRef(({className:t,children:e,checked:r,...n},o)=>u.jsxs(bk,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(wk,{children:u.jsx(bt,{className:"h-4 w-4"})})}),e]}));HB.displayName=bk.displayName;const VB=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(xk,{ref:n,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(wk,{children:u.jsx(_l,{className:"h-2 w-2 fill-current"})})}),e]}));VB.displayName=xk.displayName;const WB=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(vk,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));WB.displayName=vk.displayName;const UB=p.forwardRef(({className:t,...e},r)=>u.jsx(kk,{ref:r,className:R("-mx-1 my-1 h-px bg-muted",t),...e}));UB.displayName=kk.displayName;const GB=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,qB=p.forwardRef(({className:t,showValidation:e=!1,onValidationChange:r,onChange:n,...o},s)=>{const[a,i]=p.useState(null),[l,c]=p.useState(!1),d=m=>{const v=m.target.value;if(v){const g=GB.test(v);i(g),r==null||r(g)}else i(null),r==null||r(!1);n==null||n(m)},f=m=>{var v;c(!0),(v=o.onBlur)==null||v.call(o,m)},h=e&&l&&a!==null;return u.jsxs("div",{className:"relative",children:[u.jsx(yO,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"email",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",h&&a&&"border-green-500 focus-visible:ring-green-500",h&&!a&&"border-destructive focus-visible:ring-destructive",t),ref:s,onChange:d,onBlur:f,...o}),h&&u.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:a?u.jsx(eO,{className:"h-4 w-4 text-green-500"}):u.jsx(QA,{className:"h-4 w-4 text-destructive"})})]})});qB.displayName="EmailInput";const KB=p.forwardRef(({className:t,...e},r)=>u.jsx("fieldset",{ref:r,className:R("space-y-4 rounded-lg border p-4",t),...e}));KB.displayName="Fieldset";const YB=p.forwardRef(({className:t,...e},r)=>u.jsx("legend",{ref:r,className:R("px-2 text-sm font-medium leading-none",t),...e}));YB.displayName="FieldsetLegend";const JB=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:R("text-sm text-muted-foreground",t),...e}));JB.displayName="FieldsetDescription";function XB(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ZB(t){const e=t.type.toLowerCase();return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.includes("pdf")||e.includes("document")||e.includes("text")||e.includes("spreadsheet")||e.includes("presentation")?"document":e.includes("zip")||e.includes("rar")||e.includes("tar")||e.includes("gzip")||e.includes("7z")?"archive":"other"}function fd(t){if(t===0)return"0 B";const e=1024,r=["B","KB","MB","GB"],n=Math.floor(Math.log(t)/Math.log(e));return`${parseFloat((t/Math.pow(e,n)).toFixed(1))} ${r[n]}`}const QB=({type:t})=>{const e="h-8 w-8";switch(t){case"image":return u.jsx(hO,{className:R(e,"text-green-500")});case"document":return u.jsx(aO,{className:R(e,"text-blue-500")});case"video":return u.jsx(iO,{className:R(e,"text-purple-500")});case"audio":return u.jsx(wO,{className:R(e,"text-pink-500")});case"archive":return u.jsx(YA,{className:R(e,"text-yellow-500")});default:return u.jsx(pf,{className:R(e,"text-gray-500")})}},mp=p.forwardRef(({className:t,value:e=[],onChange:r,maxFiles:n=1,maxSize:o,accept:s,showPreview:a=!0,variant:i="default",dragActiveText:l="Drop files here",dragInactiveText:c="Drag & drop files here, or click to select",disabled:d,...f},h)=>{const[m,v]=p.useState([]),[g,y]=p.useState(!1),[b,x]=p.useState(null),w=p.useRef(null);p.useEffect(()=>{const O=e.map(D=>({file:D,type:ZB(D),preview:D.type.startsWith("image/")?URL.createObjectURL(D):void 0}));return v(O),()=>{O.forEach(D=>{D.preview&&URL.revokeObjectURL(D.preview)})}},[e]);const k=O=>{if(!O)return;x(null);const D=Array.from(O),q=[];for(const $ of D){if(o&&$.size>o){x(`File "${$.name}" exceeds maximum size of ${fd(o)}`);continue}q.push($)}const F=n===1?q.slice(0,1):[...e,...q].slice(0,n);r==null||r(F)},N=O=>{k(O.target.files),w.current&&(w.current.value="")},S=O=>{O.preventDefault(),y(!0)},C=O=>{O.preventDefault(),y(!1)},M=O=>{O.preventDefault(),y(!1),d||k(O.dataTransfer.files)},E=O=>{const D=[...e];D.splice(O,1),r==null||r(D)},A=O=>{w.current=O,XB(h,O)};return i==="dropzone"?u.jsxs("div",{className:R("space-y-3",t),children:[u.jsxs("div",{className:R("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors",g&&"border-primary bg-primary/5",!g&&"border-muted-foreground/25 hover:border-primary/50",d&&"cursor-not-allowed opacity-50"),onDragOver:S,onDragLeave:C,onDrop:M,onClick:()=>{var O;return!d&&((O=w.current)==null?void 0:O.click())},children:[u.jsx("input",{type:"file",ref:A,className:"sr-only",accept:s,multiple:n>1,onChange:N,disabled:d,...f}),u.jsx($h,{className:R("h-10 w-10 mb-3",g?"text-primary":"text-muted-foreground")}),u.jsx("p",{className:"text-sm text-center",children:g?l:c}),o&&u.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Max file size: ",fd(o)]}),n>1&&u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max ",n," files"]})]}),b&&u.jsx("p",{className:"text-sm text-destructive",children:b}),a&&m.length>0&&u.jsx("div",{className:"space-y-2",children:m.map((O,D)=>u.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[O.preview?u.jsx("img",{src:O.preview,alt:O.file.name,className:"h-12 w-12 rounded object-cover"}):u.jsx(QB,{type:O.type}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm font-medium truncate",children:O.file.name}),u.jsx("p",{className:"text-xs text-muted-foreground",children:fd(O.file.size)})]}),u.jsx("button",{type:"button",className:"p-1 hover:bg-background rounded",onClick:q=>{q.stopPropagation(),E(D)},children:u.jsx(xt,{className:"h-4 w-4"})})]},D))})]}):u.jsxs("div",{className:R("space-y-2",t),children:[u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{type:"file",ref:A,className:"sr-only",accept:s,multiple:n>1,onChange:N,disabled:d,...f}),u.jsxs("button",{type:"button",className:R("flex h-10 items-center gap-2 rounded-md border border-input bg-background px-4 py-2 text-sm ring-offset-background hover:bg-accent",d&&"cursor-not-allowed opacity-50"),onClick:()=>{var O;return!d&&((O=w.current)==null?void 0:O.click())},disabled:d,children:[u.jsx($h,{className:"h-4 w-4"}),"Choose ",n>1?"files":"file"]}),m.length>0&&!a&&u.jsxs("span",{className:"flex items-center text-sm text-muted-foreground",children:[m.length," file",m.length>1?"s":""," selected"]})]}),b&&u.jsx("p",{className:"text-sm text-destructive",children:b}),a&&m.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2",children:m.map((O,D)=>u.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full border bg-muted/50 text-sm",children:[O.preview?u.jsx("img",{src:O.preview,alt:O.file.name,className:"h-5 w-5 rounded object-cover"}):u.jsx(pf,{className:"h-4 w-4 text-muted-foreground"}),u.jsx("span",{className:"max-w-[150px] truncate",children:O.file.name}),u.jsx("button",{type:"button",className:"p-0.5 hover:bg-background rounded-full",onClick:()=>E(D),children:u.jsx(xt,{className:"h-3 w-3"})})]},D))})]})});mp.displayName="FileInput";const e$=p.forwardRef(({acceptedFormats:t=["image/jpeg","image/png","image/gif","image/webp"],...e},r)=>u.jsx(mp,{ref:r,accept:t.join(","),...e}));e$.displayName="ImageInput";const t$=p.forwardRef(({acceptedFormats:t=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain"],...e},r)=>u.jsx(mp,{ref:r,accept:t.join(","),...e}));t$.displayName="DocumentInput";const r$=Ge("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{required:{true:"after:ml-0.5 after:text-destructive after:content-['*']",false:""}},defaultVariants:{required:!1}}),n$=p.forwardRef(({className:t,required:e,optional:r,hint:n,children:o,...s},a)=>u.jsxs("div",{className:"flex items-baseline gap-2",children:[u.jsx("label",{ref:a,className:R(r$({required:e}),t),...s,children:o}),r&&u.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"}),n&&u.jsx("span",{className:"text-xs text-muted-foreground",children:n})]}));n$.displayName="FormLabel";const o$=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:R("text-sm text-muted-foreground",t),...e}));o$.displayName="FormDescription";const s$=p.forwardRef(({className:t,error:e=!0,...r},n)=>u.jsx("p",{ref:n,className:R("text-sm",e?"text-destructive":"text-muted-foreground",t),...r}));s$.displayName="FormMessage";var pd,Sk="HoverCard",[Mk]=Oe(Sk,[wr]),gp=wr(),[pJ,vp]=Mk(Sk),Ek="HoverCardTrigger",a$=p.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,o=vp(Ek,r),s=gp(r);return u.jsx(ss,{asChild:!0,...s,children:u.jsx(Q.a,{"data-state":o.open?"open":"closed",...n,ref:e,onPointerEnter:L(t.onPointerEnter,Li(o.onOpen)),onPointerLeave:L(t.onPointerLeave,Li(o.onClose)),onFocus:L(t.onFocus,o.onOpen),onBlur:L(t.onBlur,o.onClose),onTouchStart:L(t.onTouchStart,a=>a.preventDefault())})})});a$.displayName=Ek;var i$="HoverCardPortal",[hJ,l$]=Mk(i$,{forceMount:void 0}),Pi="HoverCardContent",jk=p.forwardRef((t,e)=>{const r=l$(Pi,t.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=t,s=vp(Pi,t.__scopeHoverCard);return u.jsx(De,{present:n||s.open,children:u.jsx(c$,{"data-state":s.open?"open":"closed",...o,onPointerEnter:L(t.onPointerEnter,Li(s.onOpen)),onPointerLeave:L(t.onPointerLeave,Li(s.onClose)),ref:e})})});jk.displayName=Pi;var c$=p.forwardRef((t,e)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,...i}=t,l=vp(Pi,r),c=gp(r),d=p.useRef(null),f=oe(e,d),[h,m]=p.useState(!1);return p.useEffect(()=>{if(h){const v=document.body;return pd=v.style.userSelect||v.style.webkitUserSelect,v.style.userSelect="none",v.style.webkitUserSelect="none",()=>{v.style.userSelect=pd,v.style.webkitUserSelect=pd}}},[h]),p.useEffect(()=>{if(d.current){const v=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var g;((g=document.getSelection())==null?void 0:g.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",v),()=>{document.removeEventListener("pointerup",v),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),p.useEffect(()=>{d.current&&f$(d.current).forEach(v=>v.setAttribute("tabindex","-1"))}),u.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:L(s,v=>{v.preventDefault()}),onDismiss:l.onDismiss,children:u.jsx(Na,{...c,...i,onPointerDown:L(i.onPointerDown,v=>{v.currentTarget.contains(v.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...i.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),d$="HoverCardArrow",u$=p.forwardRef((t,e)=>{const{__scopeHoverCard:r,...n}=t,o=gp(r);return u.jsx(Ca,{...o,...n,ref:e})});u$.displayName=d$;function Li(t){return e=>e.pointerType==="touch"?void 0:t()}function f$(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)e.push(r.currentNode);return e}var Rk=jk;const p$=p.forwardRef(({className:t,align:e="center",sideOffset:r=4,...n},o)=>u.jsx(Rk,{ref:o,align:e,sideOffset:r,className:R("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));p$.displayName=Rk.displayName;const Tk=p.forwardRef(({className:t,type:e,...r},n)=>u.jsx("input",{type:e,className:R("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...r}));Tk.displayName="Input";const h$=p.forwardRef(({className:t,length:e=6,onChange:r,onComplete:n,mask:o=!1,autoFocus:s=!0,disabled:a,...i},l)=>{const[c,d]=p.useState(Array(e).fill("")),f=p.useRef([]),h=y=>{var b;y>=0&&y<e&&((b=f.current[y])==null||b.focus())},m=(y,b)=>{const x=b.slice(-1);if(x&&!/^\d$/.test(x))return;const w=[...c];w[y]=x,d(w);const k=w.join("");r==null||r(k),x&&y<e-1&&h(y+1),w.every(N=>N!=="")&&k.length===e&&(n==null||n(k))},v=(y,b)=>{if(b.key==="Backspace"){b.preventDefault();const x=[...c];c[y]?(x[y]="",d(x),r==null||r(x.join(""))):y>0&&(x[y-1]="",d(x),r==null||r(x.join("")),h(y-1))}else b.key==="ArrowLeft"?(b.preventDefault(),h(y-1)):b.key==="ArrowRight"&&(b.preventDefault(),h(y+1))},g=y=>{y.preventDefault();const b=y.clipboardData.getData("text/plain").slice(0,e).replace(/\D/g,"").split("");if(b.length===0)return;const x=[...c];b.forEach((k,N)=>{N<e&&(x[N]=k)}),d(x),r==null||r(x.join(""));const w=Math.min(b.length,e-1);h(w),x.every(k=>k!=="")&&x.join("").length===e&&(n==null||n(x.join("")))};return p.useEffect(()=>{s&&h(0)},[s]),u.jsx("div",{ref:l,className:R("flex items-center gap-2",t),...i,children:c.map((y,b)=>u.jsxs(p.Fragment,{children:[u.jsx("input",{ref:x=>{f.current[b]=x},type:o?"password":"text",inputMode:"numeric",autoComplete:"one-time-code",pattern:"\\d{1}",maxLength:1,value:y,onChange:x=>m(b,x.target.value),onKeyDown:x=>v(b,x),onPaste:g,onFocus:x=>x.target.select(),disabled:a,className:R("h-10 w-10 rounded-md border border-input bg-background text-center text-sm font-medium shadow-sm transition-all","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",y&&"border-primary")}),b===Math.floor(e/2)-1&&e>3&&u.jsx("div",{className:"flex items-center justify-center",children:u.jsx(fb,{className:"h-4 w-4 text-muted-foreground"})})]},b))})});h$.displayName="InputOTP";const m$=p.forwardRef(({className:t,index:e,char:r,hasFakeCaret:n,isActive:o,...s},a)=>u.jsxs("div",{className:R("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",o&&"z-10 ring-2 ring-ring ring-offset-background",t),children:[u.jsx("input",{ref:a,className:"absolute inset-0 h-full w-full bg-transparent text-center outline-none",...s}),r,n&&u.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:u.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]}));m$.displayName="InputOTPSlot";const g$=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex items-center",t),...e}));g$.displayName="InputOTPGroup";const v$=p.forwardRef(({...t},e)=>u.jsx("div",{ref:e,role:"separator",...t,children:u.jsx(fb,{className:"h-4 w-4 text-muted-foreground"})}));v$.displayName="InputOTPSeparator";const y$=Ge("inline-flex items-center justify-center rounded border font-mono text-sm font-medium",{variants:{variant:{default:"border-border bg-muted text-muted-foreground shadow-[0_2px_0_0] shadow-border",outline:"border-border bg-background text-foreground",ghost:"border-transparent bg-transparent text-muted-foreground"},size:{sm:"h-5 min-w-5 px-1 text-xs",default:"h-6 min-w-6 px-1.5",lg:"h-7 min-w-7 px-2 text-base"}},defaultVariants:{variant:"default",size:"default"}}),b$={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",opt:"⌥",shift:"⇧",meta:"⌘",super:"⌘",win:"⊞",windows:"⊞",enter:"↵",return:"↵",tab:"⇥",escape:"⎋",esc:"⎋",backspace:"⌫",delete:"⌦",del:"⌦",space:"␣",spacebar:"␣",up:"↑",down:"↓",left:"←",right:"→",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→",capslock:"⇪",caps:"⇪",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘",insert:"⎀"};function x$(t){const e=t.toLowerCase().trim();return b$[e]||t.toUpperCase()}const Ak=p.forwardRef(({className:t,variant:e,size:r,keys:n,children:o,...s},a)=>{let i=o;return n&&(i=(Array.isArray(n)?n:n.split("+")).map((l,c)=>u.jsxs(p.Fragment,{children:[c>0&&u.jsx("span",{className:"mx-0.5 text-muted-foreground/50",children:"+"}),u.jsx("span",{children:x$(l)})]},c))),u.jsx("kbd",{ref:a,className:R(y$({variant:e,size:r}),t),...s,children:i})});Ak.displayName="Kbd";const w$=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("inline-flex items-center gap-1",t),...e}));w$.displayName="KbdGroup";const k$={copy:["cmd","c"],paste:["cmd","v"],cut:["cmd","x"],undo:["cmd","z"],redo:["cmd","shift","z"],save:["cmd","s"],selectAll:["cmd","a"],find:["cmd","f"],new:["cmd","n"],open:["cmd","o"],close:["cmd","w"],refresh:["cmd","r"],print:["cmd","p"],bold:["cmd","b"],italic:["cmd","i"],underline:["cmd","u"]},N$=p.forwardRef(({shortcut:t,forceCtrl:e,variant:r,size:n,className:o,...s},a)=>{const i=k$[t],l=typeof navigator<"u"?navigator.platform.toLowerCase().includes("mac"):!0,c=i.map(d=>(d==="cmd"||d==="command"||d==="meta")&&!l||e&&(d==="cmd"||d==="command"||d==="meta")?"ctrl":d);return u.jsx(Ak,{ref:a,keys:c,variant:r,size:n,className:o,...s})});N$.displayName="Shortcut";const C$=Ge("inline-flex items-center gap-1 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",{variants:{variant:{default:"text-primary underline-offset-4 hover:underline",muted:"text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",nav:"text-foreground/60 hover:text-foreground",destructive:"text-destructive underline-offset-4 hover:underline",unstyled:""},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),S$=p.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,external:o=!1,showExternalIcon:s=!0,children:a,...i},l)=>{const c=n?Ul:"a",d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return u.jsxs(c,{ref:l,className:R(C$({variant:e,size:r}),t),...d,...i,children:[a,o&&s&&u.jsx(nO,{className:"h-3 w-3 shrink-0"})]})});S$.displayName="Link";const hi=Ge("relative overflow-hidden",{variants:{ratio:{auto:"",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",wide:"aspect-[21/9]"},rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{ratio:"auto",rounded:"md"}}),M$=p.forwardRef(({className:t,ratio:e,rounded:r,fallback:n,alt:o,...s},a)=>{const[i,l]=p.useState(!1),[c,d]=p.useState(!0);return i&&n?u.jsx("div",{className:R(hi({ratio:e,rounded:r}),"flex items-center justify-center bg-muted",t),children:n}):u.jsxs("div",{className:R(hi({ratio:e,rounded:r}),t),children:[c&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:u.jsx(Ci,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),u.jsx("img",{ref:a,alt:o,className:R("h-full w-full object-cover",r&&hi({rounded:r})),onError:()=>l(!0),onLoad:()=>d(!1),...s})]})});M$.displayName="Image";const E$=p.forwardRef(({className:t,ratio:e="video",rounded:r,showControls:n=!0,...o},s)=>{const a=p.useRef(null),[i,l]=p.useState(!1),[c,d]=p.useState(!1),[f,h]=p.useState(0);p.useImperativeHandle(s,()=>a.current);const m=()=>{a.current&&(i?a.current.pause():a.current.play(),l(!i))},v=()=>{a.current&&(a.current.muted=!c,d(!c))},g=()=>{if(a.current){const b=a.current.currentTime/a.current.duration*100;h(b)}},y=()=>{a.current&&(document.fullscreenElement?document.exitFullscreen():a.current.requestFullscreen())};return u.jsxs("div",{className:R(hi({ratio:e,rounded:r}),"group",t),children:[u.jsx("video",{ref:a,className:"h-full w-full object-cover",onTimeUpdate:g,onPlay:()=>l(!0),onPause:()=>l(!1),...o}),n&&u.jsxs("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/60 to-transparent p-4 opacity-0 transition-opacity group-hover:opacity-100",children:[u.jsx("div",{className:"mb-2 h-1 w-full overflow-hidden rounded-full bg-white/30",children:u.jsx("div",{className:"h-full bg-white transition-all",style:{width:`${f}%`}})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{type:"button",onClick:m,className:"rounded-full p-1 text-white hover:bg-white/20",children:i?u.jsx(NO,{className:"h-5 w-5"}):u.jsx(SO,{className:"h-5 w-5"})}),u.jsx("button",{type:"button",onClick:v,className:"rounded-full p-1 text-white hover:bg-white/20",children:c?u.jsx(OO,{className:"h-5 w-5"}):u.jsx(AO,{className:"h-5 w-5"})}),u.jsx("div",{className:"flex-1"}),u.jsx("button",{type:"button",onClick:y,className:"rounded-full p-1 text-white hover:bg-white/20",children:u.jsx(bO,{className:"h-5 w-5"})})]})]})]})});E$.displayName="Video";var Da="Menubar",[du,j$,R$]=xn(Da),[Ok]=Oe(Da,[R$,kr]),St=ja(),Dk=kr(),[T$,Ik]=Ok(Da),Pk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,value:n,onValueChange:o,defaultValue:s,loop:a=!0,dir:i,...l}=t,c=yr(i),d=Dk(r),[f,h]=Ye({prop:n,onChange:o,defaultProp:s??"",caller:Da}),[m,v]=p.useState(null);return u.jsx(T$,{scope:r,value:f,onMenuOpen:p.useCallback(g=>{h(g),v(g)},[h]),onMenuClose:p.useCallback(()=>h(""),[h]),onMenuToggle:p.useCallback(g=>{h(y=>y?"":g),v(g)},[h]),dir:c,loop:a,children:u.jsx(du.Provider,{scope:r,children:u.jsx(du.Slot,{scope:r,children:u.jsx(Ma,{asChild:!0,...d,orientation:"horizontal",loop:a,dir:c,currentTabStopId:m,onCurrentTabStopIdChange:v,children:u.jsx(Q.div,{role:"menubar",...l,ref:e})})})})})});Pk.displayName=Da;var A$="MenubarMenu",[mJ,Lk]=Ok(A$),uu="MenubarTrigger",Fk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,disabled:n=!1,...o}=t,s=Dk(r),a=St(r),i=Ik(uu,r),l=Lk(uu,r),c=p.useRef(null),d=oe(e,c,l.triggerRef),[f,h]=p.useState(!1),m=i.value===l.value;return u.jsx(du.ItemSlot,{scope:r,value:l.value,disabled:n,children:u.jsx(Ea,{asChild:!0,...s,focusable:!n,tabStopId:l.value,children:u.jsx(Qf,{asChild:!0,...a,children:u.jsx(Q.button,{type:"button",role:"menuitem",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?l.contentId:void 0,"data-highlighted":f?"":void 0,"data-state":m?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:d,onPointerDown:L(t.onPointerDown,v=>{!n&&v.button===0&&v.ctrlKey===!1&&(i.onMenuOpen(l.value),m||v.preventDefault())}),onPointerEnter:L(t.onPointerEnter,()=>{var v;i.value&&!m&&(i.onMenuOpen(l.value),(v=c.current)==null||v.focus())}),onKeyDown:L(t.onKeyDown,v=>{n||(["Enter"," "].includes(v.key)&&i.onMenuToggle(l.value),v.key==="ArrowDown"&&i.onMenuOpen(l.value),["Enter"," ","ArrowDown"].includes(v.key)&&(l.wasKeyboardTriggerOpenRef.current=!0,v.preventDefault()))}),onFocus:L(t.onFocus,()=>h(!0)),onBlur:L(t.onBlur,()=>h(!1))})})})})});Fk.displayName=uu;var O$="MenubarPortal",_k=t=>{const{__scopeMenubar:e,...r}=t,n=St(e);return u.jsx(ep,{...n,...r})};_k.displayName=O$;var fu="MenubarContent",zk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,align:n="start",...o}=t,s=St(r),a=Ik(fu,r),i=Lk(fu,r),l=j$(r),c=p.useRef(!1);return u.jsx(tp,{id:i.contentId,"aria-labelledby":i.triggerId,"data-radix-menubar-content":"",...s,...o,ref:e,align:n,onCloseAutoFocus:L(t.onCloseAutoFocus,d=>{var f;!a.value&&!c.current&&((f=i.triggerRef.current)==null||f.focus()),c.current=!1,d.preventDefault()}),onFocusOutside:L(t.onFocusOutside,d=>{const f=d.target;l().some(h=>{var m;return(m=h.ref.current)==null?void 0:m.contains(f)})&&d.preventDefault()}),onInteractOutside:L(t.onInteractOutside,()=>{c.current=!0}),onEntryFocus:d=>{i.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:L(t.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const f=d.target,h=f.hasAttribute("data-radix-menubar-subtrigger"),m=f.closest("[data-radix-menubar-content]")!==d.currentTarget,v=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!v&&h||m&&v)return;let g=l().filter(x=>!x.disabled).map(x=>x.value);v&&g.reverse();const y=g.indexOf(i.value);g=a.loop?q$(g,y+1):g.slice(y+1);const[b]=g;b&&a.onMenuOpen(b)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});zk.displayName=fu;var D$="MenubarGroup",I$=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(rp,{...o,...n,ref:e})});I$.displayName=D$;var P$="MenubarLabel",Bk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(np,{...o,...n,ref:e})});Bk.displayName=P$;var L$="MenubarItem",$k=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(op,{...o,...n,ref:e})});$k.displayName=L$;var F$="MenubarCheckboxItem",Hk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(sp,{...o,...n,ref:e})});Hk.displayName=F$;var _$="MenubarRadioGroup",z$=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(ap,{...o,...n,ref:e})});z$.displayName=_$;var B$="MenubarRadioItem",Vk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(ip,{...o,...n,ref:e})});Vk.displayName=B$;var $$="MenubarItemIndicator",Wk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(lp,{...o,...n,ref:e})});Wk.displayName=$$;var H$="MenubarSeparator",Uk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(cp,{...o,...n,ref:e})});Uk.displayName=H$;var V$="MenubarArrow",W$=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(dp,{...o,...n,ref:e})});W$.displayName=V$;var U$="MenubarSubTrigger",Gk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(up,{"data-radix-menubar-subtrigger":"",...o,...n,ref:e})});Gk.displayName=U$;var G$="MenubarSubContent",qk=p.forwardRef((t,e)=>{const{__scopeMenubar:r,...n}=t,o=St(r);return u.jsx(fp,{...o,"data-radix-menubar-content":"",...n,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});qk.displayName=G$;function q$(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var Kk=Pk,Yk=Fk,K$=_k,Jk=zk,Xk=Bk,Zk=$k,Qk=Hk,eN=Vk,tN=Wk,rN=Uk,nN=Gk,oN=qk;const Y$=p.forwardRef(({className:t,...e},r)=>u.jsx(Kk,{ref:r,className:R("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));Y$.displayName=Kk.displayName;const J$=p.forwardRef(({className:t,...e},r)=>u.jsx(Yk,{ref:r,className:R("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));J$.displayName=Yk.displayName;const X$=p.forwardRef(({className:t,inset:e,children:r,...n},o)=>u.jsxs(nN,{ref:o,className:R("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...n,children:[r,u.jsx(Jo,{className:"ml-auto h-4 w-4"})]}));X$.displayName=nN.displayName;const Z$=p.forwardRef(({className:t,...e},r)=>u.jsx(oN,{ref:r,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));Z$.displayName=oN.displayName;const Q$=p.forwardRef(({className:t,align:e="start",alignOffset:r=-4,sideOffset:n=8,...o},s)=>u.jsx(K$,{children:u.jsx(Jk,{ref:s,align:e,alignOffset:r,sideOffset:n,className:R("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o})}));Q$.displayName=Jk.displayName;const eH=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(Zk,{ref:n,className:R("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...r}));eH.displayName=Zk.displayName;const tH=p.forwardRef(({className:t,children:e,checked:r,...n},o)=>u.jsxs(Qk,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(tN,{children:u.jsx(bt,{className:"h-4 w-4"})})}),e]}));tH.displayName=Qk.displayName;const rH=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(eN,{ref:n,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(tN,{children:u.jsx(_l,{className:"h-2 w-2 fill-current"})})}),e]}));rH.displayName=eN.displayName;const nH=p.forwardRef(({className:t,inset:e,...r},n)=>u.jsx(Xk,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));nH.displayName=Xk.displayName;const oH=p.forwardRef(({className:t,...e},r)=>u.jsx(rN,{ref:r,className:R("-mx-1 my-1 h-px bg-muted",t),...e}));oH.displayName=rN.displayName;const sH=p.forwardRef(({options:t,value:e=[],onChange:r,placeholder:n="Select items...",searchPlaceholder:o="Search...",emptyMessage:s="No items found.",disabled:a=!1,className:i,maxDisplayedItems:l=3},c)=>{const[d,f]=p.useState(!1),h=b=>{const x=e.includes(b)?e.filter(w=>w!==b):[...e,b];r==null||r(x)},m=(b,x)=>{x.stopPropagation(),r==null||r(e.filter(w=>w!==b))},v=t.filter(b=>e.includes(b.value)),g=v.slice(0,l),y=v.length-l;return u.jsxs(ac,{open:d,onOpenChange:f,children:[u.jsx(ic,{asChild:!0,children:u.jsxs("button",{ref:c,type:"button",role:"combobox","aria-expanded":d,disabled:a,className:R("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i),children:[u.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:v.length===0?u.jsx("span",{className:"text-muted-foreground",children:n}):u.jsxs(u.Fragment,{children:[g.map(b=>u.jsxs(Kd,{variant:"secondary",className:"gap-1 pr-1",children:[b.label,u.jsx("button",{type:"button",className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:x=>x.preventDefault(),onClick:x=>m(b.value,x),children:u.jsx(xt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},b.value)),y>0&&u.jsxs(Kd,{variant:"secondary",children:["+",y," more"]})]})}),u.jsx(zr,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),u.jsx(Aa,{className:"w-full min-w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:u.jsxs(A0,{children:[u.jsx(O0,{placeholder:o}),u.jsxs(D0,{children:[u.jsx(I0,{children:s}),u.jsx(P0,{children:t.map(b=>u.jsxs(L0,{value:b.value,disabled:b.disabled,onSelect:()=>h(b.value),children:[u.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",e.includes(b.value)?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:u.jsx(bt,{className:"h-4 w-4"})}),b.label]},b.value))})]})]})})]})});sH.displayName="MultiSelect";const sN=Jb,aN=Xb,aH=Vl,iN=p.forwardRef(({className:t,...e},r)=>u.jsx(Zo,{className:R("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",t),...e,ref:r}));iN.displayName=Zo.displayName;const iH=Ge("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"}}),yp=p.forwardRef(({side:t="right",className:e,children:r,...n},o)=>u.jsxs(aH,{children:[u.jsx(iN,{}),u.jsxs(Qo,{ref:o,className:R(iH({side:t}),e),...n,children:[u.jsxs(Wl,{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:[u.jsx(xt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));yp.displayName=Qo.displayName;const lH=p.forwardRef(({className:t,...e},r)=>u.jsx(pa,{ref:r,className:R("font-heading text-lg font-semibold text-foreground",t),...e}));lH.displayName=pa.displayName;const cH=p.forwardRef(({className:t,...e},r)=>u.jsx(ha,{ref:r,className:R("text-sm text-muted-foreground",t),...e}));cH.displayName=ha.displayName;const dH=p.createContext({collapsed:!1,setCollapsed:()=>{},isMobile:!1}),Ia=()=>{const t=p.useContext(dH);if(!t)throw new Error("useNavigationDrawer must be used within a NavigationDrawerProvider");return t},uH=p.forwardRef(({className:t,children:e,...r},n)=>{const{collapsed:o,isMobile:s}=Ia();return s?u.jsxs(sN,{children:[u.jsx(aN,{asChild:!0,children:u.jsx(Ut,{variant:"ghost",size:"icon",className:"md:hidden",children:u.jsx(xO,{className:"h-5 w-5"})})}),u.jsx(yp,{side:"left",className:"w-64 p-0",children:u.jsx("div",{className:"flex h-full flex-col",children:e})})]}):u.jsx("aside",{ref:n,"data-collapsed":o,className:R("flex h-screen flex-col border-r bg-background transition-all duration-300",o?"w-16":"w-64",t),...r,children:e})});uH.displayName="NavigationDrawer";const fH=p.forwardRef(({className:t,children:e,...r},n)=>{const{collapsed:o}=Ia();return u.jsx("div",{ref:n,className:R("flex h-14 items-center border-b px-4",o&&"justify-center px-2",t),...r,children:e})});fH.displayName="NavigationDrawerHeader";const pH=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex-1 overflow-y-auto p-2",t),...e}));pH.displayName="NavigationDrawerContent";const hH=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("border-t p-2",t),...e}));hH.displayName="NavigationDrawerFooter";const mH=p.forwardRef(({className:t,...e},r)=>{const{collapsed:n,setCollapsed:o,isMobile:s}=Ia();return s?null:u.jsx(Ut,{ref:r,variant:"ghost",size:"icon",className:R("h-8 w-8",t),onClick:()=>o(!n),...e,children:n?u.jsx(Jo,{className:"h-4 w-4"}):u.jsx(db,{className:"h-4 w-4"})})});mH.displayName="NavigationDrawerToggle";const gH=Ge("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{active:{true:"bg-accent text-accent-foreground",false:"text-muted-foreground"}},defaultVariants:{active:!1}}),vH=p.forwardRef(({className:t,icon:e,active:r,asChild:n,children:o,...s},a)=>{const{collapsed:i}=Ia();return u.jsxs(n?Ul:"a",{ref:a,className:R(gH({active:r}),i&&"justify-center px-2",t),...s,children:[e&&u.jsx("span",{className:"shrink-0",children:e}),!i&&u.jsx("span",{className:"truncate",children:o})]})});vH.displayName="NavigationDrawerItem";const yH=p.forwardRef(({className:t,label:e,children:r,...n},o)=>{const{collapsed:s}=Ia();return u.jsxs("div",{ref:o,className:R("py-2",t),...n,children:[e&&!s&&u.jsx("h4",{className:"mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:e}),u.jsx("div",{className:"space-y-1",children:r})]})});yH.displayName="NavigationDrawerGroup";var so="NavigationMenu",[bp,lN,bH]=xn(so),[pu,xH,wH]=xn(so),[xp]=Oe(so,[bH,wH]),[kH,Gt]=xp(so),[NH,CH]=xp(so),cN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:s,delayDuration:a=200,skipDelayDuration:i=300,orientation:l="horizontal",dir:c,...d}=t,[f,h]=p.useState(null),m=oe(e,E=>h(E)),v=yr(c),g=p.useRef(0),y=p.useRef(0),b=p.useRef(0),[x,w]=p.useState(!0),[k,N]=Ye({prop:n,onChange:E=>{const A=E!=="",O=i>0;A?(window.clearTimeout(b.current),O&&w(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout(()=>w(!0),i)),o==null||o(E)},defaultProp:s??"",caller:so}),S=p.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>N(""),150)},[N]),C=p.useCallback(E=>{window.clearTimeout(y.current),N(E)},[N]),M=p.useCallback(E=>{k===E?window.clearTimeout(y.current):g.current=window.setTimeout(()=>{window.clearTimeout(y.current),N(E)},a)},[k,N,a]);return p.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(y.current),window.clearTimeout(b.current)},[]),u.jsx(dN,{scope:r,isRootMenu:!0,value:k,dir:v,orientation:l,rootNavigationMenu:f,onTriggerEnter:E=>{window.clearTimeout(g.current),x?M(E):C(E)},onTriggerLeave:()=>{window.clearTimeout(g.current),S()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:S,onItemSelect:E=>{N(A=>A===E?"":E)},onItemDismiss:()=>N(""),children:u.jsx(Q.nav,{"aria-label":"Main","data-orientation":l,dir:v,...d,ref:m})})});cN.displayName=so;var hu="NavigationMenuSub",SH=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:s,orientation:a="horizontal",...i}=t,l=Gt(hu,r),[c,d]=Ye({prop:n,onChange:o,defaultProp:s??"",caller:hu});return u.jsx(dN,{scope:r,isRootMenu:!1,value:c,dir:l.dir,orientation:a,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:f=>d(f),onItemSelect:f=>d(f),onItemDismiss:()=>d(""),children:u.jsx(Q.div,{"data-orientation":a,...i,ref:e})})});SH.displayName=hu;var dN=t=>{const{scope:e,isRootMenu:r,rootNavigationMenu:n,dir:o,orientation:s,children:a,value:i,onItemSelect:l,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:h,onContentLeave:m}=t,[v,g]=p.useState(null),[y,b]=p.useState(new Map),[x,w]=p.useState(null);return u.jsx(kH,{scope:e,isRootMenu:r,rootNavigationMenu:n,value:i,previousValue:ts(i),baseId:Ke(),dir:o,orientation:s,viewport:v,onViewportChange:g,indicatorTrack:x,onIndicatorTrackChange:w,onTriggerEnter:Te(d),onTriggerLeave:Te(f),onContentEnter:Te(h),onContentLeave:Te(m),onItemSelect:Te(l),onItemDismiss:Te(c),onViewportContentChange:p.useCallback((k,N)=>{b(S=>(S.set(k,N),new Map(S)))},[]),onViewportContentRemove:p.useCallback(k=>{b(N=>N.has(k)?(N.delete(k),new Map(N)):N)},[]),children:u.jsx(bp.Provider,{scope:e,children:u.jsx(NH,{scope:e,items:y,children:a})})})},uN="NavigationMenuList",fN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,...n}=t,o=Gt(uN,r),s=u.jsx(Q.ul,{"data-orientation":o.orientation,...n,ref:e});return u.jsx(Q.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:u.jsx(bp.Slot,{scope:r,children:o.isRootMenu?u.jsx(xN,{asChild:!0,children:s}):s})})});fN.displayName=uN;var pN="NavigationMenuItem",[MH,hN]=xp(pN),EH=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,value:n,...o}=t,s=Ke(),a=n||s||"LEGACY_REACT_AUTO_VALUE",i=p.useRef(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(()=>{}),f=p.useRef(!1),h=p.useCallback((v="start")=>{if(i.current){d.current();const g=gu(i.current);g.length&&Np(v==="start"?g:g.reverse())}},[]),m=p.useCallback(()=>{if(i.current){const v=gu(i.current);v.length&&(d.current=PH(v))}},[]);return u.jsx(MH,{scope:r,value:a,triggerRef:l,contentRef:i,focusProxyRef:c,wasEscapeCloseRef:f,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:m,onContentFocusOutside:m,children:u.jsx(Q.li,{...o,ref:e})})});EH.displayName=pN;var mu="NavigationMenuTrigger",mN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,disabled:n,...o}=t,s=Gt(mu,t.__scopeNavigationMenu),a=hN(mu,t.__scopeNavigationMenu),i=p.useRef(null),l=oe(i,a.triggerRef,e),c=kN(s.baseId,a.value),d=NN(s.baseId,a.value),f=p.useRef(!1),h=p.useRef(!1),m=a.value===s.value;return u.jsxs(u.Fragment,{children:[u.jsx(bp.ItemSlot,{scope:r,value:a.value,children:u.jsx(wN,{asChild:!0,children:u.jsx(Q.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":Cp(m),"aria-expanded":m,"aria-controls":d,...o,ref:l,onPointerEnter:L(t.onPointerEnter,()=>{h.current=!1,a.wasEscapeCloseRef.current=!1}),onPointerMove:L(t.onPointerMove,Fi(()=>{n||h.current||a.wasEscapeCloseRef.current||f.current||(s.onTriggerEnter(a.value),f.current=!0)})),onPointerLeave:L(t.onPointerLeave,Fi(()=>{n||(s.onTriggerLeave(),f.current=!1)})),onClick:L(t.onClick,()=>{s.onItemSelect(a.value),h.current=m}),onKeyDown:L(t.onKeyDown,v=>{const g={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];m&&v.key===g&&(a.onEntryKeyDown(),v.preventDefault())})})})}),m&&u.jsxs(u.Fragment,{children:[u.jsx(v1,{"aria-hidden":!0,tabIndex:0,ref:a.focusProxyRef,onFocus:v=>{const g=a.contentRef.current,y=v.relatedTarget,b=y===i.current,x=g==null?void 0:g.contains(y);(b||!x)&&a.onFocusProxyEnter(b?"start":"end")}}),s.viewport&&u.jsx("span",{"aria-owns":d})]})]})});mN.displayName=mu;var jH="NavigationMenuLink",Wm="navigationMenu.linkSelect",RH=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,active:n,onSelect:o,...s}=t;return u.jsx(wN,{asChild:!0,children:u.jsx(Q.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...s,ref:e,onClick:L(t.onClick,a=>{const i=a.target,l=new CustomEvent(Wm,{bubbles:!0,cancelable:!0});if(i.addEventListener(Wm,c=>o==null?void 0:o(c),{once:!0}),ki(i,l),!l.defaultPrevented&&!a.metaKey){const c=new CustomEvent(mi,{bubbles:!0,cancelable:!0});ki(i,c)}},{checkForDefaultPrevented:!1})})})});RH.displayName=jH;var wp="NavigationMenuIndicator",gN=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=Gt(wp,t.__scopeNavigationMenu),s=!!o.value;return o.indicatorTrack?Ol.createPortal(u.jsx(De,{present:r||s,children:u.jsx(TH,{...n,ref:e})}),o.indicatorTrack):null});gN.displayName=wp;var TH=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,...n}=t,o=Gt(wp,r),s=lN(r),[a,i]=p.useState(null),[l,c]=p.useState(null),d=o.orientation==="horizontal",f=!!o.value;p.useEffect(()=>{var m;const v=(m=s().find(g=>g.value===o.value))==null?void 0:m.ref.current;v&&i(v)},[s,o.value]);const h=()=>{a&&c({size:d?a.offsetWidth:a.offsetHeight,offset:d?a.offsetLeft:a.offsetTop})};return vu(a,h),vu(o.indicatorTrack,h),l?u.jsx(Q.div,{"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":o.orientation,...n,ref:e,style:{position:"absolute",...d?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...n.style}}):null}),_o="NavigationMenuContent",vN=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=Gt(_o,t.__scopeNavigationMenu),s=hN(_o,t.__scopeNavigationMenu),a=oe(s.contentRef,e),i=s.value===o.value,l={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...n};return o.viewport?u.jsx(AH,{forceMount:r,...l,ref:a}):u.jsx(De,{present:r||i,children:u.jsx(yN,{"data-state":Cp(i),...l,ref:a,onPointerEnter:L(t.onPointerEnter,o.onContentEnter),onPointerLeave:L(t.onPointerLeave,Fi(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...l.style}})})});vN.displayName=_o;var AH=p.forwardRef((t,e)=>{const r=Gt(_o,t.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return Ae(()=>{n(t.value,{ref:e,...t})},[t,e,n]),Ae(()=>()=>o(t.value),[t.value,o]),null}),mi="navigationMenu.rootContentDismiss",yN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,value:n,triggerRef:o,focusProxyRef:s,wasEscapeCloseRef:a,onRootContentClose:i,onContentFocusOutside:l,...c}=t,d=Gt(_o,r),f=p.useRef(null),h=oe(f,e),m=kN(d.baseId,n),v=NN(d.baseId,n),g=lN(r),y=p.useRef(null),{onItemDismiss:b}=d;p.useEffect(()=>{const w=f.current;if(d.isRootMenu&&w){const k=()=>{var N;b(),i(),w.contains(document.activeElement)&&((N=o.current)==null||N.focus())};return w.addEventListener(mi,k),()=>w.removeEventListener(mi,k)}},[d.isRootMenu,t.value,o,b,i]);const x=p.useMemo(()=>{const w=g().map(E=>E.value);d.dir==="rtl"&&w.reverse();const k=w.indexOf(d.value),N=w.indexOf(d.previousValue),S=n===d.value,C=N===w.indexOf(n);if(!S&&!C)return y.current;const M=(()=>{if(k!==N){if(S&&N!==-1)return k>N?"from-end":"from-start";if(C&&k!==-1)return k>N?"to-start":"to-end"}return null})();return y.current=M,M},[d.previousValue,d.value,d.dir,g,n]);return u.jsx(xN,{asChild:!0,children:u.jsx(wn,{id:v,"aria-labelledby":m,"data-motion":x,"data-orientation":d.orientation,...c,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var w;const k=new Event(mi,{bubbles:!0,cancelable:!0});(w=f.current)==null||w.dispatchEvent(k)},onFocusOutside:L(t.onFocusOutside,w=>{var k;l();const N=w.target;(k=d.rootNavigationMenu)!=null&&k.contains(N)&&w.preventDefault()}),onPointerDownOutside:L(t.onPointerDownOutside,w=>{var k;const N=w.target,S=g().some(M=>{var E;return(E=M.ref.current)==null?void 0:E.contains(N)}),C=d.isRootMenu&&((k=d.viewport)==null?void 0:k.contains(N));(S||C||!d.isRootMenu)&&w.preventDefault()}),onKeyDown:L(t.onKeyDown,w=>{var k;const N=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!N){const S=gu(w.currentTarget),C=document.activeElement,M=S.findIndex(A=>A===C),E=w.shiftKey?S.slice(0,M).reverse():S.slice(M+1,S.length);Np(E)?w.preventDefault():(k=s.current)==null||k.focus()}}),onEscapeKeyDown:L(t.onEscapeKeyDown,w=>{a.current=!0})})})}),kp="NavigationMenuViewport",bN=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=!!Gt(kp,t.__scopeNavigationMenu).value;return u.jsx(De,{present:r||o,children:u.jsx(OH,{...n,ref:e})})});bN.displayName=kp;var OH=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,children:n,...o}=t,s=Gt(kp,r),a=oe(e,s.onViewportChange),i=CH(_o,t.__scopeNavigationMenu),[l,c]=p.useState(null),[d,f]=p.useState(null),h=l?(l==null?void 0:l.width)+"px":void 0,m=l?(l==null?void 0:l.height)+"px":void 0,v=!!s.value,g=v?s.value:s.previousValue;return vu(d,()=>{d&&c({width:d.offsetWidth,height:d.offsetHeight})}),u.jsx(Q.div,{"data-state":Cp(v),"data-orientation":s.orientation,...o,ref:a,style:{pointerEvents:!v&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":m,...o.style},onPointerEnter:L(t.onPointerEnter,s.onContentEnter),onPointerLeave:L(t.onPointerLeave,Fi(s.onContentLeave)),children:Array.from(i.items).map(([y,{ref:b,forceMount:x,...w}])=>{const k=g===y;return u.jsx(De,{present:x||k,children:u.jsx(yN,{...w,ref:er(b,N=>{k&&N&&f(N)})})},y)})})}),DH="FocusGroup",xN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,...n}=t,o=Gt(DH,r);return u.jsx(pu.Provider,{scope:r,children:u.jsx(pu.Slot,{scope:r,children:u.jsx(Q.div,{dir:o.dir,...n,ref:e})})})}),Um=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],IH="FocusGroupItem",wN=p.forwardRef((t,e)=>{const{__scopeNavigationMenu:r,...n}=t,o=xH(r),s=Gt(IH,r);return u.jsx(pu.ItemSlot,{scope:r,children:u.jsx(Q.button,{...n,ref:e,onKeyDown:L(t.onKeyDown,a=>{if(["Home","End",...Um].includes(a.key)){let i=o().map(l=>l.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(a.key)&&i.reverse(),Um.includes(a.key)){const l=i.indexOf(a.currentTarget);i=i.slice(l+1)}setTimeout(()=>Np(i)),a.preventDefault()}})})})});function gu(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Np(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}function PH(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const r=e.dataset.tabindex;e.setAttribute("tabindex",r)})}}function vu(t,e){const r=Te(e);Ae(()=>{let n=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(t),()=>{window.cancelAnimationFrame(n),o.unobserve(t)}}},[t,r])}function Cp(t){return t?"open":"closed"}function kN(t,e){return`${t}-trigger-${e}`}function NN(t,e){return`${t}-content-${e}`}function Fi(t){return e=>e.pointerType==="mouse"?t(e):void 0}var CN=cN,SN=fN,MN=mN,EN=gN,jN=vN,RN=bN;const LH=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(CN,{ref:n,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...r,children:[e,u.jsx(TN,{})]}));LH.displayName=CN.displayName;const FH=p.forwardRef(({className:t,...e},r)=>u.jsx(SN,{ref:r,className:R("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));FH.displayName=SN.displayName;const _H=Ge("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),zH=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(MN,{ref:n,className:R(_H(),"group",t),...r,children:[e," ",u.jsx(zr,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));zH.displayName=MN.displayName;const BH=p.forwardRef(({className:t,...e},r)=>u.jsx(jN,{ref:r,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",t),...e}));BH.displayName=jN.displayName;const TN=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:u.jsx(RN,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:r,...e})}));TN.displayName=RN.displayName;const $H=p.forwardRef(({className:t,...e},r)=>u.jsx(EN,{ref:r,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",t),...e,children:u.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));$H.displayName=EN.displayName;const HH=p.forwardRef(({className:t,value:e,onChange:r,min:n,max:o,step:s=1,showControls:a=!0,allowNegative:i=!0,clampOnBlur:l=!0,disabled:c,...d},f)=>{const[h,m]=p.useState(e!==void 0?e.toString():"");p.useEffect(()=>{e!==void 0&&m(e.toString())},[e]);const v=C=>{let M=C;return n!==void 0&&M<n&&(M=n),o!==void 0&&M>o&&(M=o),M},g=C=>{if(C===""||C==="-")return;const M=parseFloat(C);return isNaN(M)?void 0:M},y=C=>{let M=C.target.value;if(i||(M=M.replace(/-/g,"")),!/^-?\d*\.?\d*$/.test(M))return;m(M);const E=g(M);r==null||r(E)},b=()=>{const C=g(h);if(C!==void 0&&l){const M=v(C);m(M.toString()),r==null||r(M)}},x=()=>{const C=g(h)??0,M=v(C+s);m(M.toString()),r==null||r(M)},w=()=>{const C=g(h)??0,M=v(C-s);m(M.toString()),r==null||r(M)},k=C=>{C.key==="ArrowUp"?(C.preventDefault(),x()):C.key==="ArrowDown"&&(C.preventDefault(),w())},N=()=>{const C=g(h)??0;return n===void 0||C>n},S=()=>{const C=g(h)??0;return o===void 0||C<o};return a?u.jsxs("div",{className:"flex",children:[u.jsx("button",{type:"button",className:R("flex h-10 w-10 items-center justify-center rounded-l-md border border-r-0 border-input bg-background hover:bg-accent",(!N()||c)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:w,disabled:!N()||c,tabIndex:-1,children:u.jsx(hb,{className:"h-4 w-4"})}),u.jsx("input",{type:"text",inputMode:"decimal",className:R("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:f,value:h,onChange:y,onBlur:b,onKeyDown:k,disabled:c,...d}),u.jsx("button",{type:"button",className:R("flex h-10 w-10 items-center justify-center rounded-r-md border border-l-0 border-input bg-background hover:bg-accent",(!S()||c)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:x,disabled:!S()||c,tabIndex:-1,children:u.jsx(MO,{className:"h-4 w-4"})})]}):u.jsx("input",{type:"text",inputMode:"decimal",className:R("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:f,value:h,onChange:y,onBlur:b,onKeyDown:k,disabled:c,...d})});HH.displayName="NumberInput";const VH=p.forwardRef(({className:t,...e},r)=>u.jsx("ul",{ref:r,className:R("flex flex-row items-center gap-1",t),...e}));VH.displayName="PaginationContent";const WH=p.forwardRef(({className:t,...e},r)=>u.jsx("li",{ref:r,className:R("",t),...e}));WH.displayName="PaginationItem";function UH(t,e={}){const{minLength:r=8,requireUppercase:n=!0,requireLowercase:o=!0,requireNumbers:s=!0,requireSpecialChars:a=!0}=e,i={length:t.length>=r,uppercase:!n||/[A-Z]/.test(t),lowercase:!o||/[a-z]/.test(t),numbers:!s||/[0-9]/.test(t),specialChars:!a||/[!@#$%^&*(),.?":{}|<>]/.test(t)},l=Object.values(i).filter(Boolean).length,c=Object.keys(i).length;return{score:l/c,checks:i}}const GH=p.forwardRef(({className:t,showStrengthIndicator:e=!1,strengthRequirements:r={},onStrengthChange:n,onChange:o,...s},a)=>{const[i,l]=p.useState(!1),[c,d]=p.useState(null),{minLength:f=8,requireUppercase:h=!0,requireLowercase:m=!0,requireNumbers:v=!0,requireSpecialChars:g=!0}=r,y=w=>{const k=w.target.value;if(e&&k){const N=UH(k,r);d(N),N.score<.4?n==null||n("weak"):N.score<.8?n==null||n("medium"):n==null||n("strong")}else d(null);o==null||o(w)},b=()=>c?c.score<.4?"bg-red-500":c.score<.8?"bg-yellow-500":"bg-green-500":"bg-muted",x=()=>c?c.score<.4?"Weak":c.score<.8?"Medium":"Strong":"";return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(pb,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:i?"text":"password",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,onChange:y,...s}),u.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>l(!i),tabIndex:-1,children:i?u.jsx(oO,{className:"h-4 w-4"}):u.jsx(sO,{className:"h-4 w-4"})})]}),e&&c&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:u.jsx("div",{className:R("h-full transition-all duration-300",b()),style:{width:`${c.score*100}%`}})}),u.jsx("span",{className:"text-xs text-muted-foreground min-w-[50px]",children:x()})]}),u.jsxs("ul",{className:"grid grid-cols-2 gap-1 text-xs",children:[u.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.length?u.jsx(bt,{className:"h-3 w-3 text-green-500"}):u.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),u.jsxs("span",{className:c.checks.length?"text-green-600":"text-muted-foreground",children:[f,"+ characters"]})]}),h&&u.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.uppercase?u.jsx(bt,{className:"h-3 w-3 text-green-500"}):u.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{className:c.checks.uppercase?"text-green-600":"text-muted-foreground",children:"Uppercase letter"})]}),m&&u.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.lowercase?u.jsx(bt,{className:"h-3 w-3 text-green-500"}):u.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{className:c.checks.lowercase?"text-green-600":"text-muted-foreground",children:"Lowercase letter"})]}),v&&u.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.numbers?u.jsx(bt,{className:"h-3 w-3 text-green-500"}):u.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{className:c.checks.numbers?"text-green-600":"text-muted-foreground",children:"Number"})]}),g&&u.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.specialChars?u.jsx(bt,{className:"h-3 w-3 text-green-500"}):u.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),u.jsx("span",{className:c.checks.specialChars?"text-green-600":"text-muted-foreground",children:"Special character"})]})]})]})]})});GH.displayName="PasswordInput";function qH(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const KH=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"🇵🇹"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"🇳🇱"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"🇧🇪"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"🇨🇭"},{code:"AT",name:"Austria",dialCode:"+43",flag:"🇦🇹"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dialCode:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"🇩🇰"},{code:"FI",name:"Finland",dialCode:"+358",flag:"🇫🇮"},{code:"IE",name:"Ireland",dialCode:"+353",flag:"🇮🇪"},{code:"PL",name:"Poland",dialCode:"+48",flag:"🇵🇱"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"🇨🇿"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"🇭🇰"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"🇹🇼"},{code:"MY",name:"Malaysia",dialCode:"+60",flag:"🇲🇾"},{code:"TH",name:"Thailand",dialCode:"+66",flag:"🇹🇭"},{code:"ID",name:"Indonesia",dialCode:"+62",flag:"🇮🇩"},{code:"PH",name:"Philippines",dialCode:"+63",flag:"🇵🇭"},{code:"VN",name:"Vietnam",dialCode:"+84",flag:"🇻🇳"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dialCode:"+56",flag:"🇨🇱"},{code:"CO",name:"Colombia",dialCode:"+57",flag:"🇨🇴"},{code:"PE",name:"Peru",dialCode:"+51",flag:"🇵🇪"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"🇿🇦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"🇪🇬"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dialCode:"+254",flag:"🇰🇪"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"🇸🇦"},{code:"IL",name:"Israel",dialCode:"+972",flag:"🇮🇱"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"🇹🇷"},{code:"RU",name:"Russia",dialCode:"+7",flag:"🇷🇺"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"🇺🇦"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"🇳🇿"}],YH=p.forwardRef(({className:t,countries:e=KH,defaultCountry:r="US",value:n,onChange:o,onCountryChange:s,...a},i)=>{const[l,c]=p.useState(!1),[d,f]=p.useState(e.find(N=>N.code===r)||e[0]),[h,m]=p.useState(n||""),[v,g]=p.useState(""),y=p.useRef(null),b=p.useRef(null);p.useEffect(()=>{n!==void 0&&m(n)},[n]),p.useEffect(()=>{const N=S=>{y.current&&!y.current.contains(S.target)&&(c(!1),g(""))};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const x=e.filter(N=>N.name.toLowerCase().includes(v.toLowerCase())||N.dialCode.includes(v)||N.code.toLowerCase().includes(v.toLowerCase())),w=N=>{var S;f(N),c(!1),g(""),s==null||s(N),o==null||o(h,N),(S=b.current)==null||S.focus()},k=N=>{const S=N.target.value.replace(/[^\d\s\-()]/g,"");m(S),o==null||o(S,d)};return u.jsxs("div",{className:"relative",ref:y,children:[u.jsxs("div",{className:"flex",children:[u.jsxs("button",{type:"button",className:R("flex items-center gap-1 h-10 px-3 rounded-l-md border border-r-0 border-input bg-background text-sm hover:bg-accent",l&&"ring-2 ring-ring ring-offset-2"),onClick:()=>c(!l),children:[u.jsx("span",{className:"text-base",children:d.flag}),u.jsx("span",{className:"text-muted-foreground",children:d.dialCode}),u.jsx(zr,{className:"h-3 w-3 text-muted-foreground"})]}),u.jsxs("div",{className:"relative flex-1",children:[u.jsx(CO,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"tel",ref:N=>{b.current=N,qH(i,N)},className:R("flex h-10 w-full rounded-r-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),value:h,onChange:k,...a})]})]}),l&&u.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[280px] rounded-md border bg-popover p-1 shadow-md",children:[u.jsx("input",{type:"text",className:"w-full px-3 py-2 text-sm border-b bg-transparent outline-none placeholder:text-muted-foreground",placeholder:"Search countries...",value:v,onChange:N=>g(N.target.value),autoFocus:!0}),u.jsx("div",{className:"max-h-[200px] overflow-y-auto mt-1",children:x.length===0?u.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No countries found"}):x.map(N=>u.jsxs("button",{type:"button",className:R("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm hover:bg-accent",d.code===N.code&&"bg-accent"),onClick:()=>w(N),children:[u.jsx("span",{className:"text-base",children:N.flag}),u.jsx("span",{className:"flex-1 text-left",children:N.name}),u.jsx("span",{className:"text-muted-foreground",children:N.dialCode}),d.code===N.code&&u.jsx(bt,{className:"h-4 w-4"})]},N.code))})]})]})});YH.displayName="PhoneInput";const JH=Ge("inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500 text-white hover:bg-green-500/80",warning:"border-transparent bg-yellow-500 text-white hover:bg-yellow-500/80",info:"border-transparent bg-blue-500 text-white hover:bg-blue-500/80"},size:{default:"h-6 text-xs",sm:"h-5 text-[10px]",lg:"h-7 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),XH=p.forwardRef(({className:t,variant:e,size:r,onDismiss:n,dismissLabel:o="Remove",children:s,...a},i)=>u.jsxs("div",{ref:i,className:R(JH({variant:e,size:r}),t),...a,children:[u.jsx("span",{className:"truncate",children:s}),n&&u.jsx("button",{type:"button",onClick:n,className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-ring","aria-label":o,children:u.jsx(xt,{className:R("shrink-0",r==="sm"?"h-2.5 w-2.5":"h-3 w-3")})})]}));XH.displayName="Pill";var Sp="Progress",Mp=100,[ZH]=vx(Sp),[QH,eV]=ZH(Sp),AN=p.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:s=tV,...a}=t;(o||o===0)&&!Gm(o)&&console.error(rV(`${o}`,"Progress"));const i=Gm(o)?o:Mp;n!==null&&!qm(n,i)&&console.error(nV(`${n}`,"Progress"));const l=qm(n,i)?n:null,c=_i(l)?s(l,i):void 0;return u.jsx(QH,{scope:r,value:l,max:i,children:u.jsx(mt.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":_i(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":IN(l,i),"data-value":l??void 0,"data-max":i,...a,ref:e})})});AN.displayName=Sp;var ON="ProgressIndicator",DN=p.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,o=eV(ON,r);return u.jsx(mt.div,{"data-state":IN(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:e})});DN.displayName=ON;function tV(t,e){return`${Math.round(t/e*100)}%`}function IN(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function _i(t){return typeof t=="number"}function Gm(t){return _i(t)&&!isNaN(t)&&t>0}function qm(t,e){return _i(t)&&!isNaN(t)&&t<=e&&t>=0}function rV(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mp}\`.`}function nV(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
427
+ - a positive number
428
+ - less than the value passed to \`max\` (or ${Mp} if no \`max\` prop is set)
429
+ - \`null\` or \`undefined\` if the progress is indeterminate.
430
+
431
+ Defaulting to \`null\`.`}var PN=AN,oV=DN;const sV=p.forwardRef(({className:t,value:e,...r},n)=>u.jsx(PN,{ref:n,className:R("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...r,children:u.jsx(oV,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));sV.displayName=PN.displayName;var Ep="Radio",[aV,LN]=Oe(Ep),[iV,lV]=aV(Ep),FN=p.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:l,form:c,...d}=t,[f,h]=p.useState(null),m=oe(e,y=>h(y)),v=p.useRef(!1),g=f?c||!!f.closest("form"):!0;return u.jsxs(iV,{scope:r,checked:o,disabled:a,children:[u.jsx(Q.button,{type:"button",role:"radio","aria-checked":o,"data-state":$N(o),"data-disabled":a?"":void 0,disabled:a,value:i,...d,ref:m,onClick:L(t.onClick,y=>{o||l==null||l(),g&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),g&&u.jsx(BN,{control:f,bubbles:!v.current,name:n,value:i,checked:o,required:s,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});FN.displayName=Ep;var _N="RadioIndicator",zN=p.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...o}=t,s=lV(_N,r);return u.jsx(De,{present:n||s.checked,children:u.jsx(Q.span,{"data-state":$N(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});zN.displayName=_N;var cV="RadioBubbleInput",BN=p.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...o},s)=>{const a=p.useRef(null),i=oe(a,s),l=ts(r),c=xa(e);return p.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&h){const m=new Event("click",{bubbles:n});h.call(d,r),d.dispatchEvent(m)}},[l,r,n]),u.jsx(Q.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});BN.displayName=cV;function $N(t){return t?"checked":"unchecked"}var dV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fc="RadioGroup",[uV]=Oe(fc,[kr,LN]),HN=kr(),VN=LN(),[fV,pV]=uV(fc),WN=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:l,dir:c,loop:d=!0,onValueChange:f,...h}=t,m=HN(r),v=yr(c),[g,y]=Ye({prop:s,defaultProp:o??null,onChange:f,caller:fc});return u.jsx(fV,{scope:r,name:n,required:a,disabled:i,value:g,onValueChange:y,children:u.jsx(Ma,{asChild:!0,...m,orientation:l,dir:v,loop:d,children:u.jsx(Q.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":i?"":void 0,dir:v,...h,ref:e})})})});WN.displayName=fc;var UN="RadioGroupItem",GN=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...o}=t,s=pV(UN,r),a=s.disabled||n,i=HN(r),l=VN(r),c=p.useRef(null),d=oe(e,c),f=s.value===o.value,h=p.useRef(!1);return p.useEffect(()=>{const m=g=>{dV.includes(g.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),u.jsx(Ea,{asChild:!0,...i,focusable:!a,active:f,children:u.jsx(FN,{disabled:a,required:s.required,checked:f,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:L(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:L(o.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});GN.displayName=UN;var hV="RadioGroupIndicator",qN=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,o=VN(r);return u.jsx(zN,{...o,...n,ref:e})});qN.displayName=hV;var KN=WN,YN=GN,mV=qN;const gV=p.forwardRef(({className:t,...e},r)=>u.jsx(KN,{className:R("grid gap-2",t),...e,ref:r}));gV.displayName=KN.displayName;const vV=p.forwardRef(({className:t,...e},r)=>u.jsx(YN,{ref:r,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:u.jsx(mV,{className:"flex items-center justify-center",children:u.jsx(_l,{className:"h-2.5 w-2.5 fill-current text-current"})})}));vV.displayName=YN.displayName;const yV=p.forwardRef(({className:t,value:e=0,max:r=5,onChange:n,readonly:o=!1,size:s="default",showValue:a=!1,precision:i=1,...l},c)=>{const[d,f]=p.useState(null),h={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},m=(b,x)=>{if(o)return;const w=b.currentTarget.getBoundingClientRect(),k=(b.clientX-w.left)/w.width;f(i===.5?x+(k<.5?.5:1):x+1)},v=b=>{o||!n||n(d??b+1)},g=d??e,y=b=>{const x=g>=b+1,w=g>=b+.5&&g<b+1;return u.jsxs("button",{type:"button",disabled:o,className:R("relative p-0.5 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-default",!o&&"cursor-pointer hover:scale-110"),onMouseMove:k=>m(k,b),onMouseLeave:()=>f(null),onClick:()=>v(b),"aria-label":`Rate ${b+1} out of ${r}`,children:[u.jsx(Bh,{className:R(h[s],"text-muted-foreground/30")}),u.jsx(Bh,{className:R(h[s],"absolute inset-0.5 text-yellow-400 fill-yellow-400 transition-all",x||w?"opacity-100":"opacity-0"),style:w?{clipPath:"polygon(0 0, 50% 0, 50% 100%, 0 100%)"}:void 0})]},b)};return u.jsxs("div",{ref:c,className:R("flex items-center gap-0.5",t),role:"radiogroup","aria-label":"Rating",...l,children:[Array.from({length:r},(b,x)=>y(x)),a&&u.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:[g.toFixed(i===.5?1:0)," / ",r]})]})});yV.displayName="Rating";const jp=p.createContext({direction:"horizontal",registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>50,startResize:()=>{},isResizing:!1}),bV=p.forwardRef(({className:t,direction:e="horizontal",autoSaveId:r,onLayout:n,children:o,...s},a)=>{const[i,l]=p.useState(new Map),[c,d]=p.useState(!1),f=p.useRef(null),h=p.useRef(-1),m=p.useRef([]),v=p.useMemo(()=>{const w=[];return p.Children.forEach(o,k=>{p.isValidElement(k)&&k.type===JN&&w.push(k.props.id||`panel-${w.length}`)}),w},[o]),g=p.useCallback((w,k=10,N=100,S=50)=>{l(C=>{const M=new Map(C);return M.has(w)||M.set(w,{minSize:k,maxSize:N,size:S}),M})},[]),y=p.useCallback(w=>{l(k=>{const N=new Map(k);return N.delete(w),N})},[]),b=p.useCallback(w=>{var k;return((k=i.get(w))==null?void 0:k.size)??50},[i]),x=p.useCallback(w=>{d(!0),h.current=w,m.current=v.map(k=>b(k))},[v,b]);return p.useEffect(()=>{if(!c)return;const w=N=>{if(!f.current||h.current<0)return;const S=f.current.getBoundingClientRect(),C=e==="horizontal"?S.width:S.height,M=(e==="horizontal"?N.clientX-S.left:N.clientY-S.top)/C*100,E=h.current,A=v[E],O=v[E+1],D=i.get(A),q=i.get(O);if(!D||!q)return;let F=0;for(let _=0;_<E;_++)F+=b(v[_]);const $=D.size+q.size;let H=M-F;H=Math.max(D.minSize,Math.min(D.maxSize,H));let P=$-H;P=Math.max(q.minSize,Math.min(q.maxSize,P)),H=$-P,l(_=>{const z=new Map(_);return z.set(A,{...D,size:H}),z.set(O,{...q,size:P}),z})},k=()=>{d(!1),h.current=-1,n==null||n(v.map(N=>b(N)))};return document.addEventListener("mousemove",w),document.addEventListener("mouseup",k),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",k)}},[c,e,i,v,b,n]),p.useEffect(()=>{if(!r)return;const w=localStorage.getItem(`resizable-${r}`);if(w)try{const k=JSON.parse(w);l(N=>{const S=new Map(N);for(const[C,M]of Object.entries(k)){const E=S.get(C);E&&S.set(C,{...E,size:M})}return S})}catch{}},[r]),p.useEffect(()=>{if(!r||c)return;const w={};i.forEach((k,N)=>{w[N]=k.size}),localStorage.setItem(`resizable-${r}`,JSON.stringify(w))},[r,i,c]),u.jsx(jp.Provider,{value:{direction:e,registerPanel:g,unregisterPanel:y,getPanelSize:b,startResize:x,isResizing:c},children:u.jsx("div",{ref:w=>{f.current=w,typeof a=="function"?a(w):a&&(a.current=w)},className:R("flex h-full w-full",e==="vertical"&&"flex-col",t),...s,children:o})})});bV.displayName="ResizablePanelGroup";const JN=p.forwardRef(({className:t,id:e,defaultSize:r=50,minSize:n=10,maxSize:o=100,children:s,...a},i)=>{const l=p.useId(),c=e||l,{direction:d,registerPanel:f,unregisterPanel:h,getPanelSize:m}=p.useContext(jp);p.useEffect(()=>(f(c,n,o,r),()=>h(c)),[c,n,o,r,f,h]);const v=m(c);return u.jsx("div",{ref:i,className:R("overflow-hidden",t),style:{[d==="horizontal"?"width":"height"]:`${v}%`,flexShrink:0},...a,children:s})});JN.displayName="ResizablePanel";const xV=p.forwardRef(({className:t,withHandle:e=!1,...r},n)=>{const{direction:o,startResize:s,isResizing:a}=p.useContext(jp),i=p.useRef(-1);p.useEffect(()=>{const c=n==null?void 0:n.current;if(!c)return;const d=c.parentElement;if(!d)return;const f=Array.from(d.querySelectorAll("[data-resizable-handle]"));i.current=f.indexOf(c)},[n]);const l=c=>{c.preventDefault(),i.current>=0&&s(i.current)};return u.jsx("div",{ref:n,"data-resizable-handle":!0,className:R("relative flex items-center justify-center bg-border",o==="horizontal"?"w-px cursor-col-resize":"h-px cursor-row-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",a&&"bg-primary",t),onMouseDown:l,...r,children:e&&u.jsx("div",{className:R("z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",o==="vertical"&&"h-3 w-4 rotate-90"),children:u.jsx(dO,{className:"h-2.5 w-2.5"})})})});xV.displayName="ResizableHandle";function rt(t){this.content=t}rt.prototype={constructor:rt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,o=n.find(t),s=n.content.slice();return o==-1?s.push(r||t,e):(s[o+1]=e,r&&(s[o]=r)),new rt(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new rt(r)},addToStart:function(t,e){return new rt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new rt(r)},addBefore:function(t,e,r){var n=this.remove(e),o=n.content.slice(),s=n.find(t);return o.splice(s==-1?o.length:s,0,e,r),new rt(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=rt.from(t),t.size?new rt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=rt.from(t),t.size?new rt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=rt.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}};rt.from=function(t){if(t instanceof rt)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new rt(e)};function XN(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let o=t.child(n),s=e.child(n);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let a=0;o.text[a]==s.text[a];a++)r++;return r}if(o.content.size||s.content.size){let a=XN(o.content,s.content,r+1);if(a!=null)return a}r+=o.nodeSize}}function ZN(t,e,r,n){for(let o=t.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:r,b:n};let a=t.child(--o),i=e.child(--s),l=a.nodeSize;if(a==i){r-=l,n-=l;continue}if(!a.sameMarkup(i))return{a:r,b:n};if(a.isText&&a.text!=i.text){let c=0,d=Math.min(a.text.length,i.text.length);for(;c<d&&a.text[a.text.length-c-1]==i.text[i.text.length-c-1];)c++,r--,n--;return{a:r,b:n}}if(a.content.size||i.content.size){let c=ZN(a.content,i.content,r-1,n-1);if(c)return c}r-=l,n-=l}}class U{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,o=0,s){for(let a=0,i=0;i<r;a++){let l=this.content[a],c=i+l.nodeSize;if(c>e&&n(l,o+i,s||null,a)!==!1&&l.content.size){let d=i+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,r-d),n,o+d)}i=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,o){let s="",a=!0;return this.nodesBetween(e,r,(i,l)=>{let c=i.isText?i.text.slice(Math.max(e,l)-l,r-l):i.isLeaf?o?typeof o=="function"?o(i):o:i.type.spec.leafText?i.type.spec.leafText(i):"":"";i.isBlock&&(i.isLeaf&&c||i.isTextblock)&&n&&(a?a=!1:s+=n),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,o=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(o[o.length-1]=r.withText(r.text+n.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new U(o,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],o=0;if(r>e)for(let s=0,a=0;a<r;s++){let i=this.content[s],l=a+i.nodeSize;l>e&&((a<e||l>r)&&(i.isText?i=i.cut(Math.max(0,e-a),Math.min(i.text.length,r-a)):i=i.cut(Math.max(0,e-a-1),Math.min(i.content.size,r-a-1))),n.push(i),o+=i.nodeSize),a=l}return new U(n,o)}cutByIndex(e,r){return e==r?U.empty:e==0&&r==this.content.length?this:new U(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let o=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return o[e]=r,new U(o,s)}addToStart(e){return new U([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new U(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let o=this.content[r];e(o,n,r),n+=o.nodeSize}}findDiffStart(e,r=0){return XN(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return ZN(this,e,r,n)}findIndex(e){if(e==0)return Xa(0,e);if(e==this.size)return Xa(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let o=this.child(r),s=n+o.nodeSize;if(s>=e)return s==e?Xa(r+1,s):Xa(r,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return U.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new U(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return U.empty;let r,n=0;for(let o=0;o<e.length;o++){let s=e[o];n+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(r||(r=e.slice(0,o)),r[r.length-1]=s.withText(r[r.length-1].text+s.text)):r&&r.push(s)}return new U(r||e,n)}static from(e){if(!e)return U.empty;if(e instanceof U)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new U([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}U.empty=new U([],0);const hd={index:0,offset:0};function Xa(t,e){return hd.index=t,hd.offset=e,hd}function zi(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!zi(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!zi(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let Me=class yu{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))r||(r=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!n&&s.type.rank>this.type.rank&&(r||(r=e.slice(0,o)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&zi(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let o=n.create(r.attrs);return n.checkAttrs(o.attrs),o}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return yu.none;if(e instanceof yu)return[e];let r=e.slice();return r.sort((n,o)=>n.type.rank-o.type.rank),r}};Me.none=[];class Bi extends Error{}class re{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=eC(this.content,e+this.openStart,r);return n&&new re(n,this.openStart,this.openEnd)}removeBetween(e,r){return new re(QN(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return re.empty;let n=r.openStart||0,o=r.openEnd||0;if(typeof n!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(U.fromJSON(e,r.content),n,o)}static maxOpen(e,r=!0){let n=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)o++;return new re(e,n,o)}}re.empty=new re(U.empty,0,0);function QN(t,e,r){let{index:n,offset:o}=t.findIndex(e),s=t.maybeChild(n),{index:a,offset:i}=t.findIndex(r);if(o==e||s.isText){if(i!=r&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(n,s.copy(QN(s.content,e-o-1,r-o-1)))}function eC(t,e,r,n){let{index:o,offset:s}=t.findIndex(e),a=t.maybeChild(o);if(s==e||a.isText)return n&&!n.canReplace(o,o,r)?null:t.cut(0,e).append(r).append(t.cut(e));let i=eC(a.content,e-s-1,r,a);return i&&t.replaceChild(o,a.copy(i))}function wV(t,e,r){if(r.openStart>t.depth)throw new Bi("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new Bi("Inconsistent open depths");return tC(t,e,r,0)}function tC(t,e,r,n){let o=t.index(n),s=t.node(n);if(o==e.index(n)&&n<t.depth-r.openStart){let a=tC(t,e,r,n+1);return s.copy(s.content.replaceChild(o,a))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let a=t.parent,i=a.content;return $n(a,i.cut(0,t.parentOffset).append(r.content).append(i.cut(e.parentOffset)))}else{let{start:a,end:i}=kV(r,t);return $n(s,nC(t,a,i,e,n))}else return $n(s,$i(t,e,n))}function rC(t,e){if(!e.type.compatibleContent(t.type))throw new Bi("Cannot join "+e.type.name+" onto "+t.type.name)}function bu(t,e,r){let n=t.node(r);return rC(n,e.node(r)),n}function Bn(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Os(t,e,r,n){let o=(e||t).node(r),s=0,a=e?e.index(r):o.childCount;t&&(s=t.index(r),t.depth>r?s++:t.textOffset&&(Bn(t.nodeAfter,n),s++));for(let i=s;i<a;i++)Bn(o.child(i),n);e&&e.depth==r&&e.textOffset&&Bn(e.nodeBefore,n)}function $n(t,e){return t.type.checkContent(e),t.copy(e)}function nC(t,e,r,n,o){let s=t.depth>o&&bu(t,e,o+1),a=n.depth>o&&bu(r,n,o+1),i=[];return Os(null,t,o,i),s&&a&&e.index(o)==r.index(o)?(rC(s,a),Bn($n(s,nC(t,e,r,n,o+1)),i)):(s&&Bn($n(s,$i(t,e,o+1)),i),Os(e,r,o,i),a&&Bn($n(a,$i(r,n,o+1)),i)),Os(n,null,o,i),new U(i)}function $i(t,e,r){let n=[];if(Os(null,t,r,n),t.depth>r){let o=bu(t,e,r+1);Bn($n(o,$i(t,e,r+1)),n)}return Os(e,null,r,n),new U(n)}function kV(t,e){let r=e.depth-t.openStart,n=e.node(r).copy(t.content);for(let o=r-1;o>=0;o--)n=e.node(o).copy(U.from(n));return{start:n.resolveNoCache(t.openStart+r),end:n.resolveNoCache(n.content.size-t.openEnd-r)}}class Xs{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],o=e.child(r);return n?e.child(r).cut(n):o}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],o=r==0?0:this.path[r*3-1]+1;for(let s=0;s<e;s++)o+=n.child(s).nodeSize;return o}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return Me.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),o=e.maybeChild(r);if(!n){let i=n;n=o,o=i}let s=n.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!o||!s[a].isInSet(o.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(e){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<n.length;s++)n[s].type.spec.inclusive===!1&&(!o||!n[s].isInSet(o.marks))&&(n=n[s--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new Hi(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],o=0,s=r;for(let a=e;;){let{index:i,offset:l}=a.content.findIndex(s),c=s-l;if(n.push(a,i,o+l),!c||(a=a.child(i),a.isText))break;s=c-1,o+=l+1}return new Xs(r,n,s)}static resolveCached(e,r){let n=Km.get(e);if(n)for(let s=0;s<n.elts.length;s++){let a=n.elts[s];if(a.pos==r)return a}else Km.set(e,n=new NV);let o=n.elts[n.i]=Xs.resolve(e,r);return n.i=(n.i+1)%CV,o}}class NV{constructor(){this.elts=[],this.i=0}}const CV=12,Km=new WeakMap;class Hi{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const SV=Object.create(null);let dn=class xu{constructor(e,r,n,o=Me.none){this.type=e,this.attrs=r,this.marks=o,this.content=n||U.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,r,n,o=0){this.content.nodesBetween(e,r,n,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,r,n,o){return this.content.textBetween(e,r,n,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,r,n){return this.type==e&&zi(this.attrs,r||e.defaultAttrs||SV)&&Me.sameSet(this.marks,n||Me.none)}copy(e=null){return e==this.content?this:new xu(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new xu(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return re.empty;let o=this.resolve(e),s=this.resolve(r),a=n?0:o.sharedDepth(r),i=o.start(a),l=o.node(a).content.cut(o.pos-i,s.pos-i);return new re(l,o.depth-a,s.depth-a)}replace(e,r,n){return wV(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:o}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(o==e||r.isText)return r;e-=o+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let o=this.content.child(r-1);return{node:o,index:r-1,offset:n-o.nodeSize}}resolve(e){return Xs.resolveCached(this,e)}resolveNoCache(e){return Xs.resolve(this,e)}rangeHasMark(e,r,n){let o=!1;return r>e&&this.nodesBetween(e,r,s=>(n.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),oC(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=U.empty,o=0,s=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,o,s),i=a&&a.matchFragment(this.content,r);if(!i||!i.validEnd)return!1;for(let l=o;l<s;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,r,n,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(n),a=s&&s.matchFragment(this.content,r);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Me.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Me.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let o=U.fromJSON(e,r.content),s=e.nodeType(r.type).create(r.attrs,o,n);return s.type.checkAttrs(s.attrs),s}};dn.prototype.text=void 0;class Vi extends dn{constructor(e,r,n,o){if(super(e,r,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):oC(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Vi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Vi(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function oC(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class Zn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new MV(e,r);if(n.next==null)return Zn.empty;let o=sC(n);n.next&&n.err("Unexpected trailing text");let s=DV(OV(o));return IV(s,n),s}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let o=this;for(let s=r;o&&s<n;s++)o=o.matchType(e.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let o=[this];function s(a,i){let l=a.matchFragment(e,n);if(l&&(!r||l.validEnd))return U.from(i.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:f}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=s(f,i.concat(d));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let o=n.shift(),s=o.match;if(s.matchType(e)){let a=[];for(let i=o;i.type;i=i.via)a.push(i.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:i,next:l}=s.next[a];!i.isLeaf&&!i.hasRequiredAttrs()&&!(i.name in r)&&(!o.type||l.validEnd)&&(n.push({match:i.contentMatch,type:i,via:o}),r[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let o=0;o<n.next.length;o++)e.indexOf(n.next[o].next)==-1&&r(n.next[o].next)}return r(this),e.map((n,o)=>{let s=o+(n.validEnd?"*":" ")+" ";for(let a=0;a<n.next.length;a++)s+=(a?", ":"")+n.next[a].type.name+"->"+e.indexOf(n.next[a].next);return s}).join(`
432
+ `)}}Zn.empty=new Zn(!0);class MV{constructor(e,r){this.string=e,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function sC(t){let e=[];do e.push(EV(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function EV(t){let e=[];do e.push(jV(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function jV(t){let e=AV(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=RV(t,e);else break;return e}function Ym(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function RV(t,e){let r=Ym(t),n=r;return t.eat(",")&&(t.next!="}"?n=Ym(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function TV(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let o=[];for(let s in r){let a=r[s];a.isInGroup(e)&&o.push(a)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function AV(t){if(t.eat("(")){let e=sC(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=TV(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function OV(t){let e=[[]];return o(s(t,0),r()),e;function r(){return e.push([])-1}function n(a,i,l){let c={term:l,to:i};return e[a].push(c),c}function o(a,i){a.forEach(l=>l.to=i)}function s(a,i){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(s(c,i)),[]);if(a.type=="seq")for(let l=0;;l++){let c=s(a.exprs[l],i);if(l==a.exprs.length-1)return c;o(c,i=r())}else if(a.type=="star"){let l=r();return n(i,l),o(s(a.expr,l),l),[n(l)]}else if(a.type=="plus"){let l=r();return o(s(a.expr,i),l),o(s(a.expr,l),l),[n(l)]}else{if(a.type=="opt")return[n(i)].concat(s(a.expr,i));if(a.type=="range"){let l=i;for(let c=0;c<a.min;c++){let d=r();o(s(a.expr,l),d),l=d}if(a.max==-1)o(s(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let d=r();n(l,d),o(s(a.expr,l),d),l=d}return[n(l)]}else{if(a.type=="name")return[n(i,void 0,a.value)];throw new Error("Unknown expr type")}}}}function aC(t,e){return e-t}function Jm(t,e){let r=[];return n(e),r.sort(aC);function n(o){let s=t[o];if(s.length==1&&!s[0].term)return n(s[0].to);r.push(o);for(let a=0;a<s.length;a++){let{term:i,to:l}=s[a];!i&&r.indexOf(l)==-1&&n(l)}}}function DV(t){let e=Object.create(null);return r(Jm(t,0));function r(n){let o=[];n.forEach(a=>{t[a].forEach(({term:i,to:l})=>{if(!i)return;let c;for(let d=0;d<o.length;d++)o[d][0]==i&&(c=o[d][1]);Jm(t,l).forEach(d=>{c||o.push([i,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=e[n.join(",")]=new Zn(n.indexOf(t.length-1)>-1);for(let a=0;a<o.length;a++){let i=o[a][1].sort(aC);s.next.push({type:o[a][0],next:e[i.join(",")]||r(i)})}return s}}function IV(t,e){for(let r=0,n=[t];r<n.length;r++){let o=n[r],s=!o.validEnd,a=[];for(let i=0;i<o.next.length;i++){let{type:l,next:c}=o.next[i];a.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),n.indexOf(c)==-1&&n.push(c)}s&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function iC(t){let e=Object.create(null);for(let r in t){let n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function lC(t,e){let r=Object.create(null);for(let n in t){let o=e&&e[n];if(o===void 0){let s=t[n];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+n)}r[n]=o}return r}function cC(t,e,r,n){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${r} of type ${o}`);for(let o in t){let s=t[o];s.validate&&s.validate(e[o])}}function dC(t,e){let r=Object.create(null);if(e)for(let n in e)r[n]=new LV(t,n,e[n]);return r}let Xm=class uC{constructor(e,r,n){this.name=e,this.schema=r,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=dC(e,n.attrs),this.defaultAttrs=iC(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Zn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:lC(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new dn(this,this.computeAttrs(e),U.from(r),Me.setFrom(n))}createChecked(e=null,r,n){return r=U.from(r),this.checkContent(r),new dn(this,this.computeAttrs(e),r,Me.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=U.from(r),r.size){let a=this.contentMatch.fillBefore(r);if(!a)return null;r=a.append(r)}let o=this.contentMatch.matchFragment(r),s=o&&o.fillBefore(U.empty,!0);return s?new dn(this,e,r.append(s),Me.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){cC(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let r;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?r&&r.push(e[n]):r||(r=e.slice(0,n));return r?r.length?r:Me.none:e}static compile(e,r){let n=Object.create(null);e.forEach((s,a)=>n[s]=new uC(s,r,a));let o=r.spec.topNode||"doc";if(!n[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function PV(t,e,r){let n=r.split("|");return o=>{let s=o===null?"null":typeof o;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${s}`)}}class LV{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?PV(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class pc{constructor(e,r,n,o){this.name=e,this.rank=r,this.schema=n,this.spec=o,this.attrs=dC(e,o.attrs),this.excluded=null;let s=iC(this.attrs);this.instance=s?new Me(this,s):null}create(e=null){return!e&&this.instance?this.instance:new Me(this,lC(this.attrs,e))}static compile(e,r){let n=Object.create(null),o=0;return e.forEach((s,a)=>n[s]=new pc(s,o++,r,a)),n}removeFromSet(e){for(var r=0;r<e.length;r++)e[r].type==this&&(e=e.slice(0,r).concat(e.slice(r+1)),r--);return e}isInSet(e){for(let r=0;r<e.length;r++)if(e[r].type==this)return e[r]}checkAttrs(e){cC(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class fC{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let o in e)r[o]=e[o];r.nodes=rt.from(e.nodes),r.marks=rt.from(e.marks||{}),this.nodes=Xm.compile(this.spec.nodes,this),this.marks=pc.compile(this.spec.marks,this);let n=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],a=s.spec.content||"",i=s.spec.marks;if(s.contentMatch=n[a]||(n[a]=Zn.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=i=="_"?null:i?Zm(this,i.split(" ")):i==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:Zm(this,a.split(" "))}this.nodeFromJSON=o=>dn.fromJSON(this,o),this.markFromJSON=o=>Me.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Xm){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,o)}text(e,r){let n=this.nodes.text;return new Vi(n,n.defaultAttrs,e,Me.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function Zm(t,e){let r=[];for(let n=0;n<e.length;n++){let o=e[n],s=t.marks[o],a=s;if(s)r.push(s);else for(let i in t.marks){let l=t.marks[i];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&r.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function FV(t){return t.tag!=null}function _V(t){return t.style!=null}class un{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(o=>{if(FV(o))this.tags.push(o);else if(_V(o)){let s=/[^=]*/.exec(o.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,r={}){let n=new eg(this,r,!1);return n.addAll(e,Me.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new eg(this,r,!0);return n.addAll(e,Me.none,r.from,r.to),re.maxOpen(n.finish())}matchTag(e,r,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){let s=this.tags[o];if($V(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||r.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(e);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(e,r,n,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let a=this.styles[s],i=a.style;if(!(i.indexOf(e)!=0||a.context&&!n.matchesContext(a.context)||i.length>e.length&&(i.charCodeAt(e.length)!=61||i.slice(e.length+1)!=r))){if(a.getAttrs){let l=a.getAttrs(r);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(e){let r=[];function n(o){let s=o.priority==null?50:o.priority,a=0;for(;a<r.length;a++){let i=r[a];if((i.priority==null?50:i.priority)<s)break}r.splice(a,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(a=>{n(a=tg(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(a=>{n(a=tg(a)),a.node||a.ignore||a.mark||(a.node=o)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new un(e,un.schemaRules(e)))}}const pC={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},zV={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hC={ol:!0,ul:!0},Zs=1,wu=2,Ds=4;function Qm(t,e,r){return e!=null?(e?Zs:0)|(e==="full"?wu:0):t&&t.whitespace=="pre"?Zs|wu:r&~Ds}class Za{constructor(e,r,n,o,s,a){this.type=e,this.attrs=r,this.marks=n,this.solid=o,this.options=a,this.content=[],this.activeMarks=Me.none,this.match=s||(a&Ds?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(U.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,o;return(o=n.findWrapping(e.type))?(this.match=n,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Zs)){let n=this.content[this.content.length-1],o;if(n&&n.isText&&(o=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let r=U.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(U.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!pC.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class eg{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let o=r.topNode,s,a=Qm(null,r.preserveWhitespace,0)|(n?Ds:0);o?s=new Za(o.type,o.attrs,Me.none,!0,r.topMatch||o.type.contentMatch,a):n?s=new Za(null,null,Me.none,!0,null,a):s=new Za(e.schema.topNodeType,null,Me.none,!0,null,a),this.nodes=[s],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,o=this.top,s=o.options&wu?"full":this.localPreserveWS||(o.options&Zs)>0,{schema:a}=this.parser;if(s==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)if(s==="full")n=n.replace(/\r\n?/g,`
433
+ `);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let i=n.split(/\r?\n|\r/);for(let l=0;l<i.length;l++)l&&this.insertNode(a.linebreakReplacement.create(),r,!0),i[l]&&this.insertNode(a.text(i[l]),r,!/\S/.test(i[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=o.content[o.content.length-1],l=e.previousSibling;(!i||l&&l.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(a.text(n),r,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,r,n){let o=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),i;hC.hasOwnProperty(a)&&this.parser.normalizeLists&&BV(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,n));e:if(l?l.ignore:zV.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,r);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(pC.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,r);break e}let f=l&&l.skip?r:this.readStyles(e,r);f&&this.addAll(e,f),c&&this.sync(s),this.needsBlock=d}else{let c=this.readStyles(e,r);c&&this.addElementByRule(e,l,c,l.consuming===!1?i:void 0)}this.localPreserveWS=o}leafFallback(e,r){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
434
+ `),r)}ignoreFallback(e,r){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r,!0)}readStyles(e,r){let n=e.style;if(n&&n.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],a=n.getPropertyValue(s);if(a)for(let i=void 0;;){let l=this.parser.matchStyle(s,a,this,i);if(!l)break;if(l.ignore)return null;if(l.clearMark?r=r.filter(c=>!l.clearMark(c)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)i=l;else break}}return r}addElementByRule(e,r,n,o){let s,a;if(r.node)if(a=this.parser.schema.nodes[r.node],a.isLeaf)this.insertNode(a.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(a,r.attrs||null,n,r.preserveWhitespace);l&&(s=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let i=this.top;if(a&&a.isLeaf)this.findInside(e);else if(o)this.addElement(e,n,o);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof r.contentElement=="string"?l=e.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(e):r.contentElement&&(l=r.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}s&&this.sync(i)&&this.open--}addAll(e,r,n,o){let s=n||0;for(let a=n?e.childNodes[n]:e.firstChild,i=o==null?null:e.childNodes[o];a!=i;a=a.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(a,r);this.findAtPoint(e,s)}findPlace(e,r,n){let o,s;for(let a=this.open,i=0;a>=0;a--){let l=this.nodes[a],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+i)&&(o=c,s=l,!c.length))break;if(l.solid){if(n)break;i+=2}}if(!o)return null;this.sync(s);for(let a=0;a<o.length;a++)r=this.enterInner(o[a],null,r,!1);return r}insertNode(e,r,n){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(r=this.enterInner(s,null,r))}let o=this.findPlace(e,r,n);if(o){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let a=Me.none;for(let i of o.concat(e.marks))(s.type?s.type.allowsMarkType(i.type):rg(i.type,e.type))&&(a=i.addToSet(a));return s.content.push(e.mark(a)),!0}return!1}enter(e,r,n,o){let s=this.findPlace(e.create(r),n,!1);return s&&(s=this.enterInner(e,r,n,!0,o)),s}enterInner(e,r,n,o=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let i=Qm(e,s,a.options);a.options&Ds&&a.content.length==0&&(i|=Ds);let l=Me.none;return n=n.filter(c=>(a.type?a.type.allowsMarkType(c.type):rg(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Za(e,r,l,o,null,i)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Zs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let o=n.length-1;o>=0;o--)e+=n[o].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(e,r,n){if(e!=r&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&r.compareDocumentPosition(this.find[o].node)&(n?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&(this.find[r].pos=this.currentPos-(e.nodeValue.length-this.find[r].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,o=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(o?0:1),a=(i,l)=>{for(;i>=0;i--){let c=r[i];if(c==""){if(i==r.length-1||i==0)continue;for(;l>=s;l--)if(a(i-1,l))return!0;return!1}else{let d=l>0||l==0&&o?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return a(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function BV(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&hC.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function $V(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function tg(t){let e={};for(let r in t)e[r]=t[r];return e}function rg(t,e){let r=e.schema.nodes;for(let n in r){let o=r[n];if(!o.allowsMarkType(t))continue;let s=[],a=i=>{s.push(i);for(let l=0;l<i.edgeCount;l++){let{type:c,next:d}=i.edge(l);if(c==e||s.indexOf(d)<0&&a(d))return!0}};if(a(o.contentMatch))return!0}}class ao{constructor(e,r){this.nodes=e,this.marks=r}serializeFragment(e,r={},n){n||(n=md(r).createDocumentFragment());let o=n,s=[];return e.forEach(a=>{if(s.length||a.marks.length){let i=0,l=0;for(;i<s.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[i][0])||c.type.spec.spanning===!1)break;i++,l++}for(;i<s.length;)o=s.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],d=this.serializeMark(c,a.isInline,r);d&&(s.push([c,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(a,r))}),n}serializeNodeInner(e,r){let{dom:n,contentDOM:o}=gi(md(r),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,r,o)}return n}serializeNode(e,r={}){let n=this.serializeNodeInner(e,r);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,r,n={}){let o=this.marks[e.type.name];return o&&gi(md(n),o(e,r),null,e.attrs)}static renderSpec(e,r,n=null,o){return gi(e,r,n,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ao(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=ng(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return ng(e.marks)}}function ng(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function md(t){return t.document||window.document}const og=new WeakMap;function HV(t){let e=og.get(t);return e===void 0&&og.set(t,e=VV(t)),e}function VV(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let o=0;o<n.length;o++)r(n[o]);else for(let o in n)r(n[o])}return r(t),e}function gi(t,e,r,n){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],s;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(s=HV(n))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(r=o.slice(0,a),o=o.slice(a+1));let i,l=r?t.createElementNS(r,o):t.createElement(o),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?l.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):f=="style"&&l.style?l.style.cssText=c[f]:l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:v}=gi(t,h,r,n);if(l.appendChild(m),v){if(i)throw new RangeError("Multiple content holes");i=v}}}return{dom:l,contentDOM:i}}const mC=65535,gC=Math.pow(2,16);function WV(t,e){return t+e*gC}function sg(t){return t&mC}function UV(t){return(t-(t&mC))/gC}const vC=1,yC=2,vi=4,bC=8;class ku{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&bC)>0}get deletedBefore(){return(this.delInfo&(vC|vi))>0}get deletedAfter(){return(this.delInfo&(yC|vi))>0}get deletedAcross(){return(this.delInfo&vi)>0}}class At{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&At.empty)return At.empty}recover(e){let r=0,n=sg(e);if(!this.inverted)for(let o=0;o<n;o++)r+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[n*3]+r+UV(e)}mapResult(e,r=1){return this._map(e,r,!1)}map(e,r=1){return this._map(e,r,!0)}_map(e,r,n){let o=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[i+s],d=this.ranges[i+a],f=l+c;if(e<=f){let h=c?e==l?-1:e==f?1:r:r,m=l+o+(h<0?0:d);if(n)return m;let v=e==(r<0?l:f)?null:WV(i/3,e-l),g=e==l?yC:e==f?vC:vi;return(r<0?e!=l:e!=f)&&(g|=bC),new ku(m,g,v)}o+=d-c}return n?e+o:new ku(e+o,0,null)}touches(e,r){let n=0,o=sg(r),s=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?n:0);if(l>e)break;let c=this.ranges[i+s],d=l+c;if(e<=d&&i==o*3)return!0;n+=this.ranges[i+a]-c}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let a=this.ranges[o],i=a-(this.inverted?s:0),l=a+(this.inverted?0:s),c=this.ranges[o+r],d=this.ranges[o+n];e(i,i+c,l,l+d),s+=d-c}}invert(){return new At(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?At.empty:new At(e<0?[0,-e,0]:[0,0,e])}}At.empty=new At([]);class Qs{constructor(e,r,n=0,o=e?e.length:0){this.mirror=r,this.from=n,this.to=o,this._maps=e||[],this.ownData=!(e||r)}get maps(){return this._maps}slice(e=0,r=this.maps.length){return new Qs(this._maps,this.mirror,e,r)}appendMap(e,r){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),r!=null&&this.setMirror(this._maps.length-1,r)}appendMapping(e){for(let r=0,n=this._maps.length;r<e._maps.length;r++){let o=e.getMirror(r);this.appendMap(e._maps[r],o!=null&&o<r?n+o:void 0)}}getMirror(e){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==e)return this.mirror[r+(r%2?-1:1)]}}setMirror(e,r){this.mirror||(this.mirror=[]),this.mirror.push(e,r)}appendMappingInverted(e){for(let r=e.maps.length-1,n=this._maps.length+e._maps.length;r>=0;r--){let o=e.getMirror(r);this.appendMap(e._maps[r].invert(),o!=null&&o>r?n-o-1:void 0)}}invert(){let e=new Qs;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,r);return e}mapResult(e,r=1){return this._map(e,r,!1)}_map(e,r,n){let o=0;for(let s=this.from;s<this.to;s++){let a=this._maps[s],i=a.mapResult(e,r);if(i.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(i.recover);continue}}o|=i.delInfo,e=i.pos}return n?e:new ku(e,o,null)}}const gd=Object.create(null);class ct{getMap(){return At.empty}merge(e){return null}static fromJSON(e,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=gd[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in gd)throw new RangeError("Duplicate use of step JSON ID "+e);return gd[e]=r,r.prototype.jsonID=e,r}}class He{constructor(e,r){this.doc=e,this.failed=r}static ok(e){return new He(e,null)}static fail(e){return new He(null,e)}static fromReplace(e,r,n,o){try{return He.ok(e.replace(r,n,o))}catch(s){if(s instanceof Bi)return He.fail(s.message);throw s}}}function Rp(t,e,r){let n=[];for(let o=0;o<t.childCount;o++){let s=t.child(o);s.content.size&&(s=s.copy(Rp(s.content,e,s))),s.isInline&&(s=e(s,r,o)),n.push(s)}return U.fromArray(n)}class sn extends ct{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),s=new re(Rp(r.content,(a,i)=>!a.isAtom||!i.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),r.openStart,r.openEnd);return He.fromReplace(e,this.from,this.to,s)}invert(){return new Zt(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new sn(r.pos,n.pos,this.mark)}merge(e){return e instanceof sn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new sn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new sn(r.from,r.to,e.markFromJSON(r.mark))}}ct.jsonID("addMark",sn);class Zt extends ct{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new re(Rp(r.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),r.openStart,r.openEnd);return He.fromReplace(e,this.from,this.to,n)}invert(){return new sn(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Zt(r.pos,n.pos,this.mark)}merge(e){return e instanceof Zt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Zt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Zt(r.from,r.to,e.markFromJSON(r.mark))}}ct.jsonID("removeMark",Zt);class an extends ct{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return He.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return He.fromReplace(e,this.pos,this.pos+1,new re(U.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let o=0;o<r.marks.length;o++)if(!r.marks[o].isInSet(n))return new an(this.pos,r.marks[o]);return new an(this.pos,this.mark)}}return new Qn(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new an(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new an(r.pos,e.markFromJSON(r.mark))}}ct.jsonID("addNodeMark",an);class Qn extends ct{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return He.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return He.fromReplace(e,this.pos,this.pos+1,new re(U.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new an(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Qn(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qn(r.pos,e.markFromJSON(r.mark))}}ct.jsonID("removeNodeMark",Qn);class Xe extends ct{constructor(e,r,n,o=!1){super(),this.from=e,this.to=r,this.slice=n,this.structure=o}apply(e){return this.structure&&Nu(e,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new At([this.from,this.to-this.from,this.slice.size])}invert(e){return new Xe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new Xe(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Xe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let r=this.slice.size+e.slice.size==0?re.empty:new re(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Xe(this.from,this.to+(e.to-e.from),r,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let r=this.slice.size+e.slice.size==0?re.empty:new re(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Xe(e.from,this.to,r,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Xe(r.from,r.to,re.fromJSON(e,r.slice),!!r.structure)}}ct.jsonID("replace",Xe);class Ze extends ct{constructor(e,r,n,o,s,a,i=!1){super(),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=o,this.slice=s,this.insert=a,this.structure=i}apply(e){if(this.structure&&(Nu(e,this.from,this.gapFrom)||Nu(e,this.gapTo,this.to)))return He.fail("Structure gap-replace would overwrite content");let r=e.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return He.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?He.fromReplace(e,this.from,this.to,n):He.fail("Content does not fit in gap")}getMap(){return new At([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let r=this.gapTo-this.gapFrom;return new Ze(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),o=this.from==this.gapFrom?r.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||o<r.pos||s>n.pos?null:new Ze(r.pos,n.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ze(r.from,r.to,r.gapFrom,r.gapTo,re.fromJSON(e,r.slice),r.insert,!!r.structure)}}ct.jsonID("replaceAround",Ze);function Nu(t,e,r){let n=t.resolve(e),o=r-e,s=n.depth;for(;o>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,o--;if(o>0){let a=n.node(s).maybeChild(n.indexAfter(s));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function GV(t,e,r,n){let o=[],s=[],a,i;t.doc.nodesBetween(e,r,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!n.isInSet(f)&&d.type.allowsMarkType(n.type)){let h=Math.max(c,e),m=Math.min(c+l.nodeSize,r),v=n.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(v)||(a&&a.to==h&&a.mark.eq(f[g])?a.to=m:o.push(a=new Zt(h,m,f[g])));i&&i.to==h?i.to=m:s.push(i=new sn(h,m,n))}}),o.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function qV(t,e,r,n){let o=[],s=0;t.doc.nodesBetween(e,r,(a,i)=>{if(!a.isInline)return;s++;let l=null;if(n instanceof pc){let c=a.marks,d;for(;d=n.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else n?n.isInSet(a.marks)&&(l=[n]):l=a.marks;if(l&&l.length){let c=Math.min(i+a.nodeSize,r);for(let d=0;d<l.length;d++){let f=l[d],h;for(let m=0;m<o.length;m++){let v=o[m];v.step==s-1&&f.eq(o[m].style)&&(h=v)}h?(h.to=c,h.step=s):o.push({style:f,from:Math.max(i,e),to:c,step:s})}}}),o.forEach(a=>t.step(new Zt(a.from,a.to,a.style)))}function Tp(t,e,r,n=r.contentMatch,o=!0){let s=t.doc.nodeAt(e),a=[],i=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),d=i+c.nodeSize,f=n.matchType(c.type);if(!f)a.push(new Xe(i,d,re.empty));else{n=f;for(let h=0;h<c.marks.length;h++)r.allowsMarkType(c.marks[h].type)||t.step(new Zt(i,d,c.marks[h]));if(o&&c.isText&&r.whitespace!="pre"){let h,m=/\r?\n|\r/g,v;for(;h=m.exec(c.text);)v||(v=new re(U.from(r.schema.text(" ",r.allowedMarks(c.marks))),0,0)),a.push(new Xe(i+h.index,i+h.index+h[0].length,v))}}i=d}if(!n.validEnd){let l=n.fillBefore(U.empty,!0);t.replace(i,i,new re(l,0,0))}for(let l=a.length-1;l>=0;l--)t.step(a[l])}function KV(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function is(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,n=0,o=0;;--r){let s=t.$from.node(r),a=t.$from.index(r)+n,i=t.$to.indexAfter(r)-o;if(r<t.depth&&s.canReplace(a,i,e))return r;if(r==0||s.type.spec.isolating||!KV(s,a,i))break;a&&(n=1),i<s.childCount&&(o=1)}return null}function YV(t,e,r){let{$from:n,$to:o,depth:s}=e,a=n.before(s+1),i=o.after(s+1),l=a,c=i,d=U.empty,f=0;for(let v=s,g=!1;v>r;v--)g||n.index(v)>0?(g=!0,d=U.from(n.node(v).copy(d)),f++):l--;let h=U.empty,m=0;for(let v=s,g=!1;v>r;v--)g||o.after(v+1)<o.end(v)?(g=!0,h=U.from(o.node(v).copy(h)),m++):c++;t.step(new Ze(l,c,a,i,new re(d.append(h),f,m),d.size-f,!0))}function Ap(t,e,r=null,n=t){let o=JV(t,e),s=o&&XV(n,e);return s?o.map(ag).concat({type:e,attrs:r}).concat(s.map(ag)):null}function ag(t){return{type:t,attrs:null}}function JV(t,e){let{parent:r,startIndex:n,endIndex:o}=t,s=r.contentMatchAt(n).findWrapping(e);if(!s)return null;let a=s.length?s[0]:e;return r.canReplaceWith(n,o,a)?s:null}function XV(t,e){let{parent:r,startIndex:n,endIndex:o}=t,s=r.child(n),a=e.contentMatch.findWrapping(s.type);if(!a)return null;let i=(a.length?a[a.length-1]:e).contentMatch;for(let l=n;i&&l<o;l++)i=i.matchType(r.child(l).type);return!i||!i.validEnd?null:a}function ZV(t,e,r){let n=U.empty;for(let a=r.length-1;a>=0;a--){if(n.size){let i=r[a].type.contentMatch.matchFragment(n);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=U.from(r[a].type.create(r[a].attrs,n))}let o=e.start,s=e.end;t.step(new Ze(o,s,o,s,new re(n,0,0),r.length,!0))}function QV(t,e,r,n,o){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,r,(a,i)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(n,l)&&e6(t.doc,t.mapping.slice(s).map(i),n)){let c=null;if(n.schema.linebreakReplacement){let m=n.whitespace=="pre",v=!!n.contentMatch.matchType(n.schema.linebreakReplacement);m&&!v?c=!1:!m&&v&&(c=!0)}c===!1&&wC(t,a,i,s),Tp(t,t.mapping.slice(s).map(i,1),n,void 0,c===null);let d=t.mapping.slice(s),f=d.map(i,1),h=d.map(i+a.nodeSize,1);return t.step(new Ze(f,h,f+1,h-1,new re(U.from(n.create(l,null,a.marks)),0,0),1,!0)),c===!0&&xC(t,a,i,s),!1}})}function xC(t,e,r,n){e.forEach((o,s)=>{if(o.isText){let a,i=/\r?\n|\r/g;for(;a=i.exec(o.text);){let l=t.mapping.slice(n).map(r+1+s+a.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function wC(t,e,r,n){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let a=t.mapping.slice(n).map(r+1+s);t.replaceWith(a,a+1,e.type.schema.text(`
435
+ `))}})}function e6(t,e,r){let n=t.resolve(e),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}function t6(t,e,r,n,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let a=r.create(n,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new Ze(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new re(U.from(a),0,0),1,!0))}function Br(t,e,r=1,n){let o=t.resolve(e),s=o.depth-r,a=n&&n[n.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=r-2;c>s;c--,d--){let f=o.node(c),h=o.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(h,f.childCount),v=n&&n[d+1];v&&(m=m.replaceChild(0,v.type.create(v.attrs)));let g=n&&n[d]||f;if(!f.canReplace(h+1,f.childCount)||!g.type.validContent(m))return!1}let i=o.indexAfter(s),l=n&&n[0];return o.node(s).canReplaceWith(i,i,l?l.type:o.node(s+1).type)}function r6(t,e,r=1,n){let o=t.doc.resolve(e),s=U.empty,a=U.empty;for(let i=o.depth,l=o.depth-r,c=r-1;i>l;i--,c--){s=U.from(o.node(i).copy(s));let d=n&&n[c];a=U.from(d?d.type.create(d.attrs,a):o.node(i).copy(a))}t.step(new Xe(e,e,new re(s.append(a),r,r),!0))}function Mn(t,e){let r=t.resolve(e),n=r.index();return kC(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function n6(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let o=0;o<e.childCount;o++){let s=e.child(o),a=s.type==n?t.type.schema.nodes.text:s.type;if(r=r.matchType(a),!r||!t.type.allowsMarks(s.marks))return!1}return r.validEnd}function kC(t,e){return!!(t&&e&&!t.isLeaf&&n6(t,e))}function hc(t,e,r=-1){let n=t.resolve(e);for(let o=n.depth;;o--){let s,a,i=n.index(o);if(o==n.depth?(s=n.nodeBefore,a=n.nodeAfter):r>0?(s=n.node(o+1),i++,a=n.node(o).maybeChild(i)):(s=n.node(o).maybeChild(i-1),a=n.node(o+1)),s&&!s.isTextblock&&kC(s,a)&&n.node(o).canReplace(i,i+1))return e;if(o==0)break;e=r<0?n.before(o):n.after(o)}}function o6(t,e,r){let n=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-r),a=s.node().type;if(o&&a.inlineContent){let d=a.whitespace=="pre",f=!!a.contentMatch.matchType(o);d&&!f?n=!1:!d&&f&&(n=!0)}let i=t.steps.length;if(n===!1){let d=t.doc.resolve(e+r);wC(t,d.node(),d.before(),i)}a.inlineContent&&Tp(t,e+r-1,a,s.node().contentMatchAt(s.index()),n==null);let l=t.mapping.slice(i),c=l.map(e-r);if(t.step(new Xe(c,l.map(e+r,-1),re.empty,!0)),n===!0){let d=t.doc.resolve(c);xC(t,d.node(),d.before(),t.steps.length)}return t}function s6(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let o=n.depth-1;o>=0;o--){let s=n.index(o);if(n.node(o).canReplaceWith(s,s,r))return n.before(o+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let o=n.depth-1;o>=0;o--){let s=n.indexAfter(o);if(n.node(o).canReplaceWith(s,s,r))return n.after(o+1);if(s<n.node(o).childCount)return null}return null}function NC(t,e,r){let n=t.resolve(e);if(!r.content.size)return e;let o=r.content;for(let s=0;s<r.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(r.openStart==0&&r.size?2:1);s++)for(let a=n.depth;a>=0;a--){let i=a==n.depth?0:n.pos<=(n.start(a+1)+n.end(a+1))/2?-1:1,l=n.index(a)+(i>0?1:0),c=n.node(a),d=!1;if(s==1)d=c.canReplace(l,l,o);else{let f=c.contentMatchAt(l).findWrapping(o.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return i==0?n.pos:i<0?n.before(a+1):n.after(a+1)}return null}function mc(t,e,r=e,n=re.empty){if(e==r&&!n.size)return null;let o=t.resolve(e),s=t.resolve(r);return CC(o,s,n)?new Xe(e,r,n):new a6(o,s,n).fit()}function CC(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class a6{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=U.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=U.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;let s=this.placed,a=n.depth,i=o.depth;for(;a&&i&&s.childCount==1;)s=s.firstChild.content,a--,i--;let l=new re(s,a,i);return e>-1?new Ze(n.pos,e,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new Xe(n.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,o=this.unplaced.openEnd;n<e;n++){let s=r.firstChild;if(r.childCount>1&&(o=0),s.type.spec.isolating&&o<=n){e=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let o,s=null;n?(s=vd(this.unplaced.content,n-1).firstChild,o=s.content):o=this.unplaced.content;let a=o.firstChild;for(let i=this.depth;i>=0;i--){let{type:l,match:c}=this.frontier[i],d,f=null;if(r==1&&(a?c.matchType(a.type)||(f=c.fillBefore(U.from(a),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:i,parent:s,inject:f};if(r==2&&a&&(d=c.findWrapping(a.type)))return{sliceDepth:n,frontierDepth:i,parent:s,wrap:d};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,o=vd(e,r);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new re(e,r+1,Math.max(n,o.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,o=vd(e,r);if(o.childCount<=1&&r>0){let s=e.size-r<=r+o.size;this.unplaced=new re(Ms(e,r-1,1),r-1,s?r-1:n)}else this.unplaced=new re(Ms(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:o,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let g=0;g<s.length;g++)this.openFrontierNode(s[g]);let a=this.unplaced,i=n?n.content:a.content,l=a.openStart-e,c=0,d=[],{match:f,type:h}=this.frontier[r];if(o){for(let g=0;g<o.childCount;g++)d.push(o.child(g));f=f.matchFragment(o)}let m=i.size+e-(a.content.size-a.openEnd);for(;c<i.childCount;){let g=i.child(c),y=f.matchType(g.type);if(!y)break;c++,(c>1||l==0||g.content.size)&&(f=y,d.push(SC(g.mark(h.allowedMarks(g.marks)),c==1?l:0,c==i.childCount?m:-1)))}let v=c==i.childCount;v||(m=-1),this.placed=Es(this.placed,r,U.from(d)),this.frontier[r].match=f,v&&m<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=i;g<m;g++){let b=y.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),y=b.content}this.unplaced=v?e==0?re.empty:new re(Ms(a.content,e-1,1),e-1,m<0?a.openEnd:e-1):new re(Ms(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],r;if(!e.type.isTextblock||!yd(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;let{depth:n}=this.$to,o=this.$to.after(n);for(;n>1&&o==this.$to.end(--n);)++o;return o}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:o}=this.frontier[r],s=r<e.depth&&e.end(r+1)==e.pos+(e.depth-(r+1)),a=yd(e,r,o,n,s);if(a){for(let i=r-1;i>=0;i--){let{match:l,type:c}=this.frontier[i],d=yd(e,i,c,l,!0);if(!d||d.childCount)continue e}return{depth:r,fit:a,move:s?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Es(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let o=e.node(n),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(n));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,r=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Es(this.placed,this.depth,U.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(U.empty,!0);e.childCount&&(this.placed=Es(this.placed,this.frontier.length,e))}}function Ms(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(Ms(t.firstChild.content,e-1,r)))}function Es(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(Es(t.lastChild.content,e-1,r)))}function vd(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function SC(t,e,r){if(e<=0)return t;let n=t.content;return e>1&&(n=n.replaceChild(0,SC(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(U.empty,!0)))),t.copy(n)}function yd(t,e,r,n,o){let s=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==s.childCount&&!r.compatibleContent(s.type))return null;let i=n.fillBefore(s.content,!0,a);return i&&!i6(r,s.content,a)?i:null}function i6(t,e,r){for(let n=r;n<e.childCount;n++)if(!t.allowsMarks(e.child(n).marks))return!0;return!1}function l6(t){return t.spec.defining||t.spec.definingForContent}function c6(t,e,r,n){if(!n.size)return t.deleteRange(e,r);let o=t.doc.resolve(e),s=t.doc.resolve(r);if(CC(o,s,n))return t.step(new Xe(e,r,n));let a=EC(o,s);a[a.length-1]==0&&a.pop();let i=-(o.depth+1);a.unshift(i);for(let h=o.depth,m=o.pos-1;h>0;h--,m--){let v=o.node(h).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;a.indexOf(h)>-1?i=h:o.before(h)==m&&a.splice(1,0,-h)}let l=a.indexOf(i),c=[],d=n.openStart;for(let h=n.content,m=0;;m++){let v=h.firstChild;if(c.push(v),m==n.openStart)break;h=v.content}for(let h=d-1;h>=0;h--){let m=c[h],v=l6(m.type);if(v&&!m.sameMarkup(o.node(Math.abs(i)-1)))d=h;else if(v||!m.type.isTextblock)break}for(let h=n.openStart;h>=0;h--){let m=(h+d+1)%(n.openStart+1),v=c[m];if(v)for(let g=0;g<a.length;g++){let y=a[(g+l)%a.length],b=!0;y<0&&(b=!1,y=-y);let x=o.node(y-1),w=o.index(y-1);if(x.canReplaceWith(w,w,v.type,v.marks))return t.replace(o.before(y),b?s.after(y):r,new re(MC(n.content,0,n.openStart,m),m,n.openEnd))}}let f=t.steps.length;for(let h=a.length-1;h>=0&&(t.replace(e,r,n),!(t.steps.length>f));h--){let m=a[h];m<0||(e=o.before(m),r=s.after(m))}}function MC(t,e,r,n,o){if(e<r){let s=t.firstChild;t=t.replaceChild(0,s.copy(MC(s.content,e+1,r,n,s)))}if(e>n){let s=o.contentMatchAt(0),a=s.fillBefore(t).append(t);t=a.append(s.matchFragment(a).fillBefore(U.empty,!0))}return t}function d6(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let o=s6(t.doc,e,n.type);o!=null&&(e=r=o)}t.replaceRange(e,r,new re(U.from(n),0,0))}function u6(t,e,r){let n=t.doc.resolve(e),o=t.doc.resolve(r),s=EC(n,o);for(let a=0;a<s.length;a++){let i=s[a],l=a==s.length-1;if(l&&i==0||n.node(i).type.contentMatch.validEnd)return t.delete(n.start(i),o.end(i));if(i>0&&(l||n.node(i-1).canReplace(n.index(i-1),o.indexAfter(i-1))))return t.delete(n.before(i),o.after(i))}for(let a=1;a<=n.depth&&a<=o.depth;a++)if(e-n.start(a)==n.depth-a&&r>n.end(a)&&o.end(a)-r!=o.depth-a&&n.start(a-1)==o.start(a-1)&&n.node(a-1).canReplace(n.index(a-1),o.index(a-1)))return t.delete(n.before(a),r);t.delete(e,r)}function EC(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let o=n;o>=0;o--){let s=t.start(o);if(s<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&r.push(o)}return r}class Do extends ct{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return He.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let o=r.type.create(n,null,r.marks);return He.fromReplace(e,this.pos,this.pos+1,new re(U.from(o),0,r.isLeaf?0:1))}getMap(){return At.empty}invert(e){return new Do(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Do(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Do(r.pos,r.attr,r.value)}}ct.jsonID("attr",Do);class ea extends ct{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let o in e.attrs)r[o]=e.attrs[o];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return He.ok(n)}getMap(){return At.empty}invert(e){return new ea(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ea(r.attr,r.value)}}ct.jsonID("docAttr",ea);let zo=class extends Error{};zo=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r};zo.prototype=Object.create(Error.prototype);zo.prototype.constructor=zo;zo.prototype.name="TransformError";class jC{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Qs}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new zo(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,r=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let o=this.mapping.maps[n];n&&(e=o.map(e,1),r=o.map(r,-1)),o.forEach((s,a,i,l)=>{e=Math.min(e,i),r=Math.max(r,l)})}return e==1e9?null:{from:e,to:r}}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=re.empty){let o=mc(this.doc,e,r,n);return o&&this.step(o),this}replaceWith(e,r,n){return this.replace(e,r,new re(U.from(n),0,0))}delete(e,r){return this.replace(e,r,re.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return c6(this,e,r,n),this}replaceRangeWith(e,r,n){return d6(this,e,r,n),this}deleteRange(e,r){return u6(this,e,r),this}lift(e,r){return YV(this,e,r),this}join(e,r=1){return o6(this,e,r),this}wrap(e,r){return ZV(this,e,r),this}setBlockType(e,r=e,n,o=null){return QV(this,e,r,n,o),this}setNodeMarkup(e,r,n=null,o){return t6(this,e,r,n,o),this}setNodeAttribute(e,r,n){return this.step(new Do(e,r,n)),this}setDocAttribute(e,r){return this.step(new ea(e,r)),this}addNodeMark(e,r){return this.step(new an(e,r)),this}removeNodeMark(e,r){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r instanceof Me)r.isInSet(n.marks)&&this.step(new Qn(e,r));else{let o=n.marks,s,a=[];for(;s=r.isInSet(o);)a.push(new Qn(e,s)),o=s.removeFromSet(o);for(let i=a.length-1;i>=0;i--)this.step(a[i])}return this}split(e,r=1,n){return r6(this,e,r,n),this}addMark(e,r,n){return GV(this,e,r,n),this}removeMark(e,r,n){return qV(this,e,r,n),this}clearIncompatible(e,r,n){return Tp(this,e,r,n),this}}const bd=Object.create(null);class ve{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new f6(e.min(r),e.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let r=0;r<e.length;r++)if(e[r].$from.pos!=e[r].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,r=re.empty){let n=r.content.lastChild,o=null;for(let i=0;i<r.openEnd;i++)o=n,n=n.lastChild;let s=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:c}=a[i],d=e.mapping.slice(s);e.replaceRange(d.map(l.pos),d.map(c.pos),i?re.empty:r),i==0&&cg(e,s,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,r){let n=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:i}=o[s],l=e.mapping.slice(n),c=l.map(a.pos),d=l.map(i.pos);s?e.deleteRange(c,d):(e.replaceRangeWith(c,d,r),cg(e,n,r.isInline?-1:1))}}static findFrom(e,r,n=!1){let o=e.parent.inlineContent?new fe(e):No(e.node(0),e.parent,e.pos,e.index(),r,n);if(o)return o;for(let s=e.depth-1;s>=0;s--){let a=r<0?No(e.node(0),e.node(s),e.before(s+1),e.index(s),r,n):No(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,r,n);if(a)return a}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Dt(e.node(0))}static atStart(e){return No(e,e,0,0,1)||new Dt(e)}static atEnd(e){return No(e,e,e.content.size,e.childCount,-1)||new Dt(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=bd[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in bd)throw new RangeError("Duplicate use of selection JSON ID "+e);return bd[e]=r,r.prototype.jsonID=e,r}getBookmark(){return fe.between(this.$anchor,this.$head).getBookmark()}}ve.prototype.visible=!0;class f6{constructor(e,r){this.$from=e,this.$to=r}}let ig=!1;function lg(t){!ig&&!t.parent.inlineContent&&(ig=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class fe extends ve{constructor(e,r=e){lg(e),lg(r),super(e,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return ve.near(n);let o=e.resolve(r.map(this.anchor));return new fe(o.parent.inlineContent?o:n,n)}replace(e,r=re.empty){if(super.replace(e,r),r==re.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof fe&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new gc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new fe(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let o=e.resolve(r);return new this(o,n==r?o:e.resolve(n))}static between(e,r,n){let o=e.pos-r.pos;if((!n||o)&&(n=o>=0?1:-1),!r.parent.inlineContent){let s=ve.findFrom(r,n,!0)||ve.findFrom(r,-n,!0);if(s)r=s.$head;else return ve.near(r,n)}return e.parent.inlineContent||(o==0?e=r:(e=(ve.findFrom(e,-n,!0)||ve.findFrom(e,n,!0)).$anchor,e.pos<r.pos!=o<0&&(e=r))),new fe(e,r)}}ve.jsonID("text",fe);class gc{constructor(e,r){this.anchor=e,this.head=r}map(e){return new gc(e.map(this.anchor),e.map(this.head))}resolve(e){return fe.between(e.resolve(this.anchor),e.resolve(this.head))}}class ce extends ve{constructor(e){let r=e.nodeAfter,n=e.node(0).resolve(e.pos+r.nodeSize);super(e,n),this.node=r}map(e,r){let{deleted:n,pos:o}=r.mapResult(this.anchor),s=e.resolve(o);return n?ve.near(s):new ce(s)}content(){return new re(U.from(this.node),0,0)}eq(e){return e instanceof ce&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Op(this.anchor)}static fromJSON(e,r){if(typeof r.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ce(e.resolve(r.anchor))}static create(e,r){return new ce(e.resolve(r))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ce.prototype.visible=!1;ve.jsonID("node",ce);class Op{constructor(e){this.anchor=e}map(e){let{deleted:r,pos:n}=e.mapResult(this.anchor);return r?new gc(n,n):new Op(n)}resolve(e){let r=e.resolve(this.anchor),n=r.nodeAfter;return n&&ce.isSelectable(n)?new ce(r):ve.near(r)}}class Dt extends ve{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,r=re.empty){if(r==re.empty){e.delete(0,e.doc.content.size);let n=ve.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,r)}toJSON(){return{type:"all"}}static fromJSON(e){return new Dt(e)}map(e){return new Dt(e)}eq(e){return e instanceof Dt}getBookmark(){return p6}}ve.jsonID("all",Dt);const p6={map(){return this},resolve(t){return new Dt(t)}};function No(t,e,r,n,o,s=!1){if(e.inlineContent)return fe.create(t,r);for(let a=n-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){let i=e.child(a);if(i.isAtom){if(!s&&ce.isSelectable(i))return ce.create(t,r-(o<0?i.nodeSize:0))}else{let l=No(t,i,r+o,o<0?i.childCount:0,o,s);if(l)return l}r+=i.nodeSize*o}return null}function cg(t,e,r){let n=t.steps.length-1;if(n<e)return;let o=t.steps[n];if(!(o instanceof Xe||o instanceof Ze))return;let s=t.mapping.maps[n],a;s.forEach((i,l,c,d)=>{a==null&&(a=d)}),t.setSelection(ve.near(t.doc.resolve(a),r))}const dg=1,Qa=2,ug=4;class h6 extends jC{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|dg)&~Qa,this.storedMarks=null,this}get selectionSet(){return(this.updated&dg)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Qa,this}ensureMarks(e){return Me.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Qa)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~Qa,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Me.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let o=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),!e)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let a=this.doc.resolve(r);s=n==r?a.marks():a.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,o.text(e,s)),!this.selection.empty&&this.selection.to==r+e.length&&this.setSelection(ve.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=ug,this}get scrolledIntoView(){return(this.updated&ug)>0}}function fg(t,e){return!e||!t?t:t.bind(e)}class js{constructor(e,r,n){this.name=e,this.init=fg(r.init,n),this.apply=fg(r.apply,n)}}const m6=[new js("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new js("selection",{init(t,e){return t.selection||ve.atStart(e.doc)},apply(t){return t.selection}}),new js("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new js("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class xd{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=m6.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new js(n.key,n.spec.state,n))})}}class Mo{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,r=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=r){let o=this.config.plugins[n];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let r=[e],n=this.applyInner(e),o=null;for(;;){let s=!1;for(let a=0;a<this.config.plugins.length;a++){let i=this.config.plugins[a];if(i.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,d=l<r.length&&i.spec.appendTransaction.call(i,l?r.slice(l):r,c,n);if(d&&n.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<a?{state:n,n:r.length}:{state:this,n:0})}r.push(d),n=n.applyInner(d),s=!0}o&&(o[a]={state:n,n:r.length})}}if(!s)return{state:n,transactions:r}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let r=new Mo(this.config),n=this.config.fields;for(let o=0;o<n.length;o++){let s=n[o];r[s.name]=s.apply(e,this[s.name],this,r)}return r}get tr(){return new h6(this)}static create(e){let r=new xd(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Mo(r);for(let o=0;o<r.fields.length;o++)n[r.fields[o].name]=r.fields[o].init(e,n);return n}reconfigure(e){let r=new xd(this.schema,e.plugins),n=r.fields,o=new Mo(r);for(let s=0;s<n.length;s++){let a=n[s].name;o[a]=this.hasOwnProperty(a)?this[a]:n[s].init(e,o)}return o}toJSON(e){let r={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(r.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[n],s=o.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(o,this[o.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new xd(e.schema,e.plugins),s=new Mo(o);return o.fields.forEach(a=>{if(a.name=="doc")s.doc=dn.fromJSON(e.schema,r.doc);else if(a.name=="selection")s.selection=ve.fromJSON(s.doc,r.selection);else if(a.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let l=n[i],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,i)){s[a.name]=c.fromJSON.call(l,e,r[i],s);return}}s[a.name]=a.init(e,s)}}),s}}function RC(t,e,r){for(let n in t){let o=t[n];o instanceof Function?o=o.bind(e):n=="handleDOMEvents"&&(o=RC(o,e,{})),r[n]=o}return r}class Fe{constructor(e){this.spec=e,this.props={},e.props&&RC(e.props,this,this.props),this.key=e.key?e.key.key:TC("plugin")}getState(e){return e[this.key]}}const wd=Object.create(null);function TC(t){return t in wd?t+"$"+ ++wd[t]:(wd[t]=0,t+"$")}class Je{constructor(e="key"){this.key=TC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Dp=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function AC(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const OC=(t,e,r)=>{let n=AC(t,r);if(!n)return!1;let o=Ip(n);if(!o){let a=n.blockRange(),i=a&&is(a);return i==null?!1:(e&&e(t.tr.lift(a,i).scrollIntoView()),!0)}let s=o.nodeBefore;if($C(t,o,e,-1))return!0;if(n.parent.content.size==0&&(Bo(s,"end")||ce.isSelectable(s)))for(let a=n.depth;;a--){let i=mc(t.doc,n.before(a),n.after(a),re.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=t.tr.step(i);l.setSelection(Bo(s,"end")?ve.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):ce.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}if(a==1||n.node(a-1).childCount>1)break}return s.isAtom&&o.depth==n.depth-1?(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},g6=(t,e,r)=>{let n=AC(t,r);if(!n)return!1;let o=Ip(n);return o?DC(t,o,e):!1},v6=(t,e,r)=>{let n=PC(t,r);if(!n)return!1;let o=Pp(n);return o?DC(t,o,e):!1};function DC(t,e,r){let n=e.nodeBefore,o=n,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let d=o.lastChild;if(!d)return!1;o=d}let a=e.nodeAfter,i=a,l=e.pos+1;for(;!i.isTextblock;l++){if(i.type.spec.isolating)return!1;let d=i.firstChild;if(!d)return!1;i=d}let c=mc(t.doc,s,l,re.empty);if(!c||c.from!=s||c instanceof Xe&&c.slice.size>=l-s)return!1;if(r){let d=t.tr.step(c);d.setSelection(fe.create(d.doc,s)),r(d.scrollIntoView())}return!0}function Bo(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const IC=(t,e,r)=>{let{$head:n,empty:o}=t.selection,s=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;s=Ip(n)}let a=s&&s.nodeBefore;return!a||!ce.isSelectable(a)?!1:(e&&e(t.tr.setSelection(ce.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function Ip(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function PC(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)?null:r}const LC=(t,e,r)=>{let n=PC(t,r);if(!n)return!1;let o=Pp(n);if(!o)return!1;let s=o.nodeAfter;if($C(t,o,e,1))return!0;if(n.parent.content.size==0&&(Bo(s,"start")||ce.isSelectable(s))){let a=mc(t.doc,n.before(),n.after(),re.empty);if(a&&a.slice.size<a.to-a.from){if(e){let i=t.tr.step(a);i.setSelection(Bo(s,"start")?ve.findFrom(i.doc.resolve(i.mapping.map(o.pos)),1):ce.create(i.doc,i.mapping.map(o.pos))),e(i.scrollIntoView())}return!0}}return s.isAtom&&o.depth==n.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},FC=(t,e,r)=>{let{$head:n,empty:o}=t.selection,s=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)return!1;s=Pp(n)}let a=s&&s.nodeAfter;return!a||!ce.isSelectable(a)?!1:(e&&e(t.tr.setSelection(ce.create(t.doc,s.pos)).scrollIntoView()),!0)};function Pp(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let r=t.node(e);if(t.index(e)+1<r.childCount)return t.doc.resolve(t.after(e+1));if(r.type.spec.isolating)break}return null}const y6=(t,e)=>{let r=t.selection,n=r instanceof ce,o;if(n){if(r.node.isTextblock||!Mn(t.doc,r.from))return!1;o=r.from}else if(o=hc(t.doc,r.from,-1),o==null)return!1;if(e){let s=t.tr.join(o);n&&s.setSelection(ce.create(s.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},b6=(t,e)=>{let r=t.selection,n;if(r instanceof ce){if(r.node.isTextblock||!Mn(t.doc,r.to))return!1;n=r.to}else if(n=hc(t.doc,r.to,1),n==null)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},x6=(t,e)=>{let{$from:r,$to:n}=t.selection,o=r.blockRange(n),s=o&&is(o);return s==null?!1:(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},_C=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(`
436
+ `).scrollIntoView()),!0)};function Lp(t){for(let e=0;e<t.edgeCount;e++){let{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}const w6=(t,e)=>{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let o=r.node(-1),s=r.indexAfter(-1),a=Lp(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(e){let i=r.after(),l=t.tr.replaceWith(i,i,a.createAndFill());l.setSelection(ve.near(l.doc.resolve(i),1)),e(l.scrollIntoView())}return!0},zC=(t,e)=>{let r=t.selection,{$from:n,$to:o}=r;if(r instanceof Dt||n.parent.inlineContent||o.parent.inlineContent)return!1;let s=Lp(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let a=(!n.parentOffset&&o.index()<o.parent.childCount?n:o).pos,i=t.tr.insert(a,s.createAndFill());i.setSelection(fe.create(i.doc,a+1)),e(i.scrollIntoView())}return!0},BC=(t,e)=>{let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(Br(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),o=n&&is(n);return o==null?!1:(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)};function k6(t){return(e,r)=>{let{$from:n,$to:o}=e.selection;if(e.selection instanceof ce&&e.selection.node.isBlock)return!n.parentOffset||!Br(e.doc,n.pos)?!1:(r&&r(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],a,i,l=!1,c=!1;for(let m=n.depth;;m--)if(n.node(m).isBlock){l=n.end(m)==n.pos+(n.depth-m),c=n.start(m)==n.pos-(n.depth-m),i=Lp(n.node(m-1).contentMatchAt(n.indexAfter(m-1))),s.unshift(l&&i?{type:i}:null),a=m;break}else{if(m==1)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof fe||e.selection instanceof Dt)&&d.deleteSelection();let f=d.mapping.map(n.pos),h=Br(d.doc,f,s.length,s);if(h||(s[0]=i?{type:i}:null,h=Br(d.doc,f,s.length,s)),!h)return!1;if(d.split(f,s.length,s),!l&&c&&n.node(a).type!=i){let m=d.mapping.map(n.before(a)),v=d.doc.resolve(m);i&&n.node(a-1).canReplaceWith(v.index(),v.index()+1,i)&&d.setNodeMarkup(d.mapping.map(n.before(a)),i)}return r&&r(d.scrollIntoView()),!0}}const N6=k6(),C6=(t,e)=>{let{$from:r,to:n}=t.selection,o,s=r.sharedDepth(n);return s==0?!1:(o=r.before(s),e&&e(t.tr.setSelection(ce.create(t.doc,o))),!0)};function S6(t,e,r){let n=e.nodeBefore,o=e.nodeAfter,s=e.index();return!n||!o||!n.type.compatibleContent(o.type)?!1:!n.content.size&&e.parent.canReplace(s-1,s)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||Mn(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function $C(t,e,r,n){let o=e.nodeBefore,s=e.nodeAfter,a,i,l=o.type.spec.isolating||s.type.spec.isolating;if(!l&&S6(t,e,r))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(a=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(a[0]||s.type).validEnd){if(r){let m=e.pos+s.nodeSize,v=U.empty;for(let b=a.length-1;b>=0;b--)v=U.from(a[b].create(null,v));v=U.from(o.copy(v));let g=t.tr.step(new Ze(e.pos-1,m,e.pos,m,new re(v,1,0),a.length,!0)),y=g.doc.resolve(m+2*a.length);y.nodeAfter&&y.nodeAfter.type==o.type&&Mn(g.doc,y.pos)&&g.join(y.pos),r(g.scrollIntoView())}return!0}let d=s.type.spec.isolating||n>0&&l?null:ve.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),h=f&&is(f);if(h!=null&&h>=e.depth)return r&&r(t.tr.lift(f,h).scrollIntoView()),!0;if(c&&Bo(s,"start",!0)&&Bo(o,"end")){let m=o,v=[];for(;v.push(m),!m.isTextblock;)m=m.lastChild;let g=s,y=1;for(;!g.isTextblock;g=g.firstChild)y++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(r){let b=U.empty;for(let w=v.length-1;w>=0;w--)b=U.from(v[w].copy(b));let x=t.tr.step(new Ze(e.pos-v.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new re(b,v.length,0),0,!0));r(x.scrollIntoView())}return!0}}return!1}function HC(t){return function(e,r){let n=e.selection,o=t<0?n.$from:n.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(r&&r(e.tr.setSelection(fe.create(e.doc,t<0?o.start(s):o.end(s)))),!0):!1}}const M6=HC(-1),E6=HC(1);function j6(t,e=null){return function(r,n){let{$from:o,$to:s}=r.selection,a=o.blockRange(s),i=a&&Ap(a,t,e);return i?(n&&n(r.tr.wrap(a,i).scrollIntoView()),!0):!1}}function pg(t,e=null){return function(r,n){let o=!1;for(let s=0;s<r.selection.ranges.length&&!o;s++){let{$from:{pos:a},$to:{pos:i}}=r.selection.ranges[s];r.doc.nodesBetween(a,i,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let d=r.doc.resolve(c),f=d.index();o=d.parent.canReplaceWith(f,f+1,t)}})}if(!o)return!1;if(n){let s=r.tr;for(let a=0;a<r.selection.ranges.length;a++){let{$from:{pos:i},$to:{pos:l}}=r.selection.ranges[a];s.setBlockType(i,l,t,e)}n(s.scrollIntoView())}return!0}}function Fp(...t){return function(e,r,n){for(let o=0;o<t.length;o++)if(t[o](e,r,n))return!0;return!1}}Fp(Dp,OC,IC);Fp(Dp,LC,FC);Fp(_C,zC,BC,N6);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function R6(t,e=null){return function(r,n){let{$from:o,$to:s}=r.selection,a=o.blockRange(s);if(!a)return!1;let i=n?r.tr:null;return T6(i,a,t,e)?(n&&n(i.scrollIntoView()),!0):!1}}function T6(t,e,r,n=null){let o=!1,s=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(r)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=a.resolve(e.start-2);s=new Hi(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Hi(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let i=Ap(s,r,n,e);return i?(t&&A6(t,e,i,o,r),!0):!1}function A6(t,e,r,n,o){let s=U.empty;for(let d=r.length-1;d>=0;d--)s=U.from(r[d].type.create(r[d].attrs,s));t.step(new Ze(e.start-(n?2:0),e.end,e.start,e.end,new re(s,0,0),r.length,!0));let a=0;for(let d=0;d<r.length;d++)r[d].type==o&&(a=d+1);let i=r.length-a,l=e.start+r.length-(n?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,h=!0;d<f;d++,h=!1)!h&&Br(t.doc,l,i)&&(t.split(l,i),l+=2*i),l+=c.child(d).nodeSize;return t}function O6(t){return function(e,r){let{$from:n,$to:o}=e.selection,s=n.blockRange(o,a=>a.childCount>0&&a.firstChild.type==t);return s?r?n.node(s.depth-1).type==t?D6(e,r,t,s):I6(e,r,s):!0:!1}}function D6(t,e,r,n){let o=t.tr,s=n.end,a=n.$to.end(n.depth);s<a&&(o.step(new Ze(s-1,a,s,a,new re(U.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new Hi(o.doc.resolve(n.$from.pos),o.doc.resolve(a),n.depth));const i=is(n);if(i==null)return!1;o.lift(n,i);let l=o.doc.resolve(o.mapping.map(s,-1)-1);return Mn(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function I6(t,e,r){let n=t.tr,o=r.parent;for(let m=r.end,v=r.endIndex-1,g=r.startIndex;v>g;v--)m-=o.child(v).nodeSize,n.delete(m-1,m+1);let s=n.doc.resolve(r.start),a=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let i=r.startIndex==0,l=r.endIndex==o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(i?0:1),d+1,a.content.append(l?U.empty:U.from(o))))return!1;let f=s.pos,h=f+a.nodeSize;return n.step(new Ze(f-(i?1:0),h+(l?1:0),f+1,h-1,new re((i?U.empty:U.from(o.copy(U.empty))).append(l?U.empty:U.from(o.copy(U.empty))),i?0:1,l?0:1),i?0:1)),e(n.scrollIntoView()),!0}function P6(t){return function(e,r){let{$from:n,$to:o}=e.selection,s=n.blockRange(o,c=>c.childCount>0&&c.firstChild.type==t);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let i=s.parent,l=i.child(a-1);if(l.type!=t)return!1;if(r){let c=l.lastChild&&l.lastChild.type==i.type,d=U.from(c?t.create():null),f=new re(U.from(t.create(null,U.from(i.type.create(null,d)))),c?3:1,0),h=s.start,m=s.end;r(e.tr.step(new Ze(h-(c?3:1),m,h,m,f,1,!0)).scrollIntoView())}return!0}}const nt=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},$o=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Cu=null;const Ir=function(t,e,r){let n=Cu||(Cu=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},L6=function(){Cu=null},eo=function(t,e,r,n){return r&&(hg(t,e,r,n,-1)||hg(t,e,r,n,1))},F6=/^(img|br|input|textarea|hr)$/i;function hg(t,e,r,n,o){for(var s;;){if(t==r&&e==n)return!0;if(e==(o<0?0:$t(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Pa(t)||F6.test(t.nodeName)||t.contentEditable=="false")return!1;e=nt(t)+(o<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(o<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((s=a.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=o;else return!1;else t=a,e=o<0?$t(t):0}else return!1}}function $t(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function _6(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=$t(t)}else if(t.parentNode&&!Pa(t))e=nt(t),t=t.parentNode;else return null}}function z6(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Pa(t))e=nt(t)+1,t=t.parentNode;else return null}}function B6(t,e,r){for(let n=e==0,o=e==$t(t);n||o;){if(t==r)return!0;let s=nt(t);if(t=t.parentNode,!t)return!1;n=n&&s==0,o=o&&s==$t(t)}}function Pa(t){let e;for(let r=t;r&&!(e=r.pmViewDesc);r=r.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const vc=function(t){return t.focusNode&&eo(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function In(t,e){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function $6(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function H6(t,e,r){if(t.caretPositionFromPoint)try{let n=t.caretPositionFromPoint(e,r);if(n)return{node:n.offsetNode,offset:Math.min($t(n.offsetNode),n.offset)}}catch{}if(t.caretRangeFromPoint){let n=t.caretRangeFromPoint(e,r);if(n)return{node:n.startContainer,offset:Math.min($t(n.startContainer),n.startOffset)}}}const gr=typeof navigator<"u"?navigator:null,mg=typeof document<"u"?document:null,En=gr&&gr.userAgent||"",Su=/Edge\/(\d+)/.exec(En),VC=/MSIE \d/.exec(En),Mu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(En),wt=!!(VC||Mu||Su),fn=VC?document.documentMode:Mu?+Mu[1]:Su?+Su[1]:0,Vt=!wt&&/gecko\/(\d+)/i.test(En);Vt&&+(/Firefox\/(\d+)/.exec(En)||[0,0])[1];const Eu=!wt&&/Chrome\/(\d+)/.exec(En),st=!!Eu,WC=Eu?+Eu[1]:0,lt=!wt&&!!gr&&/Apple Computer/.test(gr.vendor),Ho=lt&&(/Mobile\/\w+/.test(En)||!!gr&&gr.maxTouchPoints>2),Bt=Ho||(gr?/Mac/.test(gr.platform):!1),UC=gr?/Win/.test(gr.platform):!1,Fr=/Android \d/.test(En),La=!!mg&&"webkitFontSmoothing"in mg.documentElement.style,V6=La?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function W6(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Tr(t,e){return typeof t=="number"?t:t[e]}function U6(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function gg(t,e,r){let n=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let a=r||t.dom;a;){if(a.nodeType!=1){a=$o(a);continue}let i=a,l=i==s.body,c=l?W6(s):U6(i),d=0,f=0;if(e.top<c.top+Tr(n,"top")?f=-(c.top-e.top+Tr(o,"top")):e.bottom>c.bottom-Tr(n,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+Tr(o,"top")-c.top:e.bottom-c.bottom+Tr(o,"bottom")),e.left<c.left+Tr(n,"left")?d=-(c.left-e.left+Tr(o,"left")):e.right>c.right-Tr(n,"right")&&(d=e.right-c.right+Tr(o,"right")),d||f)if(l)s.defaultView.scrollBy(d,f);else{let m=i.scrollLeft,v=i.scrollTop;f&&(i.scrollTop+=f),d&&(i.scrollLeft+=d);let g=i.scrollLeft-m,y=i.scrollTop-v;e={left:e.left-g,top:e.top-y,right:e.right-g,bottom:e.bottom-y}}let h=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(h))break;a=h=="absolute"?a.offsetParent:$o(a)}}function G6(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,o;for(let s=(e.left+e.right)/2,a=r+1;a<Math.min(innerHeight,e.bottom);a+=5){let i=t.root.elementFromPoint(s,a);if(!i||i==t.dom||!t.dom.contains(i))continue;let l=i.getBoundingClientRect();if(l.top>=r-20){n=i,o=l.top;break}}return{refDOM:n,refTop:o,stack:GC(t.dom)}}function GC(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=$o(n));return e}function q6({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;qC(r,n==0?0:n-e)}function qC(t,e){for(let r=0;r<t.length;r++){let{dom:n,top:o,left:s}=t[r];n.scrollTop!=o+e&&(n.scrollTop=o+e),n.scrollLeft!=s&&(n.scrollLeft=s)}}let vo=null;function K6(t){if(t.setActive)return t.setActive();if(vo)return t.focus(vo);let e=GC(t);t.focus(vo==null?{get preventScroll(){return vo={preventScroll:!0},!0}}:void 0),vo||(vo=!1,qC(e,0))}function KC(t,e){let r,n=2e8,o,s=0,a=e.top,i=e.top,l,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=Ir(d).getClientRects();else continue;for(let m=0;m<h.length;m++){let v=h[m];if(v.top<=a&&v.bottom>=i){a=Math.max(v.bottom,a),i=Math.min(v.top,i);let g=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(g<n){r=d,n=g,o=g&&r.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,d.nodeType==1&&g&&(s=f+(e.left>=(v.left+v.right)/2?1:0));continue}}else v.top>e.top&&!l&&v.left<=e.left&&v.right>=e.left&&(l=d,c={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!r&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(s=f+1)}}return!r&&l&&(r=l,o=c,n=0),r&&r.nodeType==3?Y6(r,o):!r||n&&r.nodeType==1?{node:t,offset:s}:KC(r,o)}function Y6(t,e){let r=t.nodeValue.length,n=document.createRange(),o;for(let s=0;s<r;s++){n.setEnd(t,s+1),n.setStart(t,s);let a=Qr(n,1);if(a.top!=a.bottom&&_p(e,a)){o={node:t,offset:s+(e.left>=(a.left+a.right)/2?1:0)};break}}return n.detach(),o||{node:t,offset:0}}function _p(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function J6(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}function X6(t,e,r){let{node:n,offset:o}=KC(e,r),s=-1;if(n.nodeType==1&&!n.firstChild){let a=n.getBoundingClientRect();s=a.left!=a.right&&r.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(n,o,s)}function Z6(t,e,r,n){let o=-1;for(let s=e,a=!1;s!=t.dom;){let i=t.docView.nearestDesc(s,!0),l;if(!i)return null;if(i.dom.nodeType==1&&(i.node.isBlock&&i.parent||!i.contentDOM)&&((l=i.dom.getBoundingClientRect()).width||l.height)&&(i.node.isBlock&&i.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(i.dom.nodeName)&&(!a&&l.left>n.left||l.top>n.top?o=i.posBefore:(!a&&l.right<n.left||l.bottom<n.top)&&(o=i.posAfter),a=!0),!i.contentDOM&&o<0&&!i.node.isText))return(i.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?i.posBefore:i.posAfter;s=i.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,r,-1)}function YC(t,e,r){let n=t.childNodes.length;if(n&&r.top<r.bottom)for(let o=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-r.top)/(r.bottom-r.top))-2)),s=o;;){let a=t.childNodes[s];if(a.nodeType==1){let i=a.getClientRects();for(let l=0;l<i.length;l++){let c=i[l];if(_p(e,c))return YC(a,e,c)}}if((s=(s+1)%n)==o)break}return t}function Q6(t,e){let r=t.dom.ownerDocument,n,o=0,s=H6(r,e.left,e.top);s&&({node:n,offset:o}=s);let a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top),i;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=t.dom.getBoundingClientRect();if(!_p(e,c)||(a=YC(t.dom,e,c),!a))return null}if(lt)for(let c=a;n&&c;c=$o(c))c.draggable&&(n=void 0);if(a=J6(a,e),n){if(Vt&&n.nodeType==1&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let d=n.childNodes[o],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let c;La&&o&&n.nodeType==1&&(c=n.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,n==t.dom&&o==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?i=t.state.doc.content.size:(o==0||n.nodeType!=1||n.childNodes[o-1].nodeName!="BR")&&(i=Z6(t,n,o,e))}i==null&&(i=X6(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:i,inside:l?l.posAtStart-l.border:-1}}function vg(t){return t.top<t.bottom||t.left<t.right}function Qr(t,e){let r=t.getClientRects();if(r.length){let n=r[e<0?0:r.length-1];if(vg(n))return n}return Array.prototype.find.call(r,vg)||t.getBoundingClientRect()}const eW=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function JC(t,e,r){let{node:n,offset:o,atom:s}=t.docView.domFromPos(e,r<0?-1:1),a=La||Vt;if(n.nodeType==3)if(a&&(eW.test(n.nodeValue)||(r<0?!o:o==n.nodeValue.length))){let i=Qr(Ir(n,o,o),r);if(Vt&&o&&/\s/.test(n.nodeValue[o-1])&&o<n.nodeValue.length){let l=Qr(Ir(n,o-1,o-1),-1);if(l.top==i.top){let c=Qr(Ir(n,o,o+1),-1);if(c.top!=i.top)return vs(c,c.left<l.left)}}return i}else{let i=o,l=o,c=r<0?1:-1;return r<0&&!o?(l++,c=-1):r>=0&&o==n.nodeValue.length?(i--,c=1):r<0?i--:l++,vs(Qr(Ir(n,i,l),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(r<0||o==$t(n))){let i=n.childNodes[o-1];if(i.nodeType==1)return kd(i.getBoundingClientRect(),!1)}if(s==null&&o<$t(n)){let i=n.childNodes[o];if(i.nodeType==1)return kd(i.getBoundingClientRect(),!0)}return kd(n.getBoundingClientRect(),r>=0)}if(s==null&&o&&(r<0||o==$t(n))){let i=n.childNodes[o-1],l=i.nodeType==3?Ir(i,$t(i)-(a?0:1)):i.nodeType==1&&(i.nodeName!="BR"||!i.nextSibling)?i:null;if(l)return vs(Qr(l,1),!1)}if(s==null&&o<$t(n)){let i=n.childNodes[o];for(;i.pmViewDesc&&i.pmViewDesc.ignoreForCoords;)i=i.nextSibling;let l=i?i.nodeType==3?Ir(i,0,a?0:1):i.nodeType==1?i:null:null;if(l)return vs(Qr(l,-1),!0)}return vs(Qr(n.nodeType==3?Ir(n):n,-r),r>=0)}function vs(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function kd(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function XC(t,e,r){let n=t.state,o=t.root.activeElement;n!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),o!=t.dom&&o&&o.focus()}}function tW(t,e,r){let n=e.selection,o=r=="up"?n.$from:n.$to;return XC(t,e,()=>{let{node:s}=t.docView.domFromPos(o.pos,r=="up"?-1:1);for(;;){let i=t.docView.nearestDesc(s,!0);if(!i)break;if(i.node.isBlock){s=i.contentDOM||i.dom;break}s=i.dom.parentNode}let a=JC(t,o.pos,1);for(let i=s.firstChild;i;i=i.nextSibling){let l;if(i.nodeType==1)l=i.getClientRects();else if(i.nodeType==3)l=Ir(i,0,i.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(r=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const rW=/[\u0590-\u08ac]/;function nW(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let o=n.parentOffset,s=!o,a=o==n.parent.content.size,i=t.domSelection();return i?!rW.test(n.parent.textContent)||!i.modify?r=="left"||r=="backward"?s:a:XC(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),h=i.caretBidiLevel;i.modify("move",r,"character");let m=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:v,focusOffset:g}=t.domSelectionRange(),y=v&&!m.contains(v.nodeType==1?v:v.parentNode)||l==v&&c==g;try{i.collapse(d,f),l&&(l!=d||c!=f)&&i.extend&&i.extend(l,c)}catch{}return h!=null&&(i.caretBidiLevel=h),y}):n.pos==n.start()||n.pos==n.end()}let yg=null,bg=null,xg=!1;function oW(t,e,r){return yg==e&&bg==r?xg:(yg=e,bg=r,xg=r=="up"||r=="down"?tW(t,e,r):nW(t,e,r))}const Wt=0,wg=1,Ln=2,vr=3;class Fa{constructor(e,r,n,o){this.parent=e,this.children=r,this.dom=n,this.contentDOM=o,this.dirty=Wt,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;r<this.children.length;r++)e+=this.children[r].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let r=0,n=this.posAtStart;;r++){let o=this.children[r];if(o==e)return n;n+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,r,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let s,a;if(e==this.contentDOM)s=e.childNodes[r-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(e==this.contentDOM)s=e.childNodes[r];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=r>nt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&r==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),a;if(s&&(!r||s.node))if(n&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return s}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;r<this.children.length;r++){let o=this.children[r],s=n+o.size;if(n==e&&s!=n){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let i=o.children[a];if(i.size){o=i;break}}return o}if(e<s)return o.descAt(e-n-o.border);n=s}}domFromPos(e,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,o=0;for(let s=0;n<this.children.length;n++){let a=this.children[n],i=s+a.size;if(i>e||a instanceof QC){o=e-s;break}s=i}if(o)return this.children[n].domFromPos(o-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof ZC&&s.side>=0;n--);if(r<=0){let s,a=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,a=!1);return s&&r&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?nt(s.dom)+1:0}}else{let s,a=!0;for(;s=n<this.children.length?this.children[n]:null,!(!s||s.dom.parentNode==this.contentDOM);n++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,r):{node:this.contentDOM,offset:s?nt(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let a=n,i=0;;i++){let l=this.children[i],c=a+l.size;if(o==-1&&e<=c){let d=a+l.border;if(e>=d&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,r,d);e=a;for(let f=i;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=nt(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(c>r||i==this.children.length-1)){r=c;for(let d=i+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=nt(f.dom);break}r+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:e,to:r,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[e<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(e)}domAfterPos(e){let{node:r,offset:n}=this.domFromPos(e,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+e);return r.childNodes[n]}setSelection(e,r,n,o=!1){let s=Math.min(e,r),a=Math.max(e,r);for(let m=0,v=0;m<this.children.length;m++){let g=this.children[m],y=v+g.size;if(s>v&&a<y)return g.setSelection(e-v-g.border,r-v-g.border,n,o);v=y}let i=this.domFromPos(e,e?-1:1),l=r==e?i:this.domFromPos(r,r?-1:1),c=n.root.getSelection(),d=n.domSelectionRange(),f=!1;if((Vt||lt)&&e==r){let{node:m,offset:v}=i;if(m.nodeType==3){if(f=!!(v&&m.nodeValue[v-1]==`
437
+ `),f&&v==m.nodeValue.length)for(let g=m,y;g;g=g.parentNode){if(y=g.nextSibling){y.nodeName=="BR"&&(i=l={node:y.parentNode,offset:nt(y)+1});break}let b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let g=m.childNodes[v-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(Vt&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(o=!0)}if(!(o||f&&lt)&&eo(i.node,i.offset,d.anchorNode,d.anchorOffset)&&eo(l.node,l.offset,d.focusNode,d.focusOffset))return;let h=!1;if((c.extend||e==r)&&!(f&&Vt)){c.collapse(i.node,i.offset);try{e!=r&&c.extend(l.node,l.offset),h=!0}catch{}}if(!h){if(e>r){let v=i;i=l,l=v}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(i.node,i.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,o=0;o<this.children.length;o++){let s=this.children[o],a=n+s.size;if(n==a?e<=a&&r>=n:e<a&&r>n){let i=n+s.border,l=a-s.border;if(e>=i&&r<=l){this.dirty=e==n||r==a?Ln:wg,e==i&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=vr:s.markDirty(e-i,r-i);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Ln:vr}n=a}this.dirty=Ln}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?Ln:wg;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class ZC extends Fa{constructor(e,r,n,o){let s,a=r.type.toDOM;if(typeof a=="function"&&(a=a(n,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(a.nodeType!=1){let i=document.createElement("span");i.appendChild(a),a=i}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=r,this.widget=r,s=this}matchesWidget(e){return this.dirty==Wt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class sW extends Fa{constructor(e,r,n,o){super(e,[],r,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class to extends Fa{constructor(e,r,n,o,s){super(e,[],n,o),this.mark=r,this.spec=s}static create(e,r,n,o){let s=o.nodeViews[r.type.name],a=s&&s(r,o,n);return(!a||!a.dom)&&(a=ao.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new to(e,r,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&vr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=vr&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=Wt){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=Wt}}slice(e,r,n){let o=to.create(this.parent,this.mark,!0,n),s=this.children,a=this.size;r<a&&(s=Ru(s,r,a,n)),e>0&&(s=Ru(s,0,e,n));for(let i=0;i<s.length;i++)s[i].parent=o;return o.children=s,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class pn extends Fa{constructor(e,r,n,o,s,a,i,l,c){super(e,[],s,a),this.node=r,this.outerDeco=n,this.innerDeco=o,this.nodeDOM=i}static create(e,r,n,o,s,a){let i=s.nodeViews[r.type.name],l,c=i&&i(r,s,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},n,o),d=c&&c.dom,f=c&&c.contentDOM;if(r.isText){if(!d)d=document.createTextNode(r.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=ao.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!f&&!r.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),r.type.spec.draggable&&(d.draggable=!0));let h=d;return d=rS(d,n,r),c?l=new aW(e,r,n,o,d,f||null,h,c,s,a+1):r.isText?new yc(e,r,n,o,d,h,s):new pn(e,r,n,o,d,f||null,h,s,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>U.empty)}return e}matchesNode(e,r,n){return this.dirty==Wt&&e.eq(this.node)&&Wi(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,o=r,s=e.composing?this.localCompositionInfo(e,r):null,a=s&&s.pos>-1?s:null,i=s&&s.pos<0,l=new lW(this,a&&a.node,e);uW(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,e,d):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?Me.none:this.node.child(d).marks,n,e,d),l.placeWidget(c,e,o)},(c,d,f,h)=>{l.syncToMarks(c.marks,n,e,h);let m;l.findNodeMatch(c,d,f,h)||i&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(m=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(c,d,f,m,e)||l.updateNextNode(c,d,f,e,h,o)||l.addNode(c,d,f,e,o),o+=c.nodeSize}),l.syncToMarks([],n,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ln)&&(a&&this.protectLocalComposition(e,a),eS(this.contentDOM,this.children,e),Ho&&fW(this.dom))}localCompositionInfo(e,r){let{from:n,to:o}=e.state.selection;if(!(e.state.selection instanceof fe)||n<r||o>r+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,i=pW(this.node.content,a,n-r,o-r);return i<0?null:{node:s,pos:i,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:o}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new sW(this,s,r,o);e.input.compositionNodes.push(a),this.children=Ru(this.children,n,n+o.length,e,a)}update(e,r,n,o){return this.dirty==vr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,o),!0)}updateInner(e,r,n,o){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Wt}updateOuterDeco(e){if(Wi(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=tS(this.dom,this.nodeDOM,ju(this.outerDeco,this.node,r),ju(e,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function kg(t,e,r,n,o){rS(n,e,t);let s=new pn(void 0,t,e,r,n,n,n,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class yc extends pn{constructor(e,r,n,o,s,a,i){super(e,r,n,o,s,null,a,i,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,r,n,o){return this.dirty==vr||this.dirty!=Wt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Wt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Wt,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let o=this.node.cut(e,r),s=document.createTextNode(o.text);return new yc(this.parent,o,this.outerDeco,this.innerDeco,s,s,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=vr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class QC extends Fa{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Wt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class aW extends pn{constructor(e,r,n,o,s,a,i,l,c,d){super(e,r,n,o,s,a,i,c,d),this.spec=l}update(e,r,n,o){if(this.dirty==vr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,r,n);return s&&this.updateInner(e,r,n,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,o){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function eS(t,e,r){let n=t.firstChild,o=!1;for(let s=0;s<e.length;s++){let a=e[s],i=a.dom;if(i.parentNode==t){for(;i!=n;)n=Ng(n),o=!0;n=n.nextSibling}else o=!0,t.insertBefore(i,n);if(a instanceof to){let l=n?n.previousSibling:t.lastChild;eS(a.contentDOM,a.children,r),n=l?l.nextSibling:t.firstChild}}for(;n;)n=Ng(n),o=!0;o&&r.trackWrites==t&&(r.trackWrites=null)}const Is=function(t){t&&(this.nodeName=t)};Is.prototype=Object.create(null);const Fn=[new Is];function ju(t,e,r){if(t.length==0)return Fn;let n=r?Fn[0]:new Is,o=[n];for(let s=0;s<t.length;s++){let a=t[s].type.attrs;if(a){a.nodeName&&o.push(n=new Is(a.nodeName));for(let i in a){let l=a[i];l!=null&&(r&&o.length==1&&o.push(n=new Is(e.isInline?"span":"div")),i=="class"?n.class=(n.class?n.class+" ":"")+l:i=="style"?n.style=(n.style?n.style+";":"")+l:i!="nodeName"&&(n[i]=l))}}}return o}function tS(t,e,r,n){if(r==Fn&&n==Fn)return e;let o=e;for(let s=0;s<n.length;s++){let a=n[s],i=r[s];if(s){let l;i&&i.nodeName==a.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),i=Fn[0]),o=l}iW(o,i||Fn[0],a)}return o}function iW(t,e,r){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in r)&&t.removeAttribute(n);for(let n in r)n!="class"&&n!="style"&&n!="nodeName"&&r[n]!=e[n]&&t.setAttribute(n,r[n]);if(e.class!=r.class){let n=e.class?e.class.split(" ").filter(Boolean):[],o=r.class?r.class.split(" ").filter(Boolean):[];for(let s=0;s<n.length;s++)o.indexOf(n[s])==-1&&t.classList.remove(n[s]);for(let s=0;s<o.length;s++)n.indexOf(o[s])==-1&&t.classList.add(o[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=r.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=n.exec(e.style);)t.style.removeProperty(o[1])}r.style&&(t.style.cssText+=r.style)}}function rS(t,e,r){return tS(t,t,Fn,ju(e,r,t.nodeType!=1))}function Wi(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].type.eq(e[r].type))return!1;return!0}function Ng(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class lW{constructor(e,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=cW(e.node.content,e)}destroyBetween(e,r){if(e!=r){for(let n=e;n<r;n++)this.top.children[n].destroy();this.top.children.splice(e,r-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,r,n,o){let s=0,a=this.stack.length>>1,i=Math.min(a,e.length);for(;s<i&&(s==a-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<a;)this.destroyRest(),this.top.dirty=Wt,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;o<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let d=this.index;d<c;d++){let f=this.top.children[d];if(f.matchesMark(e[a])&&!this.isLocked(f.dom)){l=d;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let d=to.create(this.top,e[a],r,n);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,a++}}findNodeMatch(e,r,n,o){let s=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(e,r,n))s=this.top.children.indexOf(a,this.index);else for(let i=this.index,l=Math.min(this.top.children.length,i+5);i<l;i++){let c=this.top.children[i];if(c.matchesNode(e,r,n)&&!this.preMatch.matched.has(c)){s=i;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,r,n,o,s){let a=this.top.children[o];return a.dirty==vr&&a.dom==a.contentDOM&&(a.dirty=Ln),a.update(e,r,n,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let r=e.parentNode;if(!r)return-1;if(r==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==n)return o}return-1}e=r}}updateNextNode(e,r,n,o,s,a){for(let i=this.index;i<this.top.children.length;i++){let l=this.top.children[i];if(l instanceof pn){let c=this.preMatch.matched.get(l);if(c!=null&&c!=s)return!1;let d=l.dom,f,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=vr&&Wi(r,l.outerDeco));if(!h&&l.update(e,r,n,o))return this.destroyBetween(this.index,i),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(l,e,r,n,o,a)))return this.destroyBetween(this.index,i),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Ln,f.updateChildren(o,a+1),f.dirty=Wt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,r,n,o,s,a){if(e.dirty||r.isAtom||!e.children.length||!e.node.content.eq(r.content)||!Wi(n,e.outerDeco)||!o.eq(e.innerDeco))return null;let i=pn.create(this.top,r,n,o,s,a);if(i.contentDOM){i.children=e.children,e.children=[];for(let l of i.children)l.parent=i}return e.destroy(),i}addNode(e,r,n,o,s){let a=pn.create(this.top,e,r,n,o,s);a.contentDOM&&a.updateChildren(o,s+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,r,n){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let s=new ZC(this.top,e,r,n);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],r=this.top;for(;e instanceof to;)r=e,e=r.children[r.children.length-1];(!e||!(e instanceof yc)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((lt||st)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",r),this.addHackNode("BR",this.top))}addHackNode(e,r){if(r==this.top&&this.index<r.children.length&&r.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let o=new QC(this.top,[],n,null);r!=this.top?r.children.push(o):r.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function cW(t,e){let r=e,n=r.children.length,o=t.childCount,s=new Map,a=[];e:for(;o>0;){let i;for(;;)if(n){let c=r.children[n-1];if(c instanceof to)r=c,n=c.children.length;else{i=c,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=i.node;if(l){if(l!=t.child(o-1))break;--o,s.set(i,o),a.push(i)}}return{index:o,matched:s,matches:a.reverse()}}function dW(t,e){return t.type.side-e.type.side}function uW(t,e,r,n){let o=e.locals(t),s=0;if(o.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);n(d,o,e.forChild(s,d),c),s+=d.nodeSize}return}let a=0,i=[],l=null;for(let c=0;;){let d,f;for(;a<o.length&&o[a].to==s;){let y=o[a++];y.widget&&(d?(f||(f=[d])).push(y):d=y)}if(d)if(f){f.sort(dW);for(let y=0;y<f.length;y++)r(f[y],c,!!l)}else r(d,c,!!l);let h,m;if(l)m=-1,h=l,l=null;else if(c<t.childCount)m=c,h=t.child(c++);else break;for(let y=0;y<i.length;y++)i[y].to<=s&&i.splice(y--,1);for(;a<o.length&&o[a].from<=s&&o[a].to>s;)i.push(o[a++]);let v=s+h.nodeSize;if(h.isText){let y=v;a<o.length&&o[a].from<y&&(y=o[a].from);for(let b=0;b<i.length;b++)i[b].to<y&&(y=i[b].to);y<v&&(l=h.cut(y-s),h=h.cut(0,y-s),v=y,m=-1)}else for(;a<o.length&&o[a].to<v;)a++;let g=h.isInline&&!h.isLeaf?i.filter(y=>!y.inline):i.slice();n(h,g,e.forChild(s,h),m),s=v}}function fW(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function pW(t,e,r,n){for(let o=0,s=0;o<t.childCount&&s<=n;){let a=t.child(o++),i=s;if(s+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<t.childCount;){let c=t.child(o++);if(s+=c.nodeSize,!c.isText)break;l+=c.text}if(s>=r){if(s>=n&&l.slice(n-e.length-i,n-i)==e)return n-e.length;let c=i<n?l.lastIndexOf(e,n-i-1):-1;if(c>=0&&c+e.length+i>=r)return i+c;if(r==n&&l.length>=n+e.length-i&&l.slice(n-i,n-i+e.length)==e)return n}}return-1}function Ru(t,e,r,n,o){let s=[];for(let a=0,i=0;a<t.length;a++){let l=t[a],c=i,d=i+=l.size;c>=r||d<=e?s.push(l):(c<e&&s.push(l.slice(0,e-c,n)),o&&(s.push(o),o=void 0),d>r&&s.push(l.slice(r-c,l.size,n)))}return s}function zp(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let o=t.docView.nearestDesc(r.focusNode),s=o&&o.size==0,a=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(a<0)return null;let i=n.resolve(a),l,c;if(vc(r)){for(l=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&ce.isSelectable(f)&&o.parent&&!(f.isInline&&B6(r.focusNode,r.focusOffset,o.dom))){let h=o.posBefore;c=new ce(a==h?i:n.resolve(h))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let f=a,h=a;for(let m=0;m<r.rangeCount;m++){let v=r.getRangeAt(m);f=Math.min(f,t.docView.posFromDOM(v.startContainer,v.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(f<0)return null;[l,a]=h==t.state.selection.anchor?[h,f]:[f,h],i=n.resolve(a)}else l=t.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(l<0)return null}let d=n.resolve(l);if(!c){let f=e=="pointer"||t.state.selection.head<i.pos&&!s?1:-1;c=Bp(t,d,i,f)}return c}function nS(t){return t.editable?t.hasFocus():sS(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function $r(t,e=!1){let r=t.state.selection;if(oS(t,r),!!nS(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&st){let n=t.domSelectionRange(),o=t.domObserver.currentSelection;if(n.anchorNode&&o.anchorNode&&eo(n.anchorNode,n.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)mW(t);else{let{anchor:n,head:o}=r,s,a;Cg&&!(r instanceof fe)&&(r.$from.parent.inlineContent||(s=Sg(t,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(a=Sg(t,r.to))),t.docView.setSelection(n,o,t,e),Cg&&(s&&Mg(s),a&&Mg(a)),r.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&hW(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Cg=lt||st&&WC<63;function Sg(t,e){let{node:r,offset:n}=t.docView.domFromPos(e,0),o=n<r.childNodes.length?r.childNodes[n]:null,s=n?r.childNodes[n-1]:null;if(lt&&o&&o.contentEditable=="false")return Nd(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Nd(o);if(s)return Nd(s)}}function Nd(t){return t.contentEditable="true",lt&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Mg(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function hW(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let r=t.domSelectionRange(),n=r.anchorNode,o=r.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(r.anchorNode!=n||r.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!nS(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function mW(t){let e=t.domSelection();if(!e)return;let r=t.cursorWrapper.dom,n=r.nodeName=="IMG";n?e.collapse(r.parentNode,nt(r)+1):e.collapse(r,0),!n&&!t.state.selection.visible&&wt&&fn<=11&&(r.disabled=!0,r.disabled=!1)}function oS(t,e){if(e instanceof ce){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(Eg(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else Eg(t)}function Eg(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Bp(t,e,r,n){return t.someProp("createSelectionBetween",o=>o(t,e,r))||fe.between(e,r,n)}function jg(t){return t.editable&&!t.hasFocus()?!1:sS(t)}function sS(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function gW(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return eo(e.node,e.offset,r.anchorNode,r.anchorOffset)}function Tu(t,e){let{$anchor:r,$head:n}=t.selection,o=e>0?r.max(n):r.min(n),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&ve.findFrom(s,e)}function en(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Rg(t,e,r){let n=t.state.selection;if(n instanceof fe)if(r.indexOf("s")>-1){let{$head:o}=n,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=t.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return en(t,new fe(n.$anchor,a))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Tu(t.state,e);return o&&o instanceof ce?en(t,o):!1}else if(!(Bt&&r.indexOf("m")>-1)){let o=n.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,a;if(!s||s.isText)return!1;let i=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(a=t.docView.descAt(i))&&!a.contentDOM?ce.isSelectable(s)?en(t,new ce(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):La?en(t,new fe(t.state.doc.resolve(e<0?i:i+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ce&&n.node.isInline)return en(t,new fe(e>0?n.$to:n.$from));{let o=Tu(t.state,e);return o?en(t,o):!1}}}function Ui(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ps(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function yo(t,e){return e<0?vW(t):yW(t)}function vW(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let o,s,a=!1;for(Vt&&r.nodeType==1&&n<Ui(r)&&Ps(r.childNodes[n],-1)&&(a=!0);;)if(n>0){if(r.nodeType!=1)break;{let i=r.childNodes[n-1];if(Ps(i,-1))o=r,s=--n;else if(i.nodeType==3)r=i,n=r.nodeValue.length;else break}}else{if(aS(r))break;{let i=r.previousSibling;for(;i&&Ps(i,-1);)o=r.parentNode,s=nt(i),i=i.previousSibling;if(i)r=i,n=Ui(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}a?Au(t,r,n):o&&Au(t,o,s)}function yW(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let o=Ui(r),s,a;for(;;)if(n<o){if(r.nodeType!=1)break;let i=r.childNodes[n];if(Ps(i,1))s=r,a=++n;else break}else{if(aS(r))break;{let i=r.nextSibling;for(;i&&Ps(i,1);)s=i.parentNode,a=nt(i)+1,i=i.nextSibling;if(i)r=i,n=0,o=Ui(r);else{if(r=r.parentNode,r==t.dom)break;n=o=0}}}s&&Au(t,s,a)}function aS(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function bW(t,e){for(;t&&e==t.childNodes.length&&!Pa(t);)e=nt(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let r=t.childNodes[e];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=0}}function xW(t,e){for(;t&&!e&&!Pa(t);)e=nt(t),t=t.parentNode;for(;t&&e;){let r=t.childNodes[e-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=t.childNodes.length}}function Au(t,e,r){if(e.nodeType!=3){let s,a;(a=bW(e,r))?(e=a,r=0):(s=xW(e,r))&&(e=s,r=s.nodeValue.length)}let n=t.domSelection();if(!n)return;if(vc(n)){let s=document.createRange();s.setEnd(e,r),s.setStart(e,r),n.removeAllRanges(),n.addRange(s)}else n.extend&&n.extend(e,r);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&$r(t)},50)}function Tg(t,e){let r=t.state.doc.resolve(e);if(!(st||UC)&&r.parent.inlineContent){let n=t.coordsAtPos(e);if(e>r.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(o.left-n.left)>1)return o.left<n.left?"ltr":"rtl"}if(e<r.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(o.left-n.left)>1)return o.left>n.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Ag(t,e,r){let n=t.state.selection;if(n instanceof fe&&!n.empty||r.indexOf("s")>-1||Bt&&r.indexOf("m")>-1)return!1;let{$from:o,$to:s}=n;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Tu(t.state,e);if(a&&a instanceof ce)return en(t,a)}if(!o.parent.inlineContent){let a=e<0?o:s,i=n instanceof Dt?ve.near(a,e):ve.findFrom(a,e);return i?en(t,i):!1}return!1}function Og(t,e){if(!(t.state.selection instanceof fe))return!0;let{$head:r,$anchor:n,empty:o}=t.state.selection;if(!r.sameParent(n))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let a=t.state.tr;return e<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),t.dispatch(a),!0}return!1}function Dg(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function wW(t){if(!lt||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;Dg(t,n,"true"),setTimeout(()=>Dg(t,n,"false"),20)}return!1}function kW(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function NW(t,e){let r=e.keyCode,n=kW(e);if(r==8||Bt&&r==72&&n=="c")return Og(t,-1)||yo(t,-1);if(r==46&&!e.shiftKey||Bt&&r==68&&n=="c")return Og(t,1)||yo(t,1);if(r==13||r==27)return!0;if(r==37||Bt&&r==66&&n=="c"){let o=r==37?Tg(t,t.state.selection.from)=="ltr"?-1:1:-1;return Rg(t,o,n)||yo(t,o)}else if(r==39||Bt&&r==70&&n=="c"){let o=r==39?Tg(t,t.state.selection.from)=="ltr"?1:-1:1;return Rg(t,o,n)||yo(t,o)}else{if(r==38||Bt&&r==80&&n=="c")return Ag(t,-1,n)||yo(t,-1);if(r==40||Bt&&r==78&&n=="c")return wW(t)||Ag(t,1,n)||yo(t,1);if(n==(Bt?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function $p(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let r=[],{content:n,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){o--,s--;let m=n.firstChild;r.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),n=m.content}let a=t.someProp("clipboardSerializer")||ao.fromSchema(t.state.schema),i=fS(),l=i.createElement("div");l.appendChild(a.serializeFragment(n,{document:i}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=uS[c.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let v=i.createElement(d[m]);for(;l.firstChild;)v.appendChild(l.firstChild);l.appendChild(v),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${s}${f?` -${f}`:""} ${JSON.stringify(r)}`);let h=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
438
+
439
+ `);return{dom:l,text:h,slice:e}}function iS(t,e,r,n,o){let s=o.parent.type.spec.code,a,i;if(!r&&!e)return null;let l=!!e&&(n||s||!r);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,s||n,t)}),s)return i=new re(U.from(t.state.schema.text(e.replace(/\r\n?/g,`
440
+ `))),0,0),t.someProp("transformPasted",h=>{i=h(i,t,!0)}),i;let f=t.someProp("clipboardTextParser",h=>h(e,o,n,t));if(f)i=f;else{let h=o.marks(),{schema:m}=t.state,v=ao.fromSchema(m);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=a.appendChild(document.createElement("p"));g&&y.appendChild(v.serializeNode(m.text(g,h)))})}}else t.someProp("transformPastedHTML",f=>{r=f(r,t)}),a=EW(r),La&&jW(a);let c=a&&a.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=a.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;a=h}if(i||(i=(t.someProp("clipboardParser")||t.someProp("domParser")||un.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!CW.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)i=RW(Ig(i,+d[1],+d[2]),d[4]);else if(i=re.maxOpen(SW(i.content,o),!0),i.openStart||i.openEnd){let f=0,h=0;for(let m=i.content.firstChild;f<i.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=i.content.lastChild;h<i.openEnd&&!m.type.spec.isolating;h++,m=m.lastChild);i=Ig(i,f,h)}return t.someProp("transformPasted",f=>{i=f(i,t,l)}),i}const CW=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function SW(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.index(r)),o,s=[];if(t.forEach(a=>{if(!s)return;let i=n.findWrapping(a.type),l;if(!i)return s=null;if(l=s.length&&o.length&&cS(i,o,a,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=dS(s[s.length-1],o.length));let c=lS(a,i);s.push(c),n=n.matchType(c.type),o=i}}),s)return U.from(s)}return t}function lS(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,U.from(t));return t}function cS(t,e,r,n,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=cS(t,e,r,n.lastChild,o+1);if(s)return n.copy(n.content.replaceChild(n.childCount-1,s));if(n.contentMatchAt(n.childCount).matchType(o==t.length-1?r.type:t[o+1]))return n.copy(n.content.append(U.from(lS(r,t,o+1))))}}function dS(t,e){if(e==0)return t;let r=t.content.replaceChild(t.childCount-1,dS(t.lastChild,e-1)),n=t.contentMatchAt(t.childCount).fillBefore(U.empty,!0);return t.copy(r.append(n))}function Ou(t,e,r,n,o,s){let a=e<0?t.firstChild:t.lastChild,i=a.content;return t.childCount>1&&(s=0),o<n-1&&(i=Ou(i,e,r,n,o+1,s)),o>=r&&(i=e<0?a.contentMatchAt(0).fillBefore(i,s<=o).append(i):i.append(a.contentMatchAt(a.childCount).fillBefore(U.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(i))}function Ig(t,e,r){return e<t.openStart&&(t=new re(Ou(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),r<t.openEnd&&(t=new re(Ou(t.content,1,r,t.openEnd,0,0),t.openStart,r)),t}const uS={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Pg=null;function fS(){return Pg||(Pg=document.implementation.createHTMLDocument("title"))}let Cd=null;function MW(t){let e=window.trustedTypes;return e?(Cd||(Cd=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:r=>r})),Cd.createHTML(t)):t}function EW(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=fS().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),o;if((o=n&&uS[n[1].toLowerCase()])&&(t=o.map(s=>"<"+s+">").join("")+t+o.map(s=>"</"+s+">").reverse().join("")),r.innerHTML=MW(t),o)for(let s=0;s<o.length;s++)r=r.querySelector(o[s])||r;return r}function jW(t){let e=t.querySelectorAll(st?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<e.length;r++){let n=e[r];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),n)}}function RW(t,e){if(!t.size)return t;let r=t.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return t}let{content:o,openStart:s,openEnd:a}=t;for(let i=n.length-2;i>=0;i-=2){let l=r.nodes[n[i]];if(!l||l.hasRequiredAttrs())break;o=U.from(l.create(n[i+1],o)),s++,a++}return new re(o,s,a)}const pt={},ht={},TW={touchstart:!0,touchmove:!0};class AW{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function OW(t){for(let e in pt){let r=pt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{IW(t,n)&&!Hp(t,n)&&(t.editable||!(n.type in ht))&&r(t,n)},TW[e]?{passive:!0}:void 0)}lt&&t.dom.addEventListener("input",()=>null),Du(t)}function ln(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function DW(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Du(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>Hp(t,n))})}function Hp(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function IW(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function PW(t,e){!Hp(t,e)&&pt[e.type]&&(t.editable||!(e.type in ht))&&pt[e.type](t,e)}ht.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!hS(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Fr&&st&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),Ho&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",o=>o(t,In(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||NW(t,r)?r.preventDefault():ln(t,"key")};ht.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};ht.keypress=(t,e)=>{let r=e;if(hS(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||Bt&&r.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof fe)||!n.$from.sameParent(n.$to)){let o=String.fromCharCode(r.charCode),s=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",a=>a(t,n.$from.pos,n.$to.pos,o,s))&&t.dispatch(s()),r.preventDefault()}};function bc(t){return{left:t.clientX,top:t.clientY}}function LW(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function Vp(t,e,r,n,o){if(n==-1)return!1;let s=t.state.doc.resolve(n);for(let a=s.depth+1;a>0;a--)if(t.someProp(e,i=>a>s.depth?i(t,r,s.nodeAfter,s.before(a),o,!0):i(t,r,s.node(a),s.before(a),o,!1)))return!0;return!1}function Io(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function FW(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&ce.isSelectable(n)?(Io(t,new ce(r)),!0):!1}function _W(t,e){if(e==-1)return!1;let r=t.state.selection,n,o;r instanceof ce&&(n=r.node);let s=t.state.doc.resolve(e);for(let a=s.depth+1;a>0;a--){let i=a>s.depth?s.nodeAfter:s.node(a);if(ce.isSelectable(i)){n&&r.$from.depth>0&&a>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?o=s.before(r.$from.depth):o=s.before(a);break}}return o!=null?(Io(t,ce.create(t.state.doc,o)),!0):!1}function zW(t,e,r,n,o){return Vp(t,"handleClickOn",e,r,n)||t.someProp("handleClick",s=>s(t,e,n))||(o?_W(t,r):FW(t,r))}function BW(t,e,r,n){return Vp(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",o=>o(t,e,n))}function $W(t,e,r,n){return Vp(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",o=>o(t,e,n))||HW(t,r,n)}function HW(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Io(t,fe.create(n,0,n.content.size)),!0):!1;let o=n.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s),i=o.before(s);if(a.inlineContent)Io(t,fe.create(n,i+1,i+1+a.content.size));else if(ce.isSelectable(a))Io(t,ce.create(n,i));else continue;return!0}}function Wp(t){return Gi(t)}const pS=Bt?"metaKey":"ctrlKey";pt.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=Wp(t),o=Date.now(),s="singleClick";o-t.input.lastClick.time<500&&LW(r,t.input.lastClick)&&!r[pS]&&t.input.lastClick.button==r.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:o,x:r.clientX,y:r.clientY,type:s,button:r.button};let a=t.posAtCoords(bc(r));a&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new VW(t,a,r,!!n)):(s=="doubleClick"?BW:$W)(t,a.pos,a.inside,r)?r.preventDefault():ln(t,"pointer"))};class VW{constructor(e,r,n,o){this.view=e,this.pos=r,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[pS],this.allowDefault=n.shiftKey;let s,a;if(r.inside>-1)s=e.state.doc.nodeAt(r.inside),a=r.inside;else{let d=e.state.doc.resolve(r.pos);s=d.parent,a=d.depth?d.before():0}const i=o?null:n.target,l=i?e.docView.nearestDesc(i,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof ce&&c.from<=a&&c.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Vt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ln(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>$r(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(bc(e))),this.updateAllowDefault(e),this.allowDefault||!r?ln(this.view,"pointer"):zW(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||lt&&this.mightDrag&&!this.mightDrag.node.isAtom||st&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Io(this.view,ve.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):ln(this.view,"pointer")}move(e){this.updateAllowDefault(e),ln(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}pt.touchstart=t=>{t.input.lastTouch=Date.now(),Wp(t),ln(t,"pointer")};pt.touchmove=t=>{t.input.lastTouch=Date.now(),ln(t,"pointer")};pt.contextmenu=t=>Wp(t);function hS(t,e){return t.composing?!0:lt&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const WW=Fr?5e3:-1;ht.compositionstart=ht.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof fe&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)||st&&UC&&UW(t)))t.markCursor=t.state.storedMarks||r.marks(),Gi(t,!0),t.markCursor=null;else if(Gi(t,!e.selection.empty),Vt&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let o=n.focusNode,s=n.focusOffset;o&&o.nodeType==1&&s!=0;){let a=s<0?o.lastChild:o.childNodes[s-1];if(!a)break;if(a.nodeType==3){let i=t.domSelection();i&&i.collapse(a,a.nodeValue.length);break}else o=a,s=-1}}t.input.composing=!0}mS(t,WW)};function UW(t){let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(!e||e.nodeType!=1||r>=e.childNodes.length)return!1;let n=e.childNodes[r];return n.nodeType==1&&n.contentEditable=="false"}ht.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,mS(t,20))};function mS(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Gi(t),e))}function gS(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=qW());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function GW(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=_6(e.focusNode,e.focusOffset),n=z6(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let o=n.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(r==s||n==s)return s;if(!o||!o.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let a=r.pmViewDesc;if(!(!a||!a.isText(r.nodeValue)))return n}}return r||n}function qW(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Gi(t,e=!1){if(!(Fr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),gS(t),e||t.docView&&t.docView.dirty){let r=zp(t),n=t.state.selection;return r&&!r.eq(n)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function KW(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const ta=wt&&fn<15||Ho&&V6<604;pt.copy=ht.cut=(t,e)=>{let r=e,n=t.state.selection,o=r.type=="cut";if(n.empty)return;let s=ta?null:r.clipboardData,a=n.content(),{dom:i,text:l}=$p(t,a);s?(r.preventDefault(),s.clearData(),s.setData("text/html",i.innerHTML),s.setData("text/plain",l)):KW(t,i),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function YW(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function JW(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?ra(t,n.value,null,o,e):ra(t,n.textContent,n.innerHTML,o,e)},50)}function ra(t,e,r,n,o){let s=iS(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,s||re.empty)))return!0;if(!s)return!1;let a=YW(s),i=a?t.state.tr.replaceSelectionWith(a,n):t.state.tr.replaceSelection(s);return t.dispatch(i.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function vS(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}ht.paste=(t,e)=>{let r=e;if(t.composing&&!Fr)return;let n=ta?null:r.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&ra(t,vS(n),n.getData("text/html"),o,r)?r.preventDefault():JW(t,r)};class yS{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const XW=Bt?"altKey":"ctrlKey";function bS(t,e){return t.someProp("dragCopies",n=>!n(e))??!e[XW]}pt.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let o=t.state.selection,s=o.empty?null:t.posAtCoords(bc(r)),a;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof ce?o.to-1:o.to))){if(n&&n.mightDrag)a=ce.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let f=t.docView.nearestDesc(r.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(a=ce.create(t.state.doc,f.posBefore))}}let i=(a||t.state.selection).content(),{dom:l,text:c,slice:d}=$p(t,i);(!r.dataTransfer.files.length||!st||WC>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(ta?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",ta||r.dataTransfer.setData("text/plain",c),t.dragging=new yS(d,bS(t,r),a)};pt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};ht.dragover=ht.dragenter=(t,e)=>e.preventDefault();ht.drop=(t,e)=>{try{ZW(t,e,t.dragging)}finally{t.dragging=null}};function ZW(t,e,r){if(!e.dataTransfer)return;let n=t.posAtCoords(bc(e));if(!n)return;let o=t.state.doc.resolve(n.pos),s=r&&r.slice;s?t.someProp("transformPasted",m=>{s=m(s,t,!1)}):s=iS(t,vS(e.dataTransfer),ta?null:e.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&bS(t,e));if(t.someProp("handleDrop",m=>m(t,e,s||re.empty,a))){e.preventDefault();return}if(!s)return;e.preventDefault();let i=s?NC(t.state.doc,o.pos,s):o.pos;i==null&&(i=o.pos);let l=t.state.tr;if(a){let{node:m}=r;m?m.replace(l):l.deleteSelection()}let c=l.mapping.map(i),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=l.doc;if(d?l.replaceRangeWith(c,c,s.content.firstChild):l.replaceRange(c,c,s),l.doc.eq(f))return;let h=l.doc.resolve(c);if(d&&ce.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))l.setSelection(new ce(h));else{let m=l.mapping.map(i);l.mapping.maps[l.mapping.maps.length-1].forEach((v,g,y,b)=>m=b),l.setSelection(Bp(t,h,l.doc.resolve(m)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}pt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&$r(t)},20))};pt.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};pt.beforeinput=(t,e)=>{if(st&&Fr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,In(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let t in ht)pt[t]=ht[t];function na(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class qi{constructor(e,r){this.toDOM=e,this.spec=r||Hn,this.side=this.spec.side||0}map(e,r,n,o){let{pos:s,deleted:a}=e.mapResult(r.from+o,this.side<0?-1:1);return a?null:new ft(s-n,s-n,this)}valid(){return!0}eq(e){return this==e||e instanceof qi&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&na(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class hn{constructor(e,r){this.attrs=e,this.spec=r||Hn}map(e,r,n,o){let s=e.map(r.from+o,this.spec.inclusiveStart?-1:1)-n,a=e.map(r.to+o,this.spec.inclusiveEnd?1:-1)-n;return s>=a?null:new ft(s,a,this)}valid(e,r){return r.from<r.to}eq(e){return this==e||e instanceof hn&&na(this.attrs,e.attrs)&&na(this.spec,e.spec)}static is(e){return e.type instanceof hn}destroy(){}}class Up{constructor(e,r){this.attrs=e,this.spec=r||Hn}map(e,r,n,o){let s=e.mapResult(r.from+o,1);if(s.deleted)return null;let a=e.mapResult(r.to+o,-1);return a.deleted||a.pos<=s.pos?null:new ft(s.pos-n,a.pos-n,this)}valid(e,r){let{index:n,offset:o}=e.content.findIndex(r.from),s;return o==r.from&&!(s=e.child(n)).isText&&o+s.nodeSize==r.to}eq(e){return this==e||e instanceof Up&&na(this.attrs,e.attrs)&&na(this.spec,e.spec)}destroy(){}}class ft{constructor(e,r,n){this.from=e,this.to=r,this.type=n}copy(e,r){return new ft(e,r,this.type)}eq(e,r=0){return this.type.eq(e.type)&&this.from+r==e.from&&this.to+r==e.to}map(e,r,n){return this.type.map(e,this,r,n)}static widget(e,r,n){return new ft(e,e,new qi(r,n))}static inline(e,r,n,o){return new ft(e,r,new hn(n,o))}static node(e,r,n,o){return new ft(e,r,new Up(n,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof hn}get widget(){return this.type instanceof qi}}const Co=[],Hn={};class Pe{constructor(e,r){this.local=e.length?e:Co,this.children=r.length?r:Co}static create(e,r){return r.length?Ki(r,e,0,Hn):at}find(e,r,n){let o=[];return this.findInner(e??0,r??1e9,o,0,n),o}findInner(e,r,n,o,s){for(let a=0;a<this.local.length;a++){let i=this.local[a];i.from<=r&&i.to>=e&&(!s||s(i.spec))&&n.push(i.copy(i.from+o,i.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<r&&this.children[a+1]>e){let i=this.children[a]+1;this.children[a+2].findInner(e-i,r-i,n,o+i,s)}}map(e,r,n){return this==at||e.maps.length==0?this:this.mapInner(e,r,0,0,n||Hn)}mapInner(e,r,n,o,s){let a;for(let i=0;i<this.local.length;i++){let l=this.local[i].map(e,n,o);l&&l.type.valid(r,l)?(a||(a=[])).push(l):s.onRemove&&s.onRemove(this.local[i].spec)}return this.children.length?QW(this.children,a||[],e,r,n,o,s):a?new Pe(a.sort(Vn),Co):at}add(e,r){return r.length?this==at?Pe.create(e,r):this.addInner(e,r,0):this}addInner(e,r,n){let o,s=0;e.forEach((i,l)=>{let c=l+n,d;if(d=wS(r,i,c)){for(o||(o=this.children.slice());s<o.length&&o[s]<l;)s+=3;o[s]==l?o[s+2]=o[s+2].addInner(i,d,c+1):o.splice(s,0,l,l+i.nodeSize,Ki(d,i,c+1,Hn)),s+=3}});let a=xS(s?kS(r):r,-n);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||a.splice(i--,1);return new Pe(a.length?this.local.concat(a).sort(Vn):this.local,o||this.children)}remove(e){return e.length==0||this==at?this:this.removeInner(e,0)}removeInner(e,r){let n=this.children,o=this.local;for(let s=0;s<n.length;s+=3){let a,i=n[s]+r,l=n[s+1]+r;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>i&&f.to<l&&(e[d]=null,(a||(a=[])).push(f));if(!a)continue;n==this.children&&(n=this.children.slice());let c=n[s+2].removeInner(a,i+1);c!=at?n[s+2]=c:(n.splice(s,3),s-=3)}if(o.length){for(let s=0,a;s<e.length;s++)if(a=e[s])for(let i=0;i<o.length;i++)o[i].eq(a,r)&&(o==this.local&&(o=this.local.slice()),o.splice(i--,1))}return n==this.children&&o==this.local?this:o.length||n.length?new Pe(o,n):at}forChild(e,r){if(this==at)return this;if(r.isLeaf)return Pe.empty;let n,o;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(n=this.children[i+2]);break}let s=e+1,a=s+r.content.size;for(let i=0;i<this.local.length;i++){let l=this.local[i];if(l.from<a&&l.to>s&&l.type instanceof hn){let c=Math.max(s,l.from)-s,d=Math.min(a,l.to)-s;c<d&&(o||(o=[])).push(l.copy(c,d))}}if(o){let i=new Pe(o.sort(Vn),Co);return n?new nn([i,n]):i}return n||at}eq(e){if(this==e)return!0;if(!(e instanceof Pe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let r=0;r<this.local.length;r++)if(!this.local[r].eq(e.local[r]))return!1;for(let r=0;r<this.children.length;r+=3)if(this.children[r]!=e.children[r]||this.children[r+1]!=e.children[r+1]||!this.children[r+2].eq(e.children[r+2]))return!1;return!0}locals(e){return Gp(this.localsInner(e))}localsInner(e){if(this==at)return Co;if(e.inlineContent||!this.local.some(hn.is))return this.local;let r=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof hn||r.push(this.local[n]);return r}forEachSet(e){e(this)}}Pe.empty=new Pe([],[]);Pe.removeOverlap=Gp;const at=Pe.empty;class nn{constructor(e){this.members=e}map(e,r){const n=this.members.map(o=>o.map(e,r,Hn));return nn.from(n)}forChild(e,r){if(r.isLeaf)return Pe.empty;let n=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,r);s!=at&&(s instanceof nn?n=n.concat(s.members):n.push(s))}return nn.from(n)}eq(e){if(!(e instanceof nn)||e.members.length!=this.members.length)return!1;for(let r=0;r<this.members.length;r++)if(!this.members[r].eq(e.members[r]))return!1;return!0}locals(e){let r,n=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!r)r=s;else{n&&(r=r.slice(),n=!1);for(let a=0;a<s.length;a++)r.push(s[a])}}return r?Gp(n?r:r.sort(Vn)):Co}static from(e){switch(e.length){case 0:return at;case 1:return e[0];default:return new nn(e.every(r=>r instanceof Pe)?e:e.reduce((r,n)=>r.concat(n instanceof Pe?n:n.members),[]))}}forEachSet(e){for(let r=0;r<this.members.length;r++)this.members[r].forEachSet(e)}}function QW(t,e,r,n,o,s,a){let i=t.slice();for(let c=0,d=s;c<r.maps.length;c++){let f=0;r.maps[c].forEach((h,m,v,g)=>{let y=g-v-(m-h);for(let b=0;b<i.length;b+=3){let x=i[b+1];if(x<0||h>x+d-f)continue;let w=i[b]+d-f;m>=w?i[b+1]=h<=w?-2:-1:h>=d&&y&&(i[b]+=y,i[b+1]+=y)}f+=y}),d=r.maps[c].map(d,-1)}let l=!1;for(let c=0;c<i.length;c+=3)if(i[c+1]<0){if(i[c+1]==-2){l=!0,i[c+1]=-1;continue}let d=r.map(t[c]+s),f=d-o;if(f<0||f>=n.content.size){l=!0;continue}let h=r.map(t[c+1]+s,-1),m=h-o,{index:v,offset:g}=n.content.findIndex(f),y=n.maybeChild(v);if(y&&g==f&&g+y.nodeSize==m){let b=i[c+2].mapInner(r,y,d+1,t[c]+s+1,a);b!=at?(i[c]=f,i[c+1]=m,i[c+2]=b):(i[c+1]=-2,l=!0)}else l=!0}if(l){let c=e8(i,t,e,r,o,s,a),d=Ki(c,n,0,a);e=d.local;for(let f=0;f<i.length;f+=3)i[f+1]<0&&(i.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let m=d.children[f];for(;h<i.length&&i[h]<m;)h+=3;i.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new Pe(e.sort(Vn),i)}function xS(t,e){if(!e||!t.length)return t;let r=[];for(let n=0;n<t.length;n++){let o=t[n];r.push(new ft(o.from+e,o.to+e,o.type))}return r}function e8(t,e,r,n,o,s,a){function i(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(n,o,c);f?r.push(f):a.onRemove&&a.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)i(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&i(t[l+2],e[l]+s+1);return r}function wS(t,e,r){if(e.isLeaf)return null;let n=r+e.nodeSize,o=null;for(let s=0,a;s<t.length;s++)(a=t[s])&&a.from>r&&a.to<n&&((o||(o=[])).push(a),t[s]=null);return o}function kS(t){let e=[];for(let r=0;r<t.length;r++)t[r]!=null&&e.push(t[r]);return e}function Ki(t,e,r,n){let o=[],s=!1;e.forEach((i,l)=>{let c=wS(t,i,l+r);if(c){s=!0;let d=Ki(c,i,r+l+1,n);d!=at&&o.push(l,l+i.nodeSize,d)}});let a=xS(s?kS(t):t,-r).sort(Vn);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||(n.onRemove&&n.onRemove(a[i].spec),a.splice(i--,1));return a.length||o.length?new Pe(a,o):at}function Vn(t,e){return t.from-e.from||t.to-e.to}function Gp(t){let e=t;for(let r=0;r<e.length-1;r++){let n=e[r];if(n.from!=n.to)for(let o=r+1;o<e.length;o++){let s=e[o];if(s.from==n.from){s.to!=n.to&&(e==t&&(e=t.slice()),e[o]=s.copy(s.from,n.to),Lg(e,o+1,s.copy(n.to,s.to)));continue}else{s.from<n.to&&(e==t&&(e=t.slice()),e[r]=n.copy(n.from,s.from),Lg(e,o,n.copy(s.from,n.to)));break}}}return e}function Lg(t,e,r){for(;e<t.length&&Vn(r,t[e])>0;)e++;t.splice(e,0,r)}function Sd(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=at&&e.push(n)}),t.cursorWrapper&&e.push(Pe.create(t.state.doc,[t.cursorWrapper.deco])),nn.from(e)}const t8={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},r8=wt&&fn<=11;class n8{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class o8{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new n8,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let o=0;o<n.length;o++)this.queue.push(n[o]);wt&&fn<=11&&n.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():lt&&e.composing&&n.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),r8&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,t8)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let r=0;r<e.length;r++)this.queue.push(e[r]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(jg(this.view)){if(this.suppressingSelectionUpdates)return $r(this.view);if(wt&&fn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&eo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let r=new Set,n;for(let s=e.focusNode;s;s=$o(s))r.add(s);for(let s=e.anchorNode;s;s=$o(s))if(r.has(s)){n=s;break}let o=n&&this.view.docView.nearestDesc(n);if(o&&o.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&jg(e)&&!this.ignoreSelectionChange(n),s=-1,a=-1,i=!1,l=[];if(e.editable)for(let d=0;d<r.length;d++){let f=this.registerMutation(r[d],l);f&&(s=s<0?f.from:Math.min(f.from,s),a=a<0?f.to:Math.max(f.to,a),f.typeOver&&(i=!0))}if(l.some(d=>d.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let d of l)if(d.nodeName=="BR"&&d.parentNode){let f=d.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&d.parentNode.removeChild(d)}}else if(Vt&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,h]=d;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of d){let m=h.parentNode;m&&m.nodeName=="LI"&&(!f||i8(e,f)!=m)&&h.remove()}}}let c=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&vc(n)&&(c=zp(e))&&c.eq(ve.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,$r(e),this.currentSelection.set(n),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,a),s8(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,l8(e,l)),this.handleDOMChange(s,a,i,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||$r(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];r.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let o=e.previousSibling,s=e.nextSibling;if(wt&&fn<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h)}let a=o&&o.parentNode==e.target?nt(o)+1:0,i=n.localPosFromDOM(e.target,a,-1),l=s&&s.parentNode==e.target?nt(s):e.target.childNodes.length,c=n.localPosFromDOM(e.target,l,1);return{from:i,to:c}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Fg=new WeakMap,_g=!1;function s8(t){if(!Fg.has(t)&&(Fg.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Vt,_g)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),_g=!0}}function zg(t,e){let r=e.startContainer,n=e.startOffset,o=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return eo(a.node,a.offset,o,s)&&([r,n,o,s]=[o,s,r,n]),{anchorNode:r,anchorOffset:n,focusNode:o,focusOffset:s}}function a8(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return zg(t,o)}let r;function n(o){o.preventDefault(),o.stopImmediatePropagation(),r=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0),r?zg(t,r):null}function i8(t,e){for(let r=e.parentNode;r&&r!=t.dom;r=r.parentNode){let n=t.docView.nearestDesc(r,!0);if(n&&n.node.isBlock)return r}return null}function l8(t,e){var r;let{focusNode:n,focusOffset:o}=t.domSelectionRange();for(let s of e)if(((r=s.parentNode)===null||r===void 0?void 0:r.nodeName)=="TR"){let a=s.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let i=a;for(;;){let l=i.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;i=l}i.insertBefore(s,i.firstChild),n==s&&t.domSelection().collapse(s,o)}else s.parentNode.removeChild(s)}}function c8(t,e,r){let{node:n,fromOffset:o,toOffset:s,from:a,to:i}=t.docView.parseRange(e,r),l=t.domSelectionRange(),c,d=l.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],vc(l)||c.push({node:l.focusNode,offset:l.focusOffset})),st&&t.input.lastKeyCode===8)for(let y=s;y>o;y--){let b=n.childNodes[y-1],x=b.pmViewDesc;if(b.nodeName=="BR"&&!x){s=y;break}if(!x||x.size)break}let f=t.state.doc,h=t.someProp("domParser")||un.fromSchema(t.state.schema),m=f.resolve(a),v=null,g=h.parse(n,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:o,to:s,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:d8,context:m});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),v={anchor:y+a,head:b+a}}return{doc:g,sel:v,from:a,to:i}}function d8(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(lt&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||lt&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const u8=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function f8(t,e,r,n,o){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,M=zp(t,C);if(M&&!t.state.selection.eq(M)){if(st&&Fr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",A=>A(t,In(13,"Enter"))))return;let E=t.state.tr.setSelection(M);C=="pointer"?E.setMeta("pointer",!0):C=="key"&&E.scrollIntoView(),s&&E.setMeta("composition",s),t.dispatch(E)}return}let a=t.state.doc.resolve(e),i=a.sharedDepth(r);e=a.before(i+1),r=t.state.doc.resolve(r).after(i+1);let l=t.state.selection,c=c8(t,e,r),d=t.state.doc,f=d.slice(c.from,c.to),h,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,m="end"):(h=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let v=m8(f.content,c.doc.content,c.from,h,m);if(v&&t.input.domChangeCount++,(Ho&&t.input.lastIOSEnter>Date.now()-225||Fr)&&o.some(C=>C.nodeType==1&&!u8.test(C.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",C=>C(t,In(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!v)if(n&&l instanceof fe&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))v={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=Bg(t,t.state.doc,c.sel);if(C&&!C.eq(t.state.selection)){let M=t.state.tr.setSelection(C);s&&M.setMeta("composition",s),t.dispatch(M)}}return}t.state.selection.from<t.state.selection.to&&v.start==v.endB&&t.state.selection instanceof fe&&(v.start>t.state.selection.from&&v.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?v.start=t.state.selection.from:v.endA<t.state.selection.to&&v.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(v.endB+=t.state.selection.to-v.endA,v.endA=t.state.selection.to)),wt&&fn<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>c.from&&c.doc.textBetween(v.start-c.from-1,v.start-c.from+1)=="  "&&(v.start--,v.endA--,v.endB--);let g=c.doc.resolveNoCache(v.start-c.from),y=c.doc.resolveNoCache(v.endB-c.from),b=d.resolve(v.start),x=g.sameParent(y)&&g.parent.inlineContent&&b.end()>=v.endA;if((Ho&&t.input.lastIOSEnter>Date.now()-225&&(!x||o.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!x&&g.pos<c.doc.content.size&&(!g.sameParent(y)||!g.parent.inlineContent)&&g.pos<y.pos&&!/\S/.test(c.doc.textBetween(g.pos,y.pos,"","")))&&t.someProp("handleKeyDown",C=>C(t,In(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&h8(d,v.start,v.endA,g,y)&&t.someProp("handleKeyDown",C=>C(t,In(8,"Backspace")))){Fr&&st&&t.domObserver.suppressSelectionUpdates();return}st&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),Fr&&!x&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==v.endA&&(v.endB-=2,y=c.doc.resolveNoCache(v.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,In(13,"Enter"))})},20));let w=v.start,k=v.endA,N=C=>{let M=C||t.state.tr.replace(w,k,c.doc.slice(v.start-c.from,v.endB-c.from));if(c.sel){let E=Bg(t,M.doc,c.sel);E&&!(st&&t.composing&&E.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(E.head==w||E.head==M.mapping.map(k)-1)||wt&&E.empty&&E.head==w)&&M.setSelection(E)}return s&&M.setMeta("composition",s),M.scrollIntoView()},S;if(x)if(g.pos==y.pos){wt&&fn<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>$r(t),20));let C=N(t.state.tr.delete(w,k)),M=d.resolve(v.start).marksAcross(d.resolve(v.endA));M&&C.ensureMarks(M),t.dispatch(C)}else if(v.endA==v.endB&&(S=p8(g.parent.content.cut(g.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,v.endA-b.start())))){let C=N(t.state.tr);S.type=="add"?C.addMark(w,k,S.mark):C.removeMark(w,k,S.mark),t.dispatch(C)}else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let C=g.parent.textBetween(g.parentOffset,y.parentOffset),M=()=>N(t.state.tr.insertText(C,w,k));t.someProp("handleTextInput",E=>E(t,w,k,C,M))||t.dispatch(M())}else t.dispatch(N());else t.dispatch(N())}function Bg(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:Bp(t,e.resolve(r.anchor),e.resolve(r.head))}function p8(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,o=r,s=n,a,i,l;for(let d=0;d<n.length;d++)o=n[d].removeFromSet(o);for(let d=0;d<r.length;d++)s=r[d].removeFromSet(s);if(o.length==1&&s.length==0)i=o[0],a="add",l=d=>d.mark(i.addToSet(d.marks));else if(o.length==0&&s.length==1)i=s[0],a="remove",l=d=>d.mark(i.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(U.from(c).eq(t))return{mark:i,type:a}}function h8(t,e,r,n,o){if(r-e<=o.pos-n.pos||Md(n,!0,!1)<o.pos)return!1;let s=t.resolve(e);if(!n.parent.isTextblock){let i=s.nodeAfter;return i!=null&&r==e+i.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=t.resolve(Md(s,!0,!0));return!a.parent.isTextblock||a.pos>r||Md(a,!0,!1)<r?!1:n.parent.content.cut(n.parentOffset).eq(a.parent.content)}function Md(t,e,r){let n=t.depth,o=e?t.end():t.pos;for(;n>0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,o++,e=!1;if(r){let s=t.node(n).maybeChild(t.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function m8(t,e,r,n,o){let s=t.findDiffStart(e,r);if(s==null)return null;let{a,b:i}=t.findDiffEnd(e,r+t.size,r+e.size);if(o=="end"){let l=Math.max(0,s-Math.min(a,i));n-=a+l-s}if(a<s&&t.size<e.size){let l=n<=s&&n>=a?s-n:0;s-=l,s&&s<e.size&&$g(e.textBetween(s-1,s+1))&&(s+=l?1:-1),i=s+(i-a),a=s}else if(i<s){let l=n<=s&&n>=i?s-n:0;s-=l,s&&s<t.size&&$g(t.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-i),i=s}return{start:s,endA:a,endB:i}}function $g(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),r=t.charCodeAt(1);return e>=56320&&e<=57343&&r>=55296&&r<=56319}class NS{constructor(e,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new AW,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(Gg),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Wg(this),Vg(this),this.nodeViews=Ug(this),this.docView=kg(this.state.doc,Hg(this),Sd(this),this.dom,this),this.domObserver=new o8(this,(n,o,s,a)=>f8(this,n,o,s,a)),this.domObserver.start(),OW(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Du(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Gg),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let o=this.state,s=!1,a=!1;e.storedMarks&&this.composing&&(gS(this),a=!0),this.state=e;let i=o.plugins!=e.plugins||this._props.plugins!=r.plugins;if(i||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let m=Ug(this);v8(m,this.nodeViews)&&(this.nodeViews=m,s=!0)}(i||r.handleDOMEvents!=this._props.handleDOMEvents)&&Du(this),this.editable=Wg(this),Vg(this);let l=Sd(this),c=Hg(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=s||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(o.selection))&&(a=!0);let h=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&G6(this);if(a){this.domObserver.stop();let m=f&&(wt||st)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&g8(o.selection,e.selection);if(f){let v=st?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=GW(this)),(s||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=kg(e.doc,c,l,this.dom,this)),v&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&gW(this))?$r(this,m):(oS(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((n=this.dragging)===null||n===void 0)&&n.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&q6(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof ce){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&gg(this,r.getBoundingClientRect(),e)}else gg(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r<this.directPlugins.length;r++){let n=this.directPlugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let r=0;r<this.state.plugins.length;r++){let n=this.state.plugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let r=0;r<this.pluginViews.length;r++){let n=this.pluginViews[r];n.update&&n.update(this,e)}}updateDraggedNode(e,r){let n=e.node,o=-1;if(this.state.doc.nodeAt(n.from)==n.node)o=n.from;else{let s=n.from+(this.state.doc.content.size-r.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==n.node&&(o=s)}this.dragging=new yS(e.slice,e.move,o<0?void 0:ce.create(this.state.doc,o))}someProp(e,r){let n=this._props&&this._props[e],o;if(n!=null&&(o=r?r(n):n))return o;for(let a=0;a<this.directPlugins.length;a++){let i=this.directPlugins[a].props[e];if(i!=null&&(o=r?r(i):i))return o}let s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let i=s[a].props[e];if(i!=null&&(o=r?r(i):i))return o}}hasFocus(){if(wt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&K6(this.dom),$r(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let r=this.dom.parentNode;r;r=r.parentNode)if(r.nodeType==9||r.nodeType==11&&r.host)return r.getSelection||(Object.getPrototypeOf(r).getSelection=()=>r.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Q6(this,e)}coordsAtPos(e,r=1){return JC(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let o=this.docView.posFromDOM(e,r,n);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,r){return oW(this,r||this.state,e)}pasteHTML(e,r){return ra(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return ra(this,e,null,!0,r||new ClipboardEvent("paste"))}serializeForClipboard(e){return $p(this,e)}destroy(){this.docView&&(DW(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sd(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,L6())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return PW(this,e)}domSelectionRange(){let e=this.domSelection();return e?lt&&this.root.nodeType===11&&$6(this.dom.ownerDocument)==this.dom&&a8(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}NS.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Hg(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[ft.node(0,t.state.doc.content.size,e)]}function Vg(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:ft.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Wg(t){return!t.someProp("editable",e=>e(t.state)===!1)}function g8(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function Ug(t){let e=Object.create(null);function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=n[o])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function v8(t,e){let r=0,n=0;for(let o in t){if(t[o]!=e[o])return!0;r++}for(let o in e)n++;return r!=n}function Gg(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var yn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Yi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},y8=typeof navigator<"u"&&/Mac/.test(navigator.platform),b8=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ot=0;ot<10;ot++)yn[48+ot]=yn[96+ot]=String(ot);for(var ot=1;ot<=24;ot++)yn[ot+111]="F"+ot;for(var ot=65;ot<=90;ot++)yn[ot]=String.fromCharCode(ot+32),Yi[ot]=String.fromCharCode(ot);for(var Ed in yn)Yi.hasOwnProperty(Ed)||(Yi[Ed]=yn[Ed]);function x8(t){var e=y8&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||b8&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?Yi:yn)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const w8=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),k8=typeof navigator<"u"&&/Win/.test(navigator.platform);function N8(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,o,s,a;for(let i=0;i<e.length-1;i++){let l=e[i];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))w8?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function C8(t){let e=Object.create(null);for(let r in t)e[N8(r)]=t[r];return e}function jd(t,e,r=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),r&&e.shiftKey&&(t="Shift-"+t),t}function S8(t){return new Fe({props:{handleKeyDown:CS(t)}})}function CS(t){let e=C8(t);return function(r,n){let o=x8(n),s,a=e[jd(o,n)];if(a&&a(r.state,r.dispatch,r))return!0;if(o.length==1&&o!=" "){if(n.shiftKey){let i=e[jd(o,n,!1)];if(i&&i(r.state,r.dispatch,r))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(k8&&n.ctrlKey&&n.altKey)&&(s=yn[n.keyCode])&&s!=o){let i=e[jd(s,n)];if(i&&i(r.state,r.dispatch,r))return!0}}return!1}}var M8=Object.defineProperty,qp=(t,e)=>{for(var r in e)M8(t,r,{get:e[r],enumerable:!0})};function xc(t){const{state:e,transaction:r}=t;let{selection:n}=r,{doc:o}=r,{storedMarks:s}=r;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return n},get doc(){return o},get tr(){return n=r.selection,o=r.doc,s=r.storedMarks,r}}}var wc=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:r}=this,{view:n}=e,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,i])=>[a,(...l)=>{const c=i(...l)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&n.dispatch(o),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:r,editor:n,state:o}=this,{view:s}=n,a=[],i=!!t,l=t||o.tr,c=()=>(!i&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{const v=this.buildProps(l,e),g=h(...m)(v);return a.push(g),d}])),run:c};return d}createCan(t){const{rawCommands:e,state:r}=this,n=!1,o=t||r.tr,s=this.buildProps(o,n);return{...Object.fromEntries(Object.entries(e).map(([a,i])=>[a,(...l)=>i(...l)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,n)}}buildProps(t,e=!0){const{rawCommands:r,editor:n,state:o}=this,{view:s}=n,a={tr:t,editor:n,view:s,state:xc({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([i,l])=>[i,(...c)=>l(...c)(a)]))}};return a}},SS={};qp(SS,{blur:()=>E8,clearContent:()=>j8,clearNodes:()=>R8,command:()=>T8,createParagraphNear:()=>A8,cut:()=>O8,deleteCurrentNode:()=>D8,deleteNode:()=>I8,deleteRange:()=>P8,deleteSelection:()=>L8,enter:()=>F8,exitCode:()=>_8,extendMarkRange:()=>z8,first:()=>B8,focus:()=>H8,forEach:()=>V8,insertContent:()=>W8,insertContentAt:()=>q8,joinBackward:()=>J8,joinDown:()=>Y8,joinForward:()=>X8,joinItemBackward:()=>Z8,joinItemForward:()=>Q8,joinTextblockBackward:()=>eU,joinTextblockForward:()=>tU,joinUp:()=>K8,keyboardShortcut:()=>nU,lift:()=>oU,liftEmptyBlock:()=>sU,liftListItem:()=>aU,newlineInCode:()=>iU,resetAttributes:()=>lU,scrollIntoView:()=>cU,selectAll:()=>dU,selectNodeBackward:()=>uU,selectNodeForward:()=>fU,selectParentNode:()=>pU,selectTextblockEnd:()=>hU,selectTextblockStart:()=>mU,setContent:()=>gU,setMark:()=>LU,setMeta:()=>FU,setNode:()=>_U,setNodeSelection:()=>zU,setTextDirection:()=>BU,setTextSelection:()=>$U,sinkListItem:()=>HU,splitBlock:()=>VU,splitListItem:()=>WU,toggleList:()=>UU,toggleMark:()=>GU,toggleNode:()=>qU,toggleWrap:()=>KU,undoInputRule:()=>YU,unsetAllMarks:()=>JU,unsetMark:()=>XU,unsetTextDirection:()=>ZU,updateAttributes:()=>QU,wrapIn:()=>eG,wrapInList:()=>tG});var E8=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var r;t.isDestroyed||(e.dom.blur(),(r=window==null?void 0:window.getSelection())==null||r.removeAllRanges())}),!0),j8=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),R8=()=>({state:t,tr:e,dispatch:r})=>{const{selection:n}=e,{ranges:o}=n;return r&&o.forEach(({$from:s,$to:a})=>{t.doc.nodesBetween(s.pos,a.pos,(i,l)=>{if(i.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),h=c.resolve(d.map(l+i.nodeSize)),m=f.blockRange(h);if(!m)return;const v=is(m);if(i.type.isTextblock){const{defaultType:g}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(m.start,g)}(v||v===0)&&e.lift(m,v)})}),!0},T8=t=>e=>t(e),A8=()=>({state:t,dispatch:e})=>zC(t,e),O8=(t,e)=>({editor:r,tr:n})=>{const{state:o}=r,s=o.doc.slice(t.from,t.to);n.deleteRange(t.from,t.to);const a=n.mapping.map(e);return n.insert(a,s.content),n.setSelection(new fe(n.doc.resolve(Math.max(a-1,0)))),!0},D8=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,n=r.$anchor.node();if(n.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===n.type){if(e){const a=o.before(s),i=o.after(s);t.delete(a,i).scrollIntoView()}return!0}return!1};function We(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var I8=t=>({tr:e,state:r,dispatch:n})=>{const o=We(t,r.schema),s=e.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===o){if(n){const i=s.before(a),l=s.after(a);e.delete(i,l).scrollIntoView()}return!0}return!1},P8=t=>({tr:e,dispatch:r})=>{const{from:n,to:o}=t;return r&&e.delete(n,o),!0},L8=()=>({state:t,dispatch:e})=>Dp(t,e),F8=()=>({commands:t})=>t.keyboardShortcut("Enter"),_8=()=>({state:t,dispatch:e})=>w6(t,e);function Kp(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Ji(t,e,r={strict:!0}){const n=Object.keys(e);return n.length?n.every(o=>r.strict?e[o]===t[o]:Kp(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function MS(t,e,r={}){return t.find(n=>n.type===e&&Ji(Object.fromEntries(Object.keys(r).map(o=>[o,n.attrs[o]])),r))}function qg(t,e,r={}){return!!MS(t,e,r)}function Yp(t,e,r){var n;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===e)||(r=r||((n=o.node.marks[0])==null?void 0:n.attrs),!MS([...o.node.marks],e,r)))return;let s=o.index,a=t.start()+o.offset,i=s+1,l=a+o.node.nodeSize;for(;s>0&&qg([...t.parent.child(s-1).marks],e,r);)s-=1,a-=t.parent.child(s).nodeSize;for(;i<t.parent.childCount&&qg([...t.parent.child(i).marks],e,r);)l+=t.parent.child(i).nodeSize,i+=1;return{from:a,to:l}}function Wr(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var z8=(t,e={})=>({tr:r,state:n,dispatch:o})=>{const s=Wr(t,n.schema),{doc:a,selection:i}=r,{$from:l,from:c,to:d}=i;if(o){const f=Yp(l,s,e);if(f&&f.from<=c&&f.to>=d){const h=fe.create(a,f.from,f.to);r.setSelection(h)}}return!0},B8=t=>e=>{const r=typeof t=="function"?t(e):t;for(let n=0;n<r.length;n+=1)if(r[n](e))return!0;return!1};function ES(t){return t instanceof fe}function _n(t=0,e=0,r=0){return Math.min(Math.max(t,e),r)}function jS(t,e=null){if(!e)return null;const r=ve.atStart(t),n=ve.atEnd(t);if(e==="start"||e===!0)return r;if(e==="end")return n;const o=r.from,s=n.to;return e==="all"?fe.create(t,_n(0,o,s),_n(t.content.size,o,s)):fe.create(t,_n(e,o,s),_n(e,o,s))}function Kg(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Xi(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function $8(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var H8=(t=null,e={})=>({editor:r,view:n,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const a=()=>{(Xi()||Kg())&&n.dom.focus(),$8()&&!Xi()&&!Kg()&&n.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&r.commands.scrollIntoView())})};try{if(n.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(s&&t===null&&!ES(r.state.selection))return a(),!0;const i=jS(o.doc,t)||r.state.selection,l=r.state.selection.eq(i);return s&&(l||o.setSelection(i),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},V8=(t,e)=>r=>t.every((n,o)=>e(n,{...r,index:o})),W8=(t,e)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},t,e),RS=t=>{const e=t.childNodes;for(let r=e.length-1;r>=0;r-=1){const n=e[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?t.removeChild(n):n.nodeType===1&&RS(n)}return t};function ei(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,r=new window.DOMParser().parseFromString(e,"text/html").body;return RS(r)}function oa(t,e,r){if(t instanceof dn||t instanceof U)return t;r={slice:!0,parseOptions:{},...r};const n=typeof t=="object"&&t!==null,o=typeof t=="string";if(n)try{if(Array.isArray(t)&&t.length>0)return U.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return r.errorOnInvalidContent&&s.check(),s}catch(s){if(r.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),oa("",e,r)}if(o){if(r.errorOnInvalidContent){let a=!1,i="";const l=new fC({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,i=typeof c=="string"?c:c.outerHTML,null)}]}})});if(r.slice?un.fromSchema(l).parseSlice(ei(t),r.parseOptions):un.fromSchema(l).parse(ei(t),r.parseOptions),r.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${i}`)})}const s=un.fromSchema(e);return r.slice?s.parseSlice(ei(t),r.parseOptions).content:s.parse(ei(t),r.parseOptions)}return oa("",e,r)}function U8(t,e,r){const n=t.steps.length-1;if(n<e)return;const o=t.steps[n];if(!(o instanceof Xe||o instanceof Ze))return;const s=t.mapping.maps[n];let a=0;s.forEach((i,l,c,d)=>{a===0&&(a=d)}),t.setSelection(ve.near(t.doc.resolve(a),r))}var G8=t=>!("type"in t),q8=(t,e,r)=>({tr:n,dispatch:o,editor:s})=>{var a;if(o){r={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};let i;const l=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...r.parseOptions};if(!r.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{oa(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){l(g)}try{i=oa(e,s.schema,{parseOptions:c,errorOnInvalidContent:(a=r.errorOnInvalidContent)!=null?a:s.options.enableContentCheck})}catch(g){return l(g),!1}let{from:d,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,m=!0;if((G8(i)?i:[i]).forEach(g=>{g.check(),h=h?g.isText&&g.marks.length===0:!1,m=m?g.isBlock:!1}),d===f&&m){const{parent:g}=n.doc.resolve(d);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(d-=1,f+=1)}let v;if(h){if(Array.isArray(e))v=e.map(g=>g.text||"").join("");else if(e instanceof U){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),v=g}else typeof e=="object"&&e&&e.text?v=e.text:v=e;n.insertText(v,d,f)}else{v=i;const g=n.doc.resolve(d),y=g.node(),b=g.parentOffset===0,x=y.isText||y.isTextblock,w=y.content.size>0;b&&x&&w&&(d=Math.max(0,d-1)),n.replaceWith(d,f,v)}r.updateSelection&&U8(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:d,text:v}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:d,text:v})}return!0},K8=()=>({state:t,dispatch:e})=>y6(t,e),Y8=()=>({state:t,dispatch:e})=>b6(t,e),J8=()=>({state:t,dispatch:e})=>OC(t,e),X8=()=>({state:t,dispatch:e})=>LC(t,e),Z8=()=>({state:t,dispatch:e,tr:r})=>{try{const n=hc(t.doc,t.selection.$from.pos,-1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},Q8=()=>({state:t,dispatch:e,tr:r})=>{try{const n=hc(t.doc,t.selection.$from.pos,1);return n==null?!1:(r.join(n,2),e&&e(r),!0)}catch{return!1}},eU=()=>({state:t,dispatch:e})=>g6(t,e),tU=()=>({state:t,dispatch:e})=>v6(t,e);function TS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function rU(t){const e=t.split(/-(?!$)/);let r=e[e.length-1];r==="Space"&&(r=" ");let n,o,s,a;for(let i=0;i<e.length-1;i+=1){const l=e[i];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))Xi()||TS()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return n&&(r=`Alt-${r}`),o&&(r=`Ctrl-${r}`),a&&(r=`Meta-${r}`),s&&(r=`Shift-${r}`),r}var nU=t=>({editor:e,view:r,tr:n,dispatch:o})=>{const s=rU(t).split(/-(?!$)/),a=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),i=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{r.someProp("handleKeyDown",c=>c(r,i))});return l==null||l.steps.forEach(c=>{const d=c.map(n.mapping);d&&o&&n.maybeStep(d)}),!0};function bn(t,e,r={}){const{from:n,to:o,empty:s}=t.selection,a=e?We(e,t.schema):null,i=[];t.doc.nodesBetween(n,o,(d,f)=>{if(d.isText)return;const h=Math.max(n,f),m=Math.min(o,f+d.nodeSize);i.push({node:d,from:h,to:m})});const l=o-n,c=i.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>Ji(d.node.attrs,r,{strict:!1}));return s?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var oU=(t,e={})=>({state:r,dispatch:n})=>{const o=We(t,r.schema);return bn(r,o,e)?x6(r,n):!1},sU=()=>({state:t,dispatch:e})=>BC(t,e),aU=t=>({state:e,dispatch:r})=>{const n=We(t,e.schema);return O6(n)(e,r)},iU=()=>({state:t,dispatch:e})=>_C(t,e);function kc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Yg(t,e){const r=typeof e=="string"?[e]:e;return Object.keys(t).reduce((n,o)=>(r.includes(o)||(n[o]=t[o]),n),{})}var lU=(t,e)=>({tr:r,state:n,dispatch:o})=>{let s=null,a=null;const i=kc(typeof t=="string"?t:t.name,n.schema);if(!i)return!1;i==="node"&&(s=We(t,n.schema)),i==="mark"&&(a=Wr(t,n.schema));let l=!1;return r.selection.ranges.forEach(c=>{n.doc.nodesBetween(c.$from.pos,c.$to.pos,(d,f)=>{s&&s===d.type&&(l=!0,o&&r.setNodeMarkup(f,void 0,Yg(d.attrs,e))),a&&d.marks.length&&d.marks.forEach(h=>{a===h.type&&(l=!0,o&&r.addMark(f,f+d.nodeSize,a.create(Yg(h.attrs,e))))})})}),l},cU=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),dU=()=>({tr:t,dispatch:e})=>{if(e){const r=new Dt(t.doc);t.setSelection(r)}return!0},uU=()=>({state:t,dispatch:e})=>IC(t,e),fU=()=>({state:t,dispatch:e})=>FC(t,e),pU=()=>({state:t,dispatch:e})=>C6(t,e),hU=()=>({state:t,dispatch:e})=>E6(t,e),mU=()=>({state:t,dispatch:e})=>M6(t,e);function Iu(t,e,r={},n={}){return oa(t,e,{slice:!1,parseOptions:r,errorOnInvalidContent:n.errorOnInvalidContent})}var gU=(t,{errorOnInvalidContent:e,emitUpdate:r=!0,parseOptions:n={}}={})=>({editor:o,tr:s,dispatch:a,commands:i})=>{const{doc:l}=s;if(n.preserveWhitespace!=="full"){const c=Iu(t,o.schema,n,{errorOnInvalidContent:e??o.options.enableContentCheck});return a&&s.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!r),!0}return a&&s.setMeta("preventUpdate",!r),i.insertContentAt({from:0,to:l.content.size},t,{parseOptions:n,errorOnInvalidContent:e??o.options.enableContentCheck})};function AS(t,e){const r=Wr(e,t.schema),{from:n,to:o,empty:s}=t.selection,a=[];s?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(n,o,l=>{a.push(...l.marks)});const i=a.find(l=>l.type.name===r.name);return i?{...i.attrs}:{}}function OS(t,e){const r=new jC(t);return e.forEach(n=>{n.steps.forEach(o=>{r.step(o)})}),r}function vU(t){for(let e=0;e<t.edgeCount;e+=1){const{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function yU(t,e,r){const n=[];return t.nodesBetween(e.from,e.to,(o,s)=>{r(o)&&n.push({node:o,pos:s})}),n}function bU(t,e){for(let r=t.depth;r>0;r-=1){const n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}function Nc(t){return e=>bU(e.$from,t)}function le(t,e,r){return t.config[e]===void 0&&t.parent?le(t.parent,e,r):typeof t.config[e]=="function"?t.config[e].bind({...r,parent:t.parent?le(t.parent,e,r):null}):t.config[e]}function Jp(t){return t.map(e=>{const r={name:e.name,options:e.options,storage:e.storage},n=le(e,"addExtensions",r);return n?[e,...Jp(n())]:e}).flat(10)}function Xp(t,e){const r=ao.fromSchema(e).serializeFragment(t),n=document.implementation.createHTMLDocument().createElement("div");return n.appendChild(r),n.innerHTML}function DS(t){return typeof t=="function"}function ke(t,e=void 0,...r){return DS(t)?e?t.bind(e)(...r):t(...r):t}function xU(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Vo(t){const e=t.filter(o=>o.type==="extension"),r=t.filter(o=>o.type==="node"),n=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:r,markExtensions:n}}function IS(t){const e=[],{nodeExtensions:r,markExtensions:n}=Vo(t),o=[...r,...n],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(a=>{const i={name:a.name,options:a.options,storage:a.storage,extensions:o},l=le(a,"addGlobalAttributes",i);l&&l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...s,...h}})})})})}),o.forEach(a=>{const i={name:a.name,options:a.options,storage:a.storage},l=le(a,"addAttributes",i);if(!l)return;const c=l();Object.entries(c).forEach(([d,f])=>{const h={...s,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:a.name,name:d,attribute:h})})}),e}function Ue(...t){return t.filter(e=>!!e).reduce((e,r)=>{const n={...e};return Object.entries(r).forEach(([o,s])=>{if(!n[o]){n[o]=s;return}if(o==="class"){const a=s?String(s).split(" "):[],i=n[o]?n[o].split(" "):[],l=a.filter(c=>!i.includes(c));n[o]=[...i,...l].join(" ")}else if(o==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],i=n[o]?n[o].split(";").map(c=>c.trim()).filter(Boolean):[],l=new Map;i.forEach(c=>{const[d,f]=c.split(":").map(h=>h.trim());l.set(d,f)}),a.forEach(c=>{const[d,f]=c.split(":").map(h=>h.trim());l.set(d,f)}),n[o]=Array.from(l.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else n[o]=s}),n},{})}function sa(t,e){return e.filter(r=>r.type===t.type.name).filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(t.attrs)||{}:{[r.name]:t.attrs[r.name]}).reduce((r,n)=>Ue(r,n),{})}function wU(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Jg(t,e){return"style"in t?t:{...t,getAttrs:r=>{const n=t.getAttrs?t.getAttrs(r):t.attrs;if(n===!1)return!1;const o=e.reduce((s,a)=>{const i=a.attribute.parseHTML?a.attribute.parseHTML(r):wU(r.getAttribute(a.name));return i==null?s:{...s,[a.name]:i}},{});return{...n,...o}}}}function Xg(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>e==="attrs"&&xU(r)?!1:r!=null))}function Zg(t){var e,r;const n={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(n.default=t.attribute.default),((r=t==null?void 0:t.attribute)==null?void 0:r.validate)!==void 0&&(n.validate=t.attribute.validate),[t.name,n]}function kU(t,e){var r;const n=IS(t),{nodeExtensions:o,markExtensions:s}=Vo(t),a=(r=o.find(c=>le(c,"topNode")))==null?void 0:r.name,i=Object.fromEntries(o.map(c=>{const d=n.filter(b=>b.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((b,x)=>{const w=le(x,"extendNodeSchema",f);return{...b,...w?w(c):{}}},{}),m=Xg({...h,content:ke(le(c,"content",f)),marks:ke(le(c,"marks",f)),group:ke(le(c,"group",f)),inline:ke(le(c,"inline",f)),atom:ke(le(c,"atom",f)),selectable:ke(le(c,"selectable",f)),draggable:ke(le(c,"draggable",f)),code:ke(le(c,"code",f)),whitespace:ke(le(c,"whitespace",f)),linebreakReplacement:ke(le(c,"linebreakReplacement",f)),defining:ke(le(c,"defining",f)),isolating:ke(le(c,"isolating",f)),attrs:Object.fromEntries(d.map(Zg))}),v=ke(le(c,"parseHTML",f));v&&(m.parseDOM=v.map(b=>Jg(b,d)));const g=le(c,"renderHTML",f);g&&(m.toDOM=b=>g({node:b,HTMLAttributes:sa(b,d)}));const y=le(c,"renderText",f);return y&&(m.toText=y),[c.name,m]})),l=Object.fromEntries(s.map(c=>{const d=n.filter(y=>y.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((y,b)=>{const x=le(b,"extendMarkSchema",f);return{...y,...x?x(c):{}}},{}),m=Xg({...h,inclusive:ke(le(c,"inclusive",f)),excludes:ke(le(c,"excludes",f)),group:ke(le(c,"group",f)),spanning:ke(le(c,"spanning",f)),code:ke(le(c,"code",f)),attrs:Object.fromEntries(d.map(Zg))}),v=ke(le(c,"parseHTML",f));v&&(m.parseDOM=v.map(y=>Jg(y,d)));const g=le(c,"renderHTML",f);return g&&(m.toDOM=y=>g({mark:y,HTMLAttributes:sa(y,d)})),[c.name,m]}));return new fC({topNode:a,nodes:i,marks:l})}function NU(t){const e=t.filter((r,n)=>t.indexOf(r)!==n);return Array.from(new Set(e))}function Zi(t){return t.sort((e,r)=>{const n=le(e,"priority")||100,o=le(r,"priority")||100;return n>o?-1:n<o?1:0})}function PS(t){const e=Zi(Jp(t)),r=NU(e.map(n=>n.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(n=>`'${n}'`).join(", ")}]. This can lead to issues.`),e}function LS(t,e,r){const{from:n,to:o}=e,{blockSeparator:s=`
441
+
442
+ `,textSerializers:a={}}=r||{};let i="";return t.nodesBetween(n,o,(l,c,d,f)=>{var h;l.isBlock&&c>n&&(i+=s);const m=a==null?void 0:a[l.type.name];if(m)return d&&(i+=m({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(i+=(h=l==null?void 0:l.text)==null?void 0:h.slice(Math.max(n,c)-c,o-c))}),i}function CU(t,e){const r={from:0,to:t.content.size};return LS(t,r,e)}function FS(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,r])=>[e,r.spec.toText]))}function SU(t,e){const r=We(e,t.schema),{from:n,to:o}=t.selection,s=[];t.doc.nodesBetween(n,o,i=>{s.push(i)});const a=s.reverse().find(i=>i.type.name===r.name);return a?{...a.attrs}:{}}function _S(t,e){const r=kc(typeof e=="string"?e:e.name,t.schema);return r==="node"?SU(t,e):r==="mark"?AS(t,e):{}}function MU(t,e=JSON.stringify){const r={};return t.filter(n=>{const o=e(n);return Object.prototype.hasOwnProperty.call(r,o)?!1:r[o]=!0})}function EU(t){const e=MU(t);return e.length===1?e:e.filter((r,n)=>!e.filter((o,s)=>s!==n).some(o=>r.oldRange.from>=o.oldRange.from&&r.oldRange.to<=o.oldRange.to&&r.newRange.from>=o.newRange.from&&r.newRange.to<=o.newRange.to))}function zS(t){const{mapping:e,steps:r}=t,n=[];return e.maps.forEach((o,s)=>{const a=[];if(o.ranges.length)o.forEach((i,l)=>{a.push({from:i,to:l})});else{const{from:i,to:l}=r[s];if(i===void 0||l===void 0)return;a.push({from:i,to:l})}a.forEach(({from:i,to:l})=>{const c=e.slice(s).map(i,-1),d=e.slice(s).map(l),f=e.invert().map(c,-1),h=e.invert().map(d);n.push({oldRange:{from:f,to:h},newRange:{from:c,to:d}})})}),EU(n)}function Zp(t,e,r){const n=[];return t===e?r.resolve(t).marks().forEach(o=>{const s=r.resolve(t),a=Yp(s,o.type);a&&n.push({mark:o,...a})}):r.nodesBetween(t,e,(o,s)=>{!o||(o==null?void 0:o.nodeSize)===void 0||n.push(...o.marks.map(a=>({from:s,to:s+o.nodeSize,mark:a})))}),n}var jU=(t,e,r,n=20)=>{const o=t.doc.resolve(r);let s=n,a=null;for(;s>0&&a===null;){const i=o.node(s);(i==null?void 0:i.type.name)===e?a=i:s-=1}return[a,s]};function ti(t,e){return e.nodes[t]||e.marks[t]||null}function yi(t,e,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const o=t.find(s=>s.type===e&&s.name===n);return o?o.attribute.keepOnSplit:!1}))}var RU=(t,e=500)=>{let r="";const n=t.parentOffset;return t.parent.nodesBetween(Math.max(0,n-e),n,(o,s,a,i)=>{var l,c;const d=((c=(l=o.type.spec).toText)==null?void 0:c.call(l,{node:o,pos:s,parent:a,index:i}))||o.textContent||"%leaf%";r+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,n-s))}),r};function Pu(t,e,r={}){const{empty:n,ranges:o}=t.selection,s=e?Wr(e,t.schema):null;if(n)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>Ji(d.attrs,r,{strict:!1}));let a=0;const i=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,m=f.pos;t.doc.nodesBetween(h,m,(v,g)=>{if(!v.isText&&!v.marks.length)return;const y=Math.max(h,g),b=Math.min(m,g+v.nodeSize),x=b-y;a+=x,i.push(...v.marks.map(w=>({mark:w,from:y,to:b})))})}),a===0)return!1;const l=i.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>Ji(d.mark.attrs,r,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=i.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=a}function TU(t,e,r={}){if(!e)return bn(t,null,r)||Pu(t,null,r);const n=kc(e,t.schema);return n==="node"?bn(t,e,r):n==="mark"?Pu(t,e,r):!1}var AU=(t,e)=>{const{$from:r,$to:n,$anchor:o}=t.selection;if(e){const s=Nc(i=>i.type.name===e)(t.selection);if(!s)return!1;const a=t.doc.resolve(s.pos+1);return o.pos+1===a.end()}return!(n.parentOffset<n.parent.nodeSize-2||r.pos!==n.pos)},OU=t=>{const{$from:e,$to:r}=t.selection;return!(e.parentOffset>0||e.pos!==r.pos)};function Qg(t,e){return Array.isArray(e)?e.some(r=>(typeof r=="string"?r:r.name)===t.name):e}function ev(t,e){const{nodeExtensions:r}=Vo(e),n=r.find(a=>a.name===t);if(!n)return!1;const o={name:n.name,options:n.options,storage:n.storage},s=ke(le(n,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function Cc(t,{checkChildren:e=!0,ignoreWhitespace:r=!1}={}){var n;if(r){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((n=t.text)!=null?n:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(s=>{o!==!1&&(Cc(s,{ignoreWhitespace:r,checkChildren:e})||(o=!1))}),o}return!1}function BS(t){return t instanceof ce}var $S=class HS{constructor(e){this.position=e}static fromJSON(e){return new HS(e.position)}toJSON(){return{position:this.position}}};function DU(t,e){const r=e.mapping.mapResult(t.position);return{position:new $S(r.pos),mapResult:r}}function IU(t){return new $S(t)}function PU(t,e,r){var n;const{selection:o}=e;let s=null;if(ES(o)&&(s=o.$cursor),s){const i=(n=t.storedMarks)!=null?n:s.marks();return s.parent.type.allowsMarkType(r)&&(!!r.isInSet(i)||!i.some(l=>l.type.excludes(r)))}const{ranges:a}=o;return a.some(({$from:i,$to:l})=>{let c=i.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(r):!1;return t.doc.nodesBetween(i.pos,l.pos,(d,f,h)=>{if(c)return!1;if(d.isInline){const m=!h||h.type.allowsMarkType(r),v=!!r.isInSet(d.marks)||!d.marks.some(g=>g.type.excludes(r));c=m&&v}return!c}),c})}var LU=(t,e={})=>({tr:r,state:n,dispatch:o})=>{const{selection:s}=r,{empty:a,ranges:i}=s,l=Wr(t,n.schema);if(o)if(a){const c=AS(n,l);r.addStoredMark(l.create({...c,...e}))}else i.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;n.doc.nodesBetween(d,f,(h,m)=>{const v=Math.max(m,d),g=Math.min(m+h.nodeSize,f);h.marks.find(y=>y.type===l)?h.marks.forEach(y=>{l===y.type&&r.addMark(v,g,l.create({...y.attrs,...e}))}):r.addMark(v,g,l.create(e))})});return PU(n,r,l)},FU=(t,e)=>({tr:r})=>(r.setMeta(t,e),!0),_U=(t,e={})=>({state:r,dispatch:n,chain:o})=>{const s=We(t,r.schema);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:i})=>pg(s,{...a,...e})(r)?!0:i.clearNodes()).command(({state:i})=>pg(s,{...a,...e})(i,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},zU=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,o=_n(t,0,n.content.size),s=ce.create(n,o);e.setSelection(s)}return!0},BU=(t,e)=>({tr:r,state:n,dispatch:o})=>{const{selection:s}=n;let a,i;return typeof e=="number"?(a=e,i=e):e&&"from"in e&&"to"in e?(a=e.from,i=e.to):(a=s.from,i=s.to),o&&r.doc.nodesBetween(a,i,(l,c)=>{l.isText||r.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},$U=t=>({tr:e,dispatch:r})=>{if(r){const{doc:n}=e,{from:o,to:s}=typeof t=="number"?{from:t,to:t}:t,a=fe.atStart(n).from,i=fe.atEnd(n).to,l=_n(o,a,i),c=_n(s,a,i),d=fe.create(n,l,c);e.setSelection(d)}return!0},HU=t=>({state:e,dispatch:r})=>{const n=We(t,e.schema);return P6(n)(e,r)};function tv(t,e){const r=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(r){const n=r.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(n)}}var VU=({keepMarks:t=!0}={})=>({tr:e,state:r,dispatch:n,editor:o})=>{const{selection:s,doc:a}=e,{$from:i,$to:l}=s,c=o.extensionManager.attributes,d=yi(c,i.node().type.name,i.node().attrs);if(s instanceof ce&&s.node.isBlock)return!i.parentOffset||!Br(a,i.pos)?!1:(n&&(t&&tv(r,o.extensionManager.splittableMarks),e.split(i.pos).scrollIntoView()),!0);if(!i.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,h=i.depth===0?void 0:vU(i.node(-1).contentMatchAt(i.indexAfter(-1)));let m=f&&h?[{type:h,attrs:d}]:void 0,v=Br(e.doc,e.mapping.map(i.pos),1,m);if(!m&&!v&&Br(e.doc,e.mapping.map(i.pos),1,h?[{type:h}]:void 0)&&(v=!0,m=h?[{type:h,attrs:d}]:void 0),n){if(v&&(s instanceof fe&&e.deleteSelection(),e.split(e.mapping.map(i.pos),1,m),h&&!f&&!i.parentOffset&&i.parent.type!==h)){const g=e.mapping.map(i.before()),y=e.doc.resolve(g);i.node(-1).canReplaceWith(y.index(),y.index()+1,h)&&e.setNodeMarkup(e.mapping.map(i.before()),h)}t&&tv(r,o.extensionManager.splittableMarks),e.scrollIntoView()}return v},WU=(t,e={})=>({tr:r,state:n,dispatch:o,editor:s})=>{var a;const i=We(t,n.schema),{$from:l,$to:c}=n.selection,d=n.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==i)return!1;const h=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let b=U.empty;const x=l.index(-1)?1:l.index(-2)?2:3;for(let M=l.depth-x;M>=l.depth-3;M-=1)b=U.from(l.node(M).copy(b));const w=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...yi(h,l.node().type.name,l.node().attrs),...e},N=((a=i.contentMatch.defaultType)==null?void 0:a.createAndFill(k))||void 0;b=b.append(U.from(i.createAndFill(null,N)||void 0));const S=l.before(l.depth-(x-1));r.replace(S,l.after(-w),new re(b,4-x,0));let C=-1;r.doc.nodesBetween(S,r.doc.content.size,(M,E)=>{if(C>-1)return!1;M.isTextblock&&M.content.size===0&&(C=E+1)}),C>-1&&r.setSelection(fe.near(r.doc.resolve(C))),r.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,v={...yi(h,f.type.name,f.attrs),...e},g={...yi(h,l.node().type.name,l.node().attrs),...e};r.delete(l.pos,c.pos);const y=m?[{type:i,attrs:v},{type:m,attrs:g}]:[{type:i,attrs:v}];if(!Br(r.doc,l.pos,2))return!1;if(o){const{selection:b,storedMarks:x}=n,{splittableMarks:w}=s.extensionManager,k=x||b.$to.parentOffset&&b.$from.marks();if(r.split(l.pos,2,y).scrollIntoView(),!k||!o)return!0;const N=k.filter(S=>w.includes(S.type.name));r.ensureMarks(N)}return!0},Rd=(t,e)=>{const r=Nc(s=>s.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const o=t.doc.nodeAt(n);return r.node.type===(o==null?void 0:o.type)&&Mn(t.doc,r.pos)&&t.join(r.pos),!0},Td=(t,e)=>{const r=Nc(s=>s.type===e)(t.selection);if(!r)return!0;const n=t.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const o=t.doc.nodeAt(n);return r.node.type===(o==null?void 0:o.type)&&Mn(t.doc,n)&&t.join(n),!0},UU=(t,e,r,n={})=>({editor:o,tr:s,state:a,dispatch:i,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,m=We(t,a.schema),v=We(e,a.schema),{selection:g,storedMarks:y}=a,{$from:b,$to:x}=g,w=b.blockRange(x),k=y||g.$to.parentOffset&&g.$from.marks();if(!w)return!1;const N=Nc(S=>ev(S.type.name,f))(g);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===m)return c.liftListItem(v);if(ev(N.node.type.name,f)&&m.validContent(N.node.content)&&i)return l().command(()=>(s.setNodeMarkup(N.pos,m),!0)).command(()=>Rd(s,m)).command(()=>Td(s,m)).run()}return!r||!k||!i?l().command(()=>d().wrapInList(m,n)?!0:c.clearNodes()).wrapInList(m,n).command(()=>Rd(s,m)).command(()=>Td(s,m)).run():l().command(()=>{const S=d().wrapInList(m,n),C=k.filter(M=>h.includes(M.type.name));return s.ensureMarks(C),S?!0:c.clearNodes()}).wrapInList(m,n).command(()=>Rd(s,m)).command(()=>Td(s,m)).run()},GU=(t,e={},r={})=>({state:n,commands:o})=>{const{extendEmptyMarkRange:s=!1}=r,a=Wr(t,n.schema);return Pu(n,a,e)?o.unsetMark(a,{extendEmptyMarkRange:s}):o.setMark(a,e)},qU=(t,e,r={})=>({state:n,commands:o})=>{const s=We(t,n.schema),a=We(e,n.schema),i=bn(n,s,r);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),i?o.setNode(a,l):o.setNode(s,{...l,...r})},KU=(t,e={})=>({state:r,commands:n})=>{const o=We(t,r.schema);return bn(r,o,e)?n.lift(o):n.wrapIn(o,e)},YU=()=>({state:t,dispatch:e})=>{const r=t.plugins;for(let n=0;n<r.length;n+=1){const o=r[n];let s;if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const a=t.tr,i=s.transform;for(let l=i.steps.length-1;l>=0;l-=1)a.step(i.steps[l].invert(i.docs[l]));if(s.text){const l=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else a.delete(s.from,s.to)}return!0}}return!1},JU=()=>({tr:t,dispatch:e})=>{const{selection:r}=t,{empty:n,ranges:o}=r;return n||e&&o.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},XU=(t,e={})=>({tr:r,state:n,dispatch:o})=>{var s;const{extendEmptyMarkRange:a=!1}=e,{selection:i}=r,l=Wr(t,n.schema),{$from:c,empty:d,ranges:f}=i;if(!o)return!0;if(d&&a){let{from:h,to:m}=i;const v=(s=c.marks().find(y=>y.type===l))==null?void 0:s.attrs,g=Yp(c,l,v);g&&(h=g.from,m=g.to),r.removeMark(h,m,l)}else f.forEach(h=>{r.removeMark(h.$from.pos,h.$to.pos,l)});return r.removeStoredMark(l),!0},ZU=t=>({tr:e,state:r,dispatch:n})=>{const{selection:o}=r;let s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=o.from,a=o.to),n&&e.doc.nodesBetween(s,a,(i,l)=>{if(i.isText)return;const c={...i.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},QU=(t,e={})=>({tr:r,state:n,dispatch:o})=>{let s=null,a=null;const i=kc(typeof t=="string"?t:t.name,n.schema);if(!i)return!1;i==="node"&&(s=We(t,n.schema)),i==="mark"&&(a=Wr(t,n.schema));let l=!1;return r.selection.ranges.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;let h,m,v,g;r.selection.empty?n.doc.nodesBetween(d,f,(y,b)=>{s&&s===y.type&&(l=!0,v=Math.max(b,d),g=Math.min(b+y.nodeSize,f),h=b,m=y)}):n.doc.nodesBetween(d,f,(y,b)=>{b<d&&s&&s===y.type&&(l=!0,v=Math.max(b,d),g=Math.min(b+y.nodeSize,f),h=b,m=y),b>=d&&b<=f&&(s&&s===y.type&&(l=!0,o&&r.setNodeMarkup(b,void 0,{...y.attrs,...e})),a&&y.marks.length&&y.marks.forEach(x=>{if(a===x.type&&(l=!0,o)){const w=Math.max(b,d),k=Math.min(b+y.nodeSize,f);r.addMark(w,k,a.create({...x.attrs,...e}))}}))}),m&&(h!==void 0&&o&&r.setNodeMarkup(h,void 0,{...m.attrs,...e}),a&&m.marks.length&&m.marks.forEach(y=>{a===y.type&&o&&r.addMark(v,g,a.create({...y.attrs,...e}))}))}),l},eG=(t,e={})=>({state:r,dispatch:n})=>{const o=We(t,r.schema);return j6(o,e)(r,n)},tG=(t,e={})=>({state:r,dispatch:n})=>{const o=We(t,r.schema);return R6(o,e)(r,n)},rG=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const r=this.callbacks[t];return r&&r.forEach(n=>n.apply(this,e)),this}off(t,e){const r=this.callbacks[t];return r&&(e?this.callbacks[t]=r.filter(n=>n!==e):delete this.callbacks[t]),this}once(t,e){const r=(...n)=>{this.off(t,r),e.apply(this,n)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}},Sc=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},nG=(t,e)=>{if(Kp(e))return e.exec(t);const r=e(t);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=t,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function ri(t){var e;const{editor:r,from:n,to:o,text:s,rules:a,plugin:i}=t,{view:l}=r;if(l.composing)return!1;const c=l.state.doc.resolve(n);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let d=!1;const f=RU(c)+s;return a.forEach(h=>{if(d)return;const m=nG(f,h.find);if(!m)return;const v=l.state.tr,g=xc({state:l.state,transaction:v}),y={from:n-(m[0].length-s.length),to:o},{commands:b,chain:x,can:w}=new wc({editor:r,state:g});h.handler({state:g,range:y,match:m,commands:b,chain:x,can:w})===null||!v.steps.length||(h.undoable&&v.setMeta(i,{transform:v,from:n,to:o,text:s}),l.dispatch(v),d=!0)}),d}function oG(t){const{editor:e,rules:r}=t,n=new Fe({state:{init(){return null},apply(o,s,a){const i=o.getMeta(n);if(i)return i;const l=o.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=Xp(U.from(c),a.schema);const{from:d}=l,f=d+c.length;ri({editor:e,from:d,to:f,text:c,rules:r,plugin:n})}),o.selectionSet||o.docChanged?null:s}},props:{handleTextInput(o,s,a,i){return ri({editor:e,from:s,to:a,text:i,rules:r,plugin:n})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&ri({editor:e,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?ri({editor:e,from:a.pos,to:a.pos,text:`
443
+ `,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function sG(t){return Object.prototype.toString.call(t).slice(8,-1)}function ni(t){return sG(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function VS(t,e){const r={...t};return ni(t)&&ni(e)&&Object.keys(e).forEach(n=>{ni(e[n])&&ni(t[n])?r[n]=VS(t[n],e[n]):r[n]=e[n]}),r}var Qp=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...ke(le(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...ke(le(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>VS(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},io=class WS extends Qp{constructor(){super(...arguments),this.type="mark"}static create(e={}){const r=typeof e=="function"?e():e;return new WS(r)}static handleExit({editor:e,mark:r}){const{tr:n}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!s.find(i=>(i==null?void 0:i.type.name)===r.name))return!1;const a=s.find(i=>(i==null?void 0:i.type.name)===r.name);return a&&n.removeStoredMark(a),n.insertText(" ",o.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}};function aG(t){return typeof t=="number"}var iG=class{constructor(t){this.find=t.find,this.handler=t.handler}},lG=(t,e,r)=>{if(Kp(e))return[...t.matchAll(e)];const n=e(t,r);return n?n.map(o=>{const s=[o.text];return s.index=o.index,s.input=t,s.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(o.replaceWith)),s}):[]};function cG(t){const{editor:e,state:r,from:n,to:o,rule:s,pasteEvent:a,dropEvent:i}=t,{commands:l,chain:c,can:d}=new wc({editor:e,state:r}),f=[];return r.doc.nodesBetween(n,o,(h,m)=>{var v,g,y,b,x;if((g=(v=h.type)==null?void 0:v.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;const w=(x=(b=(y=h.content)==null?void 0:y.size)!=null?b:h.nodeSize)!=null?x:0,k=Math.max(n,m),N=Math.min(o,m+w);if(k>=N)return;const S=h.isText?h.text||"":h.textBetween(k-m,N-m,void 0,"");lG(S,s.find,a).forEach(C=>{if(C.index===void 0)return;const M=k+C.index+1,E=M+C[0].length,A={from:r.tr.mapping.map(M),to:r.tr.mapping.map(E)},O=s.handler({state:r,range:A,match:C,commands:l,chain:c,can:d,pasteEvent:a,dropEvent:i});f.push(O)})}),f.every(h=>h!==null)}var oi=null,dG=t=>{var e;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=r.clipboardData)==null||e.setData("text/html",t),r};function uG(t){const{editor:e,rules:r}=t;let n=null,o=!1,s=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,i;try{i=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{i=null}const l=({state:c,from:d,to:f,rule:h,pasteEvt:m})=>{const v=c.tr,g=xc({state:c,transaction:v});if(!(!cG({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:m,dropEvent:i})||!v.steps.length)){try{i=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{i=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return r.map(c=>new Fe({view(d){const f=m=>{var v;n=(v=d.dom.parentElement)!=null&&v.contains(m.target)?d.dom.parentElement:null,n&&(oi=e)},h=()=>{oi&&(oi=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=n===d.dom.parentElement,i=f,!s){const h=oi;h!=null&&h.isEditable&&setTimeout(()=>{const m=h.state.selection;m&&h.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(d,f)=>{var h;const m=(h=f.clipboardData)==null?void 0:h.getData("text/html");return a=f,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const m=d[0],v=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!s,y=m.getMeta("applyPasteRules"),b=!!y;if(!v&&!g&&!b)return;if(b){let{text:k}=y;typeof k=="string"?k=k:k=Xp(U.from(k),h.schema);const{from:N}=y,S=N+k.length,C=dG(k);return l({rule:c,state:h,from:N,to:{b:S},pasteEvt:C})}const x=f.doc.content.findDiffStart(h.doc.content),w=f.doc.content.findDiffEnd(h.doc.content);if(!(!aG(x)||!w||x===w.b))return l({rule:c,state:h,from:x,to:w,pasteEvt:a})}}))}var Mc=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=PS(t),this.schema=kU(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ti(e.name,this.schema)},n=le(e,"addCommands",r);return n?{...t,...n()}:t},{})}get plugins(){const{editor:t}=this;return Zi([...this.extensions].reverse()).flatMap(e=>{const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:ti(e.name,this.schema)},n=[],o=le(e,"addKeyboardShortcuts",r);let s={};if(e.type==="mark"&&le(e,"exitable",r)&&(s.ArrowRight=()=>io.handleExit({editor:t,mark:e})),o){const d=Object.fromEntries(Object.entries(o()).map(([f,h])=>[f,()=>h({editor:t})]));s={...s,...d}}const a=S8(s);n.push(a);const i=le(e,"addInputRules",r);if(Qg(e,t.options.enableInputRules)&&i){const d=i();if(d&&d.length){const f=oG({editor:t,rules:d}),h=Array.isArray(f)?f:[f];n.push(...h)}}const l=le(e,"addPasteRules",r);if(Qg(e,t.options.enablePasteRules)&&l){const d=l();if(d&&d.length){const f=uG({editor:t,rules:d});n.push(...f)}}const c=le(e,"addProseMirrorPlugins",r);if(c){const d=c();n.push(...d)}return n})}get attributes(){return IS(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Vo(this.extensions);return Object.fromEntries(e.filter(r=>!!le(r,"addNodeView")).map(r=>{const n=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:We(r.name,this.schema)},s=le(r,"addNodeView",o);if(!s)return[];const a=s();if(!a)return[];const i=(l,c,d,f,h)=>{const m=sa(l,n);return a({node:l,view:c,getPos:d,decorations:f,innerDecorations:h,editor:t,extension:r,HTMLAttributes:m})};return[r.name,i]}))}dispatchTransaction(t){const{editor:e}=this;return Zi([...this.extensions].reverse()).reduceRight((r,n)=>{const o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ti(n.name,this.schema)},s=le(n,"dispatchTransaction",o);return s?a=>{s.call(o,{transaction:a,next:r})}:r},t)}get markViews(){const{editor:t}=this,{markExtensions:e}=Vo(this.extensions);return Object.fromEntries(e.filter(r=>!!le(r,"addMarkView")).map(r=>{const n=this.attributes.filter(i=>i.type===r.name),o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:Wr(r.name,this.schema)},s=le(r,"addMarkView",o);if(!s)return[];const a=(i,l,c)=>{const d=sa(i,n);return s()({mark:i,view:l,inline:c,editor:t,extension:r,HTMLAttributes:d,updateAttributes:f=>{SG(i,t,f)}})};return[r.name,a]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var r;const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ti(e.name,this.schema)};e.type==="mark"&&((r=ke(le(e,"keepOnSplit",n)))==null||r)&&this.splittableMarks.push(e.name);const o=le(e,"onBeforeCreate",n),s=le(e,"onCreate",n),a=le(e,"onUpdate",n),i=le(e,"onSelectionUpdate",n),l=le(e,"onTransaction",n),c=le(e,"onFocus",n),d=le(e,"onBlur",n),f=le(e,"onDestroy",n);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),a&&this.editor.on("update",a),i&&this.editor.on("selectionUpdate",i),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};Mc.resolve=PS;Mc.sort=Zi;Mc.flatten=Jp;var fG={};qp(fG,{ClipboardTextSerializer:()=>GS,Commands:()=>qS,Delete:()=>KS,Drop:()=>YS,Editable:()=>JS,FocusEvents:()=>ZS,Keymap:()=>QS,Paste:()=>e2,Tabindex:()=>t2,TextDirection:()=>r2,focusEventsPluginKey:()=>XS});var Be=class US extends Qp{constructor(){super(...arguments),this.type="extension"}static create(e={}){const r=typeof e=="function"?e():e;return new US(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}},GS=Be.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Fe({key:new Je("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:r}=t,{doc:n,selection:o}=e,{ranges:s}=o,a=Math.min(...s.map(c=>c.$from.pos)),i=Math.max(...s.map(c=>c.$to.pos)),l=FS(r);return LS(n,{from:a,to:i},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),qS=Be.create({name:"commands",addCommands(){return{...SS}}}),KS=Be.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var r,n,o;const s=()=>{var a,i,l,c;if((c=(l=(i=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:i.filterTransaction)==null?void 0:l.call(i,t))!=null?c:t.getMeta("y-sync$"))return;const d=OS(t.before,[t,...e]);zS(d).forEach(h=>{d.mapping.mapResult(h.oldRange.from).deletedAfter&&d.mapping.mapResult(h.oldRange.to).deletedBefore&&d.before.nodesBetween(h.oldRange.from,h.oldRange.to,(m,v)=>{const g=v+m.nodeSize-2,y=h.oldRange.from<=v&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:v,to:g,newFrom:d.mapping.map(v),newTo:d.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!y,editor:this.editor,transaction:t,combinedTransform:d})})});const f=d.mapping;d.steps.forEach((h,m)=>{var v,g;if(h instanceof Zt){const y=f.slice(m).map(h.from,-1),b=f.slice(m).map(h.to),x=f.invert().map(y,-1),w=f.invert().map(b),k=(v=d.doc.nodeAt(y-1))==null?void 0:v.marks.some(S=>S.eq(h.mark)),N=(g=d.doc.nodeAt(b))==null?void 0:g.marks.some(S=>S.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:x,to:w},newRange:{from:y,to:b},partial:!!(N||k),editor:this.editor,transaction:t,combinedTransform:d})}})};(o=(n=(r=this.editor.options.coreExtensionOptions)==null?void 0:r.delete)==null?void 0:n.async)==null||o?setTimeout(s,0):s()}}),YS=Be.create({name:"drop",addProseMirrorPlugins(){return[new Fe({key:new Je("tiptapDrop"),props:{handleDrop:(t,e,r,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:r,moved:n})}}})]}}),JS=Be.create({name:"editable",addProseMirrorPlugins(){return[new Fe({key:new Je("editable"),props:{editable:()=>this.editor.options.editable}})]}}),XS=new Je("focusEvents"),ZS=Be.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Fe({key:XS,props:{handleDOMEvents:{focus:(e,r)=>{t.isFocused=!0;const n=t.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,r)=>{t.isFocused=!1;const n=t.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),QS=Be.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:i,doc:l}=a,{empty:c,$anchor:d}=i,{pos:f,parent:h}=d,m=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,v=m.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=v&&m.parent.childCount===1?g===d.pos:ve.atStart(l).from===f;return!c||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},n={...r},o={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Xi()||TS()?o:n},addProseMirrorPlugins(){return[new Fe({key:new Je("clearDocument"),appendTransaction:(t,e,r)=>{if(t.some(m=>m.getMeta("composition")))return;const n=t.some(m=>m.docChanged)&&!e.doc.eq(r.doc),o=t.some(m=>m.getMeta("preventClearDocument"));if(!n||o)return;const{empty:s,from:a,to:i}=e.selection,l=ve.atStart(e.doc).from,c=ve.atEnd(e.doc).to;if(s||!(a===l&&i===c)||!Cc(r.doc))return;const d=r.tr,f=xc({state:r,transaction:d}),{commands:h}=new wc({editor:this.editor,state:f});if(h.clearNodes(),!!d.steps.length)return d}})]}}),e2=Be.create({name:"paste",addProseMirrorPlugins(){return[new Fe({key:new Je("tiptapPaste"),props:{handlePaste:(t,e,r)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:r})}}})]}}),t2=Be.create({name:"tabindex",addProseMirrorPlugins(){return[new Fe({key:new Je("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),r2=Be.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Vo(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const r=e.getAttribute("dir");return r&&(r==="ltr"||r==="rtl"||r==="auto")?r:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Fe({key:new Je("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),pG=class Rs{constructor(e,r,n=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=r,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(e);return new Rs(r,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Rs(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Rs(e,this.editor)}get children(){const e=[];return this.node.content.forEach((r,n)=>{const o=r.isBlock&&!r.isTextblock,s=r.isAtom&&!r.isText,a=r.isInline,i=this.pos+n+(s?0:1);if(i<0||i>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(i);if(!o&&!a&&l.depth<=this.depth)return;const c=new Rs(l,this.editor,o,o||a?r:null);o&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,r={}){let n=null,o=this.parent;for(;o&&!n;){if(o.node.type.name===e)if(Object.keys(r).length>0){const s=o.node.attrs,a=Object.keys(r);for(let i=0;i<a.length;i+=1){const l=a[i];if(s[l]!==r[l])break}}else n=o;o=o.parent}return n}querySelector(e,r={}){return this.querySelectorAll(e,r,!0)[0]||null}querySelectorAll(e,r={},n=!1){let o=[];if(!this.children||this.children.length===0)return o;const s=Object.keys(r);return this.children.forEach(a=>{n&&o.length>0||(a.node.type.name===e&&s.every(i=>r[i]===a.node.attrs[i])&&o.push(a),!(n&&o.length>0)&&(o=o.concat(a.querySelectorAll(e,r,n))))}),o}setAttribute(e){const{tr:r}=this.editor.state;r.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(r)}},hG=`.ProseMirror {
444
+ position: relative;
445
+ }
446
+
447
+ .ProseMirror {
448
+ word-wrap: break-word;
449
+ white-space: pre-wrap;
450
+ white-space: break-spaces;
451
+ -webkit-font-variant-ligatures: none;
452
+ font-variant-ligatures: none;
453
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
454
+ }
455
+
456
+ .ProseMirror [contenteditable="false"] {
457
+ white-space: normal;
458
+ }
459
+
460
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
461
+ white-space: pre-wrap;
462
+ }
463
+
464
+ .ProseMirror pre {
465
+ white-space: pre-wrap;
466
+ }
467
+
468
+ img.ProseMirror-separator {
469
+ display: inline !important;
470
+ border: none !important;
471
+ margin: 0 !important;
472
+ width: 0 !important;
473
+ height: 0 !important;
474
+ }
475
+
476
+ .ProseMirror-gapcursor {
477
+ display: none;
478
+ pointer-events: none;
479
+ position: absolute;
480
+ margin: 0;
481
+ }
482
+
483
+ .ProseMirror-gapcursor:after {
484
+ content: "";
485
+ display: block;
486
+ position: absolute;
487
+ top: -2px;
488
+ width: 20px;
489
+ border-top: 1px solid black;
490
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
491
+ }
492
+
493
+ @keyframes ProseMirror-cursor-blink {
494
+ to {
495
+ visibility: hidden;
496
+ }
497
+ }
498
+
499
+ .ProseMirror-hideselection *::selection {
500
+ background: transparent;
501
+ }
502
+
503
+ .ProseMirror-hideselection *::-moz-selection {
504
+ background: transparent;
505
+ }
506
+
507
+ .ProseMirror-hideselection * {
508
+ caret-color: transparent;
509
+ }
510
+
511
+ .ProseMirror-focused .ProseMirror-gapcursor {
512
+ display: block;
513
+ }`;function mG(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var gG=class extends rG{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:DU,createMappablePosition:IU},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:o,moved:s})=>this.options.onDrop(n,o,s)),this.on("paste",({event:n,slice:o})=>this.options.onPaste(n,o)),this.on("delete",this.options.onDelete);const e=this.createDoc(),r=jS(e,this.options.autofocus);this.editorState=Mo.create({doc:e,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=mG(hG,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const r=DS(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],n=this.state.reconfigure({plugins:r});return this.view.updateState(n),n}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let r=e;if([].concat(t).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;r=r.filter(a=>!a.key.startsWith(s))}),e.length===r.length)return;const n=this.state.reconfigure({plugins:r});return this.view.updateState(n),n}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[JS,GS.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),qS,ZS,QS,t2,YS,e2,KS,r2.configure({direction:this.options.textDirection})].filter(n=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[n.name]!==!1:!0):[],...this.options.extensions].filter(n=>["extension","node","mark"].includes(n==null?void 0:n.type));this.extensionManager=new Mc(r,this)}createCommandManager(){this.commandManager=new wc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=Iu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),t=Iu(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:r}=this.options,n=e.dispatchTransaction||this.dispatchTransaction.bind(this),o=r?this.extensionManager.dispatchTransaction(n):n;this.editorView=new NS(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();const a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(c)});return}const{state:e,transactions:r}=this.state.applyTransaction(t),n=!this.state.selection.eq(e.selection),o=r.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!o)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:r.slice(1)}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=r.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),i=a==null?void 0:a.getMeta("focus"),l=a==null?void 0:a.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:a}),l&&this.emit("blur",{editor:this,event:l.event,transaction:a}),!(t.getMeta("preventUpdate")||!r.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:r.slice(1)})}getAttributes(t){return _S(this.state,t)}isActive(t,e){const r=typeof t=="string"?t:null,n=typeof t=="string"?e:t;return TU(this.state,r,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Xp(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
514
+
515
+ `,textSerializers:r={}}=t||{};return CU(this.state.doc,{blockSeparator:e,textSerializers:{...FS(this.schema),...r}})}get isEmpty(){return Cc(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var r;return((r=this.$doc)==null?void 0:r.querySelector(t,e))||null}$nodes(t,e){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new pG(e,this)}get $doc(){return this.$pos(0)}};function Wo(t){return new Sc({find:t.find,handler:({state:e,range:r,match:n})=>{const o=ke(t.getAttributes,void 0,n);if(o===!1||o===null)return null;const{tr:s}=e,a=n[n.length-1],i=n[0];if(a){const l=i.search(/\S/),c=r.from+i.indexOf(a),d=c+a.length;if(Zp(r.from,r.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<r.to&&s.delete(d,r.to),c>r.from&&s.delete(r.from+l,c);const f=r.from+l+a.length;s.addMark(r.from+l,f,t.type.create(o||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function vG(t){return new Sc({find:t.find,handler:({state:e,range:r,match:n})=>{const o=ke(t.getAttributes,void 0,n)||{},{tr:s}=e,a=r.from;let i=r.to;const l=t.type.create(o);if(n[1]){const c=n[0].lastIndexOf(n[1]);let d=a+c;d>i?d=i:i=d+n[1].length;const f=n[0][n[0].length-1];s.insertText(f,a+n[0].length-1),s.replaceWith(d,i,l)}else if(n[0]){const c=t.type.isInline?a:a-1;s.insert(c,t.type.create(o)).delete(s.mapping.map(a),s.mapping.map(i))}s.scrollIntoView()},undoable:t.undoable})}function Lu(t){return new Sc({find:t.find,handler:({state:e,range:r,match:n})=>{const o=e.doc.resolve(r.from),s=ke(t.getAttributes,void 0,n)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,s)},undoable:t.undoable})}function Uo(t){return new Sc({find:t.find,handler:({state:e,range:r,match:n,chain:o})=>{const s=ke(t.getAttributes,void 0,n)||{},a=e.tr.delete(r.from,r.to),i=a.doc.resolve(r.from).blockRange(),l=i&&Ap(i,t.type,s);if(!l)return null;if(a.wrap(i,l),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,m=f||d.$to.parentOffset&&d.$from.marks();if(m){const v=m.filter(g=>h.includes(g.type.name));a.ensureMarks(v)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,s).run()}const c=a.doc.resolve(r.from-1).nodeBefore;c&&c.type===t.type&&Mn(a.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(n,c))&&a.join(r.from-1)},undoable:t.undoable})}function yG(t,e){const{selection:r}=t,{$from:n}=r;if(r instanceof ce){const s=n.index();return n.parent.canReplaceWith(s,s+1,e)}let o=n.depth;for(;o>=0;){const s=n.index(o);if(n.node(o).contentMatchAt(s).matchType(e))return!0;o-=1}return!1}var bG={};qp(bG,{createAtomBlockMarkdownSpec:()=>xG,createBlockMarkdownSpec:()=>wG,createInlineMarkdownSpec:()=>CG,parseAttributes:()=>eh,parseIndentedBlocks:()=>Fu,renderNestedMarkdownContent:()=>rh,serializeAttributes:()=>th});function eh(t){if(!(t!=null&&t.trim()))return{};const e={},r=[],n=t.replace(/["']([^"']*)["']/g,l=>(r.push(l),`__QUOTED_${r.length-1}__`)),o=n.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const l=o.map(c=>c.trim().slice(1));e.class=l.join(" ")}const s=n.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(n.matchAll(a)).forEach(([,l,c])=>{var d;const f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=r[f];h&&(e[l]=h.slice(1,-1))});const i=n.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return i&&i.split(/\s+/).filter(Boolean).forEach(l=>{l.match(/^[a-zA-Z][\w-]*$/)&&(e[l]=!0)}),e}function th(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([r,n])=>{r==="class"||r==="id"||(n===!0?e.push(r):n!==!1&&n!=null&&e.push(`${r}="${String(n)}"`))}),e.join(" ")}function xG(t){const{nodeName:e,name:r,parseAttributes:n=eh,serializeAttributes:o=th,defaultAttributes:s={},requiredAttributes:a=[],allowedAttributes:i}=t,l=r||e,c=d=>{if(!i)return d;const f={};return i.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{const h={...s,...d.attributes};return f.createNode(e,h,[])},markdownTokenizer:{name:e,level:"block",start(d){var f;const h=new RegExp(`^:::${l}(?:\\s|$)`,"m"),m=(f=d.match(h))==null?void 0:f.index;return m!==void 0?m:-1},tokenize(d,f,h){const m=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),v=d.match(m);if(!v)return;const g=v[1]||"",y=n(g);if(!a.find(b=>!(b in y)))return{type:e,raw:v[0],attributes:y}}},renderMarkdown:d=>{const f=c(d.attrs||{}),h=o(f),m=h?` {${h}}`:"";return`:::${l}${m} :::`}}}function wG(t){const{nodeName:e,name:r,getContent:n,parseAttributes:o=eh,serializeAttributes:s=th,defaultAttributes:a={},content:i="block",allowedAttributes:l}=t,c=r||e,d=f=>{if(!l)return f;const h={};return l.forEach(m=>{m in f&&(h[m]=f[m])}),h};return{parseMarkdown:(f,h)=>{let m;if(n){const g=n(f);m=typeof g=="string"?[{type:"text",text:g}]:g}else i==="block"?m=h.parseChildren(f.tokens||[]):m=h.parseInline(f.tokens||[]);const v={...a,...f.attributes};return h.createNode(e,v,m)},markdownTokenizer:{name:e,level:"block",start(f){var h;const m=new RegExp(`^:::${c}`,"m"),v=(h=f.match(m))==null?void 0:h.index;return v!==void 0?v:-1},tokenize(f,h,m){var v;const g=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=f.match(g);if(!y)return;const[b,x=""]=y,w=o(x);let k=1;const N=b.length;let S="";const C=/^:::([\w-]*)(\s.*)?/gm,M=f.slice(N);for(C.lastIndex=0;;){const E=C.exec(M);if(E===null)break;const A=E.index,O=E[1];if(!((v=E[2])!=null&&v.endsWith(":::"))){if(O)k+=1;else if(k-=1,k===0){const D=M.slice(0,A);S=D.trim();const q=f.slice(0,N+A+E[0].length);let F=[];if(S)if(i==="block")for(F=m.blockTokens(D),F.forEach($=>{$.text&&(!$.tokens||$.tokens.length===0)&&($.tokens=m.inlineTokens($.text))});F.length>0;){const $=F[F.length-1];if($.type==="paragraph"&&(!$.text||$.text.trim()===""))F.pop();else break}else F=m.inlineTokens(S);return{type:e,raw:q,attributes:w,content:S,tokens:F}}}}}},renderMarkdown:(f,h)=>{const m=d(f.attrs||{}),v=s(m),g=v?` {${v}}`:"",y=h.renderChildren(f.content||[],`
516
+
517
+ `);return`:::${c}${g}
518
+
519
+ ${y}
520
+
521
+ :::`}}}function kG(t){if(!t.trim())return{};const e={},r=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let n=r.exec(t);for(;n!==null;){const[,o,s,a]=n;e[o]=s||a,n=r.exec(t)}return e}function NG(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,r])=>`${e}="${r}"`).join(" ")}function CG(t){const{nodeName:e,name:r,getContent:n,parseAttributes:o=kG,serializeAttributes:s=NG,defaultAttributes:a={},selfClosing:i=!1,allowedAttributes:l}=t,c=r||e,d=h=>{if(!l)return h;const m={};return l.forEach(v=>{const g=typeof v=="string"?v:v.name,y=typeof v=="string"?void 0:v.skipIfDefault;if(g in h){const b=h[g];if(y!==void 0&&b===y)return;m[g]=b}}),m},f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(h,m)=>{const v={...a,...h.attributes};if(i)return m.createNode(e,v);const g=n?n(h):h.content||"";return g?m.createNode(e,v,[m.createTextNode(g)]):m.createNode(e,v,[])},markdownTokenizer:{name:e,level:"inline",start(h){const m=i?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),v=h.match(m),g=v==null?void 0:v.index;return g!==void 0?g:-1},tokenize(h,m,v){const g=i?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),y=h.match(g);if(!y)return;let b="",x="";if(i){const[,k]=y;x=k}else{const[,k,N]=y;x=k,b=N||""}const w=o(x.trim());return{type:e,raw:y[0],content:b.trim(),attributes:w}}},renderMarkdown:h=>{let m="";n?m=n(h):h.content&&h.content.length>0&&(m=h.content.filter(b=>b.type==="text").map(b=>b.text).join(""));const v=d(h.attrs||{}),g=s(v),y=g?` ${g}`:"";return i?`[${c}${y}]`:`[${c}${y}]${m}[/${c}]`}}}function Fu(t,e,r){var n,o,s,a;const i=t.split(`
522
+ `),l=[];let c="",d=0;const f=e.baseIndentSize||2;for(;d<i.length;){const h=i[d],m=h.match(e.itemPattern);if(!m){if(l.length>0)break;if(h.trim()===""){d+=1,c=`${c}${h}
523
+ `;continue}else return}const v=e.extractItemData(m),{indentLevel:g,mainContent:y}=v;c=`${c}${h}
524
+ `;const b=[y];for(d+=1;d<i.length;){const N=i[d];if(N.trim()===""){const S=i.slice(d+1).findIndex(C=>C.trim()!=="");if(S===-1)break;if((((o=(n=i[d+1+S].match(/^(\s*)/))==null?void 0:n[1])==null?void 0:o.length)||0)>g){b.push(N),c=`${c}${N}
525
+ `,d+=1;continue}else break}if((((a=(s=N.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:a.length)||0)>g)b.push(N),c=`${c}${N}
526
+ `,d+=1;else break}let x;const w=b.slice(1);if(w.length>0){const N=w.map(S=>S.slice(g+f)).join(`
527
+ `);N.trim()&&(e.customNestedParser?x=e.customNestedParser(N):x=r.blockTokens(N))}const k=e.createToken(v,x);l.push(k)}if(l.length!==0)return{items:l,raw:c}}function rh(t,e,r,n){if(!t||!Array.isArray(t.content))return"";const o=typeof r=="function"?r(n):r,[s,...a]=t.content,i=e.renderChildren([s]),l=[`${o}${i}`];return a&&a.length>0&&a.forEach(c=>{const d=e.renderChildren([c]);if(d){const f=d.split(`
528
+ `).map(h=>h?e.indent(h):"").join(`
529
+ `);l.push(f)}}),l.join(`
530
+ `)}function SG(t,e,r={}){const{state:n}=e,{doc:o,tr:s}=n,a=t;o.descendants((i,l)=>{const c=s.mapping.map(l),d=s.mapping.map(l)+i.nodeSize;let f=null;if(i.marks.forEach(m=>{if(m!==a)return!1;f=m}),!f)return;let h=!1;if(Object.keys(r).forEach(m=>{r[m]!==f.attrs[m]&&(h=!0)}),h){const m=t.type.create({...t.attrs,...r});s.removeMark(c,d,t.type),s.addMark(c,d,m)}}),s.docChanged&&e.view.dispatch(s)}var Pt=class n2 extends Qp{constructor(){super(...arguments),this.type="node"}static create(e={}){const r=typeof e=="function"?e():e;return new n2(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}};function ro(t){return new iG({find:t.find,handler:({state:e,range:r,match:n,pasteEvent:o})=>{const s=ke(t.getAttributes,void 0,n,o);if(s===!1||s===null)return null;const{tr:a}=e,i=n[n.length-1],l=n[0];let c=r.to;if(i){const d=l.search(/\S/),f=r.from+l.indexOf(i),h=f+i.length;if(Zp(r.from,r.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===t.type&&v!==m.mark.type)).filter(m=>m.to>f).length)return null;h<r.to&&a.delete(h,r.to),f>r.from&&a.delete(r.from+d,f),c=r.from+d+i.length,a.addMark(r.from+d,c,t.type.create(s||{})),a.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:MG,getOwnPropertySymbols:EG}=Object,{hasOwnProperty:jG}=Object.prototype;function Ad(t,e){return function(r,n,o){return t(r,n,o)&&e(r,n,o)}}function si(t){return function(e,r,n){if(!e||!r||typeof e!="object"||typeof r!="object")return t(e,r,n);const{cache:o}=n,s=o.get(e),a=o.get(r);if(s&&a)return s===r&&a===e;o.set(e,r),o.set(r,e);const i=t(e,r,n);return o.delete(e),o.delete(r),i}}function RG(t){return t!=null?t[Symbol.toStringTag]:void 0}function rv(t){return MG(t).concat(EG(t))}const TG=Object.hasOwn||((t,e)=>jG.call(t,e));function lo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const AG="__v",OG="__o",DG="_owner",{getOwnPropertyDescriptor:nv,keys:ov}=Object;function IG(t,e){return t.byteLength===e.byteLength&&Qi(new Uint8Array(t),new Uint8Array(e))}function PG(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function LG(t,e){return t.byteLength===e.byteLength&&Qi(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function FG(t,e){return lo(t.getTime(),e.getTime())}function _G(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function zG(t,e){return t===e}function sv(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.entries();let a,i,l=0;for(;(a=s.next())&&!a.done;){const c=e.entries();let d=!1,f=0;for(;(i=c.next())&&!i.done;){if(o[f]){f++;continue}const h=a.value,m=i.value;if(r.equals(h[0],m[0],l,f,t,e,r)&&r.equals(h[1],m[1],h[0],m[0],t,e,r)){d=o[f]=!0;break}f++}if(!d)return!1;l++}return!0}const BG=lo;function $G(t,e,r){const n=ov(t);let o=n.length;if(ov(e).length!==o)return!1;for(;o-- >0;)if(!o2(t,e,r,n[o]))return!1;return!0}function ys(t,e,r){const n=rv(t);let o=n.length;if(rv(e).length!==o)return!1;let s,a,i;for(;o-- >0;)if(s=n[o],!o2(t,e,r,s)||(a=nv(t,s),i=nv(e,s),(a||i)&&(!a||!i||a.configurable!==i.configurable||a.enumerable!==i.enumerable||a.writable!==i.writable)))return!1;return!0}function HG(t,e){return lo(t.valueOf(),e.valueOf())}function VG(t,e){return t.source===e.source&&t.flags===e.flags}function av(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const o=new Array(n),s=t.values();let a,i;for(;(a=s.next())&&!a.done;){const l=e.values();let c=!1,d=0;for(;(i=l.next())&&!i.done;){if(!o[d]&&r.equals(a.value,i.value,a.value,i.value,t,e,r)){c=o[d]=!0;break}d++}if(!c)return!1}return!0}function Qi(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function WG(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function o2(t,e,r,n){return(n===DG||n===OG||n===AG)&&(t.$$typeof||e.$$typeof)?!0:TG(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const UG="[object ArrayBuffer]",GG="[object Arguments]",qG="[object Boolean]",KG="[object DataView]",YG="[object Date]",JG="[object Error]",XG="[object Map]",ZG="[object Number]",QG="[object Object]",e9="[object RegExp]",t9="[object Set]",r9="[object String]",n9={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},o9="[object URL]",s9=Object.prototype.toString;function a9({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:o,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:i,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:m,unknownTagComparators:v}){return function(g,y,b){if(g===y)return!0;if(g==null||y==null)return!1;const x=typeof g;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?i(g,y,b):x==="function"?s(g,y,b):!1;const w=g.constructor;if(w!==y.constructor)return!1;if(w===Object)return l(g,y,b);if(Array.isArray(g))return e(g,y,b);if(w===Date)return n(g,y,b);if(w===RegExp)return d(g,y,b);if(w===Map)return a(g,y,b);if(w===Set)return f(g,y,b);const k=s9.call(g);if(k===YG)return n(g,y,b);if(k===e9)return d(g,y,b);if(k===XG)return a(g,y,b);if(k===t9)return f(g,y,b);if(k===QG)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,b);if(k===o9)return m(g,y,b);if(k===JG)return o(g,y,b);if(k===GG)return l(g,y,b);if(n9[k])return h(g,y,b);if(k===UG)return t(g,y,b);if(k===KG)return r(g,y,b);if(k===qG||k===ZG||k===r9)return c(g,y,b);if(v){let N=v[k];if(!N){const S=RG(g);S&&(N=v[S])}if(N)return N(g,y,b)}return!1}}function i9({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:IG,areArraysEqual:r?ys:PG,areDataViewsEqual:LG,areDatesEqual:FG,areErrorsEqual:_G,areFunctionsEqual:zG,areMapsEqual:r?Ad(sv,ys):sv,areNumbersEqual:BG,areObjectsEqual:r?ys:$G,arePrimitiveWrappersEqual:HG,areRegExpsEqual:VG,areSetsEqual:r?Ad(av,ys):av,areTypedArraysEqual:r?Ad(Qi,ys):Qi,areUrlsEqual:WG,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const o=si(n.areArraysEqual),s=si(n.areMapsEqual),a=si(n.areObjectsEqual),i=si(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:i})}return n}function l9(t){return function(e,r,n,o,s,a,i){return t(e,r,i)}}function c9({circular:t,comparator:e,createState:r,equals:n,strict:o}){if(r)return function(a,i){const{cache:l=t?new WeakMap:void 0,meta:c}=r();return e(a,i,{cache:l,equals:n,meta:c,strict:o})};if(t)return function(a,i){return e(a,i,{cache:new WeakMap,equals:n,meta:void 0,strict:o})};const s={cache:void 0,equals:n,meta:void 0,strict:o};return function(a,i){return e(a,i,s)}}const d9=jn();jn({strict:!0});jn({circular:!0});jn({circular:!0,strict:!0});jn({createInternalComparator:()=>lo});jn({strict:!0,createInternalComparator:()=>lo});jn({circular:!0,createInternalComparator:()=>lo});jn({circular:!0,createInternalComparator:()=>lo,strict:!0});function jn(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:o=!1}=t,s=i9(t),a=a9(s),i=r?r(a):l9(a);return c9({circular:e,comparator:a,createState:n,equals:i,strict:o})}var _u={exports:{}},Od={};/**
531
+ * @license React
532
+ * use-sync-external-store-shim/with-selector.production.js
533
+ *
534
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
535
+ *
536
+ * This source code is licensed under the MIT license found in the
537
+ * LICENSE file in the root directory of this source tree.
538
+ */var iv;function u9(){if(iv)return Od;iv=1;var t=T,e=ma;function r(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;return Od.useSyncExternalStoreWithSelector=function(c,d,f,h,m){var v=s(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=i(function(){function b(S){if(!x){if(x=!0,w=S,S=h(S),m!==void 0&&g.hasValue){var C=g.value;if(m(C,S))return k=C}return k=S}if(C=k,n(w,S))return C;var M=h(S);return m!==void 0&&m(C,M)?(w=S,C):(w=S,k=M)}var x=!1,w,k,N=f===void 0?null:f;return[function(){return b(d())},N===null?void 0:function(){return b(N())}]},[d,f,h,m]);var y=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=y},[y]),l(y),y},Od}var lv={};/**
539
+ * @license React
540
+ * use-sync-external-store-shim/with-selector.development.js
541
+ *
542
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
543
+ *
544
+ * This source code is licensed under the MIT license found in the
545
+ * LICENSE file in the root directory of this source tree.
546
+ */var cv;function f9(){return cv||(cv=1,process.env.NODE_ENV!=="production"&&function(){function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=T,r=ma,n=typeof Object.is=="function"?Object.is:t,o=r.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;lv.useSyncExternalStoreWithSelector=function(c,d,f,h,m){var v=s(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=i(function(){function b(S){if(!x){if(x=!0,w=S,S=h(S),m!==void 0&&g.hasValue){var C=g.value;if(m(C,S))return k=C}return k=S}if(C=k,n(w,S))return C;var M=h(S);return m!==void 0&&m(C,M)?(w=S,C):(w=S,k=M)}var x=!1,w,k,N=f===void 0?null:f;return[function(){return b(d())},N===null?void 0:function(){return b(N())}]},[d,f,h,m]);var y=o(c,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),lv}process.env.NODE_ENV==="production"?_u.exports=u9():_u.exports=f9();var p9=_u.exports,h9=(...t)=>e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&(r.current=e)})},m9=({contentComponent:t})=>{const e=ma.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return u.jsx(u.Fragment,{children:Object.values(e)})};function g9(){const t=new Set;let e={};return{subscribe(r){return t.add(r),()=>{t.delete(r)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(r,n){e={...e,[r]:Ol.createPortal(n.reactElement,n.element,r)},t.forEach(o=>o())},removeRenderer(r){const n={...e};delete n[r],e=n,t.forEach(o=>o())}}}var v9=class extends T.Component{constructor(t){var e;super(t),this.editorContentRef=T.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&(t=e.view.dom)!=null&&t.parentNode){if(e.contentComponent)return;const r=this.editorContentRef.current;r.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:r}),e.contentComponent=g9(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const r=document.createElement("div");r.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:r})}catch{}}}render(){const{editor:t,innerRef:e,...r}=this.props;return u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:h9(e,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&u.jsx(m9,{contentComponent:t.contentComponent})]})}},y9=T.forwardRef((t,e)=>{const r=T.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return T.createElement(v9,{key:r,innerRef:e,...t})}),s2=T.memo(y9),b9=typeof window<"u"?T.useLayoutEffect:T.useEffect,x9=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",e),()=>{r.off("transaction",e)}}}};function w9(t){var e;const[r]=T.useState(()=>new x9(t.editor)),n=p9.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:d9);return b9(()=>r.watch(t.editor),[t.editor,r]),T.useDebugValue(n),n}var dv=process.env.NODE_ENV!=="production",zu=typeof window>"u",k9=zu||!!(typeof window<"u"&&window.next),N9=class a2{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(zu||k9){if(dv)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&zu&&dv)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var n,o;return(o=(n=this.options.current).onBeforeCreate)==null?void 0:o.call(n,...r)},onBlur:(...r)=>{var n,o;return(o=(n=this.options.current).onBlur)==null?void 0:o.call(n,...r)},onCreate:(...r)=>{var n,o;return(o=(n=this.options.current).onCreate)==null?void 0:o.call(n,...r)},onDestroy:(...r)=>{var n,o;return(o=(n=this.options.current).onDestroy)==null?void 0:o.call(n,...r)},onFocus:(...r)=>{var n,o;return(o=(n=this.options.current).onFocus)==null?void 0:o.call(n,...r)},onSelectionUpdate:(...r)=>{var n,o;return(o=(n=this.options.current).onSelectionUpdate)==null?void 0:o.call(n,...r)},onTransaction:(...r)=>{var n,o;return(o=(n=this.options.current).onTransaction)==null?void 0:o.call(n,...r)},onUpdate:(...r)=>{var n,o;return(o=(n=this.options.current).onUpdate)==null?void 0:o.call(n,...r)},onContentError:(...r)=>{var n,o;return(o=(n=this.options.current).onContentError)==null?void 0:o.call(n,...r)},onDrop:(...r)=>{var n,o;return(o=(n=this.options.current).onDrop)==null?void 0:o.call(n,...r)},onPaste:(...r)=>{var n,o;return(o=(n=this.options.current).onPaste)==null?void 0:o.call(n,...r)},onDelete:(...r)=>{var n,o;return(o=(n=this.options.current).onDelete)==null?void 0:o.call(n,...r)}};return new gG(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,r){return Object.keys(e).every(n=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)?!0:n==="extensions"&&e.extensions&&r.extensions?e.extensions.length!==r.extensions.length?!1:e.extensions.every((o,s)=>{var a;return o===((a=r.extensions)==null?void 0:a[s])}):e[n]===r[n])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?a2.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,n)=>r===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function C9(t={},e=[]){const r=T.useRef(t);r.current=t;const[n]=T.useState(()=>new N9(r)),o=ma.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return T.useDebugValue(o),T.useEffect(n.onRender(e)),w9({editor:o,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),o}var i2=T.createContext({editor:null});i2.Consumer;var S9=T.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),M9=()=>T.useContext(S9);T.forwardRef((t,e)=>{const{onDragStart:r}=M9(),n=t.as||"div";return u.jsx(n,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...t.style}})});T.createContext({markViewContentRef:()=>{}});var nh=T.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});nh.displayName="TiptapContext";var E9=()=>T.useContext(nh);function l2({editor:t,instance:e,children:r}){const n=t??e;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const o=T.useMemo(()=>({editor:n}),[n]),s=T.useMemo(()=>({editor:n}),[n]);return u.jsx(i2.Provider,{value:s,children:u.jsx(nh.Provider,{value:o,children:r})})}l2.displayName="Tiptap";function c2({...t}){const{editor:e}=E9();return u.jsx(s2,{editor:e,...t})}c2.displayName="Tiptap.Content";Object.assign(l2,{Content:c2});var el=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:r,...n}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,n,r]},j9=/^\s*>\s$/,R9=Pt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return el("blockquote",{...Ue(this.options.HTMLAttributes,t),children:el("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const r=">",n=[];return t.content.forEach(o=>{const s=e.renderChildren([o]).split(`
547
+ `).map(a=>a.trim()===""?r:`${r} ${a}`);n.push(s.join(`
548
+ `))}),n.join(`
549
+ ${r}
550
+ `)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Uo({find:j9,type:this.type})]}}),T9=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,A9=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,O9=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,D9=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,I9=io.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return el("strong",{...Ue(this.options.HTMLAttributes,t),children:el("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Wo({find:T9,type:this.type}),Wo({find:O9,type:this.type})]},addPasteRules(){return[ro({find:A9,type:this.type}),ro({find:D9,type:this.type})]}}),P9=/(^|[^`])`([^`]+)`(?!`)$/,L9=/(^|[^`])`([^`]+)`(?!`)/g,F9=io.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ue(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Wo({find:P9,type:this.type})]},addPasteRules(){return[ro({find:L9,type:this.type})]}}),Dd=4,_9=/^```([a-z]+)?[\s\n]$/,z9=/^~~~([a-z]+)?[\s\n]$/,B9=Pt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Dd,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:r}=this.options;return r&&[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(r)).map(o=>o.replace(r,""))[0]||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ue(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var r;return((r=t.raw)==null?void 0:r.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var r;let n="";const o=((r=t.attrs)==null?void 0:r.language)||"";return t.content?n=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
551
+ `):n=`\`\`\`${o}
552
+
553
+ \`\`\``,n},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,r=e.pos===1;return!t||e.parent.type.name!==this.name?!1:r||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const r=(e=this.options.tabSize)!=null?e:Dd,{state:n}=t,{selection:o}=n,{$from:s,empty:a}=o;if(s.parent.type!==this.type)return!1;const i=" ".repeat(r);return a?t.commands.insertContent(i):t.commands.command(({tr:l})=>{const{from:c,to:d}=o,f=n.doc.textBetween(c,d,`
554
+ `,`
555
+ `).split(`
556
+ `).map(h=>i+h).join(`
557
+ `);return l.replaceWith(c,d,n.schema.text(f)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const r=(e=this.options.tabSize)!=null?e:Dd,{state:n}=t,{selection:o}=n,{$from:s,empty:a}=o;return s.parent.type!==this.type?!1:a?t.commands.command(({tr:i})=>{var l;const{pos:c}=s,d=s.start(),f=s.end(),h=n.doc.textBetween(d,f,`
558
+ `,`
559
+ `).split(`
560
+ `);let m=0,v=0;const g=c-d;for(let w=0;w<h.length;w+=1){if(v+h[w].length>=g){m=w;break}v+=h[w].length+1}const y=((l=h[m].match(/^ */))==null?void 0:l[0])||"",b=Math.min(y.length,r);if(b===0)return!0;let x=d;for(let w=0;w<m;w+=1)x+=h[w].length+1;return i.delete(x,x+b),c-x<=b&&i.setSelection(fe.create(i.doc,x)),!0}):t.commands.command(({tr:i})=>{const{from:l,to:c}=o,d=n.doc.textBetween(l,c,`
561
+ `,`
562
+ `).split(`
563
+ `).map(f=>{var h;const m=((h=f.match(/^ */))==null?void 0:h[0])||"",v=Math.min(m.length,r);return f.slice(v)}).join(`
564
+ `);return i.replaceWith(l,c,n.schema.text(d)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:r}=e,{$from:n,empty:o}=r;if(!o||n.parent.type!==this.type)return!1;const s=n.parentOffset===n.parent.nodeSize-2,a=n.parent.textContent.endsWith(`
565
+
566
+ `);return!s||!a?!1:t.chain().command(({tr:i})=>(i.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:r,doc:n}=e,{$from:o,empty:s}=r;if(!s||o.parent.type!==this.type||o.parentOffset!==o.parent.nodeSize-2)return!1;const a=o.after();return a===void 0?!1:n.nodeAt(a)?t.commands.command(({tr:i})=>(i.setSelection(ve.near(n.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Lu({find:_9,type:this.type,getAttributes:t=>({language:t[1]})}),Lu({find:z9,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Fe({key:new Je("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const r=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),o=n?JSON.parse(n):void 0,s=o==null?void 0:o.mode;if(!r||!s)return!1;const{tr:a,schema:i}=t.state,l=i.text(r.replace(/\r\n?/g,`
567
+ `));return a.replaceSelectionWith(this.type.create({language:s},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(fe.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),$9=Pt.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
568
+
569
+ `):""}),H9=Pt.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ue(this.options.HTMLAttributes,t)]},renderText(){return`
570
+ `},renderMarkdown:()=>`
571
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:r,editor:n})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=r;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:i}=n.extensionManager,l=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&a){const f=l.filter(h=>i.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),V9=Pt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ue(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var r;const n=(r=t.attrs)!=null&&r.level?parseInt(t.attrs.level,10):1,o="#".repeat(n);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Lu({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),W9=Pt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ue(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!yG(e,e.schema.nodes[this.name]))return!1;const{selection:r}=e,{$to:n}=r,o=t();return BS(r)?o.insertContentAt(n.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:s,tr:a,dispatch:i})=>{if(i){const{$to:l}=a.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?a.setSelection(fe.create(a.doc,l.pos+1)):l.nodeAfter.isBlock?a.setSelection(ce.create(a.doc,l.pos)):a.setSelection(fe.create(a.doc,l.pos));else{const d=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,f=d==null?void 0:d.create();f&&(a.insert(c,f),a.setSelection(fe.create(a.doc,c+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[vG({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),U9=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,G9=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,q9=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,K9=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Y9=io.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ue(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Wo({find:U9,type:this.type}),Wo({find:q9,type:this.type})]},addPasteRules(){return[ro({find:G9,type:this.type}),ro({find:K9,type:this.type})]}});const J9="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",X9="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Bu="numeric",$u="ascii",Hu="alpha",Ls="asciinumeric",Ts="alphanumeric",Vu="domain",d2="emoji",Z9="scheme",Q9="slashscheme",Id="whitespace";function eq(t,e){return t in e||(e[t]=[]),e[t]}function zn(t,e,r){e[Bu]&&(e[Ls]=!0,e[Ts]=!0),e[$u]&&(e[Ls]=!0,e[Hu]=!0),e[Ls]&&(e[Ts]=!0),e[Hu]&&(e[Ts]=!0),e[Ts]&&(e[Vu]=!0),e[d2]&&(e[Vu]=!0);for(const n in e){const o=eq(n,r);o.indexOf(t)<0&&o.push(t)}}function tq(t,e){const r={};for(const n in e)e[n].indexOf(t)>=0&&(r[n]=!0);return r}function yt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}yt.groups={};yt.prototype={accepts(){return!!this.t},go(t){const e=this,r=e.j[t];if(r)return r;for(let n=0;n<e.jr.length;n++){const o=e.jr[n][0],s=e.jr[n][1];if(s&&o.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,r,n){for(let o=0;o<t.length;o++)this.tt(t[o],e,r,n)},tr(t,e,r,n){n=n||yt.groups;let o;return e&&e.j?o=e:(o=new yt(e),r&&n&&zn(e,r,n)),this.jr.push([t,o]),o},ts(t,e,r,n){let o=this;const s=t.length;if(!s)return o;for(let a=0;a<s-1;a++)o=o.tt(t[a]);return o.tt(t[s-1],e,r,n)},tt(t,e,r,n){n=n||yt.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const s=e;let a,i=o.go(t);if(i?(a=new yt,Object.assign(a.j,i.j),a.jr.push.apply(a.jr,i.jr),a.jd=i.jd,a.t=i.t):a=new yt,s){if(n)if(a.t&&typeof a.t=="string"){const l=Object.assign(tq(a.t,n),r);zn(s,l,n)}else r&&zn(s,r,n);a.t=s}return o.j[t]=a,a}};const ge=(t,e,r,n,o)=>t.ta(e,r,n,o),_e=(t,e,r,n,o)=>t.tr(e,r,n,o),uv=(t,e,r,n,o)=>t.ts(e,r,n,o),K=(t,e,r,n,o)=>t.tt(e,r,n,o),Dr="WORD",Wu="UWORD",u2="ASCIINUMERICAL",f2="ALPHANUMERICAL",aa="LOCALHOST",Uu="TLD",Gu="UTLD",bi="SCHEME",So="SLASH_SCHEME",oh="NUM",qu="WS",sh="NL",Fs="OPENBRACE",_s="CLOSEBRACE",tl="OPENBRACKET",rl="CLOSEBRACKET",nl="OPENPAREN",ol="CLOSEPAREN",sl="OPENANGLEBRACKET",al="CLOSEANGLEBRACKET",il="FULLWIDTHLEFTPAREN",ll="FULLWIDTHRIGHTPAREN",cl="LEFTCORNERBRACKET",dl="RIGHTCORNERBRACKET",ul="LEFTWHITECORNERBRACKET",fl="RIGHTWHITECORNERBRACKET",pl="FULLWIDTHLESSTHAN",hl="FULLWIDTHGREATERTHAN",ml="AMPERSAND",gl="APOSTROPHE",vl="ASTERISK",tn="AT",yl="BACKSLASH",bl="BACKTICK",xl="CARET",on="COLON",ah="COMMA",wl="DOLLAR",ir="DOT",kl="EQUALS",ih="EXCLAMATION",Ft="HYPHEN",zs="PERCENT",Nl="PIPE",Cl="PLUS",Sl="POUND",Bs="QUERY",lh="QUOTE",p2="FULLWIDTHMIDDLEDOT",ch="SEMI",lr="SLASH",$s="TILDE",Ml="UNDERSCORE",h2="EMOJI",El="SYM";var m2=Object.freeze({__proto__:null,ALPHANUMERICAL:f2,AMPERSAND:ml,APOSTROPHE:gl,ASCIINUMERICAL:u2,ASTERISK:vl,AT:tn,BACKSLASH:yl,BACKTICK:bl,CARET:xl,CLOSEANGLEBRACKET:al,CLOSEBRACE:_s,CLOSEBRACKET:rl,CLOSEPAREN:ol,COLON:on,COMMA:ah,DOLLAR:wl,DOT:ir,EMOJI:h2,EQUALS:kl,EXCLAMATION:ih,FULLWIDTHGREATERTHAN:hl,FULLWIDTHLEFTPAREN:il,FULLWIDTHLESSTHAN:pl,FULLWIDTHMIDDLEDOT:p2,FULLWIDTHRIGHTPAREN:ll,HYPHEN:Ft,LEFTCORNERBRACKET:cl,LEFTWHITECORNERBRACKET:ul,LOCALHOST:aa,NL:sh,NUM:oh,OPENANGLEBRACKET:sl,OPENBRACE:Fs,OPENBRACKET:tl,OPENPAREN:nl,PERCENT:zs,PIPE:Nl,PLUS:Cl,POUND:Sl,QUERY:Bs,QUOTE:lh,RIGHTCORNERBRACKET:dl,RIGHTWHITECORNERBRACKET:fl,SCHEME:bi,SEMI:ch,SLASH:lr,SLASH_SCHEME:So,SYM:El,TILDE:$s,TLD:Uu,UNDERSCORE:Ml,UTLD:Gu,UWORD:Wu,WORD:Dr,WS:qu});const Ar=/[a-z]/,bs=new RegExp("\\p{L}","u"),Pd=new RegExp("\\p{Emoji}","u"),Or=/\d/,Ld=/\s/,fv="\r",Fd=`
572
+ `,rq="️",nq="‍",_d="";let ai=null,ii=null;function oq(t=[]){const e={};yt.groups=e;const r=new yt;ai==null&&(ai=pv(J9)),ii==null&&(ii=pv(X9)),K(r,"'",gl),K(r,"{",Fs),K(r,"}",_s),K(r,"[",tl),K(r,"]",rl),K(r,"(",nl),K(r,")",ol),K(r,"<",sl),K(r,">",al),K(r,"(",il),K(r,")",ll),K(r,"「",cl),K(r,"」",dl),K(r,"『",ul),K(r,"』",fl),K(r,"<",pl),K(r,">",hl),K(r,"&",ml),K(r,"*",vl),K(r,"@",tn),K(r,"`",bl),K(r,"^",xl),K(r,":",on),K(r,",",ah),K(r,"$",wl),K(r,".",ir),K(r,"=",kl),K(r,"!",ih),K(r,"-",Ft),K(r,"%",zs),K(r,"|",Nl),K(r,"+",Cl),K(r,"#",Sl),K(r,"?",Bs),K(r,'"',lh),K(r,"/",lr),K(r,";",ch),K(r,"~",$s),K(r,"_",Ml),K(r,"\\",yl),K(r,"・",p2);const n=_e(r,Or,oh,{[Bu]:!0});_e(n,Or,n);const o=_e(n,Ar,u2,{[Ls]:!0}),s=_e(n,bs,f2,{[Ts]:!0}),a=_e(r,Ar,Dr,{[$u]:!0});_e(a,Or,o),_e(a,Ar,a),_e(o,Or,o),_e(o,Ar,o);const i=_e(r,bs,Wu,{[Hu]:!0});_e(i,Ar),_e(i,Or,s),_e(i,bs,i),_e(s,Or,s),_e(s,Ar),_e(s,bs,s);const l=K(r,Fd,sh,{[Id]:!0}),c=K(r,fv,qu,{[Id]:!0}),d=_e(r,Ld,qu,{[Id]:!0});K(r,_d,d),K(c,Fd,l),K(c,_d,d),_e(c,Ld,d),K(d,fv),K(d,Fd),_e(d,Ld,d),K(d,_d,d);const f=_e(r,Pd,h2,{[d2]:!0});K(f,"#"),_e(f,Pd,f),K(f,rq,f);const h=K(f,nq);K(h,"#"),_e(h,Pd,f);const m=[[Ar,a],[Or,o]],v=[[Ar,null],[bs,i],[Or,s]];for(let g=0;g<ai.length;g++)Xr(r,ai[g],Uu,Dr,m);for(let g=0;g<ii.length;g++)Xr(r,ii[g],Gu,Wu,v);zn(Uu,{tld:!0,ascii:!0},e),zn(Gu,{utld:!0,alpha:!0},e),Xr(r,"file",bi,Dr,m),Xr(r,"mailto",bi,Dr,m),Xr(r,"http",So,Dr,m),Xr(r,"https",So,Dr,m),Xr(r,"ftp",So,Dr,m),Xr(r,"ftps",So,Dr,m),zn(bi,{scheme:!0,ascii:!0},e),zn(So,{slashscheme:!0,ascii:!0},e),t=t.sort((g,y)=>g[0]>y[0]?1:-1);for(let g=0;g<t.length;g++){const y=t[g][0],b=t[g][1]?{[Z9]:!0}:{[Q9]:!0};y.indexOf("-")>=0?b[Vu]=!0:Ar.test(y)?Or.test(y)?b[Ls]=!0:b[$u]=!0:b[Bu]=!0,uv(r,y,y,b)}return uv(r,"localhost",aa,{ascii:!0}),r.jd=new yt(El),{start:r,tokens:Object.assign({groups:e},m2)}}function g2(t,e){const r=sq(e.replace(/[A-Z]/g,i=>i.toLowerCase())),n=r.length,o=[];let s=0,a=0;for(;a<n;){let i=t,l=null,c=0,d=null,f=-1,h=-1;for(;a<n&&(l=i.go(r[a]));)i=l,i.accepts()?(f=0,h=0,d=i):f>=0&&(f+=r[a].length,h++),c+=r[a].length,s+=r[a].length,a++;s-=f,a-=h,c-=f,o.push({t:d.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function sq(t){const e=[],r=t.length;let n=0;for(;n<r;){let o=t.charCodeAt(n),s,a=o<55296||o>56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?t[n]:t.slice(n,n+2);e.push(a),n+=a.length}return e}function Xr(t,e,r,n,o){let s;const a=e.length;for(let i=0;i<a-1;i++){const l=e[i];t.j[l]?s=t.j[l]:(s=new yt(n),s.jr=o.slice(),t.j[l]=s),t=s}return s=new yt(r),s.jr=o.slice(),t.j[e[a-1]]=s,s}function pv(t){const e=[],r=[];let n=0,o="0123456789";for(;n<t.length;){let s=0;for(;o.indexOf(t[n+s])>=0;)s++;if(s>0){e.push(r.join(""));for(let a=parseInt(t.substring(n,n+s),10);a>0;a--)r.pop();n+=s}else r.push(t[n]),n++}return e}const ia={defaultProtocol:"http",events:null,format:hv,formatHref:hv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function dh(t,e=null){let r=Object.assign({},ia);t&&(r=Object.assign(r,t instanceof dh?t.o:t));const n=r.ignoreTags,o=[];for(let s=0;s<n.length;s++)o.push(n[s].toUpperCase());this.o=r,e&&(this.defaultRender=e),this.ignoreTags=o}dh.prototype={o:ia,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,r){const n=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=r.t in o?o[r.t]:ia[t],typeof o=="function"&&n&&(o=o(e,r))):typeof o=="function"&&n&&(o=o(e,r.t,r)),o)},getObj(t,e,r){let n=this.o[t];return typeof n=="function"&&e!=null&&(n=n(e,r.t,r)),n},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function hv(t){return t}function v2(t,e){this.t="token",this.v=t,this.tk=e}v2.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),r=t.get("truncate",e,this),n=t.get("format",e,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ia.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,r=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",r,this),o=t.get("tagName",r,e),s=this.toFormattedString(t),a={},i=t.get("className",r,e),l=t.get("target",r,e),c=t.get("rel",r,e),d=t.getObj("attributes",r,e),f=t.getObj("events",r,e);return a.href=n,i&&(a.class=i),l&&(a.target=l),c&&(a.rel=c),d&&Object.assign(a,d),{tagName:o,attributes:a,content:s,eventListeners:f}}};function Ec(t,e){class r extends v2{constructor(o,s){super(o,s),this.t=t}}for(const n in e)r.prototype[n]=e[n];return r.t=t,r}const mv=Ec("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),gv=Ec("text"),aq=Ec("nl"),li=Ec("url",{isLink:!0,toHref(t=ia.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==aa&&t[1].t===on}}),Lt=t=>new yt(t);function iq({groups:t}){const e=t.domain.concat([ml,vl,tn,yl,bl,xl,wl,kl,Ft,oh,zs,Nl,Cl,Sl,lr,El,$s,Ml]),r=[gl,on,ah,ir,ih,zs,Bs,lh,ch,sl,al,Fs,_s,rl,tl,nl,ol,il,ll,cl,dl,ul,fl,pl,hl],n=[ml,gl,vl,yl,bl,xl,wl,kl,Ft,Fs,_s,zs,Nl,Cl,Sl,Bs,lr,El,$s,Ml],o=Lt(),s=K(o,$s);ge(s,n,s),ge(s,t.domain,s);const a=Lt(),i=Lt(),l=Lt();ge(o,t.domain,a),ge(o,t.scheme,i),ge(o,t.slashscheme,l),ge(a,n,s),ge(a,t.domain,a);const c=K(a,tn);K(s,tn,c),K(i,tn,c),K(l,tn,c);const d=K(s,ir);ge(d,n,s),ge(d,t.domain,s);const f=Lt();ge(c,t.domain,f),ge(f,t.domain,f);const h=K(f,ir);ge(h,t.domain,f);const m=Lt(mv);ge(h,t.tld,m),ge(h,t.utld,m),K(c,aa,m);const v=K(f,Ft);K(v,Ft,v),ge(v,t.domain,f),ge(m,t.domain,f),K(m,ir,h),K(m,Ft,v);const g=K(m,on);ge(g,t.numeric,mv);const y=K(a,Ft),b=K(a,ir);K(y,Ft,y),ge(y,t.domain,a),ge(b,n,s),ge(b,t.domain,a);const x=Lt(li);ge(b,t.tld,x),ge(b,t.utld,x),ge(x,t.domain,a),ge(x,n,s),K(x,ir,b),K(x,Ft,y),K(x,tn,c);const w=K(x,on),k=Lt(li);ge(w,t.numeric,k);const N=Lt(li),S=Lt();ge(N,e,N),ge(N,r,S),ge(S,e,N),ge(S,r,S),K(x,lr,N),K(k,lr,N);const C=K(i,on),M=K(l,on),E=K(M,lr),A=K(E,lr);ge(i,t.domain,a),K(i,ir,b),K(i,Ft,y),ge(l,t.domain,a),K(l,ir,b),K(l,Ft,y),ge(C,t.domain,N),K(C,lr,N),K(C,Bs,N),ge(A,t.domain,N),ge(A,e,N),K(A,lr,N);const O=[[Fs,_s],[tl,rl],[nl,ol],[sl,al],[il,ll],[cl,dl],[ul,fl],[pl,hl]];for(let D=0;D<O.length;D++){const[q,F]=O[D],$=K(N,q);K(S,q,$),K($,F,N);const H=Lt(li);ge($,e,H);const P=Lt();ge($,r),ge(H,e,H),ge(H,r,P),ge(P,e,H),ge(P,r,P),K(H,F,N),K(P,F,N)}return K(o,aa,x),K(o,sh,aq),{start:o,tokens:m2}}function lq(t,e,r){let n=r.length,o=0,s=[],a=[];for(;o<n;){let i=t,l=null,c=null,d=0,f=null,h=-1;for(;o<n&&!(l=i.go(r[o].t));)a.push(r[o++]);for(;o<n&&(c=l||i.go(r[o].t));)l=null,i=c,i.accepts()?(h=0,f=i):h>=0&&h++,o++,d++;if(h<0)o-=d,o<n&&(a.push(r[o]),o++);else{a.length>0&&(s.push(zd(gv,e,a)),a=[]),o-=h,d-=h;const m=f.t,v=r.slice(o-d,o);s.push(zd(m,e,v))}}return a.length>0&&s.push(zd(gv,e,a)),s}function zd(t,e,r){const n=r[0].s,o=r[r.length-1].e,s=e.slice(n,o);return new t(s,r)}const cq=typeof console<"u"&&console&&console.warn||(()=>{}),dq="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Re={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function uq(){return yt.groups={},Re.scanner=null,Re.parser=null,Re.tokenQueue=[],Re.pluginQueue=[],Re.customSchemes=[],Re.initialized=!1,Re}function vv(t,e=!1){if(Re.initialized&&cq(`linkifyjs: already initialized - will not register custom scheme "${t}" ${dq}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
573
+ 1. Must only contain digits, lowercase ASCII letters or "-"
574
+ 2. Cannot start or end with "-"
575
+ 3. "-" cannot repeat`);Re.customSchemes.push([t,e])}function fq(){Re.scanner=oq(Re.customSchemes);for(let t=0;t<Re.tokenQueue.length;t++)Re.tokenQueue[t][1]({scanner:Re.scanner});Re.parser=iq(Re.scanner.tokens);for(let t=0;t<Re.pluginQueue.length;t++)Re.pluginQueue[t][1]({scanner:Re.scanner,parser:Re.parser});return Re.initialized=!0,Re}function uh(t){return Re.initialized||fq(),lq(Re.parser.start,t,g2(Re.scanner.start,t))}uh.scan=g2;function y2(t,e=null,r=null){if(e&&typeof e=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);r=e,e=null}const n=new dh(r),o=uh(t),s=[];for(let a=0;a<o.length;a++){const i=o[a];i.isLink&&(!e||i.t===e)&&n.check(i)&&s.push(i.toFormattedObject(n))}return s}var fh="[\0-   ᠎ -\u2029  ]",pq=new RegExp(fh),hq=new RegExp(`${fh}$`),mq=new RegExp(fh,"g");function gq(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function vq(t){return new Fe({key:new Je("autolink"),appendTransaction:(e,r,n)=>{const o=e.some(l=>l.docChanged)&&!r.doc.eq(n.doc),s=e.some(l=>l.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=n,i=OS(r.doc,[...e]);if(zS(i).forEach(({newRange:l})=>{const c=yU(n.doc,l,h=>h.isTextblock);let d,f;if(c.length>1)d=c[0],f=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){const h=n.doc.textBetween(l.from,l.to," "," ");if(!hq.test(h))return;d=c[0],f=n.doc.textBetween(d.pos,l.to,void 0," ")}if(d&&f){const h=f.split(pq).filter(Boolean);if(h.length<=0)return!1;const m=h[h.length-1],v=d.pos+f.lastIndexOf(m);if(!m)return!1;const g=uh(m).map(y=>y.toObject(t.defaultProtocol));if(!gq(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:v+y.start+1,to:v+y.end+1})).filter(y=>n.schema.marks.code?!n.doc.rangeHasMark(y.from,y.to,n.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{Zp(y.from,y.to,n.doc).some(b=>b.mark.type===t.type)||a.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function yq(t){return new Fe({key:new Je("handleClickLink"),props:{handleClick:(e,r,n)=>{var o,s;if(n.button!==0||!e.editable)return!1;let a=null;if(n.target instanceof HTMLAnchorElement)a=n.target;else{const l=n.target;if(!l)return!1;const c=t.editor.view.dom;a=l.closest("a"),a&&!c.contains(a)&&(a=null)}if(!a)return!1;let i=!1;if(t.enableClickSelection&&(i=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=_S(e.state,t.type.name),c=(o=a.href)!=null?o:l.href,d=(s=a.target)!=null?s:l.target;c&&(window.open(c,d),i=!0)}return i}}})}function bq(t){return new Fe({key:new Je("handlePasteLink"),props:{handlePaste:(e,r,n)=>{const{shouldAutoLink:o}=t,{state:s}=e,{selection:a}=s,{empty:i}=a;if(i)return!1;let l="";n.content.forEach(d=>{l+=d.textContent});const c=y2(l,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||o!==void 0&&!o(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function On(t,e){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const o=typeof n=="string"?n:n.scheme;o&&r.push(o)}),!t||t.replace(mq,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var xq=io.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){vv(t);return}vv(t.scheme,t.optionalSlashes)})},onDestroy(){uq()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!On(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),r=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||r&&!t.includes("@"))return!0;const n=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(n)||!/\./.test(n))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:r=>!!On(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!On(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ue(this.options.HTMLAttributes,t),0]:["a",Ue(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var r,n,o,s;const a=(n=(r=t.attrs)==null?void 0:r.href)!=null?n:"",i=(s=(o=t.attrs)==null?void 0:o.title)!=null?s:"",l=e.renderChildren(t);return i?`[${l}](${a} "${i}")`:`[${l}](${a})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:r}=t;return this.options.isAllowedUri(r,{defaultValidate:n=>!!On(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:r}=t||{};return r&&!this.options.isAllowedUri(r,{defaultValidate:n=>!!On(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ro({find:t=>{const e=[];if(t){const{protocols:r,defaultProtocol:n}=this.options,o=y2(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!On(a,r),protocols:r,defaultProtocol:n}));o.length&&o.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:r}=this.options;return this.options.autolink&&t.push(vq({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:o=>!!On(o,e),protocols:e,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),t.push(yq({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(bq({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),wq=Object.defineProperty,kq=(t,e)=>{for(var r in e)wq(t,r,{get:e[r],enumerable:!0})},Nq="listItem",yv="textStyle",bv=/^\s*([-+*])\s$/,b2=Pt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ue(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
576
+ `):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Nq,this.editor.getAttributes(yv)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Uo({find:bv,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Uo({find:bv,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(yv),editor:this.editor})),[t]}}),x2=Pt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ue(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let r=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(n=>n.type==="paragraph"))r=e.parseChildren(t.tokens);else{const n=t.tokens[0];if(n&&n.type==="text"&&n.tokens&&n.tokens.length>0){if(r=[{type:"paragraph",content:e.parseInline(n.tokens)}],t.tokens.length>1){const o=t.tokens.slice(1),s=e.parseChildren(o);r.push(...s)}}else r=e.parseChildren(t.tokens)}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(t,e,r)=>rh(t,e,n=>{var o,s;return n.parentType==="bulletList"?"- ":n.parentType==="orderedList"?`${(((s=(o=n.meta)==null?void 0:o.parentAttrs)==null?void 0:s.start)||1)+n.index}. `:"- "},r),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Cq={};kq(Cq,{findListItemPos:()=>_a,getNextListDepth:()=>ph,handleBackspace:()=>Ku,handleDelete:()=>Yu,hasListBefore:()=>w2,hasListItemAfter:()=>Sq,hasListItemBefore:()=>k2,listItemHasSubList:()=>N2,nextListIsDeeper:()=>C2,nextListIsHigher:()=>S2});var _a=(t,e)=>{const{$from:r}=e.selection,n=We(t,e.schema);let o=null,s=r.depth,a=r.pos,i=null;for(;s>0&&i===null;)o=r.node(s),o.type===n?i=s:(s-=1,a-=1);return i===null?null:{$pos:e.doc.resolve(a),depth:i}},ph=(t,e)=>{const r=_a(t,e);if(!r)return!1;const[,n]=jU(e,t,r.$pos.pos+4);return n},w2=(t,e,r)=>{const{$anchor:n}=t.selection,o=Math.max(0,n.pos-2),s=t.doc.resolve(o).node();return!(!s||!r.includes(s.type.name))},k2=(t,e)=>{var r;const{$anchor:n}=e.selection,o=e.doc.resolve(n.pos-2);return!(o.index()===0||((r=o.nodeBefore)==null?void 0:r.type.name)!==t)},N2=(t,e,r)=>{if(!r)return!1;const n=We(t,e.schema);let o=!1;return r.descendants(s=>{s.type===n&&(o=!0)}),o},Ku=(t,e,r)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!bn(t.state,e)&&w2(t.state,e,r)){const{$anchor:a}=t.state.selection,i=t.state.doc.resolve(a.before()-1),l=[];i.node().descendants((f,h)=>{f.type.name===e&&l.push({node:f,pos:h})});const c=l.at(-1);if(!c)return!1;const d=t.state.doc.resolve(i.start()+c.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!bn(t.state,e)||!OU(t.state))return!1;const n=_a(e,t.state);if(!n)return!1;const o=t.state.doc.resolve(n.$pos.pos-2).node(n.depth),s=N2(e,t.state,o);return k2(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},C2=(t,e)=>{const r=ph(t,e),n=_a(t,e);return!n||!r?!1:r>n.depth},S2=(t,e)=>{const r=ph(t,e),n=_a(t,e);return!n||!r?!1:r<n.depth},Yu=(t,e)=>{if(!bn(t.state,e)||!AU(t.state,e))return!1;const{selection:r}=t.state,{$from:n,$to:o}=r;return!r.empty&&n.sameParent(o)?!1:C2(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():S2(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},Sq=(t,e)=>{var r;const{$anchor:n}=e.selection,o=e.doc.resolve(n.pos-n.parentOffset-2);return!(o.index()===o.parent.childCount-1||((r=o.nodeAfter)==null?void 0:r.type.name)!==t)},M2=Be.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r})=>{t.state.schema.nodes[r]!==void 0&&Yu(t,r)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r})=>{t.state.schema.nodes[r]!==void 0&&Yu(t,r)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:n})=>{t.state.schema.nodes[r]!==void 0&&Ku(t,r,n)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:r,wrapperNames:n})=>{t.state.schema.nodes[r]!==void 0&&Ku(t,r,n)&&(e=!0)}),e}}}}),xv=/^(\s*)(\d+)\.\s+(.*)$/,Mq=/^\s/;function Eq(t){const e=[];let r=0,n=0;for(;r<t.length;){const o=t[r],s=o.match(xv);if(!s)break;const[,a,i,l]=s,c=a.length;let d=l,f=r+1;const h=[o];for(;f<t.length;){const m=t[f];if(m.match(xv))break;if(m.trim()==="")h.push(m),d+=`
577
+ `,f+=1;else if(m.match(Mq))h.push(m),d+=`
578
+ ${m.slice(c+2)}`,f+=1;else break}e.push({indent:c,number:parseInt(i,10),content:d.trim(),raw:h.join(`
579
+ `)}),n=f,r=f}return[e,n]}function E2(t,e,r){var n;const o=[];let s=0;for(;s<t.length;){const a=t[s];if(a.indent===e){const i=a.content.split(`
580
+ `),l=((n=i[0])==null?void 0:n.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:r.inlineTokens(l)});const d=i.slice(1).join(`
581
+ `).trim();if(d){const m=r.blockTokens(d);c.push(...m)}let f=s+1;const h=[];for(;f<t.length&&t[f].indent>e;)h.push(t[f]),f+=1;if(h.length>0){const m=Math.min(...h.map(g=>g.indent)),v=E2(h,m,r);c.push({type:"list",ordered:!0,start:h[0].number,items:v,raw:h.map(g=>g.raw).join(`
582
+ `)})}o.push({type:"list_item",raw:a.raw,tokens:c}),s=f}else s+=1}return o}function jq(t,e){return t.map(r=>{if(r.type!=="list_item")return e.parseChildren([r])[0];const n=[];return r.tokens&&r.tokens.length>0&&r.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")n.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){const s=e.parseChildren([o]);n.push({type:"paragraph",content:s})}else{const s=e.parseChildren([o]);s.length>0&&n.push(...s)}}),{type:"listItem",content:n}})}var Rq="listItem",wv="textStyle",kv=/^(\d+)\.\s$/,j2=Pt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...r}=t;return e===1?["ol",Ue(this.options.HTMLAttributes,r),0]:["ol",Ue(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const r=t.start||1,n=t.items?jq(t.items,e):[];return r!==1?{type:"orderedList",attrs:{start:r},content:n}:{type:"orderedList",content:n}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
583
+ `):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),r=e==null?void 0:e.index;return r!==void 0?r:-1},tokenize:(t,e,r)=>{var n;const o=t.split(`
584
+ `),[s,a]=Eq(o);if(s.length===0)return;const i=E2(s,0,r);return i.length===0?void 0:{type:"list",ordered:!0,start:((n=s[0])==null?void 0:n.number)||1,items:i,raw:o.slice(0,a).join(`
585
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Rq,this.editor.getAttributes(wv)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Uo({find:kv,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Uo({find:kv,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(wv)}),joinPredicate:(e,r)=>r.childCount+r.attrs.start===+e[1],editor:this.editor})),[t]}}),Tq=/^\s*(\[([( |x])?\])\s$/,Aq=Pt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const r=[];if(t.tokens&&t.tokens.length>0?r.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?r.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):r.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const n=e.parseChildren(t.nestedTokens);r.push(...n)}return e.createNode("taskItem",{checked:t.checked||!1},r)},renderMarkdown:(t,e)=>{var r;const n=`- [${(r=t.attrs)!=null&&r.checked?"x":" "}] `;return rh(t,e,n)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:r,editor:n})=>{const o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),i=document.createElement("input"),l=document.createElement("div"),c=f=>{var h,m;i.ariaLabel=((m=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:m.call(h,f,i.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};c(t),s.contentEditable="false",i.type="checkbox",i.addEventListener("mousedown",f=>f.preventDefault()),i.addEventListener("change",f=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){i.checked=!i.checked;return}const{checked:h}=f.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const v=r();if(typeof v!="number")return!1;const g=m.doc.nodeAt(v);return m.setNodeMarkup(v,void 0,{...g==null?void 0:g.attrs,checked:h}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(i.checked=!i.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,h])=>{o.setAttribute(f,h)}),o.dataset.checked=t.attrs.checked,i.checked=t.attrs.checked,s.append(i,a),o.append(s,l),Object.entries(e).forEach(([f,h])=>{o.setAttribute(f,h)});let d=new Set(Object.keys(e));return{dom:o,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;o.dataset.checked=f.attrs.checked,i.checked=f.attrs.checked,c(f);const h=n.extensionManager.attributes,m=sa(f,h),v=new Set(Object.keys(m)),g=this.options.HTMLAttributes;return d.forEach(y=>{v.has(y)||(y in g?o.setAttribute(y,g[y]):o.removeAttribute(y))}),Object.entries(m).forEach(([y,b])=>{b==null?y in g?o.setAttribute(y,g[y]):o.removeAttribute(y):o.setAttribute(y,b)}),d=v,!0}}}},addInputRules(){return[Uo({find:Tq,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Oq=Pt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Ue(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
586
+ `):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const r=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return r!==void 0?r:-1},tokenize(t,e,r){const n=s=>{const a=Fu(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,l)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:r.inlineTokens(i.mainContent),nestedTokens:l}),customNestedParser:n},r);return a?[{type:"taskList",raw:a.raw,items:a.items}]:r.blockTokens(s)},o=Fu(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,a)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:r.inlineTokens(s.mainContent),nestedTokens:a}),customNestedParser:n},r);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Be.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(b2.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(x2.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(M2.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(j2.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Aq.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Oq.configure(this.options.taskList)),t}});var Nv="&nbsp;",Dq=" ",Iq=Pt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ue(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const r=t.tokens||[];if(r.length===1&&r[0].type==="image")return e.parseChildren([r[0]]);const n=e.parseInline(r);return n.length===1&&n[0].type==="text"&&(n[0].text===Nv||n[0].text===Dq)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,n)},renderMarkdown:(t,e)=>{if(!t)return"";const r=Array.isArray(t.content)?t.content:[];return r.length===0?Nv:e.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Pq=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Lq=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fq=io.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ue(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Wo({find:Pq,type:this.type})]},addPasteRules(){return[ro({find:Lq,type:this.type})]}}),_q=Pt.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),zq=io.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Ue(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,r){const n=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!n)return;const o=n[2].trim();return{type:"underline",raw:n[0],text:o,tokens:r.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Bq(t={}){return new Fe({view(e){return new $q(e,t)}})}class $q{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=a=>{this[o](a)};return e.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,o=this.editorView.dom,s=o.getBoundingClientRect(),a=s.width/o.offsetWidth,i=s.height/o.offsetHeight;if(r){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let m=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(m){let v=m.getBoundingClientRect(),g=f?v.bottom:v.top;f&&h&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*i;n={left:v.left,right:v.right,top:g-y,bottom:g+y}}}}if(!n){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*a;n={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let f=l.getBoundingClientRect(),h=f.width/l.offsetWidth,m=f.height/l.offsetHeight;c=f.left-l.scrollLeft*h,d=f.top-l.scrollTop*m}this.element.style.left=(n.left-c)/a+"px",this.element.style.top=(n.top-d)/i+"px",this.element.style.width=(n.right-n.left)/a+"px",this.element.style.height=(n.bottom-n.top)/i+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),o=n&&n.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,r,e):o;if(r&&!s){let a=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let i=NC(this.editorView.state.doc,a,this.editorView.dragging.slice);i!=null&&(a=i)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class ze extends ve{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return ze.valid(n)?new ze(n):ve.near(n)}content(){return re.empty}eq(e){return e instanceof ze&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ze(e.resolve(r.pos))}getBookmark(){return new hh(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!Hq(e)||!Vq(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let o=r.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&ze.valid(e))return e;let o=e.pos,s=null;for(let a=e.depth;;a--){let i=e.node(a);if(r>0?e.indexAfter(a)<i.childCount:e.index(a)>0){s=i.child(r>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=r;let l=e.doc.resolve(o);if(ze.valid(l))return l}for(;;){let a=r>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!ce.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*r),n=!1;continue e}break}s=a,o+=r;let i=e.doc.resolve(o);if(ze.valid(i))return i}return null}}}ze.prototype.visible=!1;ze.findFrom=ze.findGapCursorFrom;ve.jsonID("gapcursor",ze);class hh{constructor(e){this.pos=e}map(e){return new hh(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return ze.valid(r)?new ze(r):ve.near(r)}}function R2(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Hq(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||R2(o.type))return!0;if(o.inlineContent)return!1}}return!0}function Vq(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let o=n.child(r);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||R2(o.type))return!0;if(o.inlineContent)return!1}}return!0}function Wq(){return new Fe({props:{decorations:Kq,createSelectionBetween(t,e,r){return e.pos==r.pos&&ze.valid(r)?new ze(r):null},handleClick:Gq,handleKeyDown:Uq,handleDOMEvents:{beforeinput:qq}}})}const Uq=CS({ArrowLeft:ci("horiz",-1),ArrowRight:ci("horiz",1),ArrowUp:ci("vert",-1),ArrowDown:ci("vert",1)});function ci(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,o,s){let a=n.selection,i=e>0?a.$to:a.$from,l=a.empty;if(a instanceof fe){if(!s.endOfTextblock(r)||i.depth==0)return!1;l=!1,i=n.doc.resolve(e>0?i.after():i.before())}let c=ze.findGapCursorFrom(i,e,l);return c?(o&&o(n.tr.setSelection(new ze(c))),!0):!1}}function Gq(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!ze.valid(n))return!1;let o=t.posAtCoords({left:r.clientX,top:r.clientY});return o&&o.inside>-1&&ce.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new ze(n))),!0)}function qq(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof ze))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let o=U.empty;for(let a=n.length-1;a>=0;a--)o=U.from(n[a].createAndFill(null,o));let s=t.state.tr.replace(r.pos,r.pos,new re(o,0,0));return s.setSelection(fe.near(s.doc.resolve(r.pos+1))),t.dispatch(s),!1}function Kq(t){if(!(t.selection instanceof ze))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Pe.create(t.doc,[ft.widget(t.selection.head,e,{key:"gapcursor"})])}var jl=200,Qe=function(){};Qe.prototype.append=function(t){return t.length?(t=Qe.from(t),!this.length&&t||t.length<jl&&this.leafAppend(t)||this.length<jl&&t.leafPrepend(this)||this.appendInner(t)):this};Qe.prototype.prepend=function(t){return t.length?Qe.from(t).append(this):this};Qe.prototype.appendInner=function(t){return new Yq(this,t)};Qe.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?Qe.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))};Qe.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Qe.prototype.forEach=function(t,e,r){e===void 0&&(e=0),r===void 0&&(r=this.length),e<=r?this.forEachInner(t,e,r,0):this.forEachInvertedInner(t,e,r,0)};Qe.prototype.map=function(t,e,r){e===void 0&&(e=0),r===void 0&&(r=this.length);var n=[];return this.forEach(function(o,s){return n.push(t(o,s))},e,r),n};Qe.from=function(t){return t instanceof Qe?t:t&&t.length?new T2(t):Qe.empty};var T2=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(n,o){return n==0&&o==this.length?this:new e(this.values.slice(n,o))},e.prototype.getInner=function(n){return this.values[n]},e.prototype.forEachInner=function(n,o,s,a){for(var i=o;i<s;i++)if(n(this.values[i],a+i)===!1)return!1},e.prototype.forEachInvertedInner=function(n,o,s,a){for(var i=o-1;i>=s;i--)if(n(this.values[i],a+i)===!1)return!1},e.prototype.leafAppend=function(n){if(this.length+n.length<=jl)return new e(this.values.concat(n.flatten()))},e.prototype.leafPrepend=function(n){if(this.length+n.length<=jl)return new e(n.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(Qe);Qe.empty=new T2([]);var Yq=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,n,o,s){var a=this.left.length;if(n<a&&this.left.forEachInner(r,n,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(n-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,n,o,s){var a=this.left.length;if(n>a&&this.right.forEachInvertedInner(r,n-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(n,a),o,s)===!1)return!1},e.prototype.sliceInner=function(r,n){if(r==0&&n==this.length)return this;var o=this.left.length;return n<=o?this.left.slice(r,n):r>=o?this.right.slice(r-o,n-o):this.left.slice(r,o).append(this.right.slice(0,n-o))},e.prototype.leafAppend=function(r){var n=this.right.leafAppend(r);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(r){var n=this.left.leafPrepend(r);if(n)return new e(n,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Qe);const Jq=500;class Jt{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let o,s;r&&(o=this.remapping(n,this.items.length),s=o.maps.length);let a=e.tr,i,l,c=[],d=[];return this.items.forEach((f,h)=>{if(!f.step){o||(o=this.remapping(n,h+1),s=o.maps.length),s--,d.push(f);return}if(o){d.push(new cr(f.map));let m=f.step.map(o.slice(s)),v;m&&a.maybeStep(m).doc&&(v=a.mapping.maps[a.mapping.maps.length-1],c.push(new cr(v,void 0,void 0,c.length+d.length))),s--,v&&o.appendMap(v,s)}else a.maybeStep(f.step);if(f.selection)return i=o?f.selection.map(o.slice(s)):f.selection,l=new Jt(this.items.slice(0,n).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:i}}addTransform(e,r,n,o){let s=[],a=this.eventCount,i=this.items,l=!o&&i.length?i.get(i.length-1):null;for(let d=0;d<e.steps.length;d++){let f=e.steps[d].invert(e.docs[d]),h=new cr(e.mapping.maps[d],f,r),m;(m=l&&l.merge(h))&&(h=m,d?s.pop():i=i.slice(0,i.length-1)),s.push(h),r&&(a++,r=void 0),o||(l=h)}let c=a-n.depth;return c>Zq&&(i=Xq(i,c),a-=c),new Jt(i.append(s),a)}remapping(e,r){let n=new Qs;return this.items.forEach((o,s)=>{let a=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?n.maps.length-o.mirrorOffset:void 0;n.appendMap(o.map,a)},e,r),n}addMaps(e){return this.eventCount==0?this:new Jt(this.items.append(e.map(r=>new cr(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],o=Math.max(0,this.items.length-r),s=e.mapping,a=e.steps.length,i=this.eventCount;this.items.forEach(h=>{h.selection&&i--},o);let l=r;this.items.forEach(h=>{let m=s.getMirror(--l);if(m==null)return;a=Math.min(a,m);let v=s.maps[m];if(h.step){let g=e.steps[m].invert(e.docs[m]),y=h.selection&&h.selection.map(s.slice(l+1,m));y&&i++,n.push(new cr(v,g,y))}else n.push(new cr(v))},o);let c=[];for(let h=r;h<a;h++)c.push(new cr(s.maps[h]));let d=this.items.slice(0,o).append(c).append(n),f=new Jt(d,i);return f.emptyItemCount()>Jq&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,o=[],s=0;return this.items.forEach((a,i)=>{if(i>=e)o.push(a),a.selection&&s++;else if(a.step){let l=a.step.map(r.slice(n)),c=l&&l.getMap();if(n--,c&&r.appendMap(c,n),l){let d=a.selection&&a.selection.map(r.slice(n));d&&s++;let f=new cr(c.invert(),l,d),h,m=o.length-1;(h=o.length&&o[m].merge(f))?o[m]=h:o.push(f)}}else a.map&&n--},this.items.length,0),new Jt(Qe.from(o.reverse()),s)}}Jt.empty=new Jt(Qe.empty,0);function Xq(t,e){let r;return t.forEach((n,o)=>{if(n.selection&&e--==0)return r=o,!1}),t.slice(r)}class cr{constructor(e,r,n,o){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new cr(r.getMap().invert(),r,this.selection)}}}class rn{constructor(e,r,n,o,s){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=o,this.prevComposition=s}}const Zq=20;function Qq(t,e,r,n){let o=r.getMeta(Wn),s;if(o)return o.historyState;r.getMeta(r7)&&(t=new rn(t.done,t.undone,null,0,-1));let a=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(a&&a.getMeta(Wn))return a.getMeta(Wn).redo?new rn(t.done.addTransform(r,void 0,n,xi(e)),t.undone,Cv(r.mapping.maps),t.prevTime,t.prevComposition):new rn(t.done,t.undone.addTransform(r,void 0,n,xi(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let i=r.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=i&&(t.prevTime<(r.time||0)-n.newGroupDelay||!e7(r,t.prevRanges)),c=a?Bd(t.prevRanges,r.mapping):Cv(r.mapping.maps);return new rn(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,xi(e)),Jt.empty,c,r.time,i??t.prevComposition)}else return(s=r.getMeta("rebased"))?new rn(t.done.rebased(r,s),t.undone.rebased(r,s),Bd(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new rn(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Bd(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function e7(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,o)=>{for(let s=0;s<e.length;s+=2)n<=e[s+1]&&o>=e[s]&&(r=!0)}),r}function Cv(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,o,s,a)=>e.push(s,a));return e}function Bd(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let o=e.map(t[n],1),s=e.map(t[n+1],-1);o<=s&&r.push(o,s)}return r}function t7(t,e,r){let n=xi(e),o=Wn.get(e).spec.config,s=(r?t.undone:t.done).popEvent(e,n);if(!s)return null;let a=s.selection.resolve(s.transform.doc),i=(r?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,n),l=new rn(r?i:s.remaining,r?s.remaining:i,null,0,-1);return s.transform.setSelection(a).setMeta(Wn,{redo:r,historyState:l})}let $d=!1,Sv=null;function xi(t){let e=t.plugins;if(Sv!=e){$d=!1,Sv=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){$d=!0;break}}return $d}const Wn=new Je("history"),r7=new Je("closeHistory");function n7(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Fe({key:Wn,state:{init(){return new rn(Jt.empty,Jt.empty,null,0,-1)},apply(e,r,n){return Qq(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,o=n=="historyUndo"?O2:n=="historyRedo"?D2:null;return!o||!e.editable?!1:(r.preventDefault(),o(e.state,e.dispatch))}}}})}function A2(t,e){return(r,n)=>{let o=Wn.getState(r);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(n){let s=t7(o,r,t);s&&n(s.scrollIntoView())}return!0}}const O2=A2(!1),D2=A2(!0);Be.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new Fe({key:new Je("characterCount"),appendTransaction:(e,r,n)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:n.doc});if(s>o){const a=s-o,i=0,l=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=n.tr.deleteRange(i,l);return t=!0,c}t=!0},filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const o=this.storage.characters({node:r.doc}),s=this.storage.characters({node:e.doc});if(s<=n||o>n&&s>n&&s<=o)return!0;if(o>n&&s>n&&s>o||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,i=s-n,l=a-i,c=a;return e.deleteRange(l,c),!(this.storage.characters({node:e.doc})>n)}})]}});var o7=Be.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Bq(this.options)]}});Be.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Fe({key:new Je("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:r,isFocused:n}=this.editor,{anchor:o}=e,s=[];if(!r||!n)return Pe.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(!l.isText){if(!(o>=c&&o<=c+l.nodeSize-1))return!1;a+=1}});let i=0;return t.descendants((l,c)=>{if(l.isText||!(o>=c&&o<=c+l.nodeSize-1))return!1;if(i+=1,this.options.mode==="deepest"&&a-i>0||this.options.mode==="shallowest"&&i>1)return this.options.mode==="deepest";s.push(ft.node(c,c+l.nodeSize,{class:this.options.className}))}),Pe.create(t,s)}}})]}});var s7=Be.create({name:"gapCursor",addProseMirrorPlugins(){return[Wq()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ke(le(t,"allowGapCursor",r)))!=null?e:null}}}),Mv="placeholder";function a7(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var i7=Be.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:Mv,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${a7(this.options.dataAttribute)}`:`data-${Mv}`;return[new Fe({key:new Je("placeholder"),props:{decorations:({doc:e,selection:r})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=r,s=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants((i,l)=>{const c=o>=l&&o<=l+i.nodeSize,d=!i.isLeaf&&Cc(i);if((c||!this.options.showOnlyCurrent)&&d){const f=[this.options.emptyNodeClass];a&&f.push(this.options.emptyEditorClass);const h=ft.node(l,l+i.nodeSize,{class:f.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:l,hasAnchor:c}):this.options.placeholder});s.push(h)}return this.options.includeChildren}),Pe.create(e,s)}}})]}});Be.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Fe({key:new Je("selection"),props:{decorations(r){return r.selection.empty||t.isFocused||!t.isEditable||BS(r.selection)||t.view.dragging?null:Pe.create(r.doc,[ft.inline(r.selection.from,r.selection.to,{class:e.className})])}}})]}});function Ev({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var l7=Be.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Je(this.name),r=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(r).includes(o.name));return[new Fe({key:e,appendTransaction:(o,s,a)=>{const{doc:i,tr:l,schema:c}=a,d=e.getState(a),f=i.content.size,h=c.nodes[r];if(d)return l.insert(f,h.create())},state:{init:(o,s)=>{const a=s.tr.doc.lastChild;return!Ev({node:a,types:n})},apply:(o,s)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return s;const a=o.doc.lastChild;return!Ev({node:a,types:n})}}})]}}),c7=Be.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>O2(t,e),redo:()=>({state:t,dispatch:e})=>D2(t,e)}},addProseMirrorPlugins(){return[n7(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),d7=Be.create({name:"starterKit",addExtensions(){var t,e,r,n;const o=[];return this.options.bold!==!1&&o.push(I9.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(R9.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(b2.configure(this.options.bulletList)),this.options.code!==!1&&o.push(F9.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(B9.configure(this.options.codeBlock)),this.options.document!==!1&&o.push($9.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(o7.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(s7.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(H9.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(V9.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(c7.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(W9.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(Y9.configure(this.options.italic)),this.options.listItem!==!1&&o.push(x2.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(M2.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&o.push(xq.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&o.push(j2.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(Iq.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(Fq.configure(this.options.strike)),this.options.text!==!1&&o.push(_q.configure(this.options.text)),this.options.underline!==!1&&o.push(zq.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&o.push(l7.configure((n=this.options)==null?void 0:n.trailingNode)),o}}),u7=d7,f7=i7,I2="Toggle",mh=p.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...s}=t,[a,i]=Ye({prop:r,onChange:o,defaultProp:n??!1,caller:I2});return u.jsx(Q.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:e,onClick:L(t.onClick,()=>{t.disabled||i(!a)})})});mh.displayName=I2;var P2=mh;const L2=Ge("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3 min-w-10",sm:"h-9 px-2.5 min-w-9",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"default",size:"default"}}),F2=p.forwardRef(({className:t,variant:e,size:r,...n},o)=>u.jsx(P2,{ref:o,className:R(L2({variant:e,size:r,className:t})),...n}));F2.displayName=P2.displayName;var p7="Separator",jv="horizontal",h7=["horizontal","vertical"],_2=p.forwardRef((t,e)=>{const{decorative:r,orientation:n=jv,...o}=t,s=m7(n)?n:jv,a=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return u.jsx(mt.div,{"data-orientation":s,...a,...o,ref:e})});_2.displayName=p7;function m7(t){return h7.includes(t)}var z2=_2;const wi=p.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},o)=>u.jsx(z2,{ref:o,decorative:r,orientation:e,className:R("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));wi.displayName=z2.displayName;const jt=({pressed:t,onPressedChange:e,disabled:r,children:n,tooltip:o})=>u.jsx(F2,{size:"sm",pressed:t,onPressedChange:e,disabled:r,"aria-label":o,className:"h-8 w-8 p-0",children:n}),g7=({editor:t})=>t?u.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b p-1",children:[u.jsx(jt,{pressed:t.isActive("bold"),onPressedChange:()=>t.chain().focus().toggleBold().run(),disabled:!t.can().chain().focus().toggleBold().run(),tooltip:"Bold",children:u.jsx(ZA,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("italic"),onPressedChange:()=>t.chain().focus().toggleItalic().run(),disabled:!t.can().chain().focus().toggleItalic().run(),tooltip:"Italic",children:u.jsx(mO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("strike"),onPressedChange:()=>t.chain().focus().toggleStrike().run(),disabled:!t.can().chain().focus().toggleStrike().run(),tooltip:"Strikethrough",children:u.jsx(RO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("code"),onPressedChange:()=>t.chain().focus().toggleCode().run(),disabled:!t.can().chain().focus().toggleCode().run(),tooltip:"Code",children:u.jsx(tO,{className:"h-4 w-4"})}),u.jsx(wi,{orientation:"vertical",className:"mx-1 h-6"}),u.jsx(jt,{pressed:t.isActive("heading",{level:1}),onPressedChange:()=>t.chain().focus().toggleHeading({level:1}).run(),tooltip:"Heading 1",children:u.jsx(uO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("heading",{level:2}),onPressedChange:()=>t.chain().focus().toggleHeading({level:2}).run(),tooltip:"Heading 2",children:u.jsx(fO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("heading",{level:3}),onPressedChange:()=>t.chain().focus().toggleHeading({level:3}).run(),tooltip:"Heading 3",children:u.jsx(pO,{className:"h-4 w-4"})}),u.jsx(wi,{orientation:"vertical",className:"mx-1 h-6"}),u.jsx(jt,{pressed:t.isActive("bulletList"),onPressedChange:()=>t.chain().focus().toggleBulletList().run(),tooltip:"Bullet List",children:u.jsx(vO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("orderedList"),onPressedChange:()=>t.chain().focus().toggleOrderedList().run(),tooltip:"Ordered List",children:u.jsx(gO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:t.isActive("blockquote"),onPressedChange:()=>t.chain().focus().toggleBlockquote().run(),tooltip:"Quote",children:u.jsx(EO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:!1,onPressedChange:()=>t.chain().focus().setHorizontalRule().run(),tooltip:"Horizontal Rule",children:u.jsx(hb,{className:"h-4 w-4"})}),u.jsx(wi,{orientation:"vertical",className:"mx-1 h-6"}),u.jsx(jt,{pressed:!1,onPressedChange:()=>t.chain().focus().undo().run(),disabled:!t.can().chain().focus().undo().run(),tooltip:"Undo",children:u.jsx(TO,{className:"h-4 w-4"})}),u.jsx(jt,{pressed:!1,onPressedChange:()=>t.chain().focus().redo().run(),disabled:!t.can().chain().focus().redo().run(),tooltip:"Redo",children:u.jsx(jO,{className:"h-4 w-4"})})]}):null,v7=p.forwardRef(({value:t,onChange:e,placeholder:r="Start typing...",disabled:n=!1,className:o,minHeight:s="150px"},a)=>{const i=C9({extensions:[u7,f7.configure({placeholder:r})],content:t,editable:!n,onUpdate:({editor:l})=>{e==null||e(l.getHTML())}});return p.useEffect(()=>{i&&t!==i.getHTML()&&i.commands.setContent(t??"")},[t,i]),p.useEffect(()=>{i&&i.setEditable(!n)},[n,i]),u.jsxs("div",{ref:a,className:R("rounded-md border bg-background",n&&"opacity-50",o),children:[u.jsx(g7,{editor:i}),u.jsx(s2,{editor:i,className:R("prose prose-sm dark:prose-invert max-w-none p-3 focus-within:outline-none [&_.ProseMirror]:min-h-[var(--min-height)] [&_.ProseMirror]:outline-none [&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left [&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0 [&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"),style:{"--min-height":s}})]})});v7.displayName="RichText";function y7(t,e){return p.useReducer((r,n)=>e[r][n]??r,t)}var gh="ScrollArea",[B2]=Oe(gh),[b7,qt]=B2(gh),$2=p.forwardRef((t,e)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:s=600,...a}=t,[i,l]=p.useState(null),[c,d]=p.useState(null),[f,h]=p.useState(null),[m,v]=p.useState(null),[g,y]=p.useState(null),[b,x]=p.useState(0),[w,k]=p.useState(0),[N,S]=p.useState(!1),[C,M]=p.useState(!1),E=oe(e,O=>l(O)),A=yr(o);return u.jsx(b7,{scope:r,type:n,dir:A,scrollHideDelay:s,scrollArea:i,viewport:c,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:C,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:k,children:u.jsx(Q.div,{dir:A,...a,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})})});$2.displayName=gh;var H2="ScrollAreaViewport",V2=p.forwardRef((t,e)=>{const{__scopeScrollArea:r,children:n,nonce:o,...s}=t,a=qt(H2,r),i=p.useRef(null),l=oe(e,i,a.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),u.jsx(Q.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...t.style},children:u.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});V2.displayName=H2;var Nr="ScrollAreaScrollbar",vh=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=qt(Nr,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=o,i=t.orientation==="horizontal";return p.useEffect(()=>(i?s(!0):a(!0),()=>{i?s(!1):a(!1)}),[i,s,a]),o.type==="hover"?u.jsx(x7,{...n,ref:e,forceMount:r}):o.type==="scroll"?u.jsx(w7,{...n,ref:e,forceMount:r}):o.type==="auto"?u.jsx(W2,{...n,ref:e,forceMount:r}):o.type==="always"?u.jsx(yh,{...n,ref:e}):null});vh.displayName=Nr;var x7=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=qt(Nr,t.__scopeScrollArea),[s,a]=p.useState(!1);return p.useEffect(()=>{const i=o.scrollArea;let l=0;if(i){const c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",c),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",c),i.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),u.jsx(De,{present:r||s,children:u.jsx(W2,{"data-state":s?"visible":"hidden",...n,ref:e})})}),w7=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=qt(Nr,t.__scopeScrollArea),s=t.orientation==="horizontal",a=Rc(()=>l("SCROLL_END"),100),[i,l]=y7("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(i==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[i,o.scrollHideDelay,l]),p.useEffect(()=>{const c=o.viewport,d=s?"scrollLeft":"scrollTop";if(c){let f=c[d];const h=()=>{const m=c[d];f!==m&&(l("SCROLL"),a()),f=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[o.viewport,s,l,a]),u.jsx(De,{present:r||i!=="hidden",children:u.jsx(yh,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:e,onPointerEnter:L(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:L(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),W2=p.forwardRef((t,e)=>{const r=qt(Nr,t.__scopeScrollArea),{forceMount:n,...o}=t,[s,a]=p.useState(!1),i=t.orientation==="horizontal",l=Rc(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(i?c:d)}},10);return Go(r.viewport,l),Go(r.content,l),u.jsx(De,{present:n||s,children:u.jsx(yh,{"data-state":s?"visible":"hidden",...o,ref:e})})}),yh=p.forwardRef((t,e)=>{const{orientation:r="vertical",...n}=t,o=qt(Nr,t.__scopeScrollArea),s=p.useRef(null),a=p.useRef(0),[i,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Y2(i.viewport,i.content),d={...n,sizes:i,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,m){return E7(h,a.current,i,m)}return r==="horizontal"?u.jsx(k7,{...d,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollLeft,m=Rv(h,i,o.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=f(h,o.dir))}}):r==="vertical"?u.jsx(N7,{...d,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollTop,m=Rv(h,i);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=f(h))}}):null}),k7=p.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,...o}=t,s=qt(Nr,t.__scopeScrollArea),[a,i]=p.useState(),l=p.useRef(null),c=oe(e,l,s.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(G2,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jc(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;t.onWheelScroll(h),X2(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Tl(a.paddingLeft),paddingEnd:Tl(a.paddingRight)}})}})}),N7=p.forwardRef((t,e)=>{const{sizes:r,onSizesChange:n,...o}=t,s=qt(Nr,t.__scopeScrollArea),[a,i]=p.useState(),l=p.useRef(null),c=oe(e,l,s.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(G2,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jc(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;t.onWheelScroll(h),X2(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Tl(a.paddingTop),paddingEnd:Tl(a.paddingBottom)}})}})}),[C7,U2]=B2(Nr),G2=p.forwardRef((t,e)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...h}=t,m=qt(Nr,r),[v,g]=p.useState(null),y=oe(e,E=>g(E)),b=p.useRef(null),x=p.useRef(""),w=m.viewport,k=n.content-n.viewport,N=Te(d),S=Te(l),C=Rc(f,10);function M(E){if(b.current){const A=E.clientX-b.current.left,O=E.clientY-b.current.top;c({x:A,y:O})}}return p.useEffect(()=>{const E=A=>{const O=A.target;v!=null&&v.contains(O)&&N(A,k)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[w,v,k,N]),p.useEffect(S,[n,S]),Go(v,C),Go(m.content,C),u.jsx(C7,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:Te(s),onThumbPointerUp:Te(a),onThumbPositionChange:S,onThumbPointerDown:Te(i),children:u.jsx(Q.div,{...h,ref:y,style:{position:"absolute",...h.style},onPointerDown:L(t.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),b.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),M(E))}),onPointerMove:L(t.onPointerMove,M),onPointerUp:L(t.onPointerUp,E=>{const A=E.target;A.hasPointerCapture(E.pointerId)&&A.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),Rl="ScrollAreaThumb",q2=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,o=U2(Rl,t.__scopeScrollArea);return u.jsx(De,{present:r||o.hasThumb,children:u.jsx(S7,{ref:e,...n})})}),S7=p.forwardRef((t,e)=>{const{__scopeScrollArea:r,style:n,...o}=t,s=qt(Rl,r),a=U2(Rl,r),{onThumbPositionChange:i}=a,l=oe(e,f=>a.onThumbChange(f)),c=p.useRef(void 0),d=Rc(()=>{c.current&&(c.current(),c.current=void 0)},100);return p.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!c.current){const m=j7(f,i);c.current=m,i()}};return i(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,i]),u.jsx(Q.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:L(t.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),m=f.clientX-h.left,v=f.clientY-h.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:L(t.onPointerUp,a.onThumbPointerUp)})});q2.displayName=Rl;var bh="ScrollAreaCorner",K2=p.forwardRef((t,e)=>{const r=qt(bh,t.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?u.jsx(M7,{...t,ref:e}):null});K2.displayName=bh;var M7=p.forwardRef((t,e)=>{const{__scopeScrollArea:r,...n}=t,o=qt(bh,r),[s,a]=p.useState(0),[i,l]=p.useState(0),c=!!(s&&i);return Go(o.scrollbarX,()=>{var d;const f=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),Go(o.scrollbarY,()=>{var d;const f=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(f),a(f)}),c?u.jsx(Q.div,{...n,ref:e,style:{width:s,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Tl(t){return t?parseInt(t,10):0}function Y2(t,e){const r=t/e;return isNaN(r)?0:r}function jc(t){const e=Y2(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=(t.scrollbar.size-r)*e;return Math.max(n,18)}function E7(t,e,r,n="ltr"){const o=jc(r),s=o/2,a=e||s,i=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-i,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return J2([l,c],f)(t)}function Rv(t,e,r="ltr"){const n=jc(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-o,a=e.content-e.viewport,i=s-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Js(t,l);return J2([0,a],[0,i])(c)}function J2(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function X2(t,e){return t>0&&t<e}var j7=(t,e=()=>{})=>{let r={left:t.scrollLeft,top:t.scrollTop},n=0;return function o(){const s={left:t.scrollLeft,top:t.scrollTop},a=r.left!==s.left,i=r.top!==s.top;(a||i)&&e(),r=s,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Rc(t,e){const r=Te(t),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,e)},[r,e])}function Go(t,e){const r=Te(e);Ae(()=>{let n=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(t),()=>{window.cancelAnimationFrame(n),o.unobserve(t)}}},[t,r])}var Z2=$2,R7=V2,T7=K2;const A7=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs(Z2,{ref:n,className:R("relative overflow-hidden",t),...r,children:[u.jsx(R7,{className:"h-full w-full rounded-[inherit]",children:e}),u.jsx(Q2,{}),u.jsx(T7,{})]}));A7.displayName=Z2.displayName;const Q2=p.forwardRef(({className:t,orientation:e="vertical",...r},n)=>u.jsx(vh,{ref:n,orientation:e,className:R("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:u.jsx(q2,{className:"relative flex-1 rounded-full bg-border"})}));Q2.displayName=vh.displayName;function xh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const O7=p.forwardRef(({className:t,value:e,onChange:r,onSearch:n,onClear:o,loading:s=!1,showClearButton:a=!0,searchOnEnter:i=!0,debounceMs:l,disabled:c,...d},f)=>{const[h,m]=p.useState(e||""),v=p.useRef(null);p.useEffect(()=>{e!==void 0&&m(e)},[e]);const g=w=>{const k=w.target.value;m(k),r==null||r(k),l&&n&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{n(k)},l))},y=w=>{w.key==="Enter"&&i&&n&&(w.preventDefault(),v.current&&clearTimeout(v.current),n(h)),w.key==="Escape"&&h&&b()},b=()=>{m(""),r==null||r(""),o==null||o(),v.current&&clearTimeout(v.current)};p.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const x=a&&h&&!s;return u.jsxs("div",{className:"relative",children:[u.jsx(ca,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"search",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",t),ref:f,value:h,onChange:g,onKeyDown:y,disabled:c||s,...d}),u.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:s?u.jsx(Ci,{className:"h-4 w-4 animate-spin text-muted-foreground"}):x?u.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:b,tabIndex:-1,children:u.jsx(xt,{className:"h-4 w-4 text-muted-foreground"})}):null})]})});O7.displayName="SearchInput";const D7=p.forwardRef(({shortcutKey:t="K",showShortcut:e=!0,className:r,onChange:n,...o},s)=>{const a=p.useRef(null);p.useEffect(()=>{const l=c=>{var d;(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()===t.toLowerCase()&&(c.preventDefault(),(d=a.current)==null||d.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t]);const i=l=>{a.current=l,xh(s,l)};return u.jsxs("div",{className:"relative",children:[u.jsx(ca,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"search",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",e?"pr-16":"pr-10",r),ref:i,...o}),e&&u.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-0.5",children:u.jsxs("kbd",{className:"pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground inline-flex",children:[u.jsx("span",{className:"text-xs",children:"⌘"}),t]})})]})});D7.displayName="CommandSearch";const I7=p.forwardRef(({collapsedWidth:t="40px",expandedWidth:e="250px",className:r,placeholder:n="Search...",...o},s)=>{const[a,i]=p.useState(!1),[l,c]=p.useState(o.value||""),d=p.useRef(null),{onChange:f,...h}=o,m=()=>i(!0),v=()=>{l||i(!1)},g=x=>{c(x.target.value),f==null||f(x.target.value)},y=()=>{i(!0),setTimeout(()=>{var x;return(x=d.current)==null?void 0:x.focus()},100)},b=x=>{d.current=x,xh(s,x)};return u.jsxs("div",{className:R("relative flex items-center transition-all duration-200 ease-in-out",r),style:{width:a?e:t},children:[u.jsx("button",{type:"button",className:R("absolute left-0 flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background hover:bg-accent transition-colors",a&&"border-transparent hover:bg-transparent"),onClick:y,tabIndex:a?-1:0,children:u.jsx(ca,{className:"h-4 w-4 text-muted-foreground"})}),u.jsx("input",{type:"search",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",!a&&"opacity-0 pointer-events-none"),ref:b,value:l,onChange:g,onFocus:m,onBlur:v,placeholder:n,...h})]})});I7.displayName="ExpandableSearch";const P7=(t,e)=>{var r;const n=e.toLowerCase();return t.label.toLowerCase().includes(n)||t.value.toLowerCase().includes(n)||(((r=t.description)==null?void 0:r.toLowerCase().includes(n))??!1)},L7=p.forwardRef(({className:t,value:e,onChange:r,options:n,onSelect:o,loading:s=!1,emptyMessage:a="No results found",filterFn:i=P7,minChars:l=0,maxResults:c=10,showAllOnFocus:d=!0,groupBy:f,disabled:h,placeholder:m="Search...",...v},g)=>{const[y,b]=p.useState(!1),[x,w]=p.useState(e||""),[k,N]=p.useState(-1),S=p.useRef(null),C=p.useRef(null),M=p.useRef(null);p.useEffect(()=>{e!==void 0&&w(e)},[e]),p.useEffect(()=>{const B=G=>{S.current&&!S.current.contains(G.target)&&(b(!1),N(-1))};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const E=p.useMemo(()=>x.length<l&&!d?[]:(x.length>=l?n.filter(B=>i(B,x)):n).slice(0,c),[n,x,i,l,c,d]),A=p.useMemo(()=>{if(!f)return null;const B={};return E.forEach(G=>{const I=f(G);B[I]||(B[I]=[]),B[I].push(G)}),B},[E,f]),O=B=>{const G=B.target.value;w(G),r==null||r(G),b(!0),N(-1)},D=()=>{(d||x.length>=l)&&b(!0)},q=B=>{var G;B.disabled||(w(B.label),r==null||r(B.label),o==null||o(B),b(!1),N(-1),(G=C.current)==null||G.focus())},F=B=>{if(!y&&(B.key==="ArrowDown"||B.key==="ArrowUp")){b(!0);return}switch(B.key){case"ArrowDown":B.preventDefault(),N(G=>{const I=G<E.length-1?G+1:0;return $(I),I});break;case"ArrowUp":B.preventDefault(),N(G=>{const I=G>0?G-1:E.length-1;return $(I),I});break;case"Enter":B.preventDefault(),k>=0&&E[k]&&q(E[k]);break;case"Escape":b(!1),N(-1);break;case"Tab":b(!1),N(-1);break}},$=B=>{if(M.current){const G=M.current.querySelectorAll("[data-option]")[B];G&&G.scrollIntoView({block:"nearest"})}},H=()=>{var B;w(""),r==null||r(""),b(!1),(B=C.current)==null||B.focus()},P=B=>{C.current=B,xh(g,B)},_=(B,G)=>u.jsxs("button",{type:"button","data-option":!0,className:R("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm text-left",k===G&&"bg-accent",B.disabled&&"opacity-50 cursor-not-allowed",!B.disabled&&"hover:bg-accent cursor-pointer"),onClick:()=>q(B),onMouseEnter:()=>!B.disabled&&N(G),disabled:B.disabled,children:[B.icon&&u.jsx("span",{className:"flex-shrink-0",children:B.icon}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"truncate font-medium",children:B.label}),B.description&&u.jsx("div",{className:"truncate text-xs text-muted-foreground",children:B.description})]})]},B.value),z=y&&(E.length>0||s||x.length>=l);return u.jsxs("div",{ref:S,className:R("relative",t),children:[u.jsx(ca,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground z-10"}),u.jsx("input",{type:"text",role:"combobox","aria-expanded":y,"aria-autocomplete":"list","aria-controls":"autocomplete-list",autoComplete:"off",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"),ref:P,value:x,onChange:O,onFocus:D,onKeyDown:F,disabled:h,placeholder:m,...v}),u.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:s?u.jsx(Ci,{className:"h-4 w-4 animate-spin text-muted-foreground"}):x?u.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:H,tabIndex:-1,children:u.jsx(xt,{className:"h-4 w-4 text-muted-foreground"})}):null}),z&&u.jsx("div",{id:"autocomplete-list",ref:M,className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md max-h-[300px] overflow-y-auto",children:s?u.jsx("div",{className:"flex items-center justify-center py-4",children:u.jsx(Ci,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):E.length===0?u.jsx("div",{className:"px-3 py-4 text-sm text-center text-muted-foreground",children:a}):A?u.jsx("div",{className:"p-1",children:Object.entries(A).map(([B,G])=>u.jsxs("div",{children:[u.jsx("div",{className:"px-3 py-1.5 text-xs font-semibold text-muted-foreground",children:B}),G.map(I=>{const J=E.indexOf(I);return _(I,J)})]},B))}):u.jsx("div",{className:"p-1",children:E.map((B,G)=>_(B,G))})})]})});L7.displayName="AutocompleteSearch";const F7=p.createContext(void 0);function qo(){const t=p.useContext(F7);if(!t)throw new Error("useSidebar must be used within a SidebarProvider");return t}const _7=Ge("flex h-full flex-col border-r bg-background transition-all duration-300",{variants:{variant:{default:"",inset:"rounded-lg border shadow-sm",floating:"m-2 rounded-lg border shadow-lg"}},defaultVariants:{variant:"default"}}),z7=p.forwardRef(({className:t,variant:e,width:r=256,collapsedWidth:n=64,children:o,...s},a)=>{const{open:i,collapsed:l,isMobile:c}=qo(),d=c?i?r:0:l?n:r;return u.jsxs(u.Fragment,{children:[c&&i&&u.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>qo().setOpen(!1)}),u.jsx("aside",{ref:a,"data-collapsed":l,"data-mobile":c,className:R(_7({variant:e}),c&&"fixed inset-y-0 left-0 z-50",t),style:{width:d,minWidth:d,overflow:"hidden"},...s,children:u.jsx("div",{className:"flex h-full flex-col",style:{width:r,minWidth:r},children:o})})]})});z7.displayName="Sidebar";const B7=p.forwardRef(({className:t,...e},r)=>{const{open:n,setOpen:o,collapsed:s,setCollapsed:a,isMobile:i}=qo(),l=()=>{i?o(!n):a(!s)};return u.jsxs(Ut,{ref:r,variant:"ghost",size:"icon",className:R("h-9 w-9",t),onClick:l,...e,children:[u.jsx(kO,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Toggle sidebar"})]})});B7.displayName="SidebarTrigger";const $7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex h-14 items-center border-b px-4",t),...e}));$7.displayName="SidebarHeader";const H7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex-1 overflow-auto py-2",t),...e}));H7.displayName="SidebarContent";const V7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("mt-auto border-t p-4",t),...e}));V7.displayName="SidebarFooter";const W7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("px-2 py-2",t),...e}));W7.displayName="SidebarGroup";const U7=p.forwardRef(({className:t,...e},r)=>{const{collapsed:n}=qo();return n?null:u.jsx("div",{ref:r,className:R("px-2 py-1.5 text-xs font-medium text-muted-foreground",t),...e})});U7.displayName="SidebarGroupLabel";const G7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("space-y-1",t),...e}));G7.displayName="SidebarGroupContent";const q7=p.forwardRef(({className:t,...e},r)=>u.jsx("ul",{ref:r,className:R("space-y-1",t),...e}));q7.displayName="SidebarMenu";const K7=p.forwardRef(({className:t,...e},r)=>u.jsx("li",{ref:r,className:R("",t),...e}));K7.displayName="SidebarMenuItem";const Y7=p.forwardRef(({className:t,isActive:e,tooltip:r,children:n,...o},s)=>{const{collapsed:a}=qo(),i=u.jsx("button",{ref:s,className:R("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e&&"bg-accent text-accent-foreground",a&&"justify-center px-2",t),...o,children:n});return a&&r?u.jsxs("div",{className:"relative group",children:[i,u.jsx("div",{className:"absolute left-full top-1/2 z-50 ml-2 -translate-y-1/2 rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 shadow-md transition-opacity group-hover:opacity-100",children:r})]}):i});Y7.displayName="SidebarMenuButton";const J7=p.forwardRef(({className:t,...e},r)=>{const{collapsed:n}=qo();return n?null:u.jsx("ul",{ref:r,className:R("ml-4 space-y-1 border-l pl-4",t),...e})});J7.displayName="SidebarMenuSub";const X7=p.forwardRef(({className:t,...e},r)=>u.jsx("li",{ref:r,className:R("",t),...e}));X7.displayName="SidebarMenuSubItem";const Z7=p.forwardRef(({className:t,isActive:e,...r},n)=>u.jsx("button",{ref:n,className:R("flex w-full items-center rounded-md px-3 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",e&&"bg-accent text-accent-foreground",t),...r}));Z7.displayName="SidebarMenuSubButton";const Q7=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("mx-2 my-2 h-px bg-border",t),...e}));Q7.displayName="SidebarSeparator";var eM=["PageUp","PageDown"],tM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],rM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ls="Slider",[Ju,eK,tK]=xn(ls),[nM]=Oe(ls,[tK]),[rK,Tc]=nM(ls),oM=p.forwardRef((t,e)=>{const{name:r,min:n=0,max:o=100,step:s=1,orientation:a="horizontal",disabled:i=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[n],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:m=!1,form:v,...g}=t,y=p.useRef(new Set),b=p.useRef(0),x=a==="horizontal"?nK:oK,[w=[],k]=Ye({prop:d,defaultProp:c,onChange:A=>{var O;(O=[...y.current][b.current])==null||O.focus(),f(A)}}),N=p.useRef(w);function S(A){const O=cK(w,A);E(A,O)}function C(A){E(A,b.current)}function M(){const A=N.current[b.current];w[b.current]!==A&&h(w)}function E(A,O,{commit:D}={commit:!1}){const q=pK(s),F=hK(Math.round((A-n)/s)*s+n,q),$=Js(F,[n,o]);k((H=[])=>{const P=iK(H,$,O);if(fK(P,l*s)){b.current=P.indexOf($);const _=String(P)!==String(H);return _&&D&&h(P),_?P:H}else return H})}return u.jsx(rK,{scope:t.__scopeSlider,name:r,disabled:i,min:n,max:o,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:a,form:v,children:u.jsx(Ju.Provider,{scope:t.__scopeSlider,children:u.jsx(Ju.Slot,{scope:t.__scopeSlider,children:u.jsx(x,{"aria-disabled":i,"data-disabled":i?"":void 0,...g,ref:e,onPointerDown:L(g.onPointerDown,()=>{i||(N.current=w)}),min:n,max:o,inverted:m,onSlideStart:i?void 0:S,onSlideMove:i?void 0:C,onSlideEnd:i?void 0:M,onHomeKeyDown:()=>!i&&E(n,0,{commit:!0}),onEndKeyDown:()=>!i&&E(o,w.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:O})=>{if(!i){const D=eM.includes(A.key)||A.shiftKey&&tM.includes(A.key)?10:1,q=b.current,F=w[q],$=s*D*O;E(F+$,q,{commit:!0})}}})})})})});oM.displayName=ls;var[sM,aM]=nM(ls,{startEdge:"left",endEdge:"right",size:"width",direction:1}),nK=p.forwardRef((t,e)=>{const{min:r,max:n,dir:o,inverted:s,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onStepKeyDown:c,...d}=t,[f,h]=p.useState(null),m=oe(e,w=>h(w)),v=p.useRef(void 0),g=yr(o),y=g==="ltr",b=y&&!s||!y&&s;function x(w){const k=v.current||f.getBoundingClientRect(),N=[0,k.width],S=wh(N,b?[r,n]:[n,r]);return v.current=k,S(w-k.left)}return u.jsx(sM,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:u.jsx(iM,{dir:g,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const k=x(w.clientX);a==null||a(k)},onSlideMove:w=>{const k=x(w.clientX);i==null||i(k)},onSlideEnd:()=>{v.current=void 0,l==null||l()},onStepKeyDown:w=>{const k=rM[b?"from-left":"from-right"].includes(w.key);c==null||c({event:w,direction:k?-1:1})}})})}),oK=p.forwardRef((t,e)=>{const{min:r,max:n,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:i,onStepKeyDown:l,...c}=t,d=p.useRef(null),f=oe(e,d),h=p.useRef(void 0),m=!o;function v(g){const y=h.current||d.current.getBoundingClientRect(),b=[0,y.height],x=wh(b,m?[n,r]:[r,n]);return h.current=y,x(g-y.top)}return u.jsx(sM,{scope:t.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:u.jsx(iM,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const y=v(g.clientY);s==null||s(y)},onSlideMove:g=>{const y=v(g.clientY);a==null||a(y)},onSlideEnd:()=>{h.current=void 0,i==null||i()},onStepKeyDown:g=>{const y=rM[m?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),iM=p.forwardRef((t,e)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:a,onEndKeyDown:i,onStepKeyDown:l,...c}=t,d=Tc(ls,r);return u.jsx(Q.span,{...c,ref:e,onKeyDown:L(t.onKeyDown,f=>{f.key==="Home"?(a(f),f.preventDefault()):f.key==="End"?(i(f),f.preventDefault()):eM.concat(tM).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:L(t.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():n(f)}),onPointerMove:L(t.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:L(t.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),s(f))})})}),lM="SliderTrack",cM=p.forwardRef((t,e)=>{const{__scopeSlider:r,...n}=t,o=Tc(lM,r);return u.jsx(Q.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:e})});cM.displayName=lM;var Xu="SliderRange",dM=p.forwardRef((t,e)=>{const{__scopeSlider:r,...n}=t,o=Tc(Xu,r),s=aM(Xu,r),a=p.useRef(null),i=oe(e,a),l=o.values.length,c=o.values.map(h=>pM(h,o.min,o.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(Q.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:i,style:{...t.style,[s.startEdge]:d+"%",[s.endEdge]:f+"%"}})});dM.displayName=Xu;var Zu="SliderThumb",uM=p.forwardRef((t,e)=>{const r=eK(t.__scopeSlider),[n,o]=p.useState(null),s=oe(e,i=>o(i)),a=p.useMemo(()=>n?r().findIndex(i=>i.ref.current===n):-1,[r,n]);return u.jsx(sK,{...t,ref:s,index:a})}),sK=p.forwardRef((t,e)=>{const{__scopeSlider:r,index:n,name:o,...s}=t,a=Tc(Zu,r),i=aM(Zu,r),[l,c]=p.useState(null),d=oe(e,x=>c(x)),f=l?a.form||!!l.closest("form"):!0,h=xa(l),m=a.values[n],v=m===void 0?0:pM(m,a.min,a.max),g=lK(n,a.values.length),y=h==null?void 0:h[i.size],b=y?dK(y,v,i.direction):0;return p.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[i.startEdge]:`calc(${v}% + ${b}px)`},children:[u.jsx(Ju.ItemSlot,{scope:t.__scopeSlider,children:u.jsx(Q.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":m,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...s,ref:d,style:m===void 0?{display:"none"}:t.style,onFocus:L(t.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),f&&u.jsx(fM,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:m},n)]})});uM.displayName=Zu;var aK="RadioBubbleInput",fM=p.forwardRef(({__scopeSlider:t,value:e,...r},n)=>{const o=p.useRef(null),s=oe(o,n),a=ts(e);return p.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==e&&c){const d=new Event("input",{bubbles:!0});c.call(i,e),i.dispatchEvent(d)}},[a,e]),u.jsx(Q.input,{style:{display:"none"},...r,ref:s,defaultValue:e})});fM.displayName=aK;function iK(t=[],e,r){const n=[...t];return n[r]=e,n.sort((o,s)=>o-s)}function pM(t,e,r){const n=100/(r-e)*(t-e);return Js(n,[0,100])}function lK(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function cK(t,e){if(t.length===1)return 0;const r=t.map(o=>Math.abs(o-e)),n=Math.min(...r);return r.indexOf(n)}function dK(t,e,r){const n=t/2,o=wh([0,50],[0,n]);return(n-o(e)*r)*r}function uK(t){return t.slice(0,-1).map((e,r)=>t[r+1]-e)}function fK(t,e){if(e>0){const r=uK(t);return Math.min(...r)>=e}return!0}function wh(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function pK(t){return(String(t).split(".")[1]||"").length}function hK(t,e){const r=Math.pow(10,e);return Math.round(t*r)/r}var hM=oM,mK=cM,gK=dM,vK=uM;const yK=p.forwardRef(({className:t,...e},r)=>u.jsxs(hM,{ref:r,className:R("relative flex w-full touch-none select-none items-center",t),...e,children:[u.jsx(mK,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(gK,{className:"absolute h-full bg-primary"})}),u.jsx(vK,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));yK.displayName=hM.displayName;function bK(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Array(12).fill(0);let Qu=1;class xK{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:Qu++,a=this.toasts.find(l=>l.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:i,title:n}):l):this.addToast({title:n,...o,dismissible:i,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,a;const i=o.then(async c=>{if(a=["resolve",c],T.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(kK(c)&&!c.ok){s=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,f=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,h=typeof d=="object"&&!T.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...h})}else if(c instanceof Error){s=!1;const d=typeof r.error=="function"?await r.error(c):r.error,f=typeof r.description=="function"?await r.description(c):r.description,h=typeof d=="object"&&!T.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...h})}else if(r.success!==void 0){s=!1;const d=typeof r.success=="function"?await r.success(c):r.success,f=typeof r.description=="function"?await r.description(c):r.description,h=typeof d=="object"&&!T.isValidElement(d)?d:{message:d};this.create({id:n,type:"success",description:f,...h})}}).catch(async c=>{if(a=["reject",c],r.error!==void 0){s=!1;const d=typeof r.error=="function"?await r.error(c):r.error,f=typeof r.description=="function"?await r.description(c):r.description,h=typeof d=="object"&&!T.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...h})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((c,d)=>i.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,r)=>{const n=(r==null?void 0:r.id)||Qu++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const zt=new xK,wK=(t,e)=>{const r=(e==null?void 0:e.id)||Qu++;return zt.addToast({title:t,...e,id:r}),r},kK=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",NK=wK,CK=()=>zt.toasts,SK=()=>zt.getActiveToasts();Object.assign(NK,{success:zt.success,info:zt.info,warning:zt.warning,error:zt.error,custom:zt.custom,message:zt.message,promise:zt.promise,dismiss:zt.dismiss,loading:zt.loading},{getHistory:CK,getToasts:SK});bK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const MK=Ge("animate-spin rounded-full border-2 border-current border-t-transparent",{variants:{size:{default:"h-5 w-5",sm:"h-4 w-4",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"default"}}),EK=p.forwardRef(({className:t,size:e,...r},n)=>u.jsx("div",{ref:n,className:R(MK({size:e}),t),role:"status","aria-label":"Loading",...r,children:u.jsx("span",{className:"sr-only",children:"Loading..."})}));EK.displayName="Spinner";const jK=p.forwardRef(({className:t,steps:e,currentStep:r,orientation:n="horizontal",onStepClick:o,allowClickOnCompleted:s=!0,...a},i)=>{const l=n==="vertical";return u.jsx("div",{ref:i,className:R("flex",l?"flex-col":"flex-row items-center",t),...a,children:e.map((c,d)=>{const f=d<r,h=d===r,m=o&&(s?f:!1);return u.jsxs(p.Fragment,{children:[u.jsxs("div",{className:R("flex",l?"flex-row items-start gap-3":"flex-col items-center gap-2"),children:[u.jsx("button",{type:"button",disabled:!m,onClick:()=>m&&(o==null?void 0:o(d)),className:R("relative flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-all",f?"border-primary bg-primary text-primary-foreground":h?"border-primary bg-background text-primary":"border-muted-foreground/30 bg-background text-muted-foreground",m&&"cursor-pointer hover:border-primary hover:text-primary"),children:f?u.jsx(bt,{className:"h-5 w-5"}):c.icon??d+1}),u.jsxs("div",{className:R(l?"pb-8":"text-center",l&&d===e.length-1&&"pb-0"),children:[u.jsx("p",{className:R("text-sm font-medium",h||f?"text-foreground":"text-muted-foreground"),children:c.title}),c.description&&u.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:c.description})]})]}),d<e.length-1&&u.jsx("div",{className:R("transition-colors",l?"ml-5 h-full min-h-[24px] w-0.5 -translate-x-1/2":"mx-2 h-0.5 flex-1 min-w-[24px]",d<r?"bg-primary":"bg-muted-foreground/30")})]},c.id)})})});jK.displayName="Stepper";const RK=p.forwardRef(({className:t,step:e,currentStep:r,children:n,...o},s)=>e!==r?null:u.jsx("div",{ref:s,className:R("mt-4",t),...o,children:n}));RK.displayName="StepperContent";var Ac="Switch",[TK]=Oe(Ac),[AK,OK]=TK(Ac),mM=p.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:l="on",onCheckedChange:c,form:d,...f}=t,[h,m]=p.useState(null),v=oe(e,w=>m(w)),g=p.useRef(!1),y=h?d||!!h.closest("form"):!0,[b,x]=Ye({prop:o,defaultProp:s??!1,onChange:c,caller:Ac});return u.jsxs(AK,{scope:r,checked:b,disabled:i,children:[u.jsx(Q.button,{type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":bM(b),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:v,onClick:L(t.onClick,w=>{x(k=>!k),y&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),y&&u.jsx(yM,{control:h,bubbles:!g.current,name:n,value:l,checked:b,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});mM.displayName=Ac;var gM="SwitchThumb",vM=p.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,o=OK(gM,r);return u.jsx(Q.span,{"data-state":bM(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:e})});vM.displayName=gM;var DK="SwitchBubbleInput",yM=p.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...o},s)=>{const a=p.useRef(null),i=oe(a,s),l=ts(r),c=xa(e);return p.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&h){const m=new Event("click",{bubbles:n});h.call(d,r),d.dispatchEvent(m)}},[l,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yM.displayName=DK;function bM(t){return t?"checked":"unchecked"}var xM=mM,IK=vM;const PK=p.forwardRef(({className:t,...e},r)=>u.jsx(xM,{className:R("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:r,children:u.jsx(IK,{className:R("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));PK.displayName=xM.displayName;const wM=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{className:"relative w-full overflow-auto",children:u.jsx("table",{ref:r,className:R("w-full caption-bottom text-sm",t),...e})}));wM.displayName="Table";const kM=p.forwardRef(({className:t,...e},r)=>u.jsx("thead",{ref:r,className:R("[&_tr]:border-b",t),...e}));kM.displayName="TableHeader";const NM=p.forwardRef(({className:t,...e},r)=>u.jsx("tbody",{ref:r,className:R("[&_tr:last-child]:border-0",t),...e}));NM.displayName="TableBody";const LK=p.forwardRef(({className:t,...e},r)=>u.jsx("tfoot",{ref:r,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));LK.displayName="TableFooter";const ef=p.forwardRef(({className:t,...e},r)=>u.jsx("tr",{ref:r,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));ef.displayName="TableRow";const tf=p.forwardRef(({className:t,...e},r)=>u.jsx("th",{ref:r,className:R("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));tf.displayName="TableHead";const rf=p.forwardRef(({className:t,...e},r)=>u.jsx("td",{ref:r,className:R("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));rf.displayName="TableCell";const FK=p.forwardRef(({className:t,...e},r)=>u.jsx("caption",{ref:r,className:R("mt-4 text-sm text-muted-foreground",t),...e}));FK.displayName="TableCaption";var Oc="Tabs",[_K]=Oe(Oc,[kr]),CM=kr(),[zK,kh]=_K(Oc),BK=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:s,orientation:a="horizontal",dir:i,activationMode:l="automatic",...c}=t,d=yr(i),[f,h]=Ye({prop:n,onChange:o,defaultProp:s??"",caller:Oc});return u.jsx(zK,{scope:r,baseId:Ke(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:l,children:u.jsx(Q.div,{dir:d,"data-orientation":a,...c,ref:e})})});BK.displayName=Oc;var SM="TabsList",MM=p.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...o}=t,s=kh(SM,r),a=CM(r);return u.jsx(Ma,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:n,children:u.jsx(Q.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:e})})});MM.displayName=SM;var EM="TabsTrigger",jM=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...s}=t,a=kh(EM,r),i=CM(r),l=AM(a.baseId,n),c=OM(a.baseId,n),d=n===a.value;return u.jsx(Ea,{asChild:!0,...i,focusable:!o,active:d,children:u.jsx(Q.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:e,onMouseDown:L(t.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?a.onValueChange(n):f.preventDefault()}),onKeyDown:L(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(n)}),onFocus:L(t.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!o&&f&&a.onValueChange(n)})})})});jM.displayName=EM;var RM="TabsContent",TM=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:o,children:s,...a}=t,i=kh(RM,r),l=AM(i.baseId,n),c=OM(i.baseId,n),d=n===i.value,f=p.useRef(d);return p.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),u.jsx(De,{present:o||d,children:({present:h})=>u.jsx(Q.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});TM.displayName=RM;function AM(t,e){return`${t}-trigger-${e}`}function OM(t,e){return`${t}-content-${e}`}var DM=MM,IM=jM,PM=TM;const $K=p.forwardRef(({className:t,...e},r)=>u.jsx(DM,{ref:r,className:R("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));$K.displayName=DM.displayName;const HK=p.forwardRef(({className:t,...e},r)=>u.jsx(IM,{ref:r,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));HK.displayName=IM.displayName;const VK=p.forwardRef(({className:t,...e},r)=>u.jsx(PM,{ref:r,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));VK.displayName=PM.displayName;const WK=p.forwardRef(({className:t,...e},r)=>u.jsx("textarea",{className:R("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...e}));WK.displayName="Textarea";function UK(t,e){const r=t.match(/^(\d{1,2}):(\d{2})$/),n=t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);if(r&&e==="24"){const o=parseInt(r[1],10),s=parseInt(r[2],10);if(o>=0&&o<=23&&s>=0&&s<=59)return{hours:o,minutes:s,period:o>=12?"PM":"AM"}}if(n&&e==="12"){const o=parseInt(n[1],10),s=parseInt(n[2],10),a=n[3].toUpperCase();if(o>=1&&o<=12&&s>=0&&s<=59)return{hours:o,minutes:s,period:a}}return null}function GK(t,e,r,n){const o=e.toString().padStart(2,"0");if(r==="24")return`${t.toString().padStart(2,"0")}:${o}`;const s=t===0?12:t>12?t-12:t,a=n||(t>=12?"PM":"AM");return`${s}:${o} ${a}`}const qK=p.forwardRef(({className:t,value:e="",onChange:r,format:n="24",...o},s)=>{const a=i=>{r==null||r(i.target.value)};return u.jsxs("div",{className:"relative",children:[u.jsx(ff,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"text",className:R("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:s,value:e,onChange:a,placeholder:n==="24"?"HH:MM":"HH:MM AM",...o})]})});qK.displayName="TimePickerInput";const KK=p.forwardRef(({value:t,onChange:e,format:r="24",minuteStep:n=1,disabled:o=!1,className:s,placeholder:a},i)=>{const[l,c]=p.useState(!1),[d,f]=p.useState(r==="24"?0:12),[h,m]=p.useState(0),[v,g]=p.useState("AM"),y=p.useRef(null);p.useEffect(()=>{if(t){const C=UK(t,r);C&&(f(r==="12"?C.hours===0?12:C.hours>12?C.hours-12:C.hours:C.hours),m(C.minutes),g(C.period))}},[t,r]),p.useEffect(()=>{const C=M=>{y.current&&!y.current.contains(M.target)&&c(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const b=(C,M,E)=>{let A=C;r==="12"&&(E==="PM"&&A!==12&&(A+=12),E==="AM"&&A===12&&(A=0));const O=GK(A,M,r,r==="12"?E:void 0);e==null||e(O)},x=()=>{const C=r==="24"?23:12,M=r==="24"?0:1,E=d>=C?M:d+1;f(E),b(E,h,v)},w=()=>{const C=r==="24"?23:12,M=d<=(r==="24"?0:1)?C:d-1;f(M),b(M,h,v)},k=()=>{const C=(h+n)%60;m(C),b(d,C,v)},N=()=>{const C=h-n<0?60-n:h-n;m(C),b(d,C,v)},S=()=>{const C=v==="AM"?"PM":"AM";g(C),b(d,h,C)};return u.jsxs("div",{ref:y,className:R("relative",s),children:[u.jsxs("div",{className:R("flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",o&&"cursor-not-allowed opacity-50",!o&&"cursor-pointer hover:bg-accent/50"),onClick:()=>!o&&c(!l),children:[u.jsx(ff,{className:"mr-2 h-4 w-4 text-muted-foreground"}),u.jsx("span",{className:R("font-mono",!t&&"text-muted-foreground"),children:t||a||(r==="24"?"00:00":"12:00 AM")})]}),l&&!o&&u.jsxs("div",{ref:i,className:"absolute z-50 mt-1 rounded-md border bg-popover p-3 shadow-md",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:x,children:u.jsx(di,{className:"h-4 w-4"})}),u.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:d.toString().padStart(2,"0")}),u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:w,children:u.jsx(zr,{className:"h-4 w-4"})})]}),u.jsx("span",{className:"text-2xl font-mono",children:":"}),u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:k,children:u.jsx(di,{className:"h-4 w-4"})}),u.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:h.toString().padStart(2,"0")}),u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:N,children:u.jsx(zr,{className:"h-4 w-4"})})]}),r==="12"&&u.jsxs("div",{className:"flex flex-col items-center ml-2",children:[u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:S,children:u.jsx(di,{className:"h-4 w-4"})}),u.jsx("span",{className:"w-10 text-center text-lg font-mono",children:v}),u.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:S,children:u.jsx(zr,{className:"h-4 w-4"})})]})]}),u.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[u.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md hover:bg-accent",onClick:()=>{const C=new Date,M=C.getHours(),E=C.getMinutes();r==="12"?(f(M===0?12:M>12?M-12:M),g(M>=12?"PM":"AM")):f(M),m(E),b(r==="12"?M===0?12:M>12?M-12:M:M,E,M>=12?"PM":"AM")},children:"Now"}),u.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90",onClick:()=>c(!1),children:"Done"})]})]})]})});KK.displayName="TimePicker";const YK=Ge("relative",{variants:{variant:{default:"",alternating:""}},defaultVariants:{variant:"default"}}),JK=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,className:R(YK({variant:e}),t),...r}));JK.displayName="Timeline";const XK=Ge("relative pb-8 pl-8 last:pb-0",{variants:{variant:{default:"",success:"[--timeline-dot-color:theme(colors.green.500)]",warning:"[--timeline-dot-color:theme(colors.yellow.500)]",error:"[--timeline-dot-color:theme(colors.red.500)]",info:"[--timeline-dot-color:theme(colors.blue.500)]"}},defaultVariants:{variant:"default"}}),ZK=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,className:R(XK({variant:e}),t),...r}));ZK.displayName="TimelineItem";const QK=Ge("absolute left-[11px] top-[26px] h-[calc(100%-26px)] w-px",{variants:{variant:{default:"bg-border",dashed:"border-l border-dashed border-border bg-transparent",dotted:"border-l border-dotted border-border bg-transparent"}},defaultVariants:{variant:"default"}}),eY=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("div",{ref:n,className:R(QK({variant:e}),t),...r}));eY.displayName="TimelineLine";const tY=Ge("absolute left-0 flex h-6 w-6 items-center justify-center rounded-full border-2 border-background",{variants:{variant:{default:"bg-muted",filled:"bg-primary text-primary-foreground",outline:"border-2 border-primary bg-background",icon:"bg-primary text-primary-foreground"},size:{sm:"h-4 w-4",default:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),rY=p.forwardRef(({className:t,variant:e,size:r,icon:n,children:o,...s},a)=>u.jsx("div",{ref:a,className:R(tY({variant:e,size:r}),"bg-[var(--timeline-dot-color,theme(colors.muted.DEFAULT))]",t),...s,children:n||o}));rY.displayName="TimelineDot";const nY=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("pt-0.5",t),...e}));nY.displayName="TimelineContent";const oY=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("flex items-center gap-2",t),...e}));oY.displayName="TimelineHeader";const sY=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:R("font-heading font-semibold leading-none tracking-tight",t),...e}));sY.displayName="TimelineTitle";const aY=p.forwardRef(({className:t,...e},r)=>u.jsx("time",{ref:r,className:R("text-sm text-muted-foreground",t),...e}));aY.displayName="TimelineTime";const iY=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:R("mt-2 text-sm text-muted-foreground",t),...e}));iY.displayName="TimelineDescription";const lY=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("relative flex items-start gap-4",t),...e}));lY.displayName="TimelineHorizontal";const cY=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("relative flex flex-col items-center",t),...e}));cY.displayName="TimelineHorizontalItem";const dY=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:R("absolute left-[calc(50%+12px)] top-3 h-px w-[calc(100%-24px)] bg-border",t),...e}));dY.displayName="TimelineHorizontalLine";var Rn="ToggleGroup",[LM]=Oe(Rn,[kr]),FM=kr(),Nh=T.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single")return u.jsx(uY,{...n,ref:e});if(r==="multiple")return u.jsx(fY,{...n,ref:e});throw new Error(`Missing prop \`type\` expected on \`${Rn}\``)});Nh.displayName=Rn;var[_M,zM]=LM(Rn),uY=T.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=t,[a,i]=Ye({prop:r,defaultProp:n??"",onChange:o,caller:Rn});return u.jsx(_M,{scope:t.__scopeToggleGroup,type:"single",value:T.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:T.useCallback(()=>i(""),[i]),children:u.jsx(BM,{...s,ref:e})})}),fY=T.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=t,[a,i]=Ye({prop:r,defaultProp:n??[],onChange:o,caller:Rn}),l=T.useCallback(d=>i((f=[])=>[...f,d]),[i]),c=T.useCallback(d=>i((f=[])=>f.filter(h=>h!==d)),[i]);return u.jsx(_M,{scope:t.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:u.jsx(BM,{...s,ref:e})})});Nh.displayName=Rn;var[pY,hY]=LM(Rn),BM=T.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...l}=t,c=FM(r),d=yr(a),f={role:"group",dir:d,...l};return u.jsx(pY,{scope:r,rovingFocus:o,disabled:n,children:o?u.jsx(Ma,{asChild:!0,...c,orientation:s,dir:d,loop:i,children:u.jsx(Q.div,{...f,ref:e})}):u.jsx(Q.div,{...f,ref:e})})}),Al="ToggleGroupItem",$M=T.forwardRef((t,e)=>{const r=zM(Al,t.__scopeToggleGroup),n=hY(Al,t.__scopeToggleGroup),o=FM(t.__scopeToggleGroup),s=r.value.includes(t.value),a=n.disabled||t.disabled,i={...t,pressed:s,disabled:a},l=T.useRef(null);return n.rovingFocus?u.jsx(Ea,{asChild:!0,...o,focusable:!a,active:s,ref:l,children:u.jsx(Tv,{...i,ref:e})}):u.jsx(Tv,{...i,ref:e})});$M.displayName=Al;var Tv=T.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...o}=t,s=zM(Al,r),a={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return u.jsx(mh,{...i,...o,ref:e,onPressedChange:l=>{l?s.onItemActivate(n):s.onItemDeactivate(n)}})}),HM=Nh,VM=$M;const WM=p.createContext({size:"default",variant:"default"}),mY=p.forwardRef(({className:t,variant:e,size:r,children:n,...o},s)=>u.jsx(HM,{ref:s,className:R("flex items-center justify-center gap-1",t),...o,children:u.jsx(WM.Provider,{value:{variant:e,size:r},children:n})}));mY.displayName=HM.displayName;const gY=p.forwardRef(({className:t,children:e,variant:r,size:n,...o},s)=>{const a=p.useContext(WM);return u.jsx(VM,{ref:s,className:R(L2({variant:a.variant||r,size:a.size||n}),t),...o,children:e})});gY.displayName=VM.displayName;var[Dc]=Oe("Tooltip",[wr]),Ch=wr(),vY="TooltipProvider",Av="tooltip.open",[gJ,UM]=Dc(vY),GM="Tooltip",[vJ,Ic]=Dc(GM),nf="TooltipTrigger",yY=p.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,o=Ic(nf,r),s=UM(nf,r),a=Ch(r),i=p.useRef(null),l=oe(e,i,o.onTriggerChange),c=p.useRef(!1),d=p.useRef(!1),f=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(ss,{asChild:!0,...a,children:u.jsx(Q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:L(t.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:L(t.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:L(t.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:L(t.onFocus,()=>{c.current||o.onOpen()}),onBlur:L(t.onBlur,o.onClose),onClick:L(t.onClick,o.onClose)})})});yY.displayName=nf;var bY="TooltipPortal",[yJ,xY]=Dc(bY,{forceMount:void 0}),Ko="TooltipContent",qM=p.forwardRef((t,e)=>{const r=xY(Ko,t.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=t,a=Ic(Ko,t.__scopeTooltip);return u.jsx(De,{present:n||a.open,children:a.disableHoverableContent?u.jsx(KM,{side:o,...s,ref:e}):u.jsx(wY,{side:o,...s,ref:e})})}),wY=p.forwardRef((t,e)=>{const r=Ic(Ko,t.__scopeTooltip),n=UM(Ko,t.__scopeTooltip),o=p.useRef(null),s=oe(e,o),[a,i]=p.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:f}=n,h=p.useCallback(()=>{i(null),f(!1)},[f]),m=p.useCallback((v,g)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},x=MY(b,y.getBoundingClientRect()),w=EY(b,x),k=jY(g.getBoundingClientRect()),N=TY([...w,...k]);i(N),f(!0)},[f]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&d){const v=y=>m(y,d),g=y=>m(y,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,m,h]),p.useEffect(()=>{if(a){const v=g=>{const y=g.target,b={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),w=!RY(b,a);x?h():w&&(h(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,a,c,h]),u.jsx(KM,{...t,ref:s})}),[kY,NY]=Dc(GM,{isInside:!1}),CY=Hy("TooltipContent"),KM=p.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=t,l=Ic(Ko,r),c=Ch(r),{onClose:d}=l;return p.useEffect(()=>(document.addEventListener(Av,d),()=>document.removeEventListener(Av,d)),[d]),p.useEffect(()=>{if(l.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(Na,{"data-state":l.stateAttribute,...c,...i,ref:e,style:{...i.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:[u.jsx(CY,{children:n}),u.jsx(kY,{scope:r,isInside:!0,children:u.jsx(v1,{id:l.contentId,role:"tooltip",children:o||n})})]})})});qM.displayName=Ko;var YM="TooltipArrow",SY=p.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,o=Ch(r);return NY(YM,r).isInside?null:u.jsx(Ca,{...o,...n,ref:e})});SY.displayName=YM;function MY(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function EY(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function jY(t){const{top:e,right:r,bottom:n,left:o}=t;return[{x:o,y:e},{x:r,y:e},{x:r,y:n},{x:o,y:n}]}function RY(t,e){const{x:r,y:n}=t;let o=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const i=e[s],l=e[a],c=i.x,d=i.y,f=l.x,h=l.y;d>n!=h>n&&r<(f-c)*(n-d)/(h-d)+c&&(o=!o)}return o}function TY(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),AY(e)}function AY(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const o=t[n];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))e.pop();else break}e.push(o)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const o=t[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var JM=qM;const OY=p.forwardRef(({className:t,sideOffset:e=4,...r},n)=>u.jsx(JM,{ref:n,sideOffset:e,className:R("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",t),...r}));OY.displayName=JM.displayName;const DY=p.forwardRef(({className:t,data:e,selectedId:r,onSelect:n,expandedIds:o,onExpandChange:s,showIcons:a=!0,indentSize:i=20,...l},c)=>{const[d,f]=p.useState([]),h=o??d,m=g=>{const y=h.includes(g)?h.filter(b=>b!==g):[...h,g];s?s(y):f(y)},v=(g,y=0)=>{var b;const x=g.children&&g.children.length>0,w=h.includes(g.id),k=r===g.id;return x?u.jsxs(Ky,{open:w,onOpenChange:()=>m(g.id),children:[u.jsx(Yy,{asChild:!0,children:u.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(g),className:R("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",k&&"bg-accent"),style:{paddingLeft:`${y*i+8}px`},children:[u.jsx(Jo,{className:R("h-4 w-4 shrink-0 text-muted-foreground transition-transform",w&&"rotate-90")}),a&&u.jsx("span",{className:"shrink-0 text-muted-foreground",children:g.icon??(w?u.jsx(lO,{className:"h-4 w-4"}):u.jsx(cO,{className:"h-4 w-4"}))}),u.jsx("span",{className:"truncate",children:g.name})]})}),u.jsx(Jy,{className:"overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",children:(b=g.children)==null?void 0:b.map(N=>v(N,y+1))})]},g.id):u.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(g),className:R("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",k&&"bg-accent"),style:{paddingLeft:`${y*i+8}px`},children:[a&&u.jsx("span",{className:"shrink-0 text-muted-foreground",children:g.icon??u.jsx(pf,{className:"h-4 w-4"})}),u.jsx("span",{className:"truncate",children:g.name})]},g.id)};return u.jsx("div",{ref:c,className:R("space-y-1",t),...l,children:e.map(g=>v(g))})});DY.displayName="TreeView";const Sh=p.forwardRef(({className:t,variant:e,author:r,rating:n,showQuoteIcon:o=!0,children:s,...a},i)=>{const l=u.jsxs(u.Fragment,{children:[o&&e!=="minimal"&&u.jsx(By,{className:"mb-4 h-8 w-8 text-primary/20"}),u.jsx("div",{className:"mb-6 text-lg text-foreground",children:s}),n!==void 0&&u.jsx("div",{className:"mb-4 flex gap-1",children:Array.from({length:5}).map((c,d)=>u.jsx(pA,{className:j("h-5 w-5",d<n?"fill-yellow-400 text-yellow-400":"text-muted-foreground/30")},d))}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsxs(Ex,{children:[r.avatar&&u.jsx(jx,{src:r.avatar,alt:r.name}),u.jsx(Rx,{children:r.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2)})]}),u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:"font-semibold text-foreground",children:r.name}),(r.title||r.company)&&u.jsxs("span",{className:"text-sm text-muted-foreground",children:[r.title,r.title&&r.company&&" at ",r.company]})]})]})]});return e==="card"?u.jsx(Ef,{ref:i,className:j("",t),...a,children:u.jsx(jf,{className:"pt-6",children:l})}):e==="featured"?u.jsx("div",{ref:i,className:j("relative rounded-2xl bg-gradient-to-br from-primary/5 to-primary/10 p-8 md:p-12",t),...a,children:l}):u.jsx("div",{ref:i,className:j("",t),...a,children:l})});Sh.displayName="Testimonial";const XM=p.forwardRef(({className:t,columns:e=3,...r},n)=>{const o={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"};return u.jsx("div",{ref:n,className:j("grid gap-6",o[e],t),...r})});XM.displayName="TestimonialGrid";const ZM=p.forwardRef(({className:t,testimonials:e,autoPlay:r=!0,interval:n=5e3,...o},s)=>{const[a,i]=p.useState(0);return p.useEffect(()=>{if(!r)return;const l=setInterval(()=>{i(c=>(c+1)%e.length)},n);return()=>clearInterval(l)},[r,n,e.length]),u.jsxs("div",{ref:s,className:j("relative overflow-hidden",t),...o,children:[u.jsx("div",{className:"flex transition-transform duration-500 ease-out",style:{transform:`translateX(-${a*100}%)`},children:e.map((l,c)=>u.jsx("div",{className:"w-full shrink-0 px-4",children:u.jsx(Sh,{author:l.author,rating:l.rating,variant:"featured",className:"mx-auto max-w-3xl",children:l.content})},c))}),u.jsx("div",{className:"mt-6 flex justify-center gap-2",children:e.map((l,c)=>u.jsx("button",{onClick:()=>i(c),className:j("h-2 w-2 rounded-full transition-colors",c===a?"bg-primary":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),"aria-label":`Go to testimonial ${c+1}`},c))})]})});ZM.displayName="TestimonialCarousel";const IY=ye("relative",{variants:{variant:{default:"border-l-4 border-primary pl-6",centered:"text-center",card:"rounded-lg border bg-card p-6 shadow-sm",minimal:""},size:{sm:"",default:"",lg:""}},defaultVariants:{variant:"default",size:"default"}}),PY={sm:"text-base sm:text-lg",default:"text-lg sm:text-xl md:text-2xl",lg:"text-xl sm:text-2xl md:text-3xl"},QM=p.forwardRef(({className:t,variant:e,size:r,showIcon:n=!1,children:o,...s},a)=>u.jsxs("blockquote",{ref:a,className:j(IY({variant:e,size:r}),t),...s,children:[n&&e==="centered"&&u.jsx(By,{className:"mx-auto mb-4 h-8 w-8 text-muted-foreground/30"}),o]}));QM.displayName="Quote";const eE=p.forwardRef(({className:t,size:e="default",...r},n)=>u.jsx("p",{ref:n,className:j("font-medium italic text-foreground leading-relaxed",PY[e],t),...r}));eE.displayName="QuoteText";const tE=p.forwardRef(({className:t,...e},r)=>u.jsx("footer",{ref:r,className:j("mt-4 flex items-center gap-4",t),...e}));tE.displayName="QuoteAuthor";const rE=p.forwardRef(({className:t,src:e,alt:r,...n},o)=>u.jsx("div",{ref:o,className:j("h-12 w-12 shrink-0 overflow-hidden rounded-full bg-muted",t),...n,children:e&&u.jsx("img",{src:e,alt:r??"",className:"h-full w-full object-cover"})}));rE.displayName="QuoteAuthorAvatar";const nE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-col",t),...e}));nE.displayName="QuoteAuthorInfo";const oE=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("font-semibold text-foreground",t),...e}));oE.displayName="QuoteAuthorName";const sE=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("text-sm text-muted-foreground",t),...e}));sE.displayName="QuoteAuthorTitle";const LY=ye("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),aE=p.forwardRef(({className:t,size:e,children:r,...n},o)=>u.jsx("section",{ref:o,className:j(LY({size:e}),t),...n,children:u.jsx("div",{className:"container mx-auto px-4",children:r})}));aE.displayName="FAQSection";const iE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-12 text-center",t),...e}));iE.displayName="FAQHeader";const lE=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));lE.displayName="FAQTitle";const cE=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));cE.displayName="FAQDescription";const FY=ye("mx-auto",{variants:{variant:{default:"divide-y divide-border",separated:"space-y-4",cards:"space-y-4"},maxWidth:{sm:"max-w-xl",md:"max-w-2xl",lg:"max-w-3xl",full:"max-w-none"}},defaultVariants:{variant:"default",maxWidth:"lg"}}),dE=p.forwardRef(({className:t,variant:e,maxWidth:r,...n},o)=>u.jsx("div",{ref:o,className:j(FY({variant:e,maxWidth:r}),t),...n}));dE.displayName="FAQList";const uE=p.forwardRef(({className:t,defaultOpen:e=!1,children:r,...n},o)=>{const[s,a]=p.useState(e);return u.jsx("div",{ref:o,className:j("py-4",t),...n,children:p.Children.map(r,i=>{if(p.isValidElement(i)){if(i.type===Pc)return p.cloneElement(i,{isOpen:s,onToggle:()=>a(!s)});if(i.type===Lc)return p.cloneElement(i,{isOpen:s})}return i})})});uE.displayName="FAQItem";const fE=p.forwardRef(({className:t,defaultOpen:e=!1,children:r,...n},o)=>{const[s,a]=p.useState(e);return u.jsx("div",{ref:o,className:j("rounded-lg border bg-card p-4 transition-shadow hover:shadow-sm",t),...n,children:p.Children.map(r,i=>{if(p.isValidElement(i)){if(i.type===Pc)return p.cloneElement(i,{isOpen:s,onToggle:()=>a(!s)});if(i.type===Lc)return p.cloneElement(i,{isOpen:s})}return i})})});fE.displayName="FAQItemCard";const Pc=p.forwardRef(({className:t,isOpen:e,onToggle:r,children:n,...o},s)=>u.jsxs("button",{ref:s,type:"button",onClick:r,className:j("flex w-full items-center justify-between text-left font-medium text-foreground transition-colors hover:text-foreground/80",t),"aria-expanded":e,...o,children:[u.jsx("span",{className:"pr-4",children:n}),u.jsx("svg",{className:j("h-5 w-5 shrink-0 text-muted-foreground transition-transform duration-200",e&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}));Pc.displayName="FAQQuestion";const Lc=p.forwardRef(({className:t,isOpen:e,children:r,...n},o)=>u.jsx("div",{ref:o,className:j("grid transition-all duration-200",e?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),...n,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx("div",{className:j("pt-4 text-muted-foreground",t),children:r})})}));Lc.displayName="FAQAnswer";const pE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-12 text-center",t),...e}));pE.displayName="FAQContact";const _Y=ye("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),hE=p.forwardRef(({className:t,size:e,children:r,...n},o)=>u.jsx("section",{ref:o,className:j(_Y({size:e}),t),...n,children:u.jsx("div",{className:"container mx-auto px-4",children:r})}));hE.displayName="ComparisonSection";const mE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-12 text-center",t),...e}));mE.displayName="ComparisonHeader";const gE=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));gE.displayName="ComparisonTitle";const vE=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",t),...e}));vE.displayName="ComparisonDescription";const yE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("overflow-x-auto",t),...e}));yE.displayName="ComparisonTable";const bE=p.forwardRef(({className:t,...e},r)=>u.jsx("table",{ref:r,className:j("w-full border-collapse text-left",t),...e}));bE.displayName="ComparisonTableInner";const xE=p.forwardRef(({className:t,...e},r)=>u.jsx("thead",{ref:r,className:j("",t),...e}));xE.displayName="ComparisonTableHead";const wE=p.forwardRef(({className:t,...e},r)=>u.jsx("tbody",{ref:r,className:j("divide-y divide-border",t),...e}));wE.displayName="ComparisonTableBody";const kE=p.forwardRef(({className:t,...e},r)=>u.jsx("tr",{ref:r,className:j("",t),...e}));kE.displayName="ComparisonTableRow";const zY=ye("px-4 py-4 text-sm font-semibold",{variants:{highlight:{true:"bg-primary/5",false:""}},defaultVariants:{highlight:!1}}),NE=p.forwardRef(({className:t,highlight:e,...r},n)=>u.jsx("th",{ref:n,className:j(zY({highlight:e}),t),...r}));NE.displayName="ComparisonHeaderCell";const BY=ye("px-4 py-4 text-sm",{variants:{highlight:{true:"bg-primary/5",false:""}},defaultVariants:{highlight:!1}}),CE=p.forwardRef(({className:t,highlight:e,...r},n)=>u.jsx("td",{ref:n,className:j(BY({highlight:e}),t),...r}));CE.displayName="ComparisonCell";const SE=p.forwardRef(({className:t,...e},r)=>u.jsx("td",{ref:r,className:j("px-4 py-4 text-sm font-medium text-foreground",t),...e}));SE.displayName="ComparisonFeatureCell";const ME=p.forwardRef(({className:t,...e},r)=>u.jsx("svg",{ref:r,className:j("mx-auto h-5 w-5 text-green-500",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}));ME.displayName="ComparisonCheck";const EE=p.forwardRef(({className:t,...e},r)=>u.jsx("svg",{ref:r,className:j("mx-auto h-5 w-5 text-muted-foreground/40",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}));EE.displayName="ComparisonX";const jE=p.forwardRef(({className:t,...e},r)=>u.jsx("svg",{ref:r,className:j("mx-auto h-5 w-5 text-muted-foreground/40",t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 12H4"})}));jE.displayName="ComparisonMinus";const RE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("text-center",t),...e}));RE.displayName="ComparisonPlanHeader";const TE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("font-heading font-semibold text-foreground",t),...e}));TE.displayName="ComparisonPlanName";const AE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-1 font-heading text-2xl font-bold text-foreground",t),...e}));AE.displayName="ComparisonPlanPrice";const OE=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("tr",{ref:n,className:j("bg-muted/50",t),...r,children:u.jsx("td",{colSpan:100,className:"px-4 py-3 text-sm font-semibold text-foreground",children:e})}));OE.displayName="ComparisonCategory";const Ov=ye("flex w-full gap-2",{variants:{layout:{inline:"flex-row items-center",stacked:"flex-col"},size:{sm:"max-w-sm",default:"max-w-md",lg:"max-w-lg",full:"max-w-full"}},defaultVariants:{layout:"inline",size:"default"}}),DE=p.forwardRef(({className:t,layout:e,size:r,onSubmit:n,placeholder:o="Enter your email",buttonText:s="Subscribe",loading:a=!1,disabled:i=!1,helperText:l,successMessage:c,errorMessage:d,...f},h)=>{const[m,v]=p.useState(""),[g,y]=p.useState("idle"),b=async k=>{if(k.preventDefault(),!(!m||!n)){y("loading");try{await n(m),y("success"),v("")}catch{y("error")}}},x=a||g==="loading",w=i||x;return u.jsxs("div",{className:j("w-full",r!=="full"&&Ov({size:r})),children:[u.jsxs("form",{ref:h,onSubmit:b,className:j(Ov({layout:e,size:"full"}),t),...f,children:[u.jsx(Tk,{type:"email",value:m,onChange:k=>v(k.target.value),placeholder:o,disabled:w,required:!0,className:j(e==="inline"&&"flex-1")}),u.jsx(Ut,{type:"submit",disabled:w,className:j(e==="stacked"&&"w-full"),children:x?u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):s})]}),l&&g==="idle"&&u.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:l}),g==="success"&&c&&u.jsx("p",{className:"mt-2 text-sm text-green-600 dark:text-green-400",children:c}),g==="error"&&d&&u.jsx("p",{className:"mt-2 text-sm text-destructive",children:d})]})});DE.displayName="EmailForm";const $Y=ye("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",primary:"bg-primary text-primary-foreground",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground",dark:"bg-zinc-900 text-white",card:"bg-background"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),IE=p.forwardRef(({className:t,variant:e,size:r,children:n,...o},s)=>{const a=e==="card";return u.jsx("section",{ref:s,className:j($Y({variant:e,size:r}),t),...o,children:u.jsx("div",{className:"container mx-auto px-4",children:a?u.jsx("div",{className:"mx-auto max-w-2xl rounded-2xl border bg-card p-8 shadow-sm md:p-12",children:n}):u.jsx("div",{className:"mx-auto max-w-2xl text-center",children:n})})})});IE.displayName="Newsletter";const PE=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("div",{ref:n,className:j("mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",t),...r,children:e||u.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}));PE.displayName="NewsletterIcon";const LE=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-2xl font-bold tracking-tight sm:text-3xl",t),...e}));LE.displayName="NewsletterTitle";const FE=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-4 text-lg opacity-90",t),...e}));FE.displayName="NewsletterDescription";const _E=p.forwardRef(({className:t,...e},r)=>u.jsx("form",{ref:r,className:j("mt-8 flex flex-col gap-3 sm:flex-row sm:gap-4",t),...e}));_E.displayName="NewsletterForm";const zE=p.forwardRef(({className:t,...e},r)=>u.jsx("input",{ref:r,type:"email",className:j("flex-1 rounded-lg border border-input bg-background px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",t),...e}));zE.displayName="NewsletterInput";const BE=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-4 text-xs opacity-70",t),...e}));BE.displayName="NewsletterDisclaimer";const $E=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-8 flex items-center justify-center gap-2 text-green-500",t),...e}));$E.displayName="NewsletterSuccess";const HY=ye("w-full",{variants:{size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{size:"default"}}),HE=p.forwardRef(({className:t,size:e,children:r,...n},o)=>u.jsx("section",{ref:o,className:j(HY({size:e}),t),...n,children:u.jsx("div",{className:"container mx-auto px-4",children:r})}));HE.displayName="ContactSection";const VE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("grid gap-12 lg:grid-cols-2",t),...e}));VE.displayName="ContactContent";const WE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-8",t),...e}));WE.displayName="ContactInfo";const UE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-4",t),...e}));UE.displayName="ContactHeader";const GE=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("text-3xl font-bold tracking-tight text-foreground sm:text-4xl",t),...e}));GE.displayName="ContactTitle";const qE=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-lg text-muted-foreground",t),...e}));qE.displayName="ContactDescription";const KE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-4",t),...e}));KE.displayName="ContactDetails";const YE=p.forwardRef(({className:t,icon:e,label:r,value:n,href:o,...s},a)=>u.jsxs("div",{ref:a,className:j("flex items-start gap-4",t),...s,children:[e&&u.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:r}),o?u.jsx("a",{href:o,className:"text-foreground hover:text-primary hover:underline",children:n}):u.jsx("p",{className:"text-foreground",children:n})]})]}));YE.displayName="ContactDetailItem";const JE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex gap-4",t),...e}));JE.displayName="ContactSocials";const XE=p.forwardRef(({className:t,label:e,children:r,...n},o)=>u.jsx("a",{ref:o,"aria-label":e,className:j("flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground transition-colors hover:bg-primary hover:text-primary-foreground",t),...n,children:r}));XE.displayName="ContactSocialLink";const VY=ye("space-y-6",{variants:{variant:{default:"",card:"rounded-xl border bg-card p-6 shadow-sm md:p-8"}},defaultVariants:{variant:"default"}}),ZE=p.forwardRef(({className:t,variant:e,...r},n)=>u.jsx("form",{ref:n,className:j(VY({variant:e}),t),...r}));ZE.displayName="ContactForm";const QE=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("grid gap-4 sm:grid-cols-2",t),...e}));QE.displayName="ContactFormRow";const ej=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-2",t),...e}));ej.displayName="ContactFormField";const tj=p.forwardRef(({className:t,required:e,children:r,...n},o)=>u.jsxs("label",{ref:o,className:j("text-sm font-medium text-foreground",t),...n,children:[r,e&&u.jsx("span",{className:"ml-1 text-red-500",children:"*"})]}));tj.displayName="ContactFormLabel";const rj=p.forwardRef(({className:t,...e},r)=>u.jsx("input",{ref:r,className:j("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));rj.displayName="ContactFormInput";const nj=p.forwardRef(({className:t,...e},r)=>u.jsx("textarea",{ref:r,className:j("flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));nj.displayName="ContactFormTextarea";const oj=p.forwardRef(({className:t,...e},r)=>u.jsx("select",{ref:r,className:j("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e}));oj.displayName="ContactFormSelect";const sj=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-sm text-red-500",t),...e}));sj.displayName="ContactFormError";const aj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex items-center gap-2 rounded-lg bg-green-50 p-4 text-green-700",t),...e}));aj.displayName="ContactFormSuccess";const ij=p.forwardRef(({className:t,logo:e,items:r=[],actions:n,sticky:o=!1,transparent:s=!1,mobileBreakpoint:a="md",...i},l)=>{const[c,d]=p.useState(!1),f={sm:{desktop:"hidden sm:flex",mobile:"sm:hidden"},md:{desktop:"hidden md:flex",mobile:"md:hidden"},lg:{desktop:"hidden lg:flex",mobile:"lg:hidden"}},h=(m,v=!1)=>{const g=v?"block w-full px-4 py-2 text-base font-medium text-foreground hover:bg-accent hover:text-accent-foreground rounded-md transition-colors":"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors";return m.href?u.jsx("a",{href:m.href,className:j(g,m.active&&(v?"bg-accent":"text-foreground")),onClick:()=>v&&d(!1),children:m.label},m.label):u.jsx("button",{onClick:()=>{var y;(y=m.onClick)==null||y.call(m),v&&d(!1)},className:j(g,"cursor-pointer text-left",m.active&&(v?"bg-accent":"text-foreground")),children:m.label},m.label)};return u.jsx("header",{ref:l,className:j("w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",o&&"sticky top-0 z-50",s&&"border-transparent bg-transparent",t),...i,children:u.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-4",children:[u.jsx("div",{className:"flex items-center",children:e}),u.jsx("nav",{className:j("items-center gap-6",f[a].desktop),children:r.map(m=>h(m))}),u.jsx("div",{className:j("items-center gap-4",f[a].desktop),children:n}),u.jsx("div",{className:f[a].mobile,children:u.jsxs(sN,{open:c,onOpenChange:d,children:[u.jsx(aN,{asChild:!0,children:u.jsxs(Ut,{variant:"ghost",size:"icon",children:[u.jsx(fA,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle menu"})]})}),u.jsx(yp,{side:"right",className:"w-[300px] sm:w-[400px]",children:u.jsxs("div",{className:"flex flex-col gap-6 pt-6",children:[u.jsx("nav",{className:"flex flex-col gap-2",children:r.map(m=>h(m,!0))}),n&&u.jsx("div",{className:"flex flex-col gap-2 border-t pt-6",children:n})]})})]})})]})})});ij.displayName="HeaderNavigation";const WY=ye("w-full border-t bg-background",{variants:{size:{sm:"py-8",default:"py-12",lg:"py-16"}},defaultVariants:{size:"default"}}),lj=p.forwardRef(({className:t,size:e,children:r,...n},o)=>u.jsx("footer",{ref:o,className:j(WY({size:e}),t),...n,children:u.jsx("div",{className:"container mx-auto px-4",children:r})}));lj.displayName="Footer";const cj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("grid gap-8 md:grid-cols-2 lg:grid-cols-4",t),...e}));cj.displayName="FooterContent";const dj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-4",t),...e}));dj.displayName="FooterSection";const uj=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-sm font-semibold uppercase tracking-wider text-foreground",t),...e}));uj.displayName="FooterTitle";const fj=p.forwardRef(({className:t,...e},r)=>u.jsx("ul",{ref:r,className:j("space-y-2",t),...e}));fj.displayName="FooterLinks";const pj=p.forwardRef(({className:t,...e},r)=>u.jsx("li",{children:u.jsx("a",{ref:r,className:j("text-sm text-muted-foreground transition-colors hover:text-foreground",t),...e})}));pj.displayName="FooterLink";const hj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-8 flex flex-col items-center justify-between gap-4 border-t pt-8 md:flex-row",t),...e}));hj.displayName="FooterBottom";const mj=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-sm text-muted-foreground",t),...e}));mj.displayName="FooterCopyright";const gj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex items-center gap-4",t),...e}));gj.displayName="FooterSocial";const vj=p.forwardRef(({className:t,label:e,children:r,...n},o)=>u.jsx("a",{ref:o,"aria-label":e,className:j("text-muted-foreground transition-colors hover:text-foreground",t),...n,children:r}));vj.displayName="FooterSocialLink";const UY=ye("relative w-full px-4 py-2 text-center text-sm font-medium",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",muted:"bg-muted text-muted-foreground",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-black",error:"bg-red-500 text-white",gradient:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 text-white",dark:"bg-zinc-900 text-white"},size:{sm:"py-1.5 text-xs",default:"py-2 text-sm",lg:"py-3 text-base"}},defaultVariants:{variant:"default",size:"default"}}),Fc=p.forwardRef(({className:t,variant:e,size:r,dismissible:n=!0,onDismiss:o,isVisible:s=!0,href:a,icon:i,children:l,...c},d)=>{const[f,h]=p.useState(s);if(p.useEffect(()=>{h(s)},[s]),!f)return null;const m=()=>{h(!1),o==null||o()},v=u.jsxs(u.Fragment,{children:[i&&u.jsx("span",{className:"mr-2 inline-flex",children:i}),l]});return u.jsx("div",{ref:d,className:j(UY({variant:e,size:r}),t),role:"banner",...c,children:u.jsxs("div",{className:"container mx-auto flex items-center justify-center",children:[a?u.jsxs("a",{href:a,className:"flex items-center hover:underline",children:[v,u.jsx("svg",{className:"ml-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}):u.jsx("span",{className:"flex items-center",children:v}),n&&u.jsx("button",{onClick:m,className:"absolute right-4 top-1/2 -translate-y-1/2 rounded-full p-1 opacity-70 transition-opacity hover:opacity-100","aria-label":"Dismiss announcement",children:u.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})})});Fc.displayName="AnnouncementBar";const yj=p.forwardRef(({messages:t,interval:e=5e3,className:r,variant:n,size:o,dismissible:s,onDismiss:a,icon:i,...l},c)=>{const[d,f]=p.useState(0);p.useEffect(()=>{if(t.length<=1)return;const m=setInterval(()=>{f(v=>(v+1)%t.length)},e);return()=>clearInterval(m)},[t.length,e]);const h=t[d];return u.jsx(Fc,{ref:c,className:r,variant:n,size:o,dismissible:s,onDismiss:a,href:h==null?void 0:h.href,icon:i,...l,children:u.jsx("span",{className:"animate-fade-in",children:h==null?void 0:h.text})})});yj.displayName="RotatingAnnouncementBar";const bj=p.forwardRef(({targetDate:t,prefix:e="Sale ends in",suffix:r,onComplete:n,className:o,variant:s,size:a,dismissible:i,onDismiss:l,href:c,icon:d,...f},h)=>{const[m,v]=p.useState("");return p.useEffect(()=>{const g=()=>{const b=t.getTime()-new Date().getTime();if(b<=0)return n==null||n(),"00:00:00";const x=Math.floor(b/(1e3*60*60)),w=Math.floor(b/(1e3*60)%60),k=Math.floor(b/1e3%60);return`${String(x).padStart(2,"0")}:${String(w).padStart(2,"0")}:${String(k).padStart(2,"0")}`};v(g());const y=setInterval(()=>{v(g())},1e3);return()=>clearInterval(y)},[t,n]),u.jsxs(Fc,{ref:h,className:o,variant:s,size:a,dismissible:i,onDismiss:l,href:c,icon:d,...f,children:[e," ",u.jsx("span",{className:"mx-2 font-mono font-bold",children:m}),r]})});bj.displayName="CountdownAnnouncementBar";const GY=ye("grid gap-6",{variants:{columns:{2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:3}}),xj=p.forwardRef(({className:t,columns:e,options:r,...n},o)=>u.jsx("div",{ref:o,className:j(GY({columns:e}),t),...n,children:r.map(s=>u.jsx(Mh,{option:s},s.id))}));xj.displayName="PricingOptions";const Mh=p.forwardRef(({option:t},e)=>u.jsxs(Ef,{ref:e,className:j("relative flex flex-col",t.highlighted&&"border-primary shadow-lg scale-105"),children:[t.highlighted&&t.highlightLabel&&u.jsx(Kd,{className:"absolute -top-3 left-1/2 -translate-x-1/2",variant:"default",children:t.highlightLabel}),u.jsxs(a0,{className:"text-center",children:[u.jsx(i0,{className:"text-xl",children:t.name}),t.description&&u.jsx(l0,{children:t.description}),u.jsxs("div",{className:"mt-4",children:[t.originalPrice&&u.jsx("span",{className:"mr-2 text-lg text-muted-foreground line-through",children:typeof t.originalPrice=="number"?`$${t.originalPrice}`:t.originalPrice}),u.jsx("span",{className:"font-heading text-4xl font-bold",children:typeof t.price=="number"?`$${t.price}`:t.price}),t.period&&u.jsxs("span",{className:"text-muted-foreground",children:["/",t.period]})]})]}),u.jsx(jf,{className:"flex-1",children:u.jsx("ul",{className:"space-y-3",children:t.features.map((r,n)=>u.jsxs("li",{className:"flex items-start gap-3",children:[u.jsx(zy,{className:"h-5 w-5 shrink-0 text-primary"}),u.jsx("span",{className:"text-sm text-muted-foreground",children:r})]},n))})}),u.jsx(c0,{children:u.jsx(Ut,{className:"w-full",variant:t.buttonVariant??(t.highlighted?"default":"outline"),disabled:t.disabled,onClick:t.onSelect,children:t.buttonText??"Get Started"})})]}));Mh.displayName="PricingCard";const wj=p.forwardRef(({className:t,plans:e,features:r,featureGroupTitle:n="Features",...o},s)=>{const a=i=>typeof i=="boolean"?i?u.jsx(zy,{className:"mx-auto h-5 w-5 text-green-500"}):u.jsx(hA,{className:"mx-auto h-5 w-5 text-muted-foreground/40"}):u.jsx("span",{className:"text-sm",children:i});return u.jsx("div",{ref:s,className:j("w-full overflow-auto",t),...o,children:u.jsxs(wM,{children:[u.jsx(kM,{children:u.jsxs(ef,{children:[u.jsx(tf,{className:"w-[200px]",children:n}),e.map(i=>u.jsx(tf,{className:j("text-center",i.highlighted&&"bg-primary/5"),children:u.jsxs("div",{className:"flex flex-col gap-1",children:[i.highlighted&&u.jsx("span",{className:"text-xs font-medium text-primary",children:"Most Popular"}),u.jsx("span",{className:"font-heading text-lg font-semibold text-foreground",children:i.name}),u.jsxs("div",{className:"font-heading text-2xl font-bold text-foreground",children:[typeof i.price=="number"?`$${i.price}`:i.price,i.period&&u.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:["/",i.period]})]}),i.description&&u.jsx("span",{className:"text-xs text-muted-foreground",children:i.description})]})},i.id))]})}),u.jsx(NM,{children:r.map((i,l)=>u.jsxs(ef,{children:[u.jsx(rf,{className:"font-medium",children:i.name}),e.map(c=>u.jsx(rf,{className:j("text-center",c.highlighted&&"bg-primary/5"),children:a(i.values[c.id]??!1)},c.id))]},l))})]})})});wj.displayName="PricingTable";const qY=ye("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{columns:3}}),kj=p.forwardRef(({className:t,columns:e,...r},n)=>u.jsx("div",{ref:n,className:j(qY({columns:e}),t),...r}));kj.displayName="BlogGrid";const KY=ye("group flex flex-col overflow-hidden rounded-lg transition-shadow",{variants:{variant:{default:"bg-card",bordered:"border bg-card hover:shadow-md",elevated:"bg-card shadow-sm hover:shadow-lg",minimal:"bg-transparent"}},defaultVariants:{variant:"bordered"}}),Nj=p.forwardRef(({className:t,variant:e,href:r,children:n,...o},s)=>{const a=r?"a":"article";return u.jsx(a,{ref:s,href:r,className:j(KY({variant:e}),t),...o,children:n})});Nj.displayName="BlogCard";const Cj=p.forwardRef(({className:t,aspectRatio:e="video",alt:r,...n},o)=>u.jsx("div",{ref:o,className:j("relative overflow-hidden bg-muted",e==="video"&&"aspect-video",e==="square"&&"aspect-square",e==="wide"&&"aspect-[2/1]",t),children:n.src&&u.jsx("img",{alt:r,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",...n})}));Cj.displayName="BlogCardImage";const Sj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-1 flex-col p-4 md:p-6",t),...e}));Sj.displayName="BlogCardContent";const Mj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",t),...e}));Mj.displayName="BlogCardMeta";const Ej=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("inline-flex items-center rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary",t),...e}));Ej.displayName="BlogCardCategory";const jj=p.forwardRef(({className:t,...e},r)=>u.jsx("time",{ref:r,className:j("text-muted-foreground",t),...e}));jj.displayName="BlogCardDate";const Rj=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("text-muted-foreground",t),...e}));Rj.displayName="BlogCardReadTime";const Tj=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-lg font-semibold leading-tight text-foreground transition-colors group-hover:text-primary",t),...e}));Tj.displayName="BlogCardTitle";const Aj=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-2 line-clamp-2 text-sm text-muted-foreground",t),...e}));Aj.displayName="BlogCardExcerpt";const Oj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-auto flex items-center gap-3 pt-4",t),...e}));Oj.displayName="BlogCardFooter";const Dj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex items-center gap-3",t),...e}));Dj.displayName="BlogCardAuthor";const Ij=p.forwardRef(({className:t,alt:e,fallback:r,...n},o)=>u.jsx("div",{ref:o,className:j("h-8 w-8 overflow-hidden rounded-full bg-muted",t),children:n.src?u.jsx("img",{alt:e,className:"h-full w-full object-cover",...n}):u.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm font-medium text-muted-foreground",children:r||(e==null?void 0:e.charAt(0).toUpperCase())})}));Ij.displayName="BlogCardAuthorAvatar";const Pj=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("text-sm font-medium text-foreground",t),...e}));Pj.displayName="BlogCardAuthorName";const Lj=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs("span",{ref:n,className:j("ml-auto inline-flex items-center gap-1 text-sm font-medium text-primary transition-colors group-hover:underline",t),...r,children:[e||"Read more",u.jsx("svg",{className:"h-4 w-4 transition-transform group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}));Lj.displayName="BlogCardLink";const Fj=p.forwardRef(({className:t,href:e,children:r,...n},o)=>{const s=e?"a":"article";return u.jsx(s,{ref:o,href:e,className:j("group grid overflow-hidden rounded-lg border bg-card md:grid-cols-2",t),...n,children:r})});Fj.displayName="BlogCardFeatured";const YY=ye("grid gap-4",{variants:{columns:{2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",auto:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}},defaultVariants:{columns:"auto"}}),_j=p.forwardRef(({className:t,columns:e,...r},n)=>u.jsx("div",{ref:n,className:j(YY({columns:e}),t),...r}));_j.displayName="BentoGrid";const JY=ye("group relative overflow-hidden rounded-xl border bg-card p-6 transition-all",{variants:{variant:{default:"hover:shadow-lg",ghost:"border-transparent bg-muted/50 hover:bg-muted",gradient:"border-transparent bg-gradient-to-br from-primary/10 to-primary/5"},size:{default:"",lg:"p-8"},span:{1:"col-span-1",2:"col-span-1 md:col-span-2",3:"col-span-1 md:col-span-2 lg:col-span-3",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-1 md:row-span-2"}},defaultVariants:{variant:"default",size:"default",span:1,rowSpan:1}}),zj=p.forwardRef(({className:t,variant:e,size:r,span:n,rowSpan:o,href:s,children:a,...i},l)=>{const c=u.jsx("div",{ref:l,className:j(JY({variant:e,size:r,span:n,rowSpan:o}),t),...i,children:a});return s?u.jsx("a",{href:s,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:c}):c});zj.displayName="BentoCard";const Bj=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("div",{ref:n,className:j("mb-4 inline-flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary",t),...r,children:e}));Bj.displayName="BentoCardIcon";const $j=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-lg font-semibold text-foreground transition-colors group-hover:text-primary",t),...e}));$j.displayName="BentoCardTitle";const Hj=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-2 text-sm text-muted-foreground",t),...e}));Hj.displayName="BentoCardDescription";const Vj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-4",t),...e}));Vj.displayName="BentoCardContent";const Wj=p.forwardRef(({className:t,src:e,alt:r,children:n,...o},s)=>u.jsx("div",{ref:s,className:j("absolute inset-0 -z-10 opacity-10 transition-opacity group-hover:opacity-20",t),...o,children:e?u.jsx("img",{src:e,alt:r||"",className:"h-full w-full object-cover"}):n}));Wj.displayName="BentoCardImage";const Uj=p.forwardRef(({className:t,...e},r)=>u.jsx("span",{ref:r,className:j("absolute right-4 top-4 inline-flex items-center rounded-full bg-primary px-2.5 py-0.5 text-xs font-medium text-primary-foreground",t),...e}));Uj.displayName="BentoCardBadge";const Gj=p.forwardRef(({className:t,children:e,...r},n)=>u.jsxs("div",{ref:n,className:j("mt-4 inline-flex items-center gap-1 text-sm font-medium text-primary transition-colors",t),...r,children:[e||"Learn more",u.jsx("svg",{className:"h-4 w-4 transition-transform group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}));Gj.displayName="BentoCardLink";const qj=p.forwardRef(({className:t,layout:e="default",...r},n)=>{const o={default:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",asymmetric:"grid-cols-1 md:grid-cols-3 lg:grid-cols-4",featured:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 auto-rows-[minmax(200px,1fr)]"};return u.jsx("div",{ref:n,className:j("grid gap-4",o[e],t),...r})});qj.displayName="BentoGridPreset";const XY=ye("flex items-center gap-3",{variants:{size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{size:"default"}}),Kj=p.forwardRef(({className:t,size:e,...r},n)=>u.jsx("div",{ref:n,className:j(XY({size:e}),t),...r}));Kj.displayName="SocialProof";const Yj=p.forwardRef(({className:t,max:e=5,total:r,size:n="default",children:o,...s},a)=>{const i={sm:"h-6 w-6 -ml-2 first:ml-0",default:"h-8 w-8 -ml-3 first:ml-0",lg:"h-10 w-10 -ml-4 first:ml-0"},l=p.Children.toArray(o),c=l.slice(0,e),d=r?r-e:l.length-e;return u.jsxs("div",{ref:a,className:j("flex items-center",t),...s,children:[c.map((f,h)=>u.jsx("div",{className:j("relative inline-block overflow-hidden rounded-full border-2 border-background bg-muted",i[n]),style:{zIndex:e-h},children:f},h)),d>0&&u.jsxs("div",{className:j("relative inline-flex items-center justify-center rounded-full border-2 border-background bg-muted text-xs font-medium text-muted-foreground",i[n]),children:["+",d]})]})});Yj.displayName="AvatarStack";const Jj=p.forwardRef(({className:t,rating:e,reviewCount:r,size:n="default",showValue:o=!0,...s},a)=>{const i={sm:"h-3 w-3",default:"h-4 w-4",lg:"h-5 w-5"},l=Math.floor(e),c=e%1>=.5,d=5-l-(c?1:0);return u.jsxs("div",{ref:a,className:j("flex items-center gap-1",t),...s,children:[u.jsxs("div",{className:"flex gap-0.5",children:[Array.from({length:l}).map((f,h)=>u.jsx("svg",{className:j(i[n],"text-yellow-400"),fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})},`full-${h}`)),c&&u.jsxs("svg",{className:j(i[n],"text-yellow-400"),fill:"currentColor",viewBox:"0 0 24 24",children:[u.jsx("defs",{children:u.jsxs("linearGradient",{id:"half-star",children:[u.jsx("stop",{offset:"50%",stopColor:"currentColor"}),u.jsx("stop",{offset:"50%",stopColor:"#e5e7eb"})]})}),u.jsx("path",{fill:"url(#half-star)",d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})]}),Array.from({length:d}).map((f,h)=>u.jsx("svg",{className:j(i[n],"text-gray-200"),fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})},`empty-${h}`))]}),o&&u.jsx("span",{className:"font-medium",children:e.toFixed(1)}),r!==void 0&&u.jsxs("span",{className:"text-muted-foreground",children:["(",r.toLocaleString()," reviews)"]})]})});Jj.displayName="StarRating";const Xj=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-wrap items-center gap-4",t),...e}));Xj.displayName="TrustBadges";const Zj=p.forwardRef(({className:t,icon:e,label:r,...n},o)=>u.jsxs("div",{ref:o,className:j("flex items-center gap-2 text-sm text-muted-foreground",t),...n,children:[e||u.jsx("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),u.jsx("span",{children:r})]}));Zj.displayName="TrustBadge";const Qj=p.forwardRef(({className:t,count:e,label:r="happy customers",size:n="default",...o},s)=>{const a={sm:"text-sm",default:"text-base",lg:"text-lg"};return u.jsxs("div",{ref:s,className:j("flex items-center gap-2",a[n],t),...o,children:[u.jsxs("span",{className:"font-bold",children:[e.toLocaleString(),"+"]}),u.jsx("span",{className:"text-muted-foreground",children:r})]})});Qj.displayName="CustomerCount";const eR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-wrap items-center justify-center gap-6 border-y bg-muted/50 py-4 md:gap-12",t),...e}));eR.displayName="SocialProofBanner";const tR=p.forwardRef(({className:t,title:e="Featured in",children:r,...n},o)=>u.jsxs("div",{ref:o,className:j("text-center",t),...n,children:[u.jsx("p",{className:"mb-6 text-sm font-medium uppercase tracking-wider text-muted-foreground",children:e}),u.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 opacity-60 grayscale",children:r})]}));tR.displayName="FeaturedIn";const Eh=ye("relative overflow-hidden bg-black",{variants:{rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},aspectRatio:{video:"aspect-video",square:"aspect-square","4/3":"aspect-[4/3]","21/9":"aspect-[21/9]",auto:""}},defaultVariants:{rounded:"lg",aspectRatio:"video"}}),jh=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,src:o,poster:s,showControls:a=!0,showPlayButton:i=!0,autoPlay:l=!1,muted:c=!1,loop:d=!1,playsInline:f=!0,...h},m)=>{const v=p.useRef(null),[g,y]=p.useState(l),[b,x]=p.useState(!l),w=p.useCallback(C=>{v.current=C,typeof m=="function"?m(C):m&&(m.current=C)},[m]),k=()=>{v.current&&(v.current.play(),y(!0),x(!1))},N=()=>{v.current&&(v.current.pause(),y(!1))},S=()=>{g?N():k()};return u.jsxs("div",{className:j(Eh({rounded:r,aspectRatio:n}),e),children:[u.jsx("video",{ref:w,src:o,poster:s,autoPlay:l,muted:c,loop:d,playsInline:f,controls:a&&g,onClick:S,onEnded:()=>y(!1),className:j("h-full w-full object-cover",t),...h}),i&&b&&u.jsx("button",{onClick:k,className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity hover:bg-black/40","aria-label":"Play video",children:u.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-white/90 text-black shadow-lg transition-transform hover:scale-110 md:h-20 md:w-20",children:u.jsx("svg",{className:"ml-1 h-8 w-8 md:h-10 md:w-10",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M8 5v14l11-7z"})})})})]})});jh.displayName="VideoPlayer";const rR=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,videoId:o,autoPlay:s=!1,title:a="YouTube video",...i},l)=>{const[c,d]=p.useState(!1);return u.jsxs("div",{className:j(Eh({rounded:r,aspectRatio:n}),e),children:[!c&&u.jsx("button",{onClick:()=>d(!0),className:"absolute inset-0 flex items-center justify-center",style:{backgroundImage:`url(https://img.youtube.com/vi/${o}/maxresdefault.jpg)`,backgroundSize:"cover",backgroundPosition:"center"},"aria-label":"Play YouTube video",children:u.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-red-600 text-white shadow-lg transition-transform hover:scale-110 md:h-20 md:w-20",children:u.jsx("svg",{className:"ml-1 h-8 w-8 md:h-10 md:w-10",fill:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M8 5v14l11-7z"})})})}),c&&u.jsx("iframe",{ref:l,src:`https://www.youtube.com/embed/${o}?autoplay=${s?1:0}&rel=0`,title:a,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:j("h-full w-full",t),...i})]})});rR.displayName="YouTubeEmbed";const nR=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,videoId:o,autoPlay:s=!1,title:a="Vimeo video",...i},l)=>u.jsx("div",{className:j(Eh({rounded:r,aspectRatio:n}),e),children:u.jsx("iframe",{ref:l,src:`https://player.vimeo.com/video/${o}?autoplay=${s?1:0}`,title:a,allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,className:j("h-full w-full",t),...i})}));nR.displayName="VimeoEmbed";const oR=p.forwardRef(({src:t,isOpen:e,onClose:r,title:n="Video"},o)=>(p.useEffect(()=>{const s=a=>{a.key==="Escape"&&r()};return e&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow=""}},[e,r]),e?u.jsx("div",{ref:o,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:r,children:u.jsxs("div",{className:"relative w-full max-w-4xl",onClick:s=>s.stopPropagation(),children:[u.jsx("button",{onClick:r,className:"absolute -top-12 right-0 text-white hover:text-gray-300","aria-label":"Close video",children:u.jsx("svg",{className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),u.jsx(jh,{src:t,autoPlay:!0,showPlayButton:!1,className:"w-full"})]})}):null));oR.displayName="VideoModal";const Rh=ye("relative overflow-hidden bg-muted",{variants:{rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},aspectRatio:{auto:"",video:"aspect-video",square:"aspect-square","4/3":"aspect-[4/3]","3/2":"aspect-[3/2]"}},defaultVariants:{rounded:"lg",aspectRatio:"video"}}),sR=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,apiKey:o,query:s,zoom:a=15,mapType:i="roadmap",title:l="Google Map",...c},d)=>{const f=encodeURIComponent(s),h=o?`https://www.google.com/maps/embed/v1/place?key=${o}&q=${f}&zoom=${a}&maptype=${i}`:`https://maps.google.com/maps?q=${f}&t=&z=${a}&ie=UTF8&iwloc=&output=embed`;return u.jsx("div",{className:j(Rh({rounded:r,aspectRatio:n}),e),children:u.jsx("iframe",{ref:d,src:h,title:l,allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",className:j("h-full w-full border-0",t),...c})})});sR.displayName="GoogleMapEmbed";const aR=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,lat:o,lng:s,zoom:a=15,marker:i,title:l="OpenStreetMap",...c},d)=>{const f=ZY(o,s,a),h=i?`&marker=${o}%2C${s}`:"",m=`https://www.openstreetmap.org/export/embed.html?bbox=${f.west}%2C${f.south}%2C${f.east}%2C${f.north}&layer=mapnik${h}`;return u.jsx("div",{className:j(Rh({rounded:r,aspectRatio:n}),e),children:u.jsx("iframe",{ref:d,src:m,title:l,loading:"lazy",className:j("h-full w-full border-0",t),...c})})});aR.displayName="OpenStreetMapEmbed";function ZY(t,e,r){const n=.01*(20-r);return{west:e-n,east:e+n,north:t+n,south:t-n}}const iR=p.forwardRef(({className:t,containerClassName:e,rounded:r,aspectRatio:n,lat:o,lng:s,zoom:a=15,width:i=600,height:l=400,alt:c="Map",...d},f)=>{const h=Math.floor((s+180)/360*Math.pow(2,a)),m=Math.floor((1-Math.log(Math.tan(o*Math.PI/180)+1/Math.cos(o*Math.PI/180))/Math.PI)/2*Math.pow(2,a)),v=`https://tile.openstreetmap.org/${a}/${h}/${m}.png`;return u.jsx("div",{className:j(Rh({rounded:r,aspectRatio:n}),e),children:u.jsx("img",{ref:f,src:v,alt:c,className:j("h-full w-full object-cover",t),...d})})});iR.displayName="StaticMap";const lR=p.forwardRef(({className:t,address:e,phone:r,email:n,hours:o,directionsUrl:s,children:a,...i},l)=>u.jsxs("div",{ref:l,className:j("relative",t),...i,children:[a,u.jsx("div",{className:"absolute bottom-4 left-4 right-4 rounded-lg border bg-card p-4 shadow-lg sm:left-auto sm:right-4 sm:max-w-xs",children:u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsxs("svg",{className:"mt-0.5 h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),u.jsx("p",{className:"text-sm text-foreground",children:e})]}),r&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),u.jsx("a",{href:`tel:${r}`,className:"text-sm text-foreground hover:underline",children:r})]}),n&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),u.jsx("a",{href:`mailto:${n}`,className:"text-sm text-foreground hover:underline",children:n})]}),o&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("svg",{className:"h-5 w-5 shrink-0 text-muted-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),u.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),s&&u.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex w-full items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Get Directions",u.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})})]}));lR.displayName="MapWithInfo";const QY=ye("w-full",{variants:{variant:{default:"bg-background",muted:"bg-muted/50",dark:"bg-zinc-900 text-white",gradient:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground"},size:{sm:"py-12",default:"py-16",lg:"py-24"}},defaultVariants:{variant:"default",size:"default"}}),cR=p.forwardRef(({className:t,variant:e,size:r,children:n,...o},s)=>u.jsx("section",{ref:s,className:j(QY({variant:e,size:r}),t),...o,children:u.jsx("div",{className:"container mx-auto px-4",children:n})}));cR.displayName="AppDownloadSection";const dR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("grid items-center gap-8 md:grid-cols-2 md:gap-12",t),...e}));dR.displayName="AppDownloadContent";const uR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-6",t),...e}));uR.displayName="AppDownloadInfo";const fR=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-3xl font-bold tracking-tight sm:text-4xl",t),...e}));fR.displayName="AppDownloadTitle";const pR=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-lg opacity-90",t),...e}));pR.displayName="AppDownloadDescription";const hR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-wrap gap-4",t),...e}));hR.displayName="AppDownloadButtons";const mR=ye("inline-flex items-center gap-3 rounded-lg px-4 py-3 transition-transform hover:scale-105",{variants:{variant:{apple:"bg-black text-white",google:"bg-black text-white",custom:""}},defaultVariants:{variant:"apple"}}),gR=p.forwardRef(({className:t,variant:e,href:r,...n},o)=>u.jsxs("a",{ref:o,href:r,target:"_blank",rel:"noopener noreferrer",className:j(mR({variant:e}),t),...n,children:[u.jsx("svg",{className:"h-8 w-8",viewBox:"0 0 24 24",fill:"currentColor",children:u.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),u.jsxs("div",{className:"text-left",children:[u.jsx("div",{className:"text-xs opacity-80",children:"Download on the"}),u.jsx("div",{className:"text-lg font-semibold leading-tight",children:"App Store"})]})]}));gR.displayName="AppStoreBadge";const vR=p.forwardRef(({className:t,href:e,...r},n)=>u.jsxs("a",{ref:n,href:e,target:"_blank",rel:"noopener noreferrer",className:j(mR({variant:"google"}),t),...r,children:[u.jsx("svg",{className:"h-8 w-8",viewBox:"0 0 24 24",fill:"currentColor",children:u.jsx("path",{d:"M3 20.5v-17c0-.59.34-1.11.84-1.35L13.69 12l-9.85 9.85c-.5-.25-.84-.76-.84-1.35m13.81-5.38L6.05 21.34l8.49-8.49 2.27 2.27m3.35-4.31c.34.27.59.69.59 1.19s-.22.9-.57 1.18l-2.29 1.32-2.5-2.5 2.5-2.5 2.27 1.31M6.05 2.66l10.76 6.22-2.27 2.27-8.49-8.49z"})}),u.jsxs("div",{className:"text-left",children:[u.jsx("div",{className:"text-xs opacity-80",children:"Get it on"}),u.jsx("div",{className:"text-lg font-semibold leading-tight",children:"Google Play"})]})]}));vR.displayName="GooglePlayBadge";const yR=p.forwardRef(({className:t,children:e,...r},n)=>u.jsx("div",{ref:n,className:j("flex justify-center",t),...r,children:e}));yR.displayName="AppDownloadMockup";const bR=p.forwardRef(({className:t,screenshot:e,alt:r="App screenshot",children:n,...o},s)=>u.jsxs("div",{ref:s,className:j("relative mx-auto h-[500px] w-[250px] rounded-[2.5rem] border-[8px] border-gray-800 bg-gray-800 shadow-xl",t),...o,children:[u.jsx("div",{className:"absolute left-1/2 top-0 z-10 h-6 w-24 -translate-x-1/2 rounded-b-xl bg-gray-800"}),u.jsx("div",{className:"h-full w-full overflow-hidden rounded-[2rem] bg-white",children:e?u.jsx("img",{src:e,alt:r,className:"h-full w-full object-cover"}):n}),u.jsx("div",{className:"absolute -left-[10px] top-24 h-8 w-1 rounded-l bg-gray-800"}),u.jsx("div",{className:"absolute -left-[10px] top-36 h-14 w-1 rounded-l bg-gray-800"}),u.jsx("div",{className:"absolute -left-[10px] top-52 h-14 w-1 rounded-l bg-gray-800"}),u.jsx("div",{className:"absolute -right-[10px] top-32 h-16 w-1 rounded-r bg-gray-800"})]}));bR.displayName="PhoneMockup";const xR=p.forwardRef(({className:t,label:e="Scan to download",children:r,...n},o)=>u.jsxs("div",{ref:o,className:j("text-center",t),...n,children:[u.jsx("div",{className:"mx-auto mb-2 h-32 w-32 rounded-lg border bg-white p-2",children:r}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e})]}));xR.displayName="AppQRCode";const eJ=ye("inline-block bg-clip-text text-transparent",{variants:{gradient:{primary:"bg-gradient-to-r from-primary to-primary/60",secondary:"bg-gradient-to-r from-secondary to-secondary/60",rainbow:"bg-gradient-to-r from-red-500 via-yellow-500 via-green-500 via-blue-500 to-purple-500",sunset:"bg-gradient-to-r from-orange-500 via-pink-500 to-purple-500",ocean:"bg-gradient-to-r from-cyan-500 via-blue-500 to-indigo-500",forest:"bg-gradient-to-r from-green-500 via-emerald-500 to-teal-500",fire:"bg-gradient-to-r from-yellow-500 via-orange-500 to-red-500",aurora:"bg-gradient-to-r from-green-400 via-cyan-500 to-purple-500",neon:"bg-gradient-to-r from-pink-500 via-purple-500 to-cyan-500",gold:"bg-gradient-to-r from-yellow-400 via-amber-500 to-orange-500",silver:"bg-gradient-to-r from-slate-300 via-slate-400 to-slate-500",custom:""},animate:{none:"",shimmer:"animate-gradient-shimmer bg-[length:200%_auto]",pulse:"animate-pulse"}},defaultVariants:{gradient:"primary",animate:"none"}});function Th({className:t,gradient:e,animate:r,customGradient:n,as:o="span",...s}){return u.jsx(o,{className:j(eJ({gradient:e,animate:r}),e==="custom"&&n&&`bg-gradient-to-r ${n}`,t),...s})}Th.displayName="GradientText";function wR({className:t,level:e=1,...r}){const n={1:"font-heading text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl",2:"font-heading text-3xl font-bold tracking-tight sm:text-4xl",3:"font-heading text-2xl font-bold tracking-tight sm:text-3xl",4:"font-heading text-xl font-bold tracking-tight sm:text-2xl",5:"font-heading text-lg font-bold tracking-tight",6:"font-heading text-base font-bold tracking-tight"},o=`h${e}`;return u.jsx(Th,{as:o,className:j(n[e],t),...r})}wR.displayName="GradientHeading";const kR=p.forwardRef(({className:t,gradient:e="from-primary via-purple-500 to-pink-500",borderWidth:r=2,children:n,...o},s)=>u.jsx("div",{ref:s,className:j("relative rounded-lg p-[2px]",`bg-gradient-to-r ${e}`,t),style:{padding:`${r}px`},...o,children:u.jsx("div",{className:"h-full w-full rounded-[calc(0.5rem-2px)] bg-background",children:n})}));kR.displayName="GradientBorder";const NR=p.forwardRef(({className:t,gradient:e="from-primary/20 via-purple-500/20 to-pink-500/20",animate:r=!0,...n},o)=>u.jsx("div",{ref:o,className:j("absolute inset-0 -z-10",`bg-gradient-to-r ${e}`,r&&"animate-gradient-shift bg-[length:200%_200%]",t),...n}));NR.displayName="GradientBackground";const CR=p.forwardRef(({className:t,gradient:e="from-transparent via-primary to-transparent",...r},n)=>u.jsx("div",{ref:n,className:j("h-px w-full",`bg-gradient-to-r ${e}`,t),...r}));CR.displayName="GradientDivider";const SR=p.forwardRef(({className:t,color:e="bg-primary/30",size:r="lg",blur:n="xl",...o},s)=>{const a={sm:"h-32 w-32",md:"h-64 w-64",lg:"h-96 w-96",xl:"h-[32rem] w-[32rem]"},i={sm:"blur-2xl",md:"blur-3xl",lg:"blur-[100px]",xl:"blur-[200px]"};return u.jsx("div",{ref:s,className:j("absolute rounded-full",a[r],i[n],e,t),...o})});SR.displayName="GradientBlob";const tJ=ye("w-full overflow-hidden",{variants:{variant:{default:"",fade:"[mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)]"}},defaultVariants:{variant:"fade"}}),MR=p.forwardRef(({className:t,variant:e,duration:r=40,direction:n="left",pauseOnHover:o=!0,gap:s=16,children:a,...i},l)=>u.jsx("div",{ref:l,className:j(tJ({variant:e}),t),...i,children:u.jsxs("div",{className:j("flex w-max animate-marquee",o&&"hover:[animation-play-state:paused]"),style:{gap:`${s}px`,animationDuration:`${r}s`,animationDirection:n==="right"?"reverse":"normal"},children:[a,u.jsx("div",{className:"flex",style:{gap:`${s}px`},"aria-hidden":!0,children:a})]})}));MR.displayName="Marquee";const ER=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex shrink-0 items-center",t),...e}));ER.displayName="MarqueeItem";const rJ=ye("h-full overflow-hidden",{variants:{variant:{default:"",fade:"[mask-image:linear-gradient(to_bottom,transparent,black_10%,black_90%,transparent)]"}},defaultVariants:{variant:"fade"}}),jR=p.forwardRef(({className:t,variant:e,duration:r=40,direction:n="up",pauseOnHover:o=!0,gap:s=16,children:a,...i},l)=>u.jsx("div",{ref:l,className:j(rJ({variant:e}),t),...i,children:u.jsxs("div",{className:j("flex h-max flex-col animate-marquee-vertical",o&&"hover:[animation-play-state:paused]"),style:{gap:`${s}px`,animationDuration:`${r}s`,animationDirection:n==="down"?"reverse":"normal"},children:[a,u.jsx("div",{className:"flex flex-col",style:{gap:`${s}px`},"aria-hidden":!0,children:a})]})}));jR.displayName="VerticalMarquee";const RR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("w-80 shrink-0 rounded-xl border bg-card p-6 shadow-sm",t),...e}));RR.displayName="MarqueeTestimonial";const TR=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("text-sm text-muted-foreground",t),...e}));TR.displayName="MarqueeTestimonialContent";const AR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-4 flex items-center gap-3",t),...e}));AR.displayName="MarqueeTestimonialAuthor";const OR=p.forwardRef(({className:t,src:e,alt:r,fallback:n,...o},s)=>u.jsx("div",{ref:s,className:j("h-10 w-10 overflow-hidden rounded-full bg-muted",t),...o,children:e?u.jsx("img",{src:e,alt:r||"",className:"h-full w-full object-cover"}):u.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm font-medium text-muted-foreground",children:n||(r==null?void 0:r.charAt(0).toUpperCase())})}));OR.displayName="MarqueeTestimonialAvatar";const DR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("",t),...e}));DR.displayName="MarqueeTestimonialInfo";const IR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("text-sm font-medium text-foreground",t),...e}));IR.displayName="MarqueeTestimonialName";const PR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("text-xs text-muted-foreground",t),...e}));PR.displayName="MarqueeTestimonialRole";const nJ=ye("tabular-nums",{variants:{size:{sm:"text-2xl font-bold",default:"text-4xl font-bold",lg:"text-5xl font-bold",xl:"text-6xl font-bold"}},defaultVariants:{size:"default"}}),oJ={linear:t=>t,easeOut:t=>1-Math.pow(1-t,3),easeInOut:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2};function sJ(t,e,r,n){const o=t.toFixed(e),[s,a]=o.split("."),i=s.replace(/\B(?=(\d{3})+(?!\d))/g,r);return a?`${i}${n}${a}`:i}const Ah=p.forwardRef(({className:t,size:e,value:r,from:n=0,duration:o=2e3,prefix:s="",suffix:a="",decimals:i=0,separator:l=",",decimalSeparator:c=".",easing:d="easeOut",delay:f=0,triggerOnView:h=!0,onComplete:m,...v},g)=>{const[y,b]=p.useState(n),[x,w]=p.useState(!1),k=p.useRef(null),N=p.useCallback(C=>{k.current=C,typeof g=="function"?g(C):g&&(g.current=C)},[g]),S=p.useCallback(()=>{if(x)return;const C=performance.now(),M=oJ[d],E=A=>{const O=A-C,D=Math.min(O/o,1),q=M(D),F=n+(r-n)*q;b(F),D<1?requestAnimationFrame(E):(b(r),w(!0),m==null||m())};setTimeout(()=>{requestAnimationFrame(E)},f)},[r,n,o,d,f,x,m]);return p.useEffect(()=>{if(!h){S();return}const C=k.current;if(!C)return;const M=new IntersectionObserver(E=>{E[0].isIntersecting&&!x&&S()},{threshold:.1});return M.observe(C),()=>M.disconnect()},[S,h,x]),p.useEffect(()=>{w(!1),b(n)},[r,n]),u.jsxs("span",{ref:N,className:j(nJ({size:e}),t),...v,children:[s,sJ(y,i,l,c),a]})});Ah.displayName="AnimatedCounter";const LR=p.forwardRef(({label:t,labelClassName:e,className:r,...n},o)=>u.jsxs("div",{ref:o,className:j("text-center",r),children:[u.jsx(Ah,{...n}),u.jsx("p",{className:j("mt-2 text-sm text-muted-foreground",e),children:t})]}));LR.displayName="CounterWithLabel";const FR=p.forwardRef(({className:t,columns:e=4,...r},n)=>{const o={2:"grid-cols-2",3:"grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 lg:grid-cols-4"};return u.jsx("div",{ref:n,className:j("grid gap-8",o[e],t),...r})});FR.displayName="CounterGrid";const _R=p.forwardRef(({className:t,targetDate:e,onComplete:r,labels:n={days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},size:o="default",...s},a)=>{const[i,l]=p.useState({days:0,hours:0,minutes:0,seconds:0});p.useEffect(()=>{const d=()=>{const h=e.getTime()-new Date().getTime();return h<=0?(r==null||r(),{days:0,hours:0,minutes:0,seconds:0}):{days:Math.floor(h/864e5),hours:Math.floor(h/36e5%24),minutes:Math.floor(h/1e3/60%60),seconds:Math.floor(h/1e3%60)}};l(d());const f=setInterval(()=>{l(d())},1e3);return()=>clearInterval(f)},[e,r]);const c={sm:{value:"text-2xl font-bold",label:"text-xs"},default:{value:"text-4xl font-bold",label:"text-sm"},lg:{value:"text-5xl font-bold",label:"text-base"}};return u.jsx("div",{ref:a,className:j("flex gap-4 md:gap-8",t),...s,children:Object.entries(i).map(([d,f])=>u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:j("tabular-nums",c[o].value),children:String(f).padStart(2,"0")}),u.jsx("div",{className:j("text-muted-foreground",c[o].label),children:n[d]})]},d))})});_R.displayName="CountdownTimer";const aJ=ye("fixed z-50 w-full p-4 shadow-lg transition-transform duration-300",{variants:{position:{bottom:"bottom-0 left-0",top:"top-0 left-0","bottom-left":"bottom-4 left-4 max-w-md rounded-lg","bottom-right":"bottom-4 right-4 max-w-md rounded-lg"},variant:{default:"border-t bg-background",dark:"bg-zinc-900 text-white",card:"border bg-card"}},defaultVariants:{position:"bottom",variant:"default"}}),zR=p.forwardRef(({className:t,position:e,variant:r,isVisible:n=!0,children:o,...s},a)=>n?u.jsx("div",{ref:a,className:j(aJ({position:e,variant:r}),t),role:"dialog","aria-label":"Cookie consent",...s,children:u.jsx("div",{className:"container mx-auto",children:o})}):null);zR.displayName="CookieBanner";const BR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-col gap-4 md:flex-row md:items-center md:justify-between",t),...e}));BR.displayName="CookieBannerContent";const $R=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex-1",t),...e}));$R.displayName="CookieBannerText";const HR=p.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:j("font-heading text-lg font-semibold",t),...e}));HR.displayName="CookieBannerTitle";const VR=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-1 text-sm text-muted-foreground",t),...e}));VR.displayName="CookieBannerDescription";const WR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("flex flex-wrap items-center gap-2",t),...e}));WR.displayName="CookieBannerActions";const UR=p.forwardRef(({className:t,...e},r)=>u.jsx("a",{ref:r,className:j("text-sm text-primary underline-offset-4 hover:underline",t),...e}));UR.displayName="CookieBannerLink";const GR=p.forwardRef(({className:t,isOpen:e,onClose:r,onSave:n,children:o,...s},a)=>(p.useEffect(()=>{const i=l=>{l.key==="Escape"&&r()};return e&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow=""}},[e,r]),e?u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:r,children:u.jsx("div",{ref:a,className:j("w-full max-w-lg rounded-lg bg-background p-6 shadow-xl",t),onClick:i=>i.stopPropagation(),role:"dialog","aria-label":"Cookie preferences",...s,children:o})}):null));GR.displayName="CookiePreferences";const qR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mb-6",t),...e}));qR.displayName="CookiePreferencesHeader";const KR=p.forwardRef(({className:t,...e},r)=>u.jsx("h2",{ref:r,className:j("font-heading text-xl font-semibold",t),...e}));KR.displayName="CookiePreferencesTitle";const YR=p.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:j("mt-2 text-sm text-muted-foreground",t),...e}));YR.displayName="CookiePreferencesDescription";const JR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("space-y-4",t),...e}));JR.displayName="CookiePreferencesList";const XR=p.forwardRef(({className:t,name:e,description:r,required:n=!1,checked:o=!1,onChange:s,...a},i)=>{const l=p.useId();return u.jsxs("div",{ref:i,className:j("flex items-start justify-between gap-4 rounded-lg border p-4",t),...a,children:[u.jsxs("div",{className:"flex-1",children:[u.jsxs("label",{htmlFor:l,className:"font-medium",children:[e,n&&u.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"(Required)"})]}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:r})]}),u.jsx("div",{className:"shrink-0",children:u.jsx("button",{id:l,type:"button",role:"switch","aria-checked":n||o,disabled:n,onClick:()=>s==null?void 0:s(!o),className:j("relative inline-flex h-6 w-11 items-center rounded-full transition-colors",n||o?"bg-primary":"bg-muted",n&&"cursor-not-allowed opacity-50"),children:u.jsx("span",{className:j("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",n||o?"translate-x-6":"translate-x-1")})})})]})});XR.displayName="CookiePreferenceItem";const ZR=p.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:j("mt-6 flex justify-end gap-2",t),...e}));ZR.displayName="CookiePreferencesFooter";const QR=`
2
587
  attribute vec2 uv;
3
588
  attribute vec2 position;
4
589
  varying vec2 vUv;
@@ -6,7 +591,7 @@
6
591
  vUv = uv;
7
592
  gl_Position = vec4(position, 0, 1);
8
593
  }
9
- `,Bo=`
594
+ `,eT=`
10
595
  precision highp float;
11
596
 
12
597
  uniform float uTime;
@@ -32,7 +617,7 @@
32
617
 
33
618
  gl_FragColor = vec4(color, 1.0);
34
619
  }
35
- `,Fo=`
620
+ `,tT=`
36
621
  precision highp float;
37
622
 
38
623
  uniform float uTime;
@@ -98,7 +683,7 @@
98
683
 
99
684
  gl_FragColor = vec4(color, aurora * 0.8 + 0.2);
100
685
  }
101
- `,Mo=`
686
+ `,rT=`
102
687
  precision highp float;
103
688
 
104
689
  uniform float uTime;
@@ -141,7 +726,7 @@
141
726
 
142
727
  gl_FragColor = vec4(color, blob);
143
728
  }
144
- `,Lo=`
729
+ `,nT=`
145
730
  precision highp float;
146
731
 
147
732
  uniform float uTime;
@@ -166,7 +751,7 @@
166
751
 
167
752
  gl_FragColor = vec4(color, uIntensity * 0.5);
168
753
  }
169
- `,Io=`
754
+ `,oT=`
170
755
  precision highp float;
171
756
 
172
757
  uniform float uTime;
@@ -194,7 +779,7 @@
194
779
 
195
780
  gl_FragColor = vec4(color, 1.0);
196
781
  }
197
- `,Eo=`
782
+ `,sT=`
198
783
  precision highp float;
199
784
 
200
785
  uniform float uTime;
@@ -263,7 +848,7 @@
263
848
 
264
849
  gl_FragColor = vec4(color, 1.0);
265
850
  }
266
- `,Vo=`
851
+ `,aT=`
267
852
  precision highp float;
268
853
 
269
854
  uniform float uTime;
@@ -312,10 +897,10 @@
312
897
 
313
898
  gl_FragColor = vec4(color, length(color) * 0.5);
314
899
  }
315
- `;function q(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255]:[1,1,1]}const we={gradient:Bo,aurora:Fo,blob:Mo,noise:Lo,wave:Io,mesh:Eo,particles:Vo},ye={gradient:["#ff0080","#7928ca","#0070f3"],aurora:["#00ff87","#60efff","#7b2dff"],blob:["#ff6b6b","#feca57","#48dbfb"],noise:["#ffffff"],wave:["#667eea","#764ba2"],mesh:["#f093fb","#f5576c","#4facfe","#00f2fe"],particles:["#ffffff","#60efff"]},P=o.forwardRef(({className:t,preset:e="gradient",fragmentShader:a,vertexShader:s,speed:l=1,interactive:i=!0,intensity:c=.8,colors:d,color4:m,paused:u=!1,pixelRatio:g,quality:h="medium",onReady:p,onFrame:x,...N},b)=>{const j=o.useRef(null),R=o.useRef(null),F=o.useRef(null),M=o.useRef(0),T=o.useRef({x:.5,y:.5}),G=o.useRef(0),A=d||ye[e],B=q(A[0]||"#ffffff"),D=q(A[1]||A[0]||"#ffffff"),V=q(A[2]||A[0]||"#ffffff"),K=q(m||A[3]||A[0]||"#ffffff"),Z=a||we[e],_=s||Ao,te=h==="low"?.5:h==="high"?1:.75,L=(g||(typeof window<"u"?window.devicePixelRatio:1))*te;return o.useEffect(()=>{const E=j.current,z=R.current;if(!E||!z)return;let f=null,S=null,U=null,W=null;const de=()=>{if(f=z.getContext("webgl",{alpha:!0,antialias:!1,premultipliedAlpha:!1}),!f){console.warn("WebGL not supported");return}const k=f.createShader(f.VERTEX_SHADER);if(f.shaderSource(k,_),f.compileShader(k),!f.getShaderParameter(k,f.COMPILE_STATUS)){console.error("Vertex shader error:",f.getShaderInfoLog(k));return}const w=f.createShader(f.FRAGMENT_SHADER);if(f.shaderSource(w,Z),f.compileShader(w),!f.getShaderParameter(w,f.COMPILE_STATUS)){console.error("Fragment shader error:",f.getShaderInfoLog(w));return}if(S=f.createProgram(),f.attachShader(S,k),f.attachShader(S,w),f.linkProgram(S),!f.getProgramParameter(S,f.LINK_STATUS)){console.error("Program link error:",f.getProgramInfoLog(S));return}f.useProgram(S);const X=new Float32Array([-1,-1,1,-1,-1,1,1,1]),C=new Float32Array([0,0,1,0,0,1,1,1]);U=f.createBuffer(),f.bindBuffer(f.ARRAY_BUFFER,U),f.bufferData(f.ARRAY_BUFFER,X,f.STATIC_DRAW);const H=f.getAttribLocation(S,"position");f.enableVertexAttribArray(H),f.vertexAttribPointer(H,2,f.FLOAT,!1,0,0),W=f.createBuffer(),f.bindBuffer(f.ARRAY_BUFFER,W),f.bufferData(f.ARRAY_BUFFER,C,f.STATIC_DRAW);const oe=f.getAttribLocation(S,"uv");f.enableVertexAttribArray(oe),f.vertexAttribPointer(oe,2,f.FLOAT,!1,0,0),f.enable(f.BLEND),f.blendFunc(f.SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA),F.current={gl:f,program:S},p==null||p()},$=()=>{if(!z||!f)return;const k=E.getBoundingClientRect(),w=Math.floor(k.width*L),X=Math.floor(k.height*L);z.width=w,z.height=X,f.viewport(0,0,w,X)},I=k=>{if(!f||!S||u){M.current=requestAnimationFrame(I);return}G.current=k*.001*l,x==null||x(G.current),f.useProgram(S);const w=(X,C)=>{const H=f.getUniformLocation(S,X);H&&(Array.isArray(C)?C.length===2?f.uniform2f(H,C[0],C[1]):C.length===3?f.uniform3f(H,C[0],C[1],C[2]):C.length===4&&f.uniform4f(H,C[0],C[1],C[2],C[3]):f.uniform1f(H,C))};w("uTime",G.current),w("uResolution",[z.width,z.height]),w("uMouse",[T.current.x,T.current.y]),w("uIntensity",c),w("uColor1",B),w("uColor2",D),w("uColor3",V),w("uColor4",K),f.drawArrays(f.TRIANGLE_STRIP,0,4),M.current=requestAnimationFrame(I)},ae=k=>{if(!i)return;const w=E.getBoundingClientRect();T.current={x:(k.clientX-w.left)/w.width,y:1-(k.clientY-w.top)/w.height}};return de(),$(),M.current=requestAnimationFrame(I),window.addEventListener("resize",$),i&&E.addEventListener("mousemove",ae),()=>{cancelAnimationFrame(M.current),window.removeEventListener("resize",$),i&&E.removeEventListener("mousemove",ae),f&&(U&&f.deleteBuffer(U),W&&f.deleteBuffer(W),S&&f.deleteProgram(S))}},[Z,_,l,i,c,u,L,B,D,V,K,p,x]),r.jsx("div",{ref:E=>{j.current=E,typeof b=="function"?b(E):b&&(b.current=E)},className:n("relative h-full w-full overflow-hidden",t),...N,children:r.jsx("canvas",{ref:R,className:"absolute inset-0 h-full w-full",style:{display:"block"}})})});P.displayName="ShaderCanvasOGL";const qs=`
900
+ `;function _r(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255]:[1,1,1]}const Oh={gradient:eT,aurora:tT,blob:rT,noise:nT,wave:oT,mesh:sT,particles:aT},Dh={gradient:["#ff0080","#7928ca","#0070f3"],aurora:["#00ff87","#60efff","#7b2dff"],blob:["#ff6b6b","#feca57","#48dbfb"],noise:["#ffffff"],wave:["#667eea","#764ba2"],mesh:["#f093fb","#f5576c","#4facfe","#00f2fe"],particles:["#ffffff","#60efff"]},sr=p.forwardRef(({className:t,preset:e="gradient",fragmentShader:r,vertexShader:n,speed:o=1,interactive:s=!0,intensity:a=.8,colors:i,color4:l,paused:c=!1,pixelRatio:d,quality:f="medium",onReady:h,onFrame:m,...v},g)=>{const y=p.useRef(null),b=p.useRef(null),x=p.useRef(null),w=p.useRef(0),k=p.useRef({x:.5,y:.5}),N=p.useRef(0),S=i||Dh[e],C=_r(S[0]||"#ffffff"),M=_r(S[1]||S[0]||"#ffffff"),E=_r(S[2]||S[0]||"#ffffff"),A=_r(l||S[3]||S[0]||"#ffffff"),O=r||Oh[e],D=n||QR,q=f==="low"?.5:f==="high"?1:.75,F=(d||(typeof window<"u"?window.devicePixelRatio:1))*q;return p.useEffect(()=>{const $=y.current,H=b.current;if(!$||!H)return;let P=null,_=null,z=null,B=null;const G=()=>{if(P=H.getContext("webgl",{alpha:!0,antialias:!1,premultipliedAlpha:!1}),!P){console.warn("WebGL not supported");return}const W=P.createShader(P.VERTEX_SHADER);if(P.shaderSource(W,D),P.compileShader(W),!P.getShaderParameter(W,P.COMPILE_STATUS)){console.error("Vertex shader error:",P.getShaderInfoLog(W));return}const Z=P.createShader(P.FRAGMENT_SHADER);if(P.shaderSource(Z,O),P.compileShader(Z),!P.getShaderParameter(Z,P.COMPILE_STATUS)){console.error("Fragment shader error:",P.getShaderInfoLog(Z));return}if(_=P.createProgram(),P.attachShader(_,W),P.attachShader(_,Z),P.linkProgram(_),!P.getProgramParameter(_,P.LINK_STATUS)){console.error("Program link error:",P.getProgramInfoLog(_));return}P.useProgram(_);const V=new Float32Array([-1,-1,1,-1,-1,1,1,1]),X=new Float32Array([0,0,1,0,0,1,1,1]);z=P.createBuffer(),P.bindBuffer(P.ARRAY_BUFFER,z),P.bufferData(P.ARRAY_BUFFER,V,P.STATIC_DRAW);const te=P.getAttribLocation(_,"position");P.enableVertexAttribArray(te),P.vertexAttribPointer(te,2,P.FLOAT,!1,0,0),B=P.createBuffer(),P.bindBuffer(P.ARRAY_BUFFER,B),P.bufferData(P.ARRAY_BUFFER,X,P.STATIC_DRAW);const ne=P.getAttribLocation(_,"uv");P.enableVertexAttribArray(ne),P.vertexAttribPointer(ne,2,P.FLOAT,!1,0,0),P.enable(P.BLEND),P.blendFunc(P.SRC_ALPHA,P.ONE_MINUS_SRC_ALPHA),x.current={gl:P,program:_},h==null||h()},I=()=>{if(!H||!P)return;const W=$.getBoundingClientRect(),Z=Math.floor(W.width*F),V=Math.floor(W.height*F);H.width=Z,H.height=V,P.viewport(0,0,Z,V)},J=W=>{if(!P||!_||c){w.current=requestAnimationFrame(J);return}N.current=W*.001*o,m==null||m(N.current),P.useProgram(_);const Z=(V,X)=>{const te=P.getUniformLocation(_,V);te&&(Array.isArray(X)?X.length===2?P.uniform2f(te,X[0],X[1]):X.length===3?P.uniform3f(te,X[0],X[1],X[2]):X.length===4&&P.uniform4f(te,X[0],X[1],X[2],X[3]):P.uniform1f(te,X))};Z("uTime",N.current),Z("uResolution",[H.width,H.height]),Z("uMouse",[k.current.x,k.current.y]),Z("uIntensity",a),Z("uColor1",C),Z("uColor2",M),Z("uColor3",E),Z("uColor4",A),P.drawArrays(P.TRIANGLE_STRIP,0,4),w.current=requestAnimationFrame(J)},ee=W=>{if(!s)return;const Z=$.getBoundingClientRect();k.current={x:(W.clientX-Z.left)/Z.width,y:1-(W.clientY-Z.top)/Z.height}};return G(),I(),w.current=requestAnimationFrame(J),window.addEventListener("resize",I),s&&$.addEventListener("mousemove",ee),()=>{cancelAnimationFrame(w.current),window.removeEventListener("resize",I),s&&$.removeEventListener("mousemove",ee),P&&(z&&P.deleteBuffer(z),B&&P.deleteBuffer(B),_&&P.deleteProgram(_))}},[O,D,o,s,a,c,F,C,M,E,A,h,m]),u.jsx("div",{ref:$=>{y.current=$,typeof g=="function"?g($):g&&(g.current=$)},className:j("relative h-full w-full overflow-hidden",t),...v,children:u.jsx("canvas",{ref:b,className:"absolute inset-0 h-full w-full",style:{display:"block"}})})});sr.displayName="ShaderCanvasOGL";const iJ=`
316
901
  varying vec2 vUv;
317
902
  void main() {
318
903
  vUv = uv;
319
904
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
320
905
  }
321
- `,Po=o.forwardRef(({className:t,preset:e="gradient",fragmentShader:a,vertexShader:s,speed:l=1,interactive:i=!0,intensity:c=.8,colors:d,color4:m,paused:u=!1,pixelRatio:g,quality:h="medium",mode3D:p=!1,onReady:x,onFrame:N,...b},j)=>{const R=o.useRef(null),F=o.useRef(null),M=o.useRef(null),T=o.useRef(null),G=o.useRef(null),A=o.useRef(null),B=o.useRef(null),D=o.useRef(0),V=o.useRef({x:.5,y:.5}),[K,Z]=o.useState(!1),[_,te]=o.useState(null),L=d||ye[e],E=q(L[0]||"#ffffff"),z=q(L[1]||L[0]||"#ffffff"),f=q(L[2]||L[0]||"#ffffff"),S=q(m||L[3]||L[0]||"#ffffff"),U=a||we[e],W=s||qs,de=h==="low"?.5:h==="high"?1:.75,$=(g||(typeof window<"u"?window.devicePixelRatio:1))*de;return o.useEffect(()=>{const I=R.current,ae=F.current;if(!I||!ae)return;let k=null,w=!0;return(async()=>{let C;try{C=await import("three")}catch{w&&te("three.js not installed. Install with: npm install three");return}if(!w)return;const{WebGLRenderer:H,Scene:oe,OrthographicCamera:Uo,PerspectiveCamera:Wo,PlaneGeometry:Xo,Mesh:Yo,ShaderMaterial:Jo,Vector2:je,Vector3:se,Clock:Ko}=C,re=new H({canvas:ae,alpha:!0,antialias:!1,premultipliedAlpha:!1});re.setPixelRatio($),M.current=re;const ce=new oe;T.current=ce;const ee=p?new Wo(75,1,.1,100):new Uo(-1,1,1,-1,.1,100);ee.position.z=1,G.current=ee;const Y=new Jo({vertexShader:W,fragmentShader:U,uniforms:{uTime:{value:0},uResolution:{value:new je(1,1)},uMouse:{value:new je(.5,.5)},uIntensity:{value:c},uColor1:{value:new se(...E)},uColor2:{value:new se(...z)},uColor3:{value:new se(...f)},uColor4:{value:new se(...S)}},transparent:!0});A.current=Y;const Ce=new Xo(2,2),Zo=new Yo(Ce,Y);ce.add(Zo);const Re=new Ko;B.current=Re;const me=()=>{if(!w)return;const Q=I.getBoundingClientRect(),O=Q.width,fe=Q.height;re.setSize(O,fe),Y.uniforms.uResolution.value.set(O*$,fe*$),p&&ee.isPerspectiveCamera&&(ee.aspect=O/fe,ee.updateProjectionMatrix())},Se=()=>{if(w){if(!u){const Q=Re.getElapsedTime()*l;N==null||N(Q),Y.uniforms.uTime.value=Q,Y.uniforms.uIntensity.value=c,i&&Y.uniforms.uMouse.value.set(V.current.x,V.current.y),re.render(ce,ee)}D.current=requestAnimationFrame(Se)}},ke=Q=>{if(!i||!w)return;const O=I.getBoundingClientRect();V.current={x:(Q.clientX-O.left)/O.width,y:1-(Q.clientY-O.top)/O.height}};me(),Se(),Z(!0),x==null||x(),window.addEventListener("resize",me),i&&I.addEventListener("mousemove",ke),k=()=>{cancelAnimationFrame(D.current),window.removeEventListener("resize",me),i&&I.removeEventListener("mousemove",ke),re.dispose(),Ce.dispose(),Y.dispose()}})(),()=>{w=!1,k==null||k()}},[U,W,l,i,c,u,$,p,E,z,f,S,x,N]),o.useEffect(()=>{A.current&&(A.current.uniforms.uIntensity.value=c)},[c]),_?r.jsx("div",{ref:j,className:n("relative flex h-full w-full items-center justify-center bg-muted text-muted-foreground",t),...b,children:r.jsx("p",{className:"text-sm",children:_})}):r.jsxs("div",{ref:I=>{R.current=I,typeof j=="function"?j(I):j&&(j.current=I)},className:n("relative h-full w-full overflow-hidden",t),...b,children:[r.jsx("canvas",{ref:F,className:"absolute inset-0 h-full w-full",style:{display:"block"}}),!K&&!_&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:r.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})})]})});Po.displayName="ShaderCanvasR3F";const be=o.forwardRef(({className:t,shader:e,children:a,overlay:s=0,overlayColor:l="black",fixed:i=!1,...c},d)=>r.jsxs("div",{ref:d,className:n("relative",i?"fixed inset-0":"h-full w-full",t),children:[r.jsx(P,{preset:e,className:"absolute inset-0 -z-10",...c}),s>0&&r.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundColor:l,opacity:s}}),a&&r.jsx("div",{className:"relative z-10 h-full w-full",children:a})]}));be.displayName="ShaderBackground";const Do=o.forwardRef(({className:t,colors:e=["#ff0080","#7928ca","#0070f3"],...a},s)=>r.jsx(P,{ref:s,preset:"gradient",colors:e,className:t,...a}));Do.displayName="ShaderGradient";const zo=o.forwardRef(({className:t,colors:e=["#00ff87","#60efff","#7b2dff"],...a},s)=>r.jsx(P,{ref:s,preset:"aurora",colors:e,className:t,...a}));zo.displayName="ShaderAurora";const Ho=o.forwardRef(({className:t,colors:e=["#ff6b6b","#feca57","#48dbfb"],...a},s)=>r.jsx(P,{ref:s,preset:"blob",colors:e,className:t,...a}));Ho.displayName="ShaderBlob";const Go=o.forwardRef(({className:t,color:e="#ffffff",intensity:a=.15,...s},l)=>r.jsx(P,{ref:l,preset:"noise",colors:[e],intensity:a,className:t,...s}));Go.displayName="ShaderNoise";const _o=o.forwardRef(({className:t,colors:e=["#667eea","#764ba2"],...a},s)=>r.jsx(P,{ref:s,preset:"wave",colors:e,className:t,...a}));_o.displayName="ShaderWave";const Qo=o.forwardRef(({className:t,colors:e=["#f093fb","#f5576c","#4facfe","#00f2fe"],...a},s)=>r.jsx(P,{ref:s,preset:"mesh",colors:e.slice(0,3),color4:e[3],className:t,...a}));Qo.displayName="ShaderMesh";const qo=o.forwardRef(({className:t,colors:e=["#ffffff","#60efff"],...a},s)=>r.jsx(P,{ref:s,preset:"particles",colors:e,className:t,...a}));qo.displayName="ShaderParticles";const $o=o.forwardRef(({className:t,shader:e="gradient",title:a,subtitle:s,size:l="default",align:i="center",children:c,overlay:d=.3,...m},u)=>{const g={sm:"min-h-[40vh] py-16",default:"min-h-[60vh] py-20",lg:"min-h-[80vh] py-24",full:"min-h-screen py-24"},h={left:"items-start text-left",center:"items-center text-center",right:"items-end text-right"};return r.jsx(be,{ref:u,shader:e,overlay:d,className:n("flex flex-col justify-center",g[l],h[i],t),...m,children:r.jsxs("div",{className:n("container mx-auto px-4",i==="center"&&"flex flex-col items-center"),children:[a&&r.jsx("h1",{className:"max-w-4xl text-4xl font-bold tracking-tight text-white sm:text-5xl md:text-6xl lg:text-7xl",children:a}),s&&r.jsx("p",{className:"mt-6 max-w-2xl text-lg text-white/80 sm:text-xl md:text-2xl",children:s}),c]})})});$o.displayName="ShaderHero";const Oo=o.forwardRef(({className:t,shader:e="mesh",children:a,padding:s="default",rounded:l="xl",overlay:i=.5,intensity:c=.6,speed:d=.5,...m},u)=>{const g={sm:"p-4",default:"p-6",lg:"p-8"},h={sm:"rounded-sm",default:"rounded",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};return r.jsxs("div",{ref:u,className:n("relative overflow-hidden",h[l],t),children:[r.jsx(P,{preset:e,intensity:c,speed:d,className:"absolute inset-0",...m}),i>0&&r.jsx("div",{className:"absolute inset-0",style:{backgroundColor:"black",opacity:i}}),r.jsx("div",{className:n("relative z-10",g[s]),children:a})]})});Oo.displayName="ShaderCard";exports.AnimatedCounter=Ne;exports.AnnouncementBar=ie;exports.AppDownloadButtons=Qr;exports.AppDownloadContent=zr;exports.AppDownloadDescription=_r;exports.AppDownloadInfo=Hr;exports.AppDownloadMockup=Ur;exports.AppDownloadSection=Dr;exports.AppDownloadTitle=Gr;exports.AppQRCode=Xr;exports.AppStoreBadge=$r;exports.AvatarStack=Cr;exports.BentoCard=xr;exports.BentoCardBadge=wr;exports.BentoCardContent=vr;exports.BentoCardDescription=hr;exports.BentoCardIcon=pr;exports.BentoCardImage=Nr;exports.BentoCardLink=yr;exports.BentoCardTitle=gr;exports.BentoGrid=ur;exports.BentoGridPreset=br;exports.BlogCard=Ka;exports.BlogCardAuthor=ir;exports.BlogCardAuthorAvatar=dr;exports.BlogCardAuthorName=cr;exports.BlogCardCategory=ar;exports.BlogCardContent=er;exports.BlogCardDate=rr;exports.BlogCardExcerpt=nr;exports.BlogCardFeatured=fr;exports.BlogCardFooter=lr;exports.BlogCardImage=Za;exports.BlogCardLink=mr;exports.BlogCardMeta=tr;exports.BlogCardReadTime=or;exports.BlogCardTitle=sr;exports.BlogGrid=Ja;exports.CTAActions=tt;exports.CTACard=at;exports.CTAContent=Ke;exports.CTADescription=et;exports.CTASection=Je;exports.CTATitle=Ze;exports.ComparisonCategory=la;exports.ComparisonCell=Zt;exports.ComparisonCheck=ta;exports.ComparisonDescription=Ot;exports.ComparisonFeatureCell=ea;exports.ComparisonHeader=qt;exports.ComparisonHeaderCell=Kt;exports.ComparisonMinus=ra;exports.ComparisonPlanHeader=oa;exports.ComparisonPlanName=sa;exports.ComparisonPlanPrice=na;exports.ComparisonSection=Qt;exports.ComparisonTable=Ut;exports.ComparisonTableBody=Yt;exports.ComparisonTableHead=Xt;exports.ComparisonTableInner=Wt;exports.ComparisonTableRow=Jt;exports.ComparisonTitle=$t;exports.ComparisonX=aa;exports.ContactContent=va;exports.ContactDescription=ba;exports.ContactDetailItem=Ca;exports.ContactDetails=ja;exports.ContactForm=ka;exports.ContactFormError=Ia;exports.ContactFormField=Aa;exports.ContactFormInput=Fa;exports.ContactFormLabel=Ba;exports.ContactFormRow=Ta;exports.ContactFormSelect=La;exports.ContactFormSuccess=Ea;exports.ContactFormTextarea=Ma;exports.ContactHeader=wa;exports.ContactInfo=Na;exports.ContactSection=ha;exports.ContactSocialLink=Sa;exports.ContactSocials=Ra;exports.ContactTitle=ya;exports.ContentSpot=Ee;exports.ContentSpotActions=ze;exports.ContentSpotDescription=De;exports.ContentSpotEyebrow=Ve;exports.ContentSpotTitle=Pe;exports.CookieBanner=po;exports.CookieBannerActions=wo;exports.CookieBannerContent=go;exports.CookieBannerDescription=No;exports.CookieBannerLink=yo;exports.CookieBannerText=ho;exports.CookieBannerTitle=vo;exports.CookiePreferenceItem=ko;exports.CookiePreferences=bo;exports.CookiePreferencesDescription=Ro;exports.CookiePreferencesFooter=To;exports.CookiePreferencesHeader=jo;exports.CookiePreferencesList=So;exports.CookiePreferencesTitle=Co;exports.CountdownAnnouncementBar=Wa;exports.CountdownTimer=xo;exports.CounterGrid=uo;exports.CounterWithLabel=fo;exports.CustomerCount=Tr;exports.EmailForm=ia;exports.FAQAnswer=le;exports.FAQContact=_t;exports.FAQDescription=Dt;exports.FAQHeader=Vt;exports.FAQItem=Ht;exports.FAQItemCard=Gt;exports.FAQList=zt;exports.FAQQuestion=ne;exports.FAQSection=Et;exports.FAQTitle=Pt;exports.FRAGMENT_SHADER_AURORA=Fo;exports.FRAGMENT_SHADER_BLOB=Mo;exports.FRAGMENT_SHADER_GRADIENT=Bo;exports.FRAGMENT_SHADER_MESH_GRADIENT=Eo;exports.FRAGMENT_SHADER_NOISE=Lo;exports.FRAGMENT_SHADER_PARTICLES=Vo;exports.FRAGMENT_SHADER_WAVE=Io;exports.FeatureSpot=He;exports.FeatureSpotContent=Xe;exports.FeatureSpotDescription=Qe;exports.FeatureSpotGrid=qe;exports.FeatureSpotHeader=Ge;exports.FeatureSpotItem=$e;exports.FeatureSpotItemDescription=Ue;exports.FeatureSpotItemTitle=Oe;exports.FeatureSpotMedia=Ye;exports.FeatureSpotSplit=We;exports.FeatureSpotTitle=_e;exports.FeaturedIn=Br;exports.Footer=Pa;exports.FooterBottom=Qa;exports.FooterContent=Da;exports.FooterCopyright=qa;exports.FooterLink=_a;exports.FooterLinks=Ga;exports.FooterSection=za;exports.FooterSocial=$a;exports.FooterSocialLink=Oa;exports.FooterTitle=Ha;exports.GoogleMapEmbed=Ir;exports.GooglePlayBadge=Or;exports.GradientBackground=Kr;exports.GradientBlob=eo;exports.GradientBorder=Jr;exports.GradientDivider=Zr;exports.GradientHeading=Yr;exports.GradientText=ve;exports.HeaderNavigation=Va;exports.Hero=Ae;exports.HeroActions=Le;exports.HeroBadge=Be;exports.HeroImage=Ie;exports.HeroSubtitle=Me;exports.HeroTitle=Fe;exports.LogoCloud=Ct;exports.LogoCloudItem=Rt;exports.MapWithInfo=Pr;exports.Marquee=to;exports.MarqueeItem=ao;exports.MarqueeTestimonial=oo;exports.MarqueeTestimonialAuthor=no;exports.MarqueeTestimonialAvatar=lo;exports.MarqueeTestimonialContent=so;exports.MarqueeTestimonialInfo=io;exports.MarqueeTestimonialName=co;exports.MarqueeTestimonialRole=mo;exports.Newsletter=da;exports.NewsletterDescription=fa;exports.NewsletterDisclaimer=pa;exports.NewsletterForm=ua;exports.NewsletterIcon=ca;exports.NewsletterInput=xa;exports.NewsletterSuccess=ga;exports.NewsletterTitle=ma;exports.OpenStreetMapEmbed=Er;exports.PRESET_COLORS=ye;exports.PhoneMockup=Wr;exports.PricingCard=xe;exports.PricingOptions=Xa;exports.PricingTable=Ya;exports.Quote=Tt;exports.QuoteAuthor=Bt;exports.QuoteAuthorAvatar=Ft;exports.QuoteAuthorInfo=Mt;exports.QuoteAuthorName=Lt;exports.QuoteAuthorTitle=It;exports.QuoteText=At;exports.RotatingAnnouncementBar=Ua;exports.SHADER_PRESETS=we;exports.ShaderAurora=zo;exports.ShaderBackground=be;exports.ShaderBlob=Ho;exports.ShaderCanvasOGL=P;exports.ShaderCanvasR3F=Po;exports.ShaderCard=Oo;exports.ShaderGradient=Do;exports.ShaderHero=$o;exports.ShaderMesh=Qo;exports.ShaderNoise=Go;exports.ShaderParticles=qo;exports.ShaderWave=_o;exports.SocialProof=jr;exports.SocialProofBanner=Ar;exports.StarRating=Rr;exports.StatItem=it;exports.StatLabel=ct;exports.StatTrend=mt;exports.StatValue=dt;exports.StaticMap=Vr;exports.StatsDescription=nt;exports.StatsGrid=lt;exports.StatsHeader=ot;exports.StatsSection=rt;exports.StatsTitle=st;exports.TeamDescription=pt;exports.TeamGrid=gt;exports.TeamHeader=ut;exports.TeamMember=ht;exports.TeamMemberBio=yt;exports.TeamMemberImage=vt;exports.TeamMemberLink=jt;exports.TeamMemberLinks=bt;exports.TeamMemberName=Nt;exports.TeamMemberRole=wt;exports.TeamSection=ft;exports.TeamTitle=xt;exports.Testimonial=ue;exports.TestimonialCarousel=kt;exports.TestimonialGrid=St;exports.TrustBadge=kr;exports.TrustBadges=Sr;exports.VERTEX_SHADER_DEFAULT=Ao;exports.VerticalMarquee=ro;exports.VideoModal=Lr;exports.VideoPlayer=ge;exports.VimeoEmbed=Mr;exports.YouTubeEmbed=Fr;exports.cn=n;exports.hexToVec3=q;
906
+ `,iT=p.forwardRef(({className:t,preset:e="gradient",fragmentShader:r,vertexShader:n,speed:o=1,interactive:s=!0,intensity:a=.8,colors:i,color4:l,paused:c=!1,pixelRatio:d,quality:f="medium",mode3D:h=!1,onReady:m,onFrame:v,...g},y)=>{const b=p.useRef(null),x=p.useRef(null),w=p.useRef(null),k=p.useRef(null),N=p.useRef(null),S=p.useRef(null),C=p.useRef(null),M=p.useRef(0),E=p.useRef({x:.5,y:.5}),[A,O]=p.useState(!1),[D,q]=p.useState(null),F=i||Dh[e],$=_r(F[0]||"#ffffff"),H=_r(F[1]||F[0]||"#ffffff"),P=_r(F[2]||F[0]||"#ffffff"),_=_r(l||F[3]||F[0]||"#ffffff"),z=r||Oh[e],B=n||iJ,G=f==="low"?.5:f==="high"?1:.75,I=(d||(typeof window<"u"?window.devicePixelRatio:1))*G;return p.useEffect(()=>{const J=b.current,ee=x.current;if(!J||!ee)return;let W=null,Z=!0;return(async()=>{let X;try{X=await import("three")}catch{Z&&q("three.js not installed. Install with: npm install three");return}if(!Z)return;const{WebGLRenderer:te,Scene:ne,OrthographicCamera:Y,PerspectiveCamera:se,PlaneGeometry:ue,Mesh:Se,ShaderMaterial:et,Vector2:$e,Vector3:dt,Clock:Cr}=X,qe=new te({canvas:ee,alpha:!0,antialias:!1,premultipliedAlpha:!1});qe.setPixelRatio(I),w.current=qe;const Mt=new ne;k.current=Mt;const gt=h?new se(75,1,.1,100):new Y(-1,1,1,-1,.1,100);gt.position.z=1,N.current=gt;const Et=new et({vertexShader:B,fragmentShader:z,uniforms:{uTime:{value:0},uResolution:{value:new $e(1,1)},uMouse:{value:new $e(.5,.5)},uIntensity:{value:a},uColor1:{value:new dt(...$)},uColor2:{value:new dt(...H)},uColor3:{value:new dt(...P)},uColor4:{value:new dt(..._)}},transparent:!0});S.current=Et;const Ur=new ue(2,2),Tn=new Se(Ur,Et);Mt.add(Tn);const Sr=new Cr;C.current=Sr;const Mr=()=>{if(!Z)return;const ut=J.getBoundingClientRect(),tt=ut.width,Er=ut.height;qe.setSize(tt,Er),Et.uniforms.uResolution.value.set(tt*I,Er*I),h&&gt.isPerspectiveCamera&&(gt.aspect=tt/Er,gt.updateProjectionMatrix())},An=()=>{if(Z){if(!c){const ut=Sr.getElapsedTime()*o;v==null||v(ut),Et.uniforms.uTime.value=ut,Et.uniforms.uIntensity.value=a,s&&Et.uniforms.uMouse.value.set(E.current.x,E.current.y),qe.render(Mt,gt)}M.current=requestAnimationFrame(An)}},co=ut=>{if(!s||!Z)return;const tt=J.getBoundingClientRect();E.current={x:(ut.clientX-tt.left)/tt.width,y:1-(ut.clientY-tt.top)/tt.height}};Mr(),An(),O(!0),m==null||m(),window.addEventListener("resize",Mr),s&&J.addEventListener("mousemove",co),W=()=>{cancelAnimationFrame(M.current),window.removeEventListener("resize",Mr),s&&J.removeEventListener("mousemove",co),qe.dispose(),Ur.dispose(),Et.dispose()}})(),()=>{Z=!1,W==null||W()}},[z,B,o,s,a,c,I,h,$,H,P,_,m,v]),p.useEffect(()=>{S.current&&(S.current.uniforms.uIntensity.value=a)},[a]),D?u.jsx("div",{ref:y,className:j("relative flex h-full w-full items-center justify-center bg-muted text-muted-foreground",t),...g,children:u.jsx("p",{className:"text-sm",children:D})}):u.jsxs("div",{ref:J=>{b.current=J,typeof y=="function"?y(J):y&&(y.current=J)},className:j("relative h-full w-full overflow-hidden",t),...g,children:[u.jsx("canvas",{ref:x,className:"absolute inset-0 h-full w-full",style:{display:"block"}}),!A&&!D&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:u.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})})]})});iT.displayName="ShaderCanvasR3F";const Ih=p.forwardRef(({className:t,shader:e,children:r,overlay:n=0,overlayColor:o="black",fixed:s=!1,...a},i)=>u.jsxs("div",{ref:i,className:j("relative",s?"fixed inset-0":"h-full w-full",t),children:[u.jsx(sr,{preset:e,className:"absolute inset-0 -z-10",...a}),n>0&&u.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundColor:o,opacity:n}}),r&&u.jsx("div",{className:"relative z-10 h-full w-full",children:r})]}));Ih.displayName="ShaderBackground";const lT=p.forwardRef(({className:t,colors:e=["#ff0080","#7928ca","#0070f3"],...r},n)=>u.jsx(sr,{ref:n,preset:"gradient",colors:e,className:t,...r}));lT.displayName="ShaderGradient";const cT=p.forwardRef(({className:t,colors:e=["#00ff87","#60efff","#7b2dff"],...r},n)=>u.jsx(sr,{ref:n,preset:"aurora",colors:e,className:t,...r}));cT.displayName="ShaderAurora";const dT=p.forwardRef(({className:t,colors:e=["#ff6b6b","#feca57","#48dbfb"],...r},n)=>u.jsx(sr,{ref:n,preset:"blob",colors:e,className:t,...r}));dT.displayName="ShaderBlob";const uT=p.forwardRef(({className:t,color:e="#ffffff",intensity:r=.15,...n},o)=>u.jsx(sr,{ref:o,preset:"noise",colors:[e],intensity:r,className:t,...n}));uT.displayName="ShaderNoise";const fT=p.forwardRef(({className:t,colors:e=["#667eea","#764ba2"],...r},n)=>u.jsx(sr,{ref:n,preset:"wave",colors:e,className:t,...r}));fT.displayName="ShaderWave";const pT=p.forwardRef(({className:t,colors:e=["#f093fb","#f5576c","#4facfe","#00f2fe"],...r},n)=>u.jsx(sr,{ref:n,preset:"mesh",colors:e.slice(0,3),color4:e[3],className:t,...r}));pT.displayName="ShaderMesh";const hT=p.forwardRef(({className:t,colors:e=["#ffffff","#60efff"],...r},n)=>u.jsx(sr,{ref:n,preset:"particles",colors:e,className:t,...r}));hT.displayName="ShaderParticles";const mT=p.forwardRef(({className:t,shader:e="gradient",title:r,subtitle:n,size:o="default",align:s="center",children:a,overlay:i=.3,...l},c)=>{const d={sm:"min-h-[40vh] py-16",default:"min-h-[60vh] py-20",lg:"min-h-[80vh] py-24",full:"min-h-screen py-24"},f={left:"items-start text-left",center:"items-center text-center",right:"items-end text-right"};return u.jsx(Ih,{ref:c,shader:e,overlay:i,className:j("flex flex-col justify-center",d[o],f[s],t),...l,children:u.jsxs("div",{className:j("container mx-auto px-4",s==="center"&&"flex flex-col items-center"),children:[r&&u.jsx("h1",{className:"max-w-4xl text-4xl font-bold tracking-tight text-white sm:text-5xl md:text-6xl lg:text-7xl",children:r}),n&&u.jsx("p",{className:"mt-6 max-w-2xl text-lg text-white/80 sm:text-xl md:text-2xl",children:n}),a]})})});mT.displayName="ShaderHero";const gT=p.forwardRef(({className:t,shader:e="mesh",children:r,padding:n="default",rounded:o="xl",overlay:s=.5,intensity:a=.6,speed:i=.5,...l},c)=>{const d={sm:"p-4",default:"p-6",lg:"p-8"},f={sm:"rounded-sm",default:"rounded",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};return u.jsxs("div",{ref:c,className:j("relative overflow-hidden",f[o],t),children:[u.jsx(sr,{preset:e,intensity:a,speed:i,className:"absolute inset-0",...l}),s>0&&u.jsx("div",{className:"absolute inset-0",style:{backgroundColor:"black",opacity:s}}),u.jsx("div",{className:j("relative z-10",d[n]),children:r})]})});gT.displayName="ShaderCard";exports.AnimatedCounter=Ah;exports.AnnouncementBar=Fc;exports.AppDownloadButtons=hR;exports.AppDownloadContent=dR;exports.AppDownloadDescription=pR;exports.AppDownloadInfo=uR;exports.AppDownloadMockup=yR;exports.AppDownloadSection=cR;exports.AppDownloadTitle=fR;exports.AppQRCode=xR;exports.AppStoreBadge=gR;exports.AvatarStack=Yj;exports.BentoCard=zj;exports.BentoCardBadge=Uj;exports.BentoCardContent=Vj;exports.BentoCardDescription=Hj;exports.BentoCardIcon=Bj;exports.BentoCardImage=Wj;exports.BentoCardLink=Gj;exports.BentoCardTitle=$j;exports.BentoGrid=_j;exports.BentoGridPreset=qj;exports.BlogCard=Nj;exports.BlogCardAuthor=Dj;exports.BlogCardAuthorAvatar=Ij;exports.BlogCardAuthorName=Pj;exports.BlogCardCategory=Ej;exports.BlogCardContent=Sj;exports.BlogCardDate=jj;exports.BlogCardExcerpt=Aj;exports.BlogCardFeatured=Fj;exports.BlogCardFooter=Oj;exports.BlogCardImage=Cj;exports.BlogCardLink=Lj;exports.BlogCardMeta=Mj;exports.BlogCardReadTime=Rj;exports.BlogCardTitle=Tj;exports.BlogGrid=kj;exports.CTAActions=py;exports.CTACard=hy;exports.CTAContent=dy;exports.CTADescription=fy;exports.CTASection=cy;exports.CTATitle=uy;exports.ComparisonCategory=OE;exports.ComparisonCell=CE;exports.ComparisonCheck=ME;exports.ComparisonDescription=vE;exports.ComparisonFeatureCell=SE;exports.ComparisonHeader=mE;exports.ComparisonHeaderCell=NE;exports.ComparisonMinus=jE;exports.ComparisonPlanHeader=RE;exports.ComparisonPlanName=TE;exports.ComparisonPlanPrice=AE;exports.ComparisonSection=hE;exports.ComparisonTable=yE;exports.ComparisonTableBody=wE;exports.ComparisonTableHead=xE;exports.ComparisonTableInner=bE;exports.ComparisonTableRow=kE;exports.ComparisonTitle=gE;exports.ComparisonX=EE;exports.ContactContent=VE;exports.ContactDescription=qE;exports.ContactDetailItem=YE;exports.ContactDetails=KE;exports.ContactForm=ZE;exports.ContactFormError=sj;exports.ContactFormField=ej;exports.ContactFormInput=rj;exports.ContactFormLabel=tj;exports.ContactFormRow=QE;exports.ContactFormSelect=oj;exports.ContactFormSuccess=aj;exports.ContactFormTextarea=nj;exports.ContactHeader=UE;exports.ContactInfo=WE;exports.ContactSection=HE;exports.ContactSocialLink=XE;exports.ContactSocials=JE;exports.ContactTitle=GE;exports.ContentSpot=qv;exports.ContentSpotActions=Xv;exports.ContentSpotDescription=Jv;exports.ContentSpotEyebrow=Kv;exports.ContentSpotTitle=Yv;exports.CookieBanner=zR;exports.CookieBannerActions=WR;exports.CookieBannerContent=BR;exports.CookieBannerDescription=VR;exports.CookieBannerLink=UR;exports.CookieBannerText=$R;exports.CookieBannerTitle=HR;exports.CookiePreferenceItem=XR;exports.CookiePreferences=GR;exports.CookiePreferencesDescription=YR;exports.CookiePreferencesFooter=ZR;exports.CookiePreferencesHeader=qR;exports.CookiePreferencesList=JR;exports.CookiePreferencesTitle=KR;exports.CountdownAnnouncementBar=bj;exports.CountdownTimer=_R;exports.CounterGrid=FR;exports.CounterWithLabel=LR;exports.CustomerCount=Qj;exports.EmailForm=DE;exports.FAQAnswer=Lc;exports.FAQContact=pE;exports.FAQDescription=cE;exports.FAQHeader=iE;exports.FAQItem=uE;exports.FAQItemCard=fE;exports.FAQList=dE;exports.FAQQuestion=Pc;exports.FAQSection=aE;exports.FAQTitle=lE;exports.FRAGMENT_SHADER_AURORA=tT;exports.FRAGMENT_SHADER_BLOB=rT;exports.FRAGMENT_SHADER_GRADIENT=eT;exports.FRAGMENT_SHADER_MESH_GRADIENT=sT;exports.FRAGMENT_SHADER_NOISE=nT;exports.FRAGMENT_SHADER_PARTICLES=aT;exports.FRAGMENT_SHADER_WAVE=oT;exports.FeatureSpot=Zv;exports.FeatureSpotContent=iy;exports.FeatureSpotDescription=ty;exports.FeatureSpotGrid=ry;exports.FeatureSpotHeader=Qv;exports.FeatureSpotItem=ny;exports.FeatureSpotItemDescription=sy;exports.FeatureSpotItemTitle=oy;exports.FeatureSpotMedia=ly;exports.FeatureSpotSplit=ay;exports.FeatureSpotTitle=ey;exports.FeaturedIn=tR;exports.Footer=lj;exports.FooterBottom=hj;exports.FooterContent=cj;exports.FooterCopyright=mj;exports.FooterLink=pj;exports.FooterLinks=fj;exports.FooterSection=dj;exports.FooterSocial=gj;exports.FooterSocialLink=vj;exports.FooterTitle=uj;exports.GoogleMapEmbed=sR;exports.GooglePlayBadge=vR;exports.GradientBackground=NR;exports.GradientBlob=SR;exports.GradientBorder=kR;exports.GradientDivider=CR;exports.GradientHeading=wR;exports.GradientText=Th;exports.HeaderNavigation=ij;exports.Hero=$v;exports.HeroActions=Uv;exports.HeroBadge=Hv;exports.HeroImage=Gv;exports.HeroSubtitle=Wv;exports.HeroTitle=Vv;exports.LogoCloud=Ly;exports.LogoCloudItem=Fy;exports.MapWithInfo=lR;exports.Marquee=MR;exports.MarqueeItem=ER;exports.MarqueeTestimonial=RR;exports.MarqueeTestimonialAuthor=AR;exports.MarqueeTestimonialAvatar=OR;exports.MarqueeTestimonialContent=TR;exports.MarqueeTestimonialInfo=DR;exports.MarqueeTestimonialName=IR;exports.MarqueeTestimonialRole=PR;exports.Newsletter=IE;exports.NewsletterDescription=FE;exports.NewsletterDisclaimer=BE;exports.NewsletterForm=_E;exports.NewsletterIcon=PE;exports.NewsletterInput=zE;exports.NewsletterSuccess=$E;exports.NewsletterTitle=LE;exports.OpenStreetMapEmbed=aR;exports.PRESET_COLORS=Dh;exports.PhoneMockup=bR;exports.PricingCard=Mh;exports.PricingOptions=xj;exports.PricingTable=wj;exports.Quote=QM;exports.QuoteAuthor=tE;exports.QuoteAuthorAvatar=rE;exports.QuoteAuthorInfo=nE;exports.QuoteAuthorName=oE;exports.QuoteAuthorTitle=sE;exports.QuoteText=eE;exports.RotatingAnnouncementBar=yj;exports.SHADER_PRESETS=Oh;exports.ShaderAurora=cT;exports.ShaderBackground=Ih;exports.ShaderBlob=dT;exports.ShaderCanvasOGL=sr;exports.ShaderCanvasR3F=iT;exports.ShaderCard=gT;exports.ShaderGradient=lT;exports.ShaderHero=mT;exports.ShaderMesh=pT;exports.ShaderNoise=uT;exports.ShaderParticles=hT;exports.ShaderWave=fT;exports.SocialProof=Kj;exports.SocialProofBanner=eR;exports.StarRating=Jj;exports.StatItem=xy;exports.StatLabel=ky;exports.StatTrend=Ny;exports.StatValue=wy;exports.StaticMap=iR;exports.StatsDescription=yy;exports.StatsGrid=by;exports.StatsHeader=gy;exports.StatsSection=my;exports.StatsTitle=vy;exports.TeamDescription=Ey;exports.TeamGrid=jy;exports.TeamHeader=Sy;exports.TeamMember=Ry;exports.TeamMemberBio=Dy;exports.TeamMemberImage=Ty;exports.TeamMemberLink=Py;exports.TeamMemberLinks=Iy;exports.TeamMemberName=Ay;exports.TeamMemberRole=Oy;exports.TeamSection=Cy;exports.TeamTitle=My;exports.Testimonial=Sh;exports.TestimonialCarousel=ZM;exports.TestimonialGrid=XM;exports.TrustBadge=Zj;exports.TrustBadges=Xj;exports.VERTEX_SHADER_DEFAULT=QR;exports.VerticalMarquee=jR;exports.VideoModal=oR;exports.VideoPlayer=jh;exports.VimeoEmbed=nR;exports.YouTubeEmbed=rR;exports.cn=j;exports.hexToVec3=_r;