diff --git a/Cargo.lock b/Cargo.lock index a44eab9..7293100 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4536,7 +4536,7 @@ dependencies = [ [[package]] name = "rhombus" -version = "0.2.6" +version = "0.2.7" dependencies = [ "Inflector", "argon2", diff --git a/rhombus/Cargo.toml b/rhombus/Cargo.toml index ef012a1..bd7a386 100644 --- a/rhombus/Cargo.toml +++ b/rhombus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rhombus" -version = "0.2.6" +version = "0.2.7" edition = "2021" description = "Next generation extendable CTF framework with batteries included" authors = ["Mark Bundschuh "] diff --git a/rhombus/frontend/app.tsx b/rhombus/frontend/app.tsx index ccef9ac..f3b14a0 100644 --- a/rhombus/frontend/app.tsx +++ b/rhombus/frontend/app.tsx @@ -631,38 +631,49 @@ const ChallengesComponent = ({ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" - class="lucide lucide-layout-grid" + class="lucide lucide-expand" > - - - - + + + + - + innerHTML={challenge.description} + > +
+ + {(attachment) => ( + +
+ + + +
+ {attachment.name} +
+ )} +
+
); }} @@ -698,6 +709,10 @@ type ChallengesData = { points: number; solves: number; }[]; + attachments: { + name: string; + url: string; + }[]; }[]; categories: { id: number; diff --git a/rhombus/src/challenge_loader_plugin.rs b/rhombus/src/challenge_loader_plugin.rs index 0cd68aa..a750610 100644 --- a/rhombus/src/challenge_loader_plugin.rs +++ b/rhombus/src/challenge_loader_plugin.rs @@ -237,6 +237,19 @@ impl Plugin for ChallengeLoaderPlugin { tracing::info!(name = challenge.name); + let description = markdown::to_html_with_options( + &challenge.description, + &markdown::Options { + compile: markdown::CompileOptions { + allow_dangerous_html: true, + allow_dangerous_protocol: true, + ..markdown::CompileOptions::default() + }, + ..markdown::Options::default() + }, + ) + .unwrap(); + _ = tx .execute( " @@ -246,7 +259,7 @@ impl Plugin for ChallengeLoaderPlugin { params!( id, challenge.name.as_str(), - challenge.description.as_str(), + description.as_str(), challenge.flag.as_str(), category_id, author_id, @@ -314,7 +327,7 @@ impl Plugin for ChallengeLoaderPlugin { let url = context .upload_provider - .upload(src.file_name().unwrap().to_str().unwrap(), stream) + .upload(&file.dst, stream) .await .unwrap(); diff --git a/rhombus/src/internal/routes/challenges.rs b/rhombus/src/internal/routes/challenges.rs index 869a67c..27218a4 100644 --- a/rhombus/src/internal/routes/challenges.rs +++ b/rhombus/src/internal/routes/challenges.rs @@ -78,6 +78,10 @@ pub async fn route_challenges( "points": division_points.points, "solves": division_points.solves, })).collect::(), + "attachments": challenge.attachments.iter().map(|attachment| json!({ + "name": attachment.name, + "url": attachment.url, + })).collect::(), })).collect::(), "categories": challenge_data.categories.iter().map(|category| json!({ "id": category.id, @@ -167,19 +171,6 @@ pub async fn route_challenge_view( .find(|c| challenge.category_id.eq(&c.id)) .unwrap(); - let description = markdown::to_html_with_options( - &challenge.description, - &markdown::Options { - compile: markdown::CompileOptions { - allow_dangerous_html: true, - allow_dangerous_protocol: true, - ..markdown::CompileOptions::default() - }, - ..markdown::Options::default() - }, - ) - .unwrap(); - Html( state .jinja @@ -190,7 +181,6 @@ pub async fn route_challenge_view( page, user, challenge, - description, category, team, divisions => challenge_data.divisions, @@ -260,19 +250,6 @@ pub async fn route_ticket_view( state.settings.read().await.default_ticket_template.clone() }; - let description = markdown::to_html_with_options( - &challenge.description, - &markdown::Options { - compile: markdown::CompileOptions { - allow_dangerous_html: true, - allow_dangerous_protocol: true, - ..markdown::CompileOptions::default() - }, - ..markdown::Options::default() - }, - ) - .unwrap(); - Html( state .jinja @@ -283,7 +260,6 @@ pub async fn route_ticket_view( page, user, challenge, - description, category, team, ticket_template, diff --git a/rhombus/static/app.js b/rhombus/static/app.js index f21dac6..5b40af7 100644 --- a/rhombus/static/app.js +++ b/rhombus/static/app.js @@ -1,18 +1,5 @@ -var rhombus=(()=>{var Hu=Object.create;var ta=Object.defineProperty;var zu=Object.getOwnPropertyDescriptor;var ju=Object.getOwnPropertyNames;var Uu=Object.getPrototypeOf,_u=Object.prototype.hasOwnProperty;var ws=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kr=(e,t)=>{for(var n in t)ta(e,n,{get:t[n],enumerable:!0})},Cs=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ju(t))!_u.call(e,a)&&a!==n&&ta(e,a,{get:()=>t[a],enumerable:!(o=zu(t,a))||o.enumerable});return e};var vr=(e,t,n)=>(n=e!=null?Hu(Uu(e)):{},Cs(t||!e||!e.__esModule?ta(n,"default",{value:e,enumerable:!0}):n,e)),Ku=e=>Cs(ta({},"__esModule",{value:!0}),e);var Ti=ws((o8,L1)=>{L1.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var O1=ws((a8,F1)=>{"use strict";var Qa=Object.prototype.hasOwnProperty,T1=Object.prototype.toString,N1=Object.defineProperty,$1=Object.getOwnPropertyDescriptor,I1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):T1.call(t)==="[object Array]"},P1=function(t){if(!t||T1.call(t)!=="[object Object]")return!1;var n=Qa.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&Qa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var a;for(a in t);return typeof a>"u"||Qa.call(t,a)},A1=function(t,n){N1&&n.name==="__proto__"?N1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},D1=function(t,n){if(n==="__proto__")if(Qa.call(t,n)){if($1)return $1(t,n).value}else return;return t[n]};F1.exports=function e(){var t,n,o,a,r,i,s=arguments[0],c=1,l=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},c=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});c$g,toast:()=>Ze,translate:()=>fe});var te={context:void 0,registry:void 0};function wr(e){te.context=e}function Gu(){return{...te.context,id:`${te.context.id}${te.context.count++}-`,count:0}}var Wu=(e,t)=>e===t,Fe=Symbol("solid-proxy"),yo=Symbol("solid-track"),Ag=Symbol("solid-dev-component"),oa={equals:Wu},bs=null,Is=Fs,Qe=1,uo=2,Ps={owned:null,cleanups:null,context:null,owner:null},Mr={},ee=null,T=null,In=null,$n=null,re=null,Se=null,Te=null,ra=0;function ht(e,t){let n=re,o=ee,a=e.length===0,r=t===void 0?o:t,i=a?Ps:{owned:null,cleanups:null,context:r?r.context:null,owner:r},s=a?e:()=>e(()=>pe(()=>Ut(i)));ee=i,re=null;try{return Ue(s,!0)}finally{re=n,ee=o}}function H(e,t){t=t?Object.assign({},oa,t):oa;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},o=a=>(typeof a=="function"&&(T&&T.running&&T.sources.has(n)?a=a(n.tValue):a=a(n.value)),Ts(n,a));return[Ds.bind(n),o]}function Cr(e,t,n){let o=la(e,t,!0,Qe);In&&T&&T.running?Se.push(o):Pn(o)}function Q(e,t,n){let o=la(e,t,!1,Qe);In&&T&&T.running?Se.push(o):Pn(o)}function V(e,t,n){Is=Qu;let o=la(e,t,!1,Qe),a=ho&&Ne(ho);a&&(o.suspense=a),(!n||!n.render)&&(o.user=!0),Te?Te.push(o):Pn(o)}function U(e,t,n){n=n?Object.assign({},oa,n):oa;let o=la(e,t,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,In&&T&&T.running?(o.tState=Qe,Se.push(o)):Pn(o),Ds.bind(o)}function Zu(e){return e&&typeof e=="object"&&"then"in e}function Lr(e,t,n){let o,a,r;arguments.length===2&&typeof t=="object"||arguments.length===1?(o=!0,a=e,r=t||{}):(o=e,a=t,r=n||{});let i=null,s=Mr,c=null,l=!1,d=!1,u="initialValue"in r,h=typeof o=="function"&&U(o),p=new Set,[y,m]=(r.storage||H)(r.initialValue),[w,f]=H(void 0),[C,b]=H(void 0,{equals:!1}),[A,O]=H(u?"ready":"unresolved");if(te.context){c=`${te.context.id}${te.context.count++}`;let M;r.ssrLoadFrom==="initial"?s=r.initialValue:te.load&&(M=te.load(c))&&(s=M)}function x(M,N,S,I){return i===M&&(i=null,I!==void 0&&(u=!0),(M===s||N===s)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(I,{value:N})),s=Mr,T&&M&&l?(T.promises.delete(M),l=!1,Ue(()=>{T.running=!0,F(N,S)},!1)):F(N,S)),N}function F(M,N){Ue(()=>{N===void 0&&m(()=>M),O(N!==void 0?"errored":u?"ready":"unresolved"),f(N);for(let S of p.keys())S.decrement();p.clear()},!1)}function q(){let M=ho&&Ne(ho),N=y(),S=w();if(S!==void 0&&!i)throw S;return re&&!re.user&&M&&Cr(()=>{C(),i&&(M.resolved&&T&&l?T.promises.add(i):p.has(M)||(M.increment(),p.add(M)))}),N}function L(M=!0){if(M!==!1&&d)return;d=!1;let N=h?h():o;if(l=T&&T.running,N==null||N===!1){x(i,pe(y));return}T&&i&&T.promises.delete(i);let S=s!==Mr?s:pe(()=>a(N,{value:y(),refetching:M}));return Zu(S)?(i=S,"value"in S?(S.status==="success"?x(i,S.value,void 0,N):x(i,void 0,void 0,N),S):(d=!0,queueMicrotask(()=>d=!1),Ue(()=>{O(u?"refreshing":"pending"),b()},!1),S.then(I=>x(S,I,void 0,N),I=>x(S,void 0,Es(I),N)))):(x(i,S,void 0,N),S)}return Object.defineProperties(q,{state:{get:()=>A()},error:{get:()=>w()},loading:{get(){let M=A();return M==="pending"||M==="refreshing"}},latest:{get(){if(!u)return q();let M=w();if(M&&!i)throw M;return y()}}}),h?Cr(()=>L(!1)):L(!1),[q,{refetch:L,mutate:m}]}function Nr(e){return Ue(e,!1)}function pe(e){if(!$n&&re===null)return e();let t=re;re=null;try{return $n?$n.untrack(e):e()}finally{re=t}}function pt(e,t,n){let o=Array.isArray(e),a,r=n&&n.defer;return i=>{let s;if(o){s=Array(e.length);for(let l=0;lt(s,a,i));return a=s,c}}function Pe(e){V(()=>pe(e))}function _(e){return ee===null||(ee.cleanups===null?ee.cleanups=[e]:ee.cleanups.push(e)),e}function ia(){return re}function sa(){return ee}function As(e,t){let n=ee,o=re;ee=e,re=null;try{return Ue(t,!0)}catch(a){da(a)}finally{ee=n,re=o}}function Xu(e){if(T&&T.running)return e(),T.done;let t=re,n=ee;return Promise.resolve().then(()=>{re=t,ee=n;let o;return(In||ho)&&(o=T||(T={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),o.done||(o.done=new Promise(a=>o.resolve=a)),o.running=!0),Ue(e,!1),re=ee=null,o?o.done:void 0})}var[Dg,Ss]=H(!1);function K(e,t){let n=Symbol("context");return{id:n,Provider:e2(n),defaultValue:e}}function Ne(e){return ee&&ee.context&&ee.context[e.id]!==void 0?ee.context[e.id]:e.defaultValue}function ca(e){let t=U(e),n=U(()=>br(t()));return n.toArray=()=>{let o=n();return Array.isArray(o)?o:o!=null?[o]:[]},n}var ho;function Ds(){let e=T&&T.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Qe)Pn(this);else{let t=Se;Se=null,Ue(()=>aa(this),!1),Se=t}if(re){let t=this.observers?this.observers.length:0;re.sources?(re.sources.push(this),re.sourceSlots.push(t)):(re.sources=[this],re.sourceSlots=[t]),this.observers?(this.observers.push(re),this.observerSlots.push(re.sources.length-1)):(this.observers=[re],this.observerSlots=[re.sources.length-1])}return e&&T.sources.has(this)?this.tValue:this.value}function Ts(e,t,n){let o=T&&T.running&&T.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(o,t)){if(T){let a=T.running;(a||!n&&T.sources.has(e))&&(T.sources.add(e),e.tValue=t),a||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Ue(()=>{for(let a=0;a1e6)throw Se=[],new Error},!1)}return t}function Pn(e){if(!e.fn)return;Ut(e);let t=ra;Ls(e,T&&T.running&&T.sources.has(e)?e.tValue:e.value,t),T&&!T.running&&T.sources.has(e)&&queueMicrotask(()=>{Ue(()=>{T&&(T.running=!0),re=ee=e,Ls(e,e.tValue,t),re=ee=null},!1)})}function Ls(e,t,n){let o,a=ee,r=re;re=ee=e;try{o=e.fn(t)}catch(i){return e.pure&&(T&&T.running?(e.tState=Qe,e.tOwned&&e.tOwned.forEach(Ut),e.tOwned=void 0):(e.state=Qe,e.owned&&e.owned.forEach(Ut),e.owned=null)),e.updatedAt=n+1,da(i)}finally{re=r,ee=a}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Ts(e,o,!0):T&&T.running&&e.pure?(T.sources.add(e),e.tValue=o):e.value=o,e.updatedAt=n)}function la(e,t,n,o=Qe,a){let r={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ee,context:ee?ee.context:null,pure:n};if(T&&T.running&&(r.state=0,r.tState=o),ee===null||ee!==Ps&&(T&&T.running&&ee.pure?ee.tOwned?ee.tOwned.push(r):ee.tOwned=[r]:ee.owned?ee.owned.push(r):ee.owned=[r]),$n&&r.fn){let[i,s]=H(void 0,{equals:!1}),c=$n.factory(r.fn,s);_(()=>c.dispose());let l=()=>Xu(s).then(()=>d.dispose()),d=$n.factory(r.fn,l);r.fn=u=>(i(),T&&T.running?d.track(u):c.track(u))}return r}function po(e){let t=T&&T.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===uo)return aa(e);if(e.suspense&&pe(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;o--){if(e=n[o],t){let a=e,r=n[o+1];for(;(a=a.owner)&&a!==r;)if(T.disposed.has(a))return}if((t?e.tState:e.state)===Qe)Pn(e);else if((t?e.tState:e.state)===uo){let a=Se;Se=null,Ue(()=>aa(e,n[0]),!1),Se=a}}}function Ue(e,t){if(Se)return e();let n=!1;t||(Se=[]),Te?n=!0:Te=[],ra++;try{let o=e();return Yu(n),o}catch(o){n||(Te=null),Se=null,da(o)}}function Yu(e){if(Se&&(In&&T&&T.running?Ju(Se):Fs(Se),Se=null),e)return;let t;if(T){if(!T.promises.size&&!T.queue.size){let o=T.sources,a=T.disposed;Te.push.apply(Te,T.effects),t=T.resolve;for(let r of Te)"tState"in r&&(r.state=r.tState),delete r.tState;T=null,Ue(()=>{for(let r of a)Ut(r);for(let r of o){if(r.value=r.tValue,r.owned)for(let i=0,s=r.owned.length;iIs(n),!1),t&&t()}function Fs(e){for(let t=0;t{o.delete(n),Ue(()=>{T.running=!0,po(n)},!1),T&&(T.running=!1)}))}}function Qu(e){let t,n=0;for(t=0;t=0;t--)Ut(e.tOwned[t]);delete e.tOwned}Rs(e,!0)}else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ut(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}T&&T.running?e.tState=0:e.state=0}function Rs(e,t){if(t||(e.tState=0,T.disposed.add(e)),e.owned)for(let n=0;na=pe(()=>(ee.context={...ee.context,[e]:o.value},ca(()=>o.children))),void 0),a}}var t2=Symbol("fallback");function $s(e){for(let t=0;t1?[]:null;return _(()=>$s(r)),()=>{let c=e()||[],l,d;return c[yo],pe(()=>{let h=c.length,p,y,m,w,f,C,b,A,O;if(h===0)i!==0&&($s(r),r=[],o=[],a=[],i=0,s&&(s=[])),n.fallback&&(o=[t2],a[0]=ht(x=>(r[0]=x,n.fallback())),i=1);else if(i===0){for(a=new Array(h),d=0;d=C&&A>=C&&o[b]===c[A];b--,A--)m[A]=a[b],w[A]=r[b],s&&(f[A]=s[b]);for(p=new Map,y=new Array(A+1),d=A;d>=C;d--)O=c[d],l=p.get(O),y[d]=l===void 0?-1:l,p.set(O,d);for(l=C;l<=b;l++)O=o[l],d=p.get(O),d!==void 0&&d!==-1?(m[d]=a[l],w[d]=r[l],s&&(f[d]=s[l]),d=y[d],p.set(O,d)):r[l]();for(d=C;de(t||{}));return wr(n),o}return pe(()=>e(t||{}))}function na(){return!0}var Sr={get(e,t,n){return t===Fe?n:e.get(t)},has(e,t){return t===Fe?!0:e.has(t)},set:na,deleteProperty:na,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:na,deleteProperty:na}},ownKeys(e){return e.keys()}};function xr(e){return(e=typeof e=="function"?e():e)?e:{}}function a2(){for(let e=0,t=this.length;e=0;s--){let c=xr(e[s])[i];if(c!==void 0)return c}},has(i){for(let s=e.length-1;s>=0;s--)if(i in xr(e[s]))return!0;return!1},keys(){let i=[];for(let s=0;s=0;i--){let s=e[i];if(!s)continue;let c=Object.getOwnPropertyNames(s);for(let l=c.length-1;l>=0;l--){let d=c[l];if(d==="__proto__"||d==="constructor")continue;let u=Object.getOwnPropertyDescriptor(s,d);if(!o[d])o[d]=u.get?{enumerable:!0,configurable:!0,get:a2.bind(n[d]=[u.get.bind(s)])}:u.value!==void 0?u:void 0;else{let h=n[d];h&&(u.get?h.push(u.get.bind(s)):u.value!==void 0&&h.push(()=>u.value))}}}let a={},r=Object.keys(o);for(let i=r.length-1;i>=0;i--){let s=r[i],c=o[s];c&&c.get?Object.defineProperty(a,s,c):a[s]=c?c.value:void 0}return a}function Y(e,...t){if(Fe in e){let a=new Set(t.length>1?t.flat():t[0]),r=t.map(i=>new Proxy({get(s){return i.includes(s)?e[s]:void 0},has(s){return i.includes(s)&&s in e},keys(){return i.filter(s=>s in e)}},Sr));return r.push(new Proxy({get(i){return a.has(i)?void 0:e[i]},has(i){return a.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!a.has(i))}},Sr)),r}let n={},o=t.map(()=>({}));for(let a of Object.getOwnPropertyNames(e)){let r=Object.getOwnPropertyDescriptor(e,a),i=!r.get&&!r.set&&r.enumerable&&r.writable&&r.configurable,s=!1,c=0;for(let l of t)l.includes(a)&&(s=!0,i?o[c][a]=r.value:Object.defineProperty(o[c],a,r)),++c;s||(i?n[a]=r.value:Object.defineProperty(n,a,r))}return[...o,n]}var r2=0;function Ve(){let e=te.context;return e?`${e.id}${e.count++}`:`cl-${r2++}`}var Bs=e=>`Stale read from <${e}>.`;function He(e){let t="fallback"in e&&{fallback:()=>e.fallback};return U(n2(()=>e.each,e.children,t||void 0))}function ae(e){let t=e.keyed,n=U(()=>e.when,void 0,{equals:(o,a)=>t?o===a:!o==!a});return U(()=>{let o=n();if(o){let a=e.children;return typeof a=="function"&&a.length>0?pe(()=>a(t?o:()=>{if(!pe(n))throw Bs("Show");return e.when})):a}return e.fallback},void 0,void 0)}function An(e){let t=!1,n=(r,i)=>(t?r[1]===i[1]:!r[1]==!i[1])&&r[2]===i[2],o=ca(()=>e.children),a=U(()=>{let r=o();Array.isArray(r)||(r=[r]);for(let i=0;i{let[r,i,s]=a();if(r<0)return e.fallback;let c=s.children;return typeof c=="function"&&c.length>0?pe(()=>c(t?i:()=>{if(pe(a)[0]!==r)throw Bs("Match");return s.when})):c},void 0,void 0)}function wt(e){return e}var Tg=K();var s2=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],c2=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...s2]),l2=new Set(["innerHTML","textContent","innerText","children"]),d2=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),u2=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function h2(e,t){let n=u2[e];return typeof n=="object"?n[t]?n.$:void 0:n}var p2=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),y2=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),f2={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function m2(e,t,n){let o=n.length,a=t.length,r=o,i=0,s=0,c=t[a-1].nextSibling,l=null;for(;id-s){let y=t[i];for(;s{a=r,t===document?e():z(t,e(),t.firstChild?null:void 0,n)},o.owner),()=>{a(),t.textContent=""}}function ne(e,t,n){let o,a=()=>{let i=document.createElement("template");return i.innerHTML=e,n?i.content.firstChild.firstChild:i.content.firstChild},r=t?()=>pe(()=>document.importNode(o||(o=a()),!0)):()=>(o||(o=a())).cloneNode(!0);return r.cloneNode=r,r}function ha(e,t=window.document){let n=t[qs]||(t[qs]=new Set);for(let o=0,a=e.length;oa.call(e,n[1],r))}else e.addEventListener(t,n)}function v2(e,t,n={}){let o=Object.keys(t||{}),a=Object.keys(n),r,i;for(r=0,i=a.length;ra.children=Tn(e,t.children,a.children)),Q(()=>typeof t.ref=="function"?Tt(t.ref,e):t.ref=e),Q(()=>M2(e,t,n,!0,a,!0)),a}function Tt(e,t,n){return pe(()=>e(t,n))}function z(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return Tn(e,t,o,n);Q(a=>Tn(e,t(),a,n),o)}function M2(e,t,n,o,a={},r=!1){t||(t={});for(let i in a)if(!(i in t)){if(i==="children")continue;a[i]=Hs(e,i,null,a[i],n,r)}for(let i in t){if(i==="children"){o||Tn(e,t.children);continue}let s=t[i];a[i]=Hs(e,i,s,a[i],n,r)}}function x2(e){let t,n;return!te.context||!(t=te.registry.get(n=b2()))?e():(te.completed&&te.completed.add(t),te.registry.delete(n),t)}function w2(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Vs(e,t,n){let o=t.trim().split(/\s+/);for(let a=0,r=o.length;a-1&&f2[t.split(":")[0]];u?g2(e,u,t,n):me(e,d2[t]||t,n)}return n}function C2(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),te.registry&&!te.done&&(te.done=_$HY.done=!0);n;){let o=n[t];if(o&&!n.disabled){let a=n[`${t}Data`];if(a!==void 0?o.call(n,a,e):o.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Tn(e,t,n,o,a){let r=!!te.context&&e.isConnected;if(r){!n&&(n=[...e.childNodes]);let c=[];for(let l=0;l{let c=t();for(;typeof c=="function";)c=c();n=Tn(e,c,n,o)}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if($r(c,t,n,a))return Q(()=>n=Tn(e,c,n,o,!0)),()=>n;if(r){if(!c.length)return n;if(o===void 0)return[...e.childNodes];let d=c[0],u=[d];for(;(d=d.nextSibling)!==o;)u.push(d);return n=u}if(c.length===0){if(n=Dn(e,n,o),s)return n}else l?n.length===0?zs(e,c,o):m2(e,n,c):(n&&Dn(e),zs(e,c));n=c}else if(t.nodeType){if(r&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Dn(e,n,o,t);Dn(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function $r(e,t,n,o){let a=!1;for(let r=0,i=t.length;r=0;i--){let s=t[i];if(a!==s){let c=s.parentNode===e;!r&&!i?c?e.replaceChild(a,s):e.insertBefore(a,n):c&&s.remove()}else r=!0}}else e.insertBefore(a,n);return[a]}function b2(){let e=te.context;return`${e.id}${e.count++}`}var Vg=Symbol();var le=!1;var S2="http://www.w3.org/2000/svg";function js(e,t=!1){return t?document.createElementNS(S2,e):document.createElement(e)}function Fn(e){let{useShadow:t}=e,n=document.createTextNode(""),o=()=>e.mount||document.body,a=sa(),r,i=!!te.context;return V(()=>{i&&(sa().user=i=!1),r||(r=As(a,()=>U(()=>e.children)));let s=o();if(s instanceof HTMLHeadElement){let[c,l]=H(!1),d=()=>l(!0);ht(u=>z(s,()=>c()?u():r(),null)),_(d)}else{let c=js(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),z(l,r),s.appendChild(c),e.ref&&e.ref(c),_(()=>s.removeChild(c))}},void 0,{render:!i}),n}function yt(e){let[t,n]=Y(e,["component"]),o=U(()=>t.component);return U(()=>{let a=o();switch(typeof a){case"function":return pe(()=>a(n));case"string":let r=y2.has(a),i=te.context?x2():js(a,r);return Me(i,n,r),i}})}function On(e){return(...t)=>{for(let n of e)n&&n(...t)}}function Ir(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){let o=e[n];o&&o(...t)}}}var ie=e=>typeof e=="function"&&!e.length?e():e;function Rn(e,...t){return typeof e=="function"?e(...t):e}function pa(){return!0}var N2={get(e,t,n){return t===Fe?n:e.get(t)},has(e,t){return e.has(t)},set:pa,deleteProperty:pa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:pa,deleteProperty:pa}},ownKeys(e){return e.keys()}};var $2=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Us(e){let t={},n;for(;n=$2.exec(e);)t[n[1]]=n[2];return t}function I2(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Us(e)}else typeof t=="string"&&(t=Us(t));return{...e,...t}}var Pr=(e,t,n)=>{let o;for(let a of e){let r=ie(a)[t];o?r&&(o=n(o,r)):o=r}return o};function Ar(...e){let t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];let o=t&&e[1]?.reverseEventHandlers?Ir:On,a={};for(let i of n){let s=ie(i);for(let c in s)if(c[0]==="o"&&c[1]==="n"&&c[2]){let l=s[c],d=c.toLowerCase(),u=typeof l=="function"?l:Array.isArray(l)?l.length===1?l[0]:l[0].bind(void 0,l[1]):void 0;u?a[d]?a[d].push(u):a[d]=[u]:delete a[d]}}let r=R(...n);return new Proxy({get(i){if(typeof i!="string")return Reflect.get(r,i);if(i==="style")return Pr(n,"style",I2);if(i==="ref"){let s=[];for(let c of n){let l=ie(c)[i];typeof l=="function"&&s.push(l)}return o(s)}if(i[0]==="o"&&i[1]==="n"&&i[2]){let s=a[i.toLowerCase()];return s?o(s):Reflect.get(r,i)}return i==="class"||i==="className"?Pr(n,i,(s,c)=>`${s} ${c}`):i==="classList"?Pr(n,i,(s,c)=>({...s,...c})):Reflect.get(r,i)},has(i){return Reflect.has(r,i)},keys(){return Object.keys(r)}},N2)}function ge(...e){return On(e)}function En(e,t){let n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ws(e){return Array.isArray(e)}function fa(e){return Object.prototype.toString.call(e)==="[object String]"}function Zs(e){return typeof e=="function"}function Bn(e){return t=>`${e()}-${t}`}function he(e,t){return e?e===t||e.contains(t):!1}function ft(e,t=!1){let{activeElement:n}=ke(e);if(!n?.nodeName)return null;if(Xs(n)&&n.contentDocument)return ft(n.contentDocument.body,t);if(t){let o=n.getAttribute("aria-activedescendant");if(o){let a=ke(n).getElementById(o);if(a)return a}}return n}function mo(e){return ke(e).defaultView||window}function ke(e){return e?e.ownerDocument||e:document}function Xs(e){return e.tagName==="IFRAME"}var go=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(go||{});function P2(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Ys(){return P2(/^Mac/i)}function Oe(e,t){return t&&(Zs(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function qn(e){return t=>{for(let n of e)Oe(t,n)}}function ma(e){return Ys()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Ce(e){if(e)if(A2())e.focus({preventScroll:!0});else{let t=D2(e);e.focus(),T2(t)}}var ya=null;function A2(){if(ya==null){ya=!1;try{document.createElement("div").focus({get preventScroll(){return ya=!0,!0}})}catch{}}return ya}function D2(e){let t=e.parentNode,n=[],o=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight{if(Xs(a)&&a.contentDocument){let i=a.contentDocument.body,s=ko(i,!1);o.splice(r,1,...s)}}),o}function _s(e){return vo(e)&&!O2(e)}function vo(e){return e.matches(Qs)&&ec(e)}function O2(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function ec(e,t){return e.nodeName!=="#comment"&&R2(e)&&E2(e,t)&&(!e.parentElement||ec(e.parentElement,e))}function R2(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,o=t!=="none"&&n!=="hidden"&&n!=="collapse";if(o){if(!e.ownerDocument.defaultView)return o;let{getComputedStyle:a}=e.ownerDocument.defaultView,{display:r,visibility:i}=a(e);o=r!=="none"&&i!=="hidden"&&i!=="collapse"}return o}function E2(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function ga(){}function Dr(e){return[e.clientX,e.clientY]}function Tr(e,t){let[n,o]=e,a=!1,r=t.length;for(let i=r,s=0,c=i-1;s=h&&o0&&(o===h?o>p&&(a=!a):a=!a)}}else if(dd&&o<=h){if(y===0)return!0;y<0&&(o===h?o=u&&n<=l||n>=l&&n<=u))return!0}return a}function ve(e,t){return R(e,t)}var fo=new Map,Ks=new Set;function Gs(){if(typeof window>"u")return;let e=n=>{if(!n.target)return;let o=fo.get(n.target);o||(o=new Set,fo.set(n.target,o),n.target.addEventListener("transitioncancel",t)),o.add(n.propertyName)},t=n=>{if(!n.target)return;let o=fo.get(n.target);if(o&&(o.delete(n.propertyName),o.size===0&&(n.target.removeEventListener("transitioncancel",t),fo.delete(n.target)),fo.size===0)){for(let a of Ks)a();Ks.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Gs():document.addEventListener("DOMContentLoaded",Gs));var ka={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};var B2=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),q2=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function V2(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script??"";return B2.has(n)}let t=e.split("-")[0];return q2.has(t)}function H2(e){return V2(e)?"rtl":"ltr"}function nc(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:H2(e)}}var Fr=nc(),Mo=new Set;function tc(){Fr=nc();for(let e of Mo)e(Fr)}function z2(){let e={locale:"en-US",direction:"ltr"},[t,n]=H(Fr),o=U(()=>le?e:t());return Pe(()=>{Mo.size===0&&window.addEventListener("languagechange",tc),Mo.add(n),_(()=>{Mo.delete(n),Mo.size===0&&window.removeEventListener("languagechange",tc)})}),{locale:()=>o().locale,direction:()=>o().direction}}var j2=K();function oc(){let e=z2();return Ne(j2)||e}function et(e){let[t,n]=Y(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return g(yt,R({get component(){return t.as}},n))}var ac=["top","right","bottom","left"];var Ct=Math.min,ze=Math.max,wo=Math.round,Co=Math.floor,Ft=e=>({x:e,y:e}),U2={left:"right",right:"left",bottom:"top",top:"bottom"},_2={start:"end",end:"start"};function Ma(e,t,n){return ze(e,Ct(t,n))}function _t(e,t){return typeof e=="function"?e(t):e}function Ot(e){return e.split("-")[0]}function sn(e){return e.split("-")[1]}function Or(e){return e==="x"?"y":"x"}function xa(e){return e==="y"?"height":"width"}function Vn(e){return["top","bottom"].includes(Ot(e))?"y":"x"}function wa(e){return Or(Vn(e))}function rc(e,t,n){n===void 0&&(n=!1);let o=sn(e),a=wa(e),r=xa(a),i=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=xo(i)),[i,xo(i)]}function ic(e){let t=xo(e);return[va(e),t,va(t)]}function va(e){return e.replace(/start|end/g,t=>_2[t])}function K2(e,t,n){let o=["left","right"],a=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:o:t?o:a;case"left":case"right":return t?r:i;default:return[]}}function sc(e,t,n,o){let a=sn(e),r=K2(Ot(e),n==="start",o);return a&&(r=r.map(i=>i+"-"+a),t&&(r=r.concat(r.map(va)))),r}function xo(e){return e.replace(/left|right|bottom|top/g,t=>U2[t])}function G2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rr(e){return typeof e!="number"?G2(e):{top:e,right:e,bottom:e,left:e}}function cn(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function cc(e,t,n){let{reference:o,floating:a}=e,r=Vn(t),i=wa(t),s=xa(i),c=Ot(t),l=r==="y",d=o.x+o.width/2-a.width/2,u=o.y+o.height/2-a.height/2,h=o[s]/2-a[s]/2,p;switch(c){case"top":p={x:d,y:o.y-a.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-a.width,y:u};break;default:p={x:o.x,y:o.y}}switch(sn(t)){case"start":p[i]-=h*(n&&l?-1:1);break;case"end":p[i]+=h*(n&&l?-1:1);break}return p}var uc=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,s=r.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t)),l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:u}=cc(l,o,c),h=o,p={},y=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:a,rects:r,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:d=0}=_t(e,t)||{};if(l==null)return{};let u=Rr(d),h={x:n,y:o},p=wa(a),y=xa(p),m=await i.getDimensions(l),w=p==="y",f=w?"top":"left",C=w?"bottom":"right",b=w?"clientHeight":"clientWidth",A=r.reference[y]+r.reference[p]-h[p]-r.floating[y],O=h[p]-r.reference[p],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l)),F=x?x[b]:0;(!F||!await(i.isElement==null?void 0:i.isElement(x)))&&(F=s.floating[b]||r.floating[y]);let q=A/2-O/2,L=F/2-m[y]/2-1,M=Ct(u[f],L),N=Ct(u[C],L),S=M,I=F-m[y]-N,$=F/2-m[y]/2+q,B=Ma(S,$,I),W=!c.arrow&&sn(a)!=null&&$!==B&&r.reference[y]/2-($S<=0)){var L,M;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,I=O[S];if(I)return{data:{index:S,overflows:q},reset:{placement:I}};let $=(M=q.filter(B=>B.overflows[0]<=0).sort((B,W)=>B.overflows[1]-W.overflows[1])[0])==null?void 0:M.placement;if(!$)switch(p){case"bestFit":{var N;let B=(N=q.map(W=>[W.placement,W.overflows.filter(oe=>oe>0).reduce((oe,qe)=>oe+qe,0)]).sort((W,oe)=>W[1]-oe[1])[0])==null?void 0:N[0];B&&($=B);break}case"initialPlacement":$=s;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function lc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dc(e){return ac.some(t=>e[t]>=0)}var yc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:o="referenceHidden",...a}=_t(e,t);switch(o){case"referenceHidden":{let r=await Hn(t,{...a,elementContext:"reference"}),i=lc(r,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:dc(i)}}}case"escaped":{let r=await Hn(t,{...a,altBoundary:!0}),i=lc(r,n.floating);return{data:{escapedOffsets:i,escaped:dc(i)}}}default:return{}}}}};async function W2(e,t){let{placement:n,platform:o,elements:a}=e,r=await(o.isRTL==null?void 0:o.isRTL(a.floating)),i=Ot(n),s=sn(n),c=Vn(n)==="y",l=["left","top"].includes(i)?-1:1,d=r&&c?-1:1,u=_t(t,e),{mainAxis:h,crossAxis:p,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return s&&typeof y=="number"&&(p=s==="end"?y*-1:y),c?{x:p*d,y:h*l}:{x:h*l,y:p*d}}var fc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;let{x:a,y:r,placement:i,middlewareData:s}=t,c=await W2(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:a+c.x,y:r+c.y,data:{...c,placement:i}}}}},mc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:s={fn:w=>{let{x:f,y:C}=w;return{x:f,y:C}}},...c}=_t(e,t),l={x:n,y:o},d=await Hn(t,c),u=Vn(Ot(a)),h=Or(u),p=l[h],y=l[u];if(r){let w=h==="y"?"top":"left",f=h==="y"?"bottom":"right",C=p+d[w],b=p-d[f];p=Ma(C,p,b)}if(i){let w=u==="y"?"top":"left",f=u==="y"?"bottom":"right",C=y+d[w],b=y-d[f];y=Ma(C,y,b)}let m=s.fn({...t,[h]:p,[u]:y});return{...m,data:{x:m.x-n,y:m.y-o}}}}};var gc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:o,platform:a,elements:r}=t,{apply:i=()=>{},...s}=_t(e,t),c=await Hn(t,s),l=Ot(n),d=sn(n),u=Vn(n)==="y",{width:h,height:p}=o.floating,y,m;l==="top"||l==="bottom"?(y=l,m=d===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(m=l,y=d==="end"?"top":"bottom");let w=p-c[y],f=h-c[m],C=!t.middlewareData.shift,b=w,A=f;if(u){let x=h-c.left-c.right;A=d||C?Ct(f,x):x}else{let x=p-c.top-c.bottom;b=d||C?Ct(w,x):x}if(C&&!d){let x=ze(c.left,0),F=ze(c.right,0),q=ze(c.top,0),L=ze(c.bottom,0);u?A=h-2*(x!==0||F!==0?x+F:ze(c.left,c.right)):b=p-2*(q!==0||L!==0?q+L:ze(c.top,c.bottom))}await i({...t,availableWidth:A,availableHeight:b});let O=await a.getDimensions(r.floating);return h!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function ln(e){return vc(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bt(e){var t;return(t=(vc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vc(e){return e instanceof Node||e instanceof _e(e).Node}function mt(e){return e instanceof Element||e instanceof _e(e).Element}function gt(e){return e instanceof HTMLElement||e instanceof _e(e).HTMLElement}function kc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}function jn(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(a)}function Mc(e){return["table","td","th"].includes(ln(e))}function Ca(e){let t=ba(),n=rt(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function xc(e){let t=Rt(e);for(;gt(t)&&!dn(t);){if(Ca(t))return t;t=Rt(t)}return null}function ba(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dn(e){return["html","body","#document"].includes(ln(e))}function rt(e){return _e(e).getComputedStyle(e)}function bo(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Rt(e){if(ln(e)==="html")return e;let t=e.assignedSlot||e.parentNode||kc(e)&&e.host||bt(e);return kc(t)?t.host:t}function wc(e){let t=Rt(e);return dn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&jn(t)?t:wc(t)}function zn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=wc(e),r=a===((o=e.ownerDocument)==null?void 0:o.body),i=_e(a);return r?t.concat(i,i.visualViewport||[],jn(a)?a:[],i.frameElement&&n?zn(i.frameElement):[]):t.concat(a,zn(a,[],n))}function Sc(e){let t=rt(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=gt(e),r=a?e.offsetWidth:n,i=a?e.offsetHeight:o,s=wo(n)!==r||wo(o)!==i;return s&&(n=r,o=i),{width:n,height:o,$:s}}function Br(e){return mt(e)?e:e.contextElement}function Un(e){let t=Br(e);if(!gt(t))return Ft(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:r}=Sc(t),i=(r?wo(n.width):n.width)/o,s=(r?wo(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var Z2=Ft(0);function Lc(e){let t=_e(e);return!ba()||!t.visualViewport?Z2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function un(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),r=Br(e),i=Ft(1);t&&(o?mt(o)&&(i=Un(o)):i=Un(e));let s=X2(r,n,o)?Lc(r):Ft(0),c=(a.left+s.x)/i.x,l=(a.top+s.y)/i.y,d=a.width/i.x,u=a.height/i.y;if(r){let h=_e(r),p=o&&mt(o)?_e(o):o,y=h,m=y.frameElement;for(;m&&o&&p!==y;){let w=Un(m),f=m.getBoundingClientRect(),C=rt(m),b=f.left+(m.clientLeft+parseFloat(C.paddingLeft))*w.x,A=f.top+(m.clientTop+parseFloat(C.paddingTop))*w.y;c*=w.x,l*=w.y,d*=w.x,u*=w.y,c+=b,l+=A,y=_e(m),m=y.frameElement}}return cn({width:d,height:u,x:c,y:l})}var Y2=[":popover-open",":modal"];function qr(e){return Y2.some(t=>{try{return e.matches(t)}catch{return!1}})}function J2(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,r=a==="fixed",i=bt(o),s=t?qr(t.floating):!1;if(o===i||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=Ft(1),d=Ft(0),u=gt(o);if((u||!u&&!r)&&((ln(o)!=="body"||jn(i))&&(c=bo(o)),gt(o))){let h=un(o);l=Un(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x,y:n.y*l.y-c.scrollTop*l.y+d.y}}function Q2(e){return Array.from(e.getClientRects())}function Nc(e){return un(bt(e)).left+bo(e).scrollLeft}function eh(e){let t=bt(e),n=bo(e),o=e.ownerDocument.body,a=ze(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=ze(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-n.scrollLeft+Nc(e),s=-n.scrollTop;return rt(o).direction==="rtl"&&(i+=ze(t.clientWidth,o.clientWidth)-a),{width:a,height:r,x:i,y:s}}function th(e,t){let n=_e(e),o=bt(e),a=n.visualViewport,r=o.clientWidth,i=o.clientHeight,s=0,c=0;if(a){r=a.width,i=a.height;let l=ba();(!l||l&&t==="fixed")&&(s=a.offsetLeft,c=a.offsetTop)}return{width:r,height:i,x:s,y:c}}function nh(e,t){let n=un(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,r=gt(e)?Un(e):Ft(1),i=e.clientWidth*r.x,s=e.clientHeight*r.y,c=a*r.x,l=o*r.y;return{width:i,height:s,x:c,y:l}}function Cc(e,t,n){let o;if(t==="viewport")o=th(e,n);else if(t==="document")o=eh(bt(e));else if(mt(t))o=nh(t,n);else{let a=Lc(e);o={...t,x:t.x-a.x,y:t.y-a.y}}return cn(o)}function $c(e,t){let n=Rt(e);return n===t||!mt(n)||dn(n)?!1:rt(n).position==="fixed"||$c(n,t)}function oh(e,t){let n=t.get(e);if(n)return n;let o=zn(e,[],!1).filter(s=>mt(s)&&ln(s)!=="body"),a=null,r=rt(e).position==="fixed",i=r?Rt(e):e;for(;mt(i)&&!dn(i);){let s=rt(i),c=Ca(i);!c&&s.position==="fixed"&&(a=null),(r?!c&&!a:!c&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||jn(i)&&!c&&$c(e,i))?o=o.filter(d=>d!==i):a=s,i=Rt(i)}return t.set(e,o),o}function ah(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,i=[...n==="clippingAncestors"?qr(t)?[]:oh(t,this._c):[].concat(n),o],s=i[0],c=i.reduce((l,d)=>{let u=Cc(t,d,a);return l.top=ze(u.top,l.top),l.right=Ct(u.right,l.right),l.bottom=Ct(u.bottom,l.bottom),l.left=ze(u.left,l.left),l},Cc(t,s,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rh(e){let{width:t,height:n}=Sc(e);return{width:t,height:n}}function ih(e,t,n){let o=gt(t),a=bt(t),r=n==="fixed",i=un(e,!0,r,t),s={scrollLeft:0,scrollTop:0},c=Ft(0);if(o||!o&&!r)if((ln(t)!=="body"||jn(a))&&(s=bo(t)),o){let u=un(t,!0,r,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else a&&(c.x=Nc(a));let l=i.left+s.scrollLeft-c.x,d=i.top+s.scrollTop-c.y;return{x:l,y:d,width:i.width,height:i.height}}function Er(e){return rt(e).position==="static"}function bc(e,t){return!gt(e)||rt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ic(e,t){let n=_e(e);if(qr(e))return n;if(!gt(e)){let a=Rt(e);for(;a&&!dn(a);){if(mt(a)&&!Er(a))return a;a=Rt(a)}return n}let o=bc(e,t);for(;o&&Mc(o)&&Er(o);)o=bc(o,t);return o&&dn(o)&&Er(o)&&!Ca(o)?n:o||xc(e)||n}var sh=async function(e){let t=this.getOffsetParent||Ic,n=this.getDimensions,o=await n(e.floating);return{reference:ih(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ch(e){return rt(e).direction==="rtl"}var Vr={convertOffsetParentRelativeRectToViewportRelativeRect:J2,getDocumentElement:bt,getClippingRect:ah,getOffsetParent:Ic,getElementRects:sh,getClientRects:Q2,getDimensions:rh,getScale:Un,isElement:mt,isRTL:ch};function lh(e,t){let n=null,o,a=bt(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();let{left:l,top:d,width:u,height:h}=e.getBoundingClientRect();if(s||t(),!u||!h)return;let p=Co(d),y=Co(a.clientWidth-(l+u)),m=Co(a.clientHeight-(d+h)),w=Co(l),C={rootMargin:-p+"px "+-y+"px "+-m+"px "+-w+"px",threshold:ze(0,Ct(1,c))||1},b=!0;function A(O){let x=O[0].intersectionRatio;if(x!==c){if(!b)return i();x?i(!1,x):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(A,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,C)}n.observe(e)}return i(!0),r}function Pc(e,t,n,o){o===void 0&&(o={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Br(e),d=a||r?[...l?zn(l):[],...zn(t)]:[];d.forEach(f=>{a&&f.addEventListener("scroll",n,{passive:!0}),r&&f.addEventListener("resize",n)});let u=l&&s?lh(l,n):null,h=-1,p=null;i&&(p=new ResizeObserver(f=>{let[C]=f;C&&C.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let y,m=c?un(e):null;c&&w();function w(){let f=un(e);m&&(f.x!==m.x||f.y!==m.y||f.width!==m.width||f.height!==m.height)&&n(),m=f,y=requestAnimationFrame(w)}return n(),()=>{var f;d.forEach(C=>{a&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),u?.(),(f=p)==null||f.disconnect(),p=null,c&&cancelAnimationFrame(y)}}var Ac=fc;var Dc=mc,Tc=pc,Fc=gc,Oc=yc,Rc=hc;var Ec=(e,t,n)=>{let o=new Map,a={platform:Vr,...n},r={...a.platform,_c:o};return uc(e,t,{...a,platform:r})};var zr=K();function jr(){let e=Ne(zr);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var dh=ne(''),Hr=30,Bc=Hr/2,uh={top:180,right:-90,bottom:0,left:90};function Sa(e){let t=jr(),n=ve({size:Hr},e),[o,a]=Y(n,["ref","style","size"]),r=()=>t.currentPlacement().split("-")[0],i=hh(t.contentRef),s=()=>i()?.getPropertyValue("background-color")||"none",c=()=>i()?.getPropertyValue(`border-${r()}-color`)||"none",l=()=>i()?.getPropertyValue(`border-${r()}-width`)||"0px",d=()=>parseInt(l())*2*(Hr/o.size),u=()=>`rotate(${uh[r()]} ${Bc} ${Bc})`;return g(et,R({as:"div",ref(h){let p=ge(t.setArrowRef,o.ref);typeof p=="function"&&p(h)},"aria-hidden":"true",get style(){return{position:"absolute","font-size":`${o.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:s(),stroke:c(),"stroke-width":d(),...o.style}}},a,{get children(){let h=dh(),p=h.firstChild;return Q(()=>me(p,"transform",u())),h}}))}function hh(e){let[t,n]=H();return V(()=>{let o=e();o&&n(mo(o).getComputedStyle(o))}),t}function ph(e){let t=jr(),[n,o]=Y(e,["ref","style"]);return g(et,R({as:"div",ref(a){let r=ge(t.setPositionerRef,n.ref);typeof r=="function"&&r(a)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},o))}function qc(e){let{x:t=0,y:n=0,width:o=0,height:a=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,o,a);let r={x:t,y:n,width:o,height:a,top:n,right:t+o,bottom:n+a,left:t};return{...r,toJSON:()=>r}}function yh(e,t){return{contextElement:e,getBoundingClientRect:()=>{let o=t(e);return o?qc(o):e?e.getBoundingClientRect():qc()}}}function fh(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var mh={top:"bottom",right:"left",bottom:"top",left:"right"};function gh(e,t){let[n,o]=e.split("-"),a=mh[n];return o?n==="left"||n==="right"?`${a} ${o==="start"?"top":"bottom"}`:o==="start"?`${a} ${t==="rtl"?"right":"left"}`:`${a} ${t==="rtl"?"left":"right"}`:`${a} center`}function kh(e){let t=ve({getAnchorRect:h=>h?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,o]=H(),[a,r]=H(),[i,s]=H(t.placement),c=()=>yh(t.anchorRef?.(),t.getAnchorRect),{direction:l}=oc();async function d(){let h=c(),p=n(),y=a();if(!h||!p)return;let m=(y?.clientHeight||0)/2,w=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;p.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();let f=[Ac(({placement:x})=>{let F=!!x.split("-")[1];return{mainAxis:w,crossAxis:F?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){let x=typeof t.flip=="string"?t.flip.split(" "):void 0;if(x!==void 0&&!x.every(fh))throw new Error("`flip` expects a spaced-delimited list of placements");f.push(Tc({padding:t.overflowPadding,fallbackPlacements:x}))}(t.slide||t.overlap)&&f.push(Dc({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),f.push(Fc({padding:t.overflowPadding,apply({availableWidth:x,availableHeight:F,rects:q}){let L=Math.round(q.reference.width);x=Math.floor(x),F=Math.floor(F),p.style.setProperty("--kb-popper-anchor-width",`${L}px`),p.style.setProperty("--kb-popper-content-available-width",`${x}px`),p.style.setProperty("--kb-popper-content-available-height",`${F}px`),t.sameWidth&&(p.style.width=`${L}px`),t.fitViewport&&(p.style.maxWidth=`${x}px`,p.style.maxHeight=`${F}px`)}})),t.hideWhenDetached&&f.push(Oc({padding:t.detachedPadding})),y&&f.push(Rc({element:y,padding:t.arrowPadding}));let C=await Ec(h,p,{placement:t.placement,strategy:"absolute",middleware:f,platform:{...Vr,isRTL:()=>l()==="rtl"}});if(s(C.placement),t.onCurrentPlacementChange?.(C.placement),!p)return;p.style.setProperty("--kb-popper-content-transform-origin",gh(C.placement,l()));let b=Math.round(C.x),A=Math.round(C.y),O;if(t.hideWhenDetached&&(O=C.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(p.style,{top:"0",left:"0",transform:`translate3d(${b}px, ${A}px, 0)`,visibility:O}),y&&C.middlewareData.arrow){let{x,y:F}=C.middlewareData.arrow,q=C.placement.split("-")[0];Object.assign(y.style,{left:x!=null?`${x}px`:"",top:F!=null?`${F}px`:"",[q]:"100%"})}}V(()=>{let h=c(),p=n();if(!h||!p)return;let y=Pc(h,p,d,{elementResize:typeof ResizeObserver=="function"});_(y)}),V(()=>{let h=n(),p=t.contentRef?.();!h||!p||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(p).zIndex})});let u={currentPlacement:i,contentRef:()=>t.contentRef?.(),setPositionerRef:o,setArrowRef:r};return g(zr.Provider,{value:u,get children(){return t.children}})}var Ur=Object.assign(kh,{Arrow:Sa,Context:zr,usePopperContext:jr,Positioner:ph});function Vc(e){let t=n=>{n.key===go.Escape&&e.onEscapeKeyDown?.(n)};V(()=>{if(le||ie(e.isDisabled))return;let n=e.ownerDocument?.()??ke();n.addEventListener("keydown",t),_(()=>{n.removeEventListener("keydown",t)})})}var hn="data-kb-top-layer",Hc,_r=!1,Et=[];function So(e){return Et.findIndex(t=>t.node===e)}function vh(e){return Et[So(e)]}function Mh(e){return Et[Et.length-1].node===e}function zc(){return Et.filter(e=>e.isPointerBlocking)}function xh(){return[...zc()].slice(-1)[0]}function Kr(){return zc().length>0}function jc(e){let t=So(xh()?.node);return So(e)ke(t()),r=u=>e.onPointerDownOutside?.(u),i=u=>e.onFocusOutside?.(u),s=u=>e.onInteractOutside?.(u),c=u=>{let h=u.target;return!(h instanceof HTMLElement)||h.closest(`[${hn}]`)||!he(a(),h)||he(t(),h)?!1:!e.shouldExcludeElement?.(h)},l=u=>{function h(){let p=t(),y=u.target;if(!p||!y||!c(u))return;let m=qn([r,s]);y.addEventListener(Uc,m,{once:!0});let w=new CustomEvent(Uc,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:u.button===2||ma(u)&&u.button===0}});y.dispatchEvent(w)}u.pointerType==="touch"?(a().removeEventListener("click",h),o=h,a().addEventListener("click",h,{once:!0})):h()},d=u=>{let h=t(),p=u.target;if(!h||!p||!c(u))return;let y=qn([i,s]);p.addEventListener(_c,y,{once:!0});let m=new CustomEvent(_c,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:!1}});p.dispatchEvent(m)};V(()=>{le||ie(e.isDisabled)||(n=window.setTimeout(()=>{a().addEventListener("pointerdown",l,!0)},0),a().addEventListener("focusin",d,!0),_(()=>{window.clearTimeout(n),a().removeEventListener("click",o),a().removeEventListener("pointerdown",l,!0),a().removeEventListener("focusin",d,!0)}))})}var Gc=K();function Nh(){return Ne(Gc)}function La(e){let t,n=Nh(),[o,a]=Y(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),r=new Set([]),i=u=>{r.add(u);let h=n?.registerNestedLayer(u);return()=>{r.delete(u),h?.()}};Kc({shouldExcludeElement:u=>t?o.excludedElements?.some(h=>he(h(),u))||[...r].some(h=>he(h,u)):!1,onPointerDownOutside:u=>{!t||Ke.isBelowPointerBlockingLayer(t)||!o.bypassTopMostLayerCheck&&!Ke.isTopMostLayer(t)||(o.onPointerDownOutside?.(u),o.onInteractOutside?.(u),u.defaultPrevented||o.onDismiss?.())},onFocusOutside:u=>{o.onFocusOutside?.(u),o.onInteractOutside?.(u),u.defaultPrevented||o.onDismiss?.()}},()=>t),Vc({ownerDocument:()=>ke(t),onEscapeKeyDown:u=>{!t||!Ke.isTopMostLayer(t)||(o.onEscapeKeyDown?.(u),!u.defaultPrevented&&o.onDismiss&&(u.preventDefault(),o.onDismiss()))}}),Pe(()=>{if(!t)return;Ke.addLayer({node:t,isPointerBlocking:o.disableOutsidePointerEvents,dismiss:o.onDismiss});let u=n?.registerNestedLayer(t);Ke.assignPointerEventToLayers(),Ke.disableBodyPointerEvents(t),_(()=>{t&&(Ke.removeLayer(t),u?.(),Ke.assignPointerEventToLayers(),Ke.restoreBodyPointerEvents(t))})}),V(pt([()=>t,()=>o.disableOutsidePointerEvents],([u,h])=>{if(!u)return;let p=Ke.find(u);p&&p.isPointerBlocking!==h&&(p.isPointerBlocking=h,Ke.assignPointerEventToLayers()),h&&Ke.disableBodyPointerEvents(u),_(()=>{Ke.restoreBodyPointerEvents(u)})},{defer:!0}));let d={registerNestedLayer:i};return g(Gc.Provider,{value:d,get children(){return g(et,R({as:"div",ref(u){let h=ge(p=>t=p,o.ref);typeof h=="function"&&h(u)}},a))}})}function $h(e){let[t,n]=H(e.defaultValue?.()),o=U(()=>e.value?.()!==void 0),a=U(()=>o()?e.value?.():t());return[a,i=>{pe(()=>{let s=Rn(i,a());return Object.is(s,a())||(o()||n(s),e.onChange?.(s)),s})}]}function Wc(e){let[t,n]=$h(e);return[()=>t()??!1,n]}function Na(e={}){let[t,n]=Wc({value:()=>ie(e.open),defaultValue:()=>!!ie(e.defaultOpen),onChange:i=>e.onOpenChange?.(i)}),o=()=>{n(!0)},a=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:o,close:a,toggle:()=>{t()?a():o()}}}function _n(e){return t=>(e(t),()=>e(void 0))}function Lo(e){let[t,n]=H(),o={},a=e(),r="none",[i,s]=Ih(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(pt(i,c=>{let l=$a(o);r=c==="mounted"?l:"none"})),V(pt(e,c=>{if(a===c)return;let l=$a(o);c?s("MOUNT"):o?.display==="none"?s("UNMOUNT"):s(a&&r!==l?"ANIMATION_OUT":"UNMOUNT"),a=c})),V(pt(t,c=>{if(c){let l=u=>{let p=$a(o).includes(u.animationName);u.target===c&&p&&s("ANIMATION_END")},d=u=>{u.target===c&&(r=$a(o))};c.addEventListener("animationstart",d),c.addEventListener("animationcancel",l),c.addEventListener("animationend",l),_(()=>{c.removeEventListener("animationstart",d),c.removeEventListener("animationcancel",l),c.removeEventListener("animationend",l)})}else s("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(i()),setRef:c=>{c&&(o=getComputedStyle(c)),n(c)}}}function $a(e){return e?.animationName||"none"}function Ih(e,t){let n=(i,s)=>t[i][s]??i,[o,a]=H(e);return[o,i=>{a(s=>n(s,i))}]}var Ph=Object.defineProperty,Kn=(e,t)=>{for(var n in t)Ph(e,n,{get:t[n],enumerable:!0})};var Ah={};Kn(Ah,{Arrow:()=>Sa,Content:()=>Wr,Portal:()=>Zr,Root:()=>Xr,Tooltip:()=>de,Trigger:()=>Yr});var Zc=K();function Gr(){let e=Ne(Zc);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Wr(e){let t=Gr(),n=ve({id:t.generateId("content")},e),[o,a]=Y(n,["ref","style"]);return V(()=>_(t.registerContentId(a.id))),g(ae,{get when(){return t.contentPresence.isPresent()},get children(){return g(Ur.Positioner,{get children(){return g(La,R({ref(r){let i=ge(s=>{t.setContentRef(s),t.contentPresence.setRef(s)},o.ref);typeof i=="function"&&i(r)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return{"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...o.style}},onFocusOutside:r=>r.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),a))}})}})}function Zr(e){let t=Gr();return g(ae,{get when(){return t.contentPresence.isPresent()},get children(){return g(Fn,e)}})}function Dh(e,t,n){let o=e.split("-")[0],a=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=[],s=a.left+a.width/2,c=a.top+a.height/2;switch(o){case"top":i.push([a.left,c]),i.push([r.left,r.bottom]),i.push([r.left,r.top]),i.push([r.right,r.top]),i.push([r.right,r.bottom]),i.push([a.right,c]);break;case"right":i.push([s,a.top]),i.push([r.left,r.top]),i.push([r.right,r.top]),i.push([r.right,r.bottom]),i.push([r.left,r.bottom]),i.push([s,a.bottom]);break;case"bottom":i.push([a.left,c]),i.push([r.left,r.top]),i.push([r.left,r.bottom]),i.push([r.right,r.bottom]),i.push([r.right,r.top]),i.push([a.right,c]);break;case"left":i.push([s,a.top]),i.push([r.right,r.top]),i.push([r.left,r.top]),i.push([r.left,r.bottom]),i.push([r.right,r.bottom]),i.push([s,a.bottom]);break}return i}var pn={},Th=0,Gn=!1,Bt,No;function Xr(e){let t=`tooltip-${Ve()}`,n=`${++Th}`,o=ve({id:t,openDelay:700,closeDelay:300},e),[a,r]=Y(o,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","ignoreSafeArea","forceMount"]),i,[s,c]=H(),[l,d]=H(),[u,h]=H(),[p,y]=H(r.placement),m=Na({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:$=>a.onOpenChange?.($)}),w=Lo(()=>a.forceMount||m.isOpen()),f=()=>{pn[n]=b},C=()=>{for(let $ in pn)$!==n&&(pn[$](!0),delete pn[$])},b=($=!1)=>{le||($||a.closeDelay&&a.closeDelay<=0?(window.clearTimeout(i),i=void 0,m.close()):i||(i=window.setTimeout(()=>{i=void 0,m.close()},a.closeDelay)),window.clearTimeout(Bt),Bt=void 0,Gn&&(window.clearTimeout(No),No=window.setTimeout(()=>{delete pn[n],No=void 0,Gn=!1},a.closeDelay)))},A=()=>{le||(clearTimeout(i),i=void 0,C(),f(),Gn=!0,m.open(),window.clearTimeout(Bt),Bt=void 0,window.clearTimeout(No),No=void 0)},O=()=>{le||(C(),f(),!m.isOpen()&&!Bt&&!Gn?Bt=window.setTimeout(()=>{Bt=void 0,Gn=!0,A()},a.openDelay):m.isOpen()||A())},x=($=!1)=>{le||(!$&&a.openDelay&&a.openDelay>0&&!i?O():A())},F=()=>{le||(window.clearTimeout(Bt),Bt=void 0,Gn=!1)},q=()=>{le||(window.clearTimeout(i),i=void 0)},L=$=>he(l(),$)||he(u(),$),M=$=>{let B=l(),W=u();if(!(!B||!W))return Dh($,B,W)},N=$=>{let B=$.target;if(L(B)){q();return}if(!a.ignoreSafeArea){let W=M(p());if(W&&Tr(Dr($),W)){q();return}}i||b()};V(()=>{if(le||!m.isOpen())return;let $=ke();$.addEventListener("pointermove",N,!0),_(()=>{$.removeEventListener("pointermove",N,!0)})}),V(()=>{let $=l();if(!$||!m.isOpen())return;let B=oe=>{let qe=oe.target;he(qe,$)&&b(!0)},W=mo();W.addEventListener("scroll",B,{capture:!0}),_(()=>{W.removeEventListener("scroll",B,{capture:!0})})}),_(()=>{clearTimeout(i),pn[n]&&delete pn[n]});let I={dataset:U(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>a.disabled??!1,triggerOnFocusOnly:()=>a.triggerOnFocusOnly??!1,contentId:s,contentPresence:w,openTooltip:x,hideTooltip:b,cancelOpening:F,generateId:Bn(()=>o.id),registerContentId:_n(c),isTargetOnTooltip:L,setTriggerRef:d,setContentRef:h};return g(Zc.Provider,{value:I,get children(){return g(Ur,R({anchorRef:l,contentRef:u,onCurrentPlacementChange:y},r))}})}function Yr(e){let t,n=Gr(),[o,a]=Y(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]),r=!1,i=!1,s=!1,c=()=>{r=!1},l=()=>{!n.isOpen()&&(i||s)&&n.openTooltip(s)},d=f=>{n.isOpen()&&!i&&!s&&n.hideTooltip(f)},u=f=>{Oe(f,o.onPointerEnter),!(f.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||f.defaultPrevented)&&(i=!0,l())},h=f=>{Oe(f,o.onPointerLeave),f.pointerType!=="touch"&&(i=!1,s=!1,n.isOpen()?d():n.cancelOpening())},p=f=>{Oe(f,o.onPointerDown),r=!0,ke(t).addEventListener("pointerup",c,{once:!0})},y=f=>{Oe(f,o.onClick),i=!1,s=!1,d(!0)},m=f=>{Oe(f,o.onFocus),!(n.isDisabled()||f.defaultPrevented||r)&&(s=!0,l())},w=f=>{Oe(f,o.onBlur);let C=f.relatedTarget;n.isTargetOnTooltip(C)||(i=!1,s=!1,d(!0))};return _(()=>{le||ke(t).removeEventListener("pointerup",c)}),g(et,R({as:"button",ref(f){let C=ge(b=>{n.setTriggerRef(b),t=b},o.ref);typeof C=="function"&&C(f)},get"aria-describedby"(){return U(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:u,onPointerLeave:h,onPointerDown:p,onClick:y,onFocus:m,onBlur:w},()=>n.dataset(),a))}var de=Object.assign(Xr,{Arrow:Sa,Content:Wr,Portal:Zr,Trigger:Yr});function Fh(e){return Object.keys(e).reduce((n,o)=>{let a=e[o];return n[o]=Object.assign({},a),Jc(a.value)&&!qh(a.value)&&!Array.isArray(a.value)&&(n[o].value=Object.assign({},a.value)),Array.isArray(a.value)&&(n[o].value=a.value.slice(0)),n},{})}function Oh(e){return e?Object.keys(e).reduce((n,o)=>{let a=e[o];return n[o]=Jc(a)&&"value"in a?a:{value:a},n[o].attribute||(n[o].attribute=Bh(o)),n[o].parse="parse"in n[o]?n[o].parse:typeof n[o].value!="string",n},{}):{}}function Rh(e){return Object.keys(e).reduce((n,o)=>(n[o]=e[o].value,n),{})}function Eh(e,t){let n=Fh(t);return Object.keys(t).forEach(a=>{let r=n[a],i=e.getAttribute(r.attribute),s=e[a];i&&(r.value=r.parse?Yc(i):i),s!=null&&(r.value=Array.isArray(s)?s.slice(0):s),r.reflect&&Xc(e,r.attribute,r.value),Object.defineProperty(e,a,{get(){return r.value},set(c){let l=r.value;r.value=c,r.reflect&&Xc(this,r.attribute,r.value);for(let d=0,u=this.__propertyChangedCallbacks.length;ddelete e.__updating[t])}function Bh(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Jc(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function qh(e){return Object.prototype.toString.call(e)==="[object Function]"}function Vh(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var Jr;function Hh(e,t){let n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(a=>t[a].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Eh(this,t);let a=Rh(this.props),r=this.Component,i=Jr;try{Jr=this,this.__initialized=!0,Vh(r)?new r(a,{element:this}):r(a,{element:this})}finally{Jr=i}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let a=null;for(;a=this.__releaseCallbacks.pop();)a(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(a,r,i){if(this.__initialized&&!this.__updating[a]&&(a=this.lookupProp(a),a in t)){if(i==null&&!this[a])return;this[a]=t[a].parse?Yc(i):i}}lookupProp(a){if(t)return n.find(r=>a===r||a===t[r].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(a){this.__releaseCallbacks.push(a)}addPropertyChangedCallback(a){this.__propertyChangedCallbacks.push(a)}}}var K4=Symbol("element-context");function Qc(e,t={},n={}){let{BaseElement:o=HTMLElement,extension:a}=n;return r=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=r,i):(i=Hh(o,Oh(t)),i.prototype.Component=r,i.prototype.registeredTag=e,customElements.define(e,i,a),i)}}function zh(e){let t=Object.keys(e),n={};for(let o=0;oi)}})}return n}function jh(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Uh(e){return(t,n)=>{let{element:o}=n;return ht(a=>{let r=zh(t);o.addPropertyChangedCallback((s,c)=>r[s]=c),o.addReleaseCallback(()=>{o.renderRoot.textContent="",a()});let i=e(r,n);return z(o.renderRoot,i)},jh(o))}}function el(e,t,n){return arguments.length===2&&(n=t,t={}),Qc(e,t)(Uh(n))}var _h={};function Qr(e,t){let n=t||_h,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return nl(e,o,a)}function nl(e,t,n){if(Kh(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return tl(e.children,t,n)}return Array.isArray(e)?tl(e,t,n):""}function tl(e,t,n){let o=[],a=-1;for(;++aa?0:a+t:t=t>a?a:t,n=n>0?n:0,o.length<1e4)i=Array.from(o),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);r0?(De(e,e.length,0,t),e):t}var ol={}.hasOwnProperty;function al(e){let t={},n=-1;for(;++ni))return;let F=t.events.length,q=F,L,M;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(L){M=t.events[q][1].end;break}L=!0}for(f(o),x=F;xb;){let O=n[A];t.containerState=O[1],O[0].exit.call(t,e)}n.length=b}function C(){a.write([null]),r=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Yh(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ei(e){if(e===null||be(e)||dl(e))return 1;if(ll(e))return 2}function Wn(e,t,n){let o=[],a=-1;for(;++a1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),h=Object.assign({},e[n][1].start);yl(u,-c),yl(h,c),i={type:c>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},r={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[n][1].start)},a={type:c>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},s.end),l=[],e[o][1].end.offset-e[o][1].start.offset&&(l=je(l,[["enter",e[o][1],t],["exit",e[o][1],t]])),l=je(l,[["enter",a,t],["enter",i,t],["exit",i,t],["enter",r,t]]),l=je(l,Wn(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),l=je(l,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=je(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,De(e,o-1,n-o+3,l),n=o+l.length-d-2;break}}for(n=-1;++n0&&Z(x)?J(e,C,"linePrefix",r+1)(x):C(x)}function C(x){return x===null||j(x)?e.check(ml,m,A)(x):(e.enter("codeFlowValue"),b(x))}function b(x){return x===null||j(x)?(e.exit("codeFlowValue"),C(x)):(e.consume(x),b)}function A(x){return e.exit("codeFenced"),t(x)}function O(x,F,q){let L=0;return M;function M(B){return x.enter("lineEnding"),x.consume(B),x.exit("lineEnding"),N}function N(B){return x.enter("codeFencedFence"),Z(B)?J(x,S,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):S(B)}function S(B){return B===s?(x.enter("codeFencedFenceSequence"),I(B)):q(B)}function I(B){return B===s?(L++,x.consume(B),I):L>=i?(x.exit("codeFencedFenceSequence"),Z(B)?J(x,$,"whitespace")(B):$(B)):q(B)}function $(B){return B===null||j(B)?(x.exit("codeFencedFence"),F(B)):q(B)}}}function cp(e,t,n){let o=this;return a;function a(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r)}function r(i){return o.parser.lazy[o.now().line]?n(i):t(i)}}var Ao={name:"codeIndented",tokenize:dp},lp={tokenize:up,partial:!0};function dp(e,t,n){let o=this;return a;function a(l){return e.enter("codeIndented"),J(e,r,"linePrefix",5)(l)}function r(l){let d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(l):n(l)}function i(l){return l===null?c(l):j(l)?e.attempt(lp,i,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||j(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function up(e,t,n){let o=this;return a;function a(i){return o.parser.lazy[o.now().line]?n(i):j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):J(e,r,"linePrefix",5)(i)}function r(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):j(i)?a(i):n(i)}}var ni={name:"codeText",tokenize:yp,resolve:hp,previous:pp};function hp(e){let t=e.length-4,n=3,o,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o=4?t(i):e.interrupt(o.parser.constructs.flow,n,t)(i)}}function Fa(e,t,n,o,a,r,i,s,c){let l=c||Number.POSITIVE_INFINITY,d=0;return u;function u(f){return f===60?(e.enter(o),e.enter(a),e.enter(r),e.consume(f),e.exit(r),h):f===null||f===32||f===41||$o(f)?n(f):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(f))}function h(f){return f===62?(e.enter(r),e.consume(f),e.exit(r),e.exit(a),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===62?(e.exit("chunkString"),e.exit(s),h(f)):f===null||f===60||j(f)?n(f):(e.consume(f),f===92?y:p)}function y(f){return f===60||f===62||f===92?(e.consume(f),p):p(f)}function m(f){return!d&&(f===null||f===41||be(f))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(f)):d999||p===null||p===91||p===93&&!c||p===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(r),e.enter(a),e.consume(p),e.exit(a),e.exit(o),t):j(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===null||p===91||p===93||j(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!Z(p)),p===92?h:u)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,u):u(p)}}function Ra(e,t,n,o,a,r){let i;return s;function s(h){return h===34||h===39||h===40?(e.enter(o),e.enter(a),e.consume(h),e.exit(a),i=h===40?41:h,c):n(h)}function c(h){return h===i?(e.enter(a),e.consume(h),e.exit(a),e.exit(o),t):(e.enter(r),l(h))}function l(h){return h===i?(e.exit(r),c(i)):h===null?n(h):j(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),J(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===i||h===null||j(h)?(e.exit("chunkString"),l(h)):(e.consume(h),h===92?u:d)}function u(h){return h===i||h===92?(e.consume(h),d):d(h)}}function yn(e,t){let n;return o;function o(a){return j(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,o):Z(a)?J(e,o,n?"linePrefix":"lineSuffix")(a):t(a)}}function qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ai={name:"definition",tokenize:xp},Mp={tokenize:wp,partial:!0};function xp(e,t,n){let o=this,a;return r;function r(p){return e.enter("definition"),i(p)}function i(p){return Oa.call(o,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return a=qt(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return be(p)?yn(e,l)(p):l(p)}function l(p){return Fa(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(Mp,u,u)(p)}function u(p){return Z(p)?J(e,h,"whitespace")(p):h(p)}function h(p){return p===null||j(p)?(e.exit("definition"),o.parser.defined.push(a),t(p)):n(p)}}function wp(e,t,n){return o;function o(s){return be(s)?yn(e,a)(s):n(s)}function a(s){return Ra(e,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function r(s){return Z(s)?J(e,i,"whitespace")(s):i(s)}function i(s){return s===null||j(s)?t(s):n(s)}}var ri={name:"hardBreakEscape",tokenize:Cp};function Cp(e,t,n){return o;function o(r){return e.enter("hardBreakEscape"),e.consume(r),a}function a(r){return j(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}var ii={name:"headingAtx",tokenize:Sp,resolve:bp};function bp(e,t){let n=e.length-2,o=3,a,r;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(a={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},r={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},De(e,o,n-o+1,[["enter",a,t],["enter",r,t],["exit",r,t],["exit",a,t]])),e}function Sp(e,t,n){let o=0;return a;function a(d){return e.enter("atxHeading"),r(d)}function r(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&o++<6?(e.consume(d),i):d===null||be(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||j(d)?(e.exit("atxHeading"),t(d)):Z(d)?J(e,s,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),s(d))}function l(d){return d===null||d===35||be(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),l)}}var gl=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],si=["pre","script","style","textarea"];var ci={name:"htmlFlow",tokenize:Ip,resolveTo:$p,concrete:!0},Lp={tokenize:Ap,partial:!0},Np={tokenize:Pp,partial:!0};function $p(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ip(e,t,n){let o=this,a,r,i,s,c;return l;function l(v){return d(v)}function d(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),u}function u(v){return v===33?(e.consume(v),h):v===47?(e.consume(v),r=!0,m):v===63?(e.consume(v),a=3,o.interrupt?t:k):tt(v)?(e.consume(v),i=String.fromCharCode(v),w):n(v)}function h(v){return v===45?(e.consume(v),a=2,p):v===91?(e.consume(v),a=5,s=0,y):tt(v)?(e.consume(v),a=4,o.interrupt?t:k):n(v)}function p(v){return v===45?(e.consume(v),o.interrupt?t:k):n(v)}function y(v){let Je="CDATA[";return v===Je.charCodeAt(s++)?(e.consume(v),s===Je.length?o.interrupt?t:S:y):n(v)}function m(v){return tt(v)?(e.consume(v),i=String.fromCharCode(v),w):n(v)}function w(v){if(v===null||v===47||v===62||be(v)){let Je=v===47,Ln=i.toLowerCase();return!Je&&!r&&si.includes(Ln)?(a=1,o.interrupt?t(v):S(v)):gl.includes(i.toLowerCase())?(a=6,Je?(e.consume(v),f):o.interrupt?t(v):S(v)):(a=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(v):r?C(v):b(v))}return v===45||$e(v)?(e.consume(v),i+=String.fromCharCode(v),w):n(v)}function f(v){return v===62?(e.consume(v),o.interrupt?t:S):n(v)}function C(v){return Z(v)?(e.consume(v),C):M(v)}function b(v){return v===47?(e.consume(v),M):v===58||v===95||tt(v)?(e.consume(v),A):Z(v)?(e.consume(v),b):M(v)}function A(v){return v===45||v===46||v===58||v===95||$e(v)?(e.consume(v),A):O(v)}function O(v){return v===61?(e.consume(v),x):Z(v)?(e.consume(v),O):b(v)}function x(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),c=v,F):Z(v)?(e.consume(v),x):q(v)}function F(v){return v===c?(e.consume(v),c=null,L):v===null||j(v)?n(v):(e.consume(v),F)}function q(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||be(v)?O(v):(e.consume(v),q)}function L(v){return v===47||v===62||Z(v)?b(v):n(v)}function M(v){return v===62?(e.consume(v),N):n(v)}function N(v){return v===null||j(v)?S(v):Z(v)?(e.consume(v),N):n(v)}function S(v){return v===45&&a===2?(e.consume(v),W):v===60&&a===1?(e.consume(v),oe):v===62&&a===4?(e.consume(v),at):v===63&&a===3?(e.consume(v),k):v===93&&a===5?(e.consume(v),xt):j(v)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Lp,It,I)(v)):v===null||j(v)?(e.exit("htmlFlowData"),I(v)):(e.consume(v),S)}function I(v){return e.check(Np,$,It)(v)}function $(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),B}function B(v){return v===null||j(v)?I(v):(e.enter("htmlFlowData"),S(v))}function W(v){return v===45?(e.consume(v),k):S(v)}function oe(v){return v===47?(e.consume(v),i="",qe):S(v)}function qe(v){if(v===62){let Je=i.toLowerCase();return si.includes(Je)?(e.consume(v),at):S(v)}return tt(v)&&i.length<8?(e.consume(v),i+=String.fromCharCode(v),qe):S(v)}function xt(v){return v===93?(e.consume(v),k):S(v)}function k(v){return v===62?(e.consume(v),at):v===45&&a===2?(e.consume(v),k):S(v)}function at(v){return v===null||j(v)?(e.exit("htmlFlowData"),It(v)):(e.consume(v),at)}function It(v){return e.exit("htmlFlow"),t(v)}}function Pp(e,t,n){let o=this;return a;function a(i){return j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):n(i)}function r(i){return o.parser.lazy[o.now().line]?n(i):t(i)}}function Ap(e,t,n){return o;function o(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Gt,t,n)}}var li={name:"htmlText",tokenize:Dp};function Dp(e,t,n){let o=this,a,r,i;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),c}function c(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),O):k===63?(e.consume(k),b):tt(k)?(e.consume(k),q):n(k)}function l(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),r=0,y):tt(k)?(e.consume(k),C):n(k)}function d(k){return k===45?(e.consume(k),p):n(k)}function u(k){return k===null?n(k):k===45?(e.consume(k),h):j(k)?(i=u,oe(k)):(e.consume(k),u)}function h(k){return k===45?(e.consume(k),p):u(k)}function p(k){return k===62?W(k):k===45?h(k):u(k)}function y(k){let at="CDATA[";return k===at.charCodeAt(r++)?(e.consume(k),r===at.length?m:y):n(k)}function m(k){return k===null?n(k):k===93?(e.consume(k),w):j(k)?(i=m,oe(k)):(e.consume(k),m)}function w(k){return k===93?(e.consume(k),f):m(k)}function f(k){return k===62?W(k):k===93?(e.consume(k),f):m(k)}function C(k){return k===null||k===62?W(k):j(k)?(i=C,oe(k)):(e.consume(k),C)}function b(k){return k===null?n(k):k===63?(e.consume(k),A):j(k)?(i=b,oe(k)):(e.consume(k),b)}function A(k){return k===62?W(k):b(k)}function O(k){return tt(k)?(e.consume(k),x):n(k)}function x(k){return k===45||$e(k)?(e.consume(k),x):F(k)}function F(k){return j(k)?(i=F,oe(k)):Z(k)?(e.consume(k),F):W(k)}function q(k){return k===45||$e(k)?(e.consume(k),q):k===47||k===62||be(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),W):k===58||k===95||tt(k)?(e.consume(k),M):j(k)?(i=L,oe(k)):Z(k)?(e.consume(k),L):W(k)}function M(k){return k===45||k===46||k===58||k===95||$e(k)?(e.consume(k),M):N(k)}function N(k){return k===61?(e.consume(k),S):j(k)?(i=N,oe(k)):Z(k)?(e.consume(k),N):L(k)}function S(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,I):j(k)?(i=S,oe(k)):Z(k)?(e.consume(k),S):(e.consume(k),$)}function I(k){return k===a?(e.consume(k),a=void 0,B):k===null?n(k):j(k)?(i=I,oe(k)):(e.consume(k),I)}function $(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||be(k)?L(k):(e.consume(k),$)}function B(k){return k===47||k===62||be(k)?L(k):n(k)}function W(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function oe(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),qe}function qe(k){return Z(k)?J(e,xt,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):xt(k)}function xt(k){return e.enter("htmlTextData"),i(k)}}var fn={name:"labelEnd",tokenize:Bp,resolveTo:Ep,resolveAll:Rp},Tp={tokenize:qp},Fp={tokenize:Vp},Op={tokenize:Hp};function Rp(e){let t=-1;for(;++t=3&&(l===null||j(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===a?(e.consume(l),o++,c):(e.exit("thematicBreakSequence"),Z(l)?J(e,s,"whitespace")(l):s(l))}}var Re={name:"list",tokenize:Wp,continuation:{tokenize:Zp},exit:Yp},Kp={tokenize:Jp,partial:!0},Gp={tokenize:Xp,partial:!0};function Wp(e,t,n){let o=this,a=o.events[o.events.length-1],r=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,i=0;return s;function s(p){let y=o.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!o.containerState.marker||p===o.containerState.marker:Io(p)){if(o.containerState.type||(o.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(mn,n,l)(p):l(p);if(!o.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return Io(p)&&++i<10?(e.consume(p),c):(!o.interrupt||i<2)&&(o.containerState.marker?p===o.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||p,e.check(Gt,o.interrupt?n:d,e.attempt(Kp,h,u))}function d(p){return o.containerState.initialBlankLine=!0,r++,h(p)}function u(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return o.containerState.size=r+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Zp(e,t,n){let o=this;return o.containerState._closeFlow=void 0,e.check(Gt,a,r);function a(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,J(e,t,"listItemIndent",o.containerState.size+1)(s)}function r(s){return o.containerState.furtherBlankLines||!Z(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Gp,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,J(e,e.attempt(Re,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Xp(e,t,n){let o=this;return J(e,a,"listItemIndent",o.containerState.size+1);function a(r){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(r):n(r)}}function Yp(e){e.exit(this.containerState.type)}function Jp(e,t,n){let o=this;return J(e,a,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(r){let i=o.events[o.events.length-1];return!Z(r)&&i&&i[1].type==="listItemPrefixWhitespace"?t(r):n(r)}}var Ea={name:"setextUnderline",tokenize:e0,resolveTo:Qp};function Qp(e,t){let n=e.length,o,a,r;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!r&&e[n][1].type==="definition"&&(r=n);let i={type:"setextHeading",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[a][1].type="setextHeadingText",r?(e.splice(a,0,["enter",i,t]),e.splice(r+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[r][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function e0(e,t,n){let o=this,a;return r;function r(l){let d=o.events.length,u;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){u=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),a=l,i(l)):n(l)}function i(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===a?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Z(l)?J(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||j(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}var kl={tokenize:t0};function t0(e){let t=this,n=e.attempt(Gt,o,e.attempt(this.parser.constructs.flowInitial,a,J(e,e.attempt(this.parser.constructs.flow,a,e.attempt(oi,a)),"linePrefix")));return n;function o(r){if(r===null){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(r){if(r===null){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var vl={resolveAll:Cl()},Ml=wl("string"),xl=wl("text");function wl(e){return{tokenize:t,resolveAll:Cl(e==="text"?n0:void 0)};function t(n){let o=this,a=this.parser.constructs[e],r=n.attempt(a,i,s);return i;function i(d){return l(d)?r(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return l(d)?(n.exit("data"),r(d)):(n.consume(d),c)}function l(d){if(d===null)return!0;let u=a[d],h=-1;if(u)for(;++h-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}r>0&&i.push(e[a].slice(0,r))}return i}function a0(e,t){let n=-1,o=[],a;for(;++nh0,contentInitial:()=>i0,disable:()=>p0,document:()=>r0,flow:()=>c0,flowInitial:()=>s0,insideSpan:()=>u0,string:()=>l0,text:()=>d0});var r0={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:Ia},i0={91:ai},s0={[-2]:Ao,[-1]:Ao,32:Ao},c0={35:ii,42:mn,45:[Ea,mn],60:ci,61:Ea,95:mn,96:Da,126:Da},l0={38:Aa,92:Pa},d0={[-5]:Do,[-4]:Do,[-3]:Do,33:di,38:Aa,42:Po,60:[ti,li],91:ui,92:[ri,Pa],93:fn,95:Po,96:ni},u0={null:[Po,vl]},h0={null:[42,95]},p0={null:[]};function Sl(e){let n=al([hi,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:n,content:a(ul),document:a(pl),flow:a(kl),string:a(Ml),text:a(xl)};return o;function a(r){return i;function i(s){return bl(o,r,s)}}}var Ll=/[\0\t\n\r]/g;function Nl(){let e=1,t="",n=!0,o;return a;function a(r,i,s){let c=[],l,d,u,h,p;for(r=t+r.toString(i),u=0,t="",n&&(r.charCodeAt(0)===65279&&u++,n=void 0);u13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}var y0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Il(e){return e.replace(y0,f0)}function f0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let a=n.charCodeAt(1),r=a===120||a===88;return Ba(n.slice(r?2:1),r?16:10)}return Zn(n)||e}function Wt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pl(e.position):"start"in e||"end"in e?Pl(e):"line"in e||"column"in e?pi(e):""}function pi(e){return Al(e&&e.line)+":"+Al(e&&e.column)}function Pl(e){return pi(e&&e.start)+"-"+pi(e&&e.end)}function Al(e){return e&&typeof e=="number"?e:1}var Tl={}.hasOwnProperty,yi=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),m0(n)($l(Sl(n).document().write(Nl()(e,t,!0))))};function m0(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ms),autolinkProtocol:N,autolinkEmail:N,atxHeading:s(gs),blockQuote:s(Nn),characterEscape:N,characterReference:N,codeFenced:s(an),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(an,c),codeText:s(mr,c),codeTextData:N,data:N,codeFlowValue:N,definition:s(Tu),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Fu),hardBreakEscape:s(ks),hardBreakTrailing:s(ks),htmlFlow:s(vs,c),htmlFlowData:N,htmlText:s(vs,c),htmlTextData:N,image:s(Ou),label:c,link:s(Ms),listItem:s(Ru),listItemValue:y,listOrdered:s(xs,p),listUnordered:s(xs),paragraph:s(Eu),reference:Ln,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(gs),strong:s(Bu),thematicBreak:s(Vu)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:Pt,autolinkProtocol:so,blockQuote:d(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:io,characterReferenceMarkerNumeric:io,characterReferenceValue:Ie,codeFenced:d(C),codeFencedFence:f,codeFencedFenceInfo:m,codeFencedFenceMeta:w,codeFlowValue:S,codeIndented:d(b),codeText:d(oe),codeTextData:S,data:S,definition:d(),definitionDestinationString:x,definitionLabelString:A,definitionTitleString:O,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(B),htmlFlowData:S,htmlText:d(W),htmlTextData:S,image:d(xt),label:at,labelText:k,lineEnding:I,link:d(qe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:fr,resourceDestinationString:It,resourceTitleString:v,resource:Je,setextHeading:d(M),setextHeadingLineSequence:L,setextHeadingText:q,strong:d(),thematicBreak:d()}};Fl(t,(e||{}).mdastExtensions||[]);let n={};return o;function o(P){let E={type:"root",children:[]},G={stack:[E],tokenStack:[],config:t,enter:l,exit:u,buffer:c,resume:h,setData:r,getData:i},ce=[],ue=-1;for(;++ue0){let ut=G.tokenStack[G.tokenStack.length-1];(ut[1]||Dl).call(G,void 0,ut[0])}for(E.position={start:Zt(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Zt(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue{let o=this.data("settings");return yi(n,Object.assign({},o,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Ol(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Rl(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` -`}]}function El(e,t){let n=t.value?t.value+` -`:"",o=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,a={};o&&(a.className=["language-"+o]);let r={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}function Bl(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ql(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function it(e){let t=[],n=-1,o=0,a=0;for(;++n55295&&r<57344){let s=e.charCodeAt(n+1);r<56320&&s>56319&&s<57344?(i=String.fromCharCode(r,s),a=1):i="\uFFFD"}else i=String.fromCharCode(r);i&&(t.push(e.slice(o,n),encodeURIComponent(i)),o=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(o)}function Va(e,t){let n=String(t.identifier).toUpperCase(),o=it(n.toLowerCase()),a=e.footnoteOrder.indexOf(n),r;a===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,r=e.footnoteOrder.length):(e.footnoteCounts[n]++,r=a+1);let i=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+o,id:e.clobberPrefix+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)}function Vl(e,t){let n=e.footnoteById,o=1;for(;o in n;)o++;let a=String(o);return n[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},Va(e,{type:"footnoteReference",identifier:a,position:t.position})}function Hl(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zl(e,t){if(e.dangerous){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function Ha(e,t){let n=t.referenceType,o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+o};let a=e.all(t),r=a[0];r&&r.type==="text"?r.value="["+r.value:a.unshift({type:"text",value:"["});let i=a[a.length-1];return i&&i.type==="text"?i.value+=o:a.push({type:"text",value:o}),a}function jl(e,t){let n=e.definition(t.identifier);if(!n)return Ha(e,t);let o={src:it(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(o.title=n.title);let a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ul(e,t){let n={src:it(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function _l(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function Kl(e,t){let n=e.definition(t.identifier);if(!n)return Ha(e,t);let o={href:it(n.url||"")};n.title!==null&&n.title!==void 0&&(o.title=n.title);let a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Gl(e,t){let n={href:it(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Wl(e,t,n){let o=e.all(t),a=n?k0(n):Zl(t),r={},i=[];if(typeof t.checked=="boolean"){let d=o[0],u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},o.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let s=-1;for(;++s1}function Xl(e,t){let n={},o=e.all(t),a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a-1?o.offset:null}}}function t1(e,t){let n=e.all(t),o=n.shift(),a=[];if(o){let i={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],i),a.push(i)}if(n.length>0){let i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Xn(t.children[1]),c=Yn(t.children[t.children.length-1]);s.line&&c.line&&(i.position={start:s,end:c}),a.push(i)}let r={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,r),e.applyData(t,r)}function n1(e,t,n){let o=n?n.children:void 0,r=(o?o.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,s=i?i.length:t.children.length,c=-1,l=[];for(;++c0,!0),o[0]),a=o.index+o[0].length,o=n.exec(t);return r.push(a1(t.slice(a),a>0,!1)),r.join("")}function a1(e,t,n){let o=0,a=e.length;if(t){let r=e.codePointAt(o);for(;r===9||r===32;)o++,r=e.codePointAt(o)}if(n){let r=e.codePointAt(a-1);for(;r===9||r===32;)a--,r=e.codePointAt(a-1)}return a>o?e.slice(o,a):""}function i1(e,t){let n={type:"text",value:r1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function s1(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var c1={blockquote:Ol,break:Rl,code:El,delete:Bl,emphasis:ql,footnoteReference:Va,footnote:Vl,heading:Hl,html:zl,imageReference:jl,image:Ul,inlineCode:_l,linkReference:Kl,link:Gl,listItem:Wl,list:Xl,paragraph:Yl,root:Jl,strong:Ql,table:t1,tableCell:o1,tableRow:n1,text:i1,thematicBreak:s1,toml:za,yaml:za,definition:za,footnoteDefinition:za};function za(){return null}var ja=function(e){if(e==null)return w0;if(typeof e=="string")return x0(e);if(typeof e=="object")return Array.isArray(e)?v0(e):M0(e);if(typeof e=="function")return Ua(e);throw new Error("Expected function, string, or object as test")};function v0(e){let t=[],n=-1;for(;++n":""))+")"})}return u;function u(){let h=[],p,y,m;if((!t||a(s,c,l[l.length-1]||null))&&(h=C0(n(s,l)),h[0]===_a))return h;if(s.children&&h[0]!==gi)for(y=(o?s.children.length:-1)+r,m=l.concat(s);y>-1&&y{let a=d1(o.identifier);a&&!l1.call(t,a)&&(t[a]=o)}),n;function n(o){let a=d1(o);return a&&l1.call(t,a)?t[a]:null}}function d1(e){return String(e||"").toUpperCase()}var Ka={}.hasOwnProperty;function u1(e,t){let n=t||{},o=n.allowDangerousHtml||!1,a={};return i.dangerous=o,i.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,i.footnoteLabel=n.footnoteLabel||"Footnotes",i.footnoteLabelTagName=n.footnoteLabelTagName||"h2",i.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},i.footnoteBackLabel=n.footnoteBackLabel||"Back to content",i.unknownHandler=n.unknownHandler,i.passThrough=n.passThrough,i.handlers={...c1,...n.handlers},i.definition=Mi(e),i.footnoteById=a,i.footnoteOrder=[],i.footnoteCounts={},i.patch=b0,i.applyData=S0,i.one=s,i.all=c,i.wrap=N0,i.augment=r,gn(e,"footnoteDefinition",l=>{let d=String(l.identifier).toUpperCase();Ka.call(a,d)||(a[d]=l)}),i;function r(l,d){if(l&&"data"in l&&l.data){let u=l.data;u.hName&&(d.type!=="element"&&(d={type:"element",tagName:"",properties:{},children:[]}),d.tagName=u.hName),d.type==="element"&&u.hProperties&&(d.properties={...d.properties,...u.hProperties}),"children"in d&&d.children&&u.hChildren&&(d.children=u.hChildren)}if(l){let u="type"in l?l:{position:l};vi(u)||(d.position={start:Xn(u),end:Yn(u)})}return d}function i(l,d,u,h){return Array.isArray(u)&&(h=u,u={}),r(l,{type:"element",tagName:d,properties:u||{},children:h||[]})}function s(l,d){return h1(i,l,d)}function c(l){return xi(i,l)}}function b0(e,t){e.position&&(t.position=fi(e))}function S0(e,t){let n=t;if(e&&e.data){let o=e.data.hName,a=e.data.hChildren,r=e.data.hProperties;typeof o=="string"&&(n.type==="element"?n.tagName=o:n={type:"element",tagName:o,properties:{},children:[]}),n.type==="element"&&r&&(n.properties={...n.properties,...r}),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function h1(e,t,n){let o=t&&t.type;if(!o)throw new Error("Expected node, got `"+t+"`");return Ka.call(e.handlers,o)?e.handlers[o](e,t,n):e.passThrough&&e.passThrough.includes(o)?"children"in t?{...t,children:xi(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):L0(e,t)}function xi(e,t){let n=[];if("children"in t){let o=t.children,a=-1;for(;++a0&&n.push({type:"text",value:` -`}),n}function p1(e){let t=[],n=-1;for(;++n1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};s>1&&u.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(u)}let l=a[a.length-1];if(l&&l.type==="element"&&l.tagName==="p"){let u=l.children[l.children.length-1];u&&u.type==="text"?u.value+=" ":l.children.push({type:"text",value:" "}),l.children.push(...c)}else a.push(...c);let d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(a,!0)};e.patch(o,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` -`}]}}function Ga(e,t){let n=u1(e,t),o=n.one(e,null),a=p1(n);return a&&o.children.push({type:"text",value:` -`},a),Array.isArray(o)?{type:"root",children:o}:o}var $0=function(e,t){return e&&"run"in e?I0(e,t):P0(e||t)},wi=$0;function I0(e,t){return(n,o,a)=>{e.run(Ga(n,t),o,r=>{a(r)})}}function P0(e){return t=>Ga(t,e)}var Wa=Symbol("store-raw"),Qn=Symbol("store-node"),Vt=Symbol("store-has"),y1=Symbol("store-self");function f1(e){let t=e[Fe];if(!t&&(Object.defineProperty(e,Fe,{value:t=new Proxy(e,T0)}),!Array.isArray(e))){let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let a=0,r=n.length;ae[Fe][t]),n}function m1(e){ia()&&Fo(Za(e,Qn),y1)()}function D0(e){return m1(e),Reflect.ownKeys(e)}var T0={get(e,t,n){if(t===Wa)return e;if(t===Fe)return n;if(t===yo)return m1(e),n;let o=Za(e,Qn),a=o[t],r=a?a():e[t];if(t===Qn||t===Vt||t==="__proto__")return r;if(!a){let i=Object.getOwnPropertyDescriptor(e,t);ia()&&(typeof r!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(r=Fo(o,t,r)())}return St(r)?f1(r):r},has(e,t){return t===Wa||t===Fe||t===yo||t===Qn||t===Vt||t==="__proto__"?!0:(ia()&&Fo(Za(e,Vt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:D0,getOwnPropertyDescriptor:A0};function Ge(e,t,n,o=!1){if(!o&&e[t]===n)return;let a=e[t],r=e.length;n===void 0?(delete e[t],e[Vt]&&e[Vt][t]&&a!==void 0&&e[Vt][t].$()):(e[t]=n,e[Vt]&&e[Vt][t]&&a===void 0&&e[Vt][t].$());let i=Za(e,Qn),s;if((s=Fo(i,t,a))&&s.$(()=>n),Array.isArray(e)&&e.length!==r){for(let c=e.length;c1){o=t.shift();let i=typeof o,s=Array.isArray(e);if(Array.isArray(o)){for(let c=0;c1){To(e[o],t,[o].concat(n));return}a=e[o],n=[o].concat(n)}let r=t[0];typeof r=="function"&&(r=r(a,n),r===a)||o===void 0&&r==null||(r=kn(r),o===void 0||St(a)&&St(r)&&!Array.isArray(r)?g1(a,r):Ge(e,o,r))}function Xt(...[e,t]){let n=kn(e||{}),o=Array.isArray(n),a=f1(n);function r(...i){Nr(()=>{o&&i.length===1?F0(n,i[0]):To(n,i)})}return[a,r]}var Ci=Symbol("store-root");function Jn(e,t,n,o,a){let r=t[n];if(e===r)return;let i=Array.isArray(e);if(n!==Ci&&(!St(e)||!St(r)||i!==Array.isArray(r)||a&&e[a]!==r[a])){Ge(t,n,e);return}if(i){if(e.length&&r.length&&(!o||a&&e[0]&&e[0][a]!=null)){let l,d,u,h,p,y,m,w;for(u=0,h=Math.min(r.length,e.length);u=u&&p>=u&&(r[h]===e[p]||a&&r[u]&&e[u]&&r[h][a]===e[p][a]);h--,p--)f[p]=r[h];if(u>p||u>h){for(d=u;d<=p;d++)Ge(r,d,e[d]);for(;de.length&&Ge(r,"length",e.length);return}for(m=new Array(p+1),d=p;d>=u;d--)y=e[d],w=a&&y?y[a]:y,l=C.get(w),m[d]=l===void 0?-1:l,C.set(w,d);for(l=u;l<=h;l++)y=r[l],w=a&&y?y[a]:y,d=C.get(w),d!==void 0&&d!==-1&&(f[d]=r[l],d=m[d],C.set(w,d));for(d=u;de.length&&Ge(r,"length",e.length);return}let s=Object.keys(e);for(let l=0,d=s.length;l{if(!St(r)||!St(a))return a;let i=Jn(a,{[Ci]:r},Ci,n,o);return i===void 0?r:i}}var Xa=new WeakMap,v1={get(e,t){if(t===Wa)return e;let n=e[t],o;return St(n)?Xa.get(n)||(Xa.set(n,o=new Proxy(n,v1)),o):n},set(e,t,n){return Ge(e,t,kn(n)),!0},deleteProperty(e,t){return Ge(e,t,void 0,!0),!0}};function Oo(e){return t=>{if(St(t)){let n;(n=Xa.get(t))||Xa.set(t,n=new Proxy(t,v1)),e(n)}return t}}var Ht=class{constructor(t,n,o){this.property=t,this.normal=n,o&&(this.space=o)}};Ht.prototype.property={};Ht.prototype.normal={};Ht.prototype.space=null;function bi(e,t){let n={},o={},a=-1;for(;++aX,booleanish:()=>xe,commaOrSpaceSeparated:()=>We,commaSeparated:()=>Yt,number:()=>D,overloadedBoolean:()=>Si,spaceSeparated:()=>se});var O0=0,X=vn(),xe=vn(),Si=vn(),D=vn(),se=vn(),Yt=vn(),We=vn();function vn(){return 2**++O0}var Li=Object.keys(Eo),Mn=class extends Ee{constructor(t,n,o,a){let r=-1;if(super(t,n),M1(this,"space",a),typeof o=="number")for(;++r4&&n.slice(0,4)==="data"&&E0.test(t)){if(t.charAt(4)==="-"){let r=t.slice(5).replace(C1,V0);o="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{let r=t.slice(4);if(!C1.test(r)){let i=r.replace(B0,q0);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=Mn}return new a(o,t)}function q0(e){return"-"+e.toLowerCase()}function V0(e){return e.charAt(1).toUpperCase()}var b1=bi([$i,Ni,Ii,Pi,x1],"html"),S1=bi([$i,Ni,Ii,Pi,w1],"svg");function Di(e){if(e)throw e}var U1=vr(Ti(),1),Hi=vr(O1(),1);function Bo(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Fi(){let e=[],t={run:n,use:o};return t;function n(...a){let r=-1,i=a.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...a);function s(c,...l){let d=e[++r],u=-1;if(c){i(c);return}for(;++ui.length,c;s&&i.push(a);try{c=e.apply(this,i)}catch(l){let d=l;if(s&&n)throw d;return a(d)}s||(c&&c.then&&typeof c.then=="function"?c.then(r,a):c instanceof Error?a(c):r(c))}function a(i,...s){n||(n=!0,t(i,...s))}function r(i){a(null,i)}}var V1=vr(Ti(),1);var Be=class extends Error{constructor(t,n,o){let a=[null,null],r={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(o=n,n=void 0),typeof o=="string"){let i=o.indexOf(":");i===-1?a[1]=o:(a[0]=o.slice(0,i),a[1]=o.slice(i+1))}n&&("type"in n||"position"in n?n.position&&(r=n.position):"start"in n||"end"in n?r=n:("line"in n||"column"in n)&&(r.start=n)),this.name=Wt(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=r.start.line,this.column=r.start.column,this.position=r,this.source=a[0],this.ruleId=a[1],this.file,this.actual,this.expected,this.url,this.note}};Be.prototype.file="";Be.prototype.name="";Be.prototype.reason="";Be.prototype.message="";Be.prototype.stack="";Be.prototype.fatal=null;Be.prototype.column=null;Be.prototype.line=null;Be.prototype.source=null;Be.prototype.ruleId=null;Be.prototype.position=null;var kt={basename:H0,dirname:z0,extname:j0,join:U0,sep:"/"};function H0(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');qo(e);let n=0,o=-1,a=e.length,r;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(r){n=a+1;break}}else o<0&&(r=!0,o=a+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;a--;)if(e.charCodeAt(a)===47){if(r){n=a+1;break}}else i<0&&(r=!0,i=a+1),s>-1&&(e.charCodeAt(a)===t.charCodeAt(s--)?s<0&&(o=a):(s=-1,o=i));return n===o?o=i:o<0&&(o=e.length),e.slice(n,o)}function z0(e){if(qo(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.charCodeAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function j0(e){qo(e);let t=e.length,n=-1,o=0,a=-1,r=0,i;for(;t--;){let s=e.charCodeAt(t);if(s===47){if(i){o=t+1;break}continue}n<0&&(i=!0,n=t+1),s===46?a<0?a=t:r!==1&&(r=1):a>-1&&(r=-1)}return a<0||n<0||r===0||r===1&&a===n-1&&a===o+1?"":e.slice(a,n)}function U0(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function K0(e,t){let n="",o=0,a=-1,r=0,i=-1,s,c;for(;++i<=e.length;){if(i2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",o=0):(n=n.slice(0,c),o=n.length-1-n.lastIndexOf("/")),a=i,r=0;continue}}else if(n.length>0){n="",o=0,a=i,r=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(a+1,i):n=e.slice(a+1,i),o=i-a-1;a=i,r=0}else s===46&&r>-1?r++:r=-1}return n}function qo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var E1={cwd:G0};function G0(){return"/"}function eo(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function B1(e){if(typeof e=="string")e=new URL(e);else if(!eo(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return W0(e)}function W0(e){if(e.hostname!==""){let o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}let t=e.pathname,n=-1;for(;++n{if(x||!F||!q)O(x);else{let L=r.stringify(F,q);L==null||(J0(L)?q.value=L:q.result=L),O(x,q)}});function O(x,F){x||!F?b(x):C?C(F):w(null,F)}}}function y(m){let w;r.freeze(),Bi("processSync",r.Parser),qi("processSync",r.Compiler);let f=Vo(m);return r.process(f,C),j1("processSync","process",w),f;function C(b){w=!0,Di(b)}}}function H1(e,t){return typeof e=="function"&&e.prototype&&(X0(e.prototype)||t in e.prototype)}function X0(e){let t;for(t in e)if(_1.call(e,t))return!0;return!1}function Bi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function qi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Vi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function z1(e){if(!Bo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function j1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Vo(e){return Y0(e)?e:new xn(e)}function Y0(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J0(e){return typeof e=="string"||(0,U1.default)(e)}function G1(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function W1(e){return e.join(" ").trim()}var Q0=e=>{if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{gn(t,"element",(n,o,a)=>{let r=a;if(r===null)return;let i;if(e.allowedElements?i=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(i=e.disallowedElements.includes(n.tagName)),!i&&e.allowElement&&typeof o=="number"&&r&&(i=!e.allowElement(n,o,r)),i&&typeof o=="number"&&r)return e.unwrapDisallowed&&n.children?r.children.splice(o,1,...n.children):r.children.splice(o,1),o})}},ey=Q0;function ty(e){let t=-1;for(;++tString(t)).join("")}var Ui={}.hasOwnProperty,oy=e=>g(X1,{get node(){return e.node},get context(){return e.context}}),X1=e=>g(He,{get each(){return e.node.children},children:(t,n)=>g(An,{get children(){return[g(wt,{get when(){return t.type==="element"},get children(){return g(ry,{get context(){return e.context},get index(){return n()},node:t,get parent(){return e.node}})}}),g(wt,{get when(){return t.type==="text"&&t.value!==` -`},get children(){return g(ay,{get context(){return e.context},get index(){return n()},node:t,get parent(){return e.node}})}})]}})}),ay=e=>{let t=U(()=>{let n={...e.context},o=n.options,a=e.node,i={parent:e.parent},s=a.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},c=o.components&&Ui.call(o.components,"text")?o.components.text:null,l=typeof c=="string";return i.key=["text",s.start.line,s.start.column,e.index].join("-"),o.sourcePos&&(i["data-sourcepos"]=Z1(s)),!l&&o.rawSourcePos&&(i.sourcePosition=a.position),l||(i.node=a),{properties:i,context:n,component:c}});return g(ae,{get when(){return t().component},get fallback(){return e.node.value},get children(){return g(yt,R({get component(){return t().component||"span"}},()=>t().properties))}})},ry=e=>{let t=U(()=>{let n={...e.context},o=n.options,a=n.schema,r=e.node,i=r.tagName,s=e.parent,c={},l=a,d;if(a.space==="html"&&i==="svg"&&(l=S1,n.schema=l),r.properties)for(d in r.properties)Ui.call(r.properties,d)&&ny(c,d,r.properties[d],n);(i==="ol"||i==="ul")&&n.listDepth++,(i==="ol"||i==="ul")&&n.listDepth--,n.schema=a;let u=r.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},h=o.components&&Ui.call(o.components,i)?o.components[i]:i,p=typeof h=="string";if(c.key=[i,u.start.line,u.start.column,e.index].join("-"),i==="a"&&o.linkTarget&&(c.target=typeof o.linkTarget=="function"?o.linkTarget(String(c.href||""),r.children,typeof c.title=="string"?c.title:void 0):o.linkTarget),i==="a"&&o.transformLinkUri&&(c.href=o.transformLinkUri(String(c.href||""),r.children,typeof c.title=="string"?c.title:void 0)),!p&&i==="code"&&s.type==="element"&&s.tagName!=="pre"&&(c.inline=!0),!p&&(i==="h1"||i==="h2"||i==="h3"||i==="h4"||i==="h5"||i==="h6")&&(c.level=Number.parseInt(i.charAt(1),10)),i==="img"&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),typeof c.title=="string"?c.title:void 0)),!p&&i==="li"&&s.type==="element"){let y=ty(r);c.checked=y?.properties?!!y.properties.checked:null,c.index=ji(s,r),c.ordered=s.tagName==="ol"}return!p&&(i==="ol"||i==="ul")&&(c.ordered=i==="ol",c.depth=n.listDepth),(i==="td"||i==="th")&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),p||(c.isHeader=i==="th")),!p&&i==="tr"&&s.type==="element"&&(c.isHeader=s.tagName==="thead"),o.sourcePos&&(c["data-sourcepos"]=Z1(u)),!p&&o.rawSourcePos&&(c.sourcePosition=r.position),!p&&o.includeElementIndex&&(c.index=ji(s,r),c.siblingCount=ji(s)),p||(c.node=r),{properties:c,context:n,component:h}});return g(yt,R({get component(){return t().component}},()=>t().properties,{get children(){return g(X1,{get node(){return e.node},get context(){return t().context}})}}))},iy=ne("
"),sy={renderingStrategy:"memo",remarkPlugins:[],rehypePlugins:[],class:"",unwrapDisallowed:!1,disallowedElements:void 0,allowedElements:void 0,allowElement:void 0,children:"",sourcePos:!1,rawSourcePos:!1,skipHtml:!1,includeElementIndex:!1,transformLinkUri:null,transformImageUri:void 0,linkTarget:"_self",components:{}},Y1=e=>{let t=R(sy,e),[n,o]=Xt({type:"root",children:[]}),a=U(()=>{let r=t.children,i=zi().use(qa).use(t.remarkPlugins||[]).use(wi,{allowDangerousHtml:!0}).use(t.rehypePlugins||[]).use(ey,t),s=new xn;typeof r=="string"?s.value=r:r!==void 0&&t.children;let c=i.runSync(i.parse(s),s);if(c.type!=="root")throw new TypeError("Expected a `root` node");return c});return t.renderingStrategy==="reconcile"&&Q(()=>{o(k1(a()))}),(()=>{var r=iy();return z(r,g(oy,{context:{options:t,schema:b1,listDepth:0},get node(){return U(()=>t.renderingStrategy==="memo")()?a():n}})),Q(()=>rn(r,t.class)),r})()};var cy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},to=cy,ly=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dy=(...e)=>e.filter((t,n,o)=>!!t&&o.indexOf(t)===n).join(" "),uy=ne(""),hy=e=>{let[t,n]=Y(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var o=uy();return Me(o,R(to,{get width(){return t.size??to.width},get height(){return t.size??to.height},get stroke(){return t.color??to.stroke},get"stroke-width"(){return U(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??to["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??to["stroke-width"])},get class(){return dy("lucide","lucide-icon",t.name!=null?`lucide-${ly(t?.name)}`:void 0,t.class!=null?t.class:"")}},n),!0,!0),z(o,g(He,{get each(){return t.iconNode},children:([a,r])=>g(yt,R({component:a},r))})),o})()},vt=hy;var py=[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]],yy=e=>g(vt,R(e,{name:"Home",iconNode:py})),J1=yy;var fy=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],my=e=>g(vt,R(e,{name:"LogIn",iconNode:fy})),_i=my,gy=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],ky=e=>g(vt,R(e,{name:"LogOut",iconNode:gy})),Q1=ky;var vy=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],My=e=>g(vt,R(e,{name:"Moon",iconNode:vy})),ed=My;var xy=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],wy=e=>g(vt,R(e,{name:"Search",iconNode:xy})),td=wy;var Cy=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],by=e=>g(vt,R(e,{name:"Sun",iconNode:Cy})),nd=by;var Sy=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],Ly=e=>g(vt,R(e,{name:"Swords",iconNode:Sy})),Ki=Ly;var Ny=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],$y=e=>g(vt,R(e,{name:"Trophy",iconNode:Ny})),od=$y;var Iy=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Py=e=>g(vt,R(e,{name:"User",iconNode:Iy})),ad=Py;var Ay=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Dy=e=>g(vt,R(e,{name:"Users",iconNode:Ay})),rd=Dy;var Ty=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fy=e=>g(vt,R(e,{name:"X",iconNode:Ty})),id=Fy;var Oy=e=>typeof e=="function",or=(e,t)=>Oy(e)?e(t):e,Le;(function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.DISMISS_TOAST=3]="DISMISS_TOAST",e[e.REMOVE_TOAST=4]="REMOVE_TOAST",e[e.START_PAUSE=5]="START_PAUSE",e[e.END_PAUSE=6]="END_PAUSE"})(Le||(Le={}));var[wn,Jt]=Xt({toasts:[],pausedAt:void 0}),Ry=()=>{let{pausedAt:e,toasts:t}=wn;if(e)return;let n=Date.now();return t.map(a=>{if(a.duration===1/0)return;let r=(a.duration||0)+a.pauseDuration-(n-a.createdAt);if(r<=0){a.visible&&Mt({type:Le.DISMISS_TOAST,toastId:a.id});return}return setTimeout(()=>{Mt({type:Le.DISMISS_TOAST,toastId:a.id})},r)})},Ho=new Map,sd=(e,t)=>{if(Ho.has(e))return;let n=setTimeout(()=>{Ho.delete(e),Mt({type:Le.REMOVE_TOAST,toastId:e})},t);Ho.set(e,n)},Ey=e=>{let t=Ho.get(e);Ho.delete(e),t&&clearTimeout(t)},Mt=e=>{switch(e.type){case Le.ADD_TOAST:Jt("toasts",a=>{let r=a;return[e.toast,...r]});break;case Le.DISMISS_TOAST:let{toastId:t}=e,n=wn.toasts;if(t){let a=n.find(r=>r.id===t);a&&sd(t,a.unmountDelay),Jt("toasts",r=>r.id===t,Oo(r=>r.visible=!1))}else n.forEach(a=>{sd(a.id,a.unmountDelay)}),Jt("toasts",a=>a.id!==void 0,Oo(a=>a.visible=!1));break;case Le.REMOVE_TOAST:if(!e.toastId){Jt("toasts",[]);break}Jt("toasts",a=>a.filter(i=>i.id!==e.toastId));break;case Le.UPDATE_TOAST:e.toast.id&&Ey(e.toast.id),Jt("toasts",a=>a.id===e.toast.id,a=>({...a,...e.toast}));break;case Le.UPSERT_TOAST:wn.toasts.find(a=>a.id===e.toast.id)?Mt({type:Le.UPDATE_TOAST,toast:e.toast}):Mt({type:Le.ADD_TOAST,toast:e.toast});break;case Le.START_PAUSE:Jt(Oo(a=>{a.pausedAt=Date.now(),a.toasts.forEach(r=>{r.paused=!0})}));break;case Le.END_PAUSE:let o=e.time-(wn.pausedAt||0);Jt(Oo(a=>{a.pausedAt=void 0,a.toasts.forEach(r=>{r.pauseDuration+=o,r.paused=!1})}));break}},By={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},oo={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},cd={position:"top-right",toastOptions:oo,gutter:8,containerStyle:{},containerClassName:""},er="16px",qy={position:"fixed","z-index":9999,top:er,bottom:er,left:er,right:er,"pointer-events":"none"},Vy=(()=>{let e=0;return()=>String(++e)})(),Hy=e=>{Wy(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},zy=(e,t)=>{let o=e.includes("top")?{top:0,"margin-top":`${t}px`}:{bottom:0,"margin-bottom":`${t}px`},a=e.includes("center")?{"justify-content":"center"}:e.includes("right")?{"justify-content":"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:"all 230ms cubic-bezier(.21,1.02,.73,1)",...o,...a}},jy=(e,t)=>{let n=e.getBoundingClientRect();n.height!==t.height&&Mt({type:Le.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},Uy=(e,t)=>{let{toasts:n}=wn,o=no().gutter||cd.gutter||8,a=n.filter(c=>(c.position||t)===t&&c.height),r=a.findIndex(c=>c.id===e.id),i=a.filter((c,l)=>lc+o+(l.height||0),0)},_y=(e,t)=>(e.position||t).includes("top")?1:-1,Ky={display:"flex","align-items":"center",color:"#363636",background:"white","box-shadow":"0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)","max-width":"350px","pointer-events":"auto",padding:"8px 10px","border-radius":"4px","line-height":"1.3","will-change":"transform"},Gy={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},tr={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},ar=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[no,Wy]=H(cd),Zy=(e,t="blank",n)=>({...oo,...no().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||Vy(),paused:!1,style:{...oo.style,...no().toastOptions?.style,...n.style},duration:n.duration||no().toastOptions?.duration||By[t],position:n.position||no().toastOptions?.position||no().position||oo.position}),zo=e=>(t,n={})=>ht(()=>{let o=wn.toasts.find(r=>r.id===n.id),a=Zy(t,e,{...o,duration:void 0,...n});return Mt({type:Le.UPSERT_TOAST,toast:a}),a.id}),Ze=(e,t)=>zo("blank")(e,t);pe(()=>Ze);Ze.error=zo("error");Ze.success=zo("success");Ze.loading=zo("loading");Ze.custom=zo("custom");Ze.dismiss=e=>{Mt({type:Le.DISMISS_TOAST,toastId:e})};Ze.promise=(e,t,n)=>{let o=Ze.loading(t.loading,{...n});return e.then(a=>(Ze.success(or(t.success,a),{id:o,...n}),a)).catch(a=>{Ze.error(or(t.error,a),{id:o,...n})}),e};Ze.remove=e=>{Mt({type:Le.REMOVE_TOAST,toastId:e})};var Xy=ne("
",4),ld=e=>(V(()=>{Hy(e)}),V(()=>{let t=Ry();_(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{let t=Xy.cloneNode(!0);return t.firstChild,z(t,g(He,{get each(){return wn.toasts},children:n=>g(ef,{toast:n})}),null),Q(n=>{let o={...qy,...e.containerStyle},a=e.containerClassName;return n._v$=Ae(t,o,n._v$),a!==n._v$2&&rn(t,n._v$2=a),n},{_v$:void 0,_v$2:void 0}),t})()),nr=ne("
",2),Yy=ne("
",4),Jy=e=>{let t;return V(()=>{if(!t)return;let n=_y(e.toast,e.position);e.toast.visible?t.animate([{transform:`translate3d(0,${n*-200}%,0) scale(.6)`,opacity:.5},{transform:"translate3d(0,0,0) scale(1)",opacity:1}],{duration:350,fill:"forwards",easing:"cubic-bezier(.21,1.02,.73,1)"}):t.animate([{transform:"translate3d(0,0,-1px) scale(1)",opacity:1},{transform:`translate3d(0,${n*-150}%,-1px) scale(.4)`,opacity:0}],{duration:400,fill:"forwards",easing:"cubic-bezier(.06,.71,.55,1)"})}),(()=>{let n=Yy.cloneNode(!0),o=n.firstChild,a=t;return typeof a=="function"?a(n):t=n,z(n,g(An,{get children(){return[g(wt,{get when(){return e.toast.icon},get children(){let r=nr.cloneNode(!0);return z(r,()=>e.toast.icon),Q(i=>Ae(r,tr,i)),r}}),g(wt,{get when(){return e.toast.type==="loading"},get children(){let r=nr.cloneNode(!0);return z(r,g(lf,R(()=>e.toast.iconTheme))),Q(i=>Ae(r,tr,i)),r}}),g(wt,{get when(){return e.toast.type==="success"},get children(){let r=nr.cloneNode(!0);return z(r,g(af,R(()=>e.toast.iconTheme))),Q(i=>Ae(r,tr,i)),r}}),g(wt,{get when(){return e.toast.type==="error"},get children(){let r=nr.cloneNode(!0);return z(r,g(sf,R(()=>e.toast.iconTheme))),Q(i=>Ae(r,tr,i)),r}})]}}),o),Me(o,()=>e.toast.ariaProps,!1,!0),z(o,()=>or(e.toast.message,e.toast)),Q(r=>{let i=e.toast.className,s={...Ky,...e.toast.style},c=Gy;return i!==r._v$&&rn(n,r._v$=i),r._v$2=Ae(n,s,r._v$2),r._v$3=Ae(o,c,r._v$3),r},{_v$:void 0,_v$2:void 0,_v$3:void 0}),n})()},Qy=ne("
",2),ef=e=>{let t=()=>{let a=e.toast.position||oo.position,r=Uy(e.toast,a);return zy(a,r)},n=U(()=>t()),o;return Pe(()=>{o&&jy(o,e.toast)}),(()=>{let a=Qy.cloneNode(!0);a.addEventListener("mouseleave",()=>Mt({type:Le.END_PAUSE,time:Date.now()})),a.addEventListener("mouseenter",()=>Mt({type:Le.START_PAUSE,time:Date.now()}));let r=o;return typeof r=="function"?r(a):o=a,z(a,(()=>{let i=U(()=>e.toast.type==="custom",!0);return()=>i()?or(e.toast.message,e.toast):g(Jy,{get toast(){return e.toast},get position(){return e.toast.position||oo.position}})})()),Q(i=>{let s=n(),c=e.toast.visible?"sldt-active":"";return i._v$=Ae(a,s,i._v$),c!==i._v$2&&rn(a,i._v$2=c),i},{_v$:void 0,_v$2:void 0}),a})()},tf=ne('',8,!0),nf=ne('',8,!0),dd=e=>{let t={dur:"0.35s",begin:"100ms",fill:"freeze",calcMode:"spline",keyTimes:"0; 0.6; 1",keySplines:"0.25 0.71 0.4 0.88; .59 .22 .87 .63"};return(()=>{let n=tf.cloneNode(!0),o=n.firstChild,a=o.nextSibling;return Me(o,t,!0,!1),Me(a,t,!0,!1),Q(()=>me(n,"fill",e.fill)),n})()},ud=e=>{let t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...ar("0.0 0.0 0.2 1")};return(()=>{let n=nf.cloneNode(!0),o=n.firstChild,a=o.nextSibling;return Me(o,t,!0,!1),Me(a,t,!0,!1),Q(()=>me(n,"fill",e.fill)),n})()},of=ne('',6),af=e=>{let t=e.primary||"#34C759";return(()=>{let n=of.cloneNode(!0),o=n.firstChild,a=o.firstChild;return n.style.setProperty("overflow","visible"),z(n,g(dd,{fill:t}),o),z(n,g(ud,{fill:t,begin:"350ms"}),o),Me(a,()=>ar("0.0, 0.0, 0.58, 1.0"),!0,!1),Q(()=>me(o,"stroke",e.secondary||"#FCFCFC")),n})()},rf=ne('',10),sf=e=>{let t=e.primary||"#FF3B30";return(()=>{let n=rf.cloneNode(!0),o=n.firstChild,a=o.firstChild,r=o.nextSibling,i=r.firstChild;return n.style.setProperty("overflow","visible"),z(n,g(dd,{fill:t}),o),z(n,g(ud,{fill:t}),o),Me(a,()=>ar("0.0, 0.0, 0.58, 1.0"),!0,!1),Me(i,()=>ar("0.0, 0.0, 0.58, 1.0"),!0,!1),Q(s=>{let c=e.secondary||"#FFFFFF",l=e.secondary||"#FFFFFF";return c!==s._v$&&me(o,"stroke",s._v$=c),l!==s._v$2&&me(r,"fill",s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()},cf=ne('',8),lf=e=>(()=>{let t=cf.cloneNode(!0),n=t.firstChild,o=n.nextSibling;return t.style.setProperty("overflow","visible"),Q(a=>{let r=e.primary||"#E5E7EB",i=e.secondary||"#4b5563";return r!==a._v$&&me(n,"stroke",a._v$=r),i!==a._v$2&&me(o,"stroke",a._v$2=i),a},{_v$:void 0,_v$2:void 0}),t})(),Gi=Ze;var Qt=class{constructor(t){this.value=t}valueOf(){return this.value}},ye=class extends Qt{constructor(t="???"){super(t)}toString(t){return`{${this.value}}`}},Xe=class extends Qt{constructor(t,n={}){super(t),this.opts=n}toString(t){try{return t.memoizeIntlObject(Intl.NumberFormat,this.opts).format(this.value)}catch(n){return t.reportError(n),this.value.toString(10)}}},Lt=class extends Qt{constructor(t,n={}){super(t),this.opts=n}toString(t){try{return t.memoizeIntlObject(Intl.DateTimeFormat,this.opts).format(this.value)}catch(n){return t.reportError(n),new Date(this.value).toISOString()}}};var hd=100,df="\u2068",uf="\u2069";function hf(e,t,n){if(n===t||n instanceof Xe&&t instanceof Xe&&n.value===t.value)return!0;if(t instanceof Xe&&typeof n=="string"){let o=e.memoizeIntlObject(Intl.PluralRules,t.opts).select(t.value);if(n===o)return!0}return!1}function pd(e,t,n){return t[n]?ao(e,t[n].value):(e.reportError(new RangeError("No default")),new ye)}function Wi(e,t){let n=[],o=Object.create(null);for(let a of t)a.type==="narg"?o[a.name]=jo(e,a.value):n.push(jo(e,a));return{positional:n,named:o}}function jo(e,t){switch(t.type){case"str":return t.value;case"num":return new Xe(t.value,{minimumFractionDigits:t.precision});case"var":return pf(e,t);case"mesg":return yf(e,t);case"term":return ff(e,t);case"func":return mf(e,t);case"select":return gf(e,t);default:return new ye}}function pf(e,{name:t}){let n;if(e.params)if(Object.prototype.hasOwnProperty.call(e.params,t))n=e.params[t];else return new ye(`$${t}`);else if(e.args&&Object.prototype.hasOwnProperty.call(e.args,t))n=e.args[t];else return e.reportError(new ReferenceError(`Unknown variable: $${t}`)),new ye(`$${t}`);if(n instanceof Qt)return n;switch(typeof n){case"string":return n;case"number":return new Xe(n);case"object":if(n instanceof Date)return new Lt(n.getTime());default:return e.reportError(new TypeError(`Variable type not supported: $${t}, ${typeof n}`)),new ye(`$${t}`)}}function yf(e,{name:t,attr:n}){let o=e.bundle._messages.get(t);if(!o)return e.reportError(new ReferenceError(`Unknown message: ${t}`)),new ye(t);if(n){let a=o.attributes[n];return a?ao(e,a):(e.reportError(new ReferenceError(`Unknown attribute: ${n}`)),new ye(`${t}.${n}`))}return o.value?ao(e,o.value):(e.reportError(new ReferenceError(`No value: ${t}`)),new ye(t))}function ff(e,{name:t,attr:n,args:o}){let a=`-${t}`,r=e.bundle._terms.get(a);if(!r)return e.reportError(new ReferenceError(`Unknown term: ${a}`)),new ye(a);if(n){let s=r.attributes[n];if(s){e.params=Wi(e,o).named;let c=ao(e,s);return e.params=null,c}return e.reportError(new ReferenceError(`Unknown attribute: ${n}`)),new ye(`${a}.${n}`)}e.params=Wi(e,o).named;let i=ao(e,r.value);return e.params=null,i}function mf(e,{name:t,args:n}){let o=e.bundle._functions[t];if(!o)return e.reportError(new ReferenceError(`Unknown function: ${t}()`)),new ye(`${t}()`);if(typeof o!="function")return e.reportError(new TypeError(`Function ${t}() is not callable`)),new ye(`${t}()`);try{let a=Wi(e,n);return o(a.positional,a.named)}catch(a){return e.reportError(a),new ye(`${t}()`)}}function gf(e,{selector:t,variants:n,star:o}){let a=jo(e,t);if(a instanceof ye)return pd(e,n,o);for(let r of n){let i=jo(e,r.key);if(hf(e,a,i))return ao(e,r.value)}return pd(e,n,o)}function Zi(e,t){if(e.dirty.has(t))return e.reportError(new RangeError("Cyclic reference")),new ye;e.dirty.add(t);let n=[],o=e.bundle._useIsolating&&t.length>1;for(let a of t){if(typeof a=="string"){n.push(e.bundle._transform(a));continue}if(e.placeables++,e.placeables>hd)throw e.dirty.delete(t),new RangeError(`Too many placeables expanded: ${e.placeables}, max allowed is ${hd}`);o&&n.push(df),n.push(jo(e,a).toString(e)),o&&n.push(uf)}return e.dirty.delete(t),n.join("")}function ao(e,t){return typeof t=="string"?e.bundle._transform(t):Zi(e,t)}var rr=class{constructor(t,n,o){this.dirty=new WeakSet,this.params=null,this.placeables=0,this.bundle=t,this.errors=n,this.args=o}reportError(t){if(!this.errors||!(t instanceof Error))throw t;this.errors.push(t)}memoizeIntlObject(t,n){let o=this.bundle._intls.get(t);o||(o={},this.bundle._intls.set(t,o));let a=JSON.stringify(n);return o[a]||(o[a]=new t(this.bundle.locales,n)),o[a]}};function ir(e,t){let n=Object.create(null);for(let[o,a]of Object.entries(e))t.includes(o)&&(n[o]=a.valueOf());return n}var yd=["unitDisplay","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function md(e,t){let n=e[0];if(n instanceof ye)return new ye(`NUMBER(${n.valueOf()})`);if(n instanceof Xe)return new Xe(n.valueOf(),{...n.opts,...ir(t,yd)});if(n instanceof Lt)return new Xe(n.valueOf(),{...ir(t,yd)});throw new TypeError("Invalid argument to NUMBER")}var fd=["dateStyle","timeStyle","fractionalSecondDigits","dayPeriod","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function gd(e,t){let n=e[0];if(n instanceof ye)return new ye(`DATETIME(${n.valueOf()})`);if(n instanceof Lt)return new Lt(n.valueOf(),{...n.opts,...ir(t,fd)});if(n instanceof Xe)return new Lt(n.valueOf(),{...ir(t,fd)});throw new TypeError("Invalid argument to DATETIME")}var kd=new Map;function vd(e){let t=Array.isArray(e)?e.join(" "):e,n=kd.get(t);return n===void 0&&(n=new Map,kd.set(t,n)),n}var Uo=class{constructor(t,{functions:n,useIsolating:o=!0,transform:a=r=>r}={}){this._terms=new Map,this._messages=new Map,this.locales=Array.isArray(t)?t:[t],this._functions={NUMBER:md,DATETIME:gd,...n},this._useIsolating=o,this._transform=a,this._intls=vd(t)}hasMessage(t){return this._messages.has(t)}getMessage(t){return this._messages.get(t)}addResource(t,{allowOverrides:n=!1}={}){let o=[];for(let a=0;a\s*/y,Pf=/\s*:\s*/y,Af=/\s*,?\s*/y,Df=/\s+/y,_o=class{constructor(t){this.body=[],Xi.lastIndex=0;let n=0;for(;;){let L=Xi.exec(t);if(L===null)break;n=Xi.lastIndex;try{this.body.push(c(L[1]))}catch(M){if(M instanceof SyntaxError)continue;throw M}}function o(L){return L.lastIndex=n,L.test(t)}function a(L,M){if(t[n]===L)return n++,!0;if(M)throw new M(`Expected ${L}`);return!1}function r(L,M){if(o(L))return n=L.lastIndex,!0;if(M)throw new M(`Expected ${L.toString()}`);return!1}function i(L){L.lastIndex=n;let M=L.exec(t);if(M===null)throw new SyntaxError(`Expected ${L.toString()}`);return n=L.lastIndex,M}function s(L){return i(L)[1]}function c(L){let M=d(),N=l();if(M===null&&Object.keys(N).length===0)throw new SyntaxError("Expected message value or attributes");return{id:L,value:M,attributes:N}}function l(){let L=Object.create(null);for(;o(Md);){let M=s(Md),N=d();if(N===null)throw new SyntaxError("Expected attribute value");L[M]=N}return L}function d(){let L;if(o(sr)&&(L=s(sr)),t[n]==="{"||t[n]==="}")return u(L?[L]:[],1/0);let M=x();return M?L?u([L,M],M.length):(M.value=F(M.value,wf),u([M],M.length)):L?F(L,bd):null}function u(L=[],M){for(;;){if(o(sr)){L.push(s(sr));continue}if(t[n]==="{"){L.push(h());continue}if(t[n]==="}")throw new SyntaxError("Unbalanced closing brace");let $=x();if($){L.push($),M=Math.min(M,$.length);continue}break}let N=L.length-1,S=L[N];typeof S=="string"&&(L[N]=F(S,bd));let I=[];for(let $ of L)$ instanceof cr&&($=$.value.slice(0,$.value.length-M)),$&&I.push($);return I}function h(){r(Sf,SyntaxError);let L=p();if(r(Sd))return L;if(r(If)){let M=w();return r(Sd,SyntaxError),{type:"select",selector:L,...M}}throw new SyntaxError("Unclosed placeable")}function p(){if(t[n]==="{")return h();if(o(xd)){let[,L,M,N=null]=i(xd);if(L==="$")return{type:"var",name:M};if(r($f)){let S=y();if(L==="-")return{type:"term",name:M,attr:N,args:S};if(Mf.test(M))return{type:"func",name:M,args:S};throw new SyntaxError("Function names must be all upper-case")}return L==="-"?{type:"term",name:M,attr:N,args:[]}:{type:"mesg",name:M,attr:N}}return C()}function y(){let L=[];for(;;){switch(t[n]){case")":return n++,L;case void 0:throw new SyntaxError("Unclosed argument list")}L.push(m()),r(Af)}}function m(){let L=p();return L.type!=="mesg"?L:r(Pf)?{type:"narg",name:L.name,value:C()}:L}function w(){let L=[],M=0,N;for(;o(kf);){a("*")&&(N=M);let S=f(),I=d();if(I===null)throw new SyntaxError("Expected variant value");L[M++]={key:S,value:I}}if(M===0)return null;if(N===void 0)throw new SyntaxError("Expected default variant");return{variants:L,star:N}}function f(){r(Lf,SyntaxError);let L;return o(Yi)?L=b():L={type:"str",value:s(vf)},r(Nf,SyntaxError),L}function C(){if(o(Yi))return b();if(t[n]==='"')return A();throw new SyntaxError("Invalid expression")}function b(){let[,L,M=""]=i(Yi),N=M.length;return{type:"num",value:parseFloat(L),precision:N}}function A(){a('"',SyntaxError);let L="";for(;;){if(L+=s(xf),t[n]==="\\"){L+=O();continue}if(a('"'))return{type:"str",value:L};throw new SyntaxError("Unclosed string literal")}}function O(){if(o(wd))return s(wd);if(o(Cd)){let[,L,M]=i(Cd),N=parseInt(L||M,16);return N<=55295||57344<=N?String.fromCodePoint(N):"\uFFFD"}throw new SyntaxError("Unknown escape sequence")}function x(){let L=n;switch(r(Df),t[n]){case".":case"[":case"*":case"}":case void 0:return!1;case"{":return q(t.slice(L,n))}return t[n-1]===" "?q(t.slice(L,n)):!1}function F(L,M){return L.replace(M,"")}function q(L){let M=L.replace(Cf,` -`),N=bf.exec(L)[1].length;return new cr(M,N)}}},cr=class{constructor(t,n){this.value=t,this.length=n}};var Tf="([a-z]{2,3}|\\*)",Ff="(?:-([a-z]{4}|\\*))",Of="(?:-([a-z]{2}|\\*))",Rf="(?:-(([0-9][a-z0-9]{3}|[a-z0-9]{5,8})|\\*))",Ef=new RegExp(`^${Tf}${Ff}?${Of}?${Rf}?$`,"i"),en=class{constructor(t){let n=Ef.exec(t.replace(/_/g,"-"));if(!n){this.isWellFormed=!1;return}let[,o,a,r,i]=n;o&&(this.language=o.toLowerCase()),a&&(this.script=a[0].toUpperCase()+a.slice(1)),r&&(this.region=r.toUpperCase()),this.variant=i,this.isWellFormed=!0}isEqual(t){return this.language===t.language&&this.script===t.script&&this.region===t.region&&this.variant===t.variant}matches(t,n=!1,o=!1){return(this.language===t.language||n&&this.language===void 0||o&&t.language===void 0)&&(this.script===t.script||n&&this.script===void 0||o&&t.script===void 0)&&(this.region===t.region||n&&this.region===void 0||o&&t.region===void 0)&&(this.variant===t.variant||n&&this.variant===void 0||o&&t.variant===void 0)}toString(){return[this.language,this.script,this.region,this.variant].filter(t=>t!==void 0).join("-")}clearVariants(){this.variant=void 0}clearRegion(){this.region=void 0}addLikelySubtags(){let t=qf(this.toString().toLowerCase());return t?(this.language=t.language,this.script=t.script,this.region=t.region,this.variant=t.variant,!0):!1}},Ld={ar:"ar-arab-eg","az-arab":"az-arab-ir","az-ir":"az-arab-ir",be:"be-cyrl-by",da:"da-latn-dk",el:"el-grek-gr",en:"en-latn-us",fa:"fa-arab-ir",ja:"ja-jpan-jp",ko:"ko-kore-kr",pt:"pt-latn-br",sr:"sr-cyrl-rs","sr-ru":"sr-latn-ru",sv:"sv-latn-se",ta:"ta-taml-in",uk:"uk-cyrl-ua",zh:"zh-hans-cn","zh-hant":"zh-hant-tw","zh-hk":"zh-hant-hk","zh-mo":"zh-hant-mo","zh-tw":"zh-hant-tw","zh-gb":"zh-hant-gb","zh-us":"zh-hant-us"},Bf=["az","bg","cs","de","es","fi","fr","hu","it","lt","lv","nl","pl","ro","ru"];function qf(e){if(Object.prototype.hasOwnProperty.call(Ld,e))return new en(Ld[e]);let t=new en(e);return t.language&&Bf.includes(t.language)?(t.region=t.language.toUpperCase(),t):null}function Ji(e,t,n){let o=new Set,a=new Map;for(let r of t)new en(r).isWellFormed&&a.set(r,new en(r));e:for(let r of e){let i=r.toLowerCase(),s=new en(i);if(s.language!==void 0){for(let c of a.keys())if(i===c.toLowerCase()){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}if(s.addLikelySubtags()){for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}s.clearVariants();for(let[c,l]of a.entries())if(l.matches(s,!0,!0)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}if(s.clearRegion(),s.addLikelySubtags()){for(let[c,l]of a.entries())if(l.matches(s,!0,!1)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}s.clearRegion();for(let[c,l]of a.entries())if(l.matches(s,!0,!0)){if(o.add(c),a.delete(c),n==="lookup")return Array.from(o);if(n==="filtering")continue;continue e}}}return Array.from(o)}function Qi(e,t,{strategy:n="filtering",defaultLocale:o}={}){let a=Ji(Array.from(e??[]).map(String),Array.from(t??[]).map(String),n);if(n==="lookup"){if(o===void 0)throw new Error("defaultLocale cannot be undefined for strategy `lookup`");a.length===0&&a.push(o)}else o&&!a.includes(o)&&a.push(o);return a}var Nd=1,Vf=.9,Hf=.8,zf=.17,es=.1,ts=.999,jf=.9999,Uf=.99,_f=/[\\\/_+.#"@\[\(\{&]/,Kf=/[\\\/_+.#"@\[\(\{&]/g,Gf=/[\s-]/,Id=/[\s-]/g;function ns(e,t,n,o,a,r,i){if(r===t.length)return a===e.length?Nd:Uf;var s=`${a},${r}`;if(i[s]!==void 0)return i[s];for(var c=o.charAt(r),l=n.indexOf(c,a),d=0,u,h,p,y;l>=0;)u=ns(e,t,n,o,l+1,r+1,i),u>d&&(l===a?u*=Nd:_f.test(e.charAt(l-1))?(u*=Hf,p=e.slice(a,l-1).match(Kf),p&&a>0&&(u*=Math.pow(ts,p.length))):Gf.test(e.charAt(l-1))?(u*=Vf,y=e.slice(a,l-1).match(Id),y&&a>0&&(u*=Math.pow(ts,y.length))):(u*=zf,a>0&&(u*=Math.pow(ts,l-a))),e.charAt(l)!==t.charAt(r)&&(u*=jf)),(uu&&(u=h*es)),u>d&&(d=u),l=n.indexOf(c,l+1);return i[s]=d,d}function $d(e){return e.toLowerCase().replace(Id," ")}function Pd(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ns(e,t,$d(e),$d(t),0,0,{})}var Ye=e=>typeof e=="function"?e():e;var lr=new Map,Wf=e=>{V(()=>{let t=Ye(e.style)??{},n=Ye(e.properties)??[],o={};for(let r in t)o[r]=e.element.style[r];let a=lr.get(e.key);a?a.activeCount++:lr.set(e.key,{activeCount:1,originalStyles:o,properties:n.map(r=>r.key)}),Object.assign(e.element.style,e.style);for(let r of n)e.element.style.setProperty(r.key,r.value);_(()=>{let r=lr.get(e.key);if(r){if(r.activeCount!==1){r.activeCount--;return}lr.delete(e.key);for(let[i,s]of Object.entries(r.originalStyles))e.element.style[i]=s;for(let i of r.properties)e.element.style.removeProperty(i);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},dr=Wf;var Zf=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Xf=(e,t)=>{let n=getComputedStyle(e),o=t==="x"?n.overflowX:n.overflowY;return o==="auto"||o==="scroll"||e.tagName==="HTML"&&o==="visible"},Ad=(e,t,n)=>{let o=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1,a=e,r=0,i=0,s=!1;do{let[c,l,d]=Zf(a,t),u=d-c-o*l;(l!==0||u!==0)&&Xf(a,t)&&(r+=u,i+=l),a===(n??document.documentElement)?s=!0:a=a._$host??a.parentElement}while(a&&!s);return[r,i]};var[Dd,Td]=H([]),Yf=e=>Dd().indexOf(e)===Dd().length-1,Jf=e=>{let t=R({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",allowPinchZoom:!1},e),n=Ve(),o=[0,0],a=null,r=null;V(()=>{Ye(t.enabled)&&(Td(l=>[...l,n]),_(()=>{Td(l=>l.filter(d=>d!==n))}))}),V(()=>{if(!Ye(t.enabled)||!Ye(t.hideScrollbar))return;let{body:l}=document,d=window.innerWidth-l.offsetWidth;if(dr({key:"prevent-scroll-overflow",element:l,style:{overflow:"hidden"}}),Ye(t.preventScrollbarShift)){let u={},h=[];d>0&&(Ye(t.preventScrollbarShiftMode)==="padding"?u.paddingRight=`calc(${window.getComputedStyle(l).paddingRight} + ${d}px)`:u.marginRight=`calc(${window.getComputedStyle(l).marginRight} + ${d}px)`,h.push({key:"--scrollbar-width",value:`${d}px`}));let p=window.scrollY,y=window.scrollX;dr({key:"prevent-scroll-scrollbar",element:l,style:u,properties:h,cleanup:()=>{d>0&&window.scrollTo(y,p)}})}}),V(()=>{!Yf(n)||!Ye(t.enabled)||(document.addEventListener("wheel",s,{passive:!1}),document.addEventListener("touchstart",i,{passive:!1}),document.addEventListener("touchmove",c,{passive:!1}),_(()=>{document.removeEventListener("wheel",s),document.removeEventListener("touchstart",i),document.removeEventListener("touchmove",c)}))});let i=l=>{o=Fd(l),a=null,r=null},s=l=>{let d=l.target,u=Ye(t.element),h=Qf(l),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y",y=p==="x"?h[0]:h[1],m=Od(d,p,y,u),w;u&&os(u,d)?w=!m:w=!0,w&&l.cancelable&&l.preventDefault()},c=l=>{let d=Ye(t.element),u=l.target,h;if(l.touches.length===2)h=!Ye(t.allowPinchZoom);else{if(a==null||r===null){let p=Fd(l).map((m,w)=>o[w]-m),y=Math.abs(p[0])>Math.abs(p[1])?"x":"y";a=y,r=y==="x"?p[0]:p[1]}if(u.type==="range")h=!1;else{let p=Od(u,a,r,d);d&&os(d,u)?h=!p:h=!0}}h&&l.cancelable&&l.preventDefault()}},Qf=e=>[e.deltaX,e.deltaY],Fd=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Od=(e,t,n,o)=>{let a=o!==null&&os(o,e),[r,i]=Ad(e,t,a?o:void 0);return!(n>0&&Math.abs(r)<=1||n<0&&Math.abs(i)<1)},os=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},em=Jf,ur=em;var yw=K();var Gd="kb-color-mode";function tm(e){return{ssr:!1,type:"localStorage",get:t=>{if(le)return t;let n;try{n=localStorage.getItem(e)}catch{}return n??t},set:t=>{try{localStorage.setItem(e,t)}catch{}}}}var fw=tm(Gd);function Rd(e,t){return e.match(new RegExp(`(^| )${t}=([^;]+)`))?.[2]}function nm(e,t){return{ssr:!!t,type:"cookie",get:n=>t?Rd(t,e)??n:le?n:Rd(document.cookie,e)??n,set:n=>{document.cookie=`${e}=${n}; max-age=31536000; path=/`}}}var mw=nm(Gd);function om(e){let[t,n]=H(e.defaultValue?.()),o=U(()=>e.value?.()!==void 0),a=U(()=>o()?e.value?.():t());return[a,i=>{pe(()=>{let s=Rn(i,a());return Object.is(s,a())||(o()||n(s),e.onChange?.(s)),s})}]}function am(e){let[t,n]=om(e);return[()=>t()??!1,n]}function rm(e={}){let[t,n]=am({value:()=>ie(e.open),defaultValue:()=>!!ie(e.defaultOpen),onChange:i=>e.onOpenChange?.(i)}),o=()=>{n(!0)},a=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:o,close:a,toggle:()=>{t()?a():o()}}}function im(e){let t=n=>{n.key===go.Escape&&e.onEscapeKeyDown?.(n)};V(()=>{if(le||ie(e.isDisabled))return;let n=e.ownerDocument?.()??ke();n.addEventListener("keydown",t),_(()=>{n.removeEventListener("keydown",t)})})}var pr="data-kb-top-layer",Wd,ss=!1,zt=[];function Go(e){return zt.findIndex(t=>t.node===e)}function sm(e){return zt[Go(e)]}function cm(e){return zt[zt.length-1].node===e}function Zd(){return zt.filter(e=>e.isPointerBlocking)}function lm(){return[...Zd()].slice(-1)[0]}function cs(){return Zd().length>0}function Xd(e){let t=Go(lm()?.node);return Go(e)e.onMountAutoFocus?.(y),s=y=>e.onUnmountAutoFocus?.(y),c=()=>ke(t()),l=()=>{let y=c().createElement("span");return y.setAttribute("data-focus-trap",""),y.tabIndex=0,Object.assign(y.style,ka),y},d=()=>{let y=t();return y?ko(y,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},u=()=>{let y=d();return y.length>0?y[0]:null},h=()=>{let y=d();return y.length>0?y[y.length-1]:null},p=()=>{let y=t();if(!y)return!1;let m=ft(y);return!m||he(y,m)?!1:vo(m)};V(()=>{if(le)return;let y=t();if(!y)return;Bd.add(a);let m=ft(y);if(!he(y,m)){let f=new CustomEvent(as,Ed);y.addEventListener(as,i),y.dispatchEvent(f),f.defaultPrevented||setTimeout(()=>{Ce(u()),ft(y)===m&&Ce(y)},0)}_(()=>{y.removeEventListener(as,i),setTimeout(()=>{let f=new CustomEvent(rs,Ed);p()&&f.preventDefault(),y.addEventListener(rs,s),y.dispatchEvent(f),f.defaultPrevented||Ce(m??c().body),y.removeEventListener(rs,s),Bd.remove(a)},0)})}),V(()=>{if(le)return;let y=t();if(!y||!ie(e.trapFocus)||n())return;let m=f=>{let C=f.target;C?.closest(`[${pr}]`)||(he(y,C)?r=C:Ce(r))},w=f=>{let b=f.relatedTarget??ft(y);b?.closest(`[${pr}]`)||he(y,b)||Ce(r)};c().addEventListener("focusin",m),c().addEventListener("focusout",w),_(()=>{c().removeEventListener("focusin",m),c().removeEventListener("focusout",w)})}),V(()=>{if(le)return;let y=t();if(!y||!ie(e.trapFocus)||n())return;let m=l();y.insertAdjacentElement("afterbegin",m);let w=l();y.insertAdjacentElement("beforeend",w);function f(b){let A=u(),O=h();b.relatedTarget===A?Ce(O):Ce(A)}m.addEventListener("focusin",f),w.addEventListener("focusin",f);let C=new MutationObserver(b=>{for(let A of b)A.previousSibling===w&&(w.remove(),y.insertAdjacentElement("beforeend",w)),A.nextSibling===m&&(m.remove(),y.insertAdjacentElement("afterbegin",m))});C.observe(y,{childList:!0,subtree:!1}),_(()=>{m.removeEventListener("focusin",f),w.removeEventListener("focusin",f),m.remove(),w.remove(),C.disconnect()})})}var mm="data-live-announcer";function gm(e){V(()=>{ie(e.isDisabled)||_(km(ie(e.targets),ie(e.root)))})}var Ko=new WeakMap,ct=[];function km(e,t=document.body){let n=new Set(e),o=new Set,a=c=>{for(let h of c.querySelectorAll(`[${mm}], [${pr}]`))n.add(h);let l=h=>{if(n.has(h)||h.parentElement&&o.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of n)if(h.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,{acceptNode:l}),u=l(c);if(u===NodeFilter.FILTER_ACCEPT&&r(c),u!==NodeFilter.FILTER_REJECT){let h=d.nextNode();for(;h!=null;)r(h),h=d.nextNode()}},r=c=>{let l=Ko.get(c)??0;c.getAttribute("aria-hidden")==="true"&&l===0||(l===0&&c.setAttribute("aria-hidden","true"),o.add(c),Ko.set(c,l+1))};ct.length&&ct[ct.length-1].disconnect(),a(t);let i=new MutationObserver(c=>{for(let l of c)if(!(l.type!=="childList"||l.addedNodes.length===0)&&![...n,...o].some(d=>d.contains(l.target))){for(let d of l.removedNodes)d instanceof Element&&(n.delete(d),o.delete(d));for(let d of l.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&a(d)}});i.observe(t,{childList:!0,subtree:!0});let s={observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return ct.push(s),()=>{i.disconnect();for(let c of o){let l=Ko.get(c);if(l==null)return;l===1?(c.removeAttribute("aria-hidden"),Ko.delete(c)):Ko.set(c,l-1)}s===ct[ct.length-1]?(ct.pop(),ct.length&&ct[ct.length-1].observe()):ct.splice(ct.indexOf(s),1)}}var qd="interactOutside.pointerDownOutside",Vd="interactOutside.focusOutside";function vm(e,t){let n,o=ga,a=()=>ke(t()),r=u=>e.onPointerDownOutside?.(u),i=u=>e.onFocusOutside?.(u),s=u=>e.onInteractOutside?.(u),c=u=>{let h=u.target;return!(h instanceof HTMLElement)||h.closest(`[${pr}]`)||!he(a(),h)||he(t(),h)?!1:!e.shouldExcludeElement?.(h)},l=u=>{function h(){let p=t(),y=u.target;if(!p||!y||!c(u))return;let m=qn([r,s]);y.addEventListener(qd,m,{once:!0});let w=new CustomEvent(qd,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:u.button===2||ma(u)&&u.button===0}});y.dispatchEvent(w)}u.pointerType==="touch"?(a().removeEventListener("click",h),o=h,a().addEventListener("click",h,{once:!0})):h()},d=u=>{let h=t(),p=u.target;if(!h||!p||!c(u))return;let y=qn([i,s]);p.addEventListener(Vd,y,{once:!0});let m=new CustomEvent(Vd,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:!1}});p.dispatchEvent(m)};V(()=>{le||ie(e.isDisabled)||(n=window.setTimeout(()=>{a().addEventListener("pointerdown",l,!0)},0),a().addEventListener("focusin",d,!0),_(()=>{window.clearTimeout(n),a().removeEventListener("click",o),a().removeEventListener("pointerdown",l,!0),a().removeEventListener("focusin",d,!0)}))})}function Hd(e){let[t,n]=H(),o={},a=e(),r="none",[i,s]=Mm(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(pt(i,c=>{let l=hr(o);r=c==="mounted"?l:"none"})),V(pt(e,c=>{if(a===c)return;let l=hr(o);c?s("MOUNT"):o?.display==="none"?s("UNMOUNT"):s(a&&r!==l?"ANIMATION_OUT":"UNMOUNT"),a=c})),V(pt(t,c=>{if(c){let l=u=>{let p=hr(o).includes(u.animationName);u.target===c&&p&&s("ANIMATION_END")},d=u=>{u.target===c&&(r=hr(o))};c.addEventListener("animationstart",d),c.addEventListener("animationcancel",l),c.addEventListener("animationend",l),_(()=>{c.removeEventListener("animationstart",d),c.removeEventListener("animationcancel",l),c.removeEventListener("animationend",l)})}else s("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(i()),setRef:c=>{c&&(o=getComputedStyle(c)),n(c)}}}function hr(e){return e?.animationName||"none"}function Mm(e,t){let n=(i,s)=>t[i][s]??i,[o,a]=H(e);return[o,i=>{a(s=>n(s,i))}]}function is(e){return t=>(e(t),()=>e(void 0))}function xm(e,t){let[n,o]=H(zd(t?.()));return V(()=>{o(e()?.tagName.toLowerCase()||zd(t?.()))}),n}function zd(e){return fa(e)?e:void 0}var gw=K();function Wo(e){let[t,n]=Y(e,["asChild","as","children"]);if(!t.asChild)return g(yt,R({get component(){return t.as}},n,{get children(){return t.children}}));let o=ca(()=>t.children);if(jd(o())){let a=Ud(n,o()?.props??{});return g(yt,a)}if(Ws(o())){let a=o().find(jd);if(a){let r=()=>g(He,{get each(){return o()},children:s=>g(ae,{when:s===a,fallback:s,get children(){return a.props.children}})}),i=Ud(n,a?.props??{});return g(yt,R(i,{children:r}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}var wm=Symbol("$$KobalteAsComponent");function jd(e){return e?.[wm]===!0}function Ud(e,t){return Ar([e,t],{reverseEventHandlers:!0})}var Cm=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Sm(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script??"";return Cm.has(n)}let t=e.split("-")[0];return bm.has(t)}function Lm(e){return Sm(e)?"rtl":"ltr"}function Nm(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Lm(e)}}var kw=Nm();var vw=K();var[Mw,xw]=Xt({toasts:[]});var ww=K();var $m=["button","color","file","image","reset","submit"];function Im(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?$m.indexOf(e.type)!==-1:!1}function Yd(e){let t,n=ve({type:"button"},e),[o,a]=Y(n,["ref","type","disabled"]),r=xm(()=>t,()=>"button"),i=U(()=>{let l=r();return l==null?!1:Im({tagName:l,type:o.type})}),s=U(()=>r()==="input"),c=U(()=>r()==="a"&&t?.getAttribute("href")!=null);return g(Wo,R({as:"button",ref(l){let d=ge(u=>t=u,o.ref);typeof d=="function"&&d(l)},get type(){return i()||s()?o.type:void 0},get role(){return!i()&&!c()?"button":void 0},get tabIndex(){return!i()&&!c()&&!o.disabled?0:void 0},get disabled(){return i()||s()?o.disabled:void 0},get"aria-disabled"(){return!i()&&!s()&&o.disabled?!0:void 0},get"data-disabled"(){return o.disabled?"":void 0}},a))}var Cw=K();var bw=K();var Sw=K();var Jd=K();function Cn(){let e=Ne(Jd);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Pm(e){let t=Cn(),[n,o]=Y(e,["aria-label","onClick"]);return g(Yd,R({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:r=>{Oe(r,n.onClick),t.close()}},o))}var Qd=K();function Am(){return Ne(Qd)}function Dm(e){let t,n=Am(),[o,a]=Y(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),r=new Set([]),i=u=>{r.add(u);let h=n?.registerNestedLayer(u);return()=>{r.delete(u),h?.()}};vm({shouldExcludeElement:u=>t?o.excludedElements?.some(h=>he(h(),u))||[...r].some(h=>he(h,u)):!1,onPointerDownOutside:u=>{!t||nt.isBelowPointerBlockingLayer(t)||!o.bypassTopMostLayerCheck&&!nt.isTopMostLayer(t)||(o.onPointerDownOutside?.(u),o.onInteractOutside?.(u),u.defaultPrevented||o.onDismiss?.())},onFocusOutside:u=>{o.onFocusOutside?.(u),o.onInteractOutside?.(u),u.defaultPrevented||o.onDismiss?.()}},()=>t),im({ownerDocument:()=>ke(t),onEscapeKeyDown:u=>{!t||!nt.isTopMostLayer(t)||(o.onEscapeKeyDown?.(u),!u.defaultPrevented&&o.onDismiss&&(u.preventDefault(),o.onDismiss()))}}),Pe(()=>{if(!t)return;nt.addLayer({node:t,isPointerBlocking:o.disableOutsidePointerEvents,dismiss:o.onDismiss});let u=n?.registerNestedLayer(t);nt.assignPointerEventToLayers(),nt.disableBodyPointerEvents(t),_(()=>{t&&(nt.removeLayer(t),u?.(),nt.assignPointerEventToLayers(),nt.restoreBodyPointerEvents(t))})}),V(pt([()=>t,()=>o.disableOutsidePointerEvents],([u,h])=>{if(!u)return;let p=nt.find(u);p&&p.isPointerBlocking!==h&&(p.isPointerBlocking=h,nt.assignPointerEventToLayers()),h&&nt.disableBodyPointerEvents(u),_(()=>{nt.restoreBodyPointerEvents(u)})},{defer:!0}));let d={registerNestedLayer:i};return g(Qd.Provider,{value:d,get children(){return g(Wo,R({as:"div",ref(u){let h=ge(p=>t=p,o.ref);typeof h=="function"&&h(u)}},a))}})}function Tm(e){let t,n=Cn(),o=ve({id:n.generateId("content")},e),[a,r]=Y(o,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]),i=!1,s=!1,c=h=>{a.onPointerDownOutside?.(h),n.modal()&&h.detail.isContextMenu&&h.preventDefault()},l=h=>{a.onFocusOutside?.(h),n.modal()&&h.preventDefault()},d=h=>{a.onInteractOutside?.(h),!n.modal()&&(h.defaultPrevented||(i=!0,h.detail.originalEvent.type==="pointerdown"&&(s=!0)),he(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&s&&h.preventDefault())},u=h=>{a.onCloseAutoFocus?.(h),n.modal()?(h.preventDefault(),Ce(n.triggerRef())):(h.defaultPrevented||(i||Ce(n.triggerRef()),h.preventDefault()),i=!1,s=!1)};return gm({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),ur({element:()=>t??null,enabled:()=>n.isOpen()&&n.preventScroll()}),fm({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:a.onOpenAutoFocus,onUnmountAutoFocus:u},()=>t),V(()=>_(n.registerContentId(r.id))),g(ae,{get when(){return n.contentPresence.isPresent()},get children(){return g(Dm,R({ref(h){let p=ge(y=>{n.contentPresence.setRef(y),t=y},a.ref);typeof p=="function"&&p(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return U(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,get onDismiss(){return n.close}},r))}})}function Fm(e){let t=Cn(),n=ve({id:t.generateId("description")},e),[o,a]=Y(n,["id"]);return V(()=>_(t.registerDescriptionId(o.id))),g(Wo,R({as:"p",get id(){return o.id}},a))}function Om(e){let t=Cn(),[n,o]=Y(e,["ref","style","onPointerDown"]),a=r=>{Oe(r,n.onPointerDown),r.target===r.currentTarget&&r.preventDefault()};return g(ae,{get when(){return t.overlayPresence.isPresent()},get children(){return g(Wo,R({as:"div",ref(r){let i=ge(t.overlayPresence.setRef,n.ref);typeof i=="function"&&i(r)},get style(){return{"pointer-events":"auto",...n.style}},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:a},o))}})}function Rm(e){let t=Cn();return g(ae,{get when(){return t.contentPresence.isPresent()||t.overlayPresence.isPresent()},get children(){return g(Fn,e)}})}var _d={dismiss:"Dismiss"};function Em(e){let t=`dialog-${Ve()}`,n=ve({id:t,modal:!0,translations:_d},e),[o,a]=H(),[r,i]=H(),[s,c]=H(),[l,d]=H(),u=rm({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:w=>n.onOpenChange?.(w)}),h=()=>n.forceMount||u.isOpen(),p=Hd(h),y=Hd(h),m={translations:()=>n.translations??_d,isOpen:u.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??m.modal(),contentId:o,titleId:r,descriptionId:s,triggerRef:l,overlayPresence:p,contentPresence:y,close:u.close,toggle:u.toggle,setTriggerRef:d,generateId:Bn(()=>n.id),registerContentId:is(a),registerTitleId:is(i),registerDescriptionId:is(c)};return g(Jd.Provider,{value:m,get children(){return n.children}})}function Bm(e){let t=Cn(),n=ve({id:t.generateId("title")},e),[o,a]=Y(n,["id"]);return V(()=>_(t.registerTitleId(o.id))),g(Wo,R({as:"h2",get id(){return o.id}},a))}function qm(e){let t=Cn(),[n,o]=Y(e,["ref","onClick"]);return g(Yd,R({ref(r){let i=ge(t.setTriggerRef,n.ref);typeof i=="function"&&i(r)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return U(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:r=>{Oe(r,n.onClick),t.toggle()}},o))}var Zo=Object.freeze({__proto__:null,CloseButton:Pm,Content:Tm,Description:Fm,Overlay:Om,Portal:Rm,Root:Em,Title:Bm,Trigger:qm});var Lw=K();var Nw=K();var $w=K();var Iw=K();var Pw=K();var Aw=K();var Vm=30,Dw=Vm/2;var Tw=K();var Fw=K();var Ow=K();var Rw=K();var Ew=K();var Bw=K();var qw=K();var Vw=K();var Hw=K();var Kd=["Enter"," "],zw={ltr:[...Kd,"ArrowRight"],rtl:[...Kd,"ArrowLeft"]};var jw=K();var Uw=K();var _w=K();var Kw=K();var Gw=K();var Ww=K();var Zw=K();var Xw=K();var Yw=K();var Jw=K();var Qw=K();var eC=K();var tC=K();var nC=K();var oC=K();var aC=K();var rC=K();var iC=K();var sC=K();ha(["focusin","focusout","pointermove"]);ha(["keydown","pointerdown","pointermove","pointerup"]);var cC=K();function ls(e){return eu(e,new Set),e}function eu(e,t){let n,o;if(e!=null&&typeof e=="object"&&!t.has(e)&&((n=Array.isArray(e))||e[Fe]||!(o=Object.getPrototypeOf(e))||o===Object.prototype)){t.add(e);for(let a of n?e:Object.values(e))eu(a,t)}}var Hm=ne('