var $t=Object.defineProperty;var It=(t,e,r)=>e in t?$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var x=(t,e,r)=>It(t,typeof e!="symbol"?e+"":e,r);import{c as be,a as C,f as O}from"./vfPE-AD7.js";import{aM as ut,B as X,aL as Pt,q as pt,ai as dt,h as ht,aN as Et,i as ke,p as me,c as xe,e as G,A as pe,r as j,t as F,g as re,u as Mt,s as Lt,k as Bt,d as qt,f as tt,n as Nt}from"./DhUiKsxN.js";import{d as we,s as Gt}from"./Dsv8gxIT.js";import{I as Be,a as qe,i as jt,c as de,g as I,f as se,d as oe,r as Zt,j as Ot}from"./QNXDtpsh.js";import{l as Ne,b as Ge,p as z,i as Ie}from"./DUil1G3I.js";import"./1jpszzm8.js";function Qt(t,e,r=e){var n=new WeakSet;ut(t,"input",async s=>{var l=s?t.defaultValue:t.value;if(l=Ae(t)?Ce(l):l,r(l),X!==null&&n.add(X),await Pt(),l!==(l=e())){var i=t.selectionStart,o=t.selectionEnd,c=t.value.length;if(t.value=l??"",o!==null){var a=t.value.length;i===o&&o===c&&a>c?(t.selectionStart=a,t.selectionEnd=a):(t.selectionStart=i,t.selectionEnd=Math.min(o,a))}}}),(ht&&t.defaultValue!==t.value||pt(e)==null&&t.value)&&(r(Ae(t)?Ce(t.value):t.value),X!==null&&n.add(X)),dt(()=>{var s=e();if(t===document.activeElement){var l=Et??X;if(n.has(l))return}Ae(t)&&s===Ce(t.value)||t.type==="date"&&!s&&!t.value||s!==t.value&&(t.value=s??"")})}function zn(t,e,r=e){ut(t,"change",n=>{var s=n?t.defaultChecked:t.checked;r(s)}),(ht&&t.defaultChecked!==t.checked||pt(e)==null)&&r(t.checked),dt(()=>{var n=e();t.checked=!!n})}function Ae(t){var e=t.type;return e==="number"||e==="range"}function Ce(t){return t===""?null:+t}function Wt(t,e){const r=Ne(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];Be(t,Ge({name:"brain"},()=>r,{get iconNode(){return n},children:(s,l)=>{var i=be(),o=ke(i);qe(o,e,"default",{}),C(s,i)},$$slots:{default:!0}}))}function Ht(t,e){const r=Ne(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n=[["path",{d:"m6 9 6 6 6-6"}]];Be(t,Ge({name:"chevron-down"},()=>r,{get iconNode(){return n},children:(s,l)=>{var i=be(),o=ke(i);qe(o,e,"default",{}),C(s,i)},$$slots:{default:!0}}))}function Vt(t,e){const r=Ne(e,["children","$$slots","$$events","$$legacy"]);/**
 * @license lucide-svelte v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n=[["path",{d:"m9 18 6-6-6-6"}]];Be(t,Ge({name:"chevron-right"},()=>r,{get iconNode(){return n},children:(s,l)=>{var i=be(),o=ke(i);qe(o,e,"default",{}),C(s,i)},$$slots:{default:!0}}))}const je="-",Ft=t=>{const e=Dt(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const o=i.split(je);return o[0]===""&&o.length!==1&&o.shift(),gt(o,e)||Ut(i)},getConflictingClassGroupIds:(i,o)=>{const c=r[i]||[];return o&&n[i]?[...c,...n[i]]:c}}},gt=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?gt(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const l=t.join(je);return(i=e.validators.find(({validator:o})=>o(l)))==null?void 0:i.classGroupId},rt=/^\[(.+)\]$/,Ut=t=>{if(rt.test(t)){const e=rt.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Dt=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Jt(Object.entries(t.classGroups),r).forEach(([l,i])=>{Pe(i,n,l,e)}),n},Pe=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const l=s===""?e:nt(e,s);l.classGroupId=r;return}if(typeof s=="function"){if(Xt(s)){Pe(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([l,i])=>{Pe(i,nt(e,l),r,n)})})},nt=(t,e)=>{let r=t;return e.split(je).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Xt=t=>t.isThemeGetter,Jt=(t,e)=>e?t.map(([r,n])=>{const s=n.map(l=>typeof l=="string"?e+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([i,o])=>[e+i,o])):l);return[r,s]}):t,Kt=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(l,i)=>{r.set(l,i),e++,e>t&&(e=0,n=r,r=new Map)};return{get(l){let i=r.get(l);if(i!==void 0)return i;if((i=n.get(l))!==void 0)return s(l,i),i},set(l,i){r.has(l)?r.set(l,i):s(l,i)}}},ft="!",Yt=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],l=e.length,i=o=>{const c=[];let a=0,p=0,g;for(let b=0;b<o.length;b++){let y=o[b];if(a===0){if(y===s&&(n||o.slice(b,b+l)===e)){c.push(o.slice(p,b)),p=b+l;continue}if(y==="/"){g=b;continue}}y==="["?a++:y==="]"&&a--}const d=c.length===0?o:o.substring(p),u=d.startsWith(ft),f=u?d.substring(1):d,h=g&&g>p?g-p:void 0;return{modifiers:c,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:h}};return r?o=>r({className:o,parseClassName:i}):i},er=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},tr=t=>({cache:Kt(t.cacheSize),parseClassName:Yt(t),...Ft(t)}),rr=/\s+/,nr=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,l=[],i=t.trim().split(rr);let o="";for(let c=i.length-1;c>=0;c-=1){const a=i[c],{modifiers:p,hasImportantModifier:g,baseClassName:d,maybePostfixModifierPosition:u}=r(a);let f=!!u,h=n(f?d.substring(0,u):d);if(!h){if(!f){o=a+(o.length>0?" "+o:o);continue}if(h=n(d),!h){o=a+(o.length>0?" "+o:o);continue}f=!1}const b=er(p).join(":"),y=g?b+ft:b,R=y+h;if(l.includes(R))continue;l.push(R);const L=s(h,f);for(let $=0;$<L.length;++$){const W=L[$];l.push(y+W)}o=a+(o.length>0?" "+o:o)}return o};function sr(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=bt(e))&&(n&&(n+=" "),n+=r);return n}const bt=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=bt(t[n]))&&(r&&(r+=" "),r+=e);return r};function or(t,...e){let r,n,s,l=i;function i(c){const a=e.reduce((p,g)=>g(p),t());return r=tr(a),n=r.cache.get,s=r.cache.set,l=o,o(c)}function o(c){const a=n(c);if(a)return a;const p=nr(c,r);return s(c,p),p}return function(){return l(sr.apply(null,arguments))}}const v=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},kt=/^\[(?:([a-z-]+):)?(.+)\]$/i,lr=/^\d+\/\d+$/,ir=new Set(["px","full","screen"]),ar=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cr=/\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$/,ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=t=>V(t)||ir.has(t)||lr.test(t),q=t=>U(t,"length",wr),V=t=>!!t&&!Number.isNaN(Number(t)),$e=t=>U(t,"number",V),J=t=>!!t&&Number.isInteger(Number(t)),hr=t=>t.endsWith("%")&&V(t.slice(0,-1)),k=t=>kt.test(t),N=t=>ar.test(t),gr=new Set(["length","size","percentage"]),fr=t=>U(t,gr,mt),br=t=>U(t,"position",mt),kr=new Set(["image","url"]),mr=t=>U(t,kr,vr),xr=t=>U(t,"",yr),K=()=>!0,U=(t,e,r)=>{const n=kt.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},wr=t=>cr.test(t)&&!ur.test(t),mt=()=>!1,yr=t=>pr.test(t),vr=t=>dr.test(t),Sr=()=>{const t=v("colors"),e=v("spacing"),r=v("blur"),n=v("brightness"),s=v("borderColor"),l=v("borderRadius"),i=v("borderSpacing"),o=v("borderWidth"),c=v("contrast"),a=v("grayscale"),p=v("hueRotate"),g=v("invert"),d=v("gap"),u=v("gradientColorStops"),f=v("gradientColorStopPositions"),h=v("inset"),b=v("margin"),y=v("opacity"),R=v("padding"),L=v("saturate"),$=v("scale"),W=v("sepia"),H=v("skew"),B=v("space"),Xe=v("translate"),Re=()=>["auto","contain","none"],ze=()=>["auto","hidden","clip","visible","scroll"],_e=()=>["auto",k,e],S=()=>[k,e],Je=()=>["",E,q],ie=()=>["auto",V,k],Ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",k],et=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[V,k];return{cacheSize:500,separator:":",theme:{colors:[K],spacing:[E,q],blur:["none","",N,k],brightness:P(),borderColor:[t],borderRadius:["none","","full",N,k],borderSpacing:S(),borderWidth:Je(),contrast:P(),grayscale:D(),hueRotate:P(),invert:D(),gap:S(),gradientColorStops:[t],gradientColorStopPositions:[hr,q],inset:_e(),margin:_e(),opacity:P(),padding:S(),saturate:P(),scale:P(),sepia:D(),skew:P(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",k]}],container:["container"],columns:[{columns:[N]}],"break-after":[{"break-after":et()}],"break-before":[{"break-before":et()}],"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:[...Ke(),k]}],overflow:[{overflow:ze()}],"overflow-x":[{"overflow-x":ze()}],"overflow-y":[{"overflow-y":ze()}],overscroll:[{overscroll:Re()}],"overscroll-x":[{"overscroll-x":Re()}],"overscroll-y":[{"overscroll-y":Re()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",J,k]}],basis:[{basis:_e()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",k]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",J,k]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:["auto",{span:["full",J,k]},k]}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:["auto",{span:[J,k]},k]}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",k]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",k]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...Te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",k,e]}],"min-w":[{"min-w":[k,e,"min","max","fit"]}],"max-w":[{"max-w":[k,e,"none","full","min","max","fit","prose",{screen:[N]},N]}],h:[{h:[k,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[k,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[k,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[k,e,"auto","min","max","fit"]}],"font-size":[{text:["base",N,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[K]}],"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",k]}],"line-clamp":[{"line-clamp":["none",V,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",E,k]}],"list-image":[{"list-image":["none",k]}],"list-style-type":[{list:["none","disc","decimal",k]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",E,q]}],"underline-offset":[{"underline-offset":["auto",E,k]}],"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:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k]}],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",k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ke(),br]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mr]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-to":[{to:[u]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...ae(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:ae()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ae()]}],"outline-offset":[{"outline-offset":[E,k]}],"outline-w":[{outline:[E,q]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[E,q]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",N,xr]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ye()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",N,k]}],grayscale:[{grayscale:[a]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[L]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",k]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",k]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",k]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[J,k]}],"translate-x":[{"translate-x":[Xe]}],"translate-y":[{"translate-y":[Xe]}],"skew-x":[{"skew-x":[H]}],"skew-y":[{"skew-y":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k]}],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",k]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",k]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[E,q,$e]}],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"]}}},Rr=or(Sr);function ye(...t){return Rr(jt(t))}const zr={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"},_r={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"};var Tr=O("<a><!></a>"),Ar=O("<button><!></button>");function _n(t,e){me(e,!0);let r=z(e,"variant",3,"default"),n=z(e,"size",3,"default"),s=z(e,"class",3,""),l=z(e,"disabled",3,!1),i=z(e,"type",3,"button");const o=Mt(()=>ye("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",zr[r()],_r[n()],s()));var c=be(),a=ke(c);{var p=d=>{var u=Tr(),f=G(u);de(f,()=>e.children??pe),j(u),F(()=>{I(u,"href",e.href),se(u,1,oe(re(o))),I(u,"title",e.title)}),C(d,u)},g=d=>{var u=Ar();u.__click=function(...h){var b;(b=e.onclick)==null||b.apply(this,h)};var f=G(u);de(f,()=>e.children??pe),j(u),F(()=>{I(u,"type",i()),u.disabled=l(),se(u,1,oe(re(o))),I(u,"title",e.title)}),C(d,u)};Ie(a,d=>{e.href?d(p):d(g,!1)})}C(t,c),xe()}we(["click"]);var Cr=O("<div><!></div>");function Tn(t,e){me(e,!0);let r=z(e,"class",3,"");var n=Cr(),s=G(n);de(s,()=>e.children??pe),j(n),F(l=>se(n,1,l),[()=>oe(ye("rounded-lg border bg-card text-card-foreground shadow-sm",r()))]),C(t,n),xe()}var $r=O("<input/>");function An(t,e){me(e,!0);let r=z(e,"type",3,"text"),n=z(e,"value",15,""),s=z(e,"placeholder",3,""),l=z(e,"disabled",3,!1),i=z(e,"required",3,!1),o=z(e,"class",3,"");var c=$r();Zt(c),c.__input=function(...a){var p;(p=e.oninput)==null||p.apply(this,a)},c.__change=function(...a){var p;(p=e.onchange)==null||p.apply(this,a)},F(a=>{I(c,"type",r()),I(c,"placeholder",s()),c.disabled=l(),c.required=i(),I(c,"id",e.id),I(c,"name",e.name),se(c,1,a)},[()=>oe(ye("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 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",o()))]),Qt(c,n),C(t,c),xe()}we(["input","change"]);var Ir=O("<select><!></select>");function Cn(t,e){me(e,!0);let r=z(e,"value",15,""),n=z(e,"class",3,""),s=z(e,"disabled",3,!1);var l=Ir();l.__change=function(...o){var c;(c=e.onchange)==null||c.apply(this,o)};var i=G(l);de(i,()=>e.children??pe),j(l),F(o=>{I(l,"id",e.id),I(l,"name",e.name),l.disabled=s(),se(l,1,o)},[()=>oe(ye("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm 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",n()))]),Ot(l,r),C(t,l),xe()}we(["change"]);function Ze(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Q=Ze();function xt(t){Q=t}var ne={exec:()=>null};function m(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(s,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(_.caret,"$1"),r=r.replace(s,i),n},getRegex:()=>new RegExp(r,e)};return n}var Pr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Er=/^(?:[ \t]*(?:\n|$))+/,Mr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,le=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Br=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oe=/(?:[*+-]|\d{1,9}[.)])/,wt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yt=m(wt).replace(/bull/g,Oe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qr=m(wt).replace(/bull/g,Oe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Nr=/^[^\n]+/,We=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Gr=m(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",We).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jr=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oe).getRegex(),ve="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",He=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zr=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",He).replace("tag",ve).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vt=m(Qe).replace("hr",le).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ve).getRegex(),Or=m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vt).getRegex(),Ve={blockquote:Or,code:Mr,def:Gr,fences:Lr,heading:Br,hr:le,html:Zr,lheading:yt,list:jr,newline:Er,paragraph:vt,table:ne,text:Nr},st=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",le).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ve).getRegex(),Qr={...Ve,lheading:qr,table:st,paragraph:m(Qe).replace("hr",le).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",st).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ve).getRegex()},Wr={...Ve,html:m(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",He).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(Qe).replace("hr",le).replace("heading",` *#{1,6} *[^
]`).replace("lheading",yt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,St=/^( {2,}|\\)\n(?!\s*$)/,Fr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Se=/[\p{P}\p{S}]/u,Fe=/[\s\p{P}\p{S}]/u,Rt=/[^\s\p{P}\p{S}]/u,Ur=m(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fe).getRegex(),zt=/(?!~)[\p{P}\p{S}]/u,Dr=/(?!~)[\s\p{P}\p{S}]/u,Xr=/(?:[^\s\p{P}\p{S}]|~)/u,Jr=m(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_t=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kr=m(_t,"u").replace(/punct/g,Se).getRegex(),Yr=m(_t,"u").replace(/punct/g,zt).getRegex(),Tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",en=m(Tt,"gu").replace(/notPunctSpace/g,Rt).replace(/punctSpace/g,Fe).replace(/punct/g,Se).getRegex(),tn=m(Tt,"gu").replace(/notPunctSpace/g,Xr).replace(/punctSpace/g,Dr).replace(/punct/g,zt).getRegex(),rn=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rt).replace(/punctSpace/g,Fe).replace(/punct/g,Se).getRegex(),nn=m(/\\(punct)/,"gu").replace(/punct/g,Se).getRegex(),sn=m(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),on=m(He).replace("(?:-->|$)","-->").getRegex(),ln=m("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",on).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),he=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,an=m(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",he).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),At=m(/^!?\[(label)\]\[(ref)\]/).replace("label",he).replace("ref",We).getRegex(),Ct=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",We).getRegex(),cn=m("reflink|nolink(?!\\()","g").replace("reflink",At).replace("nolink",Ct).getRegex(),ot=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ue={_backpedal:ne,anyPunctuation:nn,autolink:sn,blockSkip:Jr,br:St,code:Vr,del:ne,emStrongLDelim:Kr,emStrongRDelimAst:en,emStrongRDelimUnd:rn,escape:Hr,link:an,nolink:Ct,punctuation:Ur,reflink:At,reflinkSearch:cn,tag:ln,text:Fr,url:ne},un={...Ue,link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",he).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he).getRegex()},Ee={...Ue,emStrongRDelimAst:tn,emStrongLDelim:Yr,url:m(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ot).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:m(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ot).getRegex()},pn={...Ee,br:m(St).replace("{2,}","*").getRegex(),text:m(Ee.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ce={normal:Ve,gfm:Qr,pedantic:Wr},Y={normal:Ue,gfm:Ee,breaks:pn,pedantic:un},dn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lt=t=>dn[t];function M(t,e){if(e){if(_.escapeTest.test(t))return t.replace(_.escapeReplace,lt)}else if(_.escapeTestNoEncode.test(t))return t.replace(_.escapeReplaceNoEncode,lt);return t}function it(t){try{t=encodeURI(t).replace(_.percentDecode,"%")}catch{return null}return t}function at(t,e){var l;let r=t.replace(_.findPipe,(i,o,c)=>{let a=!1,p=o;for(;--p>=0&&c[p]==="\\";)a=!a;return a?"|":" |"}),n=r.split(_.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((l=n.at(-1))!=null&&l.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(_.slashPipe,"|");return n}function ee(t,e,r){let n=t.length;if(n===0)return"";let s=0;for(;s<n&&t.charAt(n-s-1)===e;)s++;return t.slice(0,n-s)}function hn(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function ct(t,e,r,n,s){let l=e.href,i=e.title||null,o=t[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,c}function gn(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
`).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=s.length?l.slice(s.length):l}).join(`
`)}var ge=class{constructor(t){x(this,"options");x(this,"rules");x(this,"lexer");this.options=t||Q}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ee(r,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=gn(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=ee(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ee(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=ee(e[0],`
`).split(`
`),n="",s="",l=[];for(;r.length>0;){let i=!1,o=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))o.push(r[c]),i=!0;else if(!i)o.push(r[c]);else break;r=r.slice(c);let a=o.join(`
`),p=a.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${a}`:a,s=s?`${s}
${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=g,r.length===0)break;let d=l.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let u=d,f=u.raw+`
`+r.join(`
`),h=this.blockquote(f);l[l.length-1]=h,n=n.substring(0,n.length-u.raw.length)+h.raw,s=s.substring(0,s.length-u.text.length)+h.text;break}else if((d==null?void 0:d.type)==="list"){let u=d,f=u.raw+`
`+r.join(`
`),h=this.list(f);l[l.length-1]=h,n=n.substring(0,n.length-d.raw.length)+h.raw,s=s.substring(0,s.length-u.raw.length)+h.raw,r=f.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:l,text:s}}}list(t){var r,n;let e=this.rules.block.list.exec(t);if(e){let s=e[1].trim(),l=s.length>1,i={type:"list",raw:"",ordered:l,start:l?+s.slice(0,-1):"",loose:!1,items:[]};s=l?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=l?s:"[*+-]");let o=this.rules.other.listItemRegex(s),c=!1;for(;t;){let p=!1,g="",d="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;g=e[0],t=t.substring(g.length);let u=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),f=t.split(`
`,1)[0],h=!u.trim(),b=0;if(this.options.pedantic?(b=2,d=u.trimStart()):h?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=u.slice(b),b+=e[1].length),h&&this.rules.other.blankLine.test(f)&&(g+=f+`
`,t=t.substring(f.length+1),p=!0),!p){let y=this.rules.other.nextBulletRegex(b),R=this.rules.other.hrRegex(b),L=this.rules.other.fencesBeginRegex(b),$=this.rules.other.headingBeginRegex(b),W=this.rules.other.htmlBeginRegex(b);for(;t;){let H=t.split(`
`,1)[0],B;if(f=H,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,"  "),B=f):B=f.replace(this.rules.other.tabCharGlobal,"    "),L.test(f)||$.test(f)||W.test(f)||y.test(f)||R.test(f))break;if(B.search(this.rules.other.nonSpaceChar)>=b||!f.trim())d+=`
`+B.slice(b);else{if(h||u.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||L.test(u)||$.test(u)||R.test(u))break;d+=`
`+f}!h&&!f.trim()&&(h=!0),g+=H+`
`,t=t.substring(H.length+1),u=B.slice(b)}}i.loose||(c?i.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),i.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=g}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let p of i.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),((r=p.tokens[0])==null?void 0:r.type)==="text"||((n=p.tokens[0])==null?void 0:n.type)==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(p.raw);if(g){let d={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};p.checked=d.checked,i.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=d.raw+p.tokens[0].raw,p.tokens[0].text=d.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(d)):p.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):p.tokens.unshift(d)}}if(!i.loose){let g=p.tokens.filter(u=>u.type==="space"),d=g.length>0&&g.some(u=>this.rules.other.anyLine.test(u.raw));i.loose=d}}if(i.loose)for(let p of i.items){p.loose=!0;for(let g of p.tokens)g.type==="text"&&(g.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:s}}}table(t){var i;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=at(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(i=e[3])!=null&&i.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?l.align.push("right"):this.rules.other.tableAlignCenter.test(o)?l.align.push("center"):this.rules.other.tableAlignLeft.test(o)?l.align.push("left"):l.align.push(null);for(let o=0;o<r.length;o++)l.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:l.align[o]});for(let o of s)l.rows.push(at(o,l.header.length).map((c,a)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[a]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=ee(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=hn(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(n);l&&(n=l[1],s=l[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),ct(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return ct(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,l,i,o=s,c=0,a=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,e=e.slice(-1*t.length+s);(n=a.exec(e))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(i=[...l].length,n[3]||n[4]){o+=i;continue}else if((n[5]||n[6])&&s%3&&!((s+i)%3)){c+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+c);let p=[...n[0]][0].length,g=t.slice(0,s+n.index+p+i);if(Math.min(s,i)%2){let u=g.slice(1,-1);return{type:"em",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}let d=g.slice(2,-2);return{type:"strong",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let l;do l=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(l!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},T=class Me{constructor(e){x(this,"tokens");x(this,"options");x(this,"state");x(this,"inlineQueue");x(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Q,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:_,block:ce.normal,inline:Y.normal};this.options.pedantic?(r.block=ce.pedantic,r.inline=Y.pedantic):this.options.gfm&&(r.block=ce.gfm,this.options.breaks?r.inline=Y.breaks:r.inline=Y.gfm),this.tokenizer.rules=r}static get rules(){return{block:ce,inline:Y}}static lex(e,r){return new Me(r).lex(e)}static lexInline(e,r){return new Me(r).inlineTokens(e)}lex(e){e=e.replace(_.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var s,l,i;for(this.options.pedantic&&(e=e.replace(_.tabCharGlobal,"    ").replace(_.spaceLine,""));e;){let o;if((l=(s=this.options.extensions)==null?void 0:s.block)!=null&&l.some(a=>(o=a.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let a=r.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let a=r.at(-1);(a==null?void 0:a.type)==="paragraph"||(a==null?void 0:a.type)==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let c=e;if((i=this.options.extensions)!=null&&i.startBlock){let a=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(d=>{g=d.call({lexer:this},p),typeof g=="number"&&g>=0&&(a=Math.min(a,g))}),a<1/0&&a>=0&&(c=e.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let a=r.at(-1);n&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),n=c.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let a=r.at(-1);(a==null?void 0:a.type)==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var c,a,p,g,d;let n=e,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)l=s[2]?s[2].length:0,n=n.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((a=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:a.call({lexer:this},n))??n;let i=!1,o="";for(;e;){i||(o=""),i=!1;let u;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(h=>(u=h.call({lexer:this},e,r))?(e=e.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let h=r.at(-1);u.type==="text"&&(h==null?void 0:h.type)==="text"?(h.raw+=u.raw,h.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(e,n,o)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),r.push(u);continue}let f=e;if((d=this.options.extensions)!=null&&d.startInline){let h=1/0,b=e.slice(1),y;this.options.extensions.startInline.forEach(R=>{y=R.call({lexer:this},b),typeof y=="number"&&y>=0&&(h=Math.min(h,y))}),h<1/0&&h>=0&&(f=e.substring(0,h+1))}if(u=this.tokenizer.inlineText(f)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(o=u.raw.slice(-1)),i=!0;let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=u.raw,h.text+=u.text):r.push(u);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},fe=class{constructor(t){x(this,"options");x(this,"parser");this.options=t||Q}space(t){return""}code({text:t,lang:e,escaped:r}){var l;let n=(l=(e||"").match(_.notSpaceStart))==null?void 0:l[0],s=t.replace(_.endingNewline,"")+`
`;return n?'<pre><code class="language-'+M(n)+'">'+(r?s:M(s,!0))+`</code></pre>
`:"<pre><code>"+(r?s:M(s,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,r=t.start,n="";for(let i=0;i<t.items.length;i++){let o=t.items[i];n+=this.listitem(o)}let s=e?"ol":"ul",l=e&&r!==1?' start="'+r+'"':"";return"<"+s+l+`>
`+n+"</"+s+`>
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);e+=this.tablerow({text:r});let n="";for(let s=0;s<t.rows.length;s++){let l=t.rows[s];r="";for(let i=0;i<l.length;i++)r+=this.tablecell(l[i]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${M(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),s=it(t);if(s===null)return n;t=s;let l='<a href="'+t+'"';return e&&(l+=' title="'+M(e)+'"'),l+=">"+n+"</a>",l}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=it(t);if(s===null)return M(r);t=s;let l=`<img src="${t}" alt="${r}"`;return e&&(l+=` title="${M(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:M(t.text)}},De=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},A=class Le{constructor(e){x(this,"options");x(this,"renderer");x(this,"textRenderer");this.options=e||Q,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new De}static parse(e,r){return new Le(r).parse(e)}static parseInline(e,r){return new Le(r).parseInline(e)}parse(e){var n,s;let r="";for(let l=0;l<e.length;l++){let i=e[l];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[i.type]){let c=i,a=this.options.extensions.renderers[c.type].call({parser:this},c);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){r+=a||"";continue}}let o=i;switch(o.type){case"space":{r+=this.renderer.space(o);break}case"hr":{r+=this.renderer.hr(o);break}case"heading":{r+=this.renderer.heading(o);break}case"code":{r+=this.renderer.code(o);break}case"table":{r+=this.renderer.table(o);break}case"blockquote":{r+=this.renderer.blockquote(o);break}case"list":{r+=this.renderer.list(o);break}case"checkbox":{r+=this.renderer.checkbox(o);break}case"html":{r+=this.renderer.html(o);break}case"def":{r+=this.renderer.def(o);break}case"paragraph":{r+=this.renderer.paragraph(o);break}case"text":{r+=this.renderer.text(o);break}default:{let c='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(e,r=this.renderer){var s,l;let n="";for(let i=0;i<e.length;i++){let o=e[i];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=a||"";continue}}let c=o;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"checkbox":{n+=r.checkbox(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{let a='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},ue,te=(ue=class{constructor(t){x(this,"options");x(this,"block");this.options=t||Q}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?T.lex:T.lexInline}provideParser(){return this.block?A.parse:A.parseInline}},x(ue,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),x(ue,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ue),fn=class{constructor(...t){x(this,"defaults",Ze());x(this,"options",this.setOptions);x(this,"parse",this.parseMarkdown(!0));x(this,"parseInline",this.parseMarkdown(!1));x(this,"Parser",A);x(this,"Renderer",fe);x(this,"TextRenderer",De);x(this,"Lexer",T);x(this,"Tokenizer",ge);x(this,"Hooks",te);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(let l of t)switch(r=r.concat(e.call(this,l)),l.type){case"table":{let i=l;for(let o of i.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of i.rows)for(let c of o)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{let i=l;r=r.concat(this.walkTokens(i.items,e));break}default:{let i=l;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let c=i[o].flat(1/0);r=r.concat(this.walkTokens(c,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let l=e.renderers[s.name];l?e.renderers[s.name]=function(...i){let o=s.renderer.apply(this,i);return o===!1&&(o=l.apply(this,i)),o}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[s.level];l?l.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){let s=this.defaults.renderer||new fe(this.defaults);for(let l in r.renderer){if(!(l in s))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,o=r.renderer[i],c=s[i];s[i]=(...a)=>{let p=o.apply(s,a);return p===!1&&(p=c.apply(s,a)),p||""}}n.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new ge(this.defaults);for(let l in r.tokenizer){if(!(l in s))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,o=r.tokenizer[i],c=s[i];s[i]=(...a)=>{let p=o.apply(s,a);return p===!1&&(p=c.apply(s,a)),p}}n.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new te;for(let l in r.hooks){if(!(l in s))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,o=r.hooks[i],c=s[i];te.passThroughHooks.has(l)?s[i]=a=>{if(this.defaults.async&&te.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await o.call(s,a);return c.call(s,g)})();let p=o.call(s,a);return c.call(s,p)}:s[i]=(...a)=>{if(this.defaults.async)return(async()=>{let g=await o.apply(s,a);return g===!1&&(g=await c.apply(s,a)),g})();let p=o.apply(s,a);return p===!1&&(p=c.apply(s,a)),p}}n.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,l=r.walkTokens;n.walkTokens=function(i){let o=[];return o.push(l.call(this,i)),s&&(o=o.concat(s.call(this,i))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return T.lex(t,e??this.defaults)}parser(t,e){return A.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},s={...this.defaults,...n},l=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let i=s.hooks?await s.hooks.preprocess(e):e,o=await(s.hooks?await s.hooks.provideLexer():t?T.lex:T.lexInline)(i,s),c=s.hooks?await s.hooks.processAllTokens(o):o;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let a=await(s.hooks?await s.hooks.provideParser():t?A.parse:A.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(a):a})().catch(l);try{s.hooks&&(e=s.hooks.preprocess(e));let i=(s.hooks?s.hooks.provideLexer():t?T.lex:T.lexInline)(e,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let o=(s.hooks?s.hooks.provideParser():t?A.parse:A.parseInline)(i,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(i){return l(i)}}}onError(t,e){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+M(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Z=new fn;function w(t,e){return Z.parse(t,e)}w.options=w.setOptions=function(t){return Z.setOptions(t),w.defaults=Z.defaults,xt(w.defaults),w};w.getDefaults=Ze;w.defaults=Q;w.use=function(...t){return Z.use(...t),w.defaults=Z.defaults,xt(w.defaults),w};w.walkTokens=function(t,e){return Z.walkTokens(t,e)};w.parseInline=Z.parseInline;w.Parser=A;w.parser=A.parse;w.Renderer=fe;w.TextRenderer=De;w.Lexer=T;w.lexer=T.lex;w.Tokenizer=ge;w.Hooks=te;w.parse=w;w.options;w.setOptions;w.use;w.walkTokens;w.parseInline;A.parse;T.lex;var bn=O('<div class="px-3 py-2 text-sm text-muted-foreground bg-muted/20 whitespace-pre-wrap"> </div>'),kn=O('<div class="my-2 border border-muted rounded-lg overflow-hidden"><button type="button" class="w-full flex items-center gap-2 px-3 py-2 bg-muted/50 hover:bg-muted/70 transition-colors text-sm text-muted-foreground"><!> <!> <span>Thinking</span></button> <!></div>');function $n(t,e){let r=z(e,"defaultExpanded",3,!1),n=Lt(Bt(s()));function s(){return r()}var l=kn(),i=G(l);i.__click=()=>qt(n,!re(n));var o=G(i);{var c=u=>{Ht(u,{class:"w-4 h-4"})},a=u=>{Vt(u,{class:"w-4 h-4"})};Ie(o,u=>{re(n)?u(c):u(a,!1)})}var p=tt(o,2);Wt(p,{class:"w-4 h-4"}),Nt(2),j(i);var g=tt(i,2);{var d=u=>{var f=bn(),h=G(f,!0);j(f),F(()=>Gt(h,e.content)),C(u,f)};Ie(g,u=>{re(n)&&u(d)})}j(l),C(t,l)}we(["click"]);export{_n as B,Tn as C,An as I,Cn as S,$n as T,zn as b,ye as c,w as d};
