@refrakt-md/editor 0.16.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,617 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js"])))=>i.map(i=>d[i]);
2
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();const Qp=!1;var gd=Array.isArray,jC=Array.prototype.indexOf,Ma=Array.prototype.includes,Od=Array.from,zC=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,ZC=Object.getOwnPropertyDescriptors,nw=Object.prototype,XC=Array.prototype,Dg=Object.getPrototypeOf,Uv=Object.isExtensible;const Ki=()=>{};function FC(n){for(var e=0;e<n.length;e++)n[e]()}function rw(){var n,e,t=new Promise((r,i)=>{n=r,e=i});return{promise:t,resolve:n,reject:e}}function Dc(n,e){if(Array.isArray(n))return n;if(!(Symbol.iterator in n))return Array.from(n);const t=[];for(const r of n)if(t.push(r),t.length===e)break;return t}const Yn=2,Of=4,vd=8,iw=1<<24,bs=16,xi=32,Fo=64,qg=128,Jr=512,Xn=1024,Un=2048,wi=4096,jr=8192,fs=16384,Rg=32768,$o=65536,Gv=1<<17,sw=1<<18,tl=1<<19,VC=1<<20,ls=1<<25,Qo=32768,Lp=1<<21,Ig=1<<22,Bs=1<<23,Ao=Symbol("$state"),WC=Symbol("legacy props"),YC=Symbol(""),fa=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function UC(n){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function GC(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function HC(n,e,t){throw new Error("https://svelte.dev/e/each_key_duplicate")}function KC(n){throw new Error("https://svelte.dev/e/effect_in_teardown")}function JC(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function eT(n){throw new Error("https://svelte.dev/e/effect_orphan")}function tT(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function nT(n){throw new Error("https://svelte.dev/e/props_invalid_value")}function rT(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function iT(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function sT(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function oT(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const aT=1,lT=2,ow=4,cT=8,uT=16,fT=1,dT=4,hT=8,pT=16,aw=1,mT=2,Fn=Symbol(),gT="http://www.w3.org/1999/xhtml";function OT(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function vT(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function lw(n){return n===this.v}function bT(n,e){return n!=n?e==e:n!==e||n!==null&&typeof n=="object"||typeof n=="function"}function cw(n){return!bT(n,this.v)}let yT=!1;const wT=[];function _T(n,e=!1,t=!1){return Yu(n,new Map,"",wT,null,t)}function Yu(n,e,t,r,i=null,s=!1){if(typeof n=="object"&&n!==null){var o=e.get(n);if(o!==void 0)return o;if(n instanceof Map)return new Map(n);if(n instanceof Set)return new Set(n);if(gd(n)){var a=Array(n.length);e.set(n,a),i!==null&&e.set(i,a);for(var l=0;l<n.length;l+=1){var c=n[l];l in n&&(a[l]=Yu(c,e,t,r,null,s))}return a}if(Dg(n)===nw){a={},e.set(n,a),i!==null&&e.set(i,a);for(var u in n)a[u]=Yu(n[u],e,t,r,null,s);return a}if(n instanceof Date)return structuredClone(n);if(typeof n.toJSON=="function"&&!s)return Yu(n.toJSON(),e,t,r,n)}if(n instanceof EventTarget)return n;try{return structuredClone(n)}catch{return n}}let zr=null;function Da(n){zr=n}function Ot(n,e=!1,t){zr={p:zr,i:!1,c:null,e:null,s:n,x:null,l:null}}function vt(n){var e=zr,t=e.e;if(t!==null){e.e=null;for(var r of t)Tw(r)}return e.i=!0,zr=e.p,{}}function uw(){return!0}let vo=[];function fw(){var n=vo;vo=[],FC(n)}function zi(n){if(vo.length===0&&!zl){var e=vo;queueMicrotask(()=>{e===vo&&fw()})}vo.push(n)}function kT(){for(;vo.length>0;)fw()}function dw(n){var e=Yt;if(e===null)return Dt.f|=Bs,n;if((e.f&Rg)===0){if((e.f&qg)===0)throw n;e.b.error(n)}else qa(n,e)}function qa(n,e){for(;e!==null;){if((e.f&qg)!==0)try{e.b.error(n);return}catch(t){n=t}e=e.parent}throw n}const xT=-7169;function Cn(n,e){n.f=n.f&xT|e}function Ng(n){(n.f&Jr)!==0||n.deps===null?Cn(n,Xn):Cn(n,wi)}function hw(n){if(n!==null)for(const e of n)(e.f&Yn)===0||(e.f&Qo)===0||(e.f^=Qo,hw(e.deps))}function pw(n,e,t){(n.f&Un)!==0?e.add(n):(n.f&wi)!==0&&t.add(n),hw(n.deps),Cn(n,Xn)}const eu=new Set;let jt=null,vf=null,di=null,Or=[],bd=null,Mp=!1,zl=!1;class js{committed=!1;current=new Map;previous=new Map;#e=new Set;#r=new Set;#t=0;#i=0;#a=null;#s=new Set;#n=new Set;#o=new Map;is_fork=!1;#l=!1;is_deferred(){return this.is_fork||this.#i>0}skip_effect(e){this.#o.has(e)||this.#o.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#o.get(e);if(t){this.#o.delete(e);for(var r of t.d)Cn(r,Un),mi(r);for(r of t.m)Cn(r,wi),mi(r)}}process(e){Or=[],this.apply();var t=[],r=[];for(const i of e)this.#c(i,t,r);if(this.is_deferred()){this.#u(r),this.#u(t);for(const[i,s]of this.#o)vw(i,s)}else{for(const i of this.#e)i();this.#e.clear(),this.#t===0&&this.#f(),vf=this,jt=null,Hv(r),Hv(t),vf=null,this.#a?.resolve()}di=null}#c(e,t,r){e.f^=Xn;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(xi|Fo))!==0,l=a&&(o&Xn)!==0,c=l||(o&jr)!==0||this.#o.has(i);if(!c&&i.fn!==null){a?i.f^=Xn:s!==null&&(o&(Of|vd|iw))!==0?s.b.defer_effect(i):(o&Of)!==0?t.push(i):Ic(i)&&((o&bs)!==0&&this.#n.add(i),nc(i));var u=i.first;if(u!==null){i=u;continue}}var f=i.parent;for(i=i.next;i===null&&f!==null;)f===s&&(s=null),i=f.next,f=f.parent}}#u(e){for(var t=0;t<e.length;t+=1)pw(e[t],this.#s,this.#n)}capture(e,t){t!==Fn&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&Bs)===0&&(this.current.set(e,e.v),di?.set(e,e.v))}activate(){jt=this,this.apply()}deactivate(){jt===this&&(jt=null,di=null)}flush(){if(this.activate(),Or.length>0){if(mw(),jt!==null&&jt!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#r)e(this);this.#r.clear()}#f(){if(eu.size>1){this.previous.clear();var e=di,t=!0;for(const i of eu){if(i===this){t=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(t&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var r=Or;Or=[];const a=new Set,l=new Map;for(const c of s)gw(c,o,a,l);if(Or.length>0){jt=i,i.apply();for(const c of Or)i.#c(c,[],[]);i.deactivate()}Or=r}}jt=null,di=e}this.committed=!0,eu.delete(this)}increment(e){this.#t+=1,e&&(this.#i+=1)}decrement(e){this.#t-=1,e&&(this.#i-=1),!this.#l&&(this.#l=!0,zi(()=>{this.#l=!1,this.is_deferred()?Or.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#n.delete(e),Cn(e,Un),mi(e);for(const e of this.#n)Cn(e,wi),mi(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#r.add(e)}settled(){return(this.#a??=rw()).promise}static ensure(){if(jt===null){const e=jt=new js;eu.add(jt),zl||zi(()=>{jt===e&&e.flush()})}return jt}apply(){}}function ST(n){var e=zl;zl=!0;try{for(var t;;){if(kT(),Or.length===0&&(jt?.flush(),Or.length===0))return bd=null,t;mw()}}finally{zl=e}}function mw(){Mp=!0;var n=null;try{for(var e=0;Or.length>0;){var t=js.ensure();if(e++>1e3){var r,i;AT()}t.process(Or),zs.clear()}}finally{Or=[],Mp=!1,bd=null}}function AT(){try{tT()}catch(n){qa(n,bd)}}let rs=null;function Hv(n){var e=n.length;if(e!==0){for(var t=0;t<e;){var r=n[t++];if((r.f&(fs|jr))===0&&Ic(r)&&(rs=new Set,nc(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Qw(r):r.fn=null),rs?.size>0)){zs.clear();for(const i of rs){if((i.f&(fs|jr))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)rs.has(o)&&(rs.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(fs|jr))===0&&nc(l)}}rs.clear()}}rs=null}}function gw(n,e,t,r){if(!t.has(n)&&(t.add(n),n.reactions!==null))for(const i of n.reactions){const s=i.f;(s&Yn)!==0?gw(i,e,t,r):(s&(Ig|bs))!==0&&(s&Un)===0&&Ow(i,e,r)&&(Cn(i,Un),mi(i))}}function Ow(n,e,t){const r=t.get(n);if(r!==void 0)return r;if(n.deps!==null)for(const i of n.deps){if(Ma.call(e,i))return!0;if((i.f&Yn)!==0&&Ow(i,e,t))return t.set(i,!0),!0}return t.set(n,!1),!1}function mi(n){for(var e=bd=n;e.parent!==null;){e=e.parent;var t=e.f;if(Mp&&e===Yt&&(t&bs)!==0&&(t&sw)===0)return;if((t&(Fo|xi))!==0){if((t&Xn)===0)return;e.f^=Xn}}Or.push(e)}function vw(n,e){if(!((n.f&xi)!==0&&(n.f&Xn)!==0)){(n.f&Un)!==0?e.d.push(n):(n.f&wi)!==0&&e.m.push(n),Cn(n,Xn);for(var t=n.first;t!==null;)vw(t,e),t=t.next}}function CT(n){let e=0,t=Lo(0),r;return()=>{zg()&&(g(t),kd(()=>(e===0&&(r=Sr(()=>n(()=>Zl(t)))),e+=1,()=>{zi(()=>{e-=1,e===0&&(r?.(),r=void 0,Zl(t))})})))}}var TT=$o|tl|qg;function PT(n,e,t){new ET(n,e,t)}class ET{parent;is_pending=!1;#e;#r=null;#t;#i;#a;#s=null;#n=null;#o=null;#l=null;#c=null;#u=0;#f=0;#p=!1;#h=!1;#m=new Set;#g=new Set;#d=null;#w=CT(()=>(this.#d=Lo(this.#u),()=>{this.#d=null}));constructor(e,t,r){this.#e=e,this.#t=t,this.#i=r,this.parent=Yt.b,this.is_pending=!!this.#t.pending,this.#a=Rc(()=>{Yt.b=this;{var i=this.#b();try{this.#s=Yr(()=>r(i))}catch(s){this.error(s)}this.#f>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},TT)}#_(){try{this.#s=Yr(()=>this.#i(this.#e))}catch(e){this.error(e)}}#k(){const e=this.#t.pending;e&&(this.#n=Yr(()=>e(this.#e)),zi(()=>{var t=this.#b();this.#s=this.#O(()=>(js.ensure(),Yr(()=>this.#i(t)))),this.#f>0?this.#v():(Co(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var e=this.#e;return this.is_pending&&(this.#c=ds(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){pw(e,this.#m,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#O(e){var t=Yt,r=Dt,i=zr;Wi(this.#a),ri(this.#a),Da(this.#a.ctx);try{return e()}catch(s){return dw(s),null}finally{Wi(t),ri(r),Da(i)}}#v(){const e=this.#t.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),Dw(this.#s,this.#l)),this.#n===null&&(this.#n=Yr(()=>e(this.#e)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}if(this.#f+=e,this.#f===0){this.is_pending=!1;for(const t of this.#m)Cn(t,Un),mi(t);for(const t of this.#g)Cn(t,wi),mi(t);this.#m.clear(),this.#g.clear(),this.#n&&Co(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#y(e),this.#u+=e,!(!this.#d||this.#p)&&(this.#p=!0,zi(()=>{this.#p=!1,this.#d&&Ra(this.#d,this.#u)}))}get_effect_pending(){return this.#w(),g(this.#d)}error(e){var t=this.#t.onerror;let r=this.#t.failed;if(this.#h||!t&&!r)throw e;this.#s&&(xr(this.#s),this.#s=null),this.#n&&(xr(this.#n),this.#n=null),this.#o&&(xr(this.#o),this.#o=null);var i=!1,s=!1;const o=()=>{if(i){vT();return}i=!0,s&&oT(),js.ensure(),this.#u=0,this.#o!==null&&Co(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#O(()=>(this.#h=!1,Yr(()=>this.#i(this.#e)))),this.#f>0?this.#v():this.is_pending=!1};zi(()=>{try{s=!0,t?.(e,o),s=!1}catch(a){qa(a,this.#a&&this.#a.parent)}r&&(this.#o=this.#O(()=>{js.ensure(),this.#h=!0;try{return Yr(()=>{r(this.#e,()=>e,()=>o)})}catch(a){return qa(a,this.#a.parent),null}finally{this.#h=!1}}))})}}function $T(n,e,t,r){const i=yd;var s=n.filter(d=>!d.settled);if(t.length===0&&s.length===0){r(e.map(i));return}var o=jt,a=Yt,l=QT(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function u(d){l();try{r(d)}catch(h){(a.f&fs)===0&&qa(h,a)}o?.deactivate(),Dp()}if(t.length===0){c.then(()=>u(e.map(i)));return}function f(){l(),Promise.all(t.map(d=>LT(d))).then(d=>u([...e.map(i),...d])).catch(d=>qa(d,a))}c?c.then(f):f()}function QT(){var n=Yt,e=Dt,t=zr,r=jt;return function(s=!0){Wi(n),ri(e),Da(t),s&&r?.activate()}}function Dp(){Wi(null),ri(null),Da(null)}function yd(n){var e=Yn|Un,t=Dt!==null&&(Dt.f&Yn)!==0?Dt:null;return Yt!==null&&(Yt.f|=tl),{ctx:zr,deps:null,effects:null,equals:lw,f:e,fn:n,reactions:null,rv:0,v:Fn,wv:0,parent:t??Yt,ac:null}}function LT(n,e,t){let r=Yt;r===null&&GC();var i=r.b,s=void 0,o=Lo(Fn),a=!Dt,l=new Map;return XT(()=>{var c=rw();s=c.promise;try{Promise.resolve(n()).then(c.resolve,c.reject).then(()=>{u===jt&&u.committed&&u.deactivate(),Dp()})}catch(h){c.reject(h),Dp()}var u=jt;if(a){var f=i.is_rendered();i.update_pending_count(1),u.increment(f),l.get(u)?.reject(fa),l.delete(u),l.set(u,c)}const d=(h,m=void 0)=>{if(u.activate(),m)m!==fa&&(o.f|=Bs,Ra(o,m));else{(o.f&Bs)!==0&&(o.f^=Bs),Ra(o,h);for(const[p,O]of l){if(l.delete(p),p===u)break;O.reject(fa)}}a&&(i.update_pending_count(-1),u.decrement(f))};c.promise.then(d,h=>d(null,h||"unknown"))}),Zg(()=>{for(const c of l.values())c.reject(fa)}),new Promise(c=>{function u(f){function d(){f===s?c(o):u(s)}f.then(d,d)}u(s)})}function me(n){const e=yd(n);return qw(e),e}function bw(n){const e=yd(n);return e.equals=cw,e}function yw(n){var e=n.effects;if(e!==null){n.effects=null;for(var t=0;t<e.length;t+=1)xr(e[t])}}function MT(n){for(var e=n.parent;e!==null;){if((e.f&Yn)===0)return(e.f&fs)===0?e:null;e=e.parent}return null}function Bg(n){var e,t=Yt;Wi(MT(n));try{n.f&=~Qo,yw(n),e=Bw(n)}finally{Wi(t)}return e}function ww(n){var e=Bg(n);if(!n.equals(e)&&(n.wv=Iw(),(!jt?.is_fork||n.deps===null)&&(n.v=e,n.deps===null))){Cn(n,Xn);return}Vs||(di!==null?(zg()||jt?.is_fork)&&di.set(n,e):Ng(n))}let qp=new Set;const zs=new Map;let _w=!1;function Lo(n,e){var t={f:0,v:n,reactions:null,equals:lw,rv:0,wv:0};return t}function K(n,e){const t=Lo(n);return qw(t),t}function DT(n,e=!1,t=!0){const r=Lo(n);return e||(r.equals=cw),r}function M(n,e,t=!1){Dt!==null&&(!gi||(Dt.f&Gv)!==0)&&uw()&&(Dt.f&(Yn|bs|Ig|Gv))!==0&&(ei===null||!Ma.call(ei,n))&&sT();let r=t?tn(e):e;return Ra(n,r)}function Ra(n,e){if(!n.equals(e)){var t=n.v;Vs?zs.set(n,e):zs.set(n,t),n.v=e;var r=js.ensure();if(r.capture(n,t),(n.f&Yn)!==0){const i=n;(n.f&Un)!==0&&Bg(i),Ng(i)}n.wv=Iw(),kw(n,Un),Yt!==null&&(Yt.f&Xn)!==0&&(Yt.f&(xi|Fo))===0&&(Vr===null?VT([n]):Vr.push(n)),!r.is_fork&&qp.size>0&&!_w&&qT()}return e}function qT(){_w=!1;for(const n of qp)(n.f&Xn)!==0&&Cn(n,wi),Ic(n)&&nc(n);qp.clear()}function sh(n,e=1){var t=g(n),r=e===1?t++:t--;return M(n,t),r}function Zl(n){M(n,n.v+1)}function kw(n,e){var t=n.reactions;if(t!==null)for(var r=t.length,i=0;i<r;i++){var s=t[i],o=s.f,a=(o&Un)===0;if(a&&Cn(s,e),(o&Yn)!==0){var l=s;di?.delete(l),(o&Qo)===0&&(o&Jr&&(s.f|=Qo),kw(l,wi))}else a&&((o&bs)!==0&&rs!==null&&rs.add(s),mi(s))}}function tn(n){if(typeof n!="object"||n===null||Ao in n)return n;const e=Dg(n);if(e!==nw&&e!==XC)return n;var t=new Map,r=gd(n),i=K(0),s=To,o=a=>{if(To===s)return a();var l=Dt,c=To;ri(null),tb(s);var u=a();return ri(l),tb(c),u};return r&&t.set("length",K(n.length)),new Proxy(n,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&rT();var u=t.get(l);return u===void 0?o(()=>{var f=K(c.value);return t.set(l,f),f}):M(u,c.value,!0),!0},deleteProperty(a,l){var c=t.get(l);if(c===void 0){if(l in a){const u=o(()=>K(Fn));t.set(l,u),Zl(i)}}else M(c,Fn),Zl(i);return!0},get(a,l,c){if(l===Ao)return n;var u=t.get(l),f=l in a;if(u===void 0&&(!f||ka(a,l)?.writable)&&(u=o(()=>{var h=tn(f?a[l]:Fn),m=K(h);return m}),t.set(l,u)),u!==void 0){var d=g(u);return d===Fn?void 0:d}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=g(u))}else if(c===void 0){var f=t.get(l),d=f?.v;if(f!==void 0&&d!==Fn)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(a,l){if(l===Ao)return!0;var c=t.get(l),u=c!==void 0&&c.v!==Fn||Reflect.has(a,l);if(c!==void 0||Yt!==null&&(!u||ka(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=u?tn(a[l]):Fn,h=K(d);return h}),t.set(l,c));var f=g(c);if(f===Fn)return!1}return u},set(a,l,c,u){var f=t.get(l),d=l in a;if(r&&l==="length")for(var h=c;h<f.v;h+=1){var m=t.get(h+"");m!==void 0?M(m,Fn):h in a&&(m=o(()=>K(Fn)),t.set(h+"",m))}if(f===void 0)(!d||ka(a,l)?.writable)&&(f=o(()=>K(void 0)),M(f,tn(c)),t.set(l,f));else{d=f.v!==Fn;var p=o(()=>tn(c));M(f,p)}var O=Reflect.getOwnPropertyDescriptor(a,l);if(O?.set&&O.set.call(u,c),!d){if(r&&typeof l=="string"){var v=t.get("length"),b=Number(l);Number.isInteger(b)&&b>=v.v&&M(v,b+1)}Zl(i)}return!0},ownKeys(a){g(i);var l=Reflect.ownKeys(a).filter(f=>{var d=t.get(f);return d===void 0||d.v!==Fn});for(var[c,u]of t)u.v!==Fn&&!(c in a)&&l.push(c);return l},setPrototypeOf(){iT()}})}function Kv(n){try{if(n!==null&&typeof n=="object"&&Ao in n)return n[Ao]}catch{}return n}function RT(n,e){return Object.is(Kv(n),Kv(e))}var Mo,xw,Sw,Aw;function IT(){if(Mo===void 0){Mo=window,xw=/Firefox/.test(navigator.userAgent);var n=Element.prototype,e=Node.prototype,t=Text.prototype;Sw=ka(e,"firstChild").get,Aw=ka(e,"nextSibling").get,Uv(n)&&(n.__click=void 0,n.__className=void 0,n.__attributes=null,n.__style=void 0,n.__e=void 0),Uv(t)&&(t.__t=void 0)}}function ds(n=""){return document.createTextNode(n)}function qr(n){return Sw.call(n)}function qc(n){return Aw.call(n)}function q(n,e){return qr(n)}function ot(n,e=!1){{var t=qr(n);return t instanceof Comment&&t.data===""?qc(t):t}}function R(n,e=1,t=!1){let r=n;for(;e--;)r=qc(r);return r}function NT(n){n.textContent=""}function Cw(){return!1}function gs(n,e){{const t=document.body;n.autofocus=!0,zi(()=>{document.activeElement===t&&n.focus()})}}let Jv=!1;function BT(){Jv||(Jv=!0,document.addEventListener("reset",n=>{Promise.resolve().then(()=>{if(!n.defaultPrevented)for(const e of n.target.elements)e.__on_r?.()})},{capture:!0}))}function wd(n){var e=Dt,t=Yt;ri(null),Wi(null);try{return n()}finally{ri(e),Wi(t)}}function jg(n,e,t,r=t){n.addEventListener(e,()=>wd(t));const i=n.__on_r;i?n.__on_r=()=>{i(),r(!0)}:n.__on_r=()=>r(!0),BT()}function jT(n){Yt===null&&(Dt===null&&eT(),JC()),Vs&&KC()}function zT(n,e){var t=e.last;t===null?e.last=e.first=n:(t.next=n,n.prev=t,e.last=n)}function ys(n,e,t){var r=Yt;r!==null&&(r.f&jr)!==0&&(n|=jr);var i={ctx:zr,deps:null,nodes:null,f:n|Un|Jr,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(t)try{nc(i),i.f|=Rg}catch(a){throw xr(i),a}else e!==null&&mi(i);var s=i;if(t&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&tl)===0&&(s=s.first,(n&bs)!==0&&(n&$o)!==0&&s!==null&&(s.f|=$o)),s!==null&&(s.parent=r,r!==null&&zT(s,r),Dt!==null&&(Dt.f&Yn)!==0&&(n&Fo)===0)){var o=Dt;(o.effects??=[]).push(s)}return i}function zg(){return Dt!==null&&!gi}function Zg(n){const e=ys(vd,null,!1);return Cn(e,Xn),e.teardown=n,e}function mn(n){jT();var e=Yt.f,t=!Dt&&(e&xi)!==0&&(e&Rg)===0;if(t){var r=zr;(r.e??=[]).push(n)}else return Tw(n)}function Tw(n){return ys(Of|VC,n,!1)}function ZT(n){js.ensure();const e=ys(Fo|tl,n,!0);return(t={})=>new Promise(r=>{t.outro?Co(e,()=>{xr(e),r(void 0)}):(xr(e),r(void 0))})}function _d(n){return ys(Of,n,!1)}function XT(n){return ys(Ig|tl,n,!0)}function kd(n,e=0){return ys(vd|e,n,!0)}function fe(n,e=[],t=[],r=[]){$T(r,e,t,i=>{ys(vd,()=>n(...i.map(g)),!0)})}function Rc(n,e=0){var t=ys(bs|e,n,!0);return t}function Yr(n){return ys(xi|tl,n,!0)}function Pw(n){var e=n.teardown;if(e!==null){const t=Vs,r=Dt;eb(!0),ri(null);try{e.call(null)}finally{eb(t),ri(r)}}}function Ew(n,e=!1){var t=n.first;for(n.first=n.last=null;t!==null;){const i=t.ac;i!==null&&wd(()=>{i.abort(fa)});var r=t.next;(t.f&Fo)!==0?t.parent=null:xr(t,e),t=r}}function FT(n){for(var e=n.first;e!==null;){var t=e.next;(e.f&xi)===0&&xr(e),e=t}}function xr(n,e=!0){var t=!1;(e||(n.f&sw)!==0)&&n.nodes!==null&&n.nodes.end!==null&&($w(n.nodes.start,n.nodes.end),t=!0),Ew(n,e&&!t),bf(n,0),Cn(n,fs);var r=n.nodes&&n.nodes.t;if(r!==null)for(const s of r)s.stop();Pw(n);var i=n.parent;i!==null&&i.first!==null&&Qw(n),n.next=n.prev=n.teardown=n.ctx=n.deps=n.fn=n.nodes=n.ac=null}function $w(n,e){for(;n!==null;){var t=n===e?null:qc(n);n.remove(),n=t}}function Qw(n){var e=n.parent,t=n.prev,r=n.next;t!==null&&(t.next=r),r!==null&&(r.prev=t),e!==null&&(e.first===n&&(e.first=r),e.last===n&&(e.last=t))}function Co(n,e,t=!0){var r=[];Lw(n,r,!0);var i=()=>{t&&xr(n),e&&e()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function Lw(n,e,t){if((n.f&jr)===0){n.f^=jr;var r=n.nodes&&n.nodes.t;if(r!==null)for(const a of r)(a.is_global||t)&&e.push(a);for(var i=n.first;i!==null;){var s=i.next,o=(i.f&$o)!==0||(i.f&xi)!==0&&(n.f&bs)!==0;Lw(i,e,o?t:!1),i=s}}}function Xg(n){Mw(n,!0)}function Mw(n,e){if((n.f&jr)!==0){n.f^=jr,(n.f&Xn)===0&&(Cn(n,Un),mi(n));for(var t=n.first;t!==null;){var r=t.next,i=(t.f&$o)!==0||(t.f&xi)!==0;Mw(t,i?e:!1),t=r}var s=n.nodes&&n.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function Dw(n,e){if(n.nodes)for(var t=n.nodes.start,r=n.nodes.end;t!==null;){var i=t===r?null:qc(t);e.append(t),t=i}}let Uu=!1,Vs=!1;function eb(n){Vs=n}let Dt=null,gi=!1;function ri(n){Dt=n}let Yt=null;function Wi(n){Yt=n}let ei=null;function qw(n){Dt!==null&&(ei===null?ei=[n]:ei.push(n))}let vr=null,Lr=0,Vr=null;function VT(n){Vr=n}let Rw=1,bo=0,To=bo;function tb(n){To=n}function Iw(){return++Rw}function Ic(n){var e=n.f;if((e&Un)!==0)return!0;if(e&Yn&&(n.f&=~Qo),(e&wi)!==0){for(var t=n.deps,r=t.length,i=0;i<r;i++){var s=t[i];if(Ic(s)&&ww(s),s.wv>n.wv)return!0}(e&Jr)!==0&&di===null&&Cn(n,Xn)}return!1}function Nw(n,e,t=!0){var r=n.reactions;if(r!==null&&!(ei!==null&&Ma.call(ei,n)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&Yn)!==0?Nw(s,e,!1):e===s&&(t?Cn(s,Un):(s.f&Xn)!==0&&Cn(s,wi),mi(s))}}function Bw(n){var e=vr,t=Lr,r=Vr,i=Dt,s=ei,o=zr,a=gi,l=To,c=n.f;vr=null,Lr=0,Vr=null,Dt=(c&(xi|Fo))===0?n:null,ei=null,Da(n.ctx),gi=!1,To=++bo,n.ac!==null&&(wd(()=>{n.ac.abort(fa)}),n.ac=null);try{n.f|=Lp;var u=n.fn,f=u(),d=n.deps,h=jt?.is_fork;if(vr!==null){var m;if(h||bf(n,Lr),d!==null&&Lr>0)for(d.length=Lr+vr.length,m=0;m<vr.length;m++)d[Lr+m]=vr[m];else n.deps=d=vr;if(zg()&&(n.f&Jr)!==0)for(m=Lr;m<d.length;m++)(d[m].reactions??=[]).push(n)}else!h&&d!==null&&Lr<d.length&&(bf(n,Lr),d.length=Lr);if(uw()&&Vr!==null&&!gi&&d!==null&&(n.f&(Yn|wi|Un))===0)for(m=0;m<Vr.length;m++)Nw(Vr[m],n);if(i!==null&&i!==n){if(bo++,i.deps!==null)for(let p=0;p<t;p+=1)i.deps[p].rv=bo;if(e!==null)for(const p of e)p.rv=bo;Vr!==null&&(r===null?r=Vr:r.push(...Vr))}return(n.f&Bs)!==0&&(n.f^=Bs),f}catch(p){return dw(p)}finally{n.f^=Lp,vr=e,Lr=t,Vr=r,Dt=i,ei=s,Da(o),gi=a,To=l}}function WT(n,e){let t=e.reactions;if(t!==null){var r=jC.call(t,n);if(r!==-1){var i=t.length-1;i===0?t=e.reactions=null:(t[r]=t[i],t.pop())}}if(t===null&&(e.f&Yn)!==0&&(vr===null||!Ma.call(vr,e))){var s=e;(s.f&Jr)!==0&&(s.f^=Jr,s.f&=~Qo),Ng(s),yw(s),bf(s,0)}}function bf(n,e){var t=n.deps;if(t!==null)for(var r=e;r<t.length;r++)WT(n,t[r])}function nc(n){var e=n.f;if((e&fs)===0){Cn(n,Xn);var t=Yt,r=Uu;Yt=n,Uu=!0;try{(e&(bs|iw))!==0?FT(n):Ew(n),Pw(n);var i=Bw(n);n.teardown=typeof i=="function"?i:null,n.wv=Rw;var s;Qp&&yT&&(n.f&Un)!==0&&n.deps}finally{Uu=r,Yt=t}}}async function YT(){await Promise.resolve(),ST()}function g(n){var e=n.f,t=(e&Yn)!==0;if(Dt!==null&&!gi){var r=Yt!==null&&(Yt.f&fs)!==0;if(!r&&(ei===null||!Ma.call(ei,n))){var i=Dt.deps;if((Dt.f&Lp)!==0)n.rv<bo&&(n.rv=bo,vr===null&&i!==null&&i[Lr]===n?Lr++:vr===null?vr=[n]:vr.push(n));else{(Dt.deps??=[]).push(n);var s=n.reactions;s===null?n.reactions=[Dt]:Ma.call(s,Dt)||s.push(Dt)}}}if(Vs&&zs.has(n))return zs.get(n);if(t){var o=n;if(Vs){var a=o.v;return((o.f&Xn)===0&&o.reactions!==null||zw(o))&&(a=Bg(o)),zs.set(o,a),a}var l=(o.f&Jr)===0&&!gi&&Dt!==null&&(Uu||(Dt.f&Jr)!==0),c=o.deps===null;Ic(o)&&(l&&(o.f|=Jr),ww(o)),l&&!c&&jw(o)}if(di?.has(n))return di.get(n);if((n.f&Bs)!==0)throw n.v;return n.v}function jw(n){if(n.deps!==null){n.f|=Jr;for(const e of n.deps)(e.reactions??=[]).push(n),(e.f&Yn)!==0&&(e.f&Jr)===0&&jw(e)}}function zw(n){if(n.v===Fn)return!0;if(n.deps===null)return!1;for(const e of n.deps)if(zs.has(e)||(e.f&Yn)!==0&&zw(e))return!0;return!1}function Sr(n){var e=gi;try{return gi=!0,n()}finally{gi=e}}const UT=["touchstart","touchmove"];function GT(n){return UT.includes(n)}const Zw=new Set,Rp=new Set;function HT(n,e,t,r={}){function i(s){if(r.capture||Ll.call(e,s),!s.cancelBubble)return wd(()=>t?.call(this,s))}return n.startsWith("pointer")||n.startsWith("touch")||n==="wheel"?zi(()=>{e.addEventListener(n,i,r)}):e.addEventListener(n,i,r),i}function ut(n,e,t,r,i){var s={capture:r,passive:i},o=HT(n,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Zg(()=>{e.removeEventListener(n,o,s)})}function Gt(n){for(var e=0;e<n.length;e++)Zw.add(n[e]);for(var t of Rp)t(n)}let nb=null;function Ll(n){var e=this,t=e.ownerDocument,r=n.type,i=n.composedPath?.()||[],s=i[0]||n.target;nb=n;var o=0,a=nb===n&&n.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){n.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||n.target,s!==e){zC(n,"currentTarget",{configurable:!0,get(){return s||t}});var u=Dt,f=Yt;ri(null),Wi(null);try{for(var d,h=[];s!==null;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var p=s["__"+r];p!=null&&(!s.disabled||n.target===s)&&p.call(s,n)}catch(O){d?h.push(O):d=O}if(n.cancelBubble||m===e||m===null)break;s=m}if(d){for(let O of h)queueMicrotask(()=>{throw O});throw d}}finally{n.__root=e,delete n.currentTarget,ri(u),Wi(f)}}}function Fg(n){var e=document.createElement("template");return e.innerHTML=n.replaceAll("<!>","<!---->"),e.content}function Do(n,e){var t=Yt;t.nodes===null&&(t.nodes={start:n,end:e,a:null,t:null})}function V(n,e){var t=(e&aw)!==0,r=(e&mT)!==0,i,s=!n.startsWith("<!>");return()=>{i===void 0&&(i=Fg(s?n:"<!>"+n),t||(i=qr(i)));var o=r||xw?document.importNode(i,!0):i.cloneNode(!0);if(t){var a=qr(o),l=o.lastChild;Do(a,l)}else Do(o,o);return o}}function KT(n,e,t="svg"){var r=!n.startsWith("<!>"),i=(e&aw)!==0,s=`<${t}>${r?n:"<!>"+n}</${t}>`,o;return()=>{if(!o){var a=Fg(s),l=qr(a);if(i)for(o=document.createDocumentFragment();qr(l);)o.appendChild(qr(l));else o=qr(l)}var c=o.cloneNode(!0);if(i){var u=qr(c),f=c.lastChild;Do(u,f)}else Do(c,c);return c}}function ws(n,e){return KT(n,e,"svg")}function rb(n=""){{var e=ds(n+"");return Do(e,e),e}}function un(){var n=document.createDocumentFragment(),e=document.createComment(""),t=ds();return n.append(e,t),Do(e,t),n}function z(n,e){n!==null&&n.before(e)}function Te(n,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(n.__t??=n.nodeValue)&&(n.__t=t,n.nodeValue=t+"")}function JT(n,e){return eP(n,e)}const Ko=new Map;function eP(n,{target:e,anchor:t,props:r={},events:i,context:s,intro:o=!0}){IT();var a=new Set,l=f=>{for(var d=0;d<f.length;d++){var h=f[d];if(!a.has(h)){a.add(h);var m=GT(h);e.addEventListener(h,Ll,{passive:m});var p=Ko.get(h);p===void 0?(document.addEventListener(h,Ll,{passive:m}),Ko.set(h,1)):Ko.set(h,p+1)}}};l(Od(Zw)),Rp.add(l);var c=void 0,u=ZT(()=>{var f=t??e.appendChild(ds());return PT(f,{pending:()=>{}},d=>{Ot({});var h=zr;s&&(h.c=s),i&&(r.$$events=i),c=n(d,r)||{},vt()}),()=>{for(var d of a){e.removeEventListener(d,Ll);var h=Ko.get(d);--h===0?(document.removeEventListener(d,Ll),Ko.delete(d)):Ko.set(d,h)}Rp.delete(l),f!==t&&f.parentNode?.removeChild(f)}});return tP.set(c,u),c}let tP=new WeakMap;class Vg{anchor;#e=new Map;#r=new Map;#t=new Map;#i=new Set;#a=!0;constructor(e,t=!0){this.anchor=e,this.#a=t}#s=()=>{var e=jt;if(this.#e.has(e)){var t=this.#e.get(e),r=this.#r.get(t);if(r)Xg(r),this.#i.delete(t);else{var i=this.#t.get(t);i&&(this.#r.set(t,i.effect),this.#t.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#t.get(o);a&&(xr(a.effect),this.#t.delete(o))}for(const[s,o]of this.#r){if(s===t||this.#i.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();Dw(o,c),c.append(ds()),this.#t.set(s,{effect:o,fragment:c})}else xr(o);this.#i.delete(s),this.#r.delete(s)};this.#a||!r?(this.#i.add(s),Co(o,a,!1)):a()}}};#n=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,i]of this.#t)t.includes(r)||(xr(i.effect),this.#t.delete(r))};ensure(e,t){var r=jt,i=Cw();if(t&&!this.#r.has(e)&&!this.#t.has(e))if(i){var s=document.createDocumentFragment(),o=ds();s.append(o),this.#t.set(e,{effect:Yr(()=>t(o)),fragment:s})}else this.#r.set(e,Yr(()=>t(this.anchor)));if(this.#e.set(r,e),i){for(const[a,l]of this.#r)a===e?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of this.#t)a===e?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#s),r.ondiscard(this.#n)}else this.#s()}}function ue(n,e,t=!1){var r=new Vg(n),i=t?$o:0;function s(o,a){r.ensure(o,a)}Rc(()=>{var o=!1;e((a,l=0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}const nP=Symbol("NaN");function ib(n,e,t){var r=new Vg(n);Rc(()=>{var i=e();i!==i&&(i=nP),r.ensure(i,t)})}function Kt(n,e){return e}function rP(n,e,t){for(var r=[],i=e.length,s,o=e.length,a=0;a<i;a++){let f=e[a];Co(f,()=>{if(s){if(s.pending.delete(f),s.done.add(f),s.pending.size===0){var d=n.outrogroups;Ip(Od(s.done)),d.delete(s),d.size===0&&(n.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&t!==null;if(l){var c=t,u=c.parentNode;NT(u),u.append(c),n.items.clear()}Ip(e,!l)}else s={pending:new Set(e),done:new Set},(n.outrogroups??=new Set).add(s)}function Ip(n,e=!0){for(var t=0;t<n.length;t++)xr(n[t],e)}var sb;function $t(n,e,t,r,i,s=null){var o=n,a=new Map,l=(e&ow)!==0;if(l){var c=n;o=c.appendChild(ds())}var u=null,f=bw(()=>{var v=t();return gd(v)?v:v==null?[]:Od(v)}),d,h=!0;function m(){O.fallback=u,iP(O,d,o,e,r),u!==null&&(d.length===0?(u.f&ls)===0?Xg(u):(u.f^=ls,Ml(u,null,o)):Co(u,()=>{u=null}))}var p=Rc(()=>{d=g(f);for(var v=d.length,b=new Set,_=jt,C=Cw(),y=0;y<v;y+=1){var w=d[y],S=r(w,y),A=h?null:a.get(S);A?(A.v&&Ra(A.v,w),A.i&&Ra(A.i,y),C&&_.unskip_effect(A.e)):(A=sP(a,h?o:sb??=ds(),w,S,y,i,e,t),h||(A.e.f|=ls),a.set(S,A)),b.add(S)}if(v===0&&s&&!u&&(h?u=Yr(()=>s(o)):(u=Yr(()=>s(sb??=ds())),u.f|=ls)),v>b.size&&HC(),!h)if(C){for(const[x,k]of a)b.has(x)||_.skip_effect(k.e);_.oncommit(m),_.ondiscard(()=>{})}else m();g(f)}),O={effect:p,items:a,outrogroups:null,fallback:u};h=!1}function ml(n){for(;n!==null&&(n.f&xi)===0;)n=n.next;return n}function iP(n,e,t,r,i){var s=(r&cT)!==0,o=e.length,a=n.items,l=ml(n.effect.first),c,u=null,f,d=[],h=[],m,p,O,v;if(s)for(v=0;v<o;v+=1)m=e[v],p=i(m,v),O=a.get(p).e,(O.f&ls)===0&&(O.nodes?.a?.measure(),(f??=new Set).add(O));for(v=0;v<o;v+=1){if(m=e[v],p=i(m,v),O=a.get(p).e,n.outrogroups!==null)for(const k of n.outrogroups)k.pending.delete(O),k.done.delete(O);if((O.f&ls)!==0)if(O.f^=ls,O===l)Ml(O,null,t);else{var b=u?u.next:l;O===n.effect.last&&(n.effect.last=O.prev),O.prev&&(O.prev.next=O.next),O.next&&(O.next.prev=O.prev),Ss(n,u,O),Ss(n,O,b),Ml(O,b,t),u=O,d=[],h=[],l=ml(u.next);continue}if((O.f&jr)!==0&&(Xg(O),s&&(O.nodes?.a?.unfix(),(f??=new Set).delete(O))),O!==l){if(c!==void 0&&c.has(O)){if(d.length<h.length){var _=h[0],C;u=_.prev;var y=d[0],w=d[d.length-1];for(C=0;C<d.length;C+=1)Ml(d[C],_,t);for(C=0;C<h.length;C+=1)c.delete(h[C]);Ss(n,y.prev,w.next),Ss(n,u,y),Ss(n,w,_),l=_,u=w,v-=1,d=[],h=[]}else c.delete(O),Ml(O,l,t),Ss(n,O.prev,O.next),Ss(n,O,u===null?n.effect.first:u.next),Ss(n,u,O),u=O;continue}for(d=[],h=[];l!==null&&l!==O;)(c??=new Set).add(l),h.push(l),l=ml(l.next);if(l===null)continue}(O.f&ls)===0&&d.push(O),u=O,l=ml(O.next)}if(n.outrogroups!==null){for(const k of n.outrogroups)k.pending.size===0&&(Ip(Od(k.done)),n.outrogroups?.delete(k));n.outrogroups.size===0&&(n.outrogroups=null)}if(l!==null||c!==void 0){var S=[];if(c!==void 0)for(O of c)(O.f&jr)===0&&S.push(O);for(;l!==null;)(l.f&jr)===0&&l!==n.fallback&&S.push(l),l=ml(l.next);var A=S.length;if(A>0){var x=(r&ow)!==0&&o===0?t:null;if(s){for(v=0;v<A;v+=1)S[v].nodes?.a?.measure();for(v=0;v<A;v+=1)S[v].nodes?.a?.fix()}rP(n,S,x)}}s&&zi(()=>{if(f!==void 0)for(O of f)O.nodes?.a?.apply()})}function sP(n,e,t,r,i,s,o,a){var l=(o&aT)!==0?(o&uT)===0?DT(t,!1,!1):Lo(t):null,c=(o&lT)!==0?Lo(i):null;return{v:l,i:c,e:Yr(()=>(s(e,l??t,c??i,a),()=>{n.delete(r)}))}}function Ml(n,e,t){if(n.nodes)for(var r=n.nodes.start,i=n.nodes.end,s=e&&(e.f&ls)===0?e.nodes.start:t;r!==null;){var o=qc(r);if(s.before(r),r===i)return;r=o}}function Ss(n,e,t){e===null?n.effect.first=t:e.next=t,t===null?n.effect.last=e:t.prev=e}function Xw(n,e,t=!1,r=!1,i=!1){var s=n,o="";fe(()=>{var a=Yt;if(o!==(o=e()??"")&&(a.nodes!==null&&($w(a.nodes.start,a.nodes.end),a.nodes=null),o!=="")){var l=o+"";t?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var c=Fg(l);if((t||r)&&(c=qr(c)),Do(qr(c),c.lastChild),t||r)for(;qr(c);)s.before(qr(c));else s.before(c)}})}function da(n,e,...t){var r=new Vg(n);Rc(()=>{const i=e()??null;r.ensure(i,i&&(s=>i(s,...t)))},$o)}function oP(n,e,t){_d(()=>{var r=Sr(()=>e(n,t?.())||{});if(r?.destroy)return()=>r.destroy()})}const ob=[...`
3
+ \r\f \v\uFEFF`];function aP(n,e,t){var r=n==null?"":""+n;if(t){for(var i in t)if(t[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||ob.includes(r[o-1]))&&(a===r.length||ob.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function lP(n,e){return n==null?null:String(n)}function Ze(n,e,t,r,i,s){var o=n.__className;if(o!==t||o===void 0){var a=aP(t,r,s);a==null?n.removeAttribute("class"):e?n.className=a:n.setAttribute("class",a),n.__className=t}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&n.classList.toggle(l,c)}return s}function Ar(n,e,t,r){var i=n.__style;if(i!==e){var s=lP(e);s==null?n.removeAttribute("style"):n.style.cssText=s,n.__style=e}return r}function rc(n,e,t=!1){if(n.multiple){if(e==null)return;if(!gd(e))return OT();for(var r of n.options)r.selected=e.includes(Xl(r));return}for(r of n.options){var i=Xl(r);if(RT(i,e)){r.selected=!0;return}}(!t||e!==void 0)&&(n.selectedIndex=-1)}function yf(n){var e=new MutationObserver(()=>{rc(n,n.__value)});e.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Zg(()=>{e.disconnect()})}function Fw(n,e,t=e){var r=new WeakSet,i=!0;jg(n,"change",s=>{var o=s?"[selected]":":checked",a;if(n.multiple)a=[].map.call(n.querySelectorAll(o),Xl);else{var l=n.querySelector(o)??n.querySelector("option:not([disabled])");a=l&&Xl(l)}t(a),jt!==null&&r.add(jt)}),_d(()=>{var s=e();if(n===document.activeElement){var o=vf??jt;if(r.has(o))return}if(rc(n,s,i),i&&s===void 0){var a=n.querySelector(":checked");a!==null&&(s=Xl(a),t(s))}n.__value=s,i=!1}),yf(n)}function Xl(n){return"__value"in n?n.__value:n.value}const cP=Symbol("is custom element"),uP=Symbol("is html");function ln(n,e){var t=Vw(n);t.value===(t.value=e??void 0)||n.value===e&&(e!==0||n.nodeName!=="PROGRESS")||(n.value=e??"")}function Et(n,e,t,r){var i=Vw(n);i[e]!==(i[e]=t)&&(e==="loading"&&(n[YC]=t),t==null?n.removeAttribute(e):typeof t!="string"&&fP(n).includes(e)?n[e]=t:n.setAttribute(e,t))}function Vw(n){return n.__attributes??={[cP]:n.nodeName.includes("-"),[uP]:n.namespaceURI===gT}}var ab=new Map;function fP(n){var e=n.getAttribute("is")||n.nodeName,t=ab.get(e);if(t)return t;ab.set(e,t=[]);for(var r,i=n,s=Element.prototype;s!==i;){r=ZC(i);for(var o in r)r[o].set&&t.push(o);i=Dg(i)}return t}function Qn(n,e,t=e){var r=new WeakSet;jg(n,"input",async i=>{var s=i?n.defaultValue:n.value;if(s=oh(n)?ah(s):s,t(s),jt!==null&&r.add(jt),await YT(),s!==(s=e())){var o=n.selectionStart,a=n.selectionEnd,l=n.value.length;if(n.value=s??"",a!==null){var c=n.value.length;o===a&&a===l&&c>l?(n.selectionStart=c,n.selectionEnd=c):(n.selectionStart=o,n.selectionEnd=Math.min(a,c))}}}),Sr(e)==null&&n.value&&(t(oh(n)?ah(n.value):n.value),jt!==null&&r.add(jt)),kd(()=>{var i=e();if(n===document.activeElement){var s=vf??jt;if(r.has(s))return}oh(n)&&i===ah(n.value)||n.type==="date"&&!i&&!n.value||i!==n.value&&(n.value=i??"")})}function Np(n,e,t=e){jg(n,"change",r=>{var i=r?n.defaultChecked:n.checked;t(i)}),Sr(e)==null&&t(n.checked),kd(()=>{var r=e();n.checked=!!r})}function oh(n){var e=n.type;return e==="number"||e==="range"}function ah(n){return n===""?null:+n}class Wg{#e=new WeakMap;#r;#t;static entries=new WeakMap;constructor(e){this.#t=e}observe(e,t){var r=this.#e.get(e)||new Set;return r.add(t),this.#e.set(e,r),this.#i().observe(e,this.#t),()=>{var i=this.#e.get(e);i.delete(t),i.size===0&&(this.#e.delete(e),this.#r.unobserve(e))}}#i(){return this.#r??(this.#r=new ResizeObserver(e=>{for(var t of e){Wg.entries.set(t.target,t);for(var r of this.#e.get(t.target)||[])r(t)}}))}}var dP=new Wg({box:"border-box"});function hP(n,e,t){var r=dP.observe(n,()=>t(n[e]));_d(()=>(Sr(()=>t(n[e])),r))}function lb(n,e){return n===e||n?.[Ao]===e}function fn(n={},e,t,r){return _d(()=>{var i,s;return kd(()=>{i=s,s=[],Sr(()=>{n!==t(...s)&&(e(n,...s),i&&lb(t(...i),n)&&e(null,...i))})}),()=>{zi(()=>{s&&lb(t(...s),n)&&e(null,...s)})}}),n}let tu=!1;function pP(n){var e=tu;try{return tu=!1,[n(),tu]}finally{tu=e}}function Pt(n,e,t,r){var i=(t&hT)!==0,s=(t&pT)!==0,o=r,a=!0,l=()=>(a&&(a=!1,o=s?Sr(r):r),o),c;if(i){var u=Ao in n||WC in n;c=ka(n,e)?.set??(u&&e in n?b=>n[e]=b:void 0)}var f,d=!1;i?[f,d]=pP(()=>n[e]):f=n[e],f===void 0&&r!==void 0&&(f=l(),c&&(nT(),c(f)));var h;if(h=()=>{var b=n[e];return b===void 0?l():(a=!0,b)},(t&dT)===0)return h;if(c){var m=n.$$legacy;return(function(b,_){return arguments.length>0?((!_||m||d)&&c(_?h():b),b):h()})}var p=!1,O=((t&fT)!==0?yd:bw)(()=>(p=!1,h()));i&&g(O);var v=Yt;return(function(b,_){if(arguments.length>0){const C=_?g(O):i?tn(b):b;return M(O,C),p=!0,o!==void 0&&(o=C),b}return Vs&&p||(v.f&fs)!==0?O.v:g(O)})}function to(n){zr===null&&UC(),mn(()=>{const e=Sr(n);if(typeof e=="function")return e})}const mP="modulepreload",gP=function(n){return"/"+n},cb={},re=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=l(t.map(c=>{if(c=gP(c),c in cb)return;cb[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":mP,u||(d.as="script"),d.crossOrigin="",d.href=c,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,m)=>{d.addEventListener("load",h),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},OP="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(OP);const Yg=Symbol.for("yaml.alias"),Bp=Symbol.for("yaml.document"),Zs=Symbol.for("yaml.map"),Ww=Symbol.for("yaml.pair"),Yi=Symbol.for("yaml.scalar"),nl=Symbol.for("yaml.seq"),ii=Symbol.for("yaml.node.type"),no=n=>!!n&&typeof n=="object"&&n[ii]===Yg,Vo=n=>!!n&&typeof n=="object"&&n[ii]===Bp,rl=n=>!!n&&typeof n=="object"&&n[ii]===Zs,gn=n=>!!n&&typeof n=="object"&&n[ii]===Ww,on=n=>!!n&&typeof n=="object"&&n[ii]===Yi,il=n=>!!n&&typeof n=="object"&&n[ii]===nl;function vn(n){if(n&&typeof n=="object")switch(n[ii]){case Zs:case nl:return!0}return!1}function yn(n){if(n&&typeof n=="object")switch(n[ii]){case Yg:case Zs:case Yi:case nl:return!0}return!1}const Yw=n=>(on(n)||vn(n))&&!!n.anchor,yr=Symbol("break visit"),Uw=Symbol("skip children"),Zi=Symbol("remove node");function Wo(n,e){const t=Gw(e);Vo(n)?ha(null,n.contents,t,Object.freeze([n]))===Zi&&(n.contents=null):ha(null,n,t,Object.freeze([]))}Wo.BREAK=yr;Wo.SKIP=Uw;Wo.REMOVE=Zi;function ha(n,e,t,r){const i=Hw(n,e,t,r);if(yn(i)||gn(i))return Kw(n,r,i),ha(n,i,t,r);if(typeof i!="symbol"){if(vn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=ha(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yr)return yr;o===Zi&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=ha("key",e.key,t,r);if(s===yr)return yr;s===Zi&&(e.key=null);const o=ha("value",e.value,t,r);if(o===yr)return yr;o===Zi&&(e.value=null)}}return i}async function xd(n,e){const t=Gw(e);Vo(n)?await pa(null,n.contents,t,Object.freeze([n]))===Zi&&(n.contents=null):await pa(null,n,t,Object.freeze([]))}xd.BREAK=yr;xd.SKIP=Uw;xd.REMOVE=Zi;async function pa(n,e,t,r){const i=await Hw(n,e,t,r);if(yn(i)||gn(i))return Kw(n,r,i),pa(n,i,t,r);if(typeof i!="symbol"){if(vn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await pa(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yr)return yr;o===Zi&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=await pa("key",e.key,t,r);if(s===yr)return yr;s===Zi&&(e.key=null);const o=await pa("value",e.value,t,r);if(o===yr)return yr;o===Zi&&(e.value=null)}}return i}function Gw(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Hw(n,e,t,r){if(typeof t=="function")return t(n,e,r);if(rl(e))return t.Map?.(n,e,r);if(il(e))return t.Seq?.(n,e,r);if(gn(e))return t.Pair?.(n,e,r);if(on(e))return t.Scalar?.(n,e,r);if(no(e))return t.Alias?.(n,e,r)}function Kw(n,e,t){const r=e[e.length-1];if(vn(r))r.items[n]=t;else if(gn(r))n==="key"?r.key=t:r.value=t;else if(Vo(r))r.contents=t;else{const i=no(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const vP={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},bP=n=>n.replace(/[!,[\]{}]/g,e=>vP[e]);class ir{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ir.defaultYaml,e),this.tags=Object.assign({},ir.defaultTags,t)}clone(){const e=new ir(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ir(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ir.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ir.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ir.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ir.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return t(String(o)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+bP(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&yn(e.contents)){const s={};Wo(e.contents,(o,a)=>{yn(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
4
+ `)}}ir.defaultYaml={explicit:!1,version:"1.2"};ir.defaultTags={"!!":"tag:yaml.org,2002:"};function Jw(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function e_(n){const e=new Set;return Wo(n,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function t_(n,e){for(let t=1;;++t){const r=`${n}${t}`;if(!e.has(r))return r}}function yP(n,e){const t=[],r=new Map;let i=null;return{onAnchor:s=>{t.push(s),i??(i=e_(n));const o=t_(e,i);return i.add(o),o},setAnchors:()=>{for(const s of t){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(on(o.node)||vn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function ma(n,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=ma(n,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=ma(n,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=ma(n,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=ma(n,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return n.call(e,t,r)}function ti(n,e,t){if(Array.isArray(n))return n.map((r,i)=>ti(r,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!Yw(n))return n.toJSON(e,t);const r={aliasCount:0,count:1,res:void 0};t.anchors.set(n,r),t.onCreate=s=>{r.res=s,delete t.onCreate};const i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}class Ug{constructor(e){Object.defineProperty(this,ii,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Vo(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=ti(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s=="function"?ma(s,{"":a},"",a):a}}class Sd extends Ug{constructor(e){super(Yg),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],Wo(e,{Node:(s,o)=>{(no(o)||Yw(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let i;for(const s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=t,o=this.resolve(i,t);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(ti(o,null,t),a=r.get(o)),a?.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Gu(i,o,r)),a.count*a.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){const i=`*${this.source}`;if(e){if(Jw(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Gu(n,e,t){if(no(e)){const r=e.resolve(n),i=t&&r&&t.get(r);return i?i.count*i.aliasCount:0}else if(vn(e)){let r=0;for(const i of e.items){const s=Gu(n,i,t);s>r&&(r=s)}return r}else if(gn(e)){const r=Gu(n,e.key,t),i=Gu(n,e.value,t);return Math.max(r,i)}return 1}const n_=n=>!n||typeof n!="function"&&typeof n!="object";class ft extends Ug{constructor(e){super(Yi),this.value=e}toJSON(e,t){return t?.keep?this.value:ti(this.value,e,t)}toString(){return String(this.value)}}ft.BLOCK_FOLDED="BLOCK_FOLDED";ft.BLOCK_LITERAL="BLOCK_LITERAL";ft.PLAIN="PLAIN";ft.QUOTE_DOUBLE="QUOTE_DOUBLE";ft.QUOTE_SINGLE="QUOTE_SINGLE";const wP="tag:yaml.org,2002:";function _P(n,e,t){if(e){const r=t.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(r=>r.identify?.(n)&&!r.format)}function ic(n,e,t){if(Vo(n)&&(n=n.contents),yn(n))return n;if(gn(n)){const f=t.schema[Zs].createNode?.(t.schema,null,t);return f.items.push(n),f}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=t;let l;if(r&&n&&typeof n=="object"){if(l=a.get(n),l)return l.anchor??(l.anchor=i(n)),new Sd(l.anchor);l={anchor:null,node:null},a.set(n,l)}e?.startsWith("!!")&&(e=wP+e.slice(2));let c=_P(n,e,o.tags);if(!c){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const f=new ft(n);return l&&(l.node=f),f}c=n instanceof Map?o[Zs]:Symbol.iterator in Object(n)?o[nl]:o[Zs]}s&&(s(c),delete t.onTagObj);const u=c?.createNode?c.createNode(t.schema,n,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,n,t):new ft(n);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function wf(n,e,t){let r=t;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return ic(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Dl=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class r_ extends Ug{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>yn(r)||gn(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Dl(e))this.add(t);else{const[r,...i]=e,s=this.get(r,!0);if(vn(s))s.addIn(i,t);else if(s===void 0&&this.schema)this.set(r,wf(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[t,...r]=e;if(r.length===0)return this.delete(t);const i=this.get(t,!0);if(vn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!t&&on(s)?s.value:s:vn(s)?s.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!gn(t))return!1;const r=t.value;return r==null||e&&on(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(r.length===0)return this.has(t);const i=this.get(t,!0);return vn(i)?i.hasIn(r):!1}setIn(e,t){const[r,...i]=e;if(i.length===0)this.set(r,t);else{const s=this.get(r,!0);if(vn(s))s.setIn(i,t);else if(s===void 0&&this.schema)this.set(r,wf(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const kP=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function cs(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const yo=(n,e,t)=>n.endsWith(`
5
+ `)?cs(t,e):t.includes(`
6
+ `)?`
7
+ `+cs(t,e):(n.endsWith(" ")?"":" ")+t,i_="flow",jp="block",Hu="quoted";function Ad(n,e,t="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;i<s&&(s=0);const l=Math.max(1+s,1+i-e.length);if(n.length<=l)return n;const c=[],u={};let f=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?c.push(0):f=i-r);let d,h,m=!1,p=-1,O=-1,v=-1;t===jp&&(p=ub(n,p,e.length),p!==-1&&(f=p+l));for(let _;_=n[p+=1];){if(t===Hu&&_==="\\"){switch(O=p,n[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}v=p}if(_===`
8
+ `)t===jp&&(p=ub(n,p,e.length)),f=p+e.length+l,d=void 0;else{if(_===" "&&h&&h!==" "&&h!==`
9
+ `&&h!==" "){const C=n[p+1];C&&C!==" "&&C!==`
10
+ `&&C!==" "&&(d=p)}if(p>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Hu){for(;h===" "||h===" ";)h=_,_=n[p+=1],m=!0;const C=p>v+1?p-2:O-1;if(u[C])return n;c.push(C),u[C]=!0,f=C+l,d=void 0}else m=!0}h=_}if(m&&a&&a(),c.length===0)return n;o&&o();let b=n.slice(0,c[0]);for(let _=0;_<c.length;++_){const C=c[_],y=c[_+1]||n.length;C===0?b=`
11
+ ${e}${n.slice(0,y)}`:(t===Hu&&u[C]&&(b+=`${n[C]}\\`),b+=`
12
+ ${e}${n.slice(C+1,y)}`)}return b}function ub(n,e,t){let r=e,i=e+1,s=n[i];for(;s===" "||s===" ";)if(e<i+t)s=n[++e];else{do s=n[++e];while(s&&s!==`
13
+ `);r=e,i=e+1,s=n[i]}return r}const Cd=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Td=n=>/^(%|---|\.\.\.)/m.test(n);function xP(n,e,t){if(!e||e<0)return!1;const r=e-t,i=n.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(n[s]===`
14
+ `){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function Fl(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Td(n)?" ":"");let o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);const u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<i)l+=1;else{for(o+=t.slice(a,l)+`
15
+
16
+ `;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
17
+ `,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:Ad(o,s,Hu,Cd(e,!1))}function zp(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
18
+ `)||/[ \t]\n|\n[ \t]/.test(n))return Fl(n,e);const t=e.indent||(Td(n)?" ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
19
+ ${t}`)+"'";return e.implicitKey?r:Ad(r,t,i_,Cd(e,!1))}function ga(n,e){const{singleQuote:t}=e.options;let r;if(t===!1)r=Fl;else{const i=n.includes('"'),s=n.includes("'");i&&!s?r=zp:s&&!i?r=Fl:r=t?zp:Fl}return r(n,e)}let Zp;try{Zp=new RegExp(`(^|(?<!
20
+ ))
21
+ +(?!
22
+ |$)`,"g")}catch{Zp=/\n+(?!\n|$)/g}function Ku({comment:n,type:e,value:t},r,i,s){const{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return ga(t,r);const c=r.indent||(r.forceBlockIndent||Td(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===ft.BLOCK_FOLDED?!1:e===ft.BLOCK_LITERAL?!0:!xP(t,l,c.length);if(!t)return u?`|
23
+ `:`>
24
+ `;let f,d;for(d=t.length;d>0;--d){const y=t[d-1];if(y!==`
25
+ `&&y!==" "&&y!==" ")break}let h=t.substring(d);const m=h.indexOf(`
26
+ `);m===-1?f="-":t===h||m!==h.length-1?(f="+",s&&s()):f="",h&&(t=t.slice(0,-h.length),h[h.length-1]===`
27
+ `&&(h=h.slice(0,-1)),h=h.replace(Zp,`$&${c}`));let p=!1,O,v=-1;for(O=0;O<t.length;++O){const y=t[O];if(y===" ")p=!0;else if(y===`
28
+ `)v=O;else break}let b=t.substring(0,v<O?v+1:O);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let C=(p?c?"2":"1":"")+f;if(n&&(C+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!u){const y=t.replace(/\n+/g,`
29
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let w=!1;const S=Cd(r,!0);o!=="folded"&&e!==ft.BLOCK_FOLDED&&(S.onOverflow=()=>{w=!0});const A=Ad(`${b}${y}${h}`,c,jp,S);if(!w)return`>${C}
30
+ ${c}${A}`}return t=t.replace(/\n+/g,`$&${c}`),`|${C}
31
+ ${c}${b}${t}${h}`}function SP(n,e,t,r){const{type:i,value:s}=n,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
32
+ `)||u&&/[[\]{},]/.test(s))return ga(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
33
+ `)?ga(s,e):Ku(n,e,t,r);if(!a&&!u&&i!==ft.PLAIN&&s.includes(`
34
+ `))return Ku(n,e,t,r);if(Td(s)){if(l==="")return e.forceBlockIndent=!0,Ku(n,e,t,r);if(a&&l===c)return ga(s,e)}const f=s.replace(/\n+/g,`$&
35
+ ${l}`);if(o){const d=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(f),{compat:h,tags:m}=e.doc.schema;if(m.some(d)||h?.some(d))return ga(s,e)}return a?f:Ad(f,l,i_,Cd(e,!1))}function Nc(n,e,t,r){const{implicitKey:i,inFlow:s}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:a}=n;a!==ft.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=ft.QUOTE_DOUBLE);const l=u=>{switch(u){case ft.BLOCK_FOLDED:case ft.BLOCK_LITERAL:return i||s?ga(o.value,e):Ku(o,e,t,r);case ft.QUOTE_DOUBLE:return Fl(o.value,e);case ft.QUOTE_SINGLE:return zp(o.value,e);case ft.PLAIN:return SP(o,e,t,r);default:return null}};let c=l(a);if(c===null){const{defaultKeyType:u,defaultStringType:f}=e.options,d=i&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function s_(n,e){const t=Object.assign({blockQuote:!0,commentString:kP,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function AP(n,e){if(e.tag){const i=n.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let t,r;if(on(e)){r=e.value;let i=n.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}t=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,t=n.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!t){const i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return t}function CP(n,e,{anchors:t,doc:r}){if(!r.directives)return"";const i=[],s=(on(n)||vn(n))&&n.anchor;s&&Jw(s)&&(t.add(s),i.push(`&${s}`));const o=n.tag??(e.default?null:e.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}function Ia(n,e,t,r){if(gn(n))return n.toString(e,t,r);if(no(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i;const s=yn(n)?n:e.doc.createNode(n,{onTagObj:l=>i=l});i??(i=AP(e.doc.schema.tags,s));const o=CP(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,t,r):on(s)?Nc(s,e,t,r):s.toString(e,t,r);return o?on(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
36
+ ${e.indent}${a}`:a}function TP({key:n,value:e},t,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t;let d=yn(n)&&n.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(vn(n)||!yn(n)&&typeof n=="object"){const S="With simple keys, collection cannot be used as a key value";throw new Error(S)}}let h=!f&&(!n||d&&e==null&&!t.inFlow||vn(n)||(on(n)?n.type===ft.BLOCK_FOLDED||n.type===ft.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(f||!s),indent:a+l});let m=!1,p=!1,O=Ia(n,t,()=>m=!0,()=>p=!0);if(!h&&!t.inFlow&&O.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(s||e==null)return m&&r&&r(),O===""?"?":h?`? ${O}`:O}else if(s&&!f||e==null&&h)return O=`? ${O}`,d&&!m?O+=yo(O,t.indent,c(d)):p&&i&&i(),O;m&&(d=null),h?(d&&(O+=yo(O,t.indent,c(d))),O=`? ${O}
37
+ ${a}:`):(O=`${O}:`,d&&(O+=yo(O,t.indent,c(d))));let v,b,_;yn(e)?(v=!!e.spaceBefore,b=e.commentBefore,_=e.comment):(v=!1,b=null,_=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!h&&!d&&on(e)&&(t.indentAtStart=O.length+1),p=!1,!u&&l.length>=2&&!t.inFlow&&!h&&il(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let C=!1;const y=Ia(e,t,()=>C=!0,()=>p=!0);let w=" ";if(d||v||b){if(w=v?`
38
+ `:"",b){const S=c(b);w+=`
39
+ ${cs(S,t.indent)}`}y===""&&!t.inFlow?w===`
40
+ `&&_&&(w=`
41
+
42
+ `):w+=`
43
+ ${t.indent}`}else if(!h&&vn(e)){const S=y[0],A=y.indexOf(`
44
+ `),x=A!==-1,k=t.inFlow??e.flow??e.items.length===0;if(x||!k){let E=!1;if(x&&(S==="&"||S==="!")){let T=y.indexOf(" ");S==="&"&&T!==-1&&T<A&&y[T+1]==="!"&&(T=y.indexOf(" ",T+1)),(T===-1||A<T)&&(E=!0)}E||(w=`
45
+ ${t.indent}`)}}else(y===""||y[0]===`
46
+ `)&&(w="");return O+=w+y,t.inFlow?C&&r&&r():_&&!C?O+=yo(O,t.indent,c(_)):p&&i&&i(),O}function o_(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const nu="<<",hs={identify:n=>n===nu||typeof n=="symbol"&&n.description===nu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ft(Symbol(nu)),{addToJSMap:a_}),stringify:()=>nu},PP=(n,e)=>(hs.identify(e)||on(e)&&(!e.type||e.type===ft.PLAIN)&&hs.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===hs.tag&&t.default);function a_(n,e,t){if(t=n&&no(t)?t.resolve(n.doc):t,il(t))for(const r of t.items)lh(n,e,r);else if(Array.isArray(t))for(const r of t)lh(n,e,r);else lh(n,e,t)}function lh(n,e,t){const r=n&&no(t)?t.resolve(n.doc):t;if(!rl(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,n,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function l_(n,e,{key:t,value:r}){if(yn(t)&&t.addToJSMap)t.addToJSMap(n,e,r);else if(PP(n,t))a_(n,e,r);else{const i=ti(t,"",n);if(e instanceof Map)e.set(i,ti(r,i,n));else if(e instanceof Set)e.add(i);else{const s=EP(t,i,n),o=ti(r,s,n);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function EP(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(yn(n)&&t?.doc){const r=s_(t.doc,{});r.anchors=new Set;for(const s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=n.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),o_(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Gg(n,e,t){const r=ic(n,void 0,t),i=ic(e,void 0,t);return new er(r,i)}class er{constructor(e,t=null){Object.defineProperty(this,ii,{value:Ww}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return yn(t)&&(t=t.clone(e)),yn(r)&&(r=r.clone(e)),new er(t,r)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return l_(t,r,this)}toString(e,t,r){return e?.doc?TP(this,e,t,r):JSON.stringify(this)}}function c_(n,e,t){return(e.inFlow??n.flow?QP:$P)(n,e,t)}function $P({comment:n,items:e},t,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null});let f=!1;const d=[];for(let m=0;m<e.length;++m){const p=e[m];let O=null;if(yn(p))!f&&p.spaceBefore&&d.push(""),_f(t,d,p.commentBefore,f),p.comment&&(O=p.comment);else if(gn(p)){const b=yn(p.key)?p.key:null;b&&(!f&&b.spaceBefore&&d.push(""),_f(t,d,b.commentBefore,f))}f=!1;let v=Ia(p,u,()=>O=null,()=>f=!0);O&&(v+=yo(v,s,c(O))),f&&O&&(f=!1),d.push(r+v)}let h;if(d.length===0)h=i.start+i.end;else{h=d[0];for(let m=1;m<d.length;++m){const p=d[m];h+=p?`
47
+ ${l}${p}`:`
48
+ `}}return n?(h+=`
49
+ `+cs(c(n),l),a&&a()):f&&o&&o(),h}function QP({items:n},e,{flowChars:t,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const l=Object.assign({},e,{indent:r,inFlow:!0,type:null});let c=!1,u=0;const f=[];for(let m=0;m<n.length;++m){const p=n[m];let O=null;if(yn(p))p.spaceBefore&&f.push(""),_f(e,f,p.commentBefore,!1),p.comment&&(O=p.comment);else if(gn(p)){const b=yn(p.key)?p.key:null;b&&(b.spaceBefore&&f.push(""),_f(e,f,b.commentBefore,!1),b.comment&&(c=!0));const _=yn(p.value)?p.value:null;_?(_.comment&&(O=_.comment),_.commentBefore&&(c=!0)):p.value==null&&b?.comment&&(O=b.comment)}O&&(c=!0);let v=Ia(p,l,()=>O=null);m<n.length-1&&(v+=","),O&&(v+=yo(v,r,a(O))),!c&&(f.length>u||v.includes(`
50
+ `))&&(c=!0),f.push(v),u=f.length}const{start:d,end:h}=t;if(f.length===0)return d+h;if(!c){const m=f.reduce((p,O)=>p+O.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=d;for(const p of f)m+=p?`
51
+ ${s}${i}${p}`:`
52
+ `;return`${m}
53
+ ${i}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function _f({indent:n,options:{commentString:e}},t,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=cs(e(r),n);t.push(s.trimStart())}}function wo(n,e){const t=on(e)?e.value:e;for(const r of n)if(gn(r)&&(r.key===e||r.key===t||on(r.key)&&r.key.value===t))return r}class Rr extends r_{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Zs,e),this.items=[]}static from(e,t,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||i)&&o.items.push(Gg(l,c,r))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;gn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new er(e,e?.value):r=new er(e.key,e.value);const i=wo(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);on(i.value)&&n_(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const t=wo(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=wo(this.items,e)?.value;return(!t&&on(i)?i.value:i)??void 0}has(e){return!!wo(this.items,e)}set(e,t){this.add(new er(e,t),!0)}toJSON(e,t,r){const i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(const s of this.items)l_(t,i,s);return i}toString(e,t,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!gn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),c_(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const sl={collection:"map",default:!0,nodeClass:Rr,tag:"tag:yaml.org,2002:map",resolve(n,e){return rl(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>Rr.from(n,e,t)};class Ws extends r_{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(nl,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=ru(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const r=ru(e);if(typeof r!="number")return;const i=this.items[r];return!t&&on(i)?i.value:i}has(e){const t=ru(e);return typeof t=="number"&&t<this.items.length}set(e,t){const r=ru(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];on(i)&&n_(t)?i.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let i=0;for(const s of this.items)r.push(ti(s,String(i++),t));return r}toString(e,t,r){return e?c_(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){const l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}s.items.push(ic(a,void 0,r))}}return s}}function ru(n){let e=on(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const ol={collection:"seq",default:!0,nodeClass:Ws,tag:"tag:yaml.org,2002:seq",resolve(n,e){return il(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>Ws.from(n,e,t)},Pd={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,r){return e=Object.assign({actualString:!0},e),Nc(n,e,t,r)}},Ed={identify:n=>n==null,createNode:()=>new ft(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ft(null),stringify:({source:n},e)=>typeof n=="string"&&Ed.test.test(n)?n:e.options.nullStr},Hg={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new ft(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&Hg.test.test(n)){const r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?t.options.trueStr:t.options.falseStr}};function Si({format:n,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const u_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Si},f_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Si(n)}},d_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new ft(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Si},$d=n=>typeof n=="bigint"||Number.isInteger(n),Kg=(n,e,t,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),t);function h_(n,e,t){const{value:r}=n;return $d(r)&&r>=0?t+r.toString(e):Si(n)}const p_={identify:n=>$d(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>Kg(n,2,8,t),stringify:n=>h_(n,8,"0o")},m_={identify:$d,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>Kg(n,0,10,t),stringify:Si},g_={identify:n=>$d(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>Kg(n,2,16,t),stringify:n=>h_(n,16,"0x")},LP=[sl,ol,Pd,Ed,Hg,p_,m_,g_,u_,f_,d_];function fb(n){return typeof n=="bigint"||Number.isInteger(n)}const iu=({value:n})=>JSON.stringify(n),MP=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:iu},{identify:n=>n==null,createNode:()=>new ft(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:iu},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:iu},{identify:fb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>fb(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:iu}],DP={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},qP=[sl,ol].concat(MP,DP),Jg={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){const t=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},r,i,s){if(!t)return"";const o=t;let a;if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ft.BLOCK_LITERAL),e!==ft.QUOTE_DOUBLE){const l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===ft.BLOCK_LITERAL?`
54
+ `:" ")}return Nc({comment:n,type:e,value:a},r,i,s)}};function O_(n,e){if(il(n))for(let t=0;t<n.items.length;++t){let r=n.items[t];if(!gn(r)){if(rl(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new er(new ft(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
55
+ ${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
56
+ ${s.comment}`:r.comment}r=i}n.items[t]=gn(r)?r:new er(r)}}else e("Expected a sequence for this tag");return n}function v_(n,e,t){const{replacer:r}=t,i=new Ws(n);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(Gg(a,l,t))}return i}const eO={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:O_,createNode:v_};class xa extends Ws{constructor(){super(),this.add=Rr.prototype.add.bind(this),this.delete=Rr.prototype.delete.bind(this),this.get=Rr.prototype.get.bind(this),this.has=Rr.prototype.has.bind(this),this.set=Rr.prototype.set.bind(this),this.tag=xa.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const i of this.items){let s,o;if(gn(i)?(s=ti(i.key,"",t),o=ti(i.value,s,t)):s=ti(i,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){const i=v_(e,t,r),s=new this;return s.items=i.items,s}}xa.tag="tag:yaml.org,2002:omap";const tO={collection:"seq",identify:n=>n instanceof Map,nodeClass:xa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const t=O_(n,e),r=[];for(const{key:i}of t.items)on(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new xa,t)},createNode:(n,e,t)=>xa.from(n,e,t)};function b_({value:n,source:e},t){return e&&(n?y_:w_).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}const y_={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ft(!0),stringify:b_},w_={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ft(!1),stringify:b_},RP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Si},IP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Si(n)}},NP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new ft(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){const r=n.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Si},Bc=n=>typeof n=="bigint"||Number.isInteger(n);function Qd(n,e,t,{intAsBigInt:r}){const i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const o=BigInt(n);return i==="-"?BigInt(-1)*o:o}const s=parseInt(n,t);return i==="-"?-1*s:s}function nO(n,e,t){const{value:r}=n;if(Bc(r)){const i=r.toString(e);return r<0?"-"+t+i.substr(1):t+i}return Si(n)}const BP={identify:Bc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>Qd(n,2,2,t),stringify:n=>nO(n,2,"0b")},jP={identify:Bc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>Qd(n,1,8,t),stringify:n=>nO(n,8,"0")},zP={identify:Bc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>Qd(n,0,10,t),stringify:Si},ZP={identify:Bc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>Qd(n,2,16,t),stringify:n=>nO(n,16,"0x")};class Sa extends Rr{constructor(e){super(e),this.tag=Sa.tag}add(e){let t;gn(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new er(e.key,null):t=new er(e,null),wo(this.items,t.key)||this.items.push(t)}get(e,t){const r=wo(this.items,e);return!t&&gn(r)?on(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=wo(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new er(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),s.items.push(Gg(o,null,r));return s}}Sa.tag="tag:yaml.org,2002:set";const rO={collection:"map",identify:n=>n instanceof Set,nodeClass:Sa,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>Sa.from(n,e,t),resolve(n,e){if(rl(n)){if(n.hasAllNullValues(!0))return Object.assign(new Sa,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function iO(n,e){const t=n[0],r=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*s:s}function __(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Si(n);let r="";e<0&&(r="-",e*=t(-1));const i=t(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const k_={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>iO(n,t),stringify:__},x_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>iO(n,!1),stringify:__},Ld={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){const e=n.match(Ld.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,r-1,i,s||0,o||0,a||0,l);const u=e[8];if(u&&u!=="Z"){let f=iO(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},db=[sl,ol,Pd,Ed,y_,w_,BP,jP,zP,ZP,RP,IP,NP,Jg,hs,tO,eO,rO,k_,x_,Ld],hb=new Map([["core",LP],["failsafe",[sl,ol,Pd]],["json",qP],["yaml11",db],["yaml-1.1",db]]),pb={binary:Jg,bool:Hg,float:d_,floatExp:f_,floatNaN:u_,floatTime:x_,int:m_,intHex:g_,intOct:p_,intTime:k_,map:sl,merge:hs,null:Ed,omap:tO,pairs:eO,seq:ol,set:rO,timestamp:Ld},XP={"tag:yaml.org,2002:binary":Jg,"tag:yaml.org,2002:merge":hs,"tag:yaml.org,2002:omap":tO,"tag:yaml.org,2002:pairs":eO,"tag:yaml.org,2002:set":rO,"tag:yaml.org,2002:timestamp":Ld};function ch(n,e,t){const r=hb.get(e);if(r&&!n)return t&&!r.includes(hs)?r.concat(hs):r.slice();let i=r;if(!i)if(Array.isArray(n))i=[];else{const s=Array.from(hb.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(const s of n)i=i.concat(s);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(hs)),i.reduce((s,o)=>{const a=typeof o=="string"?pb[o]:o;if(!a){const l=JSON.stringify(o),c=Object.keys(pb).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}const FP=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;let S_=class A_{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?ch(e,"compat"):e?ch(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?XP:{},this.tags=ch(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Zs,{value:sl}),Object.defineProperty(this,Yi,{value:Pd}),Object.defineProperty(this,nl,{value:ol}),this.sortMapEntries=typeof o=="function"?o:o===!0?FP:null}clone(){const e=Object.create(A_.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function VP(n,e){const t=[];let r=e.directives===!0;if(e.directives!==!1&&n.directives){const l=n.directives.toString(n);l?(t.push(l),r=!0):n.directives.docStart&&(r=!0)}r&&t.push("---");const i=s_(n,e),{commentString:s}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");const l=s(n.commentBefore);t.unshift(cs(l,""))}let o=!1,a=null;if(n.contents){if(yn(n.contents)){if(n.contents.spaceBefore&&r&&t.push(""),n.contents.commentBefore){const u=s(n.contents.commentBefore);t.push(cs(u,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}const l=a?void 0:()=>o=!0;let c=Ia(n.contents,i,()=>a=null,l);a&&(c+=yo(c,"",s(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(Ia(n.contents,i));if(n.directives?.docEnd)if(n.comment){const l=s(n.comment);l.includes(`
57
+ `)?(t.push("..."),t.push(cs(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=n.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(cs(s(l),"")))}return t.join(`
58
+ `)+`
59
+ `}class al{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ii,{value:Bp});let i=null;typeof t=="function"||Array.isArray(t)?i=t:r===void 0&&t&&(r=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new ir({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(al.prototype,{[ii]:{value:Bp}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=yn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Jo(this.contents)&&this.contents.add(e)}addIn(e,t){Jo(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=e_(this);e.anchor=!t||r.has(t)?t_(t||"a",r):t}return new Sd(e.anchor)}createNode(e,t,r){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const O=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(O).map(String);v.length>0&&(t=t.concat(v)),i=t}else r===void 0&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=yP(this,o||"a"),m={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:h},p=ic(e,u,m);return a&&vn(p)&&(p.flow=!0),d(),p}createPair(e,t,r={}){const i=this.createNode(e,null,r),s=this.createNode(t,null,r);return new er(i,s)}delete(e){return Jo(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Dl(e)?this.contents==null?!1:(this.contents=null,!0):Jo(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return vn(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Dl(e)?!t&&on(this.contents)?this.contents.value:this.contents:vn(this.contents)?this.contents.getIn(e,t):void 0}has(e){return vn(this.contents)?this.contents.has(e):!1}hasIn(e){return Dl(e)?this.contents!==void 0:vn(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=wf(this.schema,[e],t):Jo(this.contents)&&this.contents.set(e,t)}setIn(e,t){Dl(e)?this.contents=t:this.contents==null?this.contents=wf(this.schema,Array.from(e),t):Jo(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ir({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ir({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new S_(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=ti(this.contents,t??"",a);if(typeof s=="function")for(const{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?ma(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return VP(this,e)}}function Jo(n){if(vn(n))return!0;throw new Error("Expected a YAML collection as document contents")}class sO extends Error{constructor(e,t,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=t}}class _o extends sO{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class C_ extends sO{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const kf=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));const{line:r,col:i}=t.linePos[0];t.message+=` at line ${r}, column ${i}`;let s=i-1,o=n.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
60
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=t.linePos[1];l?.line===r&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-s)));const c=" ".repeat(s)+"^".repeat(a);t.message+=`:
61
+
62
+ ${o}
63
+ ${c}
64
+ `}};function Na(n,{flow:e,indicator:t,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,m=!1,p=null,O=null,v=null,b=null,_=null,C=null,y=null;for(const A of n)switch(m&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),p&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),p=null),A.type){case"space":!e&&(t!=="doc-start"||r?.type!=="flow-collection")&&A.source.includes(" ")&&(p=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=A.source.substring(1)||" ";f?f+=d+x:f=x,d="",c=!1;break}case"newline":c?f?f+=A.source:(!C||t!=="seq-item-ind")&&(l=!0):d+=A.source,c=!0,h=!0,(O||v)&&(b=A),u=!0;break;case"anchor":O&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),O=A,y??(y=A.offset),c=!1,u=!1,m=!0;break;case"tag":{v&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),v=A,y??(y=A.offset),c=!1,u=!1,m=!0;break}case t:(O||v)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),C&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),C=A,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){_&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),_=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}const w=n[n.length-1],S=w?w.offset+w.source.length:i;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p&&(c&&p.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:C,spaceBefore:l,comment:f,hasNewline:h,anchor:O,tag:v,newlineAfterProp:b,end:S,start:y??S}}function sc(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
65
+ `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(sc(e.key)||sc(e.value))return!0}return!1;default:return!0}}function Xp(n,e,t){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&sc(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function T_(n,e,t){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||on(s)&&on(o)&&s.value===o.value;return e.some(s=>i(s.key,t))}const mb="All mapping items must start at the same column";function WP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=s?.nodeClass??Rr,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(const u of r.items){const{start:f,key:d,sep:h,value:m}=u,p=Na(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),O=!p.found;if(O){if(d&&(d.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(l,"BAD_INDENT",mb)),!p.anchor&&!p.tag&&!h){c=p.end,p.comment&&(a.comment?a.comment+=`
66
+ `+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||sc(d))&&i(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==r.indent&&i(l,"BAD_INDENT",mb);t.atKey=!0;const v=p.end,b=d?n(t,d,p,i):e(t,v,f,null,p,i);t.schema.compat&&Xp(r.indent,d,i),t.atKey=!1,T_(t,a.items,b)&&i(v,"DUPLICATE_KEY","Map keys must be unique");const _=Na(h??[],{indicator:"map-value-ind",next:m,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=_.end,_.found){O&&(m?.type==="block-map"&&!_.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&p.start<_.found.offset-1024&&i(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const C=m?n(t,m,_,i):e(t,l,h,null,_,i);t.schema.compat&&Xp(r.indent,m,i),l=C.range[2];const y=new er(b,C);t.options.keepSourceTokens&&(y.srcToken=u),a.items.push(y)}else{O&&i(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(b.comment?b.comment+=`
67
+ `+_.comment:b.comment=_.comment);const C=new er(b);t.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function YP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=s?.nodeClass??Ws,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(const{start:u,value:f}of r.items){const d=Na(u,{indicator:"seq-item-ind",next:f,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}const h=f?n(t,f,d,i):e(t,d.end,u,null,d,i);t.schema.compat&&Xp(r.indent,f,i),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function jc(n,e,t,r){let i="";if(n){let s=!1,o="";for(const a of n){const{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=l.substring(1)||" ";i?i+=o+u:i=u,o="";break}case"newline":i&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}const uh="Block collections are not allowed within flow collections",fh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function UP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?Rr:Ws),c=new l(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let O=0;O<r.items.length;++O){const v=r.items[O],{start:b,key:_,sep:C,value:y}=v,w=Na(b,{flow:a,indicator:"explicit-key-ind",next:_??C?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!C&&!y){O===0&&w.comma?i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):O<r.items.length-1&&i(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),w.comment&&(c.comment?c.comment+=`
68
+ `+w.comment:c.comment=w.comment),f=w.end;continue}!o&&t.options.strict&&sc(_)&&i(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0)w.comma&&i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(w.comma||i(w.start,"MISSING_CHAR",`Missing , between ${a} items`),w.comment){let S="";e:for(const A of b)switch(A.type){case"comma":case"space":break;case"comment":S=A.source.substring(1);break e;default:break e}if(S){let A=c.items[c.items.length-1];gn(A)&&(A=A.value??A.key),A.comment?A.comment+=`
69
+ `+S:A.comment=S,w.comment=w.comment.substring(S.length+1)}}if(!o&&!C&&!w.found){const S=y?n(t,y,w,i):e(t,w.end,C,null,w,i);c.items.push(S),f=S.range[2],fh(y)&&i(S.range,"BLOCK_IN_FLOW",uh)}else{t.atKey=!0;const S=w.end,A=_?n(t,_,w,i):e(t,S,b,null,w,i);fh(_)&&i(A.range,"BLOCK_IN_FLOW",uh),t.atKey=!1;const x=Na(C??[],{flow:a,indicator:"map-value-ind",next:y,offset:A.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(x.found){if(!o&&!w.found&&t.options.strict){if(C)for(const T of C){if(T===x.found)break;if(T.type==="newline"){i(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<x.found.offset-1024&&i(x.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else y&&("source"in y&&y.source?.[0]===":"?i(y,"MISSING_CHAR",`Missing space after : in ${a}`):i(x.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const k=y?n(t,y,x,i):x.found?e(t,x.end,C,null,x,i):null;k?fh(y)&&i(k.range,"BLOCK_IN_FLOW",uh):x.comment&&(A.comment?A.comment+=`
70
+ `+x.comment:A.comment=x.comment);const E=new er(A,k);if(t.options.keepSourceTokens&&(E.srcToken=v),o){const T=c;T_(t,T.items,A)&&i(S,"DUPLICATE_KEY","Map keys must be unique"),T.items.push(E)}else{const T=new Rr(t.schema);T.flow=!0,T.items.push(E);const $=(k??A).range;T.range=[A.range[0],$[1],$[2]],c.items.push(T)}f=k?k.range[2]:x.end}}const d=o?"}":"]",[h,...m]=r.end;let p=f;if(h?.source===d)p=h.offset+h.source.length;else{const O=a[0].toUpperCase()+a.substring(1),v=u?`${O} must end with a ${d}`:`${O} in block collection must be sufficiently indented and end with a ${d}`;i(f,u?"MISSING_CHAR":"BAD_INDENT",v),h&&h.source.length!==1&&m.unshift(h)}if(m.length>0){const O=jc(m,p,t.options.strict,i);O.comment&&(c.comment?c.comment+=`
71
+ `+O.comment:c.comment=O.comment),c.range=[r.offset,p,O.offset]}else c.range=[r.offset,p,p];return c}function dh(n,e,t,r,i,s){const o=t.type==="block-map"?WP(n,e,t,r,s):t.type==="block-seq"?YP(n,e,t,r,s):UP(n,e,t,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function GP(n,e,t,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){const{anchor:d,newlineAfterProp:h}=r,m=d&&s?d.offset>s.offset?d:s:d??s;m&&(!h||h.offset<m.offset)&&i(m,"MISSING_CHAR","Missing newline after block sequence props")}const a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===Rr.tagName&&a==="map"||o===Ws.tagName&&a==="seq")return dh(n,e,t,i,o);let l=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){const d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),dh(n,e,t,i,o)}const c=dh(n,e,t,i,o,l),u=l.resolve?.(c,d=>i(s,"TAG_RESOLVE_FAILED",d),e.options)??c,f=yn(u)?u:new ft(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function P_(n,e,t){const r=e.offset,i=HP(e,n.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?ft.BLOCK_FOLDED:ft.BLOCK_LITERAL,o=e.source?KP(e.source):[];let a=o.length;for(let p=o.length-1;p>=0;--p){const O=o[p][1];if(O===""||O==="\r")a=p;else break}if(a===0){const p=i.chomp==="+"&&o.length>0?`
72
+ `.repeat(Math.max(1,o.length-1)):"";let O=r+i.length;return e.source&&(O+=e.source.length),{value:p,type:s,comment:i.comment,range:[r,O,O]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let p=0;p<a;++p){const[O,v]=o[p];if(v===""||v==="\r")i.indent===0&&O.length>l&&(l=O.length);else{O.length<l&&t(c+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=O.length),u=p,l===0&&!n.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=O.length+v.length+1}for(let p=o.length-1;p>=a;--p)o[p][0].length>l&&(a=p+1);let f="",d="",h=!1;for(let p=0;p<u;++p)f+=o[p][0].slice(l)+`
73
+ `;for(let p=u;p<a;++p){let[O,v]=o[p];c+=O.length+v.length+1;const b=v[v.length-1]==="\r";if(b&&(v=v.slice(0,-1)),v&&O.length<l){const C=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-v.length-(b?2:1),"BAD_INDENT",C),O=""}s===ft.BLOCK_LITERAL?(f+=d+O.slice(l)+v,d=`
74
+ `):O.length>l||v[0]===" "?(d===" "?d=`
75
+ `:!h&&d===`
76
+ `&&(d=`
77
+
78
+ `),f+=d+O.slice(l)+v,d=`
79
+ `,h=!0):v===""?d===`
80
+ `?f+=`
81
+ `:d=`
82
+ `:(f+=d+v,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let p=a;p<o.length;++p)f+=`
83
+ `+o[p][0].slice(l);f[f.length-1]!==`
84
+ `&&(f+=`
85
+ `);break;default:f+=`
86
+ `}const m=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,m,m]}}function HP({offset:n,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",l=-1;for(let d=1;d<i.length;++d){const h=i[d];if(!a&&(h==="-"||h==="+"))a=h;else{const m=Number(h);!o&&m?o=m:l===-1&&(l=n+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let d=1;d<e.length;++d){const h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":t&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{const m=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",m);const p=h.source;p&&typeof p=="string"&&(f+=p.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function KP(n){const e=n.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r?.[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function E_(n,e,t){const{offset:r,type:i,source:s,end:o}=n;let a,l;const c=(d,h,m)=>t(r+d,h,m);switch(i){case"scalar":a=ft.PLAIN,l=JP(s,c);break;case"single-quoted-scalar":a=ft.QUOTE_SINGLE,l=eE(s,c);break;case"double-quoted-scalar":a=ft.QUOTE_DOUBLE,l=tE(s,c);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const u=r+s.length,f=jc(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function JP(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),$_(n)}function eE(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),$_(n.slice(1,-1)).replace(/''/g,"'")}function $_(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
87
+ `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
88
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let i=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(n);)r[1]===""?s===`
89
+ `?i+=s:s=`
90
+ `:(i+=s+r[1],s=" "),o=t.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(n),i+s+(r?.[1]??"")}function tE(n,e){let t="";for(let r=1;r<n.length-1;++r){const i=n[r];if(!(i==="\r"&&n[r+1]===`
91
+ `))if(i===`
92
+ `){const{fold:s,offset:o}=nE(n,r);t+=s,r=o}else if(i==="\\"){let s=n[++r];const o=rE[s];if(o)t+=o;else if(s===`
93
+ `)for(s=n[r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="\r"&&n[r+1]===`
94
+ `)for(s=n[++r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];t+=iE(n,r+1,a,e),r+=a}else{const a=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){const s=r;let o=n[r+1];for(;o===" "||o===" ";)o=n[++r+1];o!==`
95
+ `&&!(o==="\r"&&n[r+2]===`
96
+ `)&&(t+=r>s?n.slice(s,r+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function nE(n,e){let t="",r=n[e+1];for(;(r===" "||r===" "||r===`
97
+ `||r==="\r")&&!(r==="\r"&&n[e+2]!==`
98
+ `);)r===`
99
+ `&&(t+=`
100
+ `),e+=1,r=n[e+1];return t||(t=" "),{fold:t,offset:e}}const rE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
101
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iE(n,e,t,r){const i=n.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=n.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function Q_(n,e,t,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?P_(n,e,r):E_(e,n.options.strict,r),l=t?n.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null;let c;n.options.stringKeys&&n.atKey?c=n.schema[Yi]:l?c=sE(n.schema,i,l,t,r):e.type==="scalar"?c=oE(n,i,e,r):c=n.schema[Yi];let u;try{const f=c.resolve(i,d=>r(t??e,"TAG_RESOLVE_FAILED",d),n.options);u=on(f)?f:new ft(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(t??e,"TAG_RESOLVE_FAILED",d),u=new ft(i)}return u.range=a,u.source=i,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function sE(n,e,t,r,i){if(t==="!")return n[Yi];const s=[];for(const a of n.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[Yi])}function oE({atKey:n,directives:e,schema:t},r,i,s){const o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(r))||t[Yi];if(t.compat){const a=t.compat.find(l=>l.default&&l.test?.test(r))??t[Yi];if(o.tag!==a.tag){const l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;s(i,"TAG_RESOLVE_FAILED",u,!0)}}return o}function aE(n,e,t){if(e){t??(t=e.length);for(let r=t-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++r];i?.type==="space";)n+=i.source.length,i=e[++r];break}}return n}const lE={composeNode:L_,composeEmptyNode:oO};function L_(n,e,t,r){const i=n.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t;let c,u=!0;switch(e.type){case"alias":c=cE(n,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Q_(n,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=GP(lE,n,e,t,r),a&&(c.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=oO(n,e.offset,void 0,null,t,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&n.options.stringKeys&&(!on(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),n.options.keepSourceTokens&&u&&(c.srcToken=e),c}function oO(n,e,t,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},c){const u={type:"scalar",offset:aE(e,t,r),indent:-1,source:""},f=Q_(n,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function cE({options:n},{offset:e,source:t,end:r},i){const s=new Sd(t.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,a=jc(r,o,n.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function uE(n,e,{offset:t,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},n),l=new al(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=Na(r,{indicator:"doc-start",next:i??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?L_(c,i,u,o):oO(c,u.end,r,null,u,o);const f=l.contents.range[2],d=jc(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[t,f,d.offset],l}function gl(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function gb(n){let e="",t=!1,r=!1;for(let i=0;i<n.length;++i){const s=n[i];switch(s[0]){case"#":e+=(e===""?"":r?`
102
+
103
+ `:`
104
+ `)+(s.substring(1)||" "),t=!0,r=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}class aO{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,i,s)=>{const o=gl(t);s?this.warnings.push(new C_(o,r,i)):this.errors.push(new _o(o,r,i))},this.directives=new ir({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:i}=gb(this.prelude);if(r){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}
105
+ ${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(vn(s)&&!s.flow&&s.items.length>0){let o=s.items[0];gn(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
106
+ ${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}
107
+ ${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:gb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,i)=>{const s=gl(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=uE(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new _o(gl(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new _o(gl(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const t=jc(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
108
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new _o(gl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new al(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function fE(n,e=!0,t){if(n){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,s,o);else throw new _o([a,a+1],s,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return E_(n,e,r);case"block-scalar":return P_({options:{strict:e}},n,r)}}return null}function dE(n,e){const{implicitKey:t=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=Nc({type:o,value:n},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:r,source:`
109
+ `}];switch(a[0]){case"|":case">":{const c=a.indexOf(`
110
+ `),u=a.substring(0,c),f=a.substring(c+1)+`
111
+ `,d=[{type:"block-scalar-header",offset:s,indent:r,source:u}];return M_(d,l)||d.push({type:"newline",offset:-1,indent:r,source:`
112
+ `}),{type:"block-scalar",offset:s,indent:r,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function hE(n,e,t={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=t,a="indent"in n?n.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=n.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=Nc({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":pE(n,l);break;case'"':hh(n,l,"double-quoted-scalar");break;case"'":hh(n,l,"single-quoted-scalar");break;default:hh(n,l,"scalar")}}function pE(n,e){const t=e.indexOf(`
113
+ `),r=e.substring(0,t),i=e.substring(t+1)+`
114
+ `;if(n.type==="block-scalar"){const s=n.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,n.source=i}else{const{offset:s}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];M_(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
115
+ `});for(const l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:i})}}function M_(n,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function hh(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{const r=n.props.slice(1);let i=e.length;n.props[0].type==="block-scalar-header"&&(i-=n.props[0].source.length);for(const s of r)s.offset+=i;delete n.props,Object.assign(n,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
116
+ `};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{const r="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(n))s!=="type"&&s!=="offset"&&delete n[s];Object.assign(n,{type:t,indent:r,source:e,end:i})}}}const mE=n=>"type"in n?xf(n):Ju(n);function xf(n){switch(n.type){case"block-scalar":{let e="";for(const t of n.props)e+=xf(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(const t of n.items)e+=Ju(t);return e}case"flow-collection":{let e=n.start.source;for(const t of n.items)e+=Ju(t);for(const t of n.end)e+=t.source;return e}case"document":{let e=Ju(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function Ju({start:n,key:e,sep:t,value:r}){let i="";for(const s of n)i+=s.source;if(e&&(i+=xf(e)),t)for(const s of t)i+=s.source;return r&&(i+=xf(r)),i}const Fp=Symbol("break visit"),gE=Symbol("skip children"),D_=Symbol("remove item");function qo(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),q_(Object.freeze([]),n,e)}qo.BREAK=Fp;qo.SKIP=gE;qo.REMOVE=D_;qo.itemAtPath=(n,e)=>{let t=n;for(const[r,i]of e){const s=t?.[r];if(s&&"items"in s)t=s.items[i];else return}return t};qo.parentCollection=(n,e)=>{const t=qo.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],i=t?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function q_(n,e,t){let r=t(e,n);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=q_(Object.freeze(n.concat([[i,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Fp)return Fp;a===D_&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const Md="\uFEFF",Dd="",qd="",oc="",OE=n=>!!n&&"items"in n,vE=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function bE(n){switch(n){case Md:return"<BOM>";case Dd:return"<DOC>";case qd:return"<FLOW_END>";case oc:return"<SCALAR>";default:return JSON.stringify(n)}}function R_(n){switch(n){case Md:return"byte-order-mark";case Dd:return"doc-mode";case qd:return"flow-error-end";case oc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
117
+ `:case`\r
118
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const yE=Object.freeze(Object.defineProperty({__proto__:null,BOM:Md,DOCUMENT:Dd,FLOW_END:qd,SCALAR:oc,createScalarToken:dE,isCollection:OE,isScalar:vE,prettyToken:bE,resolveAsScalar:fE,setScalarValue:hE,stringify:mE,tokenType:R_,visit:qo},Symbol.toStringTag,{value:"Module"}));function ci(n){switch(n){case void 0:case" ":case`
119
+ `:case"\r":case" ":return!0;default:return!1}}const Ob=new Set("0123456789ABCDEFabcdef"),wE=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),su=new Set(",[]{}"),_E=new Set(` ,[]{}
120
+ \r `),ph=n=>!n||_E.has(n);class I_{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
121
+ `?!0:t==="\r"?this.buffer[e+1]===`
122
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){const i=this.buffer[r+e+1];if(i===`
123
+ `||!i&&!this.atEnd)return e+r+1}return t===`
124
+ `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ci(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
125
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Md&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){const s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const s=e[t-1];if(s===" "||s===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Dd,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&ci(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ci(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ci(t)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ph),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&ci(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield qd,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ph),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||ci(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let i=r.indexOf(`
126
+ `,this.pos);if(i!==-1){for(;i!==-1;){const s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
127
+ `,s)}i!==-1&&(t=i-(r[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>ci(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
128
+ `:e=s,t=0;break;case"\r":{const o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
129
+ `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
130
+ `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
131
+ `;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);const a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
132
+ `&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield oc,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(ci(s)||e&&su.has(s))break;t=r}else if(ci(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
133
+ `?(r+=1,i=`
134
+ `,s=this.buffer[r+1]):t=r),s==="#"||e&&su.has(s))break;if(i===`
135
+ `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&su.has(i))break;t=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield oc,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(ph))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(ci(t)||e&&su.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!ci(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(wE.has(t))t=this.buffer[++e];else if(t==="%"&&Ob.has(this.buffer[e+1])&&Ob.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
136
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
137
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class N_{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function Qs(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function vb(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function B_(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ou(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function ea(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function bb(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Qs(e.start,"explicit-key-ind")&&!Qs(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,B_(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}let lO=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new I_,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=R_(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&bb(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&vb(i.start)===-1&&(t.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{vb(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=ou(this.peek(2)),r=ea(t);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
138
+ `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
139
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,i=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;a<t.sep.length;++a){const l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Qs(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(B_(t.key)&&!Qs(t.sep,"newline")){const o=ea(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Qs(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=ea(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Qs(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Qs(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Qs(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=ou(r),s=ea(i);bb(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
140
+ `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
141
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=ou(e),r=ea(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=ou(e),r=ea(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function j_(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new N_||null,prettyErrors:e}}function kE(n,e={}){const{lineCounter:t,prettyErrors:r}=j_(e),i=new lO(t?.addNewLine),s=new aO(e),o=Array.from(s.compose(i.parse(n)));if(r&&t)for(const a of o)a.errors.forEach(kf(n,t)),a.warnings.forEach(kf(n,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function z_(n,e={}){const{lineCounter:t,prettyErrors:r}=j_(e),i=new lO(t?.addNewLine),s=new aO(e);let o=null;for(const a of s.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new _o(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(kf(n,t)),o.warnings.forEach(kf(n,t))),o}function xE(n,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=z_(n,t);if(!i)return null;if(i.warnings.forEach(s=>o_(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},t))}function SE(n,e,t){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){const{keepUndefined:i}=t??e??{};if(!i)return}return Vo(n)&&!r?n.toString(t):new al(n,r,t).toString(t)}const Sf=Object.freeze(Object.defineProperty({__proto__:null,Alias:Sd,CST:yE,Composer:aO,Document:al,Lexer:I_,LineCounter:N_,Pair:er,Parser:lO,Scalar:ft,Schema:S_,YAMLError:sO,YAMLMap:Rr,YAMLParseError:_o,YAMLSeq:Ws,YAMLWarning:C_,isAlias:no,isCollection:vn,isDocument:Vo,isMap:rl,isNode:yn,isPair:gn,isScalar:on,isSeq:il,parse:xE,parseAllDocuments:kE,parseDocument:z_,stringify:SE,visit:Wo,visitAsync:xd},Symbol.toStringTag,{value:"Module"}));function AE(n){const e=n.match(/^---\r?\n([\s\S]*?\r?\n)?---\r?\n?([\s\S]*)$/);if(!e)return{frontmatter:{},body:n};const t=Sf.parse(e[1]??"")??{},r=e[2];return{frontmatter:t,body:r}}function mh(n,e){return Object.keys(n).length===0?e:`---
142
+ ${Sf.stringify(n,{lineWidth:0}).trimEnd()}
143
+ ---
144
+ ${e}`}let CE=class{#e=K(null);get tree(){return g(this.#e)}set tree(e){M(this.#e,e,!0)}#r=K(null);get currentPath(){return g(this.#r)}set currentPath(e){M(this.#r,e,!0)}#t=K("");get savedContent(){return g(this.#t)}set savedContent(e){M(this.#t,e,!0)}#i=K("");get editorContent(){return g(this.#i)}set editorContent(e){M(this.#i,e,!0)}#a=K(tn({}));get frontmatter(){return g(this.#a)}set frontmatter(e){M(this.#a,e,!0)}#s=K("");get bodyContent(){return g(this.#s)}set bodyContent(e){M(this.#s,e,!0)}#n=K(!1);get frontmatterOpen(){return g(this.#n)}set frontmatterOpen(e){M(this.#n,e,!0)}#o=K(!1);get frontmatterRawMode(){return g(this.#o)}set frontmatterRawMode(e){M(this.#o,e,!0)}#l=K("blocks");get editorMode(){return g(this.#l)}set editorMode(e){M(this.#l,e,!0)}#c=K(!1);get treeLoading(){return g(this.#c)}set treeLoading(e){M(this.#c,e,!0)}#u=K(!1);get fileLoading(){return g(this.#u)}set fileLoading(e){M(this.#u,e,!0)}#f=K(!1);get saving(){return g(this.#f)}set saving(e){M(this.#f,e,!0)}#p=K(!1);get saveJustCompleted(){return g(this.#p)}set saveJustCompleted(e){M(this.#p,e,!0)}#h=K(null);get error(){return g(this.#h)}set error(e){M(this.#h,e,!0)}#m=K(tn([]));get runes(){return g(this.#m)}set runes(e){M(this.#m,e,!0)}#g=K(tn([]));get routeRules(){return g(this.#g)}set routeRules(e){M(this.#g,e,!0)}#d=K("desktop");get viewport(){return g(this.#d)}set viewport(e){M(this.#d,e,!0)}#w=K("light");get previewTheme(){return g(this.#w)}set previewTheme(e){M(this.#w,e,!0)}#_=K("");get themeCss(){return g(this.#_)}set themeCss(e){M(this.#_,e,!0)}#k=K(null);get themeConfig(){return g(this.#k)}set themeConfig(e){M(this.#k,e,!0)}#b=K(null);get highlightTransform(){return g(this.#b)}set highlightTransform(e){M(this.#b,e,!0)}#O=K("");get highlightCss(){return g(this.#O)}set highlightCss(e){M(this.#O,e,!0)}#v=K(!1);get previewRuntimeAvailable(){return g(this.#v)}set previewRuntimeAvailable(e){M(this.#v,e,!0)}#y=K(!1);get previewRuntimeReady(){return g(this.#y)}set previewRuntimeReady(e){M(this.#y,e,!0)}#x=K(tn(new Set));get expandedDirs(){return g(this.#x)}set expandedDirs(e){M(this.#x,e,!0)}#S=K(null);get externalChange(){return g(this.#S)}set externalChange(e){M(this.#S,e,!0)}#A=K(null);get communityTags(){return g(this.#A)}set communityTags(e){M(this.#A,e,!0)}#C=K(null);get communityPostTransforms(){return g(this.#C)}set communityPostTransforms(e){M(this.#C,e,!0)}#T=K(null);get communityStyles(){return g(this.#T)}set communityStyles(e){M(this.#T,e,!0)}#P=K(tn({}));get aggregated(){return g(this.#P)}set aggregated(e){M(this.#P,e,!0)}#E=K(!0);get sidenavOpen(){return g(this.#E)}set sidenavOpen(e){M(this.#E,e,!0)}#$=me(()=>this.editorContent!==this.savedContent);get dirty(){return g(this.#$)}set dirty(e){M(this.#$,e)}#Q=me(()=>this.currentPath?.endsWith("_layout.md")?"layout":"page");get currentFileType(){return g(this.#Q)}set currentFileType(e){M(this.#Q,e)}loadFile(e,t){const{frontmatter:r,body:i}=AE(t);this.currentPath=e,this.savedContent=t,this.editorContent=t,this.frontmatter=r,this.bodyContent=i,this.frontmatterRawMode=!1}updateBody(e){this.bodyContent=e,this.editorContent=mh(this.frontmatter,e)}updateFrontmatterField(e,t){if(t===void 0||t===""||Array.isArray(t)&&t.length===0){const{[e]:r,...i}=this.frontmatter;this.frontmatter=i}else this.frontmatter={...this.frontmatter,[e]:t};this.editorContent=mh(this.frontmatter,this.bodyContent)}replaceFrontmatter(e){this.frontmatter=e,this.editorContent=mh(e,this.bodyContent)}toggleDir(e){const t=new Set(this.expandedDirs);t.has(e)?t.delete(e):t.add(e),this.expandedDirs=t}isDirExpanded(e){return this.expandedDirs.has(e)}};const X=new CE;var TE=V('<div class="header__group svelte-1q0qpei"><button>Edit</button> <button>Preview</button></div>'),PE=V('<span class="header__sep svelte-1q0qpei">/</span>'),EE=V('<span class="header__crumb header__crumb--current svelte-1q0qpei"><svg class="header__doc-icon svelte-1q0qpei" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z" class="svelte-1q0qpei"></path><polyline points="9 1.5 9 6 13.5 6" class="svelte-1q0qpei"></polyline></svg> </span>'),$E=V('<span class="header__crumb svelte-1q0qpei"> </span>'),QE=V("<!> <!>",1),LE=V('<span class="header__dot svelte-1q0qpei" title="Unsaved changes"></span>'),ME=V('<nav class="header__breadcrumbs svelte-1q0qpei" aria-label="File path"><!> <!></nav>'),DE=V('<span class="header__error svelte-1q0qpei"> </span>'),qE=V('<div class="header__group svelte-1q0qpei"><button title="Desktop"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="1.5" y="2" width="13" height="9" rx="1" class="svelte-1q0qpei"></rect><line x1="5.5" y1="14" x2="10.5" y2="14" class="svelte-1q0qpei"></line><line x1="8" y1="11" x2="8" y2="14" class="svelte-1q0qpei"></line></svg></button> <button title="Tablet"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="3" y="1.5" width="10" height="13" rx="1.5" class="svelte-1q0qpei"></rect><line x1="7" y1="12.5" x2="9" y2="12.5" class="svelte-1q0qpei"></line></svg></button> <button title="Mobile"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="4" y="1.5" width="8" height="13" rx="2" class="svelte-1q0qpei"></rect><line x1="7" y1="12.5" x2="9" y2="12.5" class="svelte-1q0qpei"></line></svg></button></div> <span class="header__divider svelte-1q0qpei"></span> <div class="header__group svelte-1q0qpei"><button title="Light mode"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><circle cx="8" cy="8" r="3" class="svelte-1q0qpei"></circle><line x1="8" y1="1.5" x2="8" y2="3" class="svelte-1q0qpei"></line><line x1="8" y1="13" x2="8" y2="14.5" class="svelte-1q0qpei"></line><line x1="2.4" y1="2.4" x2="3.5" y2="3.5" class="svelte-1q0qpei"></line><line x1="12.5" y1="12.5" x2="13.6" y2="13.6" class="svelte-1q0qpei"></line><line x1="1.5" y1="8" x2="3" y2="8" class="svelte-1q0qpei"></line><line x1="13" y1="8" x2="14.5" y2="8" class="svelte-1q0qpei"></line><line x1="2.4" y1="13.6" x2="3.5" y2="12.5" class="svelte-1q0qpei"></line><line x1="12.5" y1="3.5" x2="13.6" y2="2.4" class="svelte-1q0qpei"></line></svg></button> <button title="Dark mode"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><path d="M13.5 8.5a5.5 5.5 0 0 1-7-7 5.5 5.5 0 1 0 7 7Z" class="svelte-1q0qpei"></path></svg></button></div>',1),RE=V('<div class="header__group svelte-1q0qpei"><button>Code</button> <button>Blocks</button></div>'),IE=ws('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><polyline points="3.5 8.5 6.5 11.5 12.5 4.5" class="svelte-1q0qpei"></polyline></svg> Saved',1),NE=V('<button><!> <kbd class="header__kbd svelte-1q0qpei"></kbd></button>'),BE=V('<header class="header svelte-1q0qpei"><button class="header__sidebar-toggle svelte-1q0qpei"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="1.5" y="2.5" width="13" height="11" rx="1.5" class="svelte-1q0qpei"></rect><line x1="5.5" y1="2.5" x2="5.5" y2="13.5" class="svelte-1q0qpei"></line></svg></button> <!> <!> <!> <div class="header__spacer svelte-1q0qpei"></div> <!> <!></header>');function jE(n,e){Ot(e,!0);let t=me(()=>X.currentPath?X.currentPath.split("/"):[]);const r=me(()=>X.currentPath&&X.currentFileType!=="layout"),i=me(()=>X.editorMode==="preview"),s=me(()=>X.editorMode==="blocks"||X.editorMode==="code");var o=BE(),a=q(o);a.__click=()=>{X.sidenavOpen=!X.sidenavOpen};var l=R(a,2);{var c=b=>{var _=TE(),C=q(_);let y;C.__click=()=>{X.editorMode="blocks"};var w=R(C,2);let S;w.__click=()=>{X.editorMode="preview"},fe(()=>{y=Ze(C,1,"header__btn svelte-1q0qpei",null,y,{"header__btn--active":g(s)}),S=Ze(w,1,"header__btn svelte-1q0qpei",null,S,{"header__btn--active":g(i)})}),z(b,_)};ue(l,b=>{g(r)&&b(c)})}var u=R(l,2);{var f=b=>{var _=ME(),C=q(_);$t(C,17,()=>g(t),Kt,(S,A,x)=>{var k=QE(),E=ot(k);{var T=D=>{var I=PE();z(D,I)};ue(E,D=>{x>0&&D(T)})}var $=R(E,2);{var L=D=>{var I=EE(),W=R(q(I));fe(()=>Te(W,` ${g(A)??""}`)),z(D,I)},P=D=>{var I=$E(),W=q(I);fe(()=>Te(W,g(A))),z(D,I)};ue($,D=>{x===g(t).length-1?D(L):D(P,!1)})}z(S,k)});var y=R(C,2);{var w=S=>{var A=LE();z(S,A)};ue(y,S=>{X.dirty&&S(w)})}z(b,_)};ue(u,b=>{X.currentPath&&b(f)})}var d=R(u,2);{var h=b=>{var _=DE(),C=q(_);fe(()=>Te(C,X.error)),z(b,_)};ue(d,b=>{X.error&&b(h)})}var m=R(d,4);{var p=b=>{var _=un(),C=ot(_);{var y=S=>{var A=qE(),x=ot(A),k=q(x);let E;k.__click=()=>X.viewport="desktop";var T=R(k,2);let $;T.__click=()=>X.viewport="tablet";var L=R(T,2);let P;L.__click=()=>X.viewport="mobile";var D=R(x,4),I=q(D);let W;I.__click=()=>X.previewTheme="light";var U=R(I,2);let ae;U.__click=()=>X.previewTheme="dark",fe(()=>{E=Ze(k,1,"header__btn header__btn--icon svelte-1q0qpei",null,E,{"header__btn--active":X.viewport==="desktop"}),$=Ze(T,1,"header__btn header__btn--icon svelte-1q0qpei",null,$,{"header__btn--active":X.viewport==="tablet"}),P=Ze(L,1,"header__btn header__btn--icon svelte-1q0qpei",null,P,{"header__btn--active":X.viewport==="mobile"}),W=Ze(I,1,"header__btn header__btn--icon svelte-1q0qpei",null,W,{"header__btn--active":X.previewTheme==="light"}),ae=Ze(U,1,"header__btn header__btn--icon svelte-1q0qpei",null,ae,{"header__btn--active":X.previewTheme==="dark"})}),z(S,A)},w=S=>{var A=RE(),x=q(A);let k;x.__click=()=>{X.editorMode="code"};var E=R(x,2);let T;E.__click=()=>{X.editorMode="blocks"},fe(()=>{k=Ze(x,1,"header__btn svelte-1q0qpei",null,k,{"header__btn--active":X.editorMode==="code"}),T=Ze(E,1,"header__btn svelte-1q0qpei",null,T,{"header__btn--active":X.editorMode==="blocks"})}),z(S,A)};ue(C,S=>{g(i)?S(y):g(s)&&S(w,1)})}z(b,_)};ue(m,b=>{g(r)&&b(p)})}var O=R(m,2);{var v=b=>{var _=NE();let C;_.__click=function(...k){e.onsave?.apply(this,k)};var y=q(_);{var w=k=>{var E=IE();z(k,E)},S=k=>{var E=rb("Saving...");z(k,E)},A=k=>{var E=rb("Save");z(k,E)};ue(y,k=>{X.saveJustCompleted?k(w):X.saving?k(S,1):k(A,!1)})}var x=R(y,2);x.textContent=`${navigator.platform.includes("Mac")?"⌘":"Ctrl"}S`,fe(()=>{C=Ze(_,1,"header__btn header__btn--active svelte-1q0qpei",null,C,{"header__btn--success":X.saveJustCompleted}),_.disabled=!X.dirty||X.saving}),z(b,_)};ue(O,b=>{X.currentPath&&b(v)})}fe(()=>Et(a,"title",X.sidenavOpen?"Hide sidebar":"Show sidebar")),z(n,o),vt()}Gt(["click"]);var zE=V('<div><div class="layout__left svelte-c9ce7p"><!></div> <div class="layout__main svelte-c9ce7p"><div class="layout__header svelte-c9ce7p"><!></div> <div class="layout__content svelte-c9ce7p"><div class="layout__panel layout__panel--center svelte-c9ce7p"><div><!></div></div> <div class="layout__panel layout__panel--right svelte-c9ce7p"><!></div></div></div></div>');function ZE(n,e){Ot(e,!0);let t=K(0),r=me(()=>X.editorMode==="code"?"1fr 1fr":"0px 1fr");const i=me(()=>Math.floor(Math.max(0,g(t))/2));var s=zE();let o;var a=q(s);Ar(a,"width: 360px");var l=q(a);da(l,()=>e.left);var c=R(a,2),u=q(c),f=q(u);da(f,()=>e.header);var d=R(u,2),h=q(d),m=q(h);let p;var O=q(m);da(O,()=>e.center);var v=R(h,2),b=q(v);da(b,()=>e.right),fe(()=>{o=Ze(s,1,"layout svelte-c9ce7p",null,o,{"layout--sidenav-closed":!X.sidenavOpen}),Ar(d,`grid-template-columns: ${g(r)??""}`),p=Ze(m,1,"layout__center-inner svelte-c9ce7p",null,p,{"slide-out":X.editorMode!=="code"}),Ar(m,`min-width: ${g(i)??""}px`)}),hP(c,"clientWidth",_=>M(t,_)),z(n,s),vt()}var XE=ws('<svg class="tree-dir__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13z"></path><path d="M1.5 4v-1.5h4.5l1.5 1.5"></path></svg>'),FE=ws('<svg class="tree-dir__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13V2.5h4.5l1.5 1.5"></path></svg>'),VE=V('<button class="tree-dir__add svelte-150vzea"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),WE=V('<div class="tree-dir svelte-150vzea" role="treeitem" tabindex="0"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 4 10 8 6 12"></polyline></svg> <!> <span class="tree-dir__name svelte-150vzea"> </span> <!></div>'),YE=V('<button><svg class="tree-item__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="1.5" width="13" height="13" rx="1.5"></rect><line x1="1.5" y1="5.5" x2="14.5" y2="5.5"></line><line x1="6" y1="5.5" x2="6" y2="14.5"></line></svg> <span class="tree-item__name svelte-150vzea">_layout.md</span></button>'),UE=V('<span class="tree-item__badge svelte-150vzea">Draft</span>'),GE=V('<button><svg class="tree-item__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z"></path><polyline points="9 1.5 9 6 13.5 6"></polyline></svg> <span class="tree-item__name svelte-150vzea"> </span> <!></button>'),HE=V("<!> <!>",1),KE=V("<!> <!>",1);function Vp(n,e){Ot(e,!0);function t(c,u){e.oncontextmenu&&(c.preventDefault(),e.oncontextmenu(c,u))}function r(c){e.onselectfile(c)}function i(){X.toggleDir(e.node.path||e.node.name)}let s=me(()=>X.isDirExpanded(e.node.path||e.node.name));var o=un(),a=ot(o);{var l=c=>{var u=KE(),f=ot(u);{var d=p=>{var O=WE();O.__click=i,O.__keydown=k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i())},O.__contextmenu=k=>t(k,e.node);var v=q(O);let b;var _=R(v,2);{var C=k=>{var E=XE();z(k,E)},y=k=>{var E=FE();z(k,E)};ue(_,k=>{g(s)?k(C):k(y,!1)})}var w=R(_,2),S=q(w),A=R(w,2);{var x=k=>{var E=VE();E.__click=T=>{T.stopPropagation(),e.onnewpage(e.node.path,T.currentTarget.getBoundingClientRect())},fe(()=>Et(E,"title",`New page in ${e.node.name??""}`)),z(k,E)};ue(A,k=>{e.onnewpage&&k(x)})}fe(()=>{Ar(O,`--depth: ${e.depth-1}`),b=Ze(v,0,"tree-dir__chevron svelte-150vzea",null,b,{collapsed:!g(s)}),Te(S,e.node.name)}),z(p,O)};ue(f,p=>{e.depth>0&&p(d)})}var h=R(f,2);{var m=p=>{var O=HE(),v=ot(O);{var b=C=>{var y=YE();let w;y.__click=()=>r(e.node.layout.path),y.__contextmenu=S=>t(S,e.node.layout),fe(()=>{w=Ze(y,1,"tree-item tree-item--layout svelte-150vzea",null,w,{active:X.currentPath===e.node.layout.path}),Ar(y,`--depth: ${e.depth??""}`)}),z(C,y)};ue(v,C=>{e.node.layout&&C(b)})}var _=R(v,2);$t(_,17,()=>e.node.children??[],Kt,(C,y)=>{var w=un(),S=ot(w);{var A=k=>{{let E=me(()=>e.depth+1);Vp(k,{get node(){return g(y)},get depth(){return g(E)},get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})}},x=k=>{var E=GE();let T;E.__click=()=>r(g(y).path),E.__contextmenu=I=>t(I,g(y));var $=R(q(E),2),L=q($),P=R($,2);{var D=I=>{var W=UE();z(I,W)};ue(P,I=>{g(y).draft&&I(D)})}fe(()=>{T=Ze(E,1,"tree-item svelte-150vzea",null,T,{active:X.currentPath===g(y).path}),Ar(E,`--depth: ${e.depth??""}`),Te(L,g(y).name)}),z(k,E)};ue(S,k=>{g(y).type==="directory"?k(A):k(x,!1)})}z(C,w)}),z(p,O)};ue(h,p=>{(e.depth===0||g(s))&&p(m)})}z(c,u)};ue(a,c=>{e.node.type==="directory"&&c(l)})}z(n,o),vt()}Gt(["click","keydown","contextmenu"]);var JE=V('<div class="cat-nav__skeleton svelte-z46wvt"><div class="skeleton-bar svelte-z46wvt" style="width: 70%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 55%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 85%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 60%; margin-left: 1rem"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 50%; margin-left: 1rem"></div></div>'),e$=V('<span class="tree-item__badge svelte-z46wvt">Draft</span>'),t$=V('<button style="--depth: 0"><svg class="tree-item__icon svelte-z46wvt" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z" class="svelte-z46wvt"></path><polyline points="9 1.5 9 6 13.5 6" class="svelte-z46wvt"></polyline></svg> <span class="tree-item__name svelte-z46wvt"> </span> <!></button>'),n$=V('<div class="cat-nav__empty svelte-z46wvt">No content yet</div>'),r$=V('<div class="cat-nav__section svelte-z46wvt"><div class="cat-nav__section-header svelte-z46wvt"><span class="cat-nav__section-name svelte-z46wvt"> </span> <button class="cat-nav__icon-btn svelte-z46wvt"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="svelte-z46wvt"><line x1="8" y1="3" x2="8" y2="13" class="svelte-z46wvt"></line><line x1="3" y1="8" x2="13" y2="8" class="svelte-z46wvt"></line></svg></button></div> <!></div>'),i$=V('<div class="cat-nav__list svelte-z46wvt"></div>'),s$=V('<nav class="cat-nav svelte-z46wvt"><div class="cat-nav__header svelte-z46wvt"><span class="cat-nav__title svelte-z46wvt">Content</span> <div class="cat-nav__actions svelte-z46wvt"><button class="cat-nav__icon-btn svelte-z46wvt" title="New category"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" class="svelte-z46wvt"><path d="M1 3h5l1.5 1.5H15v10H1V3z" stroke="currentColor" stroke-width="1.2" class="svelte-z46wvt"></path><path d="M8 7.5v3M6.5 9h3" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" class="svelte-z46wvt"></path></svg></button></div></div> <!></nav>');function o$(n,e){Ot(e,!0);function t(d){return d.replace(/\/?\*+$/,"")}function r(d){if(!d)return"Pages";const h=d.split("/").pop();return h.charAt(0).toUpperCase()+h.slice(1)}let i=me(()=>{const d=X.tree,h=X.routeRules;if(!d)return[];const m=[],p=new Set;for(const v of h){const b=t(v.pattern);if(!b)continue;const _=d.children?.find(C=>C.type==="directory"&&C.name===b)??null;p.add(b),m.push({name:r(b),pattern:v.pattern,layout:v.layout,dirPrefix:b,treeNode:_,rootPages:[]})}const O=(d.children??[]).filter(v=>v.type!=="directory"||!p.has(v.name));return m.unshift({name:"Pages",pattern:"**",layout:"default",dirPrefix:"",treeNode:null,rootPages:O}),m});var s=s$(),o=q(s),a=R(q(o),2),l=q(a);l.__click=d=>e.onnewcategory(d.currentTarget.getBoundingClientRect());var c=R(o,2);{var u=d=>{var h=JE();z(d,h)},f=d=>{var h=i$();$t(h,21,()=>g(i),Kt,(m,p)=>{var O=r$(),v=q(O),b=q(v),_=q(b),C=R(b,2);C.__click=x=>{const k=x.currentTarget.getBoundingClientRect();e.onnewpage(g(p).dirPrefix||void 0,k)};var y=R(v,2);{var w=x=>{Vp(x,{get node(){return g(p).treeNode},depth:0,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},S=x=>{var k=un(),E=ot(k);$t(E,17,()=>g(p).rootPages,Kt,(T,$)=>{var L=un(),P=ot(L);{var D=W=>{Vp(W,{get node(){return g($)},depth:1,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},I=W=>{var U=t$();let ae;U.__click=()=>e.onselectfile(g($).path),U.__contextmenu=ie=>{e.oncontextmenu&&(ie.preventDefault(),e.oncontextmenu(ie,g($)))};var ce=R(q(U),2),ne=q(ce),G=R(ce,2);{var oe=ie=>{var j=e$();z(ie,j)};ue(G,ie=>{g($).draft&&ie(oe)})}fe(()=>{ae=Ze(U,1,"tree-item svelte-z46wvt",null,ae,{active:X.currentPath===g($).path}),Te(ne,g($).name)}),z(W,U)};ue(P,W=>{g($).type==="directory"?W(D):W(I,!1)})}z(T,L)}),z(x,k)},A=x=>{var k=n$();z(x,k)};ue(y,x=>{g(p).dirPrefix&&g(p).treeNode?x(w):g(p).dirPrefix?x(A,!1):x(S,1)})}fe(()=>{Te(_,g(p).name),Et(C,"title",`Add to ${g(p).name??""}`)}),z(m,O)}),z(d,h)};ue(c,d=>{X.treeLoading?d(u):d(f,!1)})}z(n,s),vt()}Gt(["click","contextmenu"]);var a$=V('<span class="tags-input__tag svelte-14skhb7"> <button class="tags-input__remove svelte-14skhb7">&times;</button></span>'),l$=V('<div class="tags-input svelte-14skhb7"><!> <input class="tags-input__field svelte-14skhb7" type="text"/></div>');function Z_(n,e){Ot(e,!0);let t=K("");function r(c){const u=c.trim();u&&!e.tags.includes(u)&&e.onchange([...e.tags,u]),M(t,"")}function i(c){e.onchange(e.tags.filter((u,f)=>f!==c))}function s(c){c.key==="Enter"||c.key===","?(c.preventDefault(),r(g(t))):c.key==="Backspace"&&g(t)===""&&e.tags.length>0&&i(e.tags.length-1)}var o=l$(),a=q(o);$t(a,17,()=>e.tags,Kt,(c,u,f)=>{var d=a$(),h=q(d),m=R(h);m.__click=()=>i(f),fe(()=>{Te(h,`${g(u)??""} `),Et(m,"aria-label",`Remove ${g(u)??""}`)}),z(c,d)});var l=R(a,2);l.__keydown=s,fe(()=>Et(l,"placeholder",e.tags.length===0?"Add tags...":"")),ut("blur",l,()=>{g(t).trim()&&r(g(t))}),Qn(l,()=>g(t),c=>M(t,c)),z(n,o),vt()}Gt(["click","keydown"]);var c$=V('<div class="raw-yaml__error svelte-30mbeg"> </div>'),u$=V('<div class="raw-yaml svelte-30mbeg"><textarea></textarea> <!></div>');function f$(n,e){Ot(e,!0);let t=K(""),r=K(null);mn(()=>{if(X.frontmatterRawMode){const u=Object.keys(X.frontmatter);M(t,u.length>0?Sf.stringify(X.frontmatter,{lineWidth:0}).trimEnd():"",!0)}});function i(u){const f=u.target.value;if(M(t,f,!0),M(r,null),f.trim()===""){X.replaceFrontmatter({});return}try{const d=Sf.parse(f);d&&typeof d=="object"?X.replaceFrontmatter(d):M(r,"YAML must be an object")}catch(d){M(r,d instanceof Error?d.message:"Invalid YAML",!0)}}var s=u$(),o=q(s);let a;o.__input=i,Et(o,"spellcheck",!1);var l=R(o,2);{var c=u=>{var f=c$(),d=q(f);fe(()=>Te(d,g(r))),z(u,f)};ue(l,u=>{g(r)&&u(c)})}fe(()=>{a=Ze(o,1,"raw-yaml__editor svelte-30mbeg",null,a,{error:g(r)!==null}),ln(o,g(t))}),z(n,s),vt()}Gt(["input"]);var d$=V('<span class="fm-editor__summary-desc svelte-7izpdj"> </span>'),h$=V('<span class="fm-editor__summary svelte-7izpdj"> <!></span>'),p$=V('<div class="fm-editor__mode-track svelte-7izpdj"><button>Form</button> <button>YAML</button></div>'),m$=V('<div class="fm-field fm-field--custom svelte-7izpdj"><span class="fm-field__label svelte-7izpdj"> </span> <div class="fm-field__custom-row svelte-7izpdj"><input class="fm-field__input svelte-7izpdj" type="text"/> <button class="fm-field__remove svelte-7izpdj">&times;</button></div></div>'),g$=V('<div class="fm-editor__custom-section svelte-7izpdj"><span class="fm-editor__section-label svelte-7izpdj">Custom fields</span> <!></div>'),O$=V('<div class="fm-editor__fields svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Title</span> <input class="fm-field__input svelte-7izpdj" type="text"/></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Description</span> <textarea class="fm-field__textarea svelte-7izpdj"></textarea></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Slug</span> <input class="fm-field__input svelte-7izpdj" type="text" placeholder="auto-derived from filename"/></label> <div class="fm-editor__row svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Author</span> <input class="fm-field__input svelte-7izpdj" type="text"/></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Date</span> <input class="fm-field__input svelte-7izpdj" type="date"/></label></div> <div class="fm-editor__row svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Order</span> <input class="fm-field__input svelte-7izpdj" type="number"/></label> <div class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Draft</span> <div role="switch" tabindex="0"><div class="fm-toggle__track svelte-7izpdj"><div class="fm-toggle__thumb svelte-7izpdj"></div></div> <span class="fm-toggle__label svelte-7izpdj"> </span></div></div></div> <div class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Tags</span> <!></div> <!> <div class="fm-editor__add-field svelte-7izpdj"><input class="fm-field__input svelte-7izpdj" type="text" placeholder="Field name"/> <button class="fm-editor__add-btn svelte-7izpdj">+ Add field</button></div></div>'),v$=V('<div><div class="fm-editor__header svelte-7izpdj" role="button" tabindex="0"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 4 10 8 6 12"></polyline></svg> <span class="fm-editor__label svelte-7izpdj">Frontmatter <!></span> <!></div> <div><div class="fm-editor__collapse-inner svelte-7izpdj"><div class="fm-editor__body svelte-7izpdj"><!></div></div></div></div>');function b$(n,e){Ot(e,!0);let t=Pt(e,"forceRawMode",3,!1);mn(()=>{t()&&(X.frontmatterRawMode=!0)});const r=new Set(["title","description","tags","draft","order","date","author","slug"]);let i=K(""),s=me(()=>Object.entries(X.frontmatter).filter(([p])=>!r.has(p))),o=me(()=>X.currentFileType==="layout"),a=me(()=>X.frontmatter.title||""),l=me(()=>()=>{const p=X.frontmatter.description||"";return p.length>60?p.slice(0,60)+"...":p});function c(p,O){X.updateFrontmatterField(p,O)}function u(){const p=g(i).trim();!p||p in X.frontmatter||(X.updateFrontmatterField(p,""),M(i,""))}function f(p){X.updateFrontmatterField(p,void 0)}var d=un(),h=ot(d);{var m=p=>{var O=v$();let v;var b=q(O);b.__click=()=>{X.frontmatterOpen=!X.frontmatterOpen},b.__keydown=I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),X.frontmatterOpen=!X.frontmatterOpen)};var _=q(b);let C;var y=R(_,2),w=R(q(y));{var S=I=>{var W=h$(),U=q(W),ae=R(U);{var ce=G=>{var oe=d$(),ie=q(oe);fe(j=>Te(ie,`— ${j??""}`),[()=>g(l)()]),z(G,oe)},ne=me(()=>g(l)());ue(ae,G=>{g(ne)&&G(ce)})}fe(()=>Te(U,`${g(a)??""} `)),z(I,W)};ue(w,I=>{!X.frontmatterOpen&&g(a)&&I(S)})}var A=R(y,2);{var x=I=>{var W=p$();W.__click=G=>G.stopPropagation(),W.__keydown=G=>G.stopPropagation();var U=q(W);let ae;U.__click=()=>{X.frontmatterRawMode=!1};var ce=R(U,2);let ne;ce.__click=()=>{X.frontmatterRawMode=!0},fe(()=>{ae=Ze(U,1,"fm-editor__mode-btn svelte-7izpdj",null,ae,{active:!X.frontmatterRawMode}),ne=Ze(ce,1,"fm-editor__mode-btn svelte-7izpdj",null,ne,{active:X.frontmatterRawMode})}),z(I,W)};ue(A,I=>{X.frontmatterOpen&&!t()&&I(x)})}var k=R(b,2);let E;var T=q(k),$=q(T),L=q($);{var P=I=>{f$(I,{})},D=I=>{var W=O$(),U=q(W),ae=R(q(U),2);ae.__input=ke=>c("title",ke.target.value);var ce=R(U,2),ne=R(q(ce),2);ne.__input=ke=>c("description",ke.target.value),Et(ne,"rows",2);var G=R(ce,2),oe=R(q(G),2);oe.__input=ke=>c("slug",ke.target.value);var ie=R(G,2),j=q(ie),te=R(q(j),2);te.__input=ke=>c("author",ke.target.value);var _e=R(j,2),Ee=R(q(_e),2);Ee.__input=ke=>c("date",ke.target.value);var Re=R(ie,2),ge=q(Re),Ce=R(q(ge),2);Ce.__input=ke=>{const Ft=ke.target.value;c("order",Ft===""?void 0:Number(Ft))};var tt=R(ge,2),rt=R(q(tt),2);let We;rt.__click=()=>c("draft",X.frontmatter.draft===!0?void 0:!0),rt.__keydown=ke=>{(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),c("draft",X.frontmatter.draft===!0?void 0:!0))};var Ye=R(q(rt),2),ze=q(Ye),xe=R(Re,2),De=R(q(xe),2);{let ke=me(()=>X.frontmatter.tags??[]);Z_(De,{get tags(){return g(ke)},onchange:Ft=>c("tags",Ft)})}var Ue=R(xe,2);{var lt=ke=>{var Ft=g$(),wt=R(q(Ft),2);$t(wt,17,()=>g(s),Kt,(Ht,xt)=>{var se=me(()=>Dc(g(xt),2));let Oe=()=>g(se)[0],we=()=>g(se)[1];var Ae=m$(),Qe=q(Ae),St=q(Qe),pt=R(Qe,2),Ke=q(pt);Ke.__input=bt=>c(Oe(),bt.target.value);var At=R(Ke,2);At.__click=()=>f(Oe()),fe(bt=>{Te(St,Oe()),ln(Ke,bt),Et(At,"aria-label",`Remove ${Oe()??""}`)},[()=>String(we()??"")]),z(Ht,Ae)}),z(ke,Ft)};ue(Ue,ke=>{g(s).length>0&&ke(lt)})}var et=R(Ue,2),Qt=q(et);Qt.__keydown=ke=>{ke.key==="Enter"&&(ke.preventDefault(),u())};var nn=R(Qt,2);nn.__click=u,fe(ke=>{ln(ae,X.frontmatter.title??""),ln(ne,X.frontmatter.description??""),ln(oe,X.frontmatter.slug??""),ln(te,X.frontmatter.author??""),ln(Ee,X.frontmatter.date??""),ln(Ce,X.frontmatter.order??""),We=Ze(rt,1,"fm-toggle svelte-7izpdj",null,We,{active:X.frontmatter.draft===!0}),Et(rt,"aria-checked",X.frontmatter.draft===!0),Te(ze,X.frontmatter.draft===!0?"Draft":"Published"),nn.disabled=ke},[()=>!g(i).trim()]),Qn(Qt,()=>g(i),ke=>M(i,ke)),z(I,W)};ue(L,I=>{X.frontmatterRawMode?I(P):I(D,!1)})}fe(()=>{v=Ze(O,1,"fm-editor svelte-7izpdj",null,v,{"fm-editor--layout":g(o)}),C=Ze(_,0,"fm-editor__chevron svelte-7izpdj",null,C,{collapsed:!X.frontmatterOpen}),E=Ze(k,1,"fm-editor__collapse svelte-7izpdj",null,E,{open:X.frontmatterOpen})}),z(p,O)};ue(h,p=>{X.currentPath&&p(m)})}z(n,d),vt()}Gt(["click","keydown","input"]);let Wp=[],X_=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,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(n>=X_[r])e=r+1;else return!0;if(e==t)return!1}}function yb(n){return n>=127462&&n<=127487}const wb=8205;function w$(n,e,t=!0,r=!0){return(t?F_:_$)(n,e,r)}function F_(n,e,t){if(e==n.length)return e;e&&V_(n.charCodeAt(e))&&W_(n.charCodeAt(e-1))&&e--;let r=gh(n,e);for(e+=_b(r);e<n.length;){let i=gh(n,e);if(r==wb||i==wb||t&&y$(i))e+=_b(i),r=i;else if(yb(i)){let s=0,o=e-2;for(;o>=0&&yb(gh(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function _$(n,e,t){for(;e>0;){let r=F_(n,e-2,t);if(r<e)return r;e--}return 0}function gh(n,e){let t=n.charCodeAt(e);if(!W_(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return V_(r)?(t-55296<<10)+(r-56320)+65536:t}function V_(n){return n>=56320&&n<57344}function W_(n){return n>=55296&&n<56320}function _b(n){return n<65536?1:2}let Xt=class Y_{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ba(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Ri.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ba(this,e,t);let r=[];return this.decompose(e,t,r,0),Ri.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Vl(this),s=new Vl(e);for(let o=t,a=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Vl(this,e)}iterRange(e,t=this.length){return new U_(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new G_(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y_.empty:e.length<=32?new An(e):Ri.from(An.split(e,[]))}};class An extends Xt{constructor(e,t=k$(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((t?r:a)>=e)return new x$(i,a,r,o);i=a+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new An(kb(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=ef(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new An(a,o.length+s.length));else{let l=a.length>>1;r.push(new An(a.slice(0,l)),new An(a.slice(l)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof An))return super.replace(e,t,r);[e,t]=Ba(this,e,t);let i=ef(this.text,ef(r.text,kb(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new An(i,s):Ri.from(An.split(i,[]),s)}sliceString(e,t=this.length,r=`
145
+ `){[e,t]=Ba(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&t>s&&(i+=a.slice(Math.max(0,e-s),t-s)),s=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new An(r,i)),r=[],i=-1);return i>-1&&t.push(new An(r,i)),t}}class Ri extends Xt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((t?l:a)>=e)return o.lineInner(e,t,r,i);i=a+1,r=l+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&t>=o){let c=i&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!c?r.push(a):a.decompose(e-o,t-o,r,c)}o=l+1}}replace(e,t,r){if([e,t]=Ba(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&t<=a){let l=o.replace(e-s,t-s,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new Ri(u,this.length-(t-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
146
+ `){[e,t]=Ba(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&t>o&&(i+=a.sliceString(e-o,t-o,r)),o=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ri))return 0;let r=0,[i,s,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,t);r+=l.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let m of e)m.flatten(h);return new An(h,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,c=-1,u=[];function f(h){let m;if(h.lines>s&&h instanceof Ri)for(let p of h.children)f(p);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof An&&l&&(m=u[u.length-1])instanceof An&&h.lines+m.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new An(m.text.concat(h.text),m.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:Ri.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new Ri(a,t)}}Xt.empty=new An([""],0);function k$(n){let e=-1;for(let t of n)e+=t.length+1;return e}function ef(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let a=n[s],l=i+a.length;l>=t&&(l>r&&(a=a.slice(0,r-i)),i<t&&(a=a.slice(t-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function kb(n,e,t){return ef(n,[""],e,t)}class Vl{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof An?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof An?i.text.length:i.children.length;if(o==(t>0?a:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
147
+ `,this;e--}else if(i instanceof An){let l=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof An?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class U_{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Vl(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class G_{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Xt.prototype[Symbol.iterator]=function(){return this.iter()},Vl.prototype[Symbol.iterator]=U_.prototype[Symbol.iterator]=G_.prototype[Symbol.iterator]=function(){return this});let x$=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Ba(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Zn(n,e,t=!0,r=!0){return w$(n,e,t,r)}function S$(n){return n>=56320&&n<57344}function A$(n){return n>=55296&&n<56320}function Ls(n,e){let t=n.charCodeAt(e);if(!A$(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return S$(r)?(t-55296<<10)+(r-56320)+65536:t}function H_(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function mo(n){return n<65536?1:2}const Yp=/\r\n?|\n/;var or=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(or||(or={}));class Xi{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){Up(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new Xi(e)}composeDesc(e){return this.empty?e:e.empty?this:K_(this,e)}mapDesc(e,t=!1){return e.empty?this:Gp(this,e,t)}mapPos(e,t=-1,r=or.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=i+a;if(l<0){if(c>e)return s+(e-i);s+=a}else{if(r!=or.Simple&&c>=e&&(r==or.TrackDel&&i<e&&c>e||r==or.TrackBefore&&i<e||r==or.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!a)return e==i||t<0?s:s+l;s+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=t&&a>=e)return i<e&&a>t?"cover":!0;i=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xi(e)}static create(e){return new Xi(e)}}class Rn extends Xi{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Up(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return Gp(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],a=t[i+1];if(a>=0){t[i]=a,t[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(Xt.empty);r.push(o?e.slice(s,s+o):Xt.empty)}s+=o}return new Rn(t,r)}compose(e){return this.empty?e:e.empty?this:K_(this,e,!0)}map(e,t=!1){return e.empty?this:Gp(this,e,t,!0)}iterChanges(e,t=!1){Up(this,e,t)}get desc(){return Xi.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new ac(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,l-a);Kn(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;Kn(t,u,f),f>0&&Is(r,t,s.text),s.forward(u),a+=u}let c=e[o++];for(;a<c;){if(s.done)break e;let u=Math.min(s.len,c-a);Kn(t,u,-1),Kn(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new Rn(t,r),filtered:Xi.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<t&&Kn(i,t-o,-1);let f=new Rn(i,s);a=a?a.compose(f.map(a)):f,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof Rn){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let m=h?typeof h=="string"?Xt.of(h.split(r||Yp)):h:Xt.empty,p=m.length;if(f==d&&p==0)return;f<o&&l(),f>o&&Kn(i,f-o,-1),Kn(i,d-f,p),Is(s,i,m),o=d}}return c(e),l(!a),a}static empty(e){return new Rn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Xt.empty);r[i]=Xt.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new Rn(t,r)}static createSet(e,t){return new Rn(e,t)}}function Kn(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function Is(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Xt.empty);n.push(t)}}function Up(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let a=n.sections[o++],l=n.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,f=Xt.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)a=n.sections[o++],l=n.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function Gp(n,e,t,r=!1){let i=[],s=r?[]:null,o=new ac(n),a=new ac(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Kn(i,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let c=a.len;for(Kn(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Kn(i,0,o.ins),s&&Is(s,i,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Kn(i,c,l<o.i?o.ins:0),s&&l<o.i&&Is(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?Rn.createSet(i,s):Xi.create(i);throw new Error("Mismatched change set lengths")}}}function K_(n,e,t=!1){let r=[],i=t?[]:null,s=new ac(n),o=new ac(e);for(let a=!1;;){if(s.done&&o.done)return i?Rn.createSet(r,i):Xi.create(r);if(s.ins==0)Kn(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)Kn(r,0,o.ins,a),i&&Is(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Kn(r,l,u,a),i&&u&&Is(i,r,o.text)}else o.ins==-1?(Kn(r,s.off?0:s.len,l,a),i&&Is(i,r,s.textBit(l))):(Kn(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Is(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),s.forward2(l),o.forward(l)}}}}class ac{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Xt.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Xt.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ko{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ko(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return pe.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return pe.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return pe.range(e.anchor,e.head)}static create(e,t,r){return new ko(e,t,r)}}class pe{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:pe.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new pe([this.main],0)}addRange(e,t=!0){return pe.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,pe.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new pe(e.ranges.map(t=>ko.fromJSON(t)),e.main)}static single(e,t=e){return new pe([pe.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return pe.normalized(e.slice(),t);r=s.to}return new pe(e,t)}static cursor(e,t=0,r,i){return ko.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return t<e?ko.create(t,e,48|s):ko.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?pe.range(l,a):pe.range(a,l))}}return new pe(e,t)}}function J_(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let cO=0;class Ne{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=cO++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ne(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:uO),!!e.static,e.enables)}of(e){return new tf([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new tf(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new tf(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function uO(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class tf{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=cO++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Hp(f,u)){let h=r(f);if(a?!xb(h,f.values[o],i):!i(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,m=d.config.address[s];if(m!=null){let p=Cf(d,m);if(this.dependencies.every(O=>O instanceof Ne?d.facet(O)===f.facet(O):O instanceof oi?d.field(O,!1)==f.field(O,!1):!0)||(a?xb(h=r(f),p,i):i(h=r(f),p)))return f.values[o]=p,0}else h=r(f);return f.values[o]=h,1}}}}function xb(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function Hp(n,e){let t=!1;for(let r of e)Wl(n,r)&1&&(t=!0);return t}function C$(n,e,t){let r=t.map(l=>n[l.id]),i=t.map(l=>l.type),s=r.filter(l=>!(l&1)),o=n[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=Cf(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)Wl(l,c);return l.values[o]=a(l),1},update(l,c){if(!Hp(l,s))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=Hp(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&uO(t,f))return l.values[o]=d,0;let h=a(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}const au=Ne.define({static:!0});class oi{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new oi(cO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(au).find(r=>r.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(au),o=i.facet(au),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[t]=a.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,au.of({field:this,create:e})]}get extension(){return this}}const go={lowest:4,low:3,default:2,high:1,highest:0};function Ol(n){return e=>new ek(e,n)}const ro={highest:Ol(go.highest),high:Ol(go.high),default:Ol(go.default),low:Ol(go.low),lowest:Ol(go.lowest)};class ek{constructor(e,t){this.inner=e,this.prec=t}}class ps{of(e){return new Kp(this,e)}reconfigure(e){return ps.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Kp{constructor(e,t){this.compartment=e,this.inner=t}}class Af{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let d of T$(e,t,o))d instanceof oi?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r?.config.facets;for(let d in s){let h=s[d],m=h[0].facet,p=u&&u[d]||[];if(h.every(O=>O.type==0))if(a[m.id]=l.length<<1|1,uO(p,h))l.push(r.facet(m));else{let O=m.combine(h.map(v=>v.value));l.push(r&&m.compare(O,r.facet(m))?r.facet(m):O)}else{for(let O of h)O.type==0?(a[O.id]=l.length<<1|1,l.push(O.value)):(a[O.id]=c.length<<1,c.push(v=>O.dynamicSlot(v)));a[m.id]=c.length<<1,c.push(O=>C$(O,m,h))}}let f=c.map(d=>d(a));return new Af(e,o,f,a,l,s)}}function T$(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof Kp&&t.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Kp){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,a)}else if(o instanceof ek)s(o.inner,o.prec);else if(o instanceof oi)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof tf)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,go.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(n,go.default),r.reduce((o,a)=>o.concat(a))}function Wl(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function Cf(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const tk=Ne.define(),Jp=Ne.define({combine:n=>n.some(e=>e),static:!0}),nk=Ne.define({combine:n=>n.length?n[0]:void 0,static:!0}),rk=Ne.define(),ik=Ne.define(),sk=Ne.define(),ok=Ne.define({combine:n=>n.length?n[0]:!1});class _s{constructor(e,t){this.type=e,this.value=t}static define(){return new P$}}class P${of(e){return new _s(this,e)}}class E${constructor(e){this.map=e}of(e){return new It(this,e)}}class It{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new It(this.type,t)}is(e){return this.type==e}static define(e={}){return new E$(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}It.reconfigure=It.define();It.appendConfig=It.define();class En{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&J_(r,t.newLength),s.some(a=>a.type==En.time)||(this.annotations=s.concat(En.time.of(Date.now())))}static create(e,t,r,i,s,o){return new En(e,t,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(En.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}En.time=_s.define();En.userEvent=_s.define();En.addToHistory=_s.define();En.remote=_s.define();function $$(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function ak(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=Rn.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:It.mapEffects(n.effects,i).concat(It.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function em(n,e,t){let r=e.selection,i=Aa(e.annotations);return e.userEvent&&(i=i.concat(En.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rn?e.changes:Rn.of(e.changes||[],t,n.facet(nk)),selection:r&&(r instanceof pe?r:pe.single(r.anchor,r.head)),effects:Aa(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function lk(n,e,t){let r=em(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=ak(r,em(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=En.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return L$(t?Q$(i):i)}function Q$(n){let e=n.startState,t=!0;for(let i of e.facet(rk)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:$$(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=Rn.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=En.create(e,i,n.selection&&n.selection.map(s),It.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(ik);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof En?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof En?n=s[0]:n=lk(e,Aa(s),!1)}return n}function L$(n){let e=n.startState,t=e.facet(sk),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=ak(r,em(e,s,n.changes.newLength),!0))}return r==n?n:En.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const M$=[];function Aa(n){return n==null?M$:Array.isArray(n)?n:[n]}var Tn=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(Tn||(Tn={}));const D$=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let tm;try{tm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function q$(n){if(tm)return tm.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||D$.test(t)))return!0}return!1}function R$(n){return e=>{if(!/\S/.test(e))return Tn.Space;if(q$(e))return Tn.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Tn.Word;return Tn.Other}}class Mt{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Wl(this,a<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return Wl(this,r),Cf(this,r)}update(...e){return lk(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let a of e.effects)a.is(ps.reconfigure)?(t&&(i=new Map,t.compartments.forEach((l,c)=>i.set(c,l)),t=null),i.set(a.value.compartment,a.value.extension)):a.is(It.reconfigure)?(t=null,r=a.value):a.is(It.appendConfig)&&(t=null,r=Aa(r).concat(a.value));let s;t?s=e.startState.values.slice():(t=Af.resolve(r,i,this),s=new Mt(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Jp)?e.newSelection:e.newSelection.asSingle();new Mt(t,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:pe.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Aa(r.effects);for(let a=1;a<t.ranges.length;a++){let l=e(t.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(u);let f=i.mapDesc(c,!0);s.push(l.range.map(f)),i=i.compose(u),o=It.mapEffects(o,u).concat(It.mapEffects(Aa(l.effects),f))}return{changes:i,selection:pe.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Rn?e:Rn.of(e,this.doc.length,this.facet(Mt.lineSeparator))}toText(e){return Xt.of(e.split(this.facet(Mt.lineSeparator)||Yp))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Wl(this,t),Cf(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof oi&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Mt.create({doc:e.doc,selection:pe.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Af.resolve(e.extensions||[],new Map),r=e.doc instanceof Xt?e.doc:Xt.of((e.doc||"").split(t.staticFacet(Mt.lineSeparator)||Yp)),i=e.selection?e.selection instanceof pe?e.selection:pe.single(e.selection.anchor,e.selection.head):pe.single(0);return J_(i,r.length),t.staticFacet(Jp)||(i=i.asSingle()),new Mt(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Mt.tabSize)}get lineBreak(){return this.facet(Mt.lineSeparator)||`
148
+ `}get readOnly(){return this.facet(ok)}phrase(e,...t){for(let r of this.facet(Mt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(tk))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return R$(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Zn(t,o,!1);if(s(t.slice(l,o))!=Tn.Word)break;o=l}for(;a<i;){let l=Zn(t,a);if(s(t.slice(a,l))!=Tn.Word)break;a=l}return o==a?null:pe.range(o+r,a+r)}}Mt.allowMultipleSelections=Jp;Mt.tabSize=Ne.define({combine:n=>n.length?n[0]:4});Mt.lineSeparator=nk;Mt.readOnly=ok;Mt.phrases=Ne.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Mt.languageData=tk;Mt.changeFilter=rk;Mt.transactionFilter=ik;Mt.transactionExtender=sk;ps.reconfigure=It.define();function zc(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ys{eq(e){return this==e}range(e,t=e){return nm.create(e,t,this)}}Ys.prototype.startSide=Ys.prototype.endSide=0;Ys.prototype.point=!1;Ys.prototype.mapMode=or.TrackDel;function fO(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let nm=class ck{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new ck(e,t,r)}};function rm(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class dO{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let m=t.mapPos(u,c.startSide,c.mapMode);if(m==null||(d=h=m,c.startSide!=c.endSide&&(h=t.mapPos(u,c.endSide),h<d)))continue}else if(d=t.mapPos(u,c.startSide),h=t.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-o),s.push(h-o))}return{mapped:r.length?new dO(i,s,r,a):null,pos:o}}}class qt{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new qt(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(rm)),this.isEmpty)return t.length?qt.of(t):this;let a=new uk(this,null,-1).goto(0),l=0,c=[],u=new Ro;for(;a.value||l<t.length;)if(l<t.length&&(a.from-t[l].from||a.startSide-t[l].value.startSide)>=0){let f=t[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(a.chunkIndex)<t[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(nm.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?qt.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),t.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),r.push(f))}}let s=this.nextLayer.map(e);return t.length==0?s:new qt(r,t,s||qt.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return lc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return lc.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=Sb(o,a,r),c=new vl(o,l,s),u=new vl(a,l,s);r.iterGaps((f,d,h)=>Ab(c,f,u,d,h,i)),r.empty&&r.length==0&&Ab(c,0,u,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=Sb(s,o),l=new vl(s,a,0).goto(r),c=new vl(o,a,0).goto(r);for(;;){if(l.to!=c.to||!im(l.active,c.active)||l.point&&(!c.point||!fO(l.point,c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,t,r,i,s=-1){let o=new vl(e,null,s).goto(t),a=t,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,o.point,u,f,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(i.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,t=!1){let r=new Ro;for(let i of e instanceof nm?[e]:t?I$(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return qt.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=qt.empty;i=i.nextLayer)t=new qt(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}qt.empty=new qt([],[],null,-1);function I$(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(rm(e,r)>0)return n.slice().sort(rm);e=r}return n}qt.empty.nextLayer=qt.empty;class Ro{finishChunk(e){this.chunks.push(new dO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Ro)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(qt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=qt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Sb(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(t?t.mapPos(a):a)==s.chunkPos[o]&&!t?.touchesRange(a,a+s.chunk[o].length)&&i.add(s.chunk[o])}return i}class uk{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class lc{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new uk(o,t,r,s));return i.length==1?i[0]:new lc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)Oh(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)Oh(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Oh(this.heap,0)}}}function Oh(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class vl{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=lc.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){lu(this.active,e),lu(this.activeTo,e),lu(this.activeRank,e),this.minActive=Cb(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;cu(this.active,t,r),cu(this.activeTo,t,i),cu(this.activeRank,t,s),e&&cu(e,t,this.cursor.from),this.minActive=Cb(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&lu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function Ab(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,a=r,l=r-e,c=!!s.boundChange;for(let u=!1;;){let f=n.to+l-t.to,d=f||n.endSide-t.endSide,h=d<0?n.to+l:t.to,m=Math.min(h,o);if(n.point||t.point?(n.point&&t.point&&fO(n.point,t.point)&&im(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(a,m,n.point,t.point),u=!1):(u&&s.boundChange(a),m>a&&!im(n.active,t.active)&&s.compareRange(a,m,n.active,t.active),c&&m<o&&(f||n.openEnd(h)!=t.openEnd(h))&&(u=!0)),h>o)break;a=h,d<=0&&n.next(),d>=0&&t.next()}}function im(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!fO(n[t],e[t]))return!1;return!0}function lu(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function cu(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function Cb(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function Os(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Zn(n,i));return r}function N$(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Zn(n,i)}return n.length}const sm="ͼ",Tb=typeof Symbol>"u"?"__"+sm:Symbol.for(sm),om=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Pb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Us{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let m=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(p=>o.map(O=>p.replace(/&/,O))).reduce((p,O)=>p.concat(O)),m,l);else if(m&&typeof m=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(i(h),m,u,d)}else m!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+m+";")}(u.length||d)&&l.push((r&&!f&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
149
+ `)}static newName(){let e=Pb[Tb]||1;return Pb[Tb]=e+1,sm+e.toString(36)}static mount(e,t,r){let i=e[om],s=r&&r.nonce;i?s&&i.setNonce(s):i=new B$(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let Eb=new Map;class B${constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=Eb.get(r);if(s)return e[om]=s;this.sheet=new i.CSSStyleSheet,Eb.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[om]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
150
+ `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Gs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},cc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},j$=typeof navigator<"u"&&/Mac/.test(navigator.platform),z$=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Wn=0;Wn<10;Wn++)Gs[48+Wn]=Gs[96+Wn]=String(Wn);for(var Wn=1;Wn<=24;Wn++)Gs[Wn+111]="F"+Wn;for(var Wn=65;Wn<=90;Wn++)Gs[Wn]=String.fromCharCode(Wn+32),cc[Wn]=String.fromCharCode(Wn);for(var vh in Gs)cc.hasOwnProperty(vh)||(cc[vh]=Gs[vh]);function Z$(n){var e=j$&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||z$&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?cc:Gs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function jn(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)fk(n,arguments[e]);return n}function fk(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)fk(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let sr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},am=typeof document<"u"?document:{documentElement:{style:{}}};const lm=/Edge\/(\d+)/.exec(sr.userAgent),dk=/MSIE \d/.test(sr.userAgent),cm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(sr.userAgent),Rd=!!(dk||cm||lm),$b=!Rd&&/gecko\/(\d+)/i.test(sr.userAgent),bh=!Rd&&/Chrome\/(\d+)/.exec(sr.userAgent),X$="webkitFontSmoothing"in am.documentElement.style,um=!Rd&&/Apple Computer/.test(sr.vendor),Qb=um&&(/Mobile\/\w+/.test(sr.userAgent)||sr.maxTouchPoints>2);var Le={mac:Qb||/Mac/.test(sr.platform),windows:/Win/.test(sr.platform),linux:/Linux|X11/.test(sr.platform),ie:Rd,ie_version:dk?am.documentMode||6:cm?+cm[1]:lm?+lm[1]:0,gecko:$b,gecko_version:$b?+(/Firefox\/(\d+)/.exec(sr.userAgent)||[0,0])[1]:0,chrome:!!bh,chrome_version:bh?+bh[1]:0,ios:Qb,android:/Android\b/.test(sr.userAgent),webkit_version:X$?+(/\bAppleWebKit\/(\d+)/.exec(sr.userAgent)||[0,0])[1]:0,safari:um,safari_version:um?+(/\bVersion\/(\d+(\.\d+)?)/.exec(sr.userAgent)||[0,0])[1]:0,tabSize:am.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function hO(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Tf=Object.create(null);function pO(n,e,t){if(n==e)return!0;n||(n=Tf),e||(e=Tf);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function F$(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function Lb(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function V$(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class Zc{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Cr=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(Cr||(Cr={}));class gt extends Ys{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Xc(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Io(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=hk(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new Io(e,r,i,t,e.widget||null,!0)}static line(e){return new Fc(e)}static set(e,t=!1){return qt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}gt.none=qt.empty;class Xc extends gt{constructor(e){let{start:t,end:r}=hk(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?hO(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Tf}eq(e){return this==e||e instanceof Xc&&this.tagName==e.tagName&&pO(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Xc.prototype.point=!1;class Fc extends gt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Fc&&this.spec.class==e.spec.class&&pO(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Fc.prototype.mapMode=or.TrackBefore;Fc.prototype.point=!0;class Io extends gt{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?or.TrackBefore:or.TrackAfter:or.TrackDel}get type(){return this.startSide!=this.endSide?Cr.WidgetRange:this.startSide<=0?Cr.WidgetBefore:Cr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Io&&W$(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Io.prototype.point=!0;function hk(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function W$(n,e){return n==e||!!(n&&e&&n.compare(e))}function Ca(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class uc extends Ys{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof uc&&this.tagName==e.tagName&&pO(this.attributes,e.attributes)}static create(e){return new uc(e.tagName,e.attributes||Tf)}static set(e,t=!1){return qt.of(e,t)}}uc.prototype.startSide=uc.prototype.endSide=-1;function fc(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function fm(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Yl(n,e){if(!e.anchorNode)return!1;try{return fm(n,e.anchorNode)}catch{return!1}}function nf(n){return n.nodeType==3?dc(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Ul(n,e,t,r){return t?Mb(n,e,t,r,-1)||Mb(n,e,t,r,1):!1}function Hs(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Pf(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Mb(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:vs(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Hs(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?vs(n):0}else return!1}}function vs(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ef(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function Y$(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function pk(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function U$(n,e,t,r,i,s,o,a){let l=n.ownerDocument,c=l.defaultView||window;for(let u=n,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,m=1,p=1;if(h)d=Y$(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:m,scaleY:p}=pk(u,b)),d={left:b.left,right:b.left+u.clientWidth*m,top:b.top,bottom:b.top+u.clientHeight*p}}let O=0,v=0;if(i=="nearest")e.top<d.top?(v=e.top-(d.top+o),t>0&&e.bottom>d.bottom+v&&(v=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(v=e.bottom-d.bottom+o,t<0&&e.top-v<d.top&&(v=e.top-(d.top+o)));else{let b=e.bottom-e.top,_=d.bottom-d.top;v=(i=="center"&&b<=_?e.top+b/2-_/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-_+o)-d.top}if(r=="nearest"?e.left<d.left?(O=e.left-(d.left+s),t>0&&e.right>d.right+O&&(O=e.right-d.right+s)):e.right>d.right&&(O=e.right-d.right+s,t<0&&e.left<d.left+O&&(O=e.left-(d.left+s))):O=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,O||v)if(h)c.scrollBy(O,v);else{let b=0,_=0;if(v){let C=u.scrollTop;u.scrollTop+=v/p,_=(u.scrollTop-C)*p}if(O){let C=u.scrollLeft;u.scrollLeft+=O/m,b=(u.scrollLeft-C)*m}e={left:e.left-b,top:e.top-_,right:e.right-b,bottom:e.bottom-_},b&&Math.abs(b-O)<1&&(r="nearest"),_&&Math.abs(_-v)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function G$(n){let e=n.ownerDocument,t,r;for(let i=n.parentNode;i&&!(i==e.body||t&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class H${constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?vs(t):0),r,Math.min(e.focusOffset,r?vs(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let fo=null;Le.safari&&Le.safari_version>=26&&(fo=!1);function mk(n){if(n.setActive)return n.setActive();if(fo)return n.focus(fo);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(fo==null?{get preventScroll(){return fo={preventScroll:!0},!0}}:void 0),!fo){fo=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let Db;function dc(n,e,t=e){let r=Db||(Db=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function Ta(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function K$(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function J$(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,vs(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=vs(t))}else{if(t==n)return!0;r=Hs(t),t=t.parentNode}}function gk(n){return n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function Ok(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=vs(t)}else if(t.parentNode&&!Pf(t))r=Hs(t),t=t.parentNode;else return null}}function vk(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Pf(t))r=Hs(t)+1,t=t.parentNode;else return null}}class Oi{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new Oi(e.parentNode,Hs(e),t)}static after(e,t){return new Oi(e.parentNode,Hs(e)+1,t)}}var bn=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(bn||(bn={}));const No=bn.LTR,mO=bn.RTL;function bk(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const eQ=bk("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),tQ=bk("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),dm=Object.create(null),Pi=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);dm[e]=t,dm[t]=-e}function yk(n){return n<=247?eQ[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?tQ[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const nQ=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ni{get dir(){return this.level%2?mO:No}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<t:a.to>t:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function wk(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!wk(r.inner,i.inner))return!1}return!0}const sn=[];function rQ(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:t,l=s?256:i;for(let c=o,u=l,f=l;c<a;c++){let d=yk(n.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),sn[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=o,u=l,f=l;c<a;c++){let d=sn[c];if(d==128)c<a-1&&u==sn[c+1]&&u&24?d=sn[c]=u:sn[c]=256;else if(d==64){let h=c+1;for(;h<a&&sn[h]==64;)h++;let m=c&&u==8||h<t&&sn[h]==8?f==1?1:8:256;for(let p=c;p<h;p++)sn[p]=m;c=h-1}else d==8&&f==1&&(sn[c]=1);u=d,d&7&&(f=d)}}}function iQ(n,e,t,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:t;for(let f=c,d,h,m;f<u;f++)if(h=dm[d=n.charCodeAt(f)])if(h<0){for(let p=a-3;p>=0;p-=3)if(Pi[p+1]==-h){let O=Pi[p+2],v=O&2?i:O&4?O&1?s:i:0;v&&(sn[f]=sn[Pi[p]]=v),a=p;break}}else{if(Pi.length==189)break;Pi[a++]=f,Pi[a++]=d,Pi[a++]=l}else if((m=sn[f])==2||m==1){let p=m==i;l=p?0:1;for(let O=a-3;O>=0;O-=3){let v=Pi[O+2];if(v&2)break;if(p)Pi[O+2]|=2;else{if(v&4)break;Pi[O+2]|=4}}}}}function sQ(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,a=i<t.length?t[i].from:e;for(let l=o;l<a;){let c=sn[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==t.length)break;u=t[i++].to,a=i<t.length?t[i].from:e}else if(sn[u]==256)u++;else break;let f=s==1,d=(u<e?sn[u]:r)==1,h=f==d?f?1:2:r;for(let m=u,p=i,O=p?t[p-1].to:n;m>l;)m==O&&(m=t[--p].from,O=p?t[p-1].to:n),sn[--m]=h;l=u}else s=c,l++}}}function hm(n,e,t,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<t;){let u=!0,f=!1;if(c==s.length||l<s[c].from){let p=sn[l];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,m=l;e:for(;;)if(c<s.length&&m==s[c].from){if(f)break e;let p=s[c];if(!u)for(let O=p.to,v=c+1;;){if(O==t)break e;if(v<s.length&&s[v].from==O)O=s[v++].to;else{if(sn[O]==a)break e;break}}if(c++,d)d.push(p);else{p.from>l&&o.push(new Ni(l,p.from,h));let O=p.direction==No!=!(h%2);pm(n,O?r+1:r,i,p.inner,p.from,p.to,o),l=p.to}m=p.to}else{if(m==t||(u?sn[m]!=a:sn[m]==a))break;m++}d?hm(n,l,m,r+1,i,d,o):l<m&&o.push(new Ni(l,m,h)),l=m}else for(let l=t,c=s.length;l>e;){let u=!0,f=!1;if(!c||l>s[c-1].to){let p=sn[l-1];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,m=l;e:for(;;)if(c&&m==s[c-1].to){if(f)break e;let p=s[--c];if(!u)for(let O=p.from,v=c;;){if(O==e)break e;if(v&&s[v-1].to==O)O=s[--v].from;else{if(sn[O-1]==a)break e;break}}if(d)d.push(p);else{p.to<l&&o.push(new Ni(p.to,l,h));let O=p.direction==No!=!(h%2);pm(n,O?r+1:r,i,p.inner,p.from,p.to,o),l=p.from}m=p.from}else{if(m==e||(u?sn[m-1]!=a:sn[m-1]==a))break;m--}d?hm(n,m,l,r+1,i,d,o):m<l&&o.push(new Ni(m,l,h)),l=m}}function pm(n,e,t,r,i,s,o){let a=e%2?2:1;rQ(n,i,s,r,a),iQ(n,i,s,r,a),sQ(i,s,r,a),hm(n,i,s,e,t,r,o)}function oQ(n,e,t){if(!n)return[new Ni(0,0,e==mO?1:0)];if(e==No&&!t.length&&!nQ.test(n))return _k(n.length);if(t.length)for(;n.length>sn.length;)sn[sn.length]=256;let r=[],i=e==No?0:1;return pm(n,i,i,t,0,n.length,r),r}function _k(n){return[new Ni(0,n,0)]}let kk="";function aQ(n,e,t,r,i){var s;let o=r.head-n.from,a=Ni.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,t);if(o==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,t),c=l.side(i,t)}let u=Zn(n.text,o,l.forward(i,t));(u<l.from||u>l.to)&&(u=c),kk=n.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?pe.cursor(f.side(!i,t)+n.from,f.forward(i,t)?1:-1,f.level):pe.cursor(u+n.from,l.forward(i,t)?-1:1,l.level)}function lQ(n,e,t){for(let r=e;r<t;r++){let i=yk(n.charCodeAt(r));if(i==1)return No;if(i==2||i==4)return mO}return No}const xk=Ne.define(),Sk=Ne.define(),Ak=Ne.define(),Ck=Ne.define(),mm=Ne.define(),Tk=Ne.define(),Pk=Ne.define(),gO=Ne.define(),OO=Ne.define(),Ek=Ne.define({combine:n=>n.some(e=>e)}),cQ=Ne.define({combine:n=>n.some(e=>e)}),$k=Ne.define();class Pa{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Pa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Pa(pe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const uu=It.define({map:(n,e)=>n.map(e)}),Qk=It.define();function Ir(n,e,t){let r=n.facet(Ck);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const as=Ne.define({combine:n=>n.length?n[0]:!0});let uQ=0;const Oa=Ne.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class cr{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Oa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Oa.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new cr(uQ++,e,r,i,a=>{let l=[];return o&&l.push(Id.of(c=>{let u=c.plugin(a);return u?o(u):gt.none})),s&&l.push(s(a)),l})}static fromClass(e,t){return cr.define((r,i)=>new e(r,i),t)}}class yh{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Ir(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Ir(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Ir(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Lk=Ne.define(),vO=Ne.define(),Id=Ne.define(),Mk=Ne.define(),bO=Ne.define(),Vc=Ne.define(),Dk=Ne.define();function qb(n,e){let t=n.state.facet(Dk);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return qt.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,m;if(h==null&&(h=lQ(e.text,c,u)),l>0&&f.length&&(m=f[f.length-1]).to==c&&m.direction==h)m.to=u,f=m.inner;else{let p={from:c,to:u,direction:h,inner:[]};f.push(p),f=p.inner}}}}),i}const qk=Ne.define();function yO(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(qk)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const ql=Ne.define();class Ur{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new Ur(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let a=i<e.length?e[i].fromB:1e9,l=s<t.length?t[s]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+o,f=c,d=u;for(;;)if(s<t.length&&t[s]<=f){let h=t[s+1];s+=2,f=Math.max(f,h);for(let m=i;m<e.length&&e[m].fromB<=f;m++)o=e[m].toA-e[m].toB;d=Math.max(d,h+o)}else if(i<e.length&&e[i].fromB<=f){let h=e[i++];f=Math.max(f,h.toB),d=Math.max(d,h.toA),o=h.toA-h.toB}else break;r.push(new Ur(u,d,c,f))}return r}}class $f{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new Ur(s,o,a,l))),this.changedRanges=i}static create(e,t,r){return new $f(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const fQ=[];class $n{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return fQ}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&F$(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=Hs(this.dom),i=this.length?e>0:t>0;return new Oi(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Bd)return e;return null}static get(e){return e.cmTile}}class Nd extends $n{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=e?.node==t?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=a.dom&&(s.written=!0),a.dom.parentNode==t)for(;i&&i!=a.dom;)i=Rb(i);else t.insertBefore(a.dom,i);r=a.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=Rb(i);this.length=o}}function Rb(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Bd extends Nd{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=$n.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Xs)t.push(i),r=o,i=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((a,l)=>{let c=l+a.length;if(e>=l&&e<=c){if(a.isWidget()&&t>=-1&&t<=1){if(a.flags&32)return!0;a.flags&16&&(r=void 0)}(l<e||e==c&&(t<-1?a.length:a.covers(1)))&&(!r||!a.isWidget()&&r.isWidget())&&(r=a,i=e-l),(c>e||e==l&&(t>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Xs extends Nd{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Xs(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class ja extends Nd{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new ja(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,a=-1;function l(u,f){for(let d=0,h=0;d<u.children.length&&h<=f;d++){let m=u.children[d],p=h+m.length;p>=f&&(m.isComposite()?l(m,f-h):(!o||o.isHidden&&(t>0||r&&hQ(o,m)))&&(p>f||m.flags&32)?(o=m,a=f-h):(h<f||m.flags&16&&!m.isHidden)&&(i=m,s=f-h)),h=p}}l(this,e);let c=(t<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:a}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):dQ(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Oi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,a=!1;for(let l of o.children){if(a)return new Oi(l.dom,0);l==r.tile&&(a=!0)}}return new Oi(this.dom,0)}}function dQ(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=nf(e);return t[t.length-1]||null}function hQ(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class _r extends Nd{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new _r(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class xo extends $n{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?Le.chrome||Le.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let a=dc(this.dom,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:t>=0)?0:a.length-1];return Le.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Ef(l,o<0):l||null}static of(e,t){let r=new xo(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Bo extends $n{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Ef(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return Ef(o,!a)}}get overrideDOMText(){if(!this.length)return Xt.empty;let{root:e}=this;if(!e)return Xt.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Bo(s,r,e,i)}}class Qf extends $n{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Xt.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class pQ{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:a}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!a.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++}else{let l=i.children[s],c=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!r||r.skip(l,0,l.length)!==!1||!l.isComposite)?(o=!!c,s++,e-=l.length):(a.push({tile:i,index:s}),i=l,s=0,r&&l.isComposite()&&r.enter(l))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++;else if(e){let l=Math.min(e,i.length-s);r&&r.skip(i,s,s+l),e-=l,s+=l}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class mQ{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class gQ{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),a=o.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=o.children[o.children.length-1]=new xo(a.dom,a.text+e);l.parent=o}else o.append(i||xo.of(e,(s=this.cache.find(xo))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?wh(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let a=t.marks.length-1;a>=0;a--){let l=t.marks[a],c=i.lastChild;if(c instanceof _r&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(wh(l.dom)),i=c;else{if(this.cache.reused.get(l)){let f=$n.get(l.dom);f&&f.setDOM(wh(l.dom))}let u=_r.of(l.mark,l.dom);i.append(u),i=u}this.cache.reused.set(l,2)}let s=$n.get(e.text);s&&this.cache.reused.set(s,2);let o=new xo(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=Rk);let i=ja.start(e,t||((r=this.cache.find(ja))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(t>0&&(a=i.lastChild)&&a instanceof _r&&a.mark.eq(o))i=a,t--;else{let l=_r.of(o,(r=this.cache.find(_r,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(l),i=l,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Ib(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Le.ios&&Ib(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(_h,0,32)||new Bo(_h.toDOM(),0,_h,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new mQ(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Xs&&i.wrapper.eq(r.wrapper))t=i;else{let s=Xs.of(r.wrapper,(e=this.cache.find(Xs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(Qf,void 0,1);return r&&(r.flags=t),r||new Qf(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class OQ{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let a=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,a)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Lf=[Bo,ja,xo,_r,Qf,Xs,Bd];for(let n=0;n<Lf.length;n++)Lf[n].bucket=n;class vQ{constructor(e){this.view=e,this.buckets=Lf.map(()=>[]),this.index=Lf.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let a=s.length-1;a>=0;a--){let l=(a+o)%s.length,c=s[l];if((!t||t(c))&&!this.reused.has(c))return s.splice(l,1),l<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let a=i[s];if(!this.reused.has(a)&&(o==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,a.widget==e&&a.length==t&&(a.flags&497)==r?(this.reused.set(a,1),a):(this.reused.set(a,2),new Bo(a.dom,t,e,a.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class bQ{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new vQ(e),this.text=new OQ(e.state.doc),this.builder=new gQ(this.cache,new Bd(e,e.contentDOM),qt.iter(r)),this.cache.reused.set(t,2),this.old=new pQ(t),this.reuseWalker={skip:(o,a,l)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let a=o<e.length?e[o++]:null,l=a?a.fromA:this.old.root.length;if(l>i){let c=l-i;this.preserve(c,!o,!a),i=l,s+=c}if(!a)break;t&&a.fromA<=t.range.fromA&&a.toA>=t.range.toA?(this.forward(a.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,a.toA),this.emit(t.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(s,a.toB)),s=a.toB,i=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=_Q(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,a,l)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let c=l>0||a<o.length?Bo.of(o.widget,this.view,l-a,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!a&&l==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(a,l),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof Qf)this.cache.add(o);else if(o instanceof _r)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof _r&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof _r&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=qt.spans(this.decorations,e,t,{point:(a,l,c,u,f,d)=>{if(c instanceof Io){if(this.disallowBlockEffectsFor[d]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,f>u.length)i.continueWidget(l-a);else{let h=c.widget||(c.block?za.block:za.inline),m=yQ(c),p=this.cache.findWidget(h,l-a,m)||Bo.of(h,this.view,l-a,m);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(p)):(i.ensureLine(r),i.addInlineWidget(p,u,f))}r=null}else r=wQ(r,c);l>a&&this.text.skip(l-a)},span:(a,l,c,u)=>{for(let f=a;f<l;){let d=this.text.next(Math.min(512,l-f));d==null?(i.addLineStartIfNotCovered(r),i.addBreak(),f++):(i.ensureLine(r),i.addText(d,c,f==a?u:c.length),f+=d.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=$n.get(i);if(i==this.view.contentDOM)break;s instanceof _r?t.push(s):s?.isLine()?r=s:i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new ja(i,Rk):t.push(_r.of(new Xc({tagName:i.nodeName.toLowerCase(),attributes:V$(i)}),i))}return{line:r,marks:t}}}function Ib(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function yQ(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const Rk={class:"cm-line"};function wQ(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&hO(t,n),r&&(n.class+=" "+r)),n}function _Q(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof _r&&e.push(r.mark)}return e}function wh(n){let e=$n.get(n);return e&&e.setDOM(n.cloneNode()),n}class za extends Zc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}za.inline=new za("span");za.block=new za("div");const _h=new class extends Zc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Nb{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=gt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Bd(e,e.contentDOM),this.updateInner([new Ur(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:f})=>f<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!$Q(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?xQ(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new Ur(u,f,e.changes.mapPos(u,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Le.ie||Le.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=CQ(o,this.decorations,e.changes);l.length&&(r=Ur.extendWithRanges(r,l));let c=PQ(a,this.blockWrappers,e.changes);return c.length&&(r=Ur.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,a=new bQ(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,t),gm(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Le.chrome||Le.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof kh&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(Qk)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(as)||r.tabIndex>-1)&&Yl(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),Le.gecko&&l.empty&&!this.hasComposition&&kQ(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=u=new Oi(d,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!Ul(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Ul(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{Le.android&&Le.chrome&&r.contains(f.focusNode)&&EQ(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let d=fc(this.view.root);if(d)if(l.empty){if(Le.gecko){let h=SQ(c.node,c.offset);if(h&&h!=3){let m=(h==1?Ok:vk)(c.node,c.offset);m&&(c=new Oi(m.node,m.offset))}}d.collapse(c.node,c.offset),l.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),h.setEnd(u.node,u.offset),h.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new Oi(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new Oi(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ul(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=fc(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(u.node,u.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=vs(e)==0?0:t==0?-1:1;for(;;){let a=e.parentNode;if(a==r.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!$n.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,a=i;;o++){let l=r.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let f=u+c.length;if(u<=e&&(r=c,i=e-u,s=f<e),f>=e&&!o&&(o=c,a=e-u,l=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:l&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(a,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof kh?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=i(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&o<s.length){let a=Zn(s.text,o);if(a==o)return null;let l=dc(s.dom,o,a).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(c==l.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==bn.LTR,c=0,u=(f,d,h)=>{for(let m=0;m<f.children.length&&!(d>i);m++){let p=f.children[m],O=d+p.length,v=p.dom.getBoundingClientRect(),{height:b}=v;if(h&&!m&&(c+=v.top-h.top),p instanceof Xs)O>r&&u(p,d,v);else if(d>=r&&(c>0&&t.push(-c),t.push(b+c),c=0,o)){let _=p.dom.lastChild,C=_?nf(_):[];if(C.length){let y=C[C.length-1],w=l?y.right-v.left:v.right-y.left;w>a&&(a=w,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=O)}}h&&m==f.children.length-1&&(c+=h.bottom-v.bottom),d=O+p.breakAfter}};return u(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?bn.RTL:bn.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=nf(c.dom);if(u.length!=1)return;a+=u[0].width,l=u[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=nf(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(gt.replace({widget:new kh(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return gt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Id).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(bO).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(qt.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Mk).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet($k))try{if(c(this.view,e.range,e))return!0}catch(u){Ir(this.view.state,u,"scroll handler")}let{range:t}=e,r=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=yO(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;U$(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==bn.LTR)}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){gm(this.tile)}}function gm(n,e){let t=e?.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)gm(r,e)}}function kQ(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function Ik(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=Ok(t.focusNode,t.focusOffset),i=vk(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=$n.get(i.node);if(!a||a.isText()&&a.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let l=$n.get(r.node);!l||l.isText()&&l.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function xQ(n,e,t){let r=Ik(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||n.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc;return{range:new Ur(l.mapPos(s),l.mapPos(o),s,o),text:i}}function SQ(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let AQ=class{constructor(){this.changes=[]}compareRange(e,t){Ca(e,t,this.changes)}comparePoint(e,t){Ca(e,t,this.changes)}boundChange(e){Ca(e,e,this.changes)}};function CQ(n,e,t){let r=new AQ;return qt.compare(n,e,t,r),r.changes}class TQ{constructor(){this.changes=[]}compareRange(e,t){Ca(e,t,this.changes)}comparePoint(){}boundChange(e){Ca(e,e,this.changes)}}function PQ(n,e,t){let r=new TQ;return qt.compare(n,e,t,r),r.changes}function EQ(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function $Q(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class kh extends Zc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function QQ(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return pe.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,a=s;t<0?o=Zn(i.text,s,!1):a=Zn(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Zn(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Zn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return pe.range(o+i.from,a+i.from)}function LQ(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let a=n.viewState.heightOracle.textHeight,l=Math.floor((i-t.top-(n.defaultLineHeight-a)*.5)/a);s+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+N$(o,s,n.state.tabSize)}function MQ(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Cr.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function DQ(n,e,t,r){let i=MQ(n,e.head,e.assoc||-1),s=!r||i.type!=Cr.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),a=n.textDirectionAt(i.from),l=n.posAtCoords({x:t==(a==bn.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return pe.cursor(l,t?-1:1)}return pe.cursor(t?i.to:i.from,t?-1:1)}function Bb(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let a=e,l=null;;){let c=aQ(i,s,o,a,t),u=kk;if(!c){if(i.number==(t?n.state.doc.lines:1))return a;u=`
151
+ `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),c=n.visualLineSide(i,!t)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function qQ(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==Tn.Space&&(i=o),i==o}}function RQ(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return pe.cursor(i,e.assoc);let o=e.goalColumn,a,l=n.contentDOM.getBoundingClientRect(),c=n.coordsAtPos(i,(e.empty?e.assoc:0)||(t?1:-1)),u=n.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let m=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,n.defaultCharacterWidth*(i-m.from))),a=(s<0?m.top:m.bottom)+u}let f=l.left+o,d=r??n.viewState.heightOracle.textHeight>>1,h=Om(n,{x:f,y:a+d*s},!1,s);return pe.cursor(h.pos,h.assoc,void 0,o)}function Gl(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||t||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function Nk(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Gl(n,i.from,0);o!=i.from&&(s=pe.cursor(o,-1))}else{let o=Gl(n,i.from,-1),a=Gl(n,i.to,1);(o!=i.from||a!=i.to)&&(s=pe.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?pe.create(t,e.mainIndex):e}function xh(n,e,t){let r=Gl(n.state.facet(Vc).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:pe.cursor(r,r<t.from?1:-1)}class Ii{constructor(e,t){this.pos=e,this.assoc=t}}function Om(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:a}=e,l=a-s,c;for(;;){if(l<0)return new Ii(0,1);if(l>n.viewState.docHeight)return new Ii(n.state.doc.length,-1);if(c=n.elementAtHeight(l),r==null)break;if(c.type==Cr.Text){if(r<0?c.to<n.viewport.from:c.from>n.viewport.to)break;let d=n.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(d&&(r<0?d.top<=l+s:d.bottom>=l+s))break}let f=n.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(n.viewport.from>=c.to||n.viewport.to<=c.from){if(t)return null;if(c.type==Cr.Text){let f=LQ(n,i,c,o,a);return new Ii(f,f==c.from?1:-1)}}if(c.type!=Cr.Text)return l<(c.top+c.bottom)/2?new Ii(c.from,1):new Ii(c.to,-1);let u=n.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=n.docView.lineAt(c.from,-2)),new IQ(n,o,a,n.textDirectionAt(c.from)).scanTile(u,c.from)}class IQ{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Ni.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Ni.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),a,l,c=-1,u=1e9,f;e:for(;r<i;){let h=i-r,m=r+i>>1;t:if(s.has(m)){let O=r+Math.floor(Math.random()*h);for(let v=0;v<h;v++){if(!s.has(O)){m=O;break t}O++,O==i&&(O=r)}break e}s.add(m);let p=t(m);if(p)for(let O=0;O<p.length;O++){let v=p[O],b=0;if(v.bottom<this.y)(!a||a.bottom<v.bottom)&&(a=v),b=1;else if(v.top>this.y)(!l||l.top>v.top)&&(l=v),b=-1;else{let _=v.left>this.x?this.x-v.left:v.right<this.x?this.x-v.right:0,C=Math.abs(_);C<u&&(c=m,u=C,f=v),_&&(b=_<0==(this.baseDir==bn.LTR)?-1:1)}b==-1&&(!o||this.baseDirAt(e[m],1))?i=m:b==1&&(!o||this.baseDirAt(e[m+1],-1))&&(r=m+1)}}if(!f){let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,t)}let d=(o?this.dirAt(e[c],1):this.baseDir)==bn.LTR;return{i:c,after:this.x>(f.left+f.right)/2==d}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Zn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,a=r[s+1]-t;return dc(e.dom,o,a).getClientRects()});return i.after?new Ii(r[i.i+1],-1):new Ii(r[i.i],1)}scanTile(e,t){if(!e.length)return new Ii(t,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,t);if(a.isComposite())return this.scanTile(a,t)}let r=[t];for(let a=0,l=t;a<e.children.length;a++)r.push(l+=e.children[a].length);let i=this.scan(r,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:dc(l.dom,0,l.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new Ii(r[i.i+1],-1):new Ii(o,1)}}const Rl="￿";class NQ{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Mt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Rl}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=$n.get(i),a=i.nextSibling;if(a==t){o?.breakAfter&&!a&&r!=this.view.contentDOM&&this.lineBreak();break}let l=$n.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:Pf(i))||Pf(a)&&(i.nodeName!="BR"||o?.isWidget())&&this.text.length>s)&&!jQ(a,t)&&this.lineBreak(),i=a}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(t))&&(s=a.index,o=a[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){let t=$n.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(BQ(e,r.node,r.offset)?t:0))}}function BQ(n,e,t){for(;;){if(!e||t<vs(e))return!1;if(e==n)return!0;t=Hs(e)+1,e=e.parentNode}}function jQ(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=$n.get(n);if(!r?.isWidget())return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i?.length)return!1}return!0}class jb{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class zQ{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Bk(e.docView.tile,t,r,0))){let a=s||o?[]:XQ(e),l=new NQ(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=FQ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!fm(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!fm(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((Le.ios||Le.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,m=u.to-d;(h==0||h==1||f==0)&&(m==0||m==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(pe.range(c,l)):this.newSel=pe.single(c,l)}}}function Bk(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<n.children.length;l++){let f=n.children[l],d=c+f.length;if(c<e&&d>t)return Bk(f,e,t,c);if(d>=e&&i==-1&&(i=l,s=c),c>t&&f.dom.parentNode==n.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?r+n.length:a,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function jk(n,e){let t,{newSel:r}=e,i=n.state.selection.main,s=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,c=null;(s===8||Le.android&&e.text.length<a-o)&&(l=i.to,c="end");let u=zk(n.state.doc.sliceString(o,a,Rl),e.text,l-o,c);u&&(Le.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Rl+Rl&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:Xt.of(e.text.slice(u.from,u.toB).split(Rl))})}else r&&(!n.hasFocus&&n.state.facet(as)||Mf(r,i))&&(r=null);if(!t&&!r)return!1;if(!t&&e.typeOver&&!i.empty&&r&&r.main.empty?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,i.to)}:(Le.mac||Le.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Xt.of([t.insert.toString().replace("."," ")])}):t&&t.from>=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:n.state.doc.lineAt(i.from).to<i.to&&n.docView.lineHasWidget(i.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:i.from,to:i.to,insert:n.state.toText(n.inputState.insertingText)}:Le.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==`
152
+ `&&n.lineWrapping&&(r&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Xt.of([" "])}),t)return wO(n,t,r,s);if(r&&!Mf(r,i)){let o=!1,a="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),a=n.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=Nk(n.state.facet(Vc).map(l=>l(n)),r))),n.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function wO(n,e,t,r=-1){if(Le.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Le.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ta(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ta(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ta(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,a=()=>o||(o=ZQ(n,e,t));return n.state.facet(Tk).some(l=>l(n,e.from,e.to,s,a))||n.dispatch(a()),!0}function ZQ(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,c=l<0?s.from:s.to,u=Gl(i.facet(Vc).map(f=>f(n)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:pe.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let l=i.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),f,d=t&&Ik(n,t.main.head);if(d){let m=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-m}}else f=n.state.doc.lineAt(s.head);let h=s.to-e.to;r=i.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:c||m.map(l)};let p=m.to-h,O=p-u.length;if(n.state.sliceDoc(O,p)!=u||p>=f.from&&O<=f.to)return{range:m};let v=i.changes({from:O,to:p,insert:e.insert}),b=m.to-s.to;return{changes:v,range:c?pe.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):m.map(v)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,a+=".compose",n.inputState.compositionFirstChange&&(a+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function zk(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,a=e.length;for(;o>0&&a>0&&n.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));t-=o+l-s}if(o<s&&n.length<e.length){let l=t<=s&&t>=o?s-t:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=t<=s&&t>=a?s-t:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function XQ(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new jb(t,r)),(i!=t||s!=r)&&e.push(new jb(i,s))),e}function FQ(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?pe.single(t+e,r+e):null}function Mf(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class VQ{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Le.safari&&e.contentDOM.addEventListener("input",()=>null),Le.gecko&&a5(e.contentDOM.ownerDocument)}handleEvent(e){!e5(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=WQ(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Xk.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Le.android&&Le.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Le.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Zk.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||YQ.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ta(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Le.safari&&!Le.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function zb(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Ir(t.state,i)}}}function WQ(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&t(a).handlers.push(zb(r.value,l))}if(o)for(let a in o){let l=o[a];l&&t(a).observers.push(zb(r.value,l))}}for(let r in _i)t(r).handlers.push(_i[r]);for(let r in si)t(r).observers.push(si[r]);return e}const Zk=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],YQ="dthko",Xk=[16,17,18,20,91,92,224,225],fu=6;function du(n){return Math.max(0,n)*.7+8}function UQ(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class GQ{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=G$(e.contentDOM),this.atoms=e.state.facet(Vc).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Mt.allowMultipleSelections)&&HQ(e,t),this.dragging=JQ(e,t)&&Wk(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&UQ(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=yO(this.view);e.clientX-l.left<=i+fu?t=-du(i-e.clientX):e.clientX+l.right>=o-fu&&(t=du(e.clientX-o)),e.clientY-l.top<=s+fu?r=-du(s-e.clientY):e.clientY+l.bottom>=a-fu&&(r=du(e.clientY-a)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=Nk(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function HQ(n,e){let t=n.state.facet(xk);return t.length?t[0](e):Le.mac?e.metaKey:e.ctrlKey}function KQ(n,e){let t=n.state.facet(Sk);return t.length?t[0](e):Le.mac?!e.altKey:!e.ctrlKey}function JQ(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=fc(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function e5(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=$n.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),si=Object.create(null),Fk=Le.ie&&Le.ie_version<15||Le.ios&&Le.webkit_version<604;function t5(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Vk(n,t.value)},50)}function jd(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function Vk(n,e){e=jd(n.state,gO,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(vm!=null&&t.selection.ranges.every(l=>l.empty)&&vm==s.toString()){let l=-1;r=t.changeByRange(c=>{let u=t.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:pe.cursor(c.from+f.length)}})}else o?r=t.changeByRange(l=>{let c=s.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:pe.cursor(l.from+c.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}si.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};_i.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);si.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};si.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};_i.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(Ak))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=r5(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new GQ(n,e,t,r)),r&&n.observer.ignore(()=>{mk(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function Zb(n,e,t,r){if(r==1)return pe.cursor(e,t);if(r==2)return QQ(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<n.state.doc.length&&a==s.to&&a++,pe.range(o,a)}}const n5=Le.ie&&Le.ie_version<=11;let Xb=null,Fb=0,Vb=0;function Wk(n){if(!n5)return n.detail;let e=Xb,t=Vb;return Xb=n,Vb=Date.now(),Fb=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Fb+1)%3:1}function r5(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=Wk(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,a){let l=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=Zb(n,l.pos,l.assoc,r);if(t.pos!=l.pos&&!o){let f=Zb(n,t.pos,t.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?pe.range(d,h):pe.range(h,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=i5(i,l.pos))?c:a?i.addRange(u):pe.create([u])}}}function i5(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return pe.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}_i.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=pe.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",jd(n.state,OO,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_i.dragend=n=>(n.inputState.draggedContent=null,!1);function Wb(n,e,t,r){if(t=jd(n.state,gO,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&KQ(n,e)?{from:s.from,to:s.to}:null,a={from:i,insert:t},l=n.state.changes(o?[o,a]:a);n.focus(),n.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}_i.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&Wb(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Wb(n,e,r,!0),!0}return!1};_i.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Fk?null:e.clipboardData;return t?(Vk(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(t5(n),!1)};function s5(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function o5(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:jd(n,OO,e.join(n.lineBreak)),ranges:t,linewise:r}}let vm=null;_i.copy=_i.cut=(n,e)=>{if(!Yl(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=o5(n.state);if(!t&&!i)return!1;vm=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Fk?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(s5(n,t),!1)};const Yk=_s.define();function Uk(n,e){let t=[];for(let r of n.facet(Pk)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:Yk.of(!0)}):null}function Gk(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=Uk(n.state,e);t?n.dispatch(t):n.update([])}},10)}si.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Gk(n)};si.blur=n=>{n.observer.clearSelectionRange(),Gk(n)};si.compositionstart=si.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};si.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Le.chrome&&Le.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};si.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};_i.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=n.posAtDOM(a.startContainer,a.startOffset),c=n.posAtDOM(a.endContainer,a.endOffset);return wO(n,{from:l,to:c,insert:n.state.toText(s)},null),!0}}let i;if(Le.chrome&&Le.android&&(i=Zk.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Le.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Le.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>si.compositionend(n,e),20),!1};const Yb=new Set;function a5(n){Yb.has(n)||(Yb.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Ub=["pre-wrap","normal","pre-line","break-spaces"];let Za=!1;function Gb(){Za=!1}class l5{constructor(e){this.lineWrapping=e,this.doc=Xt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Ub.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let a=Ub.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class c5{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class hi{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Cr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Io?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new hi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var an=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(an||(an={}));const rf=.001;class ar{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>rf&&(Za=!0),this.height=e)}replace(e,t,r){return ar.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=s.lineAt(l,an.ByPosNoHeight,r.setDoc(t),0,0),h=d.to>=c?d:s.lineAt(c,an.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,an.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let m=_O.build(r.setDoc(o),e,u,f);s=Df(s,s.replace(l,c,m))}return s.updateHeight(r,0)}static empty(){return new Mr(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[t++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new f5(ar.of(e.slice(0,t)),o,ar.of(e.slice(r)))}}function Df(n,e){return n==e?n:(n.constructor!=e.constructor&&(Za=!0),e)}ar.prototype.size=1;const u5=gt.replace({});class Hk extends ar{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new hi(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new hi(i,0,r,this.spaceAbove,u5):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,an.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Mr extends Hk{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new hi(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Mr||i instanceof Vn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Vn?i=new Mr(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):ar.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Vn extends ar{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(t,i);if(t.lineWrapping){let c=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=t.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new hi(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:u,length:f}=t.doc.line(s+c);return new hi(u,f,r+a*c,a,0)}}lineAt(e,t,r,i,s){if(t==an.ByHeight)return this.blockAt(e,r,i,s);if(t==an.ByPosNoHeight){let{from:h,to:m}=r.doc.lineAt(e);return new hi(h,m-h,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-o,d=i+a*f+l*(c.from-s-f);return new hi(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=t;){let d=r.doc.lineAt(u);if(u==e){let m=d.number-a;f+=l*m+c*(e-s-m)}let h=l+c*d.length;o(new hi(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Vn?r[r.length-1]=new Vn(s.length+i):r.push(null,new Vn(i-1))}if(e>0){let s=r[0];s instanceof Vn?r[0]=new Vn(e+s.length):r.unshift(new Vn(e-1),null)}return ar.of(r)}decomposeLeft(e,t){t.push(new Vn(e-1),null)}decomposeRight(e,t){t.push(null,new Vn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],a=Math.max(t,i.from),l=-1;for(i.from>t&&o.push(new Vn(i.from-t-1).updateHeight(e,t));a<=s&&i.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=i.heights[i.index++],d=0;f<0&&(d=-f,f=i.heights[i.index++]),l==-1?l=f:Math.abs(f-l)>=rf&&(l=-2);let h=new Mr(u,f,d);h.outdated=!1,o.push(h),a+=u+1}a<=s&&o.push(null,new Vn(s-a).updateHeight(e,a));let c=ar.of(o);return(l<0||Math.abs(c.height-this.height)>=rf||Math.abs(l-this.heightMetrics(e,t).perLine)>=rf)&&(Za=!0),Df(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class f5 extends ar{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=t==an.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=t==an.ByPosNoHeight?an.ByPosNoHeight:an.ByPos;return l?c.join(this.right.lineAt(a,u,r,o,a)):this.left.lineAt(a,u,r,i,s).join(c)}forEachLine(e,t,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,r,i,s,o),t>=l&&this.right.forEachLine(e,t,r,a,l,o);else{let c=this.lineAt(l,an.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,r,a,l,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&Hb(s,o-1),t<this.length){let a=s.length;this.decomposeRight(t,s),Hb(s,a)}return ar.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ar.of(this.break?[e,null,t]:[e,t]):(this.left=Df(this.left,e),this.right=Df(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,a=t+s.length+this.break,l=null;return i&&i.from<=t+s.length&&i.more?l=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Hb(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Vn&&(r=n[e+1])instanceof Vn&&n.splice(e-1,3,new Vn(t.length+1+r.length))}const d5=5;class _O{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Mr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Mr(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new Hk(o,i,r)):(o||s||i>=d5)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Mr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Vn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Mr)return e;let t=new Mr(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Mr)&&!this.isCovered?this.nodes.push(new Mr(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Mr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new _O(r,e);return qt.spans(t,r,i,s,0),s.finish(r)}}function h5(n,e,t){let r=new p5;return qt.compare(n,e,t,r,0),r.changes}class p5{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&Ca(e,t,this.changes,5)}}function m5(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),a=Math.max(0,t.top),l=Math.min(i.innerHeight,t.bottom);for(let c=n.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==n.parentNode?i.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,l)-(t.top+e)}}function g5(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function O5(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Sh{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return gt.replace({widget:new v5(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class v5 extends Zc{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Kb{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Jb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=bn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(vO).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new l5(t),this.stateDeco=ey(e),this.heightMap=ar.empty().applyChanges(this.stateDeco,Xt.empty,this.heightOracle.setDoc(e.doc),[new Ur(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=gt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new hu(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Jb:new kO(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Il(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=ey(this.state);let i=e.changedRanges,s=Ur.extendWithRanges(i,h5(r,this.stateDeco,e?e.changes:Rn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Gb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Za)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(cQ)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?bn.RTL:bn.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,a=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:C,scaleY:y}=pk(t,a);(C>.005&&Math.abs(this.scaleX-C)>.005||y>.005&&Math.abs(this.scaleY-y)>.005)&&(this.scaleX=C,this.scaleY=y,c|=16,o=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=gk(e.scrollDOM);let m=(this.printing?O5:m5)(t,this.paddingTop),p=m.top-this.pixelViewport.top,O=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!g5(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let C=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(C)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:y,charWidth:w,textHeight:S}=e.docView.measureTextSize();o=y>0&&i.refresh(s,y,w,S,Math.max(5,b/w),C),o&&(e.docView.minWidth=0,c|=16)}p>0&&O>0?u=Math.max(p,O):p<0&&O<0&&(u=Math.min(p,O)),Gb();for(let y of this.viewports){let w=y.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(y);this.heightMap=(o?ar.empty().applyChanges(this.stateDeco,Xt.empty,this.heightOracle,[new Ur(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new c5(y.from,w))}Za&&(c|=2)}let _=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return _&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new hu(i.lineAt(o-r*1e3,an.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,an.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,an.ByPos,s,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new hu(i.lineAt(d-1e3/2,an.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,an.ByHeight,s,0,0).to)}}return l}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new hu(this.heightMap.lineAt(r,an.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,an.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,an.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,an.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new Sh(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=bn.LTR&&!r)return[];let a=[],l=(u,f,d,h)=>{if(f-u<s)return;let m=this.state.selection.main,p=[m.from];m.empty||p.push(m.to);for(let v of p)if(v>u&&v<f){l(u,v-10,d,h),l(v+10,f,d,h);return}let O=y5(e,v=>v.from>=d.from&&v.to<=d.to&&Math.abs(v.from-u)<s&&Math.abs(v.to-f)<s&&!p.some(b=>v.from<b&&v.to>b));if(!O){if(f<d.to&&t&&r&&t.visibleRanges.some(_=>_.from<=f&&_.to>=f)){let _=t.moveToLineBoundary(pe.cursor(f),!1,!0).head;_>u&&(f=_)}let v=this.gapSize(d,u,f,h),b=r||v<2e6?v:2e6;O=new Sh(u,f,v,b)}a.push(O)},c=u=>{if(u.length<o||u.type!=Cr.Text)return;let f=b5(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,m;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,O,v;if(d!=null){let b=mu(f,d),_=((this.visibleBottom-this.visibleTop)/2+p)/u.height;O=b-_,v=b+_}else O=(this.visibleTop-u.top-p)/u.height,v=(this.visibleBottom-u.top+p)/u.height;h=pu(f,O),m=pu(f,v)}else{let p=f.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth,v=0;if(p>2e6)for(let w of e)w.from>=u.from&&w.from<u.to&&w.size!=w.displaySize&&w.from*this.heightOracle.charWidth+v<this.pixelViewport.left&&(v=w.size-w.displaySize);let b=this.pixelViewport.left+v,_=this.pixelViewport.right+v,C,y;if(d!=null){let w=mu(f,d),S=((_-b)/2+O)/p;C=w-S,y=w+S}else C=(b-O)/p,y=(_+O)/p;h=pu(f,C),m=pu(f,y)}h>u.from&&l(u.from,h,u,f),m<u.to&&l(m,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,t,r,i){let s=mu(i,r)-mu(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Sh.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=gt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];qt.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Il(this.heightMap.lineAt(e,an.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Il(this.heightMap.lineAt(this.scaler.fromDOM(e),an.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Il(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class hu{constructor(e,t){this.from=e,this.to=t}}function b5(n,e,t){let r=[],i=n,s=0;return qt.spans(t,n,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function pu({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function mu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function y5(n,e){for(let t of n)if(e(t))return t}const Jb={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function ey(n){let e=n.facet(Id).filter(r=>typeof r!="function"),t=n.facet(bO).filter(r=>typeof r!="function");return t.length&&e.push(qt.join(t)),e}class kO{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=t.lineAt(a,an.ByPos,e,0,0).top,u=t.lineAt(l,an.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof kO?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function Il(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new hi(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>Il(i,e)):n._content)}const gu=Ne.define({combine:n=>n.join(" ")}),bm=Ne.define({combine:n=>n.indexOf(!0)>-1}),ym=Us.newName(),Kk=Us.newName(),Jk=Us.newName(),e2={"&light":"."+Kk,"&dark":"."+Jk};function wm(n,e,t){return new Us(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const w5=wm("."+ym,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},e2),_5={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ah=Le.ie&&Le.ie_version<=11;class k5{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new H$,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Le.ie&&Le.ie_version<=11||Le.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Le.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Le.chrome&&Le.chrome_version<126)&&(this.editContext=new S5(e),e.state.facet(as)&&(e.contentDOM.editContext=this.editContext.editContext)),Ah&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(as)?r.root.activeElement!=this.dom:!Yl(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Le.ie&&Le.ie_version<=11||Le.android&&Le.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Ul(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=fc(e.root);if(!t)return!1;let r=Le.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&x5(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Yl(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&J$(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,_5),Ah&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ah&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ta(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Yl(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new zQ(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=jk(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!Mf(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=ty(t,e.previousSibling||e.target.previousSibling,-1),i=ty(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(as)!=e.state.facet(as)&&(e.view.contentDOM.editContext=e.state.facet(as)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function ty(n,e,t){for(;e;){let r=$n.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function ny(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return Ul(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function x5(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return ny(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?ny(n,t):null}class S5{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let u=zk(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=pe.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));Mf(d,i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:Xt.of(r.text.slice(u.from,u.toB).split(`
153
+ `))};if((Le.mac||Le.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:Xt.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);wO(e,f,pe.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(gt.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:Qk.of(gt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=fc(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,t+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}t+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Pe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||K$(e.parent)||document,this.viewState=new Kb(e.state||Mt.create(e)),e.scrollTo&&e.scrollTo.is(uu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Oa).map(i=>new yh(i));for(let i of this.plugins)i.update(this);this.observer=new k5(this),this.inputState=new VQ(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Nb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof En?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(Yk))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=Uk(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(Mt.phrases)!=this.state.facet(Mt.phrases))return this.setState(s);i=$f.create(this,s,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new Pa(h.empty?h:pe.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(uu)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=qf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(ql)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(gu)!=i.state.facet(gu)&&(this.viewState.mustMeasureContent=!0),(t||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(mm))try{d(i)}catch(h){Ir(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!jk(this,u)&&c.force&&Ta(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Kb(e),this.plugins=e.facet(Oa).map(r=>new yh(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Nb(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Oa),r=e.state.facet(Oa);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new yh(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){Ir(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(gk(r))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(m){return Ir(this.state,m),ry}}),f=$f.create(this,this.state,[]),d=!1;f.flags|=l,t?t.flags|=l:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=ry)try{let m=c[h];m.write&&m.write(u[h],this)}catch(m){Ir(this.state,m)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let m=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(m>1||m<-1){i=i+m,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(mm))a(t)}get themeClasses(){return ym+" "+(this.state.facet(bm)?Jk:Kk)+" "+this.state.facet(gu)}updateAttrs(){let e=iy(this,Lk,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(as)?"true":"false",class:"cm-content",style:`${Le.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),iy(this,vO,t);let r=this.observer.ignore(()=>{let i=Lb(this.contentDOM,this.contentAttrs,t),s=Lb(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Pe.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ql);let e=this.state.facet(Pe.cspNonce);Us.mount(this.root,this.styleModules.concat(w5).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return xh(this,e,Bb(this,e,t,r))}moveByGroup(e,t){return xh(this,e,Bb(this,e,t,r=>qQ(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return pe.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return DQ(this,e,t,r)}moveVertically(e,t,r){return xh(this,e,RQ(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=Om(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Om(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Ni.find(s,e-i.from,-1,t)];return Ef(r,o.dir==bn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ek)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>A5)return _k(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||wk(s.isolates,r=qb(this,e))))return s.order;r||(r=qb(this,e));let i=oQ(e.text,t,r);return this.bidiCache.push(new qf(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Le.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{mk(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return uu.of(new Pa(typeof e=="number"?pe.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return uu.of(new Pa(pe.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return cr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return cr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Us.newName(),i=[gu.of(r),ql.of(wm(`.${r}`,e))];return t&&t.dark&&i.push(bm.of(!0)),i}static baseTheme(e){return ro.lowest(ql.of(wm("."+ym,e,e2)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&$n.get(r)||$n.get(e);return((t=i?.root)===null||t===void 0?void 0:t.view)||null}}Pe.styleModule=ql;Pe.inputHandler=Tk;Pe.clipboardInputFilter=gO;Pe.clipboardOutputFilter=OO;Pe.scrollHandler=$k;Pe.focusChangeEffect=Pk;Pe.perLineTextDirection=Ek;Pe.exceptionSink=Ck;Pe.updateListener=mm;Pe.editable=as;Pe.mouseSelectionStyle=Ak;Pe.dragMovesSelection=Sk;Pe.clickAddsSelectionRange=xk;Pe.decorations=Id;Pe.blockWrappers=Mk;Pe.outerDecorations=bO;Pe.atomicRanges=Vc;Pe.bidiIsolatedRanges=Dk;Pe.scrollMargins=qk;Pe.darkTheme=bm;Pe.cspNonce=Ne.define({combine:n=>n.length?n[0]:""});Pe.contentAttributes=vO;Pe.editorAttributes=Lk;Pe.lineWrapping=Pe.contentAttributes.of({class:"cm-lineWrapping"});Pe.announce=It.define();const A5=4096,ry={};class qf{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:bn.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new qf(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function iy(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&hO(o,t)}return t}const C5=Le.mac?"mac":Le.windows?"win":Le.linux?"linux":"key";function T5(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<t.length-1;++l){const c=t[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Ou(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const P5=ro.default(Pe.domEventHandlers({keydown(n,e){return n2(t2(e.state),n,e,"editor")}})),Yo=Ne.define({enables:P5}),sy=new WeakMap;function t2(n){let e=n.facet(Yo),t=sy.get(e);return t||sy.set(e,t=Q5(e.reduce((r,i)=>r.concat(i),[]))),t}function E5(n,e,t){return n2(t2(n.state),e,n,t)}let Rs=null;const $5=4e3;function Q5(n,e=C5){let t=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var f,d;let h=t[o]||(t[o]=Object.create(null)),m=a.split(/ (?!$)/).map(v=>T5(v,e));for(let v=1;v<m.length;v++){let b=m.slice(0,v).join(" ");i(b,!0),h[b]||(h[b]={preventDefault:!0,stopPropagation:!1,run:[_=>{let C=Rs={view:_,prefix:b,scope:o};return setTimeout(()=>{Rs==C&&(Rs=null)},$5),!0}]})}let p=m.join(" ");i(p,!1);let O=h[p]||(h[p]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&O.run.push(l),c&&(O.preventDefault=!0),u&&(O.stopPropagation=!0)};for(let o of n){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=t[c]||(t[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,_m))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return t}let _m=null;function n2(n,e,t,r){_m=e;let i=Z$(e),s=Ls(i,0),o=mo(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;Rs&&Rs.view==t&&Rs.scope==r&&(a=Rs.prefix+" ",Xk.indexOf(e.keyCode)<0&&(c=!0,Rs=null));let f=new Set,d=O=>{if(O){for(let v of O.run)if(!f.has(v)&&(f.add(v),v(t)))return O.stopPropagation&&(u=!0),!0;O.preventDefault&&(O.stopPropagation&&(u=!0),c=!0)}return!1},h=n[r],m,p;return h&&(d(h[a+Ou(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Le.windows&&e.ctrlKey&&e.altKey)&&!(Le.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(m=Gs[e.keyCode])&&m!=i?(d(h[a+Ou(m,e,!0)])||e.shiftKey&&(p=cc[e.keyCode])!=i&&p!=m&&d(h[a+Ou(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+Ou(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),_m=null,l}function L5(){return D5}const M5=gt.line({class:"cm-activeLine"}),D5=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(M5.range(i.from)),e=i.from)}return gt.set(t)}},{decorations:n=>n.decorations}),vu="-10000px";class q5{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,t){var r;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=t?[]:null;for(let l=0;l<s.length;l++){let c=s[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)o[l]=this.createTooltipView(c,l?o[l-1]:null),a&&(a[l]=!!c.above);else{let f=o[l]=this.tooltipViews[u];a&&(a[l]=t[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return t&&(a.forEach((l,c)=>t[c]=l),t.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function R5(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Ch=Ne.define({combine:n=>{var e,t,r;return{position:Le.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||R5}}}),oy=new WeakMap,r2=cr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Ch);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new q5(n,i2,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Ch);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=vu,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Le.safari){let o=s.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else t=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=yO(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Ch).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:r,scaleX:i,scaleY:s}=n,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=n.pos[a],d=n.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(t.top,r.top)||f.top>=Math.min(t.bottom,r.bottom)||f.right<Math.max(t.left,r.left)-.1||f.left>Math.min(t.right,r.right)+.1)){u.style.top=vu;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,p=d.right-d.left,O=(e=oy.get(c))!==null&&e!==void 0?e:d.bottom-d.top,v=c.offset||N5,b=this.view.textDirection==bn.LTR,_=d.width>r.right-r.left?b?r.left:r.right-d.width:b?Math.max(r.left,Math.min(f.left-(h?14:0)+v.x,r.right-p)):Math.min(Math.max(r.left,f.left-p+(h?14:0)-v.x),r.right-p),C=this.above[a];!l.strictSide&&(C?f.top-O-m-v.y<r.top:f.bottom+O+m+v.y>r.bottom)&&C==r.bottom-f.bottom>f.top-r.top&&(C=this.above[a]=!C);let y=(C?f.top-r.top:r.bottom-f.bottom)-m;if(y<O&&c.resize!==!1){if(y<this.view.defaultLineHeight){u.style.top=vu;continue}oy.set(c,O),u.style.height=(O=y)/s+"px"}else u.style.height&&(u.style.height="");let w=C?f.top-O-m-v.y:f.bottom+m+v.y,S=_+p;if(c.overlap!==!0)for(let A of o)A.left<S&&A.right>_&&A.top<w+O&&A.bottom>w&&(w=C?A.top-O-2-m:A.bottom+m+2);if(this.position=="absolute"?(u.style.top=(w-n.parent.top)/s+"px",ay(u,(_-n.parent.left)/i)):(u.style.top=w/s+"px",ay(u,_/i)),h){let A=f.left+(b?v.x:-v.x)-(_+14-7);h.style.left=A/i+"px"}c.overlap!==!0&&o.push({left:_,top:w,right:S,bottom:w+O}),u.classList.toggle("cm-tooltip-above",C),u.classList.toggle("cm-tooltip-below",!C),c.positioned&&c.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=vu}},{eventObservers:{scroll(){this.maybeMeasure()}}});function ay(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const I5=Pe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),N5={x:0,y:0},i2=Ne.define({enables:[r2,I5]});function s2(n,e){let t=n.plugin(r2);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const ly=Ne.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function o2(n,e){let t=n.plugin(a2),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const a2=cr.fromClass(class{constructor(n){this.input=n.state.facet(Rf),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ly);this.top=new bu(n,!0,e.topContainer),this.bottom=new bu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ly);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new bu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new bu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Rf);if(t!=this.input){let r=t.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(n.view),a.push(u)):(u=this.panels[c],u.update&&u.update(n)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Pe.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class bu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=cy(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=cy(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function cy(n){let e=n.nextSibling;return n.remove(),e}const Rf=Ne.define({enables:a2});function B5(n,e){let t,r=new Promise(o=>t=o),i=o=>j5(o,e,t);n.state.field(Th,!1)?n.dispatch({effects:l2.of(i)}):n.dispatch({effects:It.appendConfig.of(Th.init(()=>[i]))});let s=c2.of(i);return{close:s,result:r.then(o=>((n.win.queueMicrotask||(l=>n.win.setTimeout(l,10)))(()=>{n.state.field(Th).indexOf(i)>-1&&n.dispatch({effects:s})}),o))}}const Th=oi.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(l2)?n=[t.value].concat(n):t.is(c2)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>Rf.computeN([n],e=>e.field(n))}),l2=It.define(),c2=It.define();function j5(n,e,t){let r=e.content?e.content(n,()=>o(null)):null;if(!r){if(r=jn("form"),e.input){let a=jn("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),r.appendChild(jn("label",(e.label||"")+": ",a))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(jn("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let a=0;a<i.length;a++){let l=i[a];l.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(l))}),l.addEventListener("submit",c=>{c.preventDefault(),o(l)})}let s=jn("div",r,jn("button",{onclick:()=>o(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=r.querySelector(e.focus):a=r.querySelector("input")||r.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class Ks extends Ys{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ks.prototype.elementClass="";Ks.prototype.toDOM=void 0;Ks.prototype.mapMode=or.TrackBefore;Ks.prototype.startSide=Ks.prototype.endSide=-1;Ks.prototype.point=!0;const sf=Ne.define(),z5=Ne.define(),of=Ne.define(),uy=Ne.define({combine:n=>n.some(e=>e)});function Z5(n){return[X5]}const X5=cr.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(of).map(e=>new dy(n,e)),this.fixed=!n.state.facet(uy);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(uy)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=qt.iter(this.view.state.facet(sf),this.view.viewport.from),r=[],i=this.gutters.map(s=>new F5(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Cr.Text&&o){km(t,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==Cr.Text){km(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(of),t=n.state.facet(of),r=n.docChanged||n.heightChanged||n.viewportChanged||!qt.eq(n.startState.facet(sf),n.state.facet(sf),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new dy(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>Pe.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==bn.LTR?{left:r,right:i}:{right:r,left:i}})});function fy(n){return Array.isArray(n)?n:[n]}function km(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class F5{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=qt.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let a=new u2(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];km(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(z5)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class dy{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=fy(t.markers(e)),t.initialSpacer&&(this.spacer=new u2(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=fy(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!qt.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class u2{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),V5(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<t.length?t[s++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function V5(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const W5=Ne.define(),Y5=Ne.define(),va=Ne.define({combine(n){return zc(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Ph extends Ks{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Eh(n,e){return n.state.facet(va).formatNumber(e,n.state)}const U5=of.compute([va],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(W5)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Ph(Eh(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(Y5)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(va)!=e.state.facet(va),initialSpacer(e){return new Ph(Eh(e,hy(e.state.doc.lines)))},updateSpacer(e,t){let r=Eh(t.view,hy(t.view.state.doc.lines));return r==e.number?e:new Ph(r)},domEventHandlers:n.facet(va).domEventHandlers,side:"before"}));function G5(n={}){return[va.of(n),Z5(),U5]}function hy(n){let e=9;for(;e<n;)e=e*10+9;return e}const H5=new class extends Ks{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},K5=sf.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(H5.range(i)))}return qt.of(e)});function J5(){return K5}const f2=1024;let eL=0;class Gr{constructor(e,t){this.from=e,this.to=t}}class st{constructor(e={}){this.id=eL++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ln.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}st.closedBy=new st({deserialize:n=>n.split(" ")});st.openedBy=new st({deserialize:n=>n.split(" ")});st.group=new st({deserialize:n=>n.split(" ")});st.isolate=new st({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});st.contextHash=new st({perNode:!0});st.lookAhead=new st({perNode:!0});st.mounted=new st({perNode:!0});class Ea{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[st.mounted.id]}}const tL=Object.create(null);class Ln{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):tL,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Ln(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(st.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(st.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Ln.none=new Ln("",Object.create(null),0,8);class ll{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let a=o[1],l=o[0];l.combine&&l.id in i&&(a=l.combine(i[l.id],a)),i[l.id]=a}}t.push(i?new Ln(r.name,i,r.id,r.flags):r)}return new ll(t)}}const yu=new WeakMap,py=new WeakMap;var Wt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(Wt||(Wt={}));class yt{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=Ea.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new If(this.topNode,e)}cursorAt(e,t=0,r=0){let i=yu.get(this)||this.topNode,s=new If(i);return s.moveTo(e,t),yu.set(this,s._tree),s}get topNode(){return new tr(this,0,0,null)}resolve(e,t=0){let r=hc(yu.get(this)||this.topNode,e,t,!1);return yu.set(this,r),r}resolveInner(e,t=0){let r=hc(py.get(this)||this.topNode,e,t,!0);return py.set(this,r),r}resolveStack(e,t=0){return iL(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&Wt.IncludeAnonymous)>0;for(let l=this.cursor(o|Wt.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:AO(Ln.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new yt(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new yt(Ln.none,t,r,i)))}static build(e){return sL(e)}}yt.empty=new yt(Ln.none,[],[],0);class xO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new xO(this.buffer,this.index)}}class Js{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Ln.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=t&&!(d2(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let a=e,l=0;a<t;){s[l++]=i[a++],s[l++]=i[a++]-r;let c=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,c)}return new Js(s,o,this.set)}}function d2(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function hc(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof tr&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:Wt.IgnoreOverlays;if(r)for(let o=n,a=o.parent;a;o=a,a=o.parent)o instanceof tr&&o.index<0&&((i=a.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=a);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class h2{cursor(e=0){return new If(this,e)}getChild(e,t=null,r=null){let i=my(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return my(this,e,t,r)}resolve(e,t=0){return hc(this,e,t,!1)}resolveInner(e,t=0){return hc(this,e,t,!0)}matchContext(e){return xm(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class tr extends h2{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=t>0?a.length:-1;e!=c;e+=t){let u=a[e],f=l[e]+o.from,d;if(!(!(s&Wt.EnterBracketed&&u instanceof yt&&(d=Ea.get(u))&&!d.overlay&&d.bracketed&&r>=f&&r<=f+u.length)&&!d2(i,r,f,f+u.length))){if(u instanceof Js){if(s&Wt.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,t,r-f,i);if(h>-1)return new Bi(new nL(o,u,e,f),null,h)}else if(s&Wt.IncludeAnonymous||!u.type.isAnonymous||SO(u)){let h;if(!(s&Wt.IgnoreMounts)&&(h=Ea.get(u))&&!h.overlay)return new tr(h.tree,f,e,o);let m=new tr(u,f,e,o);return s&Wt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(t<0?u.children.length-1:0,t,r,i,s)}}}if(s&Wt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&Wt.IgnoreOverlays)&&(i=Ea.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Wt.EnterBracketed&&i.bracketed;for(let{from:a,to:l}of i.overlay)if((t>0||o?a<=s:a<s)&&(t<0||o?l>=s:l>s))return new tr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function my(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function xm(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class nL{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Bi extends h2{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new Bi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Wt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Bi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Bi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Bi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new yt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function p2(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof tr&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new rL(i,t)}class rL{constructor(e,t){this.heads=e,this.node=t}get next(){return p2(this.heads)}}function iL(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof tr?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=Ea.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new tr(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(hc(a,e,t,!1))}}return i?p2(i):r}class If{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Wt.EnterBracketed,e instanceof tr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof tr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&Wt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Wt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Wt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&Wt.IncludeAnonymous||a instanceof Js||!a.type.isAnonymous||SO(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new Bi(this.buffer,t,this.stack[i]);return this.bufferNode=new Bi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return xm(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return xm(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function SO(n){return n.children.some(e=>e instanceof Js||!e.type.isAnonymous||SO(e))}function sL(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=f2,reused:s=[],minRepeatType:o=r.types.length}=n,a=Array.isArray(t)?new xO(t,t.length):t,l=r.types,c=0,u=0;function f(y,w,S,A,x,k){let{id:E,start:T,end:$,size:L}=a,P=u,D=c;if(L<0)if(a.next(),L==-1){let ce=s[E];S.push(ce),A.push(T-y);return}else if(L==-3){c=E;return}else if(L==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${L}`);let I=l[E],W,U,ae=T-y;if($-T<=i&&(U=O(a.pos-w,x))){let ce=new Uint16Array(U.size-U.skip),ne=a.pos-U.size,G=ce.length;for(;a.pos>ne;)G=v(U.start,ce,G);W=new Js(ce,$-U.start,r),ae=U.start-y}else{let ce=a.pos-L;a.next();let ne=[],G=[],oe=E>=o?E:-1,ie=0,j=$;for(;a.pos>ce;)oe>=0&&a.id==oe&&a.size>=0?(a.end<=j-i&&(m(ne,G,T,ie,a.end,j,oe,P,D),ie=ne.length,j=a.end),a.next()):k>2500?d(T,ce,ne,G):f(T,ce,ne,G,oe,k+1);if(oe>=0&&ie>0&&ie<ne.length&&m(ne,G,T,ie,T,j,oe,P,D),ne.reverse(),G.reverse(),oe>-1&&ie>0){let te=h(I,D);W=AO(I,ne,G,0,ne.length,0,$-T,te,te)}else W=p(I,ne,G,$-T,P-$,D)}S.push(W),A.push(ae)}function d(y,w,S,A){let x=[],k=0,E=-1;for(;a.pos>w;){let{id:T,start:$,end:L,size:P}=a;if(P>4)a.next();else{if(E>-1&&$<E)break;E<0&&(E=L-i),x.push(T,$,L),k++,a.next()}}if(k){let T=new Uint16Array(k*4),$=x[x.length-2];for(let L=x.length-3,P=0;L>=0;L-=3)T[P++]=x[L],T[P++]=x[L+1]-$,T[P++]=x[L+2]-$,T[P++]=P;S.push(new Js(T,x[2]-$,r)),A.push($-y)}}function h(y,w){return(S,A,x)=>{let k=0,E=S.length-1,T,$;if(E>=0&&(T=S[E])instanceof yt){if(!E&&T.type==y&&T.length==x)return T;($=T.prop(st.lookAhead))&&(k=A[E]+T.length+$)}return p(y,S,A,x,k,w)}}function m(y,w,S,A,x,k,E,T,$){let L=[],P=[];for(;y.length>A;)L.push(y.pop()),P.push(w.pop()+S-x);y.push(p(r.types[E],L,P,k-x,T-k,$)),w.push(x-S)}function p(y,w,S,A,x,k,E){if(k){let T=[st.contextHash,k];E=E?[T].concat(E):[T]}if(x>25){let T=[st.lookAhead,x];E=E?[T].concat(E):[T]}return new yt(y,w,S,A,E)}function O(y,w){let S=a.fork(),A=0,x=0,k=0,E=S.end-i,T={size:0,start:0,skip:0};e:for(let $=S.pos-y;S.pos>$;){let L=S.size;if(S.id==w&&L>=0){T.size=A,T.start=x,T.skip=k,k+=4,A+=4,S.next();continue}let P=S.pos-L;if(L<0||P<$||S.start<E)break;let D=S.id>=o?4:0,I=S.start;for(S.next();S.pos>P;){if(S.size<0)if(S.size==-3||S.size==-4)D+=4;else break e;else S.id>=o&&(D+=4);S.next()}x=I,A+=L,k+=D}return(w<0||A==y)&&(T.size=A,T.start=x,T.skip=k),T.size>4?T:void 0}function v(y,w,S){let{id:A,start:x,end:k,size:E}=a;if(a.next(),E>=0&&A<o){let T=S;if(E>4){let $=a.pos-(E-4);for(;a.pos>$;)S=v(y,w,S)}w[--S]=T,w[--S]=k-y,w[--S]=x-y,w[--S]=A}else E==-3?c=A:E==-4&&(u=A);return S}let b=[],_=[];for(;a.pos>0;)f(n.start||0,n.bufferStart||0,b,_,-1,0);let C=(e=n.length)!==null&&e!==void 0?e:b.length?_[0]+b[0].length:0;return new yt(l[n.topID],b.reverse(),_.reverse(),C)}const gy=new WeakMap;function af(n,e){if(!n.isAnonymous||e instanceof Js||e.type!=n)return 1;let t=gy.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof yt)){t=1;break}t+=af(n,r)}gy.set(e,t)}return t}function AO(n,e,t,r,i,s,o,a,l){let c=0;for(let m=r;m<i;m++)c+=af(n,e[m]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(m,p,O,v,b){for(let _=O;_<v;){let C=_,y=p[_],w=af(n,m[_]);for(_++;_<v;_++){let S=af(n,m[_]);if(w+S>=u)break;w+=S}if(_==C+1){if(w>u){let S=m[C];h(S.children,S.positions,0,S.children.length,p[C]+b);continue}f.push(m[C])}else{let S=p[_-1]+m[_-1].length-y;f.push(AO(n,m,p,C,_,y,S,null,l))}d.push(y+b-s)}}return h(e,t,r,i,0),(a||l)(f,d,o)}class m2{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Bi?this.setBuffer(e.context.buffer,e.index,t):e instanceof tr&&this.map.set(e.tree,t)}get(e){return e instanceof Bi?this.getBuffer(e.context.buffer,e.index):e instanceof tr?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ms{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new ms(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<t.length?t[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;o&&o.from<f;){let d=o;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,m=Math.min(d.to,f)-c;d=h>=m?null:new ms(h,m,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),o.to>f)break;o=s<e.length?e[s++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class zd{startParse(e,t,r){return typeof e=="string"&&(e=new oL(e)),r=r?r.length?r.map(i=>new Gr(i.from,i.to)):[new Gr(0,0)]:[new Gr(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class oL{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function g2(n){return(e,t,r,i)=>new lL(e,n,t,r,i)}class Oy{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function vy(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class aL{constructor(e,t,r,i,s,o,a,l){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const Sm=new st({perNode:!0});class lL{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new yt(r.type,r.children,r.positions,r.length,r.propValues.concat([[Sm,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[st.mounted.id]=new Ea(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new fL(this.fragments),t=null,r=null,i=new If(new tr(this.baseTree,this.ranges[0].from,0,null),Wt.IncludeAnonymous|Wt.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(t){let c=t.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!t.ranges.some(h=>h.from<d&&h.to>f)&&t.ranges.push({from:f,to:d})}}a=!1}else if(r&&(o=cL(r.ranges,i.from,i.to)))a=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(uL(i),t&&t.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new aL(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let u=wy(this.ranges,s.overlay||(i.from<i.to?[new Gr(i.from,i.to)]:[]));u.length&&vy(u),(u.length||!s.overlay)&&this.inner.push(new Oy(s.parser,u.length?s.parser.startParse(this.input,_y(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Gr(f.from-i.from,f.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(t&&(l=t.predicate(i))&&(l===!0&&(l=new Gr(i.from,i.to)),l.from<l.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==l.from?t.ranges[c]={from:t.ranges[c].from,to:l.to}:t.ranges.push(l)}if(a&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let c=wy(this.ranges,t.ranges);c.length&&(vy(c),this.inner.splice(t.index,0,new Oy(t.parser,t.parser.startParse(this.input,_y(t.mounts,c),c),t.ranges.map(u=>new Gr(u.from-t.start,u.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function cL(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function by(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function uL(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,f,d,h,m,p){let O=t[p],v=[],b=[];by(o,u,O,v,b,h);let _=a[O+1],C=a[O+2];l.push(v.length);let y=p?c(O+4,a[O+3],o.set.types[a[O]],_,C-_,p-1):e.toTree();return v.push(y),b.push(_-h),by(o,a[O+3],f,v,b,h),new yt(d,v,b,m)}i.children[s]=c(0,a.length,Ln.none,0,o.length,t.length-1);for(let u of l){let f=n.tree.children[u],d=n.tree.positions[u];n.yield(new tr(f,d+n.from,u,n._tree))}}class yy{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Wt.IncludeAnonymous|Wt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Wt.IgnoreOverlays|Wt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof yt)t=t.children[0];else break}return!1}}let fL=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(Sm))!==null&&t!==void 0?t:r.to,this.inner=new yy(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Sm))!==null&&e!==void 0?e:t.to,this.inner=new yy(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(st.mounted);if(o&&o.parser==t)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=s.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:s.from-l.offset,mount:o})}}}return i}};function wy(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,a=n[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(t||(r=t=e.slice()),l.from<o?(t[s]=new Gr(l.from,o),l.to>a&&t.splice(s+1,0,new Gr(a,l.to))):l.to>a?t[s--]=new Gr(a,l.to):t.splice(s--,1))}}return r}function dL(n,e,t,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==n.length?1e9:o?n[i].to:n[i].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,t),h=Math.min(u,f,r);d<h&&c.push(new Gr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(o?(o=!1,i++):o=!0),f==l&&(a?(a=!1,s++):a=!0)}return c}function _y(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),c=Math.min(s.to,a);if(i.overlay){let u=i.overlay.map(d=>new Gr(d.from+r,d.to+r)),f=dL(e,u,l,c);for(let d=0,h=l;;d++){let m=d==f.length,p=m?c:f[d].from;if(p>h&&t.push(new ms(h,p,i.tree,-o,s.from>=h||s.openStart,s.to<=p||s.openEnd)),m)break;h=f[d].to}}else t.push(new ms(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return t}let hL=0,qi=class Am{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=hL++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Am&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new Am(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new Nf(e);return r=>r.modified.indexOf(t)>-1?r:Nf.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}},pL=0;class Nf{constructor(e){this.name=e,this.instances=[],this.id=pL++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(a=>a.base==e&&mL(t,a.modified));if(r)return r;let i=[],s=new qi(e.name,i,e,t);for(let a of t)a.instances.push(s);let o=gL(t);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(Nf.get(a,l));return s}}function mL(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function gL(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function cl(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],o=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new pc(r,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return O2.add(e)}const O2=new st({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new pc(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class pc{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}pc.empty=new pc([],2,null);function v2(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let c=t[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function OL(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function vL(n,e,t,r=0,i=n.length){let s=new bL(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class bL{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=t)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=i,u=yL(e)||pc.empty,f=OL(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(t,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(st.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),m=this.highlighters.filter(O=>!O.scope||O.scope(d.tree.type)),p=e.firstChild();for(let O=0,v=a;;O++){let b=O<d.overlay.length?d.overlay[O]:null,_=b?b.from+a:l,C=Math.max(t,v),y=Math.min(r,_);if(C<y&&p)for(;e.from<y&&(this.highlightRange(e,C,y,i,s),this.startSpan(Math.min(y,e.to),c),!(e.to>=_||!e.nextSibling())););if(!b||_>r)break;v=b.to+a,v>t&&(this.highlightRange(h.cursor(),Math.max(t,b.from+a),Math.min(r,v),"",m),this.startSpan(Math.min(r,v),c))}p&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function yL(n){let e=n.type.prop(O2);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Se=qi.define,wu=Se(),Ms=Se(),ky=Se(Ms),xy=Se(Ms),Ds=Se(),_u=Se(Ds),$h=Se(Ds),Di=Se(),oo=Se(Di),Ei=Se(),$i=Se(),Cm=Se(),bl=Se(Cm),ku=Se(),N={comment:wu,lineComment:Se(wu),blockComment:Se(wu),docComment:Se(wu),name:Ms,variableName:Se(Ms),typeName:ky,tagName:Se(ky),propertyName:xy,attributeName:Se(xy),className:Se(Ms),labelName:Se(Ms),namespace:Se(Ms),macroName:Se(Ms),literal:Ds,string:_u,docString:Se(_u),character:Se(_u),attributeValue:Se(_u),number:$h,integer:Se($h),float:Se($h),bool:Se(Ds),regexp:Se(Ds),escape:Se(Ds),color:Se(Ds),url:Se(Ds),keyword:Ei,self:Se(Ei),null:Se(Ei),atom:Se(Ei),unit:Se(Ei),modifier:Se(Ei),operatorKeyword:Se(Ei),controlKeyword:Se(Ei),definitionKeyword:Se(Ei),moduleKeyword:Se(Ei),operator:$i,derefOperator:Se($i),arithmeticOperator:Se($i),logicOperator:Se($i),bitwiseOperator:Se($i),compareOperator:Se($i),updateOperator:Se($i),definitionOperator:Se($i),typeOperator:Se($i),controlOperator:Se($i),punctuation:Cm,separator:Se(Cm),bracket:bl,angleBracket:Se(bl),squareBracket:Se(bl),paren:Se(bl),brace:Se(bl),content:Di,heading:oo,heading1:Se(oo),heading2:Se(oo),heading3:Se(oo),heading4:Se(oo),heading5:Se(oo),heading6:Se(oo),contentSeparator:Se(Di),list:Se(Di),quote:Se(Di),emphasis:Se(Di),strong:Se(Di),link:Se(Di),monospace:Se(Di),strikethrough:Se(Di),inserted:Se(),deleted:Se(),changed:Se(),invalid:Se(),meta:ku,documentMeta:Se(ku),annotation:Se(ku),processingInstruction:Se(ku),definition:qi.defineModifier("definition"),constant:qi.defineModifier("constant"),function:qi.defineModifier("function"),standard:qi.defineModifier("standard"),local:qi.defineModifier("local"),special:qi.defineModifier("special")};for(let n in N){let e=N[n];e instanceof qi&&(e.name=n)}v2([{tag:N.link,class:"tok-link"},{tag:N.heading,class:"tok-heading"},{tag:N.emphasis,class:"tok-emphasis"},{tag:N.strong,class:"tok-strong"},{tag:N.keyword,class:"tok-keyword"},{tag:N.atom,class:"tok-atom"},{tag:N.bool,class:"tok-bool"},{tag:N.url,class:"tok-url"},{tag:N.labelName,class:"tok-labelName"},{tag:N.inserted,class:"tok-inserted"},{tag:N.deleted,class:"tok-deleted"},{tag:N.literal,class:"tok-literal"},{tag:N.string,class:"tok-string"},{tag:N.number,class:"tok-number"},{tag:[N.regexp,N.escape,N.special(N.string)],class:"tok-string2"},{tag:N.variableName,class:"tok-variableName"},{tag:N.local(N.variableName),class:"tok-variableName tok-local"},{tag:N.definition(N.variableName),class:"tok-variableName tok-definition"},{tag:N.special(N.variableName),class:"tok-variableName2"},{tag:N.definition(N.propertyName),class:"tok-propertyName tok-definition"},{tag:N.typeName,class:"tok-typeName"},{tag:N.namespace,class:"tok-namespace"},{tag:N.className,class:"tok-className"},{tag:N.macroName,class:"tok-macroName"},{tag:N.propertyName,class:"tok-propertyName"},{tag:N.operator,class:"tok-operator"},{tag:N.comment,class:"tok-comment"},{tag:N.meta,class:"tok-meta"},{tag:N.invalid,class:"tok-invalid"},{tag:N.punctuation,class:"tok-punctuation"}]);var Qh;const Ns=new st;function Zd(n){return Ne.define({combine:n?e=>e.concat(n):void 0})}const CO=new st;class Nr{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Mt.prototype.hasOwnProperty("tree")||Object.defineProperty(Mt.prototype,"tree",{get(){return wn(this)}}),this.parser=t,this.extension=[Va.of(this),Mt.languageData.of((s,o,a)=>{let l=Sy(s,o,a),c=l.type.prop(Ns);if(!c)return[];let u=s.facet(c),f=l.type.prop(CO);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let m=s.facet(h.facet);return h.type=="replace"?m:m.concat(u)}}return u})].concat(r)}isActiveAt(e,t,r=-1){return Sy(e,t,r).type.prop(Ns)==this.data}findRegions(e){let t=e.facet(Va);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Ns)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(st.mounted);if(a){if(a.tree.prop(Ns)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let c=s.children[l];c instanceof yt&&i(c,s.positions[l]+o)}};return i(wn(e),0),r}get allowsNesting(){return!0}}Nr.setState=It.define();function Sy(n,e,t){let r=n.facet(Va),i=wn(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,Wt.ExcludeBuffers|Wt.EnterBracketed))s.type.isTop&&(i=s);return i}class Xa extends Nr{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Zd(e.languageData);return new Xa(t,e.parser.configure({props:[Ns.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new Xa(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function wn(n){let e=n.field(Nr.state,!1);return e?e.tree:yt.empty}class wL{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let yl=null;class jo{constructor(e,t,r=[],i,s,o,a,l){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new jo(e,t,[],yt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new wL(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=yt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(ms.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ms.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=yl;yl=this;try{return e()}finally{yl=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Ay(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=ms.applyChanges(r,l),i=yt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new jo(this.parser,t,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=Ay(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends zd{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=yl;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new yt(Ln.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return yl}}function Ay(n,e,t){return ms.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Fa{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Fa(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=jo.create(e.facet(Va).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Fa(r)}}Nr.state=oi.define({create:Fa.init,update(n,e){for(let t of e.effects)if(t.is(Nr.setState))return t.value;return e.startState.facet(Va)!=e.state.facet(Va)?Fa.init(e.state):n.apply(e)}});let b2=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(b2=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Lh=typeof navigator<"u"&&(!((Qh=navigator.scheduling)===null||Qh===void 0)&&Qh.isInputPending)?()=>navigator.scheduling.isInputPending():null,_L=cr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Nr.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Nr.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=b2(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Nr.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Lh?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>Lh&&Lh()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Nr.setState.of(new Fa(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ir(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Va=Ne.define({combine(n){return n.length?n[0]:null},enables:n=>[Nr.state,_L,Pe.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Wa{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class J{constructor(e,t,r,i,s,o=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new J(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let o=t.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+s.length])))return i}return null}}const kL=Ne.define(),Wc=Ne.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function zo(n){let e=n.facet(Wc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Bf(n,e){let t="",r=n.tabSize,i=n.facet(Wc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function y2(n,e){n instanceof Mt&&(n=new Xd(n));for(let r of n.state.facet(kL)){let i=r(n,e);if(i!==void 0)return i}let t=wn(n.state);return t.length>=e?xL(n,t,e):null}class Xd{constructor(e,t={}){this.state=e,this.options=t,this.unit=zo(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return Os(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ul=new st;function xL(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return w2(r,n,t)}function w2(n,e,t){for(let r=n;r;r=r.next){let i=AL(r.node);if(i)return i(TO.create(e,t,r))}return 0}function SL(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function AL(n){let e=n.type.prop(ul);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(st.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>_2(o,!0,1,void 0,s&&!SL(o)?i.from:void 0)}return n.parent==null?CL:null}function CL(){return 0}class TO extends Xd{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new TO(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(TL(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return w2(this.context.next,this.base,this.pos)}}function TL(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function PL(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=t.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+c}}a=l.to}}function EL({closing:n,align:e=!0,units:t=1}){return r=>_2(r,e,t,n)}function _2(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==n.pos+o,l=e?PL(n):null;return l?a?n.column(l.from):n.column(l.to):n.baseIndent+(a?0:n.unit*t)}const $L=n=>n.baseIndent;function lf({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const QL=Ne.define(),Yc=new st;function k2(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}class fl{constructor(e,t){this.specs=e;let r;function i(a){let l=Us.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Nr?a=>a.prop(Ns)==o.data:o?a=>a==o:void 0,this.style=v2(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new Us(r):null,this.themeType=t.themeType}static define(e,t){return new fl(e,t||{})}}const Tm=Ne.define(),x2=Ne.define({combine(n){return n.length?[n[0]]:null}});function Mh(n){let e=n.facet(Tm);return e.length?e:n.facet(x2)}function mc(n,e){let t=[ML],r;return n instanceof fl&&(n.module&&t.push(Pe.styleModule.of(n.module)),r=n.themeType),e?.fallback?t.push(x2.of(n)):r?t.push(Tm.computeN([Pe.darkTheme],i=>i.facet(Pe.darkTheme)==(r=="dark")?[n]:[])):t.push(Tm.of(n)),t}class LL{constructor(e){this.markCache=Object.create(null),this.tree=wn(e.state),this.decorations=this.buildDeco(e,Mh(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=wn(e.state),r=Mh(e.state),i=r!=Mh(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return gt.none;let r=new Ro;for(let{from:i,to:s}of e.visibleRanges)vL(this.tree,t,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=gt.mark({class:l})))},i,s);return r.finish()}}const ML=ro.high(cr.fromClass(LL,{decorations:n=>n.decorations})),S2=fl.define([{tag:N.meta,color:"#404740"},{tag:N.link,textDecoration:"underline"},{tag:N.heading,textDecoration:"underline",fontWeight:"bold"},{tag:N.emphasis,fontStyle:"italic"},{tag:N.strong,fontWeight:"bold"},{tag:N.strikethrough,textDecoration:"line-through"},{tag:N.keyword,color:"#708"},{tag:[N.atom,N.bool,N.url,N.contentSeparator,N.labelName],color:"#219"},{tag:[N.literal,N.inserted],color:"#164"},{tag:[N.string,N.deleted],color:"#a11"},{tag:[N.regexp,N.escape,N.special(N.string)],color:"#e40"},{tag:N.definition(N.variableName),color:"#00f"},{tag:N.local(N.variableName),color:"#30a"},{tag:[N.typeName,N.namespace],color:"#085"},{tag:N.className,color:"#167"},{tag:[N.special(N.variableName),N.macroName],color:"#256"},{tag:N.definition(N.propertyName),color:"#00c"},{tag:N.comment,color:"#940"},{tag:N.invalid,color:"#f00"}]),DL=1e4,qL="()[]{}",A2=new st;function Pm(n,e,t){let r=n.prop(e<0?st.openedBy:st.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function Em(n){let e=n.type.prop(A2);return e?e(n.node):n}function ba(n,e,t,r={}){let i=r.maxScanDistance||DL,s=r.brackets||qL,o=wn(n),a=o.resolveInner(e,t);for(let l=a;l;l=l.parent){let c=Pm(l.type,t,s);if(c&&l.from<l.to){let u=Em(l);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return RL(n,e,t,l,u,c,s)}}return IL(n,e,t,o,a.type,i,s)}function RL(n,e,t,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a?.cursor();if(u&&(t<0?u.childBefore(r.from):u.childAfter(r.to)))do if(t<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=Em(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(Pm(u.type,t,o))c++;else if(Pm(u.type,-t,o)){if(c==0){let f=Em(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(t<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function IL(n,e,t,r,i,s,o){let a=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=t>0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},u=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;t<0&&(d+=h.length);let m=e+d*t;for(let p=t>0?0:h.length-1,O=t>0?h.length:-1;p!=O;p+=t){let v=o.indexOf(h[p]);if(!(v<0||r.resolveInner(m+p,1).type!=i))if(v%2==0==t>0)f++;else{if(f==1)return{start:c,end:{from:m+p,to:m+p+1},matched:v>>1==l>>1};f--}}t>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}function Cy(n,e,t,r=0,i=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let s=i;for(let o=r;o<e;o++)n.charCodeAt(o)==9?s+=t-s%t:s++;return s}class C2{constructor(e,t,r,i){this.string=e,this.tabSize=t,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e instanceof RegExp?e.test(t):e(t)),r)return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Cy(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:Cy(this.string,null,this.tabSize)}match(e,t,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function NL(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||BL,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||$O,mergeTokens:n.mergeTokens!==!1}}function BL(n){if(typeof n!="object")return n;let e={};for(let t in n){let r=n[t];e[t]=r instanceof Array?r.slice():r}return e}const Ty=new WeakMap;class PO extends Nr{constructor(e){let t=Zd(e.languageData),r=NL(e),i,s=new class extends zd{createParse(o,a,l){return new zL(i,o,a,l)}};super(t,s,[],e.name),this.topNode=FL(t,this),i=this,this.streamParser=r,this.stateAfter=new st({perNode:!0}),this.tokenTable=e.tokenTable?new $2(r.tokenTable):XL}static define(e){return new PO(e)}getIndent(e){let t,{overrideIndentation:r}=e.options;r&&(t=Ty.get(e.state),t!=null&&t<e.pos-1e4&&(t=void 0));let i=EO(this,e.node.tree,e.node.from,e.node.from,t??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let l=e.state.doc.lineAt(s),c=Math.min(e.pos,l.to);if(l.length){let u=r?r(l.from):-1,f=new C2(l.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-l.from;)P2(this.streamParser.token,f,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=l.to+1}let a=e.lineAt(e.pos);return r&&t==null&&Ty.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function EO(n,e,t,r,i){let s=t>=r&&t+e.length<=i&&e.prop(n.stateAfter);if(s)return{state:n.streamParser.copyState(s),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=t+e.positions[o],c=a instanceof yt&&l<i&&EO(n,a,l,r,i);if(c)return c}return null}function T2(n,e,t,r,i){if(i&&t<=0&&r>=e.length)return e;!i&&t==0&&e.type==n.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(o<r&&a instanceof yt){if(!(l=T2(n,a,t-o,r-o,i)))break;return i?new yt(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function jL(n,e,t,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=t&&a>t&&EO(n,s.tree,0-s.offset,t,a),c;if(l&&l.pos<=r&&(c=T2(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:c}}return{state:n.streamParser.startState(i?zo(i):4),tree:yt.empty}}let zL=class{constructor(e,t,r,i){this.lang=e,this.input=t,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=jo.get(),o=i[0].from,{state:a,tree:l}=jL(e,r,o,this.to,s?.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let c=0;c<l.children.length;c++)this.chunks.push(l.children[c]),this.chunkPos.push(l.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(zo(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=jo.get(),t=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(t,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==`
154
+ `&&(t="");else{let r=t.indexOf(`
155
+ `);r>-1&&(t=t.slice(0,r))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),r=e+t.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(t=t.slice(0,s-(r-t.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,a=this.lineAfter(o);t+=a,r=o+a.length}return{line:t,end:r}}skipGapsTo(e,t,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+t;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;t+=o-i}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(t,i,1),t+=i;let a=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==t?this.chunk[o+2]=r:this.chunk.push(e,t,r,s),i}parseLine(e){let{line:t,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new C2(t,e?e.state.tabSize:4,e?zo(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=P2(s.token,o,this.state);if(a&&(i=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=yt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:ZL,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new yt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new yt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function P2(n,e,t){e.start=e.pos;for(let r=0;r<10;r++){let i=n(e,t);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const $O=Object.create(null),gc=[Ln.none],ZL=new ll(gc),Py=[],Ey=Object.create(null),E2=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])E2[n]=Q2($O,e);class $2{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),E2)}resolve(e){return e?this.table[e]||(this.table[e]=Q2(this.extra,e)):0}}const XL=new $2($O);function Dh(n,e){Py.indexOf(n)>-1||(Py.push(n),console.warn(e))}function Q2(n,e){let t=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=n[c]||N[c];u?typeof u=="function"?l.length?l=l.map(u):Dh(c,`Modifier ${c} used at start of tag`):l.length?Dh(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Dh(c,`Unknown highlighting tag ${c}`)}for(let c of l)t.push(c)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(a=>a.id),s=Ey[i];if(s)return s.id;let o=Ey[i]=Ln.define({id:gc.length,name:r,props:[cl({[r]:t})]});return gc.push(o),o.id}function FL(n,e){let t=Ln.define({id:gc.length,name:"Document",props:[Ns.add(()=>n),ul.add(()=>r=>e.getIndent(r))],top:!0});return gc.push(t),t}bn.RTL,bn.LTR;const VL=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=LO(n.state,t.from);return r.line?WL(n):r.block?UL(n):!1};function QO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const WL=QO(KL,0),YL=QO(L2,0),UL=QO((n,e)=>L2(n,e,HL(e)),0);function LO(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const wl=50;function GL(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-wl,r),o=n.sliceDoc(i,i+wl),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+t.length)==t)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*wl?u=f=n.sliceDoc(r,i):(u=n.sliceDoc(r,r+wl),f=n.sliceDoc(i-wl,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,m=f.length-h-t.length;return u.slice(d,d+e.length)==e&&f.slice(m,m+t.length)==t?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-t.length,margin:/\s/.test(f.charAt(m-1))?1:0}}:null}function HL(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function L2(n,e,t=e.selection.ranges){let r=t.map(s=>LO(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>GL(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,a;o<i.length;o++)if(a=i[o]){let l=r[o],{open:c,close:u}=a;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function KL(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let a=r.length,l=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=LO(e,f.from).line,!c))continue e;if(f.from>i&&(s==o||o>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,m=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:m,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of r)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const $m=_s.define(),JL=_s.define(),eM=Ne.define(),M2=Ne.define({combine(n){return zc(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),D2=oi.define({create(){return ji.empty},update(n,e){let t=e.state.facet(M2),r=e.annotation($m);if(r){let l=kr.fromTransaction(e,r.selection),c=r.side,u=c==0?n.undone:n.done;return l?u=jf(u,u.length,t.minDepth,l):u=I2(u,e.startState.selection),new ji(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(JL);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(En.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=kr.fromTransaction(e),o=e.annotation(En.time),a=e.annotation(En.userEvent);return s?n=n.addChanges(s,o,a,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new ji(n.done.map(kr.fromJSON),n.undone.map(kr.fromJSON))}});function MO(n={}){return[D2,M2.of(n),Pe.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?q2:e.inputType=="historyRedo"?Qm:null;return r?(e.preventDefault(),r(t)):!1}})]}function Fd(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(D2,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const q2=Fd(0,!1),Qm=Fd(1,!1),tM=Fd(0,!0),nM=Fd(1,!0);class kr{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new kr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new kr(e.changes&&Rn.fromJSON(e.changes),[],e.mapped&&Xi.fromJSON(e.mapped),e.startSelection&&pe.fromJSON(e.startSelection),e.selectionsAfter.map(pe.fromJSON))}static fromTransaction(e,t){let r=Hr;for(let i of e.startState.facet(eM)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new kr(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Hr)}static selection(e){return new kr(void 0,Hr,void 0,void 0,e)}}function jf(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function rM(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<t.length;){let c=t[l++],u=t[l++];a>=c&&o<=u&&(r=!0)}}),r}function iM(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function R2(n,e){return n.length?e.length?n.concat(e):n:e}const Hr=[],sM=200;function I2(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-sM));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),jf(n,n.length-1,1e9,t.setSelAfter(r)))}else return[kr.selection([e])]}function oM(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function qh(n,e){if(!n.length)return n;let t=n.length,r=Hr;for(;t;){let i=aM(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[kr.selection(r)]:Hr}function aM(n,e,t){let r=R2(n.selectionsAfter.length?n.selectionsAfter.map(a=>a.map(e)):Hr,t);if(!n.changes)return kr.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(s):s;return new kr(i,It.mapEffects(n.effects,e),o,n.startSelection.map(s),r)}const lM=/^(input\.type|delete)($|\.)/;class ji{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ji(this.done,this.undone):this}addChanges(e,t,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||lM.test(r))&&(!a.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,rM(a.changes,e.changes))||r=="input.type.compose")?o=jf(o,o.length-1,i.minDepth,new kr(e.changes.compose(a.changes),R2(It.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Hr)):o=jf(o,o.length,i.minDepth,e),new ji(o,Hr,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Hr;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&iM(s[s.length-1],e)?this:new ji(I2(this.done,e),this.undone,t,r)}addMapping(e){return new ji(qh(this.done,e),qh(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:$m.of({side:e,rest:oM(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?Hr:i.slice(0,i.length-1);return s.mapped&&(a=qh(a,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:$m.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ji.empty=new ji(Hr,Hr);const DO=[{key:"Mod-z",run:q2,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Qm,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Qm,preventDefault:!0},{key:"Mod-u",run:tM,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:nM,preventDefault:!0}];function dl(n,e){return pe.create(n.ranges.map(e),n.mainIndex)}function Ai(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ci({state:n,dispatch:e},t){let r=dl(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Ai(n,r)),!0)}function Vd(n,e){return pe.cursor(e?n.to:n.from)}function N2(n,e){return Ci(n,t=>t.empty?n.moveByChar(t,e):Vd(t,e))}function nr(n){return n.textDirectionAt(n.state.selection.main.head)==bn.LTR}const B2=n=>N2(n,!nr(n)),j2=n=>N2(n,nr(n));function z2(n,e){return Ci(n,t=>t.empty?n.moveByGroup(t,e):Vd(t,e))}const cM=n=>z2(n,!nr(n)),uM=n=>z2(n,nr(n));function fM(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Wd(n,e,t){let r=wn(n).resolveInner(e.head),i=t?st.closedBy:st.openedBy;for(let l=e.head;;){let c=t?r.childAfter(l):r.childBefore(l);if(!c)break;fM(n,c,i)?r=c:l=t?c.to:c.from}let s=r.type.prop(i),o,a;return s&&(o=t?ba(n,r.from,1):ba(n,r.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?r.to:r.from,pe.cursor(a,t?-1:1)}const dM=n=>Ci(n,e=>Wd(n.state,e,!nr(n))),hM=n=>Ci(n,e=>Wd(n.state,e,nr(n)));function Z2(n,e){return Ci(n,t=>{if(!t.empty)return Vd(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const X2=n=>Z2(n,!1),F2=n=>Z2(n,!0);function V2(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(Pe.scrollMargins)){let o=s(n);o?.top&&(t=Math.max(o?.top,t)),o?.bottom&&(r=Math.max(o?.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function W2(n,e){let t=V2(n),{state:r}=n,i=dl(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):Vd(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),a=n.scrollDOM.getBoundingClientRect(),l=a.top+t.marginTop,c=a.bottom-t.marginBottom;o&&o.top>l&&o.bottom<c&&(s=Pe.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return n.dispatch(Ai(r,i),{effects:s}),!0}const $y=n=>W2(n,!1),Lm=n=>W2(n,!0);function io(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=pe.cursor(r.from+s))}return i}const pM=n=>Ci(n,e=>io(n,e,!0)),mM=n=>Ci(n,e=>io(n,e,!1)),gM=n=>Ci(n,e=>io(n,e,!nr(n))),OM=n=>Ci(n,e=>io(n,e,nr(n))),vM=n=>Ci(n,e=>pe.cursor(n.lineBlockAt(e.head).from,1)),bM=n=>Ci(n,e=>pe.cursor(n.lineBlockAt(e.head).to,-1));function yM(n,e,t){let r=!1,i=dl(n.selection,s=>{let o=ba(n,s.head,-1)||ba(n,s.head,1)||s.head>0&&ba(n,s.head-1,1)||s.head<n.doc.length&&ba(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return pe.cursor(a)});return r?(e(Ai(n,i)),!0):!1}const wM=({state:n,dispatch:e})=>yM(n,e);function ai(n,e){let t=dl(n.state.selection,r=>{let i=e(r);return pe.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ai(n.state,t)),!0)}function Y2(n,e){return ai(n,t=>n.moveByChar(t,e))}const U2=n=>Y2(n,!nr(n)),G2=n=>Y2(n,nr(n));function H2(n,e){return ai(n,t=>n.moveByGroup(t,e))}const _M=n=>H2(n,!nr(n)),kM=n=>H2(n,nr(n)),xM=n=>ai(n,e=>Wd(n.state,e,!nr(n))),SM=n=>ai(n,e=>Wd(n.state,e,nr(n)));function K2(n,e){return ai(n,t=>n.moveVertically(t,e))}const J2=n=>K2(n,!1),ex=n=>K2(n,!0);function tx(n,e){return ai(n,t=>n.moveVertically(t,e,V2(n).height))}const Qy=n=>tx(n,!1),Ly=n=>tx(n,!0),AM=n=>ai(n,e=>io(n,e,!0)),CM=n=>ai(n,e=>io(n,e,!1)),TM=n=>ai(n,e=>io(n,e,!nr(n))),PM=n=>ai(n,e=>io(n,e,nr(n))),EM=n=>ai(n,e=>pe.cursor(n.lineBlockAt(e.head).from)),$M=n=>ai(n,e=>pe.cursor(n.lineBlockAt(e.head).to)),My=({state:n,dispatch:e})=>(e(Ai(n,{anchor:0})),!0),Dy=({state:n,dispatch:e})=>(e(Ai(n,{anchor:n.doc.length})),!0),qy=({state:n,dispatch:e})=>(e(Ai(n,{anchor:n.selection.main.anchor,head:0})),!0),Ry=({state:n,dispatch:e})=>(e(Ai(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),QM=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),LM=({state:n,dispatch:e})=>{let t=Yd(n).map(({from:r,to:i})=>pe.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:pe.create(t),userEvent:"select"})),!0},MM=({state:n,dispatch:e})=>{let t=dl(n.selection,r=>{let i=wn(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&o.next)return pe.range(a.to,a.from)}return r});return t.eq(n.selection)?!1:(e(Ai(n,t)),!0)};function nx(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let a=s;;){let l=n.moveVertically(a,e);if(l.head<o.from||l.head>o.to){i.some(c=>c.head==l.head)||i.push(l);break}else{if(l.head==a.head)break;a=l}}}return i.length==r.ranges.length?!1:(n.dispatch(Ai(t,pe.create(i,i.length-1))),!0)}const DM=n=>nx(n,!1),qM=n=>nx(n,!0),RM=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=pe.create([t.main]):t.main.empty||(r=pe.create([pe.cursor(t.main.head)])),r?(e(Ai(n,r)),!0):!1};function Uc(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(t="delete.backward",l=xu(n,l,!1)):l>o&&(t="delete.forward",l=xu(n,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=xu(n,o,!1),a=xu(n,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:pe.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Pe.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function xu(n,e,t){if(n instanceof Pe)for(let r of n.state.facet(Pe.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const rx=(n,e,t)=>Uc(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),a,l;if(t&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,i-o.from))){if(a[a.length-1]==" ")return i-1;let c=Os(a,s.tabSize),u=c%zo(s)||zo(s);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)i--;l=i}else l=Zn(o.text,i-o.from,e,e)+o.from,l==i&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,i-o.from))&&(l=Zn(o.text,l-o.from,!1,!1)+o.from);return l}),Mm=n=>rx(n,!1,!0),ix=n=>rx(n,!0,!1),sx=(n,e)=>Uc(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Zn(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,l)-s.from,Math.max(r,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||r!=t.head)&&(a=u),r=l}return r}),ox=n=>sx(n,!1),IM=n=>sx(n,!0),NM=n=>Uc(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),BM=n=>Uc(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),jM=n=>Uc(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),zM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Xt.of(["",""])},range:pe.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},ZM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:Zn(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:Zn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:n.doc.slice(i,a).append(n.doc.slice(o,i))},range:pe.cursor(a)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Yd(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function ax(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of Yd(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),a=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let l of s.ranges)i.push(pe.range(Math.min(n.doc.length,l.anchor+a),Math.min(n.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let l of s.ranges)i.push(pe.range(l.anchor-a,l.head-a))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:pe.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const XM=({state:n,dispatch:e})=>ax(n,e,!1),FM=({state:n,dispatch:e})=>ax(n,e,!0);function lx(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of Yd(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const VM=({state:n,dispatch:e})=>lx(n,e,!1),WM=({state:n,dispatch:e})=>lx(n,e,!0),YM=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Yd(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=dl(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),a=n.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+n.documentTop-a.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function UM(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=wn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(st.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const Iy=cx(!1),GM=cx(!0);function cx(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!n&&s==o&&UM(e,s);n&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Xd(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=y2(c,s);for(u==null&&(u=Os(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",Bf(e,u)];return l&&f.push(Bf(e,c.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:Xt.of(f)},range:pe.cursor(s+1+f[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function qO(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=n.doc.lineAt(o);a.number>t&&(r.empty||r.to>a.from)&&(e(a,i,r),t=a.number),o=a.to+1}let s=n.changes(i);return{changes:i,range:pe.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const HM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Xd(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=qO(n,(s,o,a)=>{let l=y2(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=Bf(n,l);(c!=u||a.from<s.from+c.length)&&(t[s.from]=l,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},ux=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(qO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Wc)})}),{userEvent:"input.indent"})),!0),fx=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(qO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=Os(i,n.tabSize),o=0,a=Bf(n,Math.max(0,s-zo(n)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),KM=n=>(n.setTabFocusMode(),!0),JM=[{key:"Ctrl-b",run:B2,shift:U2,preventDefault:!0},{key:"Ctrl-f",run:j2,shift:G2},{key:"Ctrl-p",run:X2,shift:J2},{key:"Ctrl-n",run:F2,shift:ex},{key:"Ctrl-a",run:vM,shift:EM},{key:"Ctrl-e",run:bM,shift:$M},{key:"Ctrl-d",run:ix},{key:"Ctrl-h",run:Mm},{key:"Ctrl-k",run:NM},{key:"Ctrl-Alt-h",run:ox},{key:"Ctrl-o",run:zM},{key:"Ctrl-t",run:ZM},{key:"Ctrl-v",run:Lm}],eD=[{key:"ArrowLeft",run:B2,shift:U2,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:cM,shift:_M,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:gM,shift:TM,preventDefault:!0},{key:"ArrowRight",run:j2,shift:G2,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:uM,shift:kM,preventDefault:!0},{mac:"Cmd-ArrowRight",run:OM,shift:PM,preventDefault:!0},{key:"ArrowUp",run:X2,shift:J2,preventDefault:!0},{mac:"Cmd-ArrowUp",run:My,shift:qy},{mac:"Ctrl-ArrowUp",run:$y,shift:Qy},{key:"ArrowDown",run:F2,shift:ex,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Dy,shift:Ry},{mac:"Ctrl-ArrowDown",run:Lm,shift:Ly},{key:"PageUp",run:$y,shift:Qy},{key:"PageDown",run:Lm,shift:Ly},{key:"Home",run:mM,shift:CM,preventDefault:!0},{key:"Mod-Home",run:My,shift:qy},{key:"End",run:pM,shift:AM,preventDefault:!0},{key:"Mod-End",run:Dy,shift:Ry},{key:"Enter",run:Iy,shift:Iy},{key:"Mod-a",run:QM},{key:"Backspace",run:Mm,shift:Mm,preventDefault:!0},{key:"Delete",run:ix,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:ox,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:IM,preventDefault:!0},{mac:"Mod-Backspace",run:BM,preventDefault:!0},{mac:"Mod-Delete",run:jM,preventDefault:!0}].concat(JM.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),RO=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:dM,shift:xM},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:hM,shift:SM},{key:"Alt-ArrowUp",run:XM},{key:"Shift-Alt-ArrowUp",run:VM},{key:"Alt-ArrowDown",run:FM},{key:"Shift-Alt-ArrowDown",run:WM},{key:"Mod-Alt-ArrowUp",run:DM},{key:"Mod-Alt-ArrowDown",run:qM},{key:"Escape",run:RM},{key:"Mod-Enter",run:GM},{key:"Alt-l",mac:"Ctrl-l",run:LM},{key:"Mod-i",run:MM,preventDefault:!0},{key:"Mod-[",run:fx},{key:"Mod-]",run:ux},{key:"Mod-Alt-\\",run:HM},{key:"Shift-Mod-k",run:YM},{key:"Shift-Mod-\\",run:wM},{key:"Mod-/",run:VL},{key:"Alt-A",run:YL},{key:"Ctrl-m",mac:"Shift-Alt-m",run:KM}].concat(eD),tD={key:"Tab",run:ux,shift:fx};class IO{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=wn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(hx(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function Ny(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function nD(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=Ny(e)+Ny(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function dx(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:nD(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function rD(n,e){return t=>{for(let r=wn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class By{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Po(n){return n.selection.main.from}function hx(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?n:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const NO=_s.define();function iD(n,e,t,r){let{main:i}=n.selection,s=t-i.from,o=r-i.from;return{...n.changeByRange(a=>{if(a!=i&&t!=r&&n.sliceDoc(a.from+s,a.from+o)!=n.sliceDoc(t,r))return{range:a};let l=n.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:pe.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const jy=new WeakMap;function sD(n){if(!Array.isArray(n))return n;let e=jy.get(n);return e||jy.set(n,e=dx(n)),e}const zf=It.define(),Oc=It.define();class oD{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=Ls(e,t),i=mo(r);this.chars.push(r);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push(Ls(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:s,byWord:o}=this;if(t.length==1){let b=Ls(e,0),_=mo(b),C=_==e.length?0:-100;if(b!=t[0])if(b==r[0])C+=-200;else return null;return this.ret(C,[0,_])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,c=0;if(a<0){for(let b=0,_=Math.min(e.length,200);b<_&&c<l;){let C=Ls(e,b);(C==t[c]||C==r[c])&&(i[c++]=b),b+=mo(C)}if(c<l)return null}let u=0,f=0,d=!1,h=0,m=-1,p=-1,O=/[a-z]/.test(e),v=!0;for(let b=0,_=Math.min(e.length,200),C=0;b<_&&f<l;){let y=Ls(e,b);a<0&&(u<l&&y==t[u]&&(s[u++]=b),h<l&&(y==t[h]||y==r[h]?(h==0&&(m=b),p=b+1,h++):h=0));let w,S=y<255?y>=48&&y<=57||y>=97&&y<=122?2:y>=65&&y<=90?1:0:(w=H_(y))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!b||S==1&&O||C==0&&S!=0)&&(t[f]==y||r[f]==y&&(d=!0)?o[f++]=b:o.length&&(v=!1)),C=S,b+=mo(y)}return f==l&&o[0]==0&&v?this.result(-100+(d?-200:0),o,e):h==l&&m==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[m,p]):f==l?this.result(-100+(d?-200:0)+-700+(v?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],s=0;for(let o of t){let a=o+(this.astral?mo(Ls(r,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-r.length,i)}}class aD{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),r=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,t.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const zn=Ne.define({combine(n){return zc(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:lD,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>zy(e(r),t(r)),optionClass:(e,t)=>r=>zy(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function zy(n,e){return n?e?n+" "+e:n:e}function lD(n,e,t,r,i,s){let o=n.textDirection==bn.RTL,a=o,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,m=r.right-r.left,p=r.bottom-r.top;if(a&&d<Math.min(m,h)?a=!1:!a&&h<Math.min(m,d)&&(a=!0),m<=(a?d:h))u=Math.max(i.top,Math.min(t.top,i.bottom-p))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let b=i.bottom-e.bottom;b>=p||b>e.top?u=t.bottom-e.top:(c="bottom",u=e.bottom-t.top)}let O=(e.bottom-e.top)/s.offsetHeight,v=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/O}px; max-width: ${f/v}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function cD(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,l=0;for(let c=0;c<s.length;){let u=s[c++],f=s[c++];u>l&&o.appendChild(document.createTextNode(a.slice(l,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(t){if(!t.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=t.detail,r},position:80}),e.sort((t,r)=>t.position-r.position).map(t=>t.render)}function Rh(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class uD{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:o}=i.open,a=e.state.facet(zn);this.optionContent=cD(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Rh(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(t).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(zn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Oc.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:a}=r.open;(!i.open||i.open.options!=s)&&(this.range=Rh(s.length,o,e.state.facet(zn).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Rh(t.options.length,t.selected,this.view.state.facet(zn).maxRenderedOptions),this.showOptions(t.options,e.id));let r=this.updateSelectedOption(t.selected);if(r){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>Ir(this.view.state,a,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return t&&dD(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(zn).positionInfo(this.view,t,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:a,match:l}=e[o],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=s&&(o>r.from||r.from==0))if(s=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function fD(n,e){return t=>new uD(t,n,e)}function dD(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.top<t.top?n.scrollTop-=(t.top-r.top)/i:r.bottom>t.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function Zy(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function hD(n,e){let t=[],r=null,i=null,s=u=>{t.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(h=>h.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(zn);for(let u of n)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)s(new By(d,u.source,f?f(d):[],1e9-t.length));else{let d=e.sliceDoc(u.from,u.to),h,m=o.filterStrict?new aD(d):new oD(d);for(let p of u.result.options)if(h=m.match(p.label)){let O=p.displayLabel?f?f(p,h.matched):[]:h.matched,v=h.score+(p.boost||0);if(s(new By(p,u.source,O,v)),typeof p.section=="object"&&p.section.rank==="dynamic"){let{name:b}=p.section;i||(i=Object.create(null)),i[b]=Math.max(v,i[b]||-1e9)}}}}if(r){let u=Object.create(null),f=0,d=(h,m)=>(h.rank==="dynamic"&&m.rank==="dynamic"?i[m.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(h.name<m.name?-1:1);for(let h of r.sort(d))f-=1e5,u[h.name]=f;for(let h of t){let{section:m}=h.completion;m&&(h.score+=u[typeof m=="string"?m:m.name])}}let a=[],l=null,c=o.compareCompletions;for(let u of t.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=u.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?a.push(u):Zy(u.completion)>Zy(l)&&(a[a.length-1]=u),l=u.completion}return a}class ya{constructor(e,t,r,i,s,o){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new ya(this.options,Xy(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let a=hD(e,t);if(!a.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=t.facet(zn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==c){l=u;break}}return new ya(a,Xy(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:bD,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new ya(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ya(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Zf{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new Zf(OD,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(zn),s=(r.override||t.languageDataAt("autocomplete",Po(t)).map(sD)).map(l=>(this.active.find(u=>u.source==l)||new Kr(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(BO));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!pD(s,this.active)||a?o=ya.build(s,t,this.id,o,r,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new Kr(l.source,0):l));for(let l of e.effects)l.is(mx)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Zf(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?mD:gD}}function pD(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t<n.length&&!n[t].hasResult();)t++;for(;r<e.length&&!e[r].hasResult();)r++;let i=t==n.length,s=r==e.length;if(i||s)return i==s;if(n[t++].result!=e[r++].result)return!1}}const mD={"aria-autocomplete":"list"},gD={};function Xy(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const OD=[];function px(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(NO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Kr{constructor(e,t,r=!1){this.source=e,this.state=t,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let r=px(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Kr(i.source,0)),r&4&&i.state==0&&(i=new Kr(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(zf))i=new Kr(i.source,1,s.value);else if(s.is(Oc))i=new Kr(i.source,0);else if(s.is(BO))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Po(e.state))}}class $a extends Kr{constructor(e,t,r,i,s,o){super(e,3,t),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Po(e.state);if(a>o||!i||t&2&&(Po(e.startState)==this.from||a<this.limit))return new Kr(this.source,t&4?1:0);let l=e.changes.mapPos(this.limit);return vD(i.validFor,e.state,s,o)?new $a(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new IO(e.state,a,!1)))?new $a(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Po(e.state)):new Kr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new $a(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Kr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function vD(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):hx(n,!0).test(i)}const BO=It.define({map(n,e){return n.map(t=>t.map(e))}}),mx=It.define(),wr=oi.define({create(){return Zf.start()},update(n,e){return n.update(e)},provide:n=>[i2.from(n,e=>e.tooltip),Pe.contentAttributes.from(n,e=>e.attrs)]});function jO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(wr).active.find(i=>i.source==e.source);return r instanceof $a?(typeof t=="string"?n.dispatch({...iD(n.state,t,r.from,r.to),annotations:NO.of(e.completion)}):t(n,e.completion,r.from,r.to),!0):!1}const bD=fD(wr,jO);function Su(n,e="option"){return t=>{let r=t.state.field(wr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<t.state.facet(zn).interactionDelay)return!1;let i=1,s;e=="page"&&(s=s2(t,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(n?1:-1):n?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:mx.of(a)}),!0}}const yD=n=>{let e=n.state.field(wr,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(zn).interactionDelay?!1:jO(n,e.open.options[e.open.selected])},Hl=n=>n.state.field(wr,!1)?(n.dispatch({effects:zf.of(!0)}),!0):!1,wD=n=>{let e=n.state.field(wr,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Oc.of(null)}),!0)};class _D{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const kD=50,xD=1e3,SD=cr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(wr).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(wr),t=n.state.facet(zn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(wr)==e)return;let r=n.transactions.some(s=>{let o=px(s,t);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&n.docChanged||o.updates.length+n.transactions.length>kD&&Date.now()-o.time>xD){for(let a of o.context.abortListeners)try{a()}catch(l){Ir(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(s=>s.effects.some(o=>o.is(zf)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of n.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(wr);for(let t of e.active)t.isPending&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zn).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=Po(e),r=new IO(e,t,n.explicit,this.view),i=new _D(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Oc.of(null)}),Ir(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(zn),r=this.view.state.field(wr);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=Po(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),c=new $a(s.active.source,s.active.explicit,l,s.done,s.done.from,(n=s.done.to)!==null&&n!==void 0?n:a);for(let u of s.updates)c=c.update(u,t);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new Kr(s.active.source,0);for(let l of s.updates)a=a.update(l,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:BO.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(wr,!1);if(e&&e.tooltip&&this.view.state.facet(zn).closeOnBlur){let t=e.open&&s2(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Oc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:zf.of(!1)}),20),this.composing=0}}}),AD=typeof navigator=="object"&&/Win/.test(navigator.platform),CD=ro.highest(Pe.domEventHandlers({keydown(n,e){let t=e.state.field(wr,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(AD&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(n.key)>-1&&jO(e,r),!1}})),gx=Pe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class TD{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class zO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,or.TrackDel),r=e.mapPos(this.to,1,or.TrackDel);return t==null||r==null?null:new zO(this.field,t,r)}}class ZO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Wc);i.push(t+c.length-u),l=c+l.slice(u)}r.push(l),t+=l.length+1}let a=this.fieldPositions.map(l=>new zO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:u&&t[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let d=s[2]?3+(s[1]||"").length:2;f.from-=d,f.to-=d}i.push(new TD(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(o)}return new ZO(r,i)}}let PD=gt.widget({widget:new class extends Zc{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),ED=gt.mark({class:"cm-snippetField"});class hl{constructor(e,t){this.ranges=e,this.active=t,this.deco=gt.set(e.map(r=>(r.from==r.to?PD:ED).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new hl(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Gc=It.define({map(n,e){return n&&n.map(e)}}),$D=It.define(),vc=oi.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Gc))return t.value;if(t.is($D)&&n)return new hl(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Pe.decorations.from(n,e=>e?e.deco:gt.none)});function XO(n,e){return pe.create(n.filter(t=>t.field==e).map(t=>pe.range(t.from,t.to)))}function QD(n){let e=ZO.parse(n);return(t,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(t.state,i),{main:l}=t.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:Xt.of(o)},scrollIntoView:!0,annotations:r?[NO.of(r),En.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=XO(a,0)),a.some(u=>u.field>0)){let u=new hl(a,0),f=c.effects=[Gc.of(u)];t.state.field(vc,!1)===void 0&&f.push(It.appendConfig.of([vc,RD,ID,gx]))}t.dispatch(t.state.update(c))}}function Ox(n){return({state:e,dispatch:t})=>{let r=e.field(vc,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:XO(r.ranges,i),effects:Gc.of(s?null:new hl(r.ranges,i)),scrollIntoView:!0})),!0}}const LD=({state:n,dispatch:e})=>n.field(vc,!1)?(e(n.update({effects:Gc.of(null)})),!0):!1,MD=Ox(1),DD=Ox(-1),qD=[{key:"Tab",run:MD,shift:DD},{key:"Escape",run:LD}],Fy=Ne.define({combine(n){return n.length?n[0]:qD}}),RD=ro.highest(Yo.compute([Fy],n=>n.facet(Fy)));function gr(n,e){return{...e,apply:QD(n)}}const ID=Pe.domEventHandlers({mousedown(n,e){let t=e.state.field(vc,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:XO(t.ranges,i.field),effects:Gc.of(t.ranges.some(s=>s.field>i.field)?new hl(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),vx=new class extends Ys{};vx.startSide=1;vx.endSide=-1;function Dm(n={}){return[CD,wr,zn.of(n),SD,BD,gx]}const ND=[{key:"Ctrl-Space",run:Hl},{mac:"Alt-`",run:Hl},{mac:"Alt-i",run:Hl},{key:"Escape",run:wD},{key:"ArrowDown",run:Su(!0)},{key:"ArrowUp",run:Su(!1)},{key:"PageDown",run:Su(!0,"page")},{key:"PageUp",run:Su(!1,"page")},{key:"Enter",run:yD}],BD=ro.highest(Yo.computeN([zn],n=>n.facet(zn).defaultKeymap?[ND]:[]));class Xf{static create(e,t,r,i,s){let o=i+(i<<8)+e+(t<<4)|0;return new Xf(e,t,r,o,s,[],[])}constructor(e,t,r,i,s,o,a){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=a,this.hashProp=[[st.contextHash,i]]}addChild(e,t){e.prop(st.contextHash)!=this.hash&&(e=new yt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new yt(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,o)=>new yt(Ln.none,i,s,o,this.hashProp)})}}var ye;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(ye||(ye={}));class jD{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class zD{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Kl(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function Vy(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==ye.OrderedList?WO:VO)(t,e,!1);return r>0&&(n.type!=ye.BulletList||FO(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const bx={[ye.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(Lt(ye.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(li(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[ye.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[ye.OrderedList]:Vy,[ye.BulletList]:Vy,[ye.Document](){return!0}};function li(n){return n==32||n==9||n==10||n==13}function Kl(n,e=0){for(;e<n.length&&li(n.charCodeAt(e));)e++;return e}function Wy(n,e,t){for(;e>t&&li(n.charCodeAt(e-1));)e--;return e}function yx(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function wx(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function FO(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!li(s))return-1}return t&&n.next==45&&xx(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(Tx.SetextHeading)>-1||r<3?-1:1}function _x(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function VO(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||li(n.text.charCodeAt(n.pos+1)))&&(!t||_x(e,ye.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function WO(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!li(n.text.charCodeAt(r+1))||t&&!_x(e,ye.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function kx(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function xx(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&li(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const qm=/^[ \t]*$/,Sx=/-->/,Ax=/\?>/,Rm=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Sx],[/^\s*<\?/,Ax],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,qm],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,qm]];function Cx(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=Rm.length-(t?1:0);i<s;i++)if(Rm[i][0].test(r))return i;return-1}function Yy(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function As(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==ye.CodeText?n[r].to=t:n.push(Lt(ye.CodeText,e,t))}const Au={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,o=[],a=[];for(As(o,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){As(a,n.lineStart-1,n.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<t)break;{if(a.length){for(let c of a)c.type==ye.CodeText?As(o,c.from,c.to):o.push(c);a=[]}As(o,n.lineStart-1,n.lineStart);for(let c of e.markers)o.push(c);s=n.lineStart+e.text.length;let l=n.lineStart+e.findColumn(e.baseIndent+4);l<s&&As(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=ye.CodeText),a.length&&(e.markers=a.concat(e.markers))),n.addNode(n.buffer.writeElements(o,-i).finish(ye.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=yx(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,o=e.skipSpace(t),a=Wy(e.text,e.text.length,o),l=[Lt(ye.CodeMark,r,r+s)];o<a&&l.push(Lt(ye.CodeInfo,n.lineStart+o,n.lineStart+a));for(let c=!0,u=!0,f=!1;n.nextLine()&&e.depth>=n.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=s&&e.skipSpace(d)==e.text.length){for(let h of e.markers)l.push(h);u&&f&&As(l,n.lineStart-1,n.lineStart),l.push(Lt(ye.CodeMark,n.lineStart+e.pos,n.lineStart+d)),n.nextLine();break}else{f=!0,c||(As(l,n.lineStart-1,n.lineStart),u=!1);for(let p of e.markers)l.push(p);let h=n.lineStart+e.basePos,m=n.lineStart+e.text.length;h<m&&(As(l,h,m),u=!1)}}return n.addNode(n.buffer.writeElements(l,-r).finish(ye.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=wx(e);return t<0?!1:(n.startContext(ye.Blockquote,e.pos),n.addNode(ye.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(FO(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(ye.HorizontalRule,t),!0},BulletList(n,e){let t=VO(e,n,!1);if(t<0)return!1;n.block.type!=ye.BulletList&&n.startContext(ye.BulletList,e.basePos,e.next);let r=Yy(e,e.pos+1);return n.startContext(ye.ListItem,e.basePos,r-e.baseIndent),n.addNode(ye.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=WO(e,n,!1);if(t<0)return!1;n.block.type!=ye.OrderedList&&n.startContext(ye.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=Yy(e,e.pos+t);return n.startContext(ye.ListItem,e.basePos,r-e.baseIndent),n.addNode(ye.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=kx(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=Wy(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!li(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=n.buffer.write(ye.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,o),i+t+1),-i);o<e.text.length&&a.write(ye.HeaderMark,o-r,s-r);let l=a.finish(ye.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(l,i),!0},HTMLBlock(n,e){let t=Cx(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=Rm[t][1],s=[],o=i!=qm;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&n.nextLine();let a=i==Sx?ye.CommentBlock:i==Ax?ye.ProcessingInstructionBlock:ye.HTMLBlock,l=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class ZD{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
156
+ `+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Kl(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,Lt(ye.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Rx(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Lt(ye.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Dx(e,Kl(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Kl(e,this.pos),r=0;if(t>this.pos){let i=qx(e,t,this.start);if(i){let s=Ih(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Ih(e,this.pos)),r>0&&r<e.length?r:-1}else return Ih(e,this.pos)}}}function Ih(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!li(t))return-1}return e}class XD{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:xx(t),s=t.next;if(i<0)return!1;let o=Lt(ye.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Lt(s==61?ye.SetextHeading1:ye.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const Tx={LinkReference(n,e){return e.content.charCodeAt(0)==91?new ZD(e):null},SetextHeading(){return new XD}},FD=[(n,e)=>kx(e)>=0,(n,e)=>yx(e)>=0,(n,e)=>wx(e)>=0,(n,e)=>VO(e,n,!0)>=0,(n,e)=>WO(e,n,!0)>=0,(n,e)=>FO(e,n,!0)>=0,(n,e)=>Cx(e,n,!0)>=0],VD={text:"",end:0};class WD{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new zD,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=Xf.create(ye.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new GD(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new jD(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
157
+ `+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Ix(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=VD;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);t.end=s+o.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+o,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+ye[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
158
+ `?"":t;else{let i=t.indexOf(`
159
+ `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Xf.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new yt(this.parser.nodeSet.types[e],Ya,Ya,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Nm(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Px(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=Nm(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(ye.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?Lt(this.parser.getNodeType(e),t,r,i):new Qx(e,t)}get buffer(){return new $x(this.parser.nodeSet)}}function Px(n,e,t,r,i){let s=n[e].to,o=[],a=[],l=t.from+r;function c(u,f){for(;f?u>=s:u>s;){let d=n[e+1].from-s;r+=d,u+=d,e++,s=n[e].to}}for(let u=t.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,d,h=i.get(u.tree);h?d=h:u.to+r>s?(d=Px(n,e,u,r,i),c(u.to+r,!1)):d=u.toTree(),o.push(d),a.push(f-l)}return c(t.to+r,!1),new yt(t.type,o,a,t.to+r-l,t.tree?t.tree.propValues:void 0)}class Ud extends zd{constructor(e,t,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,t,r){let i=new WD(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=Im(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(_l(t.defineNodes)){i=Object.assign({},i);let d=r.types.slice(),h;for(let m of t.defineNodes){let{name:p,block:O,composite:v,style:b}=typeof m=="string"?{name:m}:m;if(d.some(y=>y.name==p))continue;v&&(i[d.length]=(y,w,S)=>v(w,S,y.value));let _=d.length,C=v?["Block","BlockContext"]:O?_>=ye.ATXHeading1&&_<=ye.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(Ln.define({id:_,name:p,props:C&&[[st.group,C]]})),b&&(h||(h={}),Array.isArray(b)||b instanceof qi?h[p]=b:Object.assign(h,b))}r=new ll(d),h&&(r=r.extend(cl(h)))}if(_l(t.props)&&(r=r.extend(...t.props)),_l(t.remove))for(let d of t.remove){let h=this.blockNames.indexOf(d),m=this.inlineNames.indexOf(d);h>-1&&(s[h]=o[h]=void 0),m>-1&&(l[m]=void 0)}if(_l(t.parseBlock))for(let d of t.parseBlock){let h=a.indexOf(d.name);if(h>-1)s[h]=d.parse,o[h]=d.leaf;else{let m=d.before?Cu(a,d.before):d.after?Cu(a,d.after)+1:a.length-1;s.splice(m,0,d.parse),o.splice(m,0,d.leaf),a.splice(m,0,d.name)}d.endLeaf&&u.push(d.endLeaf)}if(_l(t.parseInline))for(let d of t.parseInline){let h=c.indexOf(d.name);if(h>-1)l[h]=d.parse;else{let m=d.before?Cu(c,d.before):d.after?Cu(c,d.after)+1:c.length-1;l.splice(m,0,d.parse),c.splice(m,0,d.name)}}return t.wrap&&(f=f.concat(t.wrap)),new Ud(r,s,o,a,u,i,l,c,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new YO(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let a=o(r,s,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}}function _l(n){return n!=null&&n.length>0}function Im(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=Im(n[0]);if(n.length==1)return e;let t=Im(n.slice(1));if(!t||!e)return e||t;let r=(o,a)=>(o||Ya).concat(a||Ya),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function Cu(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let Ex=[Ln.none];for(let n=1,e;e=ye[n];n++)Ex[n]=Ln.define({id:n,name:e,props:n>=ye.Escape?[]:[[st.group,n in bx?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Ya=[];class $x{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return yt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let bc=class{constructor(e,t,r,i=Ya){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new $x(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class Qx{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Ya}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function Lt(n,e,t,r){return new bc(n,e,t,r)}const Lx={resolve:"Emphasis",mark:"EmphasisMark"},Mx={resolve:"Emphasis",mark:"EmphasisMark"},Oo={},Ff={};class Dr{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const Uy="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let yc=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{yc=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Nh={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<Uy.length;i++)if(Uy.charCodeAt(i)==r)return n.append(Lt(ye.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append(Lt(ye.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append(Lt(ye.InlineCode,t,r+1,[Lt(ye.CodeMark,t,t+i),Lt(ye.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append(Lt(ye.Autolink,t,t+1+i[0].length,[Lt(ye.LinkMark,t,t+1),Lt(ye.URL,t+1,t+i[0].length),Lt(ye.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append(Lt(ye.Comment,t,t+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return n.append(Lt(ye.ProcessingInstruction,t,t+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return a?n.append(Lt(ye.HTMLTag,t,t+1+a[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),o=yc.test(i),a=yc.test(s),l=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!a||l||o),f=!l&&(!o||c||a),d=u&&(e==42||!f||o),h=f&&(e==42||!u||a);return n.append(new Dr(e==95?Lx:Mx,t,r,(d?1:0)|(h?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(Lt(ye.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append(Lt(ye.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Dr(Oo,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Dr(Ff,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Dr&&(i.type==Oo||i.type==Ff)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),o=n.parts[r]=YD(n,s,i.type==Oo?ye.Link:ye.Image,i.from,t+1);if(i.type==Oo)for(let a=0;a<r;a++){let l=n.parts[a];l instanceof Dr&&l.type==Oo&&(l.side=0)}return o.to}}return-1}};function YD(n,e,t,r,i){let{text:s}=n,o=n.char(i),a=i;if(e.unshift(Lt(ye.LinkMark,r,r+(t==ye.Image?2:1))),e.push(Lt(ye.LinkMark,i-1,i)),o==40){let l=n.skipSpace(i+1),c=Dx(s,l-n.offset,n.offset),u;c&&(l=n.skipSpace(c.to),l!=c.to&&(u=qx(s,l-n.offset,n.offset),u&&(l=n.skipSpace(u.to)))),n.char(l)==41&&(e.push(Lt(ye.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(Lt(ye.LinkMark,l,a)))}else if(o==91){let l=Rx(s,i-n.offset,n.offset,!1);l&&(e.push(l),a=l.to)}return Lt(t,r,a,e)}function Dx(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return Lt(ye.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<n.length;s++){let a=n.charCodeAt(s);if(li(a))break;if(o)o=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(o=!0)}return s>e?Lt(ye.URL,e+t,s+t):s==n.length?null:!1}}function qx(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<n.length;s++){let a=n.charCodeAt(s);if(o)o=!1;else{if(a==i)return Lt(ye.LinkTitle,e+t,s+1+t);a==92&&(o=!0)}}return null}function Rx(n,e,t,r){for(let i=!1,s=e+1,o=Math.min(n.length,s+999);s<o;s++){let a=n.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:Lt(ye.LinkLabel,e+t,s+1+t);if(r&&!li(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class YO{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Dr(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Dr&&(t.type==Oo||t.type==Ff))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Dr&&i.type.resolve&&i.side&2))continue;let s=i.type==Lx||i.type==Mx,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let p=this.parts[l];if(p instanceof Dr&&p.side&1&&p.type==i.type&&!(s&&(i.side&1||p.side&2)&&(p.to-p.from+o)%3==0&&((p.to-p.from)%3||o%3))){a=p;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,d=i.to;if(s){let p=Math.min(2,a.to-a.from,o);f=a.to-p,d=i.from+p,c=p==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let p=l+1;p<r;p++)this.parts[p]instanceof bc&&u.push(this.parts[p]),this.parts[p]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,d));let h=this.elt(c,f,d,u);this.parts[l]=s&&a.from!=f?new Dr(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=d?new Dr(i.type,d,i.to,i.side):null)?this.parts.splice(r,0,h):this.parts[r]=h}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof bc&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Dr&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Dr?t:null}skipSpace(e){return Kl(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?Lt(this.parser.getNodeType(e),t,r,i):new Qx(e,t)}}YO.linkStart=Oo;YO.imageStart=Ff;function Nm(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof bc&&(t[r]=new bc(s.type,s.from,s.to,Nm(s.children,[i])))}else t.splice(r++,0,i)}return t}const UD=[ye.CodeBlock,ye.ListItem,ye.OrderedList,ye.BulletList];let GD=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
160
+ `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(st.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,c=a;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let u=Ix(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,u);else{let f=new yt(e.parser.nodeSet.types[ye.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,u)}if(t.type.is("Block")&&(UD.indexOf(t.type.id)<0?(o=t.to-r,a=e.block.children.length):(o=l,a=c),l=t.to-r,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function Ix(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const HD=cl({"Blockquote/...":N.quote,HorizontalRule:N.contentSeparator,"ATXHeading1/... SetextHeading1/...":N.heading1,"ATXHeading2/... SetextHeading2/...":N.heading2,"ATXHeading3/...":N.heading3,"ATXHeading4/...":N.heading4,"ATXHeading5/...":N.heading5,"ATXHeading6/...":N.heading6,"Comment CommentBlock":N.comment,Escape:N.escape,Entity:N.character,"Emphasis/...":N.emphasis,"StrongEmphasis/...":N.strong,"Link/... Image/...":N.link,"OrderedList/... BulletList/...":N.list,"BlockQuote/...":N.quote,"InlineCode CodeText":N.monospace,"URL Autolink":N.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":N.processingInstruction,"CodeInfo LinkLabel":N.labelName,LinkTitle:N.string,Paragraph:N.content}),KD=new Ud(new ll(Ex).extend(HD),Object.keys(Au).map(n=>Au[n]),Object.keys(Au).map(n=>Tx[n]),Object.keys(Au),FD,bx,Object.keys(Nh).map(n=>Nh[n]),Object.keys(Nh),[]);function JD(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:t;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function e3(n){let{codeParser:e,htmlParser:t}=n;return{wrap:g2((i,s)=>{let o=i.type.id;if(e&&(o==ye.CodeBlock||o==ye.FencedCode)){let a="";if(o==ye.FencedCode){let c=i.node.getChild(ye.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==ye.CodeText,bracketed:o==ye.FencedCode}}else if(t&&(o==ye.HTMLBlock||o==ye.HTMLTag||o==ye.CommentBlock))return{parser:t,overlay:JD(i.node,i.from,i.to)};return null})}}const t3={resolve:"Strikethrough",mark:"StrikethroughMark"},n3={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":N.strikethrough}},{name:"StrikethroughMark",style:N.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=yc.test(r),l=yc.test(i);return n.addDelimiter(t3,t,t+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function Jl(n,e,t=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(n.elt("TableCell",i+a,i+l,n.parser.parseInline(e.slice(a,l),i+a)))};for(let f=t;f<e.length;f++){let d=e.charCodeAt(f);d==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(n.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||d!=32&&d!=9)&&(a<0&&(a=f),l=f+1),c=!c&&d==92}return a>-1&&(s++,r&&u()),s}function Gy(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const Nx=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Hy{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&Nx.test(i=t.text.slice(t.pos))){let s=[];Jl(e,r.content,0,s,r.start)==Jl(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];Jl(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const r3={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":N.heading}},"TableRow",{name:"TableCell",style:N.content},{name:"TableDelimiter",style:N.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return Gy(e.content,0)?new Hy:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof Hy)||!Gy(e.text,e.basePos))return!1;let r=n.peekLine();return Nx.test(r)&&Jl(n,e.text,e.basePos)==Jl(n,r,e.basePos)},before:"SetextHeading"}]};class i3{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const s3={defineNodes:[{name:"Task",block:!0,style:N.list},{name:"TaskMarker",style:N.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new i3:null},after:"SetextHeading"}]},Ky=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Jy=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,o3=/[\w-]+\.[\w-]+($|\/)/,e1=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,t1=/\/[a-zA-Z\d@.]+/gy;function n1(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function a3(n,e){Jy.lastIndex=e;let t=Jy.exec(n);if(!t||o3.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&n1(n,e,r,")")>n1(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function r1(n,e){e1.lastIndex=e;let t=e1.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const l3={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;Ky.lastIndex=r;let i=Ky.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=a3(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+o[0].length}}else i[3]?s=r1(n.text,r):(s=r1(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(t1.lastIndex=s,i=t1.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},c3=[r3,s3,n3,l3];function Bx(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let o=[r.elt(t,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==n)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(t,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),li(l))break}return-1}}const u3={defineNodes:[{name:"Superscript",style:N.special(N.content)},{name:"SuperscriptMark",style:N.processingInstruction}],parseInline:[{name:"Superscript",parse:Bx(94,"Superscript","SuperscriptMark")}]},f3={defineNodes:[{name:"Subscript",style:N.special(N.content)},{name:"SubscriptMark",style:N.processingInstruction}],parseInline:[{name:"Subscript",parse:Bx(126,"Subscript","SubscriptMark")}]},d3={defineNodes:[{name:"Emoji",style:N.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]};var i1={};class Vf{constructor(e,t,r,i,s,o,a,l,c,u=0,f){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Vf(e,[],t,r,r,0,[],0,i?new s1(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==r)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let a=o.stateFlag(s,1);!a&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,a?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Vf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new h3(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((a,l)=>l&1&&a==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new s1(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class s1{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class h3{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class Wf{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Wf(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Wf(this.stack,this.pos,this.index)}}function Nl(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class cf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const o1=new cf;class p3{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=o1,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=o1,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Qa{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;jx(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Qa.prototype.contextual=Qa.prototype.fallback=Qa.prototype.extend=!1;class Yf{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Nl(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(jx(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Yf.prototype.contextual=Qa.prototype.fallback=Qa.prototype.extend=!1;class Zr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function jx(n,e,t,r,i,s){let o=0,a=1<<r,{dialect:l}=t.p.parser;e:for(;(a&n[o])!=0;){let c=n[o+1];for(let h=o+3;h<c;h+=2)if((n[h+1]&a)>0){let m=n[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||m3(m,e.token.value,i,s))){e.acceptToken(m);break}}let u=e.next,f=0,d=n[o+2];if(e.next<0&&d>f&&n[c+d*3-3]==65535){o=n[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,m=c+h+(h<<1),p=n[m],O=n[m+1]||65536;if(u<p)d=h;else if(u>=O)f=h+1;else{o=n[m+2],e.advance();continue e}}break}}function a1(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function m3(n,e,t,r){let i=a1(t,r,e);return i<0||a1(t,r,n)<i}const Er=typeof process<"u"&&i1&&/\bparse\b/.test(i1.LOG);let Bh=null;function l1(n,e,t){let r=n.cursor(Wt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class g3{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?l1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?l1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof yt){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(st.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}}class O3{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new cf)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<s.length;c++){if((1<<c&o)==0)continue;let u=s[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(r=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new cf,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new cf,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(s,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=is(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(is(a,c+2),t,r,i));break}a[c]==t&&(i=this.putAction(is(a,c+1),t,r,i))}return i}}class v3{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new p3(t,i),this.tokens=new O3(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Vf.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new g3(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&y3(i);if(o)return Er&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Er&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return Er&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,a)=>a.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,o=Er?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(st.contextHash)||0)==u))return e.useNode(f,d),Er&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof yt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof yt&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Er&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,m=h?e:e.split(),p=this.tokens.mainToken;if(m.apply(u,f,p?p.start:m.pos,d),Er&&console.log(o+this.stackID(m)+` (via ${(u&65536)==0?"shift":`reduce of ${s.getName(u&65535)}`} for ${s.getName(f)} @ ${i}${m==e?"":", split"})`),h)return!0;m.pos>i?t.push(m):r.push(m)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return c1(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=t[o<<1],c=t[(o<<1)+1],u=Er?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Er&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;h<10&&f.forceReduce()&&(Er&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)Er&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))Er&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Er&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),c1(a,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),yt.build({buffer:Wf.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Bh||(Bh=new WeakMap)).get(e);return t||Bh.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function c1(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class b3{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const jh=n=>n;class zx{constructor(e){this.start=e.start,this.shift=e.shift||jh,this.reduce=e.reduce||jh,this.reuse=e.reuse||jh,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ua extends zd{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<t.length;a++)i.push([]);function s(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=st[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)s(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,f);c++}}}this.nodeSet=new ll(t.map((a,l)=>Ln.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=f2;let o=Nl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(u1),this.states=Nl(e.states,Uint32Array),this.data=Nl(e.stateData),this.goto=Nl(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Qa(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new v3(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=is(r,s+2)];else{if(r[s+1]==2)return is(r,s+2);break}if(o==t||o==0)return is(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=is(this.data,s+2);else break;i=t(is(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=is(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Ua.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=u1(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new b3(e,r,i)}static deserialize(e){return new Ua(e)}}function is(n,e){return n[e]|n[e+1]<<16}function y3(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function u1(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const w3=55,_3=1,k3=56,x3=2,S3=57,A3=3,f1=4,C3=5,UO=6,Zx=7,Xx=8,Fx=9,Vx=10,T3=11,P3=12,E3=13,zh=58,$3=14,Q3=15,d1=59,Wx=21,L3=23,Yx=24,M3=25,Bm=27,Ux=28,D3=29,q3=32,R3=35,I3=37,N3=38,B3=0,j3=1,z3={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Z3={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},h1={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function X3(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let p1=null,m1=null,g1=0;function jm(n,e){let t=n.pos+e;if(g1==t&&m1==n)return p1;let r=n.peek(e),i="";for(;X3(r);)i+=String.fromCharCode(r),r=n.peek(++e);return m1=n,g1=t,p1=i?i.toLowerCase():r==F3||r==V3?void 0:null}const Gx=60,Uf=62,GO=47,F3=63,V3=33,W3=45;function O1(n,e){this.name=n,this.parent=e}const Y3=[UO,Vx,Zx,Xx,Fx],U3=new zx({start:null,shift(n,e,t,r){return Y3.indexOf(e)>-1?new O1(jm(r,1)||"",n):n},reduce(n,e){return e==Wx&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==UO||i==I3?new O1(jm(r,1)||"",n):n},strict:!1}),G3=new Zr((n,e)=>{if(n.next!=Gx){n.next<0&&e.context&&n.acceptToken(zh);return}n.advance();let t=n.next==GO;t&&n.advance();let r=jm(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?Q3:$3);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(T3);if(i&&Z3[i])return n.acceptToken(zh,-2);if(e.dialectEnabled(B3))return n.acceptToken(P3);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(E3)}else{if(r=="script")return n.acceptToken(Zx);if(r=="style")return n.acceptToken(Xx);if(r=="textarea")return n.acceptToken(Fx);if(z3.hasOwnProperty(r))return n.acceptToken(Vx);i&&h1[i]&&h1[i][r]?n.acceptToken(zh,-1):n.acceptToken(UO)}},{contextual:!0}),H3=new Zr(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(d1);break}if(n.next==W3)e++;else if(n.next==Uf&&e>=2){t>=3&&n.acceptToken(d1,-2);break}else e=0;n.advance()}});function K3(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const J3=new Zr((n,e)=>{if(n.next==GO&&n.peek(1)==Uf){let t=e.dialectEnabled(j3)||K3(e.context);n.acceptToken(t?C3:f1,2)}else n.next==Uf&&n.acceptToken(f1,1)});function HO(n,e,t){let r=2+n.length;return new Zr(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==Gx||s==1&&i.next==GO||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==Uf){a>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const eq=HO("script",w3,_3),tq=HO("style",k3,x3),nq=HO("textarea",S3,A3),rq=cl({"Text RawText IncompleteTag IncompleteCloseTag":N.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":N.angleBracket,TagName:N.tagName,"MismatchedCloseTag/TagName":[N.tagName,N.invalid],AttributeName:N.attributeName,"AttributeValue UnquotedAttributeValue":N.attributeValue,Is:N.definitionOperator,"EntityReference CharacterReference":N.character,Comment:N.blockComment,ProcessingInst:N.processingInstruction,DoctypeDecl:N.documentMeta}),iq=Ua.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'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O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:U3,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29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7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[eq,tq,nq,J3,G3,H3,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Hx(n,e){let t=Object.create(null);for(let r of n.getChildren(Yx)){let i=r.getChild(M3),s=r.getChild(Bm)||r.getChild(Ux);i&&(t[e.read(i.from,i.to)]=s?s.type.id==Bm?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function v1(n,e){let t=n.getChild(L3);return t?e.read(t.from,t.to):" "}function Zh(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=Hx(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function Kx(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let a of n)(a.tag=="script"?t:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return g2((a,l)=>{let c=a.type.id;if(c==D3)return Zh(a,l,t);if(c==q3)return Zh(a,l,r);if(c==R3)return Zh(a,l,i);if(c==Wx&&s.length){let u=a.node,f=u.firstChild,d=f&&v1(f,l),h;if(d){for(let m of s)if(m.tag==d&&(!m.attrs||m.attrs(h||(h=Hx(f,l))))){let p=u.lastChild,O=p.type.id==N3?p.from:u.to;if(O>f.to)return{parser:m.parser,overlay:[{from:f.to,to:O}]}}}}if(o&&c==Yx){let u=a.node,f;if(f=u.firstChild){let d=o[l.read(f.from,f.to)];if(d)for(let h of d){if(h.tagName&&h.tagName!=v1(u.parent,l))continue;let m=u.lastChild;if(m.type.id==Bm){let p=m.from+1,O=m.lastChild,v=m.to-(O&&O.isError?0:1);if(v>p)return{parser:h.parser,overlay:[{from:p,to:v}],bracketed:!0}}else if(m.type.id==Ux)return{parser:h.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const sq=122,b1=1,oq=123,aq=124,Jx=2,lq=125,cq=3,uq=4,eS=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],fq=58,dq=40,tS=95,hq=91,uf=45,pq=46,mq=35,gq=37,Oq=38,vq=92,bq=10,yq=42;function wc(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function KO(n){return n>=48&&n<=57}function y1(n){return KO(n)||n>=97&&n<=102||n>=65&&n<=70}const nS=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(wc(l)||l==uf||l==tS||s&&KO(l))!s&&(l!=uf||a>0)&&(s=!0),o===a&&l==uf&&o++,r.advance();else if(l==vq&&r.peek(1)!=bq){if(r.advance(),y1(r.next)){do r.advance();while(y1(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(Jx)?e:l==dq?t:n);break}}},wq=new Zr(nS(oq,Jx,aq)),_q=new Zr(nS(lq,cq,uq)),kq=new Zr(n=>{if(eS.includes(n.peek(-1))){let{next:e}=n;(wc(e)||e==tS||e==mq||e==pq||e==yq||e==hq||e==fq&&wc(n.peek(1))||e==uf||e==Oq)&&n.acceptToken(sq)}}),xq=new Zr(n=>{if(!eS.includes(n.peek(-1))){let{next:e}=n;if(e==gq&&(n.advance(),n.acceptToken(b1)),wc(e)){do n.advance();while(wc(n.next)||KO(n.next));n.acceptToken(b1)}}}),Sq=cl({"AtKeyword import charset namespace keyframes media supports":N.definitionKeyword,"from to selector":N.keyword,NamespaceName:N.namespace,KeyframeName:N.labelName,KeyframeRangeName:N.operatorKeyword,TagName:N.tagName,ClassName:N.className,PseudoClassName:N.constant(N.className),IdName:N.labelName,"FeatureName PropertyName":N.propertyName,AttributeName:N.attributeName,NumberLiteral:N.number,KeywordQuery:N.keyword,UnaryQueryOp:N.operatorKeyword,"CallTag ValueName":N.atom,VariableName:N.variableName,Callee:N.operatorKeyword,Unit:N.unit,"UniversalSelector NestingSelector":N.definitionOperator,"MatchOp CompareOp":N.compareOperator,"ChildOp SiblingOp, LogicOp":N.logicOperator,BinOp:N.arithmeticOperator,Important:N.modifier,Comment:N.blockComment,ColorLiteral:N.color,"ParenthesizedContent StringLiteral":N.string,":":N.punctuation,"PseudoOp #":N.derefOperator,"; ,":N.separator,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace}),Aq={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},Cq={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Tq={__proto__:null,selector:112,layer:166},Pq={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Eq={__proto__:null,to:207},$q=Ua.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#E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#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[Sq],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%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}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[kq,xq,wq,_q,1,2,3,4,new Yf("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:n=>Aq[n]||-1},{term:125,get:n=>Cq[n]||-1},{term:4,get:n=>Tq[n]||-1},{term:25,get:n=>Pq[n]||-1},{term:123,get:n=>Eq[n]||-1}],tokenPrec:1963});let Xh=null;function Fh(){if(!Xh&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));Xh=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Xh||[]}const w1=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),_1=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),Qq=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),Lq=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),Ji=/^(\w[\w-]*|-\w[\w-]*|)$/,Mq=/^-(-[\w-]*)?$/;function Dq(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return r?.name!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const k1=new m2,qq=["Declaration"];function Rq(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function rS(n,e,t){if(e.to-e.from>4096){let r=k1.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Wt.IncludeAnonymous);if(o.firstChild())do for(let a of rS(n,o.node,t))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return k1.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(qq)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=n.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const iS=n=>e=>{let{state:t,pos:r}=e,i=wn(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Fh(),validFor:Ji};if(i.name=="ValueName")return{from:i.from,options:_1,validFor:Ji};if(i.name=="PseudoClassName")return{from:i.from,options:w1,validFor:Ji};if(n(i)||(e.explicit||s)&&Dq(i,t.doc))return{from:n(i)||s?i.from:r,options:rS(t.doc,Rq(i),n),validFor:Mq};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Fh(),validFor:Ji};return{from:i.from,options:Qq,validFor:Ji}}if(i.name=="AtKeyword")return{from:i.from,options:Lq,validFor:Ji};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:w1,validFor:Ji}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:_1,validFor:Ji}:o.name=="Block"||o.name=="Styles"?{from:r,options:Fh(),validFor:Ji}:null},sS=iS(n=>n.name=="VariableName"),_c=Xa.define({name:"css",parser:$q.configure({props:[ul.add({Declaration:lf()}),Yc.add({"Block KeyframeList":k2})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function oS(){return new Wa(_c,_c.data.of({autocomplete:sS}))}const Iq=Object.freeze(Object.defineProperty({__proto__:null,css:oS,cssCompletionSource:sS,cssLanguage:_c,defineCSSCompletionSource:iS},Symbol.toStringTag,{value:"Module"})),Nq=316,Bq=317,x1=1,jq=2,zq=3,Zq=4,Xq=318,Fq=320,Vq=321,Wq=5,Yq=6,Uq=0,zm=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],aS=125,Gq=59,Zm=47,Hq=42,Kq=43,Jq=45,eR=60,tR=44,nR=63,rR=46,iR=91,sR=new zx({start:!1,shift(n,e){return e==Wq||e==Yq||e==Fq?n:e==Vq},strict:!1}),oR=new Zr((n,e)=>{let{next:t}=n;(t==aS||t==-1||e.context)&&n.acceptToken(Xq)},{contextual:!0,fallback:!0}),aR=new Zr((n,e)=>{let{next:t}=n,r;zm.indexOf(t)>-1||t==Zm&&((r=n.peek(1))==Zm||r==Hq)||t!=aS&&t!=Gq&&t!=-1&&!e.context&&n.acceptToken(Nq)},{contextual:!0}),lR=new Zr((n,e)=>{n.next==iR&&!e.context&&n.acceptToken(Bq)},{contextual:!0}),cR=new Zr((n,e)=>{let{next:t}=n;if(t==Kq||t==Jq){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(x1);n.acceptToken(r?x1:jq)}}else t==nR&&n.peek(1)==rR&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(zq))},{contextual:!0});function Vh(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const uR=new Zr((n,e)=>{if(n.next!=eR||!e.dialectEnabled(Uq)||(n.advance(),n.next==Zm))return;let t=0;for(;zm.indexOf(n.next)>-1;)n.advance(),t++;if(Vh(n.next,!0)){for(n.advance(),t++;Vh(n.next,!1);)n.advance(),t++;for(;zm.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==tR)return;for(let r=0;;r++){if(r==7){if(!Vh(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(Zq,-t)}),fR=cl({"get set async static":N.modifier,"for while do if else switch try catch finally return throw break continue default case defer":N.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":N.operatorKeyword,"let var const using function class extends":N.definitionKeyword,"import export from":N.moduleKeyword,"with debugger new":N.keyword,TemplateString:N.special(N.string),super:N.atom,BooleanLiteral:N.bool,this:N.self,null:N.null,Star:N.modifier,VariableName:N.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":N.function(N.variableName),VariableDefinition:N.definition(N.variableName),Label:N.labelName,PropertyName:N.propertyName,PrivatePropertyName:N.special(N.propertyName),"CallExpression/MemberExpression/PropertyName":N.function(N.propertyName),"FunctionDeclaration/VariableDefinition":N.function(N.definition(N.variableName)),"ClassDeclaration/VariableDefinition":N.definition(N.className),"NewExpression/VariableName":N.className,PropertyDefinition:N.definition(N.propertyName),PrivatePropertyDefinition:N.definition(N.special(N.propertyName)),UpdateOp:N.updateOperator,"LineComment Hashbang":N.lineComment,BlockComment:N.blockComment,Number:N.number,String:N.string,Escape:N.escape,ArithOp:N.arithmeticOperator,LogicOp:N.logicOperator,BitOp:N.bitwiseOperator,CompareOp:N.compareOperator,RegExp:N.regexp,Equals:N.definitionOperator,Arrow:N.function(N.punctuation),": Spread":N.punctuation,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace,"InterpolationStart InterpolationEnd":N.special(N.brace),".":N.derefOperator,", ;":N.separator,"@":N.meta,TypeName:N.typeName,TypeDefinition:N.definition(N.typeName),"type enum interface implements namespace module declare":N.definitionKeyword,"abstract global Privacy readonly override":N.modifier,"is keyof unique infer asserts":N.operatorKeyword,JSXAttributeValue:N.attributeValue,JSXText:N.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":N.angleBracket,"JSXIdentifier JSXNameSpacedName":N.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":N.attributeName,"JSXBuiltin/JSXIdentifier":N.standard(N.tagName)}),dR={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},hR={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},pR={__proto__:null,"<":193},mR=Ua.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'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ableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:sR,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[fR],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'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r$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[aR,lR,cR,uR,2,3,4,5,6,7,8,9,10,11,12,13,14,oR,new Yf("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Yf("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>dR[n]||-1},{term:343,get:n=>hR[n]||-1},{term:95,get:n=>pR[n]||-1}],tokenPrec:15201}),JO=[gr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),gr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),gr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),gr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),gr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),gr(`try {
161
+ \${}
162
+ } catch (\${error}) {
163
+ \${}
164
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),gr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),gr(`if (\${}) {
165
+ \${}
166
+ } else {
167
+ \${}
168
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),gr(`class \${name} {
169
+ constructor(\${params}) {
170
+ \${}
171
+ }
172
+ }`,{label:"class",detail:"definition",type:"keyword"}),gr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),gr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],lS=JO.concat([gr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),gr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),gr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),S1=new m2,cS=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function kl(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const gR=["FunctionDeclaration"],OR={FunctionDeclaration:kl("function"),ClassDeclaration:kl("class"),ClassExpression:()=>!0,EnumDeclaration:kl("constant"),TypeAliasDeclaration:kl("type"),NamespaceDeclaration:kl("namespace"),VariableDefinition(n,e){n.matchContext(gR)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function uS(n,e){let t=S1.get(e);if(t)return t;let r=[],i=!0;function s(o,a){let l=n.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(Wt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=OR[o.name];if(a&&a(o,s)||cS.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of uS(n,o.node))r.push(a);return!1}}),S1.set(e,r),r}const Gf=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ev=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function fS(n){let e=wn(n.state).resolveInner(n.pos,-1);if(ev.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Gf.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)cS.has(i.name)&&(r=r.concat(uS(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Gf}}function Wh(n,e,t){var r;let i=[];for(;;){let s=e.firstChild,o;if(s?.name=="VariableName")return i.push(n(s)),{path:i.reverse(),name:t};if(s?.name=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(n(o)),e=s;else return null}}function dS(n){let e=r=>n.state.doc.sliceString(r.from,r.to),t=wn(n.state).resolveInner(n.pos,-1);return t.name=="PropertyName"?Wh(e,t.parent,e(t)):(t.name=="."||t.name=="?.")&&t.parent.name=="MemberExpression"?Wh(e,t.parent,""):ev.indexOf(t.name)>-1?null:t.name=="VariableName"||t.to-t.from<20&&Gf.test(e(t))?{path:[],name:e(t)}:t.name=="MemberExpression"?Wh(e,t,""):n.explicit?{path:[],name:""}:null}function vR(n,e){let t=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(n)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let a;try{a=n[o]}catch{continue}t.push({label:o,type:typeof a=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(n);if(!s)return t;n=s}}function bR(n){let e=new Map;return t=>{let r=dS(t);if(!r)return null;let i=n;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=vR(i,!r.path.length)),{from:t.pos-r.name.length,options:s,validFor:Gf}}}const ni=Xa.define({name:"javascript",parser:mR.configure({props:[ul.add({IfStatement:lf({except:/^\s*({|else\b)/}),TryStatement:lf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:$L,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:EL({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":lf({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Yc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":k2,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),hS={test:n=>/^JSX/.test(n.name),facet:Zd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},tv=ni.configure({dialect:"ts"},"typescript"),nv=ni.configure({dialect:"jsx",props:[CO.add(n=>n.isTop?[hS]:void 0)]}),rv=ni.configure({dialect:"jsx ts",props:[CO.add(n=>n.isTop?[hS]:void 0)]},"typescript");let pS=n=>({label:n,type:"keyword"});const mS="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(pS),yR=mS.concat(["declare","implements","private","protected","public"].map(pS));function gS(n={}){let e=n.jsx?n.typescript?rv:nv:n.typescript?tv:ni,t=n.typescript?lS.concat(yR):JO.concat(mS);return new Wa(e,[ni.data.of({autocomplete:rD(ev,dx(t))}),ni.data.of({autocomplete:fS}),n.jsx?OS:[]])}function wR(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function A1(n,e,t=n.length){for(let r=e?.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const _R=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),OS=Pe.inputHandler.of((n,e,t,r,i)=>{if((_R?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!ni.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,f=wn(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u)){if(r==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let h=f.parent,m=h.parent;if(m&&h.from==u-2&&((d=A1(o.doc,m.firstChild,u))||((c=m.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${d}>`;return{range:pe.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(r==">"){let h=wR(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=A1(o.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(n.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function kR(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{var i;!((i=t.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:s,to:o}of ni.findRegions(r)){let a=r.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let c of n.verify(r.sliceDoc(s,o),e))i.push(xR(c,r.doc,l))}return i}}function C1(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function xR(n,e,t){let r=C1(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?C1(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:s,text:o}=n.fix,a=s[0]+t.pos-r,l=s[1]+t.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+a,to:u+l,insert:o},scrollIntoView:!0})}}]}return i}const Tu=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:OS,completionPath:dS,esLint:kR,javascript:gS,javascriptLanguage:ni,jsxLanguage:nv,localCompletionSource:fS,scopeCompletionSource:bR,snippets:JO,tsxLanguage:rv,typescriptLanguage:tv,typescriptSnippets:lS},Symbol.toStringTag,{value:"Module"})),xl=["_blank","_self","_top","_parent"],Yh=["ascii","utf-8","utf-16","latin1","latin1"],Uh=["get","post","put","delete"],Gh=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],$r=["true","false"],Fe={},SR={a:{attrs:{href:null,ping:null,type:null,media:null,target:xl,hreflang:null}},abbr:Fe,address:Fe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Fe,aside:Fe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Fe,base:{attrs:{href:null,target:xl}},bdi:Fe,bdo:Fe,blockquote:{attrs:{cite:null}},body:Fe,br:Fe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Gh,formmethod:Uh,formnovalidate:["novalidate"],formtarget:xl,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Fe,center:Fe,cite:Fe,code:Fe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Fe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Fe,div:Fe,dl:Fe,dt:Fe,em:Fe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Fe,figure:Fe,footer:Fe,form:{attrs:{action:null,name:null,"accept-charset":Yh,autocomplete:["on","off"],enctype:Gh,method:Uh,novalidate:["novalidate"],target:xl}},h1:Fe,h2:Fe,h3:Fe,h4:Fe,h5:Fe,h6:Fe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Fe,hgroup:Fe,hr:Fe,html:{attrs:{manifest:null}},i:Fe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Gh,formmethod:Uh,formnovalidate:["novalidate"],formtarget:xl,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Fe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Fe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Fe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Yh,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Fe,noscript:Fe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Fe,param:{attrs:{name:null,value:null}},pre:Fe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Fe,rt:Fe,ruby:Fe,samp:Fe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Yh}},section:Fe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Fe,source:{attrs:{src:null,type:null,media:null}},span:Fe,strong:Fe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Fe,summary:Fe,sup:Fe,table:Fe,tbody:Fe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Fe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Fe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Fe,time:{attrs:{datetime:null}},title:Fe,tr:Fe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Fe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Fe},vS={accesskey:null,class:null,contenteditable:$r,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:$r,autocorrect:$r,autocapitalize:$r,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":$r,"aria-autocomplete":["inline","list","both","none"],"aria-busy":$r,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":$r,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":$r,"aria-hidden":$r,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":$r,"aria-multiselectable":$r,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":$r,"aria-relevant":null,"aria-required":$r,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},bS="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of bS)vS[n]=null;class kc{constructor(e,t){this.tags={...SR,...e},this.globalAttrs={...vS,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}kc.default=new kc;function Ga(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Ha(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function yS(n,e,t){let r=t.tags[Ga(n,Ha(e))];return r?.children||t.allTags}function iv(n,e){let t=[];for(let r=Ha(e);r&&!r.type.isTop;r=Ha(r.parent)){let i=Ga(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const wS=/^[:\-\.\w\u00b7-\uffff]*$/;function T1(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Ha(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:yS(n.doc,o,e).map(a=>({label:a,type:"type"})).concat(iv(n.doc,t).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function P1(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:iv(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:wS}}function AR(n,e,t,r){let i=[],s=0;for(let o of yS(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of iv(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function CR(n,e,t,r,i){let s=Ha(t),o=s?e.tags[Ga(n.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:wS}}function TR(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=n.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=Ha(t),d=f?e.tags[Ga(n.doc,f)]:null;u=d?.attrs&&d.attrs[c]}if(u){let f=n.sliceDoc(r,i).toLowerCase(),d='"',h='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=n.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let m of u)a.push({label:m,apply:d+m+h,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function _S(n,e){let{state:t,pos:r}=e,i=wn(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?P1(t,i,i.from,r):T1(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?T1(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?P1(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?CR(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?TR(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?AR(t,n,i,r):null}function kS(n){return _S(kc.default,n)}function xS(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new kc(e,t):kc.default;return i=>_S(r,i)}const PR=ni.parser.configure({top:"SingleExpression"}),SS=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:tv.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:nv.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:rv.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:PR},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:ni.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:_c.parser}],AS=[{name:"style",parser:_c.parser.configure({top:"Styles"})}].concat(bS.map(n=>({name:n,parser:ni.parser}))),CS=Xa.define({name:"html",parser:iq.configure({props:[ul.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Yc.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),A2.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),ec=CS.configure({wrap:Kx(SS,AS)});function TS(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=Kx((n.nestedLanguages||[]).concat(SS),(n.nestedAttributes||[]).concat(AS)));let r=t?CS.configure({wrap:t,dialect:e}):e?ec.configure({dialect:e}):ec;return new Wa(r,[ec.data.of({autocomplete:xS(n)}),n.autoCloseTags!==!1?PS:[],gS().support,oS().support])}const E1=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),PS=Pe.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!ec.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,f;let d=o.doc.sliceString(l.from-1,l.to)==r,{head:h}=l,m=wn(o).resolveInner(h,-1),p;if(d&&r==">"&&m.name=="EndTag"){let O=m.parent;if(((u=(c=O.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=Ga(o.doc,O.parent,h))&&!E1.has(p)){let v=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`</${p}>`;return{range:l,changes:{from:h,to:v,insert:b}}}}else if(d&&r=="/"&&m.name=="IncompleteCloseTag"){let O=m.parent;if(m.from==h-2&&((f=O.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(p=Ga(o.doc,O,h))&&!E1.has(p)){let v=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`${p}>`;return{range:pe.cursor(h+b.length,-1),changes:{from:h,to:v,insert:b}}}}return{range:l}});return a.changes.empty?!1:(n.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),ER=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:PS,html:TS,htmlCompletionSource:kS,htmlCompletionSourceWith:xS,htmlLanguage:ec},Symbol.toStringTag,{value:"Module"})),ES=Zd({commentTokens:{block:{open:"<!--",close:"-->"}}}),$S=new st,QS=KD.configure({props:[Yc.add(n=>!n.is("Block")||n.is("Document")||Xm(n)!=null||$R(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),$S.add(Xm),ul.add({Document:()=>null}),Ns.add({Document:ES})]});function Xm(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function $R(n){return n.name=="OrderedList"||n.name=="BulletList"}function QR(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Xm(r.type))!=null&&i<=e)break;t=r}return t.to}const LR=QL.of((n,e,t)=>{for(let r=wn(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop($S);if(i==null)continue;let s=QR(r,i);if(s>t)return{from:t,to:s}}return null});function sv(n){return new Nr(ES,n,[],"markdown")}const LS=sv(QS),MR=QS.configure([c3,f3,u3,d3,{props:[Yc.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),xc=sv(MR);function DR(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=J.matchLanguageName(n,t,!0),r instanceof J)return r.support?r.support.language.parser:jo.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class Hh{constructor(e,t,r,i,s,o,a){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+DS(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function MS(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new Hh(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new Hh(s.parent,l,l+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new Hh(s.parent,l,l+u,o[1],c,f,s))}}return r}function DS(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Kh(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let a=DS(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;t.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(i+2+r)})}i=l}let o=s.nextSibling;if(!o)break;s=o}}function ov(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(Wc)!=" ")return n;let r=Os(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const qS=(n={})=>({state:e,dispatch:t})=>{let r=wn(e),{doc:i}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!xc.isActiveAt(e,a.from,-1)&&!xc.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,c=i.lineAt(l),u=MS(r.resolveInner(l,-1),i);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:a};let f=u[u.length-1];if(f.to-f.spaceAfter.length>l-c.from)return s={range:a};let d=l>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&d){let v=f.node.firstChild,b=f.node.getChild("ListItem","ListItem");if(v.to>=l||b&&b.to<l||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||n.nonTightLists===!1){let _=u.length>1?u[u.length-2]:null,C,y="";_&&_.item?(C=c.from+_.from,y=_.marker(i,1)):C=c.from+(_?_.to:0);let w=[{from:C,to:l,insert:y}];return f.node.name=="OrderedList"&&Kh(f.item,i,w,-2),_&&_.node.name=="OrderedList"&&Kh(_.item,i,w),{range:pe.cursor(C+y.length),changes:w}}else{let _=Q1(u,e,c);return{range:pe.cursor(l+_.length+1),changes:{from:c.from,insert:_+e.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let v=i.lineAt(c.from-1),b=/>\s*$/.exec(v.text);if(b&&b.index==f.from){let _=e.changes([{from:v.from+b.index,to:v.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(_),changes:_}}}let h=[];f.node.name=="OrderedList"&&Kh(f.item,i,h);let m=f.item&&f.item.from<c.from,p="";if(!m||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let v=0,b=u.length-1;v<=b;v++)p+=v==b&&!m?u[v].marker(i,1):u[v].blank(v<b?Os(c.text,4,u[v+1].from)-p.length:null);let O=l;for(;O>c.from&&/\s/.test(c.text.charAt(O-c.from-1));)O--;return p=ov(p,e),qR(f.node,e.doc)&&(p=Q1(u,e,c)+e.lineBreak+p),h.push({from:O,to:l,insert:e.lineBreak+p}),{range:pe.cursor(O+p.length+1),changes:h}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},RS=qS();function $1(n){return n.name=="QuoteMark"||n.name=="ListMark"}function qR(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function Q1(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?Os(t.text,4,n[i+1].from)-r.length:null,i<s);return ov(r,e)}function RR(n,e){let t=n.resolveInner(e,-1),r=e;$1(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if($1(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const IS=({state:n,dispatch:e})=>{let t=wn(n),r=null,i=n.changeByRange(s=>{let o=s.from,{doc:a}=n;if(s.empty&&xc.isActiveAt(n,s.from)){let l=a.lineAt(o),c=MS(RR(t,o),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>f&&!/\S/.test(l.text.slice(f,o-l.from)))return{range:pe.cursor(l.from+f),changes:{from:l.from+f,to:o}};if(o-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let d=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(Os(l.text,4,u.to)-Os(l.text,4,u.from));return d==l.from&&(h=ov(h,n)),{range:pe.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<o)return{range:pe.cursor(d),changes:{from:d,to:o}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},NS=[{key:"Enter",run:RS},{key:"Backspace",run:IS}],BS=TS({matchClosingTags:!1});function Ka(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=LS,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=BS}=n;if(!(i instanceof Ud))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=n.extensions?[n.extensions]:[],c=[a.support,LR],u;o&&c.push(jS),t instanceof Wa?(c.push(t.support),u=t.language):t&&(u=t);let f=e||u?DR(e,u):void 0;l.push(e3({codeParser:f,htmlParser:a.language.parser})),r&&c.push(ro.high(Yo.of(NS)));let d=sv(i.configure(l));return s&&c.push(d.data.of({autocomplete:IR})),new Wa(d,c)}function IR(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=wn(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:NR(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Jh=null;function NR(){if(Jh)return Jh;let n=kS(new IO(Mt.create({extensions:BS}),0,!0));return Jh=n?n.options:[]}const BR=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,jS=Pe.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!xc.isActiveAt(e.state,r.from,1)))return!1;let s=wn(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||BR.test(a.name))&&(o=!0)},leave:a=>{a.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),jR=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:LS,deleteMarkupBackward:IS,insertNewlineContinueMarkup:RS,insertNewlineContinueMarkupCommand:qS,markdown:Ka,markdownKeymap:NS,markdownLanguage:xc,pasteURLAsLink:jS},Symbol.toStringTag,{value:"Module"})),L1=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class Ja{constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?a=>s(L1(a)):L1,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ls(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=H_(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=mo(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let a=i.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(l)return this.value=l,this;break}o==r&&s<t.length&&t.charCodeAt(s)==a&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Ja.prototype[Symbol.iterator]=function(){return this});const zS={from:-1,to:-1,match:/.*/.exec("")},av="gm"+(/x/.unicode==null?"":"u");class ZS{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=zS,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new XS(e,t,r,i,s);this.re=new RegExp(t,av+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=Hf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=Hf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const ep=new WeakMap;class La{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=ep.get(e);if(!i||i.from>=r||i.to<=t){let a=new La(t,e.sliceString(t,r));return ep.set(e,a),a}if(i.from==t&&i.to==r)return i;let{text:s,from:o}=i;return o>t&&(s=e.sliceString(t,o)+s,o=t),i.to<r&&(s+=e.sliceString(i.to,r)),ep.set(e,new La(o,s)),new La(t,s.slice(t-o,r-o))}}class XS{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=zS,this.matchPos=Hf(e,i),this.re=new RegExp(t,av+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=La.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=Hf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=La.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ZS.prototype[Symbol.iterator]=XS.prototype[Symbol.iterator]=function(){return this});function zR(n){try{return new RegExp(n,av),!0}catch{return!1}}function Hf(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const ZR=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=B5(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){n.dispatch({effects:r});return}let a=e.doc.lineAt(e.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let O=h/100;l&&(O=O*(l=="-"?-1:1)+a.number/e.doc.lines),h=Math.round(e.doc.lines*O)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let m=e.doc.line(Math.max(1,Math.min(e.doc.lines,h))),p=pe.cursor(m.from+Math.max(0,Math.min(d,m.length)));n.dispatch({effects:[r,Pe.scrollIntoView(p.from,{y:"center"})],selection:p})}),!0},XR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},FR=Ne.define({combine(n){return zc(n,XR,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function FS(n){return[GR,UR]}const VR=gt.mark({class:"cm-selectionMatch"}),WR=gt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function M1(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Tn.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Tn.Word)}function YR(n,e,t,r){return n(e.sliceDoc(t,t+1))==Tn.Word&&n(e.sliceDoc(r-1,r))==Tn.Word}const UR=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(FR),{state:t}=n,r=t.selection;if(r.ranges.length>1)return gt.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return gt.none;let l=t.wordAt(i.head);if(!l)return gt.none;o=t.charCategorizer(i.head),s=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return gt.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(M1(o,t,i.from,i.to)&&YR(o,t,i.from,i.to)))return gt.none}else if(s=t.sliceDoc(i.from,i.to),!s)return gt.none}let a=[];for(let l of n.visibleRanges){let c=new Ja(t.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||M1(o,t,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(WR.range(u,f)):(u>=i.to||f<=i.from)&&a.push(VR.range(u,f)),a.length>e.maxMatches))return gt.none}}return gt.set(a)}},{decorations:n=>n.decorations}),GR=Pe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),HR=({state:n,dispatch:e})=>{let{selection:t}=n,r=pe.create(t.ranges.map(i=>n.wordAt(i.head)||pe.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function KR(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let o=!1,a=new Ja(n.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Ja(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==a.value.from))continue;if(s){let l=n.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const JR=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return HR({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=KR(n,r);return i?(e(n.update({selection:n.selection.addRange(pe.range(i.from,i.to),!1),effects:Pe.scrollIntoView(i.to)})),!0):!1},pl=Ne.define({combine(n){return zc(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new dI(e),scrollToMatch:e=>Pe.scrollIntoView(e)})}});class VS{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||zR(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?`
173
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new sI(this):new nI(this)}getCursor(e,t=0,r){let i=e.doc?e:Mt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ca(this,i,t,r):la(this,i,t,r)}}class WS{constructor(e){this.spec=e}}function eI(n,e,t){return(r,i,s,o)=>{if(t&&!t(r,i,s,o))return!1;let a=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return n(a,e,r,i)}}function la(n,e,t,r){let i;return n.wholeWord&&(i=tI(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=eI(n.test,e,i)),new Ja(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function tI(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(Kf(i,t-s))!=Tn.Word||e(Jf(i,t-s))!=Tn.Word)&&(e(Jf(i,r-s))!=Tn.Word||e(Kf(i,r-s))!=Tn.Word))}class nI extends WS{constructor(e){super(e)}nextMatch(e,t,r){let i=la(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=la(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),o=la(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=la(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=la(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function rI(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function ca(n,e,t,r){let i;return n.wholeWord&&(i=iI(e.charCategorizer(e.selection.main.head))),n.test&&(i=rI(n.test,e,i)),new ZS(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function Kf(n,e){return n.slice(Zn(n,e,!1),e)}function Jf(n,e){return n.slice(e,Zn(n,e))}function iI(n){return(e,t,r)=>!r[0].length||(n(Kf(r.input,r.index))!=Tn.Word||n(Jf(r.input,r.index))!=Tn.Word)&&(n(Jf(r.input,r.index+r[0].length))!=Tn.Word||n(Kf(r.input,r.index+r[0].length))!=Tn.Word)}class sI extends WS{nextMatch(e,t,r){let i=ca(this.spec,e,r,e.doc.length).next();return i.done&&(i=ca(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),o=ca(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==t||a.from>s+10))return a;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=ca(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=ca(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Sc=It.define(),lv=It.define(),Fs=oi.define({create(n){return new tp(Fm(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Sc)?n=new tp(t.value.create(),n.panel):t.is(lv)&&(n=new tp(n.query,t.value?cv:null));return n},provide:n=>Rf.from(n,e=>e.panel)});class tp{constructor(e,t){this.query=e,this.panel=t}}const oI=gt.mark({class:"cm-searchMatch"}),aI=gt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),lI=cr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Fs))}update(n){let e=n.state.field(Fs);(e!=n.startState.field(Fs)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return gt.none;let{view:t}=this,r=new Ro;for(let i=0,s=t.visibleRanges,o=s.length;i<o;i++){let{from:a,to:l}=s[i];for(;i<o-1&&l>s[i+1].from-500;)l=s[++i].to;n.highlight(t.state,a,l,(c,u)=>{let f=t.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?aI:oI)})}return r.finish()}},{decorations:n=>n.decorations});function Hc(n){return e=>{let t=e.state.field(Fs,!1);return t&&t.query.spec.valid?n(e,t):GS(e)}}const ed=Hc((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=pe.single(r.from,r.to),s=n.state.facet(pl);return n.dispatch({selection:i,effects:[uv(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),US(n),!0}),td=Hc((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=pe.single(i.from,i.to),o=n.state.facet(pl);return n.dispatch({selection:s,effects:[uv(n,i),o.scrollToMatch(s.main,n)],userEvent:"select.search"}),US(n),!0}),cI=Hc((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:pe.create(t.map(r=>pe.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),uI=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],o=0;for(let a=new Ja(n.doc,n.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(pe.range(a.value.from,a.value.to))}return e(n.update({selection:pe.create(s,o),userEvent:"select.search.matches"})),!0},D1=Hc((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==r&&o.to==i&&(c=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(t,o.from,o.to),u.push(Pe.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+".")));let f=n.state.changes(a);return o&&(l=pe.single(o.from,o.to).map(f),u.push(uv(n,o)),u.push(t.facet(pl).scrollToMatch(l.main,n))),n.dispatch({changes:f,selection:l,effects:u,userEvent:"input.replace"}),!0}),fI=Hc((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Pe.announce.of(r),userEvent:"input.replace.all"}),!0});function cv(n){return n.state.facet(pl).createPanel(n)}function Fm(n,e){var t,r,i,s,o;let a=n.selection.main,l=a.empty||a.to>a.from+100?"":n.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=n.facet(pl);return new VS({search:((t=e?.literal)!==null&&t!==void 0?t:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function YS(n){let e=o2(n,cv);return e&&e.dom.querySelector("[main-field]")}function US(n){let e=YS(n);e&&e==n.root.activeElement&&e.select()}const GS=n=>{let e=n.state.field(Fs,!1);if(e&&e.panel){let t=YS(n);if(t&&t!=n.root.activeElement){let r=Fm(n.state,e.query.spec);r.valid&&n.dispatch({effects:Sc.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[lv.of(!0),e?Sc.of(Fm(n.state,e.query.spec)):It.appendConfig.of(pI)]});return!0},HS=n=>{let e=n.state.field(Fs,!1);if(!e||!e.panel)return!1;let t=o2(n,cv);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:lv.of(!1)}),!0},KS=[{key:"Mod-f",run:GS,scope:"editor search-panel"},{key:"F3",run:ed,shift:td,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ed,shift:td,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:HS,scope:"editor search-panel"},{key:"Mod-Shift-l",run:uI},{key:"Mod-Alt-g",run:ZR},{key:"Mod-d",run:JR,preventDefault:!0}];class dI{constructor(e){this.view=e;let t=this.query=e.state.field(Fs).query.spec;this.commit=this.commit.bind(this),this.searchField=jn("input",{value:t.search,placeholder:Qr(e,"Find"),"aria-label":Qr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=jn("input",{value:t.replace,placeholder:Qr(e,"Replace"),"aria-label":Qr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=jn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=jn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=jn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,o){return jn("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=jn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ed(e),[Qr(e,"next")]),r("prev",()=>td(e),[Qr(e,"previous")]),r("select",()=>cI(e),[Qr(e,"all")]),jn("label",null,[this.caseField,Qr(e,"match case")]),jn("label",null,[this.reField,Qr(e,"regexp")]),jn("label",null,[this.wordField,Qr(e,"by word")]),...e.state.readOnly?[]:[jn("br"),this.replaceField,r("replace",()=>D1(e),[Qr(e,"replace")]),r("replaceAll",()=>fI(e),[Qr(e,"replace all")])],jn("button",{name:"close",onclick:()=>HS(e),"aria-label":Qr(e,"close"),type:"button"},["×"])])}commit(){let e=new VS({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Sc.of(e)}))}keydown(e){E5(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?td:ed)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),D1(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(Sc)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(pl).top}}function Qr(n,e){return n.state.phrase(e)}const Pu=30,Eu=/[\s\.,:;?!]/;function uv(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-Pu),o=Math.min(i,t+Pu),a=n.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<Pu;l++)if(!Eu.test(a[l+1])&&Eu.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-Pu;l--)if(!Eu.test(a[l-1])&&Eu.test(a[l])){a=a.slice(0,l);break}}return Pe.announce.of(`${n.state.phrase("current match")}. ${a} ${n.state.phrase("on line")} ${r.number}.`)}const hI=Pe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),pI=[Fs,ro.low(lI),hI];function mI(n){return n.replace(/\$\{\d+\|([^,}]+)[^}]*\}/g,"$1").replace(/\$\{\d+:([^}]*)}/g,"$1").replace(/\$\d+/g,"")}function gI(n){if(n.snippet&&n.snippet.length>0)return n.snippet.map(mI).join(`
174
+ `);const e=[];for(const[r,i]of Object.entries(n.attributes))if(i.required){const s=i.values?.[0]??"";e.push(`${r}="${s}"`)}const t=e.length>0?" "+e.join(" "):"";return n.selfClosing?`{% ${n.name}${t} /%}`:`{% ${n.name}${t} %}
175
+
176
+ {% /${n.name} %}`}function Vm(n){return e=>{const t=e.matchBefore(/\/\w*/);if(!t||t.from>0&&e.state.doc.sliceString(t.from-1,t.from).trim()!=="")return null;const r=n();if(r.length===0)return null;const i=t.from,s=r.map(o=>({label:o.name,detail:o.category,info:o.description,section:o.category,type:"keyword",apply:(a,l,c,u)=>{const f=gI(o);a.dispatch({changes:{from:i,to:u,insert:f},selection:{anchor:o.selfClosing?i+f.indexOf("/%}"):i+f.indexOf("%}")+2+1}})}}));return{from:i+1,options:s,filter:!0}}}function OI(n,e){const t=n.slice(Math.max(0,e-500),e),r=t.lastIndexOf("%}"),i=t.lastIndexOf("{%");if(i===-1||r!==-1&&r>i)return null;const s=t.slice(i+2).trimStart();if(s.startsWith("/"))return null;const o=s.match(/^(\w[\w-]*)/);if(!o)return null;const a=o[1],c=s.slice(o[0].length).match(/(\w[\w-]*)="[^"]*$/);if(c){const u=t.lastIndexOf('="');return{tagName:a,attrName:c[1],valueStart:Math.max(0,e-500)+u+2}}return{tagName:a}}function vI(n,e,t){const r=t.design;if(!r?.contexts)return[];const i=Object.keys(r.contexts);return n==="sandbox"&&e==="context"||n==="design-context"&&e==="scope"?i:[]}function Wm(n,e){return t=>{const r=t.state.doc.toString(),i=t.pos,s=OI(r,i);if(!s)return null;const o=n(),a=new Map;for(const h of o){a.set(h.name,h);for(const m of h.aliases)a.set(m,h)}const l=a.get(s.tagName);if(!l)return null;if(s.attrName&&s.valueStart!==void 0){const h=l.attributes[s.attrName];if(h?.values?.length)return{from:s.valueStart,options:h.values.map(p=>({label:p,type:"enum"})),filter:!0};const m=e?vI(s.tagName,s.attrName,e()):[];return m.length?{from:s.valueStart,options:m.map(p=>({label:p,type:"variable"})),filter:!0}:null}const c=t.matchBefore(/\w*/);if(!c||!t.explicit&&c.from===c.to)return null;const u=r.slice(Math.max(0,i-500),i),f=new Set([...u.matchAll(/(\w[\w-]*)="/g)].map(h=>h[1])),d=Object.entries(l.attributes).filter(([h])=>!f.has(h)).map(([h,m])=>({label:h,detail:m.required?"required":void 0,type:"property",apply:`${h}="`,boost:m.required?1:0}));return d.length===0?null:{from:c.from,options:d,filter:!0}}}const bI=gt.mark({class:"cm-markdoc-tag"}),q1=gt.mark({class:"cm-markdoc-bracket"}),yI=gt.mark({class:"cm-markdoc-name"}),R1=/\{%\s*(\/?)(\w[\w-]*)((?:\s+[^%]*)?)(\/?)\s*%\}/g;function I1(n){const e=[];for(const{from:r,to:i}of n.visibleRanges){const s=n.state.doc.sliceString(r,i);R1.lastIndex=0;let o;for(;(o=R1.exec(s))!==null;){const a=r+o.index,l=a+o[0].length;e.push({from:a,to:l,deco:bI}),e.push({from:a,to:a+2,deco:q1}),e.push({from:l-2,to:l,deco:q1});const c=o[1],u=o[2],f=o[0].indexOf(c+u,2),d=a+f+c.length;e.push({from:d,to:d+u.length,deco:yI})}}e.sort((r,i)=>r.from-i.from||r.to-i.to);const t=new Ro;for(const r of e)t.add(r.from,r.to,r.deco);return t.finish()}const wI=cr.fromClass(class{decorations;constructor(n){this.decorations=I1(n)}update(n){(n.docChanged||n.viewportChanged)&&(this.decorations=I1(n.view))}},{decorations:n=>n.decorations});function Ac(){return wI}const _I=Pe.theme({"&":{backgroundColor:"#f8fafc",color:"#1a1a2e",fontSize:"13px",height:"100%"},".cm-scroller":{overflow:"auto",fontFamily:"'SF Mono', 'Fira Code', ui-monospace, monospace",lineHeight:"1.6"},".cm-content":{padding:"1rem 0",caretColor:"#1e293b"},".cm-gutters":{backgroundColor:"#f8fafc",color:"#94a3b8",border:"none",paddingRight:"0.5rem"},".cm-activeLineGutter":{backgroundColor:"#e2e8f0",color:"#64748b"},".cm-activeLine":{backgroundColor:"rgba(0, 0, 0, 0.03)"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},"&.cm-focused":{outline:"none"},".cm-tooltip.cm-tooltip-autocomplete":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",backgroundColor:"#ffffff",overflow:"hidden"},".cm-tooltip.cm-tooltip-autocomplete ul":{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",maxHeight:"280px"},".cm-tooltip.cm-tooltip-autocomplete ul li":{padding:"4px 8px",borderBottom:"1px solid #f1f5f9"},".cm-tooltip.cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:"#f0f9ff",color:"#0369a1"},".cm-tooltip.cm-completionInfo":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)",backgroundColor:"#ffffff",padding:"6px 10px",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",color:"#475569",maxWidth:"300px"},".cm-completionDetail":{color:"#94a3b8",fontStyle:"normal",marginLeft:"0.5em"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1}),JS=fl.define([{tag:N.heading1,color:"#0369a1",fontWeight:"bold",fontSize:"1.4em"},{tag:N.heading2,color:"#0369a1",fontWeight:"bold",fontSize:"1.2em"},{tag:N.heading3,color:"#0369a1",fontWeight:"bold",fontSize:"1.1em"},{tag:N.heading,color:"#0369a1",fontWeight:"bold"},{tag:N.emphasis,color:"#9333ea",fontStyle:"italic"},{tag:N.strong,color:"#9333ea",fontWeight:"bold"},{tag:N.link,color:"#0ea5e9",textDecoration:"underline"},{tag:N.url,color:"#0ea5e9"},{tag:N.quote,color:"#64748b"},{tag:N.monospace,color:"#16a34a"},{tag:N.processingInstruction,color:"#d97706"},{tag:N.meta,color:"#94a3b8"},{tag:N.comment,color:"#94a3b8"},{tag:N.punctuation,color:"#94a3b8"}]);var kI=V('<div class="md-editor__empty svelte-12tkyig"><span class="md-editor__empty-text svelte-12tkyig">Select a file to edit</span></div>'),xI=V("<div></div> <!>",1);function eA(n,e){Ot(e,!0);let t,r;mn(()=>{if(!t)return;const c=Mt.create({doc:Sr(()=>X.bodyContent),extensions:[G5(),J5(),L5(),MO(),Ka(),_I,mc(JS),FS(),Yo.of([...RO,...DO,...KS,{key:"Mod-/",run:u=>(Hl(u),!0)}]),Pe.updateListener.of(u=>{u.docChanged&&X.updateBody(u.state.doc.toString())}),Pe.lineWrapping,Ac(),Dm({override:[Vm(()=>X.runes),Wm(()=>X.runes,()=>X.aggregated)],icons:!1})]});return r=new Pe({state:c,parent:t}),()=>{r?.destroy()}}),mn(()=>{const c=X.bodyContent;if(!r)return;const u=r.state.doc.toString();c!==u&&r.dispatch({changes:{from:0,to:r.state.doc.length,insert:c}})});var i=xI(),s=ot(i);let o;fn(s,c=>t=c,()=>t);var a=R(s,2);{var l=c=>{var u=kI();z(c,u)};ue(a,c=>{X.currentPath||c(l)})}fe(()=>o=Ze(s,1,"md-editor svelte-12tkyig",null,o,{hidden:!X.currentPath})),z(n,i),vt()}function SI(n){let e=5381;for(let t=0;t<n.length;t++)e=(e<<5)+e+n.charCodeAt(t)>>>0;return e.toString(36)}function es(n,e){const t=SI(n),r=e.get(t)??0;return e.set(t,r+1),r===0?`blk_${t}`:`blk_${t}_${r}`}const Cc=/^\{%\s+(\w[\w-]*)((?:\s+\w[\w-]*(?:="[^"]*"|=[\w.-]+)?)*)\s*(\/?)\s*%\}/;function tA(n){return new RegExp(`^\\{%\\s+/${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}`)}function nd(n){const e={},t=/(\w[\w-]*)(?:="([^"]*)"|=([\w.-]+))?/g;let r;for(;(r=t.exec(n))!==null;)e[r[1]]=r[2]??r[3]??"true";return e}function AI(n){return n!==""&&!isNaN(Number(n))}function ff(n){const e=[];for(const[t,r]of Object.entries(n))r==="true"?e.push(t):r==="false"||AI(r)?e.push(`${t}=${r}`):e.push(`${t}="${r}"`);return e.length>0?" "+e.join(" "):""}function nA(n){const e=n.split(`
177
+ `),t=[],r=new Map;let i=0;for(;i<e.length;){const o=e[i].trimStart();if(o===""){i++;continue}if(o.startsWith("```")||o.startsWith("~~~")){const u=o[0];let f=3;for(;f<o.length&&o[f]===u;)f++;const d=o.slice(0,f),h=o.slice(f).trim(),m=i;i++;const p=[];for(;i<e.length&&!e[i].trimStart().startsWith(d);)p.push(e[i]),i++;i<e.length&&i++;const O=e.slice(m,i).join(`
178
+ `);t.push({id:es(O,r),type:"fence",source:O,startLine:m,endLine:i,language:h,code:p.join(`
179
+ `)});continue}const a=Cc.exec(o);if(a){const u=a[1],f=a[2]??"",d=a[3]==="/",h=i;if(d){i++;const m=e.slice(h,i).join(`
180
+ `);t.push({id:es(m,r),type:"rune",source:m,startLine:h,endLine:i,runeName:u,selfClosing:!0,attributes:nd(f),innerContent:""})}else{i++;const m=tA(u),p=[];let O=1;for(;i<e.length;){const b=e[i].trimStart(),_=Cc.exec(b);if(_&&_[1]===u&&_[3]!=="/"&&O++,m.test(b)&&(O--,O===0))break;p.push(e[i]),i++}i<e.length&&i++;const v=e.slice(h,i).join(`
181
+ `);t.push({id:es(v,r),type:"rune",source:v,startLine:h,endLine:i,runeName:u,selfClosing:!1,attributes:nd(f),innerContent:p.join(`
182
+ `)})}continue}const l=o.match(/^(#{1,6})\s+(.*)/);if(l){const u=i;i++;const f=e.slice(u,i).join(`
183
+ `);t.push({id:es(f,r),type:"heading",source:f,startLine:u,endLine:i,level:l[1].length,text:l[2]});continue}if(/^(---+|___+|\*\*\*+)\s*$/.test(o)){const u=i;i++;const f=e.slice(u,i).join(`
184
+ `);t.push({id:es(f,r),type:"hr",source:f,startLine:u,endLine:i});continue}if(/^!\[.*\]\(.*\)\s*$/.test(o)){const u=i;i++;const f=e.slice(u,i).join(`
185
+ `);t.push({id:es(f,r),type:"image",source:f,startLine:u,endLine:i});continue}if(o.startsWith(">")){const u=i;for(;i<e.length&&(e[i].trimStart().startsWith(">")||e[i].trim()!==""&&!rd(e[i]));)i++;const f=e.slice(u,i).join(`
186
+ `);t.push({id:es(f,r),type:"quote",source:f,startLine:u,endLine:i});continue}const c=o.match(/^(\d+\.|[-*+])\s/);if(c){const u=/^\d+\./.test(c[1]),f=i;for(;i<e.length;){const h=e[i].trimStart();if(/^(\d+\.|[-*+])\s/.test(h)||h===""&&i+1<e.length&&/^(\s+|\d+\.|[-*+]\s)/.test(e[i+1])||h!==""&&e[i].startsWith(" "))i++;else break}const d=e.slice(f,i).join(`
187
+ `);t.push({id:es(d,r),type:"list",source:d,startLine:f,endLine:i,ordered:u});continue}{const u=i;for(;i<e.length&&e[i].trim()!==""&&!rd(e[i]);)i++;const f=e.slice(u,i).join(`
188
+ `);t.push({id:es(f,r),type:"paragraph",source:f,startLine:u,endLine:i})}}return t}function rd(n){const e=n.trimStart();return!!(e.startsWith("#")||e.startsWith("```")||e.startsWith("~~~")||Cc.test(e)||/^(---+|___+|\*\*\*+)\s*$/.test(e)||e.startsWith(">")||/^(\d+\.|[-*+])\s/.test(e)||/^!\[.*\]\(.*\)\s*$/.test(e))}function fv(n){if(!n.trim())return[];const e=n.split(`
189
+ `),t=[];let r=0;for(;r<e.length;){const s=e[r].trimStart();if(s===""){r++;continue}if(s.startsWith("```")||s.startsWith("~~~")){const l=s[0];let c=3;for(;c<s.length&&s[c]===l;)c++;const u=s.slice(0,c),f=s.slice(c).trim(),d=r;r++;const h=r;for(;r<e.length&&!e[r].trimStart().startsWith(u);)r++;const m=e.slice(h,r).join(`
190
+ `);r<e.length&&r++,t.push({type:"fence",label:f?`Code (${f})`:"Code",source:e.slice(d,r).join(`
191
+ `),fenceLanguage:f,fenceCode:m});continue}const o=Cc.exec(s);if(o){const l=o[1],c=o[2]??"",u=o[3]==="/",f=r;if(u)r++,t.push({type:"rune",label:l,source:e.slice(f,r).join(`
192
+ `),runeName:l,selfClosing:!0,attributes:nd(c),innerContent:"",children:[]});else{r++;const d=tA(l),h=[];let m=1;for(;r<e.length;){const O=e[r].trimStart(),v=Cc.exec(O);if(v&&v[1]===l&&v[3]!=="/"&&m++,d.test(O)&&(m--,m===0))break;h.push(e[r]),r++}r<e.length&&r++;const p=h.join(`
193
+ `);t.push({type:"rune",label:l,source:e.slice(f,r).join(`
194
+ `),runeName:l,selfClosing:!1,attributes:nd(c),innerContent:p,children:fv(p)})}continue}const a=s.match(/^(#{1,6})\s+(.*)/);if(a){const l=a[1].length,c=a[2];r++,t.push({type:"heading",label:`${"#".repeat(l)} ${c}`,source:e.slice(r-1,r).join(`
195
+ `),headingLevel:l,headingText:c});continue}if(/^(---+|___+|\*\*\*+)\s*$/.test(s)){r++,t.push({type:"hr",label:"Divider",source:e.slice(r-1,r).join(`
196
+ `)});continue}if(/^!\[.*\]\(.*\)\s*$/.test(s)){r++,t.push({type:"image",label:"Image",source:e.slice(r-1,r).join(`
197
+ `)});continue}if(s.startsWith(">")){const l=r;for(;r<e.length&&(e[r].trimStart().startsWith(">")||e[r].trim()!==""&&!rd(e[r]));)r++;const c=e.slice(l,r).join(`
198
+ `);t.push({type:"quote",label:"Blockquote",source:c});continue}if(/^(\d+\.|[-*+])\s/.test(s)){const l=r,c=/^\d+\./.test(s);for(;r<e.length;){const u=e[r].trimStart();if(/^(\d+\.|[-*+])\s/.test(u)){if(/^\d+\./.test(u)!==c&&r>l)break;r++}else if(u===""&&r+1<e.length&&/^(\s+|\d+\.|[-*+]\s)/.test(e[r+1])){const f=e[r+1].trimStart();if(/^(\d+\.|[-*+])\s/.test(f)&&/^\d+\./.test(f)!==c)break;r++}else if(u!==""&&e[r].startsWith(" "))r++;else break}t.push({type:"list",label:c?"Ordered list":"List",source:e.slice(l,r).join(`
199
+ `),listOrdered:c});continue}{const l=r;for(;r<e.length&&e[r].trim()!==""&&!rd(e[r]);)r++;const c=e.slice(l,r).join(`
200
+ `),u=c.length>40?c.slice(0,40)+"…":c;t.push({type:"paragraph",label:u,source:c})}}return t}function $u(n,e,t){const r=n.indexOf(e);return r===-1?n:n.slice(0,r)+t+n.slice(r+e.length)}function rA(n){switch(n.includes("|")?n.split("|")[0]:n){case"heading":return"## Heading";case"heading:1":return"# Heading";case"heading:2":return"## Heading";case"heading:3":return"### Heading";case"heading:4":return"#### Heading";case"heading:5":return"##### Heading";case"heading:6":return"###### Heading";case"paragraph":return"Text content";case"list":case"list:unordered":return`- Item 1
201
+ - Item 2`;case"list:ordered":return`1. Item 1
202
+ 2. Item 2`;case"fence":return"```\ncode\n```";case"image":return"![alt](url)";case"blockquote":case"quote":return"> Quote";case"any":return"Content";default:return"Content"}}function CI(n,e,t,r){const{field:i,fields:s}=so(e,t,r);if(!i||i.filled)return n;const o=i.template||rA(i.match);return e.type==="delimited"&&r?DI(n,e,r,t,s,o):e.type==="sequence"?iA(n,e.fields,t,o):n}function TI(n,e,t,r){const{field:i}=so(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;let s=n;for(let o=i.nodes.length-1;o>=0;o--){const a=i.nodes[o].source;s=dv(s,a)}return s=s.replace(/\n{3,}/g,`
203
+
204
+ `),s}function PI(n,e,t,r){const{field:i}=so(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;const s=i.template||"- New item",o=i.nodes[i.nodes.length-1],a=n.indexOf(o.source);if(a===-1)return n;let l=s;if(i.match==="list:ordered"){const u=o.source.match(/^(\d+)\./),f=u?parseInt(u[1],10)+1:i.nodes.length+1;l=s.replace(/^\d+\./,`${f}.`)}const c=a+o.source.length;return n.slice(0,c)+`
205
+ `+l+n.slice(c)}function EI(n,e,t,r,i){const{field:s}=so(e,t,i);if(!s||!s.filled||s.nodes.length===0)return n;const o=s.nodes[0],a=Gd(o.source);if(r<0||r>=a.length)return n;if(a.length===1)return dv(n,o.source);const c=a.filter((f,d)=>d!==r).join(`
206
+
207
+ `),u=n.indexOf(o.source);return u===-1?n:n.slice(0,u)+c+n.slice(u+o.source.length)}function $I(n,e,t,r,i,s){if(r===i)return n;const{field:o}=so(e,t,s);if(!o||!o.filled||o.nodes.length===0)return n;const a=o.nodes[0],l=Gd(a.source);if(r<0||r>=l.length||i<0||i>=l.length)return n;const c=[...l],[u]=c.splice(r,1);if(c.splice(i,0,u),o.match==="list:ordered"||/^\d+\.\s/.test(l[0]))for(let m=0;m<c.length;m++)c[m]=c[m].replace(/^\d+\./,`${m+1}.`);const d=c.join(`
208
+ `),h=n.indexOf(a.source);return h===-1?n:n.slice(0,h)+d+n.slice(h+a.source.length)}function QI(n,e,t,r){const{field:i}=so(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;const s=i.template||rA(i.match),o=i.nodes[i.nodes.length-1],a=n.indexOf(o.source);if(a===-1)return n;const l=a+o.source.length;return n.slice(0,l)+`
209
+
210
+ `+s+n.slice(l)}function LI(n,e,t,r,i){const{field:s}=so(e,t,i);if(!s||!s.filled||s.nodes.length===0||r<0||r>=s.nodes.length)return n;const o=s.nodes[r].source;let a=dv(n,o);return a=a.replace(/\n{3,}/g,`
211
+
212
+ `),a}function MI(n,e,t,r,i,s){if(r===i)return n;const{field:o}=so(e,t,s);if(!o||!o.filled||o.nodes.length===0||r<0||r>=o.nodes.length||i<0||i>=o.nodes.length)return n;const l=[...o.nodes.map(O=>O.source)],[c]=l.splice(r,1);l.splice(i,0,c);const u=o.nodes[0].source,f=o.nodes[o.nodes.length-1].source,d=n.indexOf(u),h=n.indexOf(f);if(d===-1||h===-1)return n;const m=h+f.length,p=l.join(`
213
+
214
+ `);return n.slice(0,d)+p+n.slice(m)}function Gd(n){const e=n.split(`
215
+ `),t=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(t.push(r.join(`
216
+ `)),r=[i]):r.push(i);return r.length>0&&t.push(r.join(`
217
+ `)),t}function so(n,e,t){if(n.type==="sequence")return{field:n.fields.find(i=>i.name===e)??null,fields:n.fields};if(n.type==="delimited"&&t){const r=n.zones.find(s=>s.name===t);return r?{field:r.fields.find(s=>s.name===e)??null,fields:r.fields}:{field:null,fields:null}}return{field:null,fields:null}}function dv(n,e){const t=n.indexOf(e);if(t===-1)return n;let r=t,i=t+e.length;for(;r>0&&n[r-1]===`
218
+ `;)r--;for(r>0&&r++;i<n.length&&n[i]===`
219
+ `;)i++;return n.slice(0,r)+n.slice(i)}function iA(n,e,t,r){const i=e.findIndex(a=>a.name===t);if(i===-1)return n;let s=null;for(let a=i-1;a>=0;a--)if(e[a].filled&&e[a].nodes.length>0){const l=e[a].nodes;s=l[l.length-1];break}if(s){const a=n.indexOf(s.source);if(a!==-1){const l=a+s.source.length;return n.slice(0,l)+`
220
+
221
+ `+r+n.slice(l)}}for(let a=i+1;a<e.length;a++)if(e[a].filled&&e[a].nodes.length>0){const l=e[a].nodes[0],c=n.indexOf(l.source);if(c!==-1)return n.slice(0,c)+r+`
222
+
223
+ `+n.slice(c)}const o=n.trimEnd();return o+(o?`
224
+
225
+ `:"")+r}function DI(n,e,t,r,i,s){const o=e.zones.findIndex(p=>p.name===t);if(o===-1)return n;const a=n.split(`
226
+ `),l=[];for(let p=0;p<a.length;p++)a[p].trim()==="---"&&l.push(p);if(o>0&&l.length<o){const p=n.trimEnd(),O=o-l.length;let v="";for(let b=0;b<O;b++)v+=`
227
+
228
+ ---`;return p+v+`
229
+
230
+ `+s}const c=o===0?0:l[o-1]+1,u=o<l.length?l[o]:a.length,f=a.slice(c,u).join(`
231
+ `),d=iA(f,i,r,s),h=a.slice(0,c).join(`
232
+ `),m=a.slice(u).join(`
233
+ `);return[h,d,m].filter(Boolean).join(`
234
+ `)}function Ym(n){return n.map(e=>e.source).join(`
235
+
236
+ `)}function Hn(n){const e=ff(n.attributes);if(n.selfClosing)return`{% ${n.runeName}${e} /%}`;const t=n.innerContent.trim();return t?`{% ${n.runeName}${e} %}
237
+ ${t}
238
+ {% /${n.runeName} %}`:`{% ${n.runeName}${e} %}
239
+
240
+ {% /${n.runeName} %}`}function Um(n){return"#".repeat(n.level)+" "+n.text}function id(n){return"```"+n.language+`
241
+ `+n.code+"\n```"}function qI(n){const e=new Map;for(const t of n){e.set(t.name,t);for(const r of t.aliases)e.set(r,t)}return e}function RI(n,e){const t=n.split(`
242
+ `),r=new RegExp(`^\\{%\\s+${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b.*%\\}\\s*$`),i=new RegExp(`^\\{%\\s+/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}\\s*$`);let s=0,o=t.length;return r.test(t[0].trim())&&(s=1),o>s&&i.test(t[o-1].trim())&&(o-=1),t.slice(s,o).join(`
243
+ `).trim()}function hv(n){switch(n.type){case"prose":return"Prose";case"heading":return`H${n.level}`;case"rune":return n.runeName;case"fence":{const e=n.language;return e?`Code (${e})`:"Code"}case"list":return n.ordered?"Ordered List":"List";case"quote":return"Blockquote";case"hr":return"Divider";case"image":return"Image";case"paragraph":return"Paragraph";default:return n.type}}function N1(n){const e=[];let t=[];function r(){if(t.length===0)return;const i=t.map(s=>s.source).join(`
244
+
245
+ `);e.push({id:`prose_${t[0].id}`,type:"prose",children:[...t],source:i,startLine:t[0].startLine,endLine:t[t.length-1].endLine}),t=[]}for(const i of n)i.type==="rune"?(r(),e.push(i)):t.push(i);return r(),e}var II=Object.create,Hd=Object.defineProperty,NI=Object.getOwnPropertyDescriptor,BI=Object.getOwnPropertyNames,jI=Object.getPrototypeOf,zI=Object.prototype.hasOwnProperty,sA=n=>Hd(n,"__esModule",{value:!0}),Me=(n,e)=>function(){return e||(0,n[Object.keys(n)[0]])((e={exports:{}}).exports,e),e.exports},oA=(n,e)=>{sA(n);for(var t in e)Hd(n,t,{get:e[t],enumerable:!0})},ZI=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of BI(e))!zI.call(n,r)&&r!=="default"&&Hd(n,r,{get:()=>e[r],enumerable:!(t=NI(e,r))||t.enumerable});return n},Kd=n=>ZI(sA(Hd(n!=null?II(jI(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),aA=Me({"src/grammar/tag.js"(n,e){function t(s,o){function a(){this.constructor=s}a.prototype=o.prototype,s.prototype=new a}function r(s,o,a,l){this.message=s,this.expected=o,this.found=a,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,r)}t(r,Error),r.buildMessage=function(s,o,a){var l={literal:function(p){return'"'+u(p.text)+'"'},class:function(p){var O=p.parts.map(function(v){return Array.isArray(v)?f(v[0])+"-"+f(v[1]):f(v)});return"["+(p.inverted?"^":"")+O+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(p){return p.description},not:function(p){return"not "+d(p.expected)}};function c(p){return p.charCodeAt(0).toString(16).toUpperCase()}function u(p){return p.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(O){return"\\x0"+c(O)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(O){return"\\x"+c(O)})}function f(p){return p.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(O){return"\\x0"+c(O)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(O){return"\\x"+c(O)})}function d(p){return l[p.type](p)}function h(p){var O=p.map(d),v,b;if(O.sort(),O.length>0){for(v=1,b=1;v<O.length;v++)O[v-1]!==O[v]&&(O[b]=O[v],b++);O.length=b}switch(O.length){case 1:return O[0];case 2:return O[0]+" or "+O[1];default:return O.slice(0,-1).join(", ")+", or "+O[O.length-1]}}function m(p){return p?'"'+u(p)+'"':"end of input"}return"Expected "+h(s)+" but "+m(o)+" found."};function i(s,o){o=o!==void 0?o:{};var a={},l={Top:$e},c=$e,u="/",f=".",d="#",h="=",m="(",p=")",O=",",v="[",b="]",_="null",C="true",y="false",w="{",S="}",A=":",x='"',k="\\",E="n",T="r",$="t",L=/^[$@]/,P=/^[0-9]/,D=/^[^\0-\x1F"\\]/,I=/^[a-zA-Z0-9_\-]/,W=/^[ \n\t]/,U=Mn("/",!1),ae=Dn("tag name"),ce=Dn("class"),ne=Dn("id"),G=Mn("=",!1),oe=Mn("(",!1),ie=Mn(")",!1),j=Mn(",",!1),te=Dn("variable"),_e=Dn("null"),Ee=Dn("boolean"),Re=Mn("[",!1),ge=Mn("]",!1),Ce=Mn("{",!1),tt=Mn("}",!1),rt=Mn(":",!1),We=Dn("number"),Ye=Dn("string"),ze=Dn("identifier"),xe=Dn("whitespace"),De=function(Q){return{type:"variable",meta:{variable:Q}}},Ue=function(Q){return{type:"annotation",meta:{attributes:Q}}},lt=function(Q,F){return F},et=function(Q,F,Y,le){F&&(Y=Y||[],Y.unshift({type:"attribute",name:"primary",value:F}));const[ve,Be]=le?["tag",0]:["tag_open",1];return{type:ve,nesting:Be,meta:{tag:Q,attributes:Y}}},Qt=function(Q){return{type:"tag_close",nesting:-1,meta:{tag:Q}}},nn=function(Q,F){return Q?[Q,...F]:[]},ke=function(Q){return Q},Ft=function(Q){return Q},wt=function(Q){return Q},Ht=function(Q){return Q},xt=function(Q){return{type:"class",name:Q,value:!0}},se=function(Q){return{type:"attribute",name:"id",value:Q}},Oe=function(Q,F){return{type:"attribute",name:Q,value:F}},we=function(Q,F,Y){return F?[F,...Y]:[]},Ae=function(Q,F){let Y={};for(let[le,{name:ve,value:Be}]of F.entries())Y[ve||le]=Be;return new NC(Q,Y)},Qe=function(Q){return Q},St=function(Q,F){return{name:Q,value:F}},pt=function(Q){return Q},Ke=function(Q,F,Y){return Q==="@"?[F,...Y]:new IC([F,...Y])},At=function(){return null},bt=function(){return!0},dt=function(){return!1},Ct=function(Q,F){return[Q,...F]},xn=function(Q){return Q||[]},Vt=function(Q,F){return Object.assign(Q,...F)},rn=function(Q){return Q||{}},_t=function(Q,F){return Q==="$$mdtype"?{}:{[Q]:F}},Jt=function(){return parseFloat(Ti())},Nn=function(Q){return Q.join("")},Gn=function(){return`
246
+ `},ur=function(){return"\r"},dn=function(){return" "},Nt=function(Q){return Q},Z=0,Xe=0,hn=[{line:1,column:1}],Sn=[],Ge=0,fr;if("startRule"in o){if(!(o.startRule in l))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');c=l[o.startRule]}function Ti(){return s.substring(Xe,Z)}function Mn(Q,F){return{type:"literal",text:Q,ignoreCase:F}}function Ui(){return{type:"end"}}function Dn(Q){return{type:"other",description:Q}}function ks(Q){var F=hn[Q],Y;if(F)return F;for(Y=Q-1;!hn[Y];)Y--;for(F=hn[Y],F={line:F.line,column:F.column};Y<Q;)s.charCodeAt(Y)===10?(F.line++,F.column=1):F.column++,Y++;return hn[Q]=F,F}var Gi=typeof o.filename=="string"&&o.filename.length>0;function dr(Q,F){var Y={};Gi&&(Y.filename=o.filename);var le=ks(Q);Y.start={offset:Q,line:le.line,column:le.column};var ve=ks(F);return Y.end={offset:F,line:ve.line,column:ve.column},Y}function H(){Sn.push({pos:Z,variants:[]})}function ee(Q){var F=Sn[Sn.length-1];Z<F.pos||(Z>F.pos&&(F.pos=Z,F.variants=[]),F.variants.push(Q))}function de(Q,F,Y){return new r(r.buildMessage(Q,F,Y),Q,F,Y)}function be(){var Q=Sn[0],F=Q.pos;return de(Q.variants,F<s.length?s.charAt(F):null,F<s.length?dr(F,F+1):dr(F,F))}function $e(){var Q;return Q=it(),Q===a&&(Q=Je(),Q===a&&(Q=nt(),Q===a&&(Q=ct()))),Q}function it(){var Q,F;return Q=Z,F=zv(),F===a&&(F=Pr()),F!==a&&(Xe=Q,F=De(F)),Q=F,Q}function Je(){var Q,F,Y,le;if(Q=Z,F=ht(),F!==a){for(Y=[],le=Tt();le!==a;)Y.push(le),le=Tt();Xe=Q,Q=Ue(F)}else Z=Q,Q=a;return Q}function nt(){var Q,F,Y,le,ve,Be,kt,hr=function(xs){Ge===0&&ee(xs)};if(Q=Z,F=Bt(),F!==a){for(Y=[],le=Tt();le!==a;)Y.push(le),le=Tt();for(le=Z,ve=Ho(),ve!==a?(Be=Tt(),Be===a&&(Be=null),Xe=le,le=lt(F,ve)):(Z=le,le=a),le===a&&(le=null),ve=ht(),ve===a&&(ve=null),Be=[],kt=Tt();kt!==a;)Be.push(kt),kt=Tt();hr(U),s.charCodeAt(Z)===47?(kt=u,Z++):kt=a,kt===a&&(kt=null),Xe=Q,Q=et(F,le,ve,kt)}else Z=Q,Q=a;return Q}function ct(){var Q,F,Y,le=function(ve){Ge===0&&ee(ve)};return Q=Z,le(U),s.charCodeAt(Z)===47?(F=u,Z++):F=a,F!==a?(Y=Bt(),Y!==a?(Xe=Q,Q=Qt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function Bt(){var Q,F=function(Y){Ge===0&&ee(Y)};return F(ae),Ge++,Q=Hi(),Ge--,Q}function ht(){var Q,F,Y,le;if(Q=Z,F=pn(),F!==a){for(Y=[],le=Pn();le!==a;)Y.push(le),le=Pn();Xe=Q,Q=nn(F,Y)}else Z=Q,Q=a;return Q}function Pn(){var Q,F,Y;if(Q=Z,F=[],Y=Tt(),Y!==a)for(;Y!==a;)F.push(Y),Y=Tt();else F=a;return F!==a?(Y=pn(),Y!==a?(Xe=Q,Q=ke(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function pn(){var Q,F;return Q=Z,F=Bn(),F!==a&&(Xe=Q,F=Ft(F)),Q=F,Q===a&&(Q=Z,F=mt(),F!==a&&(Xe=Q,F=wt(F)),Q=F,Q===a&&(Q=Z,F=Xr(),F!==a&&(Xe=Q,F=Ht(F)),Q=F)),Q}function mt(){var Q,F,Y,le=function(ve){Ge===0&&ee(ve)};return le(ce),Ge++,Q=Z,s.charCodeAt(Z)===46?(F=f,Z++):F=a,F!==a?(Y=Hi(),Y!==a?(Xe=Q,Q=xt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Ge--,Q}function Bn(){var Q,F,Y,le=function(ve){Ge===0&&ee(ve)};return le(ne),Ge++,Q=Z,s.charCodeAt(Z)===35?(F=d,Z++):F=a,F!==a?(Y=Hi(),Y!==a?(Xe=Q,Q=se(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Ge--,Q}function Xr(){var Q,F,Y,le,ve=function(Be){Ge===0&&ee(Be)};return Q=Z,F=Hi(),F!==a?(ve(G),s.charCodeAt(Z)===61?(Y=h,Z++):Y=a,Y!==a?(le=Ho(),le!==a?(Xe=Q,Q=Oe(F,le)):(Z=Q,Q=a)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function Pr(){var Q,F,Y,le,ve,Be,kt,hr,xs=function(BC){Ge===0&&ee(BC)};if(Q=Z,F=Hi(),F!==a)if(xs(oe),s.charCodeAt(Z)===40?(Y=m,Z++):Y=a,Y!==a){for(le=[],ve=Tt();ve!==a;)le.push(ve),ve=Tt();for(ve=Z,Be=Uo(),Be===a&&(Be=null),kt=[],hr=Go();hr!==a;)kt.push(hr),hr=Go();Xe=ve,ve=we(F,Be,kt),xs(ie),s.charCodeAt(Z)===41?(Be=p,Z++):Be=a,Be!==a?(Xe=Q,Q=Ae(F,ve)):(Z=Q,Q=a)}else Z=Q,Q=a;else Z=Q,Q=a;return Q}function Uo(){var Q,F,Y,le,ve=function(Be){Ge===0&&ee(Be)};return Q=Z,F=Z,Y=Hi(),Y!==a?(ve(G),s.charCodeAt(Z)===61?(le=h,Z++):le=a,le!==a?(Xe=F,F=Qe(Y)):(Z=F,F=a)):(Z=F,F=a),F===a&&(F=null),Y=Ho(),Y!==a?(Xe=Q,Q=St(F,Y)):(Z=Q,Q=a),Q}function Go(){var Q,F,Y,le,ve,Be=function(kt){Ge===0&&ee(kt)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(Be(j),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(le=[],ve=Tt();ve!==a;)le.push(ve),ve=Tt();ve=Uo(),ve!==a?(Xe=Q,Q=pt(ve)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function cn(){var Q,F,Y,le=function(ve){Ge===0&&ee(ve)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();return le(j),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a?(F=[F,Y],Q=F):(Z=Q,Q=a),Q===a&&(Q=null),Q}function zv(){var Q,F,Y,le,ve,Be=function(kt){Ge===0&&ee(kt)};if(Be(te),Ge++,Q=Z,L.test(s.charAt(Z))?(F=s.charAt(Z),Z++):F=a,F!==a)if(Y=Hi(),Y!==a){for(le=[],ve=Zv();ve!==a;)le.push(ve),ve=Zv();Xe=Q,Q=Ke(F,Y,le)}else Z=Q,Q=a;else Z=Q,Q=a;return Ge--,Q}function Zv(){var Q,F,Y,le;return Q=Z,s.charCodeAt(Z)===46?(F=f,Z++):F=a,F!==a?(Y=Hi(),Y!==a?(Xe=Q,Q=Qe(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q===a&&(Q=Z,s.charCodeAt(Z)===91?(F=v,Z++):F=a,F!==a?(Y=Wv(),Y===a&&(Y=ih()),Y!==a?(s.charCodeAt(Z)===93?(le=b,Z++):le=a,le!==a?(Xe=Q,Q=pt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a)):(Z=Q,Q=a)),Q}function Ho(){var Q;return Q=LC(),Q===a&&(Q=MC(),Q===a&&(Q=ih(),Q===a&&(Q=Wv(),Q===a&&(Q=DC(),Q===a&&(Q=qC(),Q===a&&(Q=Pr(),Q===a&&(Q=zv()))))))),Q}function LC(){var Q,F,Y=function(le){Ge===0&&ee(le)};return Y(_e),Ge++,Q=Z,s.substr(Z,4)===_?(F=_,Z+=4):F=a,F!==a&&(Xe=Q,F=At()),Q=F,Ge--,Q}function MC(){var Q,F,Y=function(le){Ge===0&&ee(le)};return Y(Ee),Ge++,Q=Z,s.substr(Z,4)===C?(F=C,Z+=4):F=a,F!==a&&(Xe=Q,F=bt()),Q=F,Q===a&&(Q=Z,s.substr(Z,5)===y?(F=y,Z+=5):F=a,F!==a&&(Xe=Q,F=dt()),Q=F),Ge--,Q}function DC(){var Q,F,Y,le,ve,Be,kt,hr=function(xs){Ge===0&&ee(xs)};if(Q=Z,hr(Re),s.charCodeAt(Z)===91?(F=v,Z++):F=a,F!==a){for(Y=[],le=Tt();le!==a;)Y.push(le),le=Tt();if(le=Z,ve=Ho(),ve!==a){for(Be=[],kt=Xv();kt!==a;)Be.push(kt),kt=Xv();kt=cn(),Xe=le,le=Ct(ve,Be)}else Z=le,le=a;for(le===a&&(le=null),ve=[],Be=Tt();Be!==a;)ve.push(Be),Be=Tt();hr(ge),s.charCodeAt(Z)===93?(Be=b,Z++):Be=a,Be!==a?(Xe=Q,Q=xn(le)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Xv(){var Q,F,Y,le,ve,Be=function(kt){Ge===0&&ee(kt)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(Be(j),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(le=[],ve=Tt();ve!==a;)le.push(ve),ve=Tt();ve=Ho(),ve!==a?(Xe=Q,Q=pt(ve)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function qC(){var Q,F,Y,le,ve,Be,kt,hr=function(xs){Ge===0&&ee(xs)};if(Q=Z,hr(Ce),s.charCodeAt(Z)===123?(F=w,Z++):F=a,F!==a){for(Y=[],le=Tt();le!==a;)Y.push(le),le=Tt();if(le=Z,ve=Vv(),ve!==a){for(Be=[],kt=Fv();kt!==a;)Be.push(kt),kt=Fv();kt=cn(),Xe=le,le=Vt(ve,Be)}else Z=le,le=a;for(le===a&&(le=null),ve=[],Be=Tt();Be!==a;)ve.push(Be),Be=Tt();hr(tt),s.charCodeAt(Z)===125?(Be=S,Z++):Be=a,Be!==a?(Xe=Q,Q=rn(le)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Fv(){var Q,F,Y,le,ve,Be=function(kt){Ge===0&&ee(kt)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(Be(j),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(le=[],ve=Tt();ve!==a;)le.push(ve),ve=Tt();ve=Vv(),ve!==a?(Xe=Q,Q=ke(ve)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Vv(){var Q,F,Y,le,ve,Be=function(kt){Ge===0&&ee(kt)};if(Q=Z,F=Hi(),F===a&&(F=ih()),F!==a)if(Be(rt),s.charCodeAt(Z)===58?(Y=A,Z++):Y=a,Y!==a){for(le=[],ve=Tt();ve!==a;)le.push(ve),ve=Tt();ve=Ho(),ve!==a?(Xe=Q,Q=_t(F,ve)):(Z=Q,Q=a)}else Z=Q,Q=a;else Z=Q,Q=a;return Q}function Wv(){var Q,F,Y,le,ve,Be,kt=function(hr){Ge===0&&ee(hr)};if(kt(We),Ge++,Q=Z,s.charCodeAt(Z)===45&&Z++,F=[],P.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a,Y!==a)for(;Y!==a;)F.push(Y),P.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a;else F=a;if(F!==a){if(Y=Z,s.charCodeAt(Z)===46?(le=f,Z++):le=a,le!==a){if(ve=[],P.test(s.charAt(Z))?(Be=s.charAt(Z),Z++):Be=a,Be!==a)for(;Be!==a;)ve.push(Be),P.test(s.charAt(Z))?(Be=s.charAt(Z),Z++):Be=a;else ve=a;ve!==a?(le=[le,ve],Y=le):(Z=Y,Y=a)}else Z=Y,Y=a;Y===a&&(Y=null),Xe=Q,Q=Jt()}else Z=Q,Q=a;return Ge--,Q}function ih(){var Q,F,Y,le,ve=function(Be){Ge===0&&ee(Be)};if(ve(Ye),Ge++,Q=Z,s.charCodeAt(Z)===34?(F=x,Z++):F=a,F!==a){for(Y=[],le=Yv();le!==a;)Y.push(le),le=Yv();s.charCodeAt(Z)===34?(le=x,Z++):le=a,le!==a?(Xe=Q,Q=Nn(Y)):(Z=Q,Q=a)}else Z=Q,Q=a;return Ge--,Q}function Yv(){var Q;return D.test(s.charAt(Z))?(Q=s.charAt(Z),Z++):Q=a,Q===a&&(Q=RC()),Q}function RC(){var Q,F,Y,le;return Q=Z,s.charCodeAt(Z)===92?(F=k,Z++):F=a,F!==a?(s.charCodeAt(Z)===34?(Y=x,Z++):Y=a,Y===a&&(s.charCodeAt(Z)===92?(Y=k,Z++):Y=a,Y===a&&(Y=Z,s.charCodeAt(Z)===110?(le=E,Z++):le=a,le!==a&&(Xe=Y,le=Gn()),Y=le,Y===a&&(Y=Z,s.charCodeAt(Z)===114?(le=T,Z++):le=a,le!==a&&(Xe=Y,le=ur()),Y=le,Y===a&&(Y=Z,s.charCodeAt(Z)===116?(le=$,Z++):le=a,le!==a&&(Xe=Y,le=dn()),Y=le)))),Y!==a?(Xe=Q,Q=Nt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function Hi(){var Q,F,Y,le=function(ve){Ge===0&&ee(ve)};if(le(ze),Ge++,Q=Z,F=[],I.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a,Y!==a)for(;Y!==a;)F.push(Y),I.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a;else F=a;return F!==a?Q=s.substring(Q,Z):Q=F,Ge--,Q}function Tt(){var Q,F=function(Y){Ge===0&&ee(Y)};return F(xe),Ge++,W.test(s.charAt(Z))?(Q=s.charAt(Z),Z++):Q=a,Ge--,Q}const{Variable:IC,Function:NC}=o;if(H(),fr=c(),fr!==a&&Z===s.length)return fr;throw fr!==a&&Z<s.length&&ee(Ui()),be()}e.exports={SyntaxError:r,parse:i}}}),XI=Me({"node_modules/entities/lib/maps/entities.json"(n,e){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
247
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}}}),lA=Me({"node_modules/markdown-it/lib/common/entities.js"(n,e){e.exports=XI()}}),pv=Me({"node_modules/uc.micro/categories/P/regex.js"(n,e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/}}),FI=Me({"node_modules/mdurl/encode.js"(n,e){var t={};function r(s){var o,a,l=t[s];if(l)return l;for(l=t[s]=[],o=0;o<128;o++)a=String.fromCharCode(o),/^[0-9a-z]$/i.test(a)?l.push(a):l.push("%"+("0"+o.toString(16).toUpperCase()).slice(-2));for(o=0;o<s.length;o++)l[s.charCodeAt(o)]=s[o];return l}function i(s,o,a){var l,c,u,f,d,h="";for(typeof o!="string"&&(a=o,o=i.defaultChars),typeof a>"u"&&(a=!0),d=r(o),l=0,c=s.length;l<c;l++){if(u=s.charCodeAt(l),a&&u===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(s.slice(l+1,l+3))){h+=s.slice(l,l+3),l+=2;continue}if(u<128){h+=d[u];continue}if(u>=55296&&u<=57343){if(u>=55296&&u<=56319&&l+1<c&&(f=s.charCodeAt(l+1),f>=56320&&f<=57343)){h+=encodeURIComponent(s[l]+s[l+1]),l++;continue}h+="%EF%BF%BD";continue}h+=encodeURIComponent(s[l])}return h}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i}}),VI=Me({"node_modules/mdurl/decode.js"(n,e){var t={};function r(s){var o,a,l=t[s];if(l)return l;for(l=t[s]=[],o=0;o<128;o++)a=String.fromCharCode(o),l.push(a);for(o=0;o<s.length;o++)a=s.charCodeAt(o),l[a]="%"+("0"+a.toString(16).toUpperCase()).slice(-2);return l}function i(s,o){var a;return typeof o!="string"&&(o=i.defaultChars),a=r(o),s.replace(/(%[a-f0-9]{2})+/gi,function(l){var c,u,f,d,h,m,p,O="";for(c=0,u=l.length;c<u;c+=3){if(f=parseInt(l.slice(c+1,c+3),16),f<128){O+=a[f];continue}if((f&224)===192&&c+3<u&&(d=parseInt(l.slice(c+4,c+6),16),(d&192)===128)){p=f<<6&1984|d&63,p<128?O+="��":O+=String.fromCharCode(p),c+=3;continue}if((f&240)===224&&c+6<u&&(d=parseInt(l.slice(c+4,c+6),16),h=parseInt(l.slice(c+7,c+9),16),(d&192)===128&&(h&192)===128)){p=f<<12&61440|d<<6&4032|h&63,p<2048||p>=55296&&p<=57343?O+="���":O+=String.fromCharCode(p),c+=6;continue}if((f&248)===240&&c+9<u&&(d=parseInt(l.slice(c+4,c+6),16),h=parseInt(l.slice(c+7,c+9),16),m=parseInt(l.slice(c+10,c+12),16),(d&192)===128&&(h&192)===128&&(m&192)===128)){p=f<<18&1835008|d<<12&258048|h<<6&4032|m&63,p<65536||p>1114111?O+="����":(p-=65536,O+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),c+=9;continue}O+="�"}return O})}i.defaultChars=";/?:@&=+$,#",i.componentChars="",e.exports=i}}),WI=Me({"node_modules/mdurl/format.js"(n,e){e.exports=function(r){var i="";return i+=r.protocol||"",i+=r.slashes?"//":"",i+=r.auth?r.auth+"@":"",r.hostname&&r.hostname.indexOf(":")!==-1?i+="["+r.hostname+"]":i+=r.hostname||"",i+=r.port?":"+r.port:"",i+=r.pathname||"",i+=r.search||"",i+=r.hash||"",i}}}),YI=Me({"node_modules/mdurl/parse.js"(n,e){function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
248
+ `," "],a=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(a),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function O(v,b){if(v&&v instanceof t)return v;var _=new t;return _.parse(v,b),_}t.prototype.parse=function(v,b){var _,C,y,w,S,A=v;if(A=A.trim(),!b&&v.split("#").length===1){var x=s.exec(A);if(x)return this.pathname=x[1],x[2]&&(this.search=x[2]),this}var k=r.exec(A);if(k&&(k=k[0],y=k.toLowerCase(),this.protocol=k,A=A.substr(k.length)),(b||k||A.match(/^\/\/[^@\/]+@[^@\/]+/))&&(S=A.substr(0,2)==="//",S&&!(k&&m[k])&&(A=A.substr(2),this.slashes=!0)),!m[k]&&(S||k&&!p[k])){var E=-1;for(_=0;_<u.length;_++)w=A.indexOf(u[_]),w!==-1&&(E===-1||w<E)&&(E=w);var T,$;for(E===-1?$=A.lastIndexOf("@"):$=A.lastIndexOf("@",E),$!==-1&&(T=A.slice(0,$),A=A.slice($+1),this.auth=T),E=-1,_=0;_<c.length;_++)w=A.indexOf(c[_]),w!==-1&&(E===-1||w<E)&&(E=w);E===-1&&(E=A.length),A[E-1]===":"&&E--;var L=A.slice(0,E);A=A.slice(E),this.parseHost(L),this.hostname=this.hostname||"";var P=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!P){var D=this.hostname.split(/\./);for(_=0,C=D.length;_<C;_++){var I=D[_];if(I&&!I.match(d)){for(var W="",U=0,ae=I.length;U<ae;U++)I.charCodeAt(U)>127?W+="x":W+=I[U];if(!W.match(d)){var ce=D.slice(0,_),ne=D.slice(_+1),G=I.match(h);G&&(ce.push(G[1]),ne.unshift(G[2])),ne.length&&(A=ne.join(".")+A),this.hostname=ce.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var oe=A.indexOf("#");oe!==-1&&(this.hash=A.substr(oe),A=A.slice(0,oe));var ie=A.indexOf("?");return ie!==-1&&(this.search=A.substr(ie),A=A.slice(0,ie)),A&&(this.pathname=A),p[y]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(v){var b=i.exec(v);b&&(b=b[0],b!==":"&&(this.port=b.substr(1)),v=v.substr(0,v.length-b.length)),v&&(this.hostname=v)},e.exports=O}}),cA=Me({"node_modules/mdurl/index.js"(n,e){e.exports.encode=FI(),e.exports.decode=VI(),e.exports.format=WI(),e.exports.parse=YI()}}),uA=Me({"node_modules/uc.micro/properties/Any/regex.js"(n,e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/}}),fA=Me({"node_modules/uc.micro/categories/Cc/regex.js"(n,e){e.exports=/[\0-\x1F\x7F-\x9F]/}}),UI=Me({"node_modules/uc.micro/categories/Cf/regex.js"(n,e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/}}),dA=Me({"node_modules/uc.micro/categories/Z/regex.js"(n,e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/}}),GI=Me({"node_modules/uc.micro/index.js"(n){n.Any=uA(),n.Cc=fA(),n.Cf=UI(),n.P=pv(),n.Z=dA()}}),Ut=Me({"node_modules/markdown-it/lib/common/utils.js"(n){function e(L){return Object.prototype.toString.call(L)}function t(L){return e(L)==="[object String]"}var r=Object.prototype.hasOwnProperty;function i(L,P){return r.call(L,P)}function s(L){var P=Array.prototype.slice.call(arguments,1);return P.forEach(function(D){if(D){if(typeof D!="object")throw new TypeError(D+"must be object");Object.keys(D).forEach(function(I){L[I]=D[I]})}}),L}function o(L,P,D){return[].concat(L.slice(0,P),D,L.slice(P+1))}function a(L){return!(L>=55296&&L<=57343||L>=64976&&L<=65007||(L&65535)===65535||(L&65535)===65534||L>=0&&L<=8||L===11||L>=14&&L<=31||L>=127&&L<=159||L>1114111)}function l(L){if(L>65535){L-=65536;var P=55296+(L>>10),D=56320+(L&1023);return String.fromCharCode(P,D)}return String.fromCharCode(L)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,f=new RegExp(c.source+"|"+u.source,"gi"),d=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=lA();function m(L,P){var D=0;return i(h,P)?h[P]:P.charCodeAt(0)===35&&d.test(P)&&(D=P[1].toLowerCase()==="x"?parseInt(P.slice(2),16):parseInt(P.slice(1),10),a(D))?l(D):L}function p(L){return L.indexOf("\\")<0?L:L.replace(c,"$1")}function O(L){return L.indexOf("\\")<0&&L.indexOf("&")<0?L:L.replace(f,function(P,D,I){return D||m(P,I)})}var v=/[&<>"]/,b=/[&<>"]/g,_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function C(L){return _[L]}function y(L){return v.test(L)?L.replace(b,C):L}var w=/[.?*+^$[\]\\(){}|-]/g;function S(L){return L.replace(w,"\\$&")}function A(L){switch(L){case 9:case 32:return!0}return!1}function x(L){if(L>=8192&&L<=8202)return!0;switch(L){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var k=pv();function E(L){return k.test(L)}function T(L){switch(L){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function $(L){return L=L.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(L=L.replace(/ẞ/g,"ß")),L.toLowerCase().toUpperCase()}n.lib={},n.lib.mdurl=cA(),n.lib.ucmicro=GI(),n.assign=s,n.isString=t,n.has=i,n.unescapeMd=p,n.unescapeAll=O,n.isValidEntityCode=a,n.fromCodePoint=l,n.escapeHtml=y,n.arrayReplaceAt=o,n.isSpace=A,n.isWhiteSpace=x,n.isMdAsciiPunct=T,n.isPunctChar=E,n.escapeRE=S,n.normalizeReference=$}}),HI=Me({"node_modules/markdown-it/lib/helpers/parse_link_label.js"(n,e){e.exports=function(r,i,s){var o,a,l,c,u=-1,f=r.posMax,d=r.pos;for(r.pos=i+1,o=1;r.pos<f;){if(l=r.src.charCodeAt(r.pos),l===93&&(o--,o===0)){a=!0;break}if(c=r.pos,r.md.inline.skipToken(r),l===91){if(c===r.pos-1)o++;else if(s)return r.pos=d,-1}}return a&&(u=r.pos),r.pos=d,u}}}),KI=Me({"node_modules/markdown-it/lib/helpers/parse_link_destination.js"(n,e){var t=Ut().unescapeAll;e.exports=function(i,s,o){var a,l,c=0,u=s,f={ok:!1,pos:0,lines:0,str:""};if(i.charCodeAt(s)===60){for(s++;s<o;){if(a=i.charCodeAt(s),a===10||a===60)return f;if(a===62)return f.pos=s+1,f.str=t(i.slice(u+1,s)),f.ok=!0,f;if(a===92&&s+1<o){s+=2;continue}s++}return f}for(l=0;s<o&&(a=i.charCodeAt(s),!(a===32||a<32||a===127));){if(a===92&&s+1<o){if(i.charCodeAt(s+1)===32)break;s+=2;continue}if(a===40&&(l++,l>32))return f;if(a===41){if(l===0)break;l--}s++}return u===s||l!==0||(f.str=t(i.slice(u,s)),f.lines=c,f.pos=s,f.ok=!0),f}}}),JI=Me({"node_modules/markdown-it/lib/helpers/parse_link_title.js"(n,e){var t=Ut().unescapeAll;e.exports=function(i,s,o){var a,l,c=0,u=s,f={ok:!1,pos:0,lines:0,str:""};if(s>=o||(l=i.charCodeAt(s),l!==34&&l!==39&&l!==40))return f;for(s++,l===40&&(l=41);s<o;){if(a=i.charCodeAt(s),a===l)return f.pos=s+1,f.lines=c,f.str=t(i.slice(u+1,s)),f.ok=!0,f;if(a===40&&l===41)return f;a===10?c++:a===92&&s+1<o&&(s++,i.charCodeAt(s)===10&&c++),s++}return f}}}),eN=Me({"node_modules/markdown-it/lib/helpers/index.js"(n){n.parseLinkLabel=HI(),n.parseLinkDestination=KI(),n.parseLinkTitle=JI()}}),tN=Me({"node_modules/markdown-it/lib/renderer.js"(n,e){var t=Ut().assign,r=Ut().unescapeAll,i=Ut().escapeHtml,s={};s.code_inline=function(a,l,c,u,f){var d=a[l];return"<code"+f.renderAttrs(d)+">"+i(a[l].content)+"</code>"},s.code_block=function(a,l,c,u,f){var d=a[l];return"<pre"+f.renderAttrs(d)+"><code>"+i(a[l].content)+`</code></pre>
249
+ `},s.fence=function(a,l,c,u,f){var d=a[l],h=d.info?r(d.info).trim():"",m="",p="",O,v,b,_,C;return h&&(b=h.split(/(\s+)/g),m=b[0],p=b.slice(2).join("")),c.highlight?O=c.highlight(d.content,m,p)||i(d.content):O=i(d.content),O.indexOf("<pre")===0?O+`
250
+ `:h?(v=d.attrIndex("class"),_=d.attrs?d.attrs.slice():[],v<0?_.push(["class",c.langPrefix+m]):(_[v]=_[v].slice(),_[v][1]+=" "+c.langPrefix+m),C={attrs:_},"<pre><code"+f.renderAttrs(C)+">"+O+`</code></pre>
251
+ `):"<pre><code"+f.renderAttrs(d)+">"+O+`</code></pre>
252
+ `},s.image=function(a,l,c,u,f){var d=a[l];return d.attrs[d.attrIndex("alt")][1]=f.renderInlineAsText(d.children,c,u),f.renderToken(a,l,c)},s.hardbreak=function(a,l,c){return c.xhtmlOut?`<br />
253
+ `:`<br>
254
+ `},s.softbreak=function(a,l,c){return c.breaks?c.xhtmlOut?`<br />
255
+ `:`<br>
256
+ `:`
257
+ `},s.text=function(a,l){return i(a[l].content)},s.html_block=function(a,l){return a[l].content},s.html_inline=function(a,l){return a[l].content};function o(){this.rules=t({},s)}o.prototype.renderAttrs=function(l){var c,u,f;if(!l.attrs)return"";for(f="",c=0,u=l.attrs.length;c<u;c++)f+=" "+i(l.attrs[c][0])+'="'+i(l.attrs[c][1])+'"';return f},o.prototype.renderToken=function(l,c,u){var f,d="",h=!1,m=l[c];return m.hidden?"":(m.block&&m.nesting!==-1&&c&&l[c-1].hidden&&(d+=`
258
+ `),d+=(m.nesting===-1?"</":"<")+m.tag,d+=this.renderAttrs(m),m.nesting===0&&u.xhtmlOut&&(d+=" /"),m.block&&(h=!0,m.nesting===1&&c+1<l.length&&(f=l[c+1],(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===m.tag)&&(h=!1))),d+=h?`>
259
+ `:">",d)},o.prototype.renderInline=function(a,l,c){for(var u,f="",d=this.rules,h=0,m=a.length;h<m;h++)u=a[h].type,typeof d[u]<"u"?f+=d[u](a,h,l,c,this):f+=this.renderToken(a,h,l);return f},o.prototype.renderInlineAsText=function(a,l,c){for(var u="",f=0,d=a.length;f<d;f++)a[f].type==="text"?u+=a[f].content:a[f].type==="image"?u+=this.renderInlineAsText(a[f].children,l,c):a[f].type==="softbreak"&&(u+=`
260
+ `);return u},o.prototype.render=function(a,l,c){var u,f,d,h="",m=this.rules;for(u=0,f=a.length;u<f;u++)d=a[u].type,d==="inline"?h+=this.renderInline(a[u].children,l,c):typeof m[d]<"u"?h+=m[a[u].type](a,u,l,c,this):h+=this.renderToken(a,u,l,c);return h},e.exports=o}}),mv=Me({"node_modules/markdown-it/lib/ruler.js"(n,e){function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(r){for(var i=0;i<this.__rules__.length;i++)if(this.__rules__[i].name===r)return i;return-1},t.prototype.__compile__=function(){var r=this,i=[""];r.__rules__.forEach(function(s){s.enabled&&s.alt.forEach(function(o){i.indexOf(o)<0&&i.push(o)})}),r.__cache__={},i.forEach(function(s){r.__cache__[s]=[],r.__rules__.forEach(function(o){o.enabled&&(s&&o.alt.indexOf(s)<0||r.__cache__[s].push(o.fn))})})},t.prototype.at=function(r,i,s){var o=this.__find__(r),a=s||{};if(o===-1)throw new Error("Parser rule not found: "+r);this.__rules__[o].fn=i,this.__rules__[o].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(r,i,s,o){var a=this.__find__(r),l=o||{};if(a===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(a,0,{name:i,enabled:!0,fn:s,alt:l.alt||[]}),this.__cache__=null},t.prototype.after=function(r,i,s,o){var a=this.__find__(r),l=o||{};if(a===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(a+1,0,{name:i,enabled:!0,fn:s,alt:l.alt||[]}),this.__cache__=null},t.prototype.push=function(r,i,s){var o=s||{};this.__rules__.push({name:r,enabled:!0,fn:i,alt:o.alt||[]}),this.__cache__=null},t.prototype.enable=function(r,i){Array.isArray(r)||(r=[r]);var s=[];return r.forEach(function(o){var a=this.__find__(o);if(a<0){if(i)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[a].enabled=!0,s.push(o)},this),this.__cache__=null,s},t.prototype.enableOnly=function(r,i){Array.isArray(r)||(r=[r]),this.__rules__.forEach(function(s){s.enabled=!1}),this.enable(r,i)},t.prototype.disable=function(r,i){Array.isArray(r)||(r=[r]);var s=[];return r.forEach(function(o){var a=this.__find__(o);if(a<0){if(i)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[a].enabled=!1,s.push(o)},this),this.__cache__=null,s},t.prototype.getRules=function(r){return this.__cache__===null&&this.__compile__(),this.__cache__[r]||[]},e.exports=t}}),nN=Me({"node_modules/markdown-it/lib/rules_core/normalize.js"(n,e){var t=/\r\n?|\n/g,r=/\0/g;e.exports=function(s){var o;o=s.src.replace(t,`
261
+ `),o=o.replace(r,"�"),s.src=o}}}),rN=Me({"node_modules/markdown-it/lib/rules_core/block.js"(n,e){e.exports=function(r){var i;r.inlineMode?(i=new r.Token("inline","",0),i.content=r.src,i.map=[0,1],i.children=[],r.tokens.push(i)):r.md.block.parse(r.src,r.md,r.env,r.tokens)}}}),iN=Me({"node_modules/markdown-it/lib/rules_core/inline.js"(n,e){e.exports=function(r){var i=r.tokens,s,o,a;for(o=0,a=i.length;o<a;o++)s=i[o],s.type==="inline"&&r.md.inline.parse(s.content,r.md,r.env,s.children)}}}),sN=Me({"node_modules/markdown-it/lib/rules_core/linkify.js"(n,e){var t=Ut().arrayReplaceAt;function r(s){return/^<a[>\s]/i.test(s)}function i(s){return/^<\/a\s*>/i.test(s)}e.exports=function(o){var a,l,c,u,f,d,h,m,p,O,v,b,_,C,y,w,S=o.tokens,A;if(o.md.options.linkify){for(l=0,c=S.length;l<c;l++)if(!(S[l].type!=="inline"||!o.md.linkify.pretest(S[l].content)))for(u=S[l].children,_=0,a=u.length-1;a>=0;a--){if(d=u[a],d.type==="link_close"){for(a--;u[a].level!==d.level&&u[a].type!=="link_open";)a--;continue}if(d.type==="html_inline"&&(r(d.content)&&_>0&&_--,i(d.content)&&_++),!(_>0)&&d.type==="text"&&o.md.linkify.test(d.content)){for(p=d.content,A=o.md.linkify.match(p),h=[],b=d.level,v=0,m=0;m<A.length;m++)C=A[m].url,y=o.md.normalizeLink(C),o.md.validateLink(y)&&(w=A[m].text,A[m].schema?A[m].schema==="mailto:"&&!/^mailto:/i.test(w)?w=o.md.normalizeLinkText("mailto:"+w).replace(/^mailto:/,""):w=o.md.normalizeLinkText(w):w=o.md.normalizeLinkText("http://"+w).replace(/^http:\/\//,""),O=A[m].index,O>v&&(f=new o.Token("text","",0),f.content=p.slice(v,O),f.level=b,h.push(f)),f=new o.Token("link_open","a",1),f.attrs=[["href",y]],f.level=b++,f.markup="linkify",f.info="auto",h.push(f),f=new o.Token("text","",0),f.content=w,f.level=b,h.push(f),f=new o.Token("link_close","a",-1),f.level=--b,f.markup="linkify",f.info="auto",h.push(f),v=A[m].lastIndex);v<p.length&&(f=new o.Token("text","",0),f.content=p.slice(v),f.level=b,h.push(f)),S[l].children=u=t(u,a,h)}}}}}}),oN=Me({"node_modules/markdown-it/lib/rules_core/replacements.js"(n,e){var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,i=/\((c|tm|r|p)\)/ig,s={c:"©",r:"®",p:"§",tm:"™"};function o(c,u){return s[u.toLowerCase()]}function a(c){var u,f,d=0;for(u=c.length-1;u>=0;u--)f=c[u],f.type==="text"&&!d&&(f.content=f.content.replace(i,o)),f.type==="link_open"&&f.info==="auto"&&d--,f.type==="link_close"&&f.info==="auto"&&d++}function l(c){var u,f,d=0;for(u=c.length-1;u>=0;u--)f=c[u],f.type==="text"&&!d&&t.test(f.content)&&(f.content=f.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),f.type==="link_open"&&f.info==="auto"&&d--,f.type==="link_close"&&f.info==="auto"&&d++}e.exports=function(u){var f;if(u.md.options.typographer)for(f=u.tokens.length-1;f>=0;f--)u.tokens[f].type==="inline"&&(r.test(u.tokens[f].content)&&a(u.tokens[f].children),t.test(u.tokens[f].content)&&l(u.tokens[f].children))}}}),aN=Me({"node_modules/markdown-it/lib/rules_core/smartquotes.js"(n,e){var t=Ut().isWhiteSpace,r=Ut().isPunctChar,i=Ut().isMdAsciiPunct,s=/['"]/,o=/['"]/g,a="’";function l(u,f,d){return u.substr(0,f)+d+u.substr(f+1)}function c(u,f){var d,h,m,p,O,v,b,_,C,y,w,S,A,x,k,E,T,$,L,P,D;for(L=[],d=0;d<u.length;d++){for(h=u[d],b=u[d].level,T=L.length-1;T>=0&&!(L[T].level<=b);T--);if(L.length=T+1,h.type==="text"){m=h.content,O=0,v=m.length;e:for(;O<v&&(o.lastIndex=O,p=o.exec(m),!!p);){if(k=E=!0,O=p.index+1,$=p[0]==="'",C=32,p.index-1>=0)C=m.charCodeAt(p.index-1);else for(T=d-1;T>=0&&!(u[T].type==="softbreak"||u[T].type==="hardbreak");T--)if(u[T].content){C=u[T].content.charCodeAt(u[T].content.length-1);break}if(y=32,O<v)y=m.charCodeAt(O);else for(T=d+1;T<u.length&&!(u[T].type==="softbreak"||u[T].type==="hardbreak");T++)if(u[T].content){y=u[T].content.charCodeAt(0);break}if(w=i(C)||r(String.fromCharCode(C)),S=i(y)||r(String.fromCharCode(y)),A=t(C),x=t(y),x?k=!1:S&&(A||w||(k=!1)),A?E=!1:w&&(x||S||(E=!1)),y===34&&p[0]==='"'&&C>=48&&C<=57&&(E=k=!1),k&&E&&(k=w,E=S),!k&&!E){$&&(h.content=l(h.content,p.index,a));continue}if(E){for(T=L.length-1;T>=0&&(_=L[T],!(L[T].level<b));T--)if(_.single===$&&L[T].level===b){_=L[T],$?(P=f.md.options.quotes[2],D=f.md.options.quotes[3]):(P=f.md.options.quotes[0],D=f.md.options.quotes[1]),h.content=l(h.content,p.index,D),u[_.token].content=l(u[_.token].content,_.pos,P),O+=D.length-1,_.token===d&&(O+=P.length-1),m=h.content,v=m.length,L.length=T;continue e}}k?L.push({token:d,pos:p.index,single:$,level:b}):E&&$&&(h.content=l(h.content,p.index,a))}}}}e.exports=function(f){var d;if(f.md.options.typographer)for(d=f.tokens.length-1;d>=0;d--)f.tokens[d].type!=="inline"||!s.test(f.tokens[d].content)||c(f.tokens[d].children,f)}}}),gv=Me({"node_modules/markdown-it/lib/token.js"(n,e){function t(r,i,s){this.type=r,this.tag=i,this.attrs=null,this.map=null,this.nesting=s,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(i){var s,o,a;if(!this.attrs)return-1;for(s=this.attrs,o=0,a=s.length;o<a;o++)if(s[o][0]===i)return o;return-1},t.prototype.attrPush=function(i){this.attrs?this.attrs.push(i):this.attrs=[i]},t.prototype.attrSet=function(i,s){var o=this.attrIndex(i),a=[i,s];o<0?this.attrPush(a):this.attrs[o]=a},t.prototype.attrGet=function(i){var s=this.attrIndex(i),o=null;return s>=0&&(o=this.attrs[s][1]),o},t.prototype.attrJoin=function(i,s){var o=this.attrIndex(i);o<0?this.attrPush([i,s]):this.attrs[o][1]=this.attrs[o][1]+" "+s},e.exports=t}}),lN=Me({"node_modules/markdown-it/lib/rules_core/state_core.js"(n,e){var t=gv();function r(i,s,o){this.src=i,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=s}r.prototype.Token=t,e.exports=r}}),cN=Me({"node_modules/markdown-it/lib/parser_core.js"(n,e){var t=mv(),r=[["normalize",nN()],["block",rN()],["inline",iN()],["linkify",sN()],["replacements",oN()],["smartquotes",aN()]];function i(){this.ruler=new t;for(var s=0;s<r.length;s++)this.ruler.push(r[s][0],r[s][1])}i.prototype.process=function(s){var o,a,l;for(l=this.ruler.getRules(""),o=0,a=l.length;o<a;o++)l[o](s)},i.prototype.State=lN(),e.exports=i}}),uN=Me({"node_modules/markdown-it/lib/rules_block/table.js"(n,e){var t=Ut().isSpace;function r(s,o){var a=s.bMarks[o]+s.tShift[o],l=s.eMarks[o];return s.src.substr(a,l-a)}function i(s){var o=[],a=0,l=s.length,c,u=!1,f=0,d="";for(c=s.charCodeAt(a);a<l;)c===124&&(u?(d+=s.substring(f,a-1),f=a):(o.push(d+s.substring(f,a)),d="",f=a+1)),u=c===92,a++,c=s.charCodeAt(a);return o.push(d+s.substring(f)),o}e.exports=function(o,a,l,c){var u,f,d,h,m,p,O,v,b,_,C,y,w,S,A,x,k,E;if(a+2>l||(p=a+1,o.sCount[p]<o.blkIndent)||!o.md.options.allowIndentation&&o.sCount[p]-o.blkIndent>=4||(d=o.bMarks[p]+o.tShift[p],d>=o.eMarks[p])||(k=o.src.charCodeAt(d++),k!==124&&k!==45&&k!==58)||d>=o.eMarks[p]||(E=o.src.charCodeAt(d++),E!==124&&E!==45&&E!==58&&!t(E))||k===45&&t(E))return!1;for(;d<o.eMarks[p];){if(u=o.src.charCodeAt(d),u!==124&&u!==45&&u!==58&&!t(u))return!1;d++}for(f=r(o,a+1),O=f.split("|"),_=[],h=0;h<O.length;h++){if(C=O[h].trim(),!C){if(h===0||h===O.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?_.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?_.push("left"):_.push("")}if(f=r(o,a).trim(),f.indexOf("|")===-1||!o.md.options.allowIndentation&&o.sCount[a]-o.blkIndent>=4||(O=i(f),O.length&&O[0]===""&&O.shift(),O.length&&O[O.length-1]===""&&O.pop(),v=O.length,v===0||v!==_.length))return!1;if(c)return!0;for(S=o.parentType,o.parentType="table",x=o.md.block.ruler.getRules("blockquote"),b=o.push("table_open","table",1),b.map=y=[a,0],b=o.push("thead_open","thead",1),b.map=[a,a+1],b=o.push("tr_open","tr",1),b.map=[a,a+1],h=0;h<O.length;h++)b=o.push("th_open","th",1),_[h]&&(b.attrs=[["style","text-align:"+_[h]]]),b=o.push("inline","",0),b.content=O[h].trim(),b.children=[],b=o.push("th_close","th",-1);for(b=o.push("tr_close","tr",-1),b=o.push("thead_close","thead",-1),p=a+2;p<l&&!(o.sCount[p]<o.blkIndent);p++){for(A=!1,h=0,m=x.length;h<m;h++)if(x[h](o,p,l,!0)){A=!0;break}if(A||(f=r(o,p).trim(),!f)||!o.md.options.allowIndentation&&o.sCount[p]-o.blkIndent>=4)break;for(O=i(f),O.length&&O[0]===""&&O.shift(),O.length&&O[O.length-1]===""&&O.pop(),p===a+2&&(b=o.push("tbody_open","tbody",1),b.map=w=[a+2,0]),b=o.push("tr_open","tr",1),b.map=[p,p+1],h=0;h<v;h++)b=o.push("td_open","td",1),_[h]&&(b.attrs=[["style","text-align:"+_[h]]]),b=o.push("inline","",0),b.content=O[h]?O[h].trim():"",b.children=[],b=o.push("td_close","td",-1);b=o.push("tr_close","tr",-1)}return w&&(b=o.push("tbody_close","tbody",-1),w[1]=p),b=o.push("table_close","table",-1),y[1]=p,o.parentType=S,o.line=p,!0}}}),fN=Me({"node_modules/markdown-it/lib/rules_block/code.js"(n,e){e.exports=function(r,i,s){if(r.md.options.allowIndentation)return!1;var o,a,l;if(r.sCount[i]-r.blkIndent<4)return!1;for(a=o=i+1;o<s;){if(r.isEmpty(o)){o++;continue}if(r.sCount[o]-r.blkIndent>=4){o++,a=o;continue}break}return r.line=a,l=r.push("code_block","code",0),l.content=r.getLines(i,a,4+r.blkIndent,!1)+`
262
+ `,l.map=[i,r.line],!0}}}),dN=Me({"node_modules/markdown-it/lib/rules_block/fence.js"(n,e){e.exports=function(r,i,s,o){var a,l,c,u,f,d,h,m=!1,p=r.bMarks[i]+r.tShift[i],O=r.eMarks[i];if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4||p+3>O||(a=r.src.charCodeAt(p),a!==126&&a!==96)||(f=p,p=r.skipChars(p,a),l=p-f,l<3)||(h=r.src.slice(f,p),c=r.src.slice(p,O),a===96&&c.indexOf(String.fromCharCode(a))>=0))return!1;if(o)return!0;for(u=i;u++,!(u>=s||(p=f=r.bMarks[u]+r.tShift[u],O=r.eMarks[u],p<O&&r.sCount[u]<r.blkIndent));)if(r.src.charCodeAt(p)===a&&!(!r.md.options.allowIndentation&&r.sCount[u]-r.blkIndent>=4)&&(p=r.skipChars(p,a),!(p-f<l)&&(p=r.skipSpaces(p),!(p<O)))){m=!0;break}return l=r.sCount[i],r.line=u+(m?1:0),d=r.push("fence","code",0),d.info=c,d.content=r.getLines(i+1,u,l,!0),d.markup=h,d.map=[i,r.line],!0}}}),hN=Me({"node_modules/markdown-it/lib/rules_block/blockquote.js"(n,e){var t=Ut().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d,h,m,p,O,v,b,_,C,y,w,S,A,x,k,E,T=i.lineMax,$=i.bMarks[s]+i.tShift[s],L=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||i.src.charCodeAt($++)!==62)return!1;if(a)return!0;for(f=O=i.sCount[s]+1,i.src.charCodeAt($)===32?($++,f++,O++,l=!1,S=!0):i.src.charCodeAt($)===9?(S=!0,(i.bsCount[s]+O)%4===3?($++,f++,O++,l=!1):l=!0):S=!1,v=[i.bMarks[s]],i.bMarks[s]=$;$<L&&(c=i.src.charCodeAt($),t(c));){c===9?O+=4-(O+i.bsCount[s]+(l?1:0))%4:O++;$++}for(b=[i.bsCount[s]],i.bsCount[s]=i.sCount[s]+1+(S?1:0),h=$>=L,y=[i.sCount[s]],i.sCount[s]=O-f,w=[i.tShift[s]],i.tShift[s]=$-i.bMarks[s],x=i.md.block.ruler.getRules("blockquote"),C=i.parentType,i.parentType="blockquote",p=s+1;p<o&&(E=i.sCount[p]<i.blkIndent,$=i.bMarks[p]+i.tShift[p],L=i.eMarks[p],!($>=L));p++){if(i.src.charCodeAt($++)===62&&!E){for(f=O=i.sCount[p]+1,i.src.charCodeAt($)===32?($++,f++,O++,l=!1,S=!0):i.src.charCodeAt($)===9?(S=!0,(i.bsCount[p]+O)%4===3?($++,f++,O++,l=!1):l=!0):S=!1,v.push(i.bMarks[p]),i.bMarks[p]=$;$<L&&(c=i.src.charCodeAt($),t(c));){c===9?O+=4-(O+i.bsCount[p]+(l?1:0))%4:O++;$++}h=$>=L,b.push(i.bsCount[p]),i.bsCount[p]=i.sCount[p]+1+(S?1:0),y.push(i.sCount[p]),i.sCount[p]=O-f,w.push(i.tShift[p]),i.tShift[p]=$-i.bMarks[p];continue}if(h)break;for(A=!1,u=0,d=x.length;u<d;u++)if(x[u](i,p,o,!0)){A=!0;break}if(A){i.lineMax=p,i.blkIndent!==0&&(v.push(i.bMarks[p]),b.push(i.bsCount[p]),w.push(i.tShift[p]),y.push(i.sCount[p]),i.sCount[p]-=i.blkIndent);break}v.push(i.bMarks[p]),b.push(i.bsCount[p]),w.push(i.tShift[p]),y.push(i.sCount[p]),i.sCount[p]=-1}for(_=i.blkIndent,i.blkIndent=0,k=i.push("blockquote_open","blockquote",1),k.markup=">",k.map=m=[s,0],i.md.block.tokenize(i,s,p),k=i.push("blockquote_close","blockquote",-1),k.markup=">",i.lineMax=T,i.parentType=C,m[1]=i.line,u=0;u<w.length;u++)i.bMarks[u+s]=v[u],i.tShift[u+s]=w[u],i.sCount[u+s]=y[u],i.bsCount[u+s]=b[u];return i.blkIndent=_,!0}}}),pN=Me({"node_modules/markdown-it/lib/rules_block/hr.js"(n,e){var t=Ut().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d=i.bMarks[s]+i.tShift[s],h=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||(l=i.src.charCodeAt(d++),l!==42&&l!==45&&l!==95))return!1;for(c=1;d<h;){if(u=i.src.charCodeAt(d++),u!==l&&!t(u))return!1;u===l&&c++}return c<3?!1:(a||(i.line=s+1,f=i.push("hr","hr",0),f.map=[s,i.line],f.markup=Array(c+1).join(String.fromCharCode(l))),!0)}}}),mN=Me({"node_modules/markdown-it/lib/rules_block/list.js"(n,e){var t=Ut().isSpace;function r(o,a){var l,c,u,f;return c=o.bMarks[a]+o.tShift[a],u=o.eMarks[a],l=o.src.charCodeAt(c++),l!==42&&l!==45&&l!==43||c<u&&(f=o.src.charCodeAt(c),!t(f))?-1:c}function i(o,a){var l,c=o.bMarks[a]+o.tShift[a],u=c,f=o.eMarks[a];if(u+1>=f||(l=o.src.charCodeAt(u++),l<48||l>57))return-1;for(;;){if(u>=f)return-1;if(l=o.src.charCodeAt(u++),l>=48&&l<=57){if(u-c>=10)return-1;continue}if(l===41||l===46)break;return-1}return u<f&&(l=o.src.charCodeAt(u),!t(l))?-1:u}function s(o,a){var l,c,u=o.level+2;for(l=a+2,c=o.tokens.length-2;l<c;l++)o.tokens[l].level===u&&o.tokens[l].type==="paragraph_open"&&(o.tokens[l+2].hidden=!0,o.tokens[l].hidden=!0,l+=2)}e.exports=function(a,l,c,u){var f,d,h,m,p,O,v,b,_,C,y,w,S,A,x,k,E,T,$,L,P,D,I,W,U,ae,ce,ne,G=!1,oe=!0;if(!a.md.options.allowIndentation&&a.sCount[l]-a.blkIndent>=4||!a.md.options.allowIndentation&&a.listIndent>=0&&a.sCount[l]-a.listIndent>=4&&a.sCount[l]<a.blkIndent)return!1;if(u&&a.parentType==="paragraph"&&a.sCount[l]>=a.blkIndent&&(G=!0),(I=i(a,l))>=0){if(v=!0,U=a.bMarks[l]+a.tShift[l],S=Number(a.src.slice(U,I-1)),G&&S!==1)return!1}else if((I=r(a,l))>=0)v=!1;else return!1;if(G&&a.skipSpaces(I)>=a.eMarks[l])return!1;if(w=a.src.charCodeAt(I-1),u)return!0;for(y=a.tokens.length,v?(ne=a.push("ordered_list_open","ol",1),S!==1&&(ne.attrs=[["start",S]])):ne=a.push("bullet_list_open","ul",1),ne.map=C=[l,0],ne.markup=String.fromCharCode(w),x=l,W=!1,ce=a.md.block.ruler.getRules("list"),T=a.parentType,a.parentType="list";x<c;){for(D=I,A=a.eMarks[x],O=k=a.sCount[x]+I-(a.bMarks[l]+a.tShift[l]);D<A;){if(f=a.src.charCodeAt(D),f===9)k+=4-(k+a.bsCount[x])%4;else if(f===32)k++;else break;D++}if(d=D,d>=A?p=1:p=k-O,!a.md.options.allowIndentation&&p>4&&(p=1),m=O+p,ne=a.push("list_item_open","li",1),ne.markup=String.fromCharCode(w),ne.map=b=[l,0],v&&(ne.info=a.src.slice(U,I-1)),P=a.tight,L=a.tShift[l],$=a.sCount[l],E=a.listIndent,a.listIndent=a.blkIndent,a.blkIndent=m,a.tight=!0,a.tShift[l]=d-a.bMarks[l],a.sCount[l]=k,d>=A&&a.isEmpty(l+1)?a.line=Math.min(a.line+2,c):a.md.block.tokenize(a,l,c,!0),(!a.tight||W)&&(oe=!1),W=a.line-l>1&&a.isEmpty(a.line-1),a.blkIndent=a.listIndent,a.listIndent=E,a.tShift[l]=L,a.sCount[l]=$,a.tight=P,ne=a.push("list_item_close","li",-1),ne.markup=String.fromCharCode(w),x=l=a.line,b[1]=x,d=a.bMarks[l],x>=c||a.sCount[x]<a.blkIndent||!a.md.options.allowIndentation&&a.sCount[l]-a.blkIndent>=4)break;for(ae=!1,h=0,_=ce.length;h<_;h++)if(ce[h](a,x,c,!0)){ae=!0;break}if(ae)break;if(v){if(I=i(a,x),I<0)break;U=a.bMarks[x]+a.tShift[x]}else if(I=r(a,x),I<0)break;if(w!==a.src.charCodeAt(I-1))break}return v?ne=a.push("ordered_list_close","ol",-1):ne=a.push("bullet_list_close","ul",-1),ne.markup=String.fromCharCode(w),C[1]=x,a.line=x,a.parentType=T,oe&&s(a,y),!0}}}),gN=Me({"node_modules/markdown-it/lib/rules_block/reference.js"(n,e){var t=Ut().normalizeReference,r=Ut().isSpace;e.exports=function(s,o,a,l){var c,u,f,d,h,m,p,O,v,b,_,C,y,w,S,A,x=0,k=s.bMarks[o]+s.tShift[o],E=s.eMarks[o],T=o+1;if(!s.md.options.allowIndentation&&s.sCount[o]-s.blkIndent>=4||s.src.charCodeAt(k)!==91)return!1;for(;++k<E;)if(s.src.charCodeAt(k)===93&&s.src.charCodeAt(k-1)!==92){if(k+1===E||s.src.charCodeAt(k+1)!==58)return!1;break}for(d=s.lineMax,S=s.md.block.ruler.getRules("reference"),b=s.parentType,s.parentType="reference";T<d&&!s.isEmpty(T);T++)if(!(!s.md.options.allowIndentation&&s.sCount[T]-s.blkIndent>3)&&!(s.sCount[T]<0)){for(w=!1,m=0,p=S.length;m<p;m++)if(S[m](s,T,d,!0)){w=!0;break}if(w)break}for(y=s.getLines(o,T,s.blkIndent,!1).trim(),E=y.length,k=1;k<E;k++){if(c=y.charCodeAt(k),c===91)return!1;if(c===93){v=k;break}else c===10?x++:c===92&&(k++,k<E&&y.charCodeAt(k)===10&&x++)}if(v<0||y.charCodeAt(v+1)!==58)return!1;for(k=v+2;k<E;k++)if(c=y.charCodeAt(k),c===10)x++;else if(!r(c))break;if(_=s.md.helpers.parseLinkDestination(y,k,E),!_.ok||(h=s.md.normalizeLink(_.str),!s.md.validateLink(h)))return!1;for(k=_.pos,x+=_.lines,u=k,f=x,C=k;k<E;k++)if(c=y.charCodeAt(k),c===10)x++;else if(!r(c))break;for(_=s.md.helpers.parseLinkTitle(y,k,E),k<E&&C!==k&&_.ok?(A=_.str,k=_.pos,x+=_.lines):(A="",k=u,x=f);k<E&&(c=y.charCodeAt(k),!!r(c));)k++;if(k<E&&y.charCodeAt(k)!==10&&A)for(A="",k=u,x=f;k<E&&(c=y.charCodeAt(k),!!r(c));)k++;return k<E&&y.charCodeAt(k)!==10||(O=t(y.slice(1,v)),!O)?!1:(l||(typeof s.env.references>"u"&&(s.env.references={}),typeof s.env.references[O]>"u"&&(s.env.references[O]={title:A,href:h}),s.parentType=b,s.line=o+x+1),!0)}}}),ON=Me({"node_modules/markdown-it/lib/common/html_blocks.js"(n,e){e.exports=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}}),hA=Me({"node_modules/markdown-it/lib/common/html_re.js"(n,e){var t="[a-zA-Z_:][a-zA-Z0-9:._-]*",r="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",s='"[^"]*"',o="(?:"+r+"|"+i+"|"+s+")",a="(?:\\s+"+t+"(?:\\s*=\\s*"+o+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+a+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",u="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",f="<[?][\\s\\S]*?[?]>",d="<![A-Z]+\\s+[^>]*>",h="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",m=new RegExp("^(?:"+l+"|"+c+"|"+u+"|"+f+"|"+d+"|"+h+")"),p=new RegExp("^(?:"+l+"|"+c+")");e.exports.HTML_TAG_RE=m,e.exports.HTML_OPEN_CLOSE_TAG_RE=p}}),vN=Me({"node_modules/markdown-it/lib/rules_block/html_block.js"(n,e){var t=ON(),r=hA().HTML_OPEN_CLOSE_TAG_RE,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+t.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(r.source+"\\s*$"),/^$/,!1]];e.exports=function(o,a,l,c){var u,f,d,h,m=o.bMarks[a]+o.tShift[a],p=o.eMarks[a];if(!o.md.options.allowIndentation&&o.sCount[a]-o.blkIndent>=4||!o.md.options.html||o.src.charCodeAt(m)!==60)return!1;for(h=o.src.slice(m,p),u=0;u<i.length&&!i[u][0].test(h);u++);if(u===i.length)return!1;if(c)return i[u][2];if(f=a+1,!i[u][1].test(h)){for(;f<l&&!(o.sCount[f]<o.blkIndent);f++)if(m=o.bMarks[f]+o.tShift[f],p=o.eMarks[f],h=o.src.slice(m,p),i[u][1].test(h)){h.length!==0&&f++;break}}return o.line=f,d=o.push("html_block","",0),d.map=[a,f],d.content=o.getLines(a,f,o.blkIndent,!0),!0}}}),bN=Me({"node_modules/markdown-it/lib/rules_block/heading.js"(n,e){var t=Ut().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d=i.bMarks[s]+i.tShift[s],h=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||(l=i.src.charCodeAt(d),l!==35||d>=h))return!1;for(c=1,l=i.src.charCodeAt(++d);l===35&&d<h&&c<=6;)c++,l=i.src.charCodeAt(++d);return c>6||d<h&&!t(l)?!1:(a||(h=i.skipSpacesBack(h,d),u=i.skipCharsBack(h,35,d),u>d&&t(i.src.charCodeAt(u-1))&&(h=u),i.line=s+1,f=i.push("heading_open","h"+String(c),1),f.markup="########".slice(0,c),f.map=[s,i.line],f=i.push("inline","",0),f.content=i.src.slice(d,h).trim(),f.map=[s,i.line],f.children=[],f=i.push("heading_close","h"+String(c),-1),f.markup="########".slice(0,c)),!0)}}}),yN=Me({"node_modules/markdown-it/lib/rules_block/lheading.js"(n,e){e.exports=function(r,i,s){var o,a,l,c,u,f,d,h,m,p=i+1,O,v=r.md.block.ruler.getRules("paragraph");if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4)return!1;for(O=r.parentType,r.parentType="paragraph";p<s&&!r.isEmpty(p);p++)if(!(!r.md.options.allowIndentation&&r.sCount[p]-r.blkIndent>3)){if(r.sCount[p]>=r.blkIndent&&(f=r.bMarks[p]+r.tShift[p],d=r.eMarks[p],f<d&&(m=r.src.charCodeAt(f),(m===45||m===61)&&(f=r.skipChars(f,m),f=r.skipSpaces(f),f>=d)))){h=m===61?1:2;break}if(!(r.sCount[p]<0)){for(a=!1,l=0,c=v.length;l<c;l++)if(v[l](r,p,s,!0)){a=!0;break}if(a)break}}return h?(o=r.getLines(i,p,r.blkIndent,!1).trim(),r.line=p+1,u=r.push("heading_open","h"+String(h),1),u.markup=String.fromCharCode(m),u.map=[i,r.line],u=r.push("inline","",0),u.content=o,u.map=[i,r.line-1],u.children=[],u=r.push("heading_close","h"+String(h),-1),u.markup=String.fromCharCode(m),r.parentType=O,!0):!1}}}),wN=Me({"node_modules/markdown-it/lib/rules_block/paragraph.js"(n,e){e.exports=function(r,i){var s,o,a,l,c,u,f=i+1,d=r.md.block.ruler.getRules("paragraph"),h=r.lineMax;for(u=r.parentType,r.parentType="paragraph";f<h&&!r.isEmpty(f);f++)if(!(!r.md.options.allowIndentation&&r.sCount[f]-r.blkIndent>3)&&!(r.sCount[f]<0)){for(o=!1,a=0,l=d.length;a<l;a++)if(d[a](r,f,h,!0)){o=!0;break}if(o)break}return s=r.getLines(i,f,r.blkIndent,!1).trim(),r.line=f,c=r.push("paragraph_open","p",1),c.map=[i,r.line],c=r.push("inline","",0),c.content=s,c.map=[i,r.line],c.children=[],c=r.push("paragraph_close","p",-1),r.parentType=u,!0}}}),_N=Me({"node_modules/markdown-it/lib/rules_block/state_block.js"(n,e){var t=gv(),r=Ut().isSpace;function i(s,o,a,l){var c,u,f,d,h,m,p,O;for(this.src=s,this.md=o,this.env=a,this.tokens=l,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",u=this.src,O=!1,f=d=m=p=0,h=u.length;d<h;d++){if(c=u.charCodeAt(d),!O)if(r(c)){m++,c===9?p+=4-p%4:p++;continue}else O=!0;(c===10||d===h-1)&&(c!==10&&d++,this.bMarks.push(f),this.eMarks.push(d),this.tShift.push(m),this.sCount.push(p),this.bsCount.push(0),O=!1,m=0,p=0,f=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(s,o,a){var l=new t(s,o,a);return l.block=!0,a<0&&this.level--,l.level=this.level,a>0&&this.level++,this.tokens.push(l),l},i.prototype.isEmpty=function(o){return this.bMarks[o]+this.tShift[o]>=this.eMarks[o]},i.prototype.skipEmptyLines=function(o){for(var a=this.lineMax;o<a&&!(this.bMarks[o]+this.tShift[o]<this.eMarks[o]);o++);return o},i.prototype.skipSpaces=function(o){for(var a,l=this.src.length;o<l&&(a=this.src.charCodeAt(o),!!r(a));o++);return o},i.prototype.skipSpacesBack=function(o,a){if(o<=a)return o;for(;o>a;)if(!r(this.src.charCodeAt(--o)))return o+1;return o},i.prototype.skipChars=function(o,a){for(var l=this.src.length;o<l&&this.src.charCodeAt(o)===a;o++);return o},i.prototype.skipCharsBack=function(o,a,l){if(o<=l)return o;for(;o>l;)if(a!==this.src.charCodeAt(--o))return o+1;return o},i.prototype.getLines=function(o,a,l,c){var u,f,d,h,m,p,O,v=o;if(o>=a)return"";for(p=new Array(a-o),u=0;v<a;v++,u++){for(f=0,O=h=this.bMarks[v],v+1<a||c?m=this.eMarks[v]+1:m=this.eMarks[v];h<m&&f<l;){if(d=this.src.charCodeAt(h),r(d))d===9?f+=4-(f+this.bsCount[v])%4:f++;else if(h-O<this.tShift[v])f++;else break;h++}f>l?p[u]=new Array(f-l+1).join(" ")+this.src.slice(h,m):p[u]=this.src.slice(h,m)}return p.join("")},i.prototype.Token=t,e.exports=i}}),kN=Me({"node_modules/markdown-it/lib/parser_block.js"(n,e){var t=mv(),r=[["table",uN(),["paragraph","reference"]],["code",fN()],["fence",dN(),["paragraph","reference","blockquote","list"]],["blockquote",hN(),["paragraph","reference","blockquote","list"]],["hr",pN(),["paragraph","reference","blockquote","list"]],["list",mN(),["paragraph","reference","blockquote"]],["reference",gN()],["html_block",vN(),["paragraph","reference","blockquote"]],["heading",bN(),["paragraph","reference","blockquote"]],["lheading",yN()],["paragraph",wN()]];function i(){this.ruler=new t;for(var s=0;s<r.length;s++)this.ruler.push(r[s][0],r[s][1],{alt:(r[s][2]||[]).slice()})}i.prototype.tokenize=function(s,o,a){for(var l,c,u=this.ruler.getRules(""),f=u.length,d=o,h=!1,m=s.md.options.maxNesting;d<a&&(s.line=d=s.skipEmptyLines(d),!(d>=a||s.sCount[d]<s.blkIndent));){if(s.level>=m){s.line=a;break}for(c=0;c<f&&(l=u[c](s,d,a,!1),!l);c++);s.tight=!h,s.isEmpty(s.line-1)&&(h=!0),d=s.line,d<a&&s.isEmpty(d)&&(h=!0,d++,s.line=d)}},i.prototype.parse=function(s,o,a,l){var c;s&&(c=new this.State(s,o,a,l),this.tokenize(c,c.line,c.lineMax))},i.prototype.State=_N(),e.exports=i}}),xN=Me({"node_modules/markdown-it/lib/rules_inline/text.js"(n,e){function t(r){switch(r){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(i,s){for(var o=i.pos;o<i.posMax&&!t(i.src.charCodeAt(o));)o++;return o===i.pos?!1:(s||(i.pending+=i.src.slice(i.pos,o)),i.pos=o,!0)}}}),SN=Me({"node_modules/markdown-it/lib/rules_inline/newline.js"(n,e){var t=Ut().isSpace;e.exports=function(i,s){var o,a,l,c=i.pos;if(i.src.charCodeAt(c)!==10)return!1;if(o=i.pending.length-1,a=i.posMax,!s)if(o>=0&&i.pending.charCodeAt(o)===32)if(o>=1&&i.pending.charCodeAt(o-1)===32){for(l=o-1;l>=1&&i.pending.charCodeAt(l-1)===32;)l--;i.pending=i.pending.slice(0,l),i.push("hardbreak","br",0)}else i.pending=i.pending.slice(0,-1),i.push("softbreak","br",0);else i.push("softbreak","br",0);for(c++;c<a&&t(i.src.charCodeAt(c));)c++;return i.pos=c,!0}}}),AN=Me({"node_modules/markdown-it/lib/rules_inline/escape.js"(n,e){var t=Ut().isSpace,r=[];for(i=0;i<256;i++)r.push(0);var i;"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(s){r[s.charCodeAt(0)]=1}),e.exports=function(o,a){var l,c=o.pos,u=o.posMax;if(o.src.charCodeAt(c)!==92)return!1;if(c++,c<u){if(l=o.src.charCodeAt(c),l<256&&r[l]!==0)return a||(o.pending+=o.src[c]),o.pos+=2,!0;if(l===10){for(a||o.push("hardbreak","br",0),c++;c<u&&(l=o.src.charCodeAt(c),!!t(l));)c++;return o.pos=c,!0}}return a||(o.pending+="\\"),o.pos++,!0}}}),CN=Me({"node_modules/markdown-it/lib/rules_inline/backticks.js"(n,e){e.exports=function(r,i){var s,o,a,l,c,u,f,d,h=r.pos,m=r.src.charCodeAt(h);if(m!==96)return!1;for(s=h,h++,o=r.posMax;h<o&&r.src.charCodeAt(h)===96;)h++;if(a=r.src.slice(s,h),f=a.length,r.backticksScanned&&(r.backticks[f]||0)<=s)return i||(r.pending+=a),r.pos+=f,!0;for(c=u=h;(c=r.src.indexOf("`",u))!==-1;){for(u=c+1;u<o&&r.src.charCodeAt(u)===96;)u++;if(d=u-c,d===f)return i||(l=r.push("code_inline","code",0),l.markup=a,l.content=r.src.slice(h,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),r.pos=u,!0;r.backticks[d]=c}return r.backticksScanned=!0,i||(r.pending+=a),r.pos+=f,!0}}}),B1=Me({"node_modules/markdown-it/lib/rules_inline/strikethrough.js"(n,e){e.exports.tokenize=function(i,s){var o,a,l,c,u,f=i.pos,d=i.src.charCodeAt(f);if(s||d!==126||(a=i.scanDelims(i.pos,!0),c=a.length,u=String.fromCharCode(d),c<2))return!1;for(c%2&&(l=i.push("text","",0),l.content=u,c--),o=0;o<c;o+=2)l=i.push("text","",0),l.content=u+u,i.delimiters.push({marker:d,length:0,token:i.tokens.length-1,end:-1,open:a.can_open,close:a.can_close});return i.pos+=a.length,!0};function t(r,i){var s,o,a,l,c,u=[],f=i.length;for(s=0;s<f;s++)a=i[s],a.marker===126&&a.end!==-1&&(l=i[a.end],c=r.tokens[a.token],c.type="s_open",c.tag="s",c.nesting=1,c.markup="~~",c.content="",c=r.tokens[l.token],c.type="s_close",c.tag="s",c.nesting=-1,c.markup="~~",c.content="",r.tokens[l.token-1].type==="text"&&r.tokens[l.token-1].content==="~"&&u.push(l.token-1));for(;u.length;){for(s=u.pop(),o=s+1;o<r.tokens.length&&r.tokens[o].type==="s_close";)o++;o--,s!==o&&(c=r.tokens[o],r.tokens[o]=r.tokens[s],r.tokens[s]=c)}}e.exports.postProcess=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),j1=Me({"node_modules/markdown-it/lib/rules_inline/emphasis.js"(n,e){e.exports.tokenize=function(i,s){var o,a,l,c=i.pos,u=i.src.charCodeAt(c);if(s||u!==95&&u!==42)return!1;for(a=i.scanDelims(i.pos,u===42),o=0;o<a.length;o++)l=i.push("text","",0),l.content=String.fromCharCode(u),i.delimiters.push({marker:u,length:a.length,token:i.tokens.length-1,end:-1,open:a.can_open,close:a.can_close});return i.pos+=a.length,!0};function t(r,i){var s,o,a,l,c,u,f=i.length;for(s=f-1;s>=0;s--)o=i[s],!(o.marker!==95&&o.marker!==42)&&o.end!==-1&&(a=i[o.end],u=s>0&&i[s-1].end===o.end+1&&i[s-1].marker===o.marker&&i[s-1].token===o.token-1&&i[o.end+1].token===a.token+1,c=String.fromCharCode(o.marker),l=r.tokens[o.token],l.type=u?"strong_open":"em_open",l.tag=u?"strong":"em",l.nesting=1,l.markup=u?c+c:c,l.content="",l=r.tokens[a.token],l.type=u?"strong_close":"em_close",l.tag=u?"strong":"em",l.nesting=-1,l.markup=u?c+c:c,l.content="",u&&(r.tokens[i[s-1].token].content="",r.tokens[i[o.end+1].token].content="",s--))}e.exports.postProcess=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),TN=Me({"node_modules/markdown-it/lib/rules_inline/link.js"(n,e){var t=Ut().normalizeReference,r=Ut().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,m,p,O="",v="",b=s.pos,_=s.posMax,C=s.pos,y=!0;if(s.src.charCodeAt(s.pos)!==91||(f=s.pos+1,u=s.md.helpers.parseLinkLabel(s,s.pos,!0),u<0))return!1;if(d=u+1,d<_&&s.src.charCodeAt(d)===40){for(y=!1,d++;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(d>=_)return!1;if(C=d,h=s.md.helpers.parseLinkDestination(s.src,d,s.posMax),h.ok){for(O=s.md.normalizeLink(h.str),s.md.validateLink(O)?d=h.pos:O="",C=d;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(h=s.md.helpers.parseLinkTitle(s.src,d,s.posMax),d<_&&C!==d&&h.ok)for(v=h.str,d=h.pos;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);}(d>=_||s.src.charCodeAt(d)!==41)&&(y=!0),d++}if(y){if(typeof s.env.references>"u")return!1;if(d<_&&s.src.charCodeAt(d)===91?(C=d+1,d=s.md.helpers.parseLinkLabel(s,d),d>=0?c=s.src.slice(C,d++):d=u+1):d=u+1,c||(c=s.src.slice(f,u)),m=s.env.references[t(c)],!m)return s.pos=b,!1;O=m.href,v=m.title}return o||(s.pos=f,s.posMax=u,p=s.push("link_open","a",1),p.attrs=a=[["href",O]],v&&a.push(["title",v]),s.md.inline.tokenize(s),p=s.push("link_close","a",-1)),s.pos=d,s.posMax=_,!0}}}),PN=Me({"node_modules/markdown-it/lib/rules_inline/image.js"(n,e){var t=Ut().normalizeReference,r=Ut().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,m,p,O,v,b,_,C="",y=s.pos,w=s.posMax;if(s.src.charCodeAt(s.pos)!==33||s.src.charCodeAt(s.pos+1)!==91||(d=s.pos+2,f=s.md.helpers.parseLinkLabel(s,s.pos+1,!1),f<0))return!1;if(h=f+1,h<w&&s.src.charCodeAt(h)===40){for(h++;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(h>=w)return!1;for(_=h,p=s.md.helpers.parseLinkDestination(s.src,h,s.posMax),p.ok&&(C=s.md.normalizeLink(p.str),s.md.validateLink(C)?h=p.pos:C=""),_=h;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(p=s.md.helpers.parseLinkTitle(s.src,h,s.posMax),h<w&&_!==h&&p.ok)for(O=p.str,h=p.pos;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);else O="";if(h>=w||s.src.charCodeAt(h)!==41)return s.pos=y,!1;h++}else{if(typeof s.env.references>"u")return!1;if(h<w&&s.src.charCodeAt(h)===91?(_=h+1,h=s.md.helpers.parseLinkLabel(s,h),h>=0?u=s.src.slice(_,h++):h=f+1):h=f+1,u||(u=s.src.slice(d,f)),m=s.env.references[t(u)],!m)return s.pos=y,!1;C=m.href,O=m.title}return o||(c=s.src.slice(d,f),s.md.inline.parse(c,s.md,s.env,b=[]),v=s.push("image","img",0),v.attrs=a=[["src",C],["alt",""]],v.children=b,v.content=c,O&&a.push(["title",O])),s.pos=h,s.posMax=w,!0}}}),EN=Me({"node_modules/markdown-it/lib/rules_inline/autolink.js"(n,e){var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,r=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(s,o){var a,l,c,u,f,d,h=s.pos;if(s.src.charCodeAt(h)!==60)return!1;for(f=s.pos,d=s.posMax;;){if(++h>=d||(u=s.src.charCodeAt(h),u===60))return!1;if(u===62)break}return a=s.src.slice(f+1,h),r.test(a)?(l=s.md.normalizeLink(a),s.md.validateLink(l)?(o||(c=s.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=s.push("text","",0),c.content=s.md.normalizeLinkText(a),c=s.push("link_close","a",-1),c.markup="autolink",c.info="auto"),s.pos+=a.length+2,!0):!1):t.test(a)?(l=s.md.normalizeLink("mailto:"+a),s.md.validateLink(l)?(o||(c=s.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=s.push("text","",0),c.content=s.md.normalizeLinkText(a),c=s.push("link_close","a",-1),c.markup="autolink",c.info="auto"),s.pos+=a.length+2,!0):!1):!1}}}),$N=Me({"node_modules/markdown-it/lib/rules_inline/html_inline.js"(n,e){var t=hA().HTML_TAG_RE;function r(i){var s=i|32;return s>=97&&s<=122}e.exports=function(s,o){var a,l,c,u,f=s.pos;return!s.md.options.html||(c=s.posMax,s.src.charCodeAt(f)!==60||f+2>=c)||(a=s.src.charCodeAt(f+1),a!==33&&a!==63&&a!==47&&!r(a))||(l=s.src.slice(f).match(t),!l)?!1:(o||(u=s.push("html_inline","",0),u.content=s.src.slice(f,f+l[0].length)),s.pos+=l[0].length,!0)}}}),QN=Me({"node_modules/markdown-it/lib/rules_inline/entity.js"(n,e){var t=lA(),r=Ut().has,i=Ut().isValidEntityCode,s=Ut().fromCodePoint,o=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,a=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(c,u){var f,d,h,m=c.pos,p=c.posMax;if(c.src.charCodeAt(m)!==38)return!1;if(m+1<p){if(f=c.src.charCodeAt(m+1),f===35){if(h=c.src.slice(m).match(o),h)return u||(d=h[1][0].toLowerCase()==="x"?parseInt(h[1].slice(1),16):parseInt(h[1],10),c.pending+=i(d)?s(d):s(65533)),c.pos+=h[0].length,!0}else if(h=c.src.slice(m).match(a),h&&r(t,h[1]))return u||(c.pending+=t[h[1]]),c.pos+=h[0].length,!0}return u||(c.pending+="&"),c.pos++,!0}}}),LN=Me({"node_modules/markdown-it/lib/rules_inline/balance_pairs.js"(n,e){function t(r,i){var s,o,a,l,c,u,f,d,h={},m=i.length;if(m){var p=0,O=-2,v=[];for(s=0;s<m;s++)if(a=i[s],v.push(0),(i[p].marker!==a.marker||O!==a.token-1)&&(p=s),O=a.token,a.length=a.length||0,!!a.close){for(h.hasOwnProperty(a.marker)||(h[a.marker]=[-1,-1,-1,-1,-1,-1]),c=h[a.marker][(a.open?3:0)+a.length%3],o=p-v[p]-1,u=o;o>c;o-=v[o]+1)if(l=i[o],l.marker===a.marker&&l.open&&l.end<0&&(f=!1,(l.close||a.open)&&(l.length+a.length)%3===0&&(l.length%3!==0||a.length%3!==0)&&(f=!0),!f)){d=o>0&&!i[o-1].open?v[o-1]+1:0,v[s]=s-o+d,v[o]=d,a.open=!1,l.end=s,l.close=!1,u=-1,O=-2;break}u!==-1&&(h[a.marker][(a.open?3:0)+(a.length||0)%3]=u)}}}e.exports=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),MN=Me({"node_modules/markdown-it/lib/rules_inline/text_collapse.js"(n,e){e.exports=function(r){var i,s,o=0,a=r.tokens,l=r.tokens.length;for(i=s=0;i<l;i++)a[i].nesting<0&&o--,a[i].level=o,a[i].nesting>0&&o++,a[i].type==="text"&&i+1<l&&a[i+1].type==="text"?a[i+1].content=a[i].content+a[i+1].content:(i!==s&&(a[s]=a[i]),s++);i!==s&&(a.length=s)}}}),DN=Me({"node_modules/markdown-it/lib/rules_inline/state_inline.js"(n,e){var t=gv(),r=Ut().isWhiteSpace,i=Ut().isPunctChar,s=Ut().isMdAsciiPunct;function o(a,l,c,u){this.src=a,this.env=c,this.md=l,this.tokens=u,this.tokens_meta=Array(u.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}o.prototype.pushPending=function(){var a=new t("text","",0);return a.content=this.pending,a.level=this.pendingLevel,this.tokens.push(a),this.pending="",a},o.prototype.push=function(a,l,c){this.pending&&this.pushPending();var u=new t(a,l,c),f=null;return c<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,c>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],f={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(f),u},o.prototype.scanDelims=function(a,l){var c=a,u,f,d,h,m,p,O,v,b,_=!0,C=!0,y=this.posMax,w=this.src.charCodeAt(a);for(u=a>0?this.src.charCodeAt(a-1):32;c<y&&this.src.charCodeAt(c)===w;)c++;return d=c-a,f=c<y?this.src.charCodeAt(c):32,O=s(u)||i(String.fromCharCode(u)),b=s(f)||i(String.fromCharCode(f)),p=r(u),v=r(f),v?_=!1:b&&(p||O||(_=!1)),p?C=!1:O&&(v||b||(C=!1)),l?(h=_,m=C):(h=_&&(!C||O),m=C&&(!_||b)),{can_open:h,can_close:m,length:d}},o.prototype.Token=t,e.exports=o}}),qN=Me({"node_modules/markdown-it/lib/parser_inline.js"(n,e){var t=mv(),r=[["text",xN()],["newline",SN()],["escape",AN()],["backticks",CN()],["strikethrough",B1().tokenize],["emphasis",j1().tokenize],["link",TN()],["image",PN()],["autolink",EN()],["html_inline",$N()],["entity",QN()]],i=[["balance_pairs",LN()],["strikethrough",B1().postProcess],["emphasis",j1().postProcess],["text_collapse",MN()]];function s(){var o;for(this.ruler=new t,o=0;o<r.length;o++)this.ruler.push(r[o][0],r[o][1]);for(this.ruler2=new t,o=0;o<i.length;o++)this.ruler2.push(i[o][0],i[o][1])}s.prototype.skipToken=function(o){var a,l,c=o.pos,u=this.ruler.getRules(""),f=u.length,d=o.md.options.maxNesting,h=o.cache;if(typeof h[c]<"u"){o.pos=h[c];return}if(o.level<d)for(l=0;l<f&&(o.level++,a=u[l](o,!0),o.level--,!a);l++);else o.pos=o.posMax;a||o.pos++,h[c]=o.pos},s.prototype.tokenize=function(o){for(var a,l,c=this.ruler.getRules(""),u=c.length,f=o.posMax,d=o.md.options.maxNesting;o.pos<f;){if(o.level<d)for(l=0;l<u&&(a=c[l](o,!1),!a);l++);if(a){if(o.pos>=f)break;continue}o.pending+=o.src[o.pos++]}o.pending&&o.pushPending()},s.prototype.parse=function(o,a,l,c){var u,f,d,h=new this.State(o,a,l,c);for(this.tokenize(h),f=this.ruler2.getRules(""),d=f.length,u=0;u<d;u++)f[u](h)},s.prototype.State=DN(),e.exports=s}}),RN=Me({"node_modules/linkify-it/lib/re.js"(n,e){e.exports=function(t){var r={};r.src_Any=uA().source,r.src_Cc=fA().source,r.src_Z=dA().source,r.src_P=pv().source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|");var i="[><|]";return r.src_pseudo_letter="(?:(?!"+i+"|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|"+i+"|"+r.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+").|;(?!"+r.src_ZCc+").|\\!+(?!"+r.src_ZCc+"|[!]).|\\?(?!"+r.src_ZCc+"|[?]).)+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}}}),IN=Me({"node_modules/linkify-it/index.js"(n,e){function t(y){var w=Array.prototype.slice.call(arguments,1);return w.forEach(function(S){S&&Object.keys(S).forEach(function(A){y[A]=S[A]})}),y}function r(y){return Object.prototype.toString.call(y)}function i(y){return r(y)==="[object String]"}function s(y){return r(y)==="[object Object]"}function o(y){return r(y)==="[object RegExp]"}function a(y){return r(y)==="[object Function]"}function l(y){return y.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function u(y){return Object.keys(y||{}).reduce(function(w,S){return w||c.hasOwnProperty(S)},!1)}var f={"http:":{validate:function(y,w,S){var A=y.slice(w);return S.re.http||(S.re.http=new RegExp("^\\/\\/"+S.re.src_auth+S.re.src_host_port_strict+S.re.src_path,"i")),S.re.http.test(A)?A.match(S.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(y,w,S){var A=y.slice(w);return S.re.no_http||(S.re.no_http=new RegExp("^"+S.re.src_auth+"(?:localhost|(?:(?:"+S.re.src_domain+")\\.)+"+S.re.src_domain_root+")"+S.re.src_port+S.re.src_host_terminator+S.re.src_path,"i")),S.re.no_http.test(A)?w>=3&&y[w-3]===":"||w>=3&&y[w-3]==="/"?0:A.match(S.re.no_http)[0].length:0}},"mailto:":{validate:function(y,w,S){var A=y.slice(w);return S.re.mailto||(S.re.mailto=new RegExp("^"+S.re.src_email_name+"@"+S.re.src_host_strict,"i")),S.re.mailto.test(A)?A.match(S.re.mailto)[0].length:0}}},d="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",h="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function m(y){y.__index__=-1,y.__text_cache__=""}function p(y){return function(w,S){var A=w.slice(S);return y.test(A)?A.match(y)[0].length:0}}function O(){return function(y,w){w.normalize(y)}}function v(y){var w=y.re=RN()(y.__opts__),S=y.__tlds__.slice();y.onCompile(),y.__tlds_replaced__||S.push(d),S.push(w.src_xn),w.src_tlds=S.join("|");function A(T){return T.replace("%TLDS%",w.src_tlds)}w.email_fuzzy=RegExp(A(w.tpl_email_fuzzy),"i"),w.link_fuzzy=RegExp(A(w.tpl_link_fuzzy),"i"),w.link_no_ip_fuzzy=RegExp(A(w.tpl_link_no_ip_fuzzy),"i"),w.host_fuzzy_test=RegExp(A(w.tpl_host_fuzzy_test),"i");var x=[];y.__compiled__={};function k(T,$){throw new Error('(LinkifyIt) Invalid schema "'+T+'": '+$)}Object.keys(y.__schemas__).forEach(function(T){var $=y.__schemas__[T];if($!==null){var L={validate:null,link:null};if(y.__compiled__[T]=L,s($)){o($.validate)?L.validate=p($.validate):a($.validate)?L.validate=$.validate:k(T,$),a($.normalize)?L.normalize=$.normalize:$.normalize?k(T,$):L.normalize=O();return}if(i($)){x.push(T);return}k(T,$)}}),x.forEach(function(T){y.__compiled__[y.__schemas__[T]]&&(y.__compiled__[T].validate=y.__compiled__[y.__schemas__[T]].validate,y.__compiled__[T].normalize=y.__compiled__[y.__schemas__[T]].normalize)}),y.__compiled__[""]={validate:null,normalize:O()};var E=Object.keys(y.__compiled__).filter(function(T){return T.length>0&&y.__compiled__[T]}).map(l).join("|");y.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+w.src_ZPCc+"))("+E+")","i"),y.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+w.src_ZPCc+"))("+E+")","ig"),y.re.pretest=RegExp("("+y.re.schema_test.source+")|("+y.re.host_fuzzy_test.source+")|@","i"),m(y)}function b(y,w){var S=y.__index__,A=y.__last_index__,x=y.__text_cache__.slice(S,A);this.schema=y.__schema__.toLowerCase(),this.index=S+w,this.lastIndex=A+w,this.raw=x,this.text=x,this.url=x}function _(y,w){var S=new b(y,w);return y.__compiled__[S.schema].normalize(S,y),S}function C(y,w){if(!(this instanceof C))return new C(y,w);w||u(y)&&(w=y,y={}),this.__opts__=t({},c,w),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=t({},f,y),this.__compiled__={},this.__tlds__=h,this.__tlds_replaced__=!1,this.re={},v(this)}C.prototype.add=function(w,S){return this.__schemas__[w]=S,v(this),this},C.prototype.set=function(w){return this.__opts__=t(this.__opts__,w),this},C.prototype.test=function(w){if(this.__text_cache__=w,this.__index__=-1,!w.length)return!1;var S,A,x,k,E,T,$,L,P;if(this.re.schema_test.test(w)){for($=this.re.schema_search,$.lastIndex=0;(S=$.exec(w))!==null;)if(k=this.testSchemaAt(w,S[2],$.lastIndex),k){this.__schema__=S[2],this.__index__=S.index+S[1].length,this.__last_index__=S.index+S[0].length+k;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(L=w.search(this.re.host_fuzzy_test),L>=0&&(this.__index__<0||L<this.__index__)&&(A=w.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(E=A.index+A[1].length,(this.__index__<0||E<this.__index__)&&(this.__schema__="",this.__index__=E,this.__last_index__=A.index+A[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(P=w.indexOf("@"),P>=0&&(x=w.match(this.re.email_fuzzy))!==null&&(E=x.index+x[1].length,T=x.index+x[0].length,(this.__index__<0||E<this.__index__||E===this.__index__&&T>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=E,this.__last_index__=T))),this.__index__>=0},C.prototype.pretest=function(w){return this.re.pretest.test(w)},C.prototype.testSchemaAt=function(w,S,A){return this.__compiled__[S.toLowerCase()]?this.__compiled__[S.toLowerCase()].validate(w,A,this):0},C.prototype.match=function(w){var S=0,A=[];this.__index__>=0&&this.__text_cache__===w&&(A.push(_(this,S)),S=this.__last_index__);for(var x=S?w.slice(S):w;this.test(x);)A.push(_(this,S)),x=x.slice(this.__last_index__),S+=this.__last_index__;return A.length?A:null},C.prototype.tlds=function(w,S){return w=Array.isArray(w)?w:[w],S?(this.__tlds__=this.__tlds__.concat(w).sort().filter(function(A,x,k){return A!==k[x-1]}).reverse(),v(this),this):(this.__tlds__=w.slice(),this.__tlds_replaced__=!0,v(this),this)},C.prototype.normalize=function(w){w.schema||(w.url="http://"+w.url),w.schema==="mailto:"&&!/^mailto:/i.test(w.url)&&(w.url="mailto:"+w.url)},C.prototype.onCompile=function(){},e.exports=C}}),NN=Me({"node_modules/punycode/punycode.js"(n,e){var t=2147483647,r=36,i=1,s=26,o=38,a=700,l=72,c=128,u="-",f=/^xn--/,d=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=r-i,O=Math.floor,v=String.fromCharCode;function b(P){throw new RangeError(m[P])}function _(P,D){const I=[];let W=P.length;for(;W--;)I[W]=D(P[W]);return I}function C(P,D){const I=P.split("@");let W="";I.length>1&&(W=I[0]+"@",P=I[1]),P=P.replace(h,".");const U=P.split("."),ae=_(U,D).join(".");return W+ae}function y(P){const D=[];let I=0;const W=P.length;for(;I<W;){const U=P.charCodeAt(I++);if(U>=55296&&U<=56319&&I<W){const ae=P.charCodeAt(I++);(ae&64512)==56320?D.push(((U&1023)<<10)+(ae&1023)+65536):(D.push(U),I--)}else D.push(U)}return D}var w=P=>String.fromCodePoint(...P),S=function(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:r},A=function(P,D){return P+22+75*(P<26)-((D!=0)<<5)},x=function(P,D,I){let W=0;for(P=I?O(P/a):P>>1,P+=O(P/D);P>p*s>>1;W+=r)P=O(P/p);return O(W+(p+1)*P/(P+o))},k=function(P){const D=[],I=P.length;let W=0,U=c,ae=l,ce=P.lastIndexOf(u);ce<0&&(ce=0);for(let ne=0;ne<ce;++ne)P.charCodeAt(ne)>=128&&b("not-basic"),D.push(P.charCodeAt(ne));for(let ne=ce>0?ce+1:0;ne<I;){let G=W;for(let ie=1,j=r;;j+=r){ne>=I&&b("invalid-input");const te=S(P.charCodeAt(ne++));(te>=r||te>O((t-W)/ie))&&b("overflow"),W+=te*ie;const _e=j<=ae?i:j>=ae+s?s:j-ae;if(te<_e)break;const Ee=r-_e;ie>O(t/Ee)&&b("overflow"),ie*=Ee}const oe=D.length+1;ae=x(W-G,oe,G==0),O(W/oe)>t-U&&b("overflow"),U+=O(W/oe),W%=oe,D.splice(W++,0,U)}return String.fromCodePoint(...D)},E=function(P){const D=[];P=y(P);let I=P.length,W=c,U=0,ae=l;for(const G of P)G<128&&D.push(v(G));let ce=D.length,ne=ce;for(ce&&D.push(u);ne<I;){let G=t;for(const ie of P)ie>=W&&ie<G&&(G=ie);const oe=ne+1;G-W>O((t-U)/oe)&&b("overflow"),U+=(G-W)*oe,W=G;for(const ie of P)if(ie<W&&++U>t&&b("overflow"),ie==W){let j=U;for(let te=r;;te+=r){const _e=te<=ae?i:te>=ae+s?s:te-ae;if(j<_e)break;const Ee=j-_e,Re=r-_e;D.push(v(A(_e+Ee%Re,0))),j=O(Ee/Re)}D.push(v(A(j,0))),ae=x(U,oe,ne==ce),U=0,++ne}++U,++W}return D.join("")},T=function(P){return C(P,function(D){return f.test(D)?k(D.slice(4).toLowerCase()):D})},$=function(P){return C(P,function(D){return d.test(D)?"xn--"+E(D):D})},L={version:"2.1.0",ucs2:{decode:y,encode:w},decode:k,encode:E,toASCII:$,toUnicode:T};e.exports=L}}),BN=Me({"node_modules/markdown-it/lib/presets/default.js"(n,e){e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}}}),jN=Me({"node_modules/markdown-it/lib/presets/zero.js"(n,e){e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}}}),zN=Me({"node_modules/markdown-it/lib/presets/commonmark.js"(n,e){e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}}}),pA=Me({"node_modules/markdown-it/lib/index.js"(n,e){var t=Ut(),r=eN(),i=tN(),s=cN(),o=kN(),a=qN(),l=IN(),c=cA(),u=NN(),f={default:BN(),zero:jN(),commonmark:zN()},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(_){var C=_.trim().toLowerCase();return d.test(C)?!!h.test(C):!0}var p=["http:","https:","mailto:"];function O(_){var C=c.parse(_,!0);if(C.hostname&&(!C.protocol||p.indexOf(C.protocol)>=0))try{C.hostname=u.toASCII(C.hostname)}catch{}return c.encode(c.format(C))}function v(_){var C=c.parse(_,!0);if(C.hostname&&(!C.protocol||p.indexOf(C.protocol)>=0))try{C.hostname=u.toUnicode(C.hostname)}catch{}return c.decode(c.format(C),c.decode.defaultChars+"%")}function b(_,C){if(!(this instanceof b))return new b(_,C);C||t.isString(_)||(C=_||{},_="default"),this.inline=new a,this.block=new o,this.core=new s,this.renderer=new i,this.linkify=new l,this.validateLink=m,this.normalizeLink=O,this.normalizeLinkText=v,this.utils=t,this.helpers=t.assign({},r),this.options={},this.configure(_),C&&this.set(C)}b.prototype.set=function(_){return t.assign(this.options,_),this},b.prototype.configure=function(_){var C=this,y;if(t.isString(_)&&(y=_,_=f[y],!_))throw new Error('Wrong `markdown-it` preset "'+y+'", check name');if(!_)throw new Error("Wrong `markdown-it` preset, can't be empty");return _.options&&C.set(_.options),_.components&&Object.keys(_.components).forEach(function(w){_.components[w].rules&&C[w].ruler.enableOnly(_.components[w].rules),_.components[w].rules2&&C[w].ruler2.enableOnly(_.components[w].rules2)}),this},b.prototype.enable=function(_,C){var y=[];Array.isArray(_)||(_=[_]),["core","block","inline"].forEach(function(S){y=y.concat(this[S].ruler.enable(_,!0))},this),y=y.concat(this.inline.ruler2.enable(_,!0));var w=_.filter(function(S){return y.indexOf(S)<0});if(w.length&&!C)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+w);return this},b.prototype.disable=function(_,C){var y=[];Array.isArray(_)||(_=[_]),["core","block","inline"].forEach(function(S){y=y.concat(this[S].ruler.disable(_,!0))},this),y=y.concat(this.inline.ruler2.disable(_,!0));var w=_.filter(function(S){return y.indexOf(S)<0});if(w.length&&!C)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+w);return this},b.prototype.use=function(_){var C=[this].concat(Array.prototype.slice.call(arguments,1));return _.apply(_,C),this},b.prototype.parse=function(_,C){if(typeof _!="string")throw new Error("Input data should be a String");var y=new this.core.State(_,this,C);return this.core.process(y),y.tokens},b.prototype.render=function(_,C){return C=C||{},this.renderer.render(this.parse(_,C),this.options,C)},b.prototype.parseInline=function(_,C){var y=new this.core.State(_,this,C);return y.inlineMode=!0,this.core.process(y),y.tokens},b.prototype.renderInline=function(_,C){return C=C||{},this.renderer.render(this.parseInline(_,C),this.options,C)},e.exports=b}}),ZN=Me({"node_modules/markdown-it/index.js"(n,e){e.exports=pA()}}),mA={};oA(mA,{getAstValues:()=>Gm,isAst:()=>Ov,isFunction:()=>XN,isVariable:()=>FN,resolve:()=>Tc});function Ov(n){return!!n?.$$mdtype}function XN(n){return n?.$$mdtype==="Function"}function FN(n){return n?.$$mdtype==="Variable"}function*Gm(n){if(!(n==null||typeof n!="object")){if(Array.isArray(n))for(const e of n)yield*Gm(e);if(Ov(n)&&(yield n),Object.getPrototypeOf(n)===Object.prototype)for(const e of Object.values(n))yield*Gm(e)}}function Tc(n,e={}){if(n==null||typeof n!="object")return n;if(Array.isArray(n))return n.map(r=>Tc(r,e));if(Ov(n)&&n?.resolve instanceof Function)return n.resolve(e);if(Object.getPrototypeOf(n)!==Object.prototype)return n;const t={};for(const[r,i]of Object.entries(n))t[r]=Tc(i,e);return t}var ki=class{constructor(e="div",t={},r=[]){this.$$mdtype="Tag",this.name=e,this.attributes=t,this.children=r}};ki.isTag=n=>n?.$$mdtype==="Tag";var VN=class{validate(n,e,t){return typeof n=="string"||typeof n=="object"?[]:[{id:"attribute-type-invalid",level:"error",message:`Attribute '${t}' must be type 'string | object'`}]}transform(n){if(!n||typeof n=="string")return n;const e=[];for(const[t,r]of Object.entries(n??{}))r&&e.push(t);return e.join(" ")}},WN=class{validate(n){return typeof n=="string"&&n.match(/^[a-zA-Z]/)?[]:[{id:"attribute-value-invalid",level:"error",message:"The 'id' attribute must start with a letter"}]}},z1=Kd(aA()),Jd=class{constructor(n=[]){this.$$mdtype="Variable",this.path=n}resolve({variables:n}={}){return n instanceof Function?n(this.path):this.path.reduce((e={},t)=>e[t],n)}},eh=class{constructor(n,e){this.$$mdtype="Function",this.name=n,this.parameters=e}resolve(n={}){const e=n?.functions?.[this.name];if(!e)return null;const t=Tc(this.parameters,n);return e.transform?.(t,n)}},Z1;(function(n){n[n.normal=0]="normal",n[n.string=1]="string",n[n.escape=2]="escape"})(Z1||(Z1={}));var lr="{%",Fi="%}",YN=/^[a-zA-Z0-9_-]+$/;function sd(n){return typeof n=="string"&&YN.test(n)}function Eo(n){return n&&typeof n=="object"&&typeof n.then=="function"}function th(n,e=0){let t=0;for(let r=e;r<n.length;r++){const i=n[r];switch(t){case 1:switch(i){case'"':t=0;break;case"\\":t=2;break}break;case 2:t=1;break;case 0:if(i==='"')t=1;else if(n.startsWith(Fi,r))return r}}return null}function UN(n,e,t){try{return(0,z1.parse)(n,{Variable:Jd,Function:eh})}catch(r){if(!(r instanceof z1.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a={start:{line:e,character:s.offset+t},end:{line:e+1,character:o.offset+t}};return{type:"error",meta:{error:{message:i,location:a}}}}}function gA(n,e=0){let t=e+1;const r=[];let i=0;for(let s=0;s<n.length;s++){if(n[s]===`
263
+ `){t++;continue}if(!n.startsWith(lr,s))continue;const o=th(n,s);if(o==null){s=s+lr.length;continue}const a=n.slice(s,o+Fi.length),l=n.slice(s+lr.length,o),c=n.lastIndexOf(`
264
+ `,s),u=n.indexOf(`
265
+ `,o),f=n.slice(c,u),d=UN(l.trim(),t,s-c),h=f.trim()===a?c:s,m=n.slice(i,h);r.push({type:"text",start:i,end:s-1,content:m}),r.push({map:[t,t+1],position:{start:s-c,end:s-c+a.length},start:s,end:s+a.length-1,info:a,...d}),i=o+Fi.length,s=i-1}return r.push({type:"text",start:i,end:n.length-1,content:n.slice(i)}),r}var vv={class:{type:VN,render:!0},id:{type:WN,render:!0}},Bl={findSchema(n,{nodes:e={},tags:t={}}={}){return n.tag?t[n.tag]:e[n.type]},attributes(n,e={}){const t=this.findSchema(n,e)??{},r={},i={...vv,...t.attributes};for(const[s,o]of Object.entries(i)){if(o.render==!1)continue;const a=typeof o.render=="string"?o.render:s;let l=n.attributes[s];if(typeof o.type=="function"){const c=new o.type;c.transform&&(l=c.transform(l,e))}l=l===void 0?o.default:l,l!==void 0&&(r[a]=l)}if(t.slots)for(const[s,o]of Object.entries(t.slots)){if(o.render===!1)continue;const a=typeof o.render=="string"?o.render:s;n.slots[s]&&(r[a]=this.node(n.slots[s],e))}return r},children(n,e={}){const t=n.children.flatMap(r=>this.node(r,e));return t.some(Eo)?Promise.all(t):t},node(n,e={}){const t=this.findSchema(n,e)??{};if(t&&t.transform instanceof Function)return t.transform(n,e);const r=this.children(n,e);if(!t||!t.render)return r;const i=this.attributes(n,e);return Eo(i)||Eo(r)?Promise.all([i,r]).then(s=>new ki(t.render,...s)):new ki(t.render,i,r)}},nh=class{constructor(e="node",t={},r=[],i){this.$$mdtype="Node",this.errors=[],this.lines=[],this.inline=!1,this.attributes=t,this.children=r,this.type=e,this.tag=i,this.annotations=[],this.slots={}}*walk(){for(const e of[...Object.values(this.slots),...this.children])yield e,yield*e.walk()}push(e){this.children.push(e)}resolve(e={}){return Object.assign(new nh,this,{children:this.children.map(t=>t.resolve(e)),attributes:Tc(this.attributes,e),slots:Object.fromEntries(Object.entries(this.slots).map(([t,r])=>[t,r.resolve(e)]))})}findSchema(e={}){return Bl.findSchema(this,e)}transformAttributes(e={}){return Bl.attributes(this,e)}transformChildren(e){return Bl.children(this,e)}transform(e){return Bl.node(this,e)}},OA={Function:eh,Node:nh,Variable:Jd};function GN(n,e){if(!e)return e;const t=OA[e.$$mdtype];return t?Object.assign(new t,e):e}function HN(n){return JSON.parse(n,GN)}var Tr={...OA,...mA,fromJSON:HN},qn=" ",Hm=", ",zt=`
266
+ `,KN=".",X1="-",JN=80,e4=["strong","em","s"],t4=(n,e)=>Math.max(n,e),np=(n,e=2)=>({...n,indent:(n.indent||0)+e});function*pr(n,e){for(const t of n.children)yield*ss(t,e)}function*Qu(n){yield[...n].join("").trim()}function*rp(n){yield`| ${n.join(" | ")} |`}function od(n){if(n!==void 0)return Tr.isAst(n)?ad(n):n===null?"null":Array.isArray(n)?"["+n.map(od).join(Hm)+"]":typeof n=="object"?"{"+Object.entries(n).map(([e,t])=>`${sd(e)?e:`"${e}"`}: ${od(t)}`).join(Hm)+"}":JSON.stringify(n)}function Km(n){const e=od(n.value);if(e!==void 0)return n.name==="primary"?e:n.name==="id"&&typeof n.value=="string"&&sd(n.value)?"#"+n.value:n.type==="class"&&sd(n.name)?"."+n.name:`${n.name}=${e}`}function*n4(n){for(const[e,t]of Object.entries(n.attributes))if(e==="class"&&typeof t=="object"&&!Tr.isAst(t))for(const r of Object.keys(t))yield Km({type:"class",name:r,value:t});else yield Km({type:"attribute",name:e,value:t})}function*Sl(n){n.annotations.length&&(yield lr+qn,yield n.annotations.map(Km).join(qn),yield qn+Fi)}function*r4(n){yield"$",yield n.path.map((e,t)=>t===0?e:sd(e)?"."+e:typeof e=="number"?`[${e}]`:`["${e}"]`).join("")}function*i4(n){yield n.name,yield"(",yield Object.values(n.parameters).map(od).join(Hm),yield")"}function*F1(n){let e;do{const{value:t,done:r}=n.next();if(r)return;e=t.trimStart()}while(!e.length);yield e,yield*n}function*Lu(n,e){yield n.replace(e,"\\$&").replace(new RegExp(" ","g"),"&nbsp;")}function*s4(n,e={}){const t={...e,parent:n},r=qn.repeat(t.indent||0);switch(n.type){case"document":{n.attributes.frontmatter&&n.attributes.frontmatter.length&&(yield"---"+zt+n.attributes.frontmatter+zt+"---"+zt+zt),yield*F1(pr(n,t));break}case"heading":{yield zt,yield r,yield"#".repeat(n.attributes.level||1),yield qn,yield*F1(pr(n,t)),yield*Sl(n),yield zt;break}case"paragraph":{yield zt,yield*pr(n,t),yield*Sl(n),yield zt;break}case"inline":{yield r,yield*pr(n,t);break}case"image":{yield"!",yield"[",yield*ss(n.attributes.alt,t),yield"]",yield"(",yield*typeof n.attributes.src=="string"?Lu(n.attributes.src,/[()]/):ss(n.attributes.src,t),n.attributes.title&&(yield qn+`"${n.attributes.title}"`),yield")";break}case"link":{yield"[",yield*pr(n,t),yield"]",yield"(",yield*typeof n.attributes.href=="string"?Lu(n.attributes.href,/[()]/g):ss(n.attributes.href,t),n.attributes.title&&(yield qn+`"${n.attributes.title}"`),yield")";break}case"text":{const{content:i}=n.attributes;Tr.isAst(i)?(yield lr+qn,yield*ss(i,t),yield qn+Fi):e.parent&&e4.includes(e.parent.type)?yield*Lu(i,/[*_~]/g):yield*Lu(i,/^[*>#]/);break}case"blockquote":{const i=">"+qn;yield n.children.map(s=>ad(s,t).trimStart()).map(s=>zt+r+i+s).join(r+i);break}case"hr":{yield zt,yield r,yield"---",yield zt;break}case"fence":{yield zt,yield r;const s=(n.attributes.content.match(/`{3,}/g)||[]).map(a=>a.length).reduce(t4,0),o="`".repeat(s?s+1:3);yield o,n.attributes.language&&(yield n.attributes.language),n.annotations.length&&(yield qn),yield*Sl(n),yield zt,yield r,yield n.attributes.content.split(zt).join(zt+r),yield o,yield zt;break}case"tag":{n.inline||(yield zt,yield r);const i=lr+qn,s=[...n4(n)].filter(c=>c!==void 0),o=[i+n.tag,...s],a=o.join(qn),l=a.length+i.length*2>(e.maxTagOpeningWidth||JN);yield(!n.inline&&l?o.join(zt+qn.repeat(i.length)+r):a)+qn+(n.children.length?"":"/")+Fi,n.children.length&&(yield*pr(n,t.allowIndentation?np(t):t),n.inline||(yield r),yield lr+qn+"/"+n.tag+qn+Fi),n.inline||(yield zt);break}case"list":{const i=n.children.some(s=>s.children.some(o=>o.type==="paragraph"));for(let s=0;s<n.children.length;s++){const o=n.attributes.ordered?`${s===0?n.attributes.start??"1":"1"}${n.attributes.marker??KN}`:n.attributes.marker??X1;let a=ad(n.children[s],np(t,o.length+1));(!i||s===n.children.length-1)&&(a=a.trim()),yield zt+r+o+" "+a}yield zt;break}case"item":{for(let i=0;i<n.children.length;i++)yield*ss(n.children[i],t),i===0&&(yield*Sl(n));break}case"strong":{yield n.attributes.marker??"**",yield*Qu(pr(n,t)),yield n.attributes.marker??"**";break}case"em":{yield n.attributes.marker??"*",yield*Qu(pr(n,t)),yield n.attributes.marker??"*";break}case"code":{yield"`",yield*Qu(ss(n.attributes.content,t)),yield"`";break}case"s":{yield"~~",yield*Qu(pr(n,t)),yield"~~";break}case"hardbreak":{yield"\\"+zt,yield r;break}case"softbreak":{yield zt,yield r;break}case"table":{const i=[...pr(n,np(t))];if(e.parent&&e.parent.type==="tag"&&e.parent.tag==="table"){for(let s=0;s<i.length;s++){const o=i[s];if(typeof o=="string")o.trim().length&&(yield zt,yield o);else{s!==0&&(yield zt,yield r+"---");for(const a of o)yield zt+r+X1+" "+a}}yield zt}else{const s=[];for(const l of i)for(let c=0;c<l.length;c++)s[c]=s[c]?Math.max(s[c],l[c].length):l[c].length;const[o,...a]=i;yield zt,yield*rp(o.map((l,c)=>l+qn.repeat(s[c]-l.length))),yield zt,yield*rp(o.map((l,c)=>"-".repeat(s[c]))),yield zt;for(const l of a)yield*rp(l.map((c,u)=>c+qn.repeat(s[u]-c.length))),yield zt}break}case"thead":{const[i]=[...pr(n,t)];yield i||[];break}case"tr":{yield[...pr(n,t)];break}case"td":case"th":{yield[...pr(n,t),...Sl(n)].join("").trim();break}case"tbody":{yield*pr(n,t);break}case"comment":{yield"<!-- "+n.attributes.content+` -->
267
+ `;break}}}function*ss(n,e={}){switch(typeof n){case"undefined":break;case"boolean":case"number":case"string":{yield n.toString();break}case"object":{if(n===null)break;if(Array.isArray(n)){for(const t of n)yield*ss(t,e);break}switch(n.$$mdtype){case"Function":{yield*i4(n);break}case"Node":yield*s4(n,e);break;case"Variable":{yield*r4(n);break}default:throw new Error(`Unimplemented: "${n.$$mdtype}"`)}break}}}function ad(n,e){let t="";for(const r of ss(n,e))t+=r;return t.trimStart()}function Kc(n){return n!==!1&&n!==void 0&&n!==null}function o4(n){const e=[{condition:n.attributes.primary,children:[]}];for(const t of n.children)t.type==="tag"&&t.tag==="else"?e.push({condition:"primary"in t.attributes?t.attributes.primary:!0,children:[]}):e[e.length-1].children.push(t);return e}var a4={attributes:{primary:{type:Object,render:!1}},transform(n,e){const t=o4(n);for(const{condition:r,children:i}of t)if(Kc(r)){const s=i.flatMap(o=>o.transform(e));return s.some(Eo)?Promise.all(s).then(o=>o.flat()):s}return[]}},l4={selfClosing:!0,attributes:{primary:{type:Object,render:!1}}},c4={transform(n){return Object.values(n).every(e=>Kc(e))}},u4={transform(n){return Object.values(n).find(e=>Kc(e))!==void 0}},f4={parameters:{0:{required:!0}},transform(n){return!Kc(n[0])}},d4={transform(n){const e=Object.values(n);return e.every(t=>t===e[0])}},h4={transform(n){return JSON.stringify(n[0],null,2)}},p4={transform(n){return n[0]===void 0?n[1]:n[0]}},vA={and:c4,or:u4,not:f4,equals:d4,default:p4,debug:h4};function ip(n,e="td"){n.type="tr",n.attributes={};for(const t of n.children)t.type=e;return n}function m4(n){for(const e of n.walk()){if(e.type!=="tag"||e.tag!=="table")continue;const[t,...r]=e.children;if(!t||t.type==="table")continue;const i=new Tr.Node("table",e.attributes,[new Tr.Node("thead"),new Tr.Node("tbody")]),[s,o]=i.children;t.type==="list"&&s.push(ip(t,"th"));for(const a of r){if(a.type==="list")ip(a);else if(a.type==="tag"&&a.tag==="if"){const l=[];for(const c of a.children)c.type!=="hr"&&(c.type==="list"&&ip(c),l.push(c));a.children=l}else continue;o.push(a)}e.children=[i]}}var bA=[m4],V1={ordered_list:"list",bullet_list:"list",code_inline:"code",list_item:"item",variable:"text"};function W1(n,e){for(const t of e){n.annotations.push(t);const{name:r,value:i,type:s}=t;s==="attribute"?(n.attributes[r]!==void 0&&n.errors.push({id:"duplicate-attribute",level:"warning",message:`Attribute '${r}' already set`}),n.attributes[r]=i):s==="class"&&(n.attributes.class?n.attributes.class[r]=i:n.attributes.class={[r]:i})}}function g4(n,e){switch(e){case"heading":return{level:Number(n.tag.replace("h",""))};case"list":{const t=n.attrs?Object.fromEntries(n.attrs):void 0,r=n.type.startsWith("ordered");return r&&t?.start?{ordered:!0,start:t.start,marker:n.markup}:{ordered:r,marker:n.markup}}case"link":{const t=Object.fromEntries(n.attrs);return t.title?{href:t.href,title:t.title}:{href:t.href}}case"image":{const t=Object.fromEntries(n.attrs);return t.title?{alt:n.content,src:t.src,title:t.title}:{alt:n.content,src:t.src}}case"em":case"strong":return{marker:n.markup};case"text":case"code":case"comment":return{content:(n.meta||{}).variable||n.content};case"fence":{const[t]=n.info.split(" ",1);return t===""||t===lr?{content:n.content}:{content:n.content,language:t}}case"td":case"th":{if(n.attrs){const t=Object.fromEntries(n.attrs);let r;if(t.style&&(t.style.includes("left")?r="left":t.style.includes("center")?r="center":t.style.includes("right")&&(r="right")),r)return{align:r}}return{}}default:return{}}}function yA(n,e,t,r,i,s){if(n.type==="frontmatter"){e[0].attributes.frontmatter=n.content;return}if(n.hidden||n.type==="text"&&n.content==="")return;const o=n.errors||[],a=e[e.length-1],{tag:l,attributes:c,error:u}=n.meta||{};if(n.type==="annotation")return s?W1(s,c):a.errors.push({id:"no-inline-annotations",level:"error",message:`Can't apply inline annotations to '${a.type}'`});let f=n.type.replace(/_(open|close)$/,"");if(V1[f]&&(f=V1[f]),f==="error"){const{message:O,location:v}=u;o.push({id:"parse-error",level:"critical",message:O,location:v})}if(n.nesting<0){if(a.type===f&&a.tag===l)return a.lines&&n.map&&a.lines.push(...n.map),e.pop();o.push({id:"missing-opening",level:"critical",message:`Node '${f}' is missing opening`})}const d=g4(n,f),h=new nh(f,d,void 0,l||void 0),{position:m={}}=n;if(h.errors=o,i!==!1&&(h.lines=n.map||a.lines||[],h.location={file:t,start:{line:h.lines[0],character:m.start},end:{line:h.lines[1],character:m.end}}),s&&(h.inline=!0),c&&["tag","fence","image"].includes(f)&&W1(h,c),r&&l==="slot"&&typeof h.attributes.primary=="string"?a.slots[h.attributes.primary]=h:a.push(h),n.nesting>0&&e.push(h),!Array.isArray(n.children))return;if(h.type==="inline"&&(s=a),e.push(h),!(f==="image"))for(const O of n.children)yA(O,e,t,r,i,s);e.pop()}function O4(n,e){const t=new nh("document"),r=[t];typeof e=="string"&&(e={file:e});for(const i of n)yA(i,r,e?.file,e?.slots,e?.location);if(r.length>1)for(const i of r.slice(1))i.errors.push({id:"missing-closing",level:"critical",message:`Node '${i.tag||i.type}' is missing closing`});for(const i of bA)i(t);return t}var bv={};oA(bv,{blockquote:()=>k4,code:()=>I4,comment:()=>z4,document:()=>v4,em:()=>M4,error:()=>Z4,fence:()=>_4,hardbreak:()=>B4,heading:()=>b4,hr:()=>A4,image:()=>w4,inline:()=>q4,item:()=>x4,link:()=>R4,list:()=>S4,node:()=>X4,paragraph:()=>y4,s:()=>D4,softbreak:()=>j4,strong:()=>L4,table:()=>C4,tbody:()=>$4,td:()=>T4,text:()=>N4,th:()=>P4,thead:()=>Q4,tr:()=>E4});var v4={render:"article",children:["heading","paragraph","image","table","tag","fence","blockquote","comment","list","hr"],attributes:{frontmatter:{render:!1}}},b4={children:["inline"],attributes:{level:{type:Number,render:!1,required:!0}},transform(n,e){return new ki(`h${n.attributes.level}`,n.transformAttributes(e),n.transformChildren(e))}},y4={render:"p",children:["inline"]},w4={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String}}},_4={render:"pre",attributes:{content:{type:String,render:!1,required:!0},language:{type:String,render:"data-language"},process:{type:Boolean,render:!1,default:!0}},transform(n,e){const t=n.transformAttributes(e),r=n.children.length?n.transformChildren(e):[n.attributes.content];return new ki("pre",t,r)}},k4={render:"blockquote",children:["heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},x4={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},S4={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(n,e){return new ki(n.attributes.ordered?"ol":"ul",n.transformAttributes(e),n.transformChildren(e))}},A4={render:"hr"},C4={render:"table"},T4={render:"td",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"],attributes:{align:{type:String},colspan:{type:Number,render:"colSpan"},rowspan:{type:Number,render:"rowSpan"}}},P4={render:"th",attributes:{width:{type:String},align:{type:String},colspan:{type:Number,render:"colSpan"},rowspan:{type:Number,render:"rowSpan"}}},E4={render:"tr",children:["th","td"]},$4={render:"tbody",children:["tr","tag"]},Q4={render:"thead",children:["tr"]},L4={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},M4={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},D4={render:"s",children:["strong","em","link","code","text","tag"]},q4={children:["strong","em","s","code","text","tag","link","image","hardbreak","softbreak","comment"]},R4={render:"a",children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}}},I4={render:"code",attributes:{content:{type:String,render:!1,required:!0}},transform(n,e){const t=n.transformAttributes(e);return new ki("code",t,[n.attributes.content])}},N4={attributes:{content:{type:String,required:!0}},transform(n){return n.attributes.content}},B4={render:"br"},j4={transform(){return" "}},z4={attributes:{content:{type:String,required:!0}}},Z4={},X4={},F4=Kd(ZN()),{escapeHtml:Y1}=(0,F4.default)().utils,V4=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function df(n){if(typeof n=="string"||typeof n=="number")return Y1(String(n));if(Array.isArray(n))return n.map(df).join("");if(n===null||typeof n!="object"||!ki.isTag(n))return"";const{name:e,attributes:t,children:r=[]}=n;if(!e)return df(r);let i=`<${e}`;for(const[s,o]of Object.entries(t??{}))i+=` ${s.toLowerCase()}="${Y1(String(o))}"`;return i+=">",V4.has(e)||(r.length&&(i+=df(r)),i+=`</${e}>`),i}function W4(n,e){return typeof n!="string"||n[0]!==n[0].toUpperCase()?n:e instanceof Function?e(n):e[n]}function Y4(n,e,{components:t={}}={}){function r(s){if(s==null||typeof s!="object")return s;if(Array.isArray(s))return s.map(a=>r(a));if(s.$$mdtype==="Tag")return i(s);if(typeof s!="object")return s;const o={};for(const[a,l]of Object.entries(s))o[a]=r(l);return o}function i(s){if(Array.isArray(s))return e.createElement(e.Fragment,null,...s.map(i));if(s===null||typeof s!="object"||!ki.isTag(s))return s;const{name:o,attributes:{class:a,...l}={},children:c=[]}=s;return a&&(l.className=a),e.createElement(W4(o,t),Object.keys(l).length==0?null:r(l),...c.map(i))}return i(n)}function U4(n,e){return typeof n!="string"?"Fragment":n[0]!==n[0].toUpperCase()?n:e instanceof Function?e(n):e[n]}function U1(n){return n.map(yv).join(", ")}function Jm(n){return n==null||typeof n!="object"?JSON.stringify(n):Array.isArray(n)?`[${n.map(t=>Jm(t)).join(", ")}]`:n.$$mdtype==="Tag"?yv(n):typeof n!="object"?JSON.stringify(n):`{${Object.entries(n).map(([t,r])=>[JSON.stringify(t),Jm(r)].join(": ")).join(", ")}}`}function yv(n){if(Array.isArray(n))return`React.createElement(React.Fragment, null, ${U1(n)})`;if(n===null||typeof n!="object"||!ki.isTag(n))return JSON.stringify(n);const{name:e,attributes:{class:t,...r}={},children:i=[]}=n;return t&&(r.className=t),`React.createElement(
268
+ tagName(${JSON.stringify(e)}, components),
269
+ ${Object.keys(r).length==0?"null":Jm(r)},
270
+ ${U1(i)})`}function G4(n){return`
271
+ (({components = {}} = {}) => {
272
+ ${U4}
273
+ return ${yv(n)};
274
+ })
275
+ `}var H4={html:df,react:Y4,reactStatic:G4},K4=class{validate(n,e){const{partials:t={}}=e;return t[n]?[]:[{id:"attribute-value-invalid",level:"error",message:`Partial \`${n}\` not found. The 'file' attribute must be set in \`config.partials\``}]}},J4={inline:!1,selfClosing:!0,attributes:{file:{type:K4,render:!1,required:!0},variables:{type:Object,render:!1}},transform(n,e){const{partials:t={}}=e,{file:r,variables:i}=n.attributes,s=t[r];if(!s)return null;const o={...e,variables:{...e.variables,...i,"$$partial:filename":r}},a=l=>l.resolve(o).transformChildren(o);return Array.isArray(s)?s.flatMap(a):a(s)}},eB={children:["table"],inline:!1},tB={attributes:{primary:{type:String,required:!0}}},wA={else:l4,if:a4,partial:J4,slot:tB,table:eB},nB=Kd(pA()),ld=Kd(aA());function _A(n,e,t){try{const{type:r,meta:i,nesting:s=0}=(0,ld.parse)(e,{Variable:Jd,Function:eh}),o=n.push(r,"",s);return o.info=e,o.meta=i,n.delimiters||(n.delimiters=[]),o}catch(r){if(!(r instanceof ld.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a=t?{start:{offset:s.offset+t},end:{offset:o.offset+t}}:null,l=n.push("error","",0);return l.meta={error:{message:i,location:a}},l}}function rB(n,e,t,r){const i=n.bMarks[e]+n.tShift[e],s=n.eMarks[e];if(!n.src.startsWith(lr,i))return!1;const o=th(n.src,i),a=n.src.slice(0,s).trim().length;if(!o||o<a-Fi.length)return!1;const l=i+lr.length,c=n.src.slice(l,o).trim(),u=n.src.slice(i,o+Fi.length).split(`
276
+ `).length;if(c[0]==="$")return!1;if(r)return!0;const f=_A(n,c,l);return f.map=[e,e+u],n.line+=u,!0}function iB(n,e){if(!n.src.startsWith(lr,n.pos))return!1;const t=th(n.src,n.pos);if(!t)return!1;const r=n.src.slice(n.pos+lr.length,t);return e||_A(n,r.trim()),n.pos=t+Fi.length,!0}function sB(n){let e;for(e of n.tokens)if(e.type==="fence"){if(e.info.includes(lr)){const t=e.info.indexOf(lr),r=th(e.info,t),i=e.info.slice(t+lr.length,r);try{const{meta:s}=(0,ld.parse)(i.trim(),{Variable:Jd,Function:eh});e.meta=s}catch(s){if(!(s instanceof ld.SyntaxError))throw s;e.errors||(e.errors=[]),e.errors.push({id:"fence-tag-error",level:"error",message:`Syntax error in fence tag: ${s.message}`})}}e?.meta?.attributes?.find(t=>t.name==="process"&&!t.value)||(e.children=gA(e.content,e.map[0]))}}function oB(n){n.block.ruler.before("paragraph","annotations",rB,{alt:["paragraph","blockquote"]}),n.inline.ruler.push("containers",iB),n.core.ruler.push("annotations",sB)}var kA="---";function xA(n,e){return n.src.slice(n.bMarks[e],n.eMarks[e]).trim()}function aB(n,e){for(let t=1;t<e;t++)if(xA(n,t)===kA)return t}function lB(n,e,t,r){if(e!=0||xA(n,0)!=kA)return!1;const i=aB(n,t);if(!i)return!1;if(r)return!0;const s=n.push("frontmatter","",0);return s.content=n.src.slice(n.eMarks[0],n.bMarks[i]).trim(),s.map=[0,i],s.hidden=!0,n.line=i+1,!0}function cB(n){n.block.ruler.before("hr","frontmatter",lB)}var cd="<!--",eg="-->";function uB(n,e,t,r){const i=n.bMarks[e]+n.tShift[e];if(!n.src.startsWith(cd,i))return!1;const s=n.src.indexOf(eg,i);if(!s)return!1;if(r)return!0;const o=n.src.slice(i+cd.length,s),a=o.split(`
277
+ `).length,l=n.push("comment","",0);return l.content=o.trim(),l.map=[e,e+a],n.line+=a,!0}function fB(n,e){if(!n.src.startsWith(cd,n.pos))return!1;const t=n.src.indexOf(eg,n.pos);if(!t)return!1;if(e)return!0;const r=n.src.slice(n.pos+cd.length,t),i=n.push("comment","",0);return i.content=r.trim(),n.pos=t+eg.length,!0}function dB(n){n.block.ruler.before("table","comment",uB,{alt:["paragraph"]}),n.inline.ruler.push("comment",fB)}var SA=class{constructor(n={}){this.parser=new nB.default(n),this.parser.use(oB,"annotations",{}),this.parser.use(cB,"frontmatter",{}),this.parser.disable(["lheading","code"]),n.allowComments&&this.parser.use(dB,"comments",{})}tokenize(n){return this.parser.parse(n.toString(),{})}},hB={String,Number,Array,Object,Boolean};function wv(n,e,t,r){if(!n)return!0;if(Tr.isFunction(e)&&t.validation?.validateFunctions){const i=t.functions?.[e.name];return i?.returns?Array.isArray(i.returns)?i.returns.find(s=>s===n)!==void 0:i.returns===n:!0}if(Tr.isAst(e))return!0;if(Array.isArray(n))return n.some(i=>wv(i,e,t,r));if(typeof n=="string"&&(n=hB[n]),typeof n=="function"){const i=new n;if(i.validate)return i.validate(e,t,r)}return e!=null&&e.constructor===n}function _v(n){return typeof n=="string"?n:Array.isArray(n)?n.map(_v).join(" | "):n.name}function pB(n,e){const t=e.functions?.[n.name],r=[];if(!t)return[{id:"function-undefined",level:"critical",message:`Undefined function: '${n.name}'`}];if(t.validate&&r.push(...t.validate(n,e)),t.parameters)for(const[i,s]of Object.entries(n.parameters)){const o=t.parameters?.[i];if(!o){r.push({id:"parameter-undefined",level:"error",message:`Invalid parameter: '${i}'`});continue}if(!(Tr.isAst(s)&&!Tr.isFunction(s))&&o.type){const a=wv(o.type,s,e,i);a===!1?r.push({id:"parameter-type-invalid",level:"error",message:`Parameter '${i}' of '${n.name}' must be type of '${_v(o.type)}'`}):Array.isArray(a)&&r.push(...a)}}for(const[i,{required:s}]of Object.entries(t.parameters??{}))s&&n.parameters[i]===void 0&&r.push({id:"parameter-missing-required",level:"error",message:`Missing required parameter: '${i}'`});return r}function mB(n,e){return n.length<=e?JSON.stringify(n):`[${n.slice(0,e).map(r=>JSON.stringify(r)).join(",")}, ... ${n.length-e} more]`}function AA(n,e){const t=n.findSchema(e),r=[...n.errors||[]];if(!t)return r.push({id:n.tag?"tag-undefined":"node-undefined",level:"critical",message:n.tag?`Undefined tag: '${n.tag}'`:`Undefined node: '${n.type}'`}),r;t.inline!=null&&n.inline!==t.inline&&r.push({id:"tag-placement-invalid",level:"critical",message:`'${n.tag}' tag should be ${t.inline?"inline":"block"}`}),t.selfClosing&&n.children.length>0&&r.push({id:"tag-selfclosing-has-children",level:"critical",message:`'${n.tag}' tag should be self-closing`});const i={...vv,...t.attributes};for(const s of Object.keys(n.slots))t.slots?.[s]||r.push({id:"slot-undefined",level:"error",message:`Invalid slot: '${s}'`});for(let[s,o]of Object.entries(n.attributes)){const a=i[s];if(!a){r.push({id:"attribute-undefined",level:"error",message:`Invalid attribute: '${s}'`});continue}let{type:l,matches:c,errorLevel:u}=a;if(Tr.isAst(o))if(Tr.isFunction(o)&&e.validation?.validateFunctions)r.push(...pB(o,e));else if(Tr.isVariable(o)&&e.variables){let f=!1,d=e.variables;for(const h of o.path){if(!Object.prototype.hasOwnProperty.call(d,h)){f=!0;break}d=d[h]}f&&r.push({id:"variable-undefined",level:"error",message:`Undefined variable: '${o.path.join(".")}'`})}else continue;if(o=o,l){const f=wv(l,o,e,s);f===!1&&r.push({id:"attribute-type-invalid",level:u||"error",message:`Attribute '${s}' must be type of '${_v(l)}'`}),Array.isArray(f)&&r.push(...f)}if(typeof c=="function"&&(c=c(e)),Array.isArray(c)&&!c.includes(o)&&r.push({id:"attribute-value-invalid",level:u||"error",message:`Attribute '${s}' must match one of ${mB(c,8)}. Got '${o}' instead.`}),c instanceof RegExp&&!c.test(o)&&r.push({id:"attribute-value-invalid",level:u||"error",message:`Attribute '${s}' must match ${c}. Got '${o}' instead.`}),typeof a.validate=="function"){const f=a.validate(o,e,s);Array.isArray(f)&&r.push(...f)}}for(const[s,{required:o}]of Object.entries(i))o&&n.attributes[s]===void 0&&r.push({id:"attribute-missing-required",level:"error",message:`Missing required attribute: '${s}'`});if(t.slots)for(const[s,{required:o}]of Object.entries(t.slots))o&&n.slots[s]===void 0&&r.push({id:"slot-missing-required",level:"error",message:`Missing required slot: '${s}'`});for(const{type:s}of n.children)t.children&&s!=="error"&&!t.children.includes(s)&&r.push({id:"child-invalid",level:"warning",message:`Can't nest '${s}' in '${n.tag||n.type}'`});if(t.validate){const s=t.validate(n,e);if(Eo(s))return s.then(o=>r.concat(o));r.push(...s)}return r}function*CA(n,e=[]){yield[n,e];for(const t of[...Object.values(n.slots),...n.children])yield*CA(t,[...e,n])}function gB(n,e){const t=[...CA(n)].map(([r,i])=>{const{type:s,lines:o,location:a}=r,l={...e,validation:{...e.validation,parents:i}},c=AA(r,l);return Eo(c)?c.then(u=>u.map(f=>({type:s,lines:o,location:a,error:f}))):c.map(u=>({type:s,lines:o,location:a,error:u}))});return t.some(Eo)?Promise.all(t).then(r=>r.flat()):t.flat()}var OB=new SA;function TA(n={}){return{...n,tags:{...wA,...n.tags},nodes:{...bv,...n.nodes},functions:{...vA,...n.functions}}}function PA(n,e){return typeof n=="string"&&(n=OB.tokenize(n)),O4(n,e)}function EA(n,e){return Array.isArray(n)?n.flatMap(t=>t.resolve(e)):n.resolve(e)}function $A(n,e){const t=TA(e),r=EA(n,t);return Array.isArray(r)?r.flatMap(i=>i.transform(t)):r.transform(t)}function QA(n,e){const t=TA(e);return gB(n,t)}function vB(n,e={},...t){return{name:n,attributes:e,children:t}}var B=class{constructor(n){this.parse=PA,this.resolve=e=>EA(e,this.config),this.transform=e=>$A(e,this.config),this.validate=e=>QA(e,this.config),this.config=n}};B.nodes=bv;B.tags=wA;B.functions=vA;B.globalAttributes=vv;B.renderers=H4;B.transforms=bA;B.Ast=Tr;B.Tag=ki;B.Tokenizer=SA;B.parseTags=gA;B.transformer=Bl;B.validator=AA;B.parse=PA;B.transform=$A;B.validate=QA;B.createElement=vB;B.truthy=Kc;B.format=ad;function bB(n){if(!n)return"";const t=B.parse(n);if(!t.children?.length)return ud(n);const r=t.children[0];return r?.children?.length?ua(r.children):ud(n)}function ua(n){return n.map(yB).join("")}function yB(n){switch(n.type){case"text":return ud(n.attributes.content??"");case"strong":return`<strong>${ua(n.children)}</strong>`;case"em":return`<em>${ua(n.children)}</em>`;case"s":return`<s>${ua(n.children)}</s>`;case"code":return`<code>${ud(n.attributes.content??"")}</code>`;case"link":{const e=n.attributes.href??"",t=n.attributes.title,r=t?` title="${G1(t)}"`:"";return`<a href="${G1(e)}"${r}>${ua(n.children)}</a>`}case"hardbreak":return" ";case"softbreak":return" ";default:return n.children?.length?ua(n.children):""}}function wB(n){return ho(n.childNodes)}function ho(n){const e=[];for(const t of n)e.push(xB(t));return e.join("")}const _B=3,kB=1;function xB(n){if(n.nodeType===_B)return SB(n.textContent??"");if(n.nodeType!==kB)return"";const e=n;switch(e.tagName){case"STRONG":case"B":return`**${ho(e.childNodes)}**`;case"EM":case"I":return`*${ho(e.childNodes)}*`;case"S":case"STRIKE":case"DEL":return`~~${ho(e.childNodes)}~~`;case"CODE":return`\`${e.textContent??""}\``;case"A":{const r=e.getAttribute("href")??"";return`[${ho(e.childNodes)}](${r})`}case"BR":return" ";case"DIV":case"P":case"SPAN":return ho(e.childNodes);default:return ho(e.childNodes)}}function vi(n){return n.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/`([^`]+)`/g,"$1")}function ud(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function G1(n){return n.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function SB(n){return n.replace(/([\\*_`~\[\]])/g,"\\$1")}function H1(n){for(const e of Array.from(n.querySelectorAll("b"))){const t=document.createElement("strong");t.innerHTML=e.innerHTML,e.replaceWith(t)}for(const e of Array.from(n.querySelectorAll("i"))){const t=document.createElement("em");t.innerHTML=e.innerHTML,e.replaceWith(t)}for(const e of Array.from(n.querySelectorAll("span[style]"))){const t=e.style,r=e.parentNode;if(r)if(t.fontWeight==="bold"||parseInt(t.fontWeight)>=700){const i=document.createElement("strong");i.innerHTML=e.innerHTML,e.replaceWith(i)}else if(t.fontStyle==="italic"){const i=document.createElement("em");i.innerHTML=e.innerHTML,e.replaceWith(i)}else{for(;e.firstChild;)r.insertBefore(e.firstChild,e);e.remove()}}for(const e of Array.from(n.querySelectorAll("div, p"))){const t=e.parentNode;if(!(!t||e===n)){for(e.previousSibling&&t.insertBefore(document.createTextNode(" "),e);e.firstChild;)t.insertBefore(e.firstChild,e);e.remove()}}}function AB(n){const e=n.trim(),t=e.match(/^(#{1,6}\s+)(.*)/);if(t)return{text:t[2],prefix:t[1]};const r=e.match(/^(>\s*)(.*)/);return r?{text:r[2],prefix:r[1]}:{text:e,prefix:""}}function Vi(n){return n.replace(/\s+/g," ").trim().toLowerCase()}function LA(n,e,t){const r=fv(n),i=Vi(t);for(const s of r){const{text:o,prefix:a}=AB(s.source),l=vi(o);if(Vi(l)===i)return{dataName:e,text:l,source:s.source,sourcePrefix:a,inlineSource:o};if(s.type==="paragraph"){const c=s.source.split(`
278
+ `).map(f=>f.trim()).join(" "),u=vi(c);if(Vi(u)===i)return{dataName:e,text:u,source:s.source,sourcePrefix:"",inlineSource:c}}}for(const s of r){if(s.type!=="list")continue;const o=TB(s.source,e,i);if(o)return o}for(const s of r)if(s.children){const o=LA(s.innerContent??"",e,t);if(o)return o}return null}function CB(n){const e=n.split(`
279
+ `),t=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(t.push(r.join(`
280
+ `)),r=[i]):r.push(i);return r.length>0&&t.push(r.join(`
281
+ `)),t}function TB(n,e,t){const r=CB(n);for(const i of r){const s=i.split(`
282
+ `),o=s[0],a=o.match(/^([-*+]\s+|(\d+)\.\s+)(.*)/);if(a){const[,c,,u]=a,f=vi(u);if(Vi(f)===t)return{dataName:e,text:f,source:o,sourcePrefix:c,inlineSource:u}}const l=o.match(/^([-*+]\s+.*?)\*\*(.+?)\*\*(.*)/);if(l){const[,c,u]=l;if(Vi(u)===t)return{dataName:e,text:u,source:o,sourcePrefix:c,inlineSource:`**${u}**${l[3]}`}}if(s.length>1){const c=s.slice(1).map(d=>d.replace(/^\s+/,"")).filter(Boolean),u=c.join(" "),f=vi(u);if(c.length>0&&Vi(f)===t){const d=s.slice(1).join(`
283
+ `),h=s.slice(1).find(b=>b.trim().length>0),m=h?.match(/^(\s+)/),p=m?m[1]:"",O=h?d.indexOf(h):0,v=d.slice(0,O)+p;return{dataName:e,text:f,source:d,sourcePrefix:v,inlineSource:u}}}}return null}function PB(n,e,t){const r=e.sourcePrefix+t,i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function EB(n,e,t){const r=Vi(e),i=n.split(`
284
+ `);for(const s of i){const o=s.match(/^(\s*[-*+]\s+)\[([^\]]*)\]\(([^)]*)\)\s*$/);if(!o)continue;const[,a,l,c]=o;if(Vi(l)===r||c===t)return{source:s,listPrefix:a,text:l,href:c}}return null}function $B(n,e,t,r){const i=`${e.listPrefix}[${t}](${r})`,s=n.indexOf(e.source);return s===-1?n:n.slice(0,s)+i+n.slice(s+e.source.length)}function QB(n,e){const t=Vi(e),r=/^((`{3,})(\w*)[^\n]*\n)([\s\S]*?)\n\2\s*$/gm;let i;for(;(i=r.exec(n))!==null;){const[s,o,a,l,c]=i;if(Vi(c)===t)return{source:s,code:c,language:l||"",opener:o.trimEnd(),delimiter:a}}return null}function LB(n,e,t){const r=e.opener+`
285
+ `+t+`
286
+ `+e.delimiter,i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function MB(n,e,t){const i=e.opener.slice(e.delimiter.length).replace(/^\w*/,"").trim(),o=e.delimiter+t+(i?" "+i:"")+`
287
+ `+e.code+`
288
+ `+e.delimiter,a=n.indexOf(e.source);return a===-1?n:n.slice(0,a)+o+n.slice(a+e.source.length)}function DB(n,e){const t=n.split(`
289
+ `);for(const r of t){const i=r.trim().match(/^!\[([^\]]*)\]\(([^)]*)\)\s*$/);if(!i)continue;const[,s,o]=i;if(o===e)return{source:r.trim(),alt:s,src:o}}return null}function qB(n,e,t,r){const i=`![${t}](${r})`,s=n.indexOf(e.source);return s===-1?n:n.slice(0,s)+i+n.slice(s+e.source.length)}function RB(n,e){const t=/\{%\s*icon\s+[^%]*name=["']([^"']+)["'][^%]*\/%\}/g;let r;for(;(r=t.exec(n))!==null;){const[i,s]=r;if(s===e)return{source:i,name:s}}return null}function IB(n,e,t){const r=e.source.replace(/name=["'][^"']+["']/,`name="${t}"`),i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function NB(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var sp,K1;function BB(){if(K1)return sp;K1=1;function n(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,s){for(var o="",a=0,l=-1,c=0,u,f=0;f<=i.length;++f){if(f<i.length)u=i.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(l===f-1||c===1))if(l!==f-1&&c===2){if(o.length<2||a!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var d=o.lastIndexOf("/");if(d!==o.length-1){d===-1?(o="",a=0):(o=o.slice(0,d),a=o.length-1-o.lastIndexOf("/")),l=f,c=0;continue}}else if(o.length===2||o.length===1){o="",a=0,l=f,c=0;continue}}s&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+i.slice(l+1,f):o=i.slice(l+1,f),a=f-l-1;l=f,c=0}else u===46&&c!==-1?++c:c=-1}return o}function t(i,s){var o=s.dir||s.root,a=s.base||(s.name||"")+(s.ext||"");return o?o===s.root?o+a:o+i+a:a}var r={resolve:function(){for(var s="",o=!1,a,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=process.cwd()),c=a),n(c),c.length!==0&&(s=c+"/"+s,o=c.charCodeAt(0)===47)}return s=e(s,!o),o?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(n(s),s.length===0)return".";var o=s.charCodeAt(0)===47,a=s.charCodeAt(s.length-1)===47;return s=e(s,!o),s.length===0&&!o&&(s="."),s.length>0&&a&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return n(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var a=arguments[o];n(a),a.length>0&&(s===void 0?s=a:s+="/"+a)}return s===void 0?".":r.normalize(s)},relative:function(s,o){if(n(s),n(o),s===o||(s=r.resolve(s),o=r.resolve(o),s===o))return"";for(var a=1;a<s.length&&s.charCodeAt(a)===47;++a);for(var l=s.length,c=l-a,u=1;u<o.length&&o.charCodeAt(u)===47;++u);for(var f=o.length,d=f-u,h=c<d?c:d,m=-1,p=0;p<=h;++p){if(p===h){if(d>h){if(o.charCodeAt(u+p)===47)return o.slice(u+p+1);if(p===0)return o.slice(u+p)}else c>h&&(s.charCodeAt(a+p)===47?m=p:p===0&&(m=0));break}var O=s.charCodeAt(a+p),v=o.charCodeAt(u+p);if(O!==v)break;O===47&&(m=p)}var b="";for(p=a+m+1;p<=l;++p)(p===l||s.charCodeAt(p)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+o.slice(u+m):(u+=m,o.charCodeAt(u)===47&&++u,o.slice(u))},_makeLong:function(s){return s},dirname:function(s){if(n(s),s.length===0)return".";for(var o=s.charCodeAt(0),a=o===47,l=-1,c=!0,u=s.length-1;u>=1;--u)if(o=s.charCodeAt(u),o===47){if(!c){l=u;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":s.slice(0,l)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');n(s);var a=0,l=-1,c=!0,u;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var f=o.length-1,d=-1;for(u=s.length-1;u>=0;--u){var h=s.charCodeAt(u);if(h===47){if(!c){a=u+1;break}}else d===-1&&(c=!1,d=u+1),f>=0&&(h===o.charCodeAt(f)?--f===-1&&(l=u):(f=-1,l=d))}return a===l?l=d:l===-1&&(l=s.length),s.slice(a,l)}else{for(u=s.length-1;u>=0;--u)if(s.charCodeAt(u)===47){if(!c){a=u+1;break}}else l===-1&&(c=!1,l=u+1);return l===-1?"":s.slice(a,l)}},extname:function(s){n(s);for(var o=-1,a=0,l=-1,c=!0,u=0,f=s.length-1;f>=0;--f){var d=s.charCodeAt(f);if(d===47){if(!c){a=f+1;break}continue}l===-1&&(c=!1,l=f+1),d===46?o===-1?o=f:u!==1&&(u=1):o!==-1&&(u=-1)}return o===-1||l===-1||u===0||u===1&&o===l-1&&o===a+1?"":s.slice(o,l)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return t("/",s)},parse:function(s){n(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var a=s.charCodeAt(0),l=a===47,c;l?(o.root="/",c=1):c=0;for(var u=-1,f=0,d=-1,h=!0,m=s.length-1,p=0;m>=c;--m){if(a=s.charCodeAt(m),a===47){if(!h){f=m+1;break}continue}d===-1&&(h=!1,d=m+1),a===46?u===-1?u=m:p!==1&&(p=1):u!==-1&&(p=-1)}return u===-1||d===-1||p===0||p===1&&u===d-1&&u===f+1?d!==-1&&(f===0&&l?o.base=o.name=s.slice(1,d):o.base=o.name=s.slice(f,d)):(f===0&&l?(o.name=s.slice(1,u),o.base=s.slice(1,d)):(o.name=s.slice(f,u),o.base=s.slice(f,d)),o.ext=s.slice(u,d)),f>0?o.dir=s.slice(0,f-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,sp=r,sp}var jB=BB();const zB=NB(jB);var op={},ap={},J1;function kv(){return J1||(J1=1,(function(n){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+e+"]["+t+"]*",i=new RegExp("^"+r+"$"),s=function(a,l){const c=[];let u=l.exec(a);for(;u;){const f=[];f.startIndex=l.lastIndex-u[0].length;const d=u.length;for(let h=0;h<d;h++)f.push(u[h]);c.push(f),u=l.exec(a)}return c},o=function(a){const l=i.exec(a);return!(l===null||typeof l>"u")};n.isExist=function(a){return typeof a<"u"},n.isEmptyObject=function(a){return Object.keys(a).length===0},n.merge=function(a,l,c){if(l){const u=Object.keys(l),f=u.length;for(let d=0;d<f;d++)c==="strict"?a[u[d]]=[l[u[d]]]:a[u[d]]=l[u[d]]}},n.getValue=function(a){return n.isExist(a)?a:""},n.isName=o,n.getAllMatches=s,n.nameRegexp=r})(ap)),ap}var e0;function MA(){if(e0)return op;e0=1;const n=kv(),e={allowBooleanAttributes:!1,unpairedTags:[]};op.validate=function(v,b){b=Object.assign({},e,b);const _=[];let C=!1,y=!1;v[0]==="\uFEFF"&&(v=v.substr(1));for(let w=0;w<v.length;w++)if(v[w]==="<"&&v[w+1]==="?"){if(w+=2,w=r(v,w),w.err)return w}else if(v[w]==="<"){let S=w;if(w++,v[w]==="!"){w=i(v,w);continue}else{let A=!1;v[w]==="/"&&(A=!0,w++);let x="";for(;w<v.length&&v[w]!==">"&&v[w]!==" "&&v[w]!==" "&&v[w]!==`
290
+ `&&v[w]!=="\r";w++)x+=v[w];if(x=x.trim(),x[x.length-1]==="/"&&(x=x.substring(0,x.length-1),w--),!m(x)){let T;return x.trim().length===0?T="Invalid space after '<'.":T="Tag '"+x+"' is an invalid name.",d("InvalidTag",T,p(v,w))}const k=a(v,w);if(k===!1)return d("InvalidAttr","Attributes for '"+x+"' have open quote.",p(v,w));let E=k.value;if(w=k.index,E[E.length-1]==="/"){const T=w-E.length;E=E.substring(0,E.length-1);const $=c(E,b);if($===!0)C=!0;else return d($.err.code,$.err.msg,p(v,T+$.err.line))}else if(A)if(k.tagClosed){if(E.trim().length>0)return d("InvalidTag","Closing tag '"+x+"' can't have attributes or invalid starting.",p(v,S));if(_.length===0)return d("InvalidTag","Closing tag '"+x+"' has not been opened.",p(v,S));{const T=_.pop();if(x!==T.tagName){let $=p(v,T.tagStartPos);return d("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+$.line+", col "+$.col+") instead of closing tag '"+x+"'.",p(v,S))}_.length==0&&(y=!0)}}else return d("InvalidTag","Closing tag '"+x+"' doesn't have proper closing.",p(v,w));else{const T=c(E,b);if(T!==!0)return d(T.err.code,T.err.msg,p(v,w-E.length+T.err.line));if(y===!0)return d("InvalidXml","Multiple possible root nodes found.",p(v,w));b.unpairedTags.indexOf(x)!==-1||_.push({tagName:x,tagStartPos:S}),C=!0}for(w++;w<v.length;w++)if(v[w]==="<")if(v[w+1]==="!"){w++,w=i(v,w);continue}else if(v[w+1]==="?"){if(w=r(v,++w),w.err)return w}else break;else if(v[w]==="&"){const T=f(v,w);if(T==-1)return d("InvalidChar","char '&' is not expected.",p(v,w));w=T}else if(y===!0&&!t(v[w]))return d("InvalidXml","Extra text at the end",p(v,w));v[w]==="<"&&w--}}else{if(t(v[w]))continue;return d("InvalidChar","char '"+v[w]+"' is not expected.",p(v,w))}if(C){if(_.length==1)return d("InvalidTag","Unclosed tag '"+_[0].tagName+"'.",p(v,_[0].tagStartPos));if(_.length>0)return d("InvalidXml","Invalid '"+JSON.stringify(_.map(w=>w.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return d("InvalidXml","Start tag expected.",1);return!0};function t(v){return v===" "||v===" "||v===`
291
+ `||v==="\r"}function r(v,b){const _=b;for(;b<v.length;b++)if(v[b]=="?"||v[b]==" "){const C=v.substr(_,b-_);if(b>5&&C==="xml")return d("InvalidXml","XML declaration allowed only at the start of the document.",p(v,b));if(v[b]=="?"&&v[b+1]==">"){b++;break}else continue}return b}function i(v,b){if(v.length>b+5&&v[b+1]==="-"&&v[b+2]==="-"){for(b+=3;b<v.length;b++)if(v[b]==="-"&&v[b+1]==="-"&&v[b+2]===">"){b+=2;break}}else if(v.length>b+8&&v[b+1]==="D"&&v[b+2]==="O"&&v[b+3]==="C"&&v[b+4]==="T"&&v[b+5]==="Y"&&v[b+6]==="P"&&v[b+7]==="E"){let _=1;for(b+=8;b<v.length;b++)if(v[b]==="<")_++;else if(v[b]===">"&&(_--,_===0))break}else if(v.length>b+9&&v[b+1]==="["&&v[b+2]==="C"&&v[b+3]==="D"&&v[b+4]==="A"&&v[b+5]==="T"&&v[b+6]==="A"&&v[b+7]==="["){for(b+=8;b<v.length;b++)if(v[b]==="]"&&v[b+1]==="]"&&v[b+2]===">"){b+=2;break}}return b}const s='"',o="'";function a(v,b){let _="",C="",y=!1;for(;b<v.length;b++){if(v[b]===s||v[b]===o)C===""?C=v[b]:C!==v[b]||(C="");else if(v[b]===">"&&C===""){y=!0;break}_+=v[b]}return C!==""?!1:{value:_,index:b,tagClosed:y}}const l=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(v,b){const _=n.getAllMatches(v,l),C={};for(let y=0;y<_.length;y++){if(_[y][1].length===0)return d("InvalidAttr","Attribute '"+_[y][2]+"' has no space in starting.",O(_[y]));if(_[y][3]!==void 0&&_[y][4]===void 0)return d("InvalidAttr","Attribute '"+_[y][2]+"' is without value.",O(_[y]));if(_[y][3]===void 0&&!b.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+_[y][2]+"' is not allowed.",O(_[y]));const w=_[y][2];if(!h(w))return d("InvalidAttr","Attribute '"+w+"' is an invalid name.",O(_[y]));if(!C.hasOwnProperty(w))C[w]=1;else return d("InvalidAttr","Attribute '"+w+"' is repeated.",O(_[y]))}return!0}function u(v,b){let _=/\d/;for(v[b]==="x"&&(b++,_=/[\da-fA-F]/);b<v.length;b++){if(v[b]===";")return b;if(!v[b].match(_))break}return-1}function f(v,b){if(b++,v[b]===";")return-1;if(v[b]==="#")return b++,u(v,b);let _=0;for(;b<v.length;b++,_++)if(!(v[b].match(/\w/)&&_<20)){if(v[b]===";")break;return-1}return b}function d(v,b,_){return{err:{code:v,msg:b,line:_.line||_,col:_.col}}}function h(v){return n.isName(v)}function m(v){return n.isName(v)}function p(v,b){const _=v.substring(0,b).split(/\r?\n/);return{line:_.length,col:_[_.length-1].length+1}}function O(v){return v.startIndex+v[1].length}return op}var Mu={},t0;function ZB(){if(t0)return Mu;t0=1;const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,r){return r},attributeValueProcessor:function(t,r){return r},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,r,i){return t}},e=function(t){return Object.assign({},n,t)};return Mu.buildOptions=e,Mu.defaultOptions=n,Mu}var lp,n0;function XB(){if(n0)return lp;n0=1;class n{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}return lp=n,lp}var cp,r0;function FB(){if(r0)return cp;r0=1;const n=kv();function e(c,u){const f={};if(c[u+3]==="O"&&c[u+4]==="C"&&c[u+5]==="T"&&c[u+6]==="Y"&&c[u+7]==="P"&&c[u+8]==="E"){u=u+9;let d=1,h=!1,m=!1,p="";for(;u<c.length;u++)if(c[u]==="<"&&!m){if(h&&i(c,u)){u+=7;let O,v;[O,v,u]=t(c,u+1),v.indexOf("&")===-1&&(f[l(O)]={regx:RegExp(`&${O};`,"g"),val:v})}else if(h&&s(c,u))u+=8;else if(h&&o(c,u))u+=8;else if(h&&a(c,u))u+=9;else if(r)m=!0;else throw new Error("Invalid DOCTYPE");d++,p=""}else if(c[u]===">"){if(m?c[u-1]==="-"&&c[u-2]==="-"&&(m=!1,d--):d--,d===0)break}else c[u]==="["?h=!0:p+=c[u];if(d!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:u}}function t(c,u){let f="";for(;u<c.length&&c[u]!=="'"&&c[u]!=='"';u++)f+=c[u];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const d=c[u++];let h="";for(;u<c.length&&c[u]!==d;u++)h+=c[u];return[f,h,u]}function r(c,u){return c[u+1]==="!"&&c[u+2]==="-"&&c[u+3]==="-"}function i(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="N"&&c[u+4]==="T"&&c[u+5]==="I"&&c[u+6]==="T"&&c[u+7]==="Y"}function s(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="L"&&c[u+4]==="E"&&c[u+5]==="M"&&c[u+6]==="E"&&c[u+7]==="N"&&c[u+8]==="T"}function o(c,u){return c[u+1]==="!"&&c[u+2]==="A"&&c[u+3]==="T"&&c[u+4]==="T"&&c[u+5]==="L"&&c[u+6]==="I"&&c[u+7]==="S"&&c[u+8]==="T"}function a(c,u){return c[u+1]==="!"&&c[u+2]==="N"&&c[u+3]==="O"&&c[u+4]==="T"&&c[u+5]==="A"&&c[u+6]==="T"&&c[u+7]==="I"&&c[u+8]==="O"&&c[u+9]==="N"}function l(c){if(n.isName(c))return c;throw new Error(`Invalid entity name ${c}`)}return cp=e,cp}var up,i0;function VB(){if(i0)return up;i0=1;const n=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function r(o,a={}){if(a=Object.assign({},t,a),!o||typeof o!="string")return o;let l=o.trim();if(a.skipLike!==void 0&&a.skipLike.test(l))return o;if(o==="0")return 0;if(a.hex&&n.test(l))return s(l,16);if(l.search(/[eE]/)!==-1){const c=l.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(c){if(a.leadingZeros)l=(c[1]||"")+c[3];else if(!(c[2]==="0"&&c[3][0]==="."))return o;return a.eNotation?Number(l):o}else return o}else{const c=e.exec(l);if(c){const u=c[1],f=c[2];let d=i(c[3]);if(!a.leadingZeros&&f.length>0&&u&&l[2]!==".")return o;if(!a.leadingZeros&&f.length>0&&!u&&l[1]!==".")return o;if(a.leadingZeros&&f===o)return 0;{const h=Number(l),m=""+h;return m.search(/[eE]/)!==-1?a.eNotation?h:o:l.indexOf(".")!==-1?m==="0"&&d===""||m===d||u&&m==="-"+d?h:o:f?d===m||u+d===m?h:o:l===m||l===u+m?h:o}}else return o}}function i(o){return o&&o.indexOf(".")!==-1&&(o=o.replace(/0+$/,""),o==="."?o="0":o[0]==="."?o="0"+o:o[o.length-1]==="."&&(o=o.substr(0,o.length-1))),o}function s(o,a){if(parseInt)return parseInt(o,a);if(Number.parseInt)return Number.parseInt(o,a);if(window&&window.parseInt)return window.parseInt(o,a);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return up=r,up}var fp,s0;function DA(){if(s0)return fp;s0=1;function n(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const r of e)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}return fp=n,fp}var dp,o0;function WB(){if(o0)return dp;o0=1;const n=kv(),e=XB(),t=FB(),r=VB(),i=DA();class s{constructor(w){this.options=w,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(S,A)=>String.fromCharCode(Number.parseInt(A,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(S,A)=>String.fromCharCode(Number.parseInt(A,16))}},this.addExternalEntities=o,this.parseXml=f,this.parseTextData=a,this.resolveNameSpace=l,this.buildAttributesMap=u,this.isItStopNode=p,this.replaceEntitiesValue=h,this.readStopNodeData=_,this.saveTextToParentTag=m,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}function o(y){const w=Object.keys(y);for(let S=0;S<w.length;S++){const A=w[S];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:y[A]}}}function a(y,w,S,A,x,k,E){if(y!==void 0&&(this.options.trimValues&&!A&&(y=y.trim()),y.length>0)){E||(y=this.replaceEntitiesValue(y));const T=this.options.tagValueProcessor(w,y,S,x,k);return T==null?y:typeof T!=typeof y||T!==y?T:this.options.trimValues?C(y,this.options.parseTagValue,this.options.numberParseOptions):y.trim()===y?C(y,this.options.parseTagValue,this.options.numberParseOptions):y}}function l(y){if(this.options.removeNSPrefix){const w=y.split(":"),S=y.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";w.length===2&&(y=S+w[1])}return y}const c=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function u(y,w,S){if(this.options.ignoreAttributes!==!0&&typeof y=="string"){const A=n.getAllMatches(y,c),x=A.length,k={};for(let E=0;E<x;E++){const T=this.resolveNameSpace(A[E][1]);if(this.ignoreAttributesFn(T,w))continue;let $=A[E][4],L=this.options.attributeNamePrefix+T;if(T.length)if(this.options.transformAttributeName&&(L=this.options.transformAttributeName(L)),L==="__proto__"&&(L="#__proto__"),$!==void 0){this.options.trimValues&&($=$.trim()),$=this.replaceEntitiesValue($);const P=this.options.attributeValueProcessor(T,$,w);P==null?k[L]=$:typeof P!=typeof $||P!==$?k[L]=P:k[L]=C($,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(k[L]=!0)}if(!Object.keys(k).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=k,E}return k}}const f=function(y){y=y.replace(/\r\n?/g,`
292
+ `);const w=new e("!xml");let S=w,A="",x="";for(let k=0;k<y.length;k++)if(y[k]==="<")if(y[k+1]==="/"){const T=v(y,">",k,"Closing Tag is not closed.");let $=y.substring(k+2,T).trim();if(this.options.removeNSPrefix){const D=$.indexOf(":");D!==-1&&($=$.substr(D+1))}this.options.transformTagName&&($=this.options.transformTagName($)),S&&(A=this.saveTextToParentTag(A,S,x));const L=x.substring(x.lastIndexOf(".")+1);if($&&this.options.unpairedTags.indexOf($)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${$}>`);let P=0;L&&this.options.unpairedTags.indexOf(L)!==-1?(P=x.lastIndexOf(".",x.lastIndexOf(".")-1),this.tagsNodeStack.pop()):P=x.lastIndexOf("."),x=x.substring(0,P),S=this.tagsNodeStack.pop(),A="",k=T}else if(y[k+1]==="?"){let T=b(y,k,!1,"?>");if(!T)throw new Error("Pi Tag is not closed.");if(A=this.saveTextToParentTag(A,S,x),!(this.options.ignoreDeclaration&&T.tagName==="?xml"||this.options.ignorePiTags)){const $=new e(T.tagName);$.add(this.options.textNodeName,""),T.tagName!==T.tagExp&&T.attrExpPresent&&($[":@"]=this.buildAttributesMap(T.tagExp,x,T.tagName)),this.addChild(S,$,x)}k=T.closeIndex+1}else if(y.substr(k+1,3)==="!--"){const T=v(y,"-->",k+4,"Comment is not closed.");if(this.options.commentPropName){const $=y.substring(k+4,T-2);A=this.saveTextToParentTag(A,S,x),S.add(this.options.commentPropName,[{[this.options.textNodeName]:$}])}k=T}else if(y.substr(k+1,2)==="!D"){const T=t(y,k);this.docTypeEntities=T.entities,k=T.i}else if(y.substr(k+1,2)==="!["){const T=v(y,"]]>",k,"CDATA is not closed.")-2,$=y.substring(k+9,T);A=this.saveTextToParentTag(A,S,x);let L=this.parseTextData($,S.tagname,x,!0,!1,!0,!0);L==null&&(L=""),this.options.cdataPropName?S.add(this.options.cdataPropName,[{[this.options.textNodeName]:$}]):S.add(this.options.textNodeName,L),k=T+2}else{let T=b(y,k,this.options.removeNSPrefix),$=T.tagName;const L=T.rawTagName;let P=T.tagExp,D=T.attrExpPresent,I=T.closeIndex;this.options.transformTagName&&($=this.options.transformTagName($)),S&&A&&S.tagname!=="!xml"&&(A=this.saveTextToParentTag(A,S,x,!1));const W=S;if(W&&this.options.unpairedTags.indexOf(W.tagname)!==-1&&(S=this.tagsNodeStack.pop(),x=x.substring(0,x.lastIndexOf("."))),$!==w.tagname&&(x+=x?"."+$:$),this.isItStopNode(this.options.stopNodes,x,$)){let U="";if(P.length>0&&P.lastIndexOf("/")===P.length-1)$[$.length-1]==="/"?($=$.substr(0,$.length-1),x=x.substr(0,x.length-1),P=$):P=P.substr(0,P.length-1),k=T.closeIndex;else if(this.options.unpairedTags.indexOf($)!==-1)k=T.closeIndex;else{const ce=this.readStopNodeData(y,L,I+1);if(!ce)throw new Error(`Unexpected end of ${L}`);k=ce.i,U=ce.tagContent}const ae=new e($);$!==P&&D&&(ae[":@"]=this.buildAttributesMap(P,x,$)),U&&(U=this.parseTextData(U,$,x,!0,D,!0,!0)),x=x.substr(0,x.lastIndexOf(".")),ae.add(this.options.textNodeName,U),this.addChild(S,ae,x)}else{if(P.length>0&&P.lastIndexOf("/")===P.length-1){$[$.length-1]==="/"?($=$.substr(0,$.length-1),x=x.substr(0,x.length-1),P=$):P=P.substr(0,P.length-1),this.options.transformTagName&&($=this.options.transformTagName($));const U=new e($);$!==P&&D&&(U[":@"]=this.buildAttributesMap(P,x,$)),this.addChild(S,U,x),x=x.substr(0,x.lastIndexOf("."))}else{const U=new e($);this.tagsNodeStack.push(S),$!==P&&D&&(U[":@"]=this.buildAttributesMap(P,x,$)),this.addChild(S,U,x),S=U}A="",k=I}}else A+=y[k];return w.child};function d(y,w,S){const A=this.options.updateTag(w.tagname,S,w[":@"]);A===!1||(typeof A=="string"&&(w.tagname=A),y.addChild(w))}const h=function(y){if(this.options.processEntities){for(let w in this.docTypeEntities){const S=this.docTypeEntities[w];y=y.replace(S.regx,S.val)}for(let w in this.lastEntities){const S=this.lastEntities[w];y=y.replace(S.regex,S.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){const S=this.htmlEntities[w];y=y.replace(S.regex,S.val)}y=y.replace(this.ampEntity.regex,this.ampEntity.val)}return y};function m(y,w,S,A){return y&&(A===void 0&&(A=Object.keys(w.child).length===0),y=this.parseTextData(y,w.tagname,S,!1,w[":@"]?Object.keys(w[":@"]).length!==0:!1,A),y!==void 0&&y!==""&&w.add(this.options.textNodeName,y),y=""),y}function p(y,w,S){const A="*."+S;for(const x in y){const k=y[x];if(A===k||w===k)return!0}return!1}function O(y,w,S=">"){let A,x="";for(let k=w;k<y.length;k++){let E=y[k];if(A)E===A&&(A="");else if(E==='"'||E==="'")A=E;else if(E===S[0])if(S[1]){if(y[k+1]===S[1])return{data:x,index:k}}else return{data:x,index:k};else E===" "&&(E=" ");x+=E}}function v(y,w,S,A){const x=y.indexOf(w,S);if(x===-1)throw new Error(A);return x+w.length-1}function b(y,w,S,A=">"){const x=O(y,w+1,A);if(!x)return;let k=x.data;const E=x.index,T=k.search(/\s/);let $=k,L=!0;T!==-1&&($=k.substring(0,T),k=k.substring(T+1).trimStart());const P=$;if(S){const D=$.indexOf(":");D!==-1&&($=$.substr(D+1),L=$!==x.data.substr(D+1))}return{tagName:$,tagExp:k,closeIndex:E,attrExpPresent:L,rawTagName:P}}function _(y,w,S){const A=S;let x=1;for(;S<y.length;S++)if(y[S]==="<")if(y[S+1]==="/"){const k=v(y,">",S,`${w} is not closed`);if(y.substring(S+2,k).trim()===w&&(x--,x===0))return{tagContent:y.substring(A,S),i:k};S=k}else if(y[S+1]==="?")S=v(y,"?>",S+1,"StopNode is not closed.");else if(y.substr(S+1,3)==="!--")S=v(y,"-->",S+3,"StopNode is not closed.");else if(y.substr(S+1,2)==="![")S=v(y,"]]>",S,"StopNode is not closed.")-2;else{const k=b(y,S,">");k&&((k&&k.tagName)===w&&k.tagExp[k.tagExp.length-1]!=="/"&&x++,S=k.closeIndex)}}function C(y,w,S){if(w&&typeof y=="string"){const A=y.trim();return A==="true"?!0:A==="false"?!1:r(y,S)}else return n.isExist(y)?y:""}return dp=s,dp}var hp={},a0;function YB(){if(a0)return hp;a0=1;function n(s,o){return e(s,o)}function e(s,o,a){let l;const c={};for(let u=0;u<s.length;u++){const f=s[u],d=t(f);let h="";if(a===void 0?h=d:h=a+"."+d,d===o.textNodeName)l===void 0?l=f[d]:l+=""+f[d];else{if(d===void 0)continue;if(f[d]){let m=e(f[d],o,h);const p=i(m,o);f[":@"]?r(m,f[":@"],h,o):Object.keys(m).length===1&&m[o.textNodeName]!==void 0&&!o.alwaysCreateTextNode?m=m[o.textNodeName]:Object.keys(m).length===0&&(o.alwaysCreateTextNode?m[o.textNodeName]="":m=""),c[d]!==void 0&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(m)):o.isArray(d,h,p)?c[d]=[m]:c[d]=m}}}return typeof l=="string"?l.length>0&&(c[o.textNodeName]=l):l!==void 0&&(c[o.textNodeName]=l),c}function t(s){const o=Object.keys(s);for(let a=0;a<o.length;a++){const l=o[a];if(l!==":@")return l}}function r(s,o,a,l){if(o){const c=Object.keys(o),u=c.length;for(let f=0;f<u;f++){const d=c[f];l.isArray(d,a+"."+d,!0,!0)?s[d]=[o[d]]:s[d]=o[d]}}}function i(s,o){const{textNodeName:a}=o,l=Object.keys(s).length;return!!(l===0||l===1&&(s[a]||typeof s[a]=="boolean"||s[a]===0))}return hp.prettify=n,hp}var pp,l0;function UB(){if(l0)return pp;l0=1;const{buildOptions:n}=ZB(),e=WB(),{prettify:t}=YB(),r=MA();class i{constructor(o){this.externalEntities={},this.options=n(o)}parse(o,a){if(typeof o!="string")if(o.toString)o=o.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(a){a===!0&&(a={});const u=r.validate(o,a);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const l=new e(this.options);l.addExternalEntities(this.externalEntities);const c=l.parseXml(o);return this.options.preserveOrder||c===void 0?c:t(c,this.options)}addEntity(o,a){if(a.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(o.indexOf("&")!==-1||o.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(a==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[o]=a}}return pp=i,pp}var mp,c0;function GB(){if(c0)return mp;c0=1;const n=`
293
+ `;function e(a,l){let c="";return l.format&&l.indentBy.length>0&&(c=n),t(a,l,"",c)}function t(a,l,c,u){let f="",d=!1;for(let h=0;h<a.length;h++){const m=a[h],p=r(m);if(p===void 0)continue;let O="";if(c.length===0?O=p:O=`${c}.${p}`,p===l.textNodeName){let y=m[p];s(O,l)||(y=l.tagValueProcessor(p,y),y=o(y,l)),d&&(f+=u),f+=y,d=!1;continue}else if(p===l.cdataPropName){d&&(f+=u),f+=`<![CDATA[${m[p][0][l.textNodeName]}]]>`,d=!1;continue}else if(p===l.commentPropName){f+=u+`<!--${m[p][0][l.textNodeName]}-->`,d=!0;continue}else if(p[0]==="?"){const y=i(m[":@"],l),w=p==="?xml"?"":u;let S=m[p][0][l.textNodeName];S=S.length!==0?" "+S:"",f+=w+`<${p}${S}${y}?>`,d=!0;continue}let v=u;v!==""&&(v+=l.indentBy);const b=i(m[":@"],l),_=u+`<${p}${b}`,C=t(m[p],l,O,v);l.unpairedTags.indexOf(p)!==-1?l.suppressUnpairedNode?f+=_+">":f+=_+"/>":(!C||C.length===0)&&l.suppressEmptyNode?f+=_+"/>":C&&C.endsWith(">")?f+=_+`>${C}${u}</${p}>`:(f+=_+">",C&&u!==""&&(C.includes("/>")||C.includes("</"))?f+=u+l.indentBy+C+u:f+=C,f+=`</${p}>`),d=!0}return f}function r(a){const l=Object.keys(a);for(let c=0;c<l.length;c++){const u=l[c];if(a.hasOwnProperty(u)&&u!==":@")return u}}function i(a,l){let c="";if(a&&!l.ignoreAttributes)for(let u in a){if(!a.hasOwnProperty(u))continue;let f=l.attributeValueProcessor(u,a[u]);f=o(f,l),f===!0&&l.suppressBooleanAttributes?c+=` ${u.substr(l.attributeNamePrefix.length)}`:c+=` ${u.substr(l.attributeNamePrefix.length)}="${f}"`}return c}function s(a,l){a=a.substr(0,a.length-l.textNodeName.length-1);let c=a.substr(a.lastIndexOf(".")+1);for(let u in l.stopNodes)if(l.stopNodes[u]===a||l.stopNodes[u]==="*."+c)return!0;return!1}function o(a,l){if(a&&a.length>0&&l.processEntities)for(let c=0;c<l.entities.length;c++){const u=l.entities[c];a=a.replace(u.regex,u.val)}return a}return mp=e,mp}var gp,u0;function HB(){if(u0)return gp;u0=1;const n=GB(),e=DA(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(a,l){return l},attributeValueProcessor:function(a,l){return l},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(a){this.options=Object.assign({},t,a),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=s,this.tagEndChar=`>
294
+ `,this.newLine=`
295
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}r.prototype.build=function(a){return this.options.preserveOrder?n(a,this.options):(Array.isArray(a)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(a={[this.options.arrayNodeName]:a}),this.j2x(a,0,[]).val)},r.prototype.j2x=function(a,l,c){let u="",f="";const d=c.join(".");for(let h in a)if(Object.prototype.hasOwnProperty.call(a,h))if(typeof a[h]>"u")this.isAttribute(h)&&(f+="");else if(a[h]===null)this.isAttribute(h)?f+="":h[0]==="?"?f+=this.indentate(l)+"<"+h+"?"+this.tagEndChar:f+=this.indentate(l)+"<"+h+"/"+this.tagEndChar;else if(a[h]instanceof Date)f+=this.buildTextValNode(a[h],h,"",l);else if(typeof a[h]!="object"){const m=this.isAttribute(h);if(m&&!this.ignoreAttributesFn(m,d))u+=this.buildAttrPairStr(m,""+a[h]);else if(!m)if(h===this.options.textNodeName){let p=this.options.tagValueProcessor(h,""+a[h]);f+=this.replaceEntitiesValue(p)}else f+=this.buildTextValNode(a[h],h,"",l)}else if(Array.isArray(a[h])){const m=a[h].length;let p="",O="";for(let v=0;v<m;v++){const b=a[h][v];if(!(typeof b>"u"))if(b===null)h[0]==="?"?f+=this.indentate(l)+"<"+h+"?"+this.tagEndChar:f+=this.indentate(l)+"<"+h+"/"+this.tagEndChar;else if(typeof b=="object")if(this.options.oneListGroup){const _=this.j2x(b,l+1,c.concat(h));p+=_.val,this.options.attributesGroupName&&b.hasOwnProperty(this.options.attributesGroupName)&&(O+=_.attrStr)}else p+=this.processTextOrObjNode(b,h,l,c);else if(this.options.oneListGroup){let _=this.options.tagValueProcessor(h,b);_=this.replaceEntitiesValue(_),p+=_}else p+=this.buildTextValNode(b,h,"",l)}this.options.oneListGroup&&(p=this.buildObjectNode(p,h,O,l)),f+=p}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const m=Object.keys(a[h]),p=m.length;for(let O=0;O<p;O++)u+=this.buildAttrPairStr(m[O],""+a[h][m[O]])}else f+=this.processTextOrObjNode(a[h],h,l,c);return{attrStr:u,val:f}},r.prototype.buildAttrPairStr=function(a,l){return l=this.options.attributeValueProcessor(a,""+l),l=this.replaceEntitiesValue(l),this.options.suppressBooleanAttributes&&l==="true"?" "+a:" "+a+'="'+l+'"'};function i(a,l,c,u){const f=this.j2x(a,c+1,u.concat(l));return a[this.options.textNodeName]!==void 0&&Object.keys(a).length===1?this.buildTextValNode(a[this.options.textNodeName],l,f.attrStr,c):this.buildObjectNode(f.val,l,f.attrStr,c)}r.prototype.buildObjectNode=function(a,l,c,u){if(a==="")return l[0]==="?"?this.indentate(u)+"<"+l+c+"?"+this.tagEndChar:this.indentate(u)+"<"+l+c+this.closeTag(l)+this.tagEndChar;{let f="</"+l+this.tagEndChar,d="";return l[0]==="?"&&(d="?",f=""),(c||c==="")&&a.indexOf("<")===-1?this.indentate(u)+"<"+l+c+d+">"+a+f:this.options.commentPropName!==!1&&l===this.options.commentPropName&&d.length===0?this.indentate(u)+`<!--${a}-->`+this.newLine:this.indentate(u)+"<"+l+c+d+this.tagEndChar+a+this.indentate(u)+f}},r.prototype.closeTag=function(a){let l="";return this.options.unpairedTags.indexOf(a)!==-1?this.options.suppressUnpairedNode||(l="/"):this.options.suppressEmptyNode?l="/":l=`></${a}`,l},r.prototype.buildTextValNode=function(a,l,c,u){if(this.options.cdataPropName!==!1&&l===this.options.cdataPropName)return this.indentate(u)+`<![CDATA[${a}]]>`+this.newLine;if(this.options.commentPropName!==!1&&l===this.options.commentPropName)return this.indentate(u)+`<!--${a}-->`+this.newLine;if(l[0]==="?")return this.indentate(u)+"<"+l+c+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(l,a);return f=this.replaceEntitiesValue(f),f===""?this.indentate(u)+"<"+l+c+this.closeTag(l)+this.tagEndChar:this.indentate(u)+"<"+l+c+">"+f+"</"+l+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(a){if(a&&a.length>0&&this.options.processEntities)for(let l=0;l<this.options.entities.length;l++){const c=this.options.entities[l];a=a.replace(c.regex,c.val)}return a};function s(a){return this.options.indentBy.repeat(a)}function o(a){return a.startsWith(this.options.attributeNamePrefix)&&a!==this.options.textNodeName?a.substr(this.attrPrefixLen):!1}return gp=r,gp}var Op,f0;function KB(){if(f0)return Op;f0=1;const n=MA(),e=UB(),t=HB();return Op={XMLParser:e,XMLValidator:n,XMLBuilder:t},Op}var JB=KB();const ej="RFTO",tj="RFTC";function nj(n){return n.includes("")?n.replaceAll(ej,"{%").replaceAll(tj,"%}"):n}const{dirname:qA,join:RA,isAbsolute:rj}=zB,{Tag:bi}=B,ij={children:["inline"],attributes:{level:{type:"Number",required:!0,render:!1},property:{type:String,required:!1}},transform(n,e){const t=n.transformAttributes(e),r=n.transformChildren(e);return(!t.id||typeof t.id!="string")&&(t.id=r.filter(i=>typeof i=="string").join(" ").replace(/[?{}%]/g,"").replace(/\s+/g,"-").toLowerCase()),new bi(`h${n.attributes.level}`,t,r)}},sj={children:["inline"],attributes:{property:{type:String,required:!1}},render:"p"},oj={render:"fence",attributes:{content:{type:String,render:!1},process:{type:Boolean,render:!1,default:!1},language:{type:String,render:!1,default:"shell"},source:{type:String,render:!1},lines:{type:String,render:!1},linenumbers:{type:Boolean,render:!1,default:!1},highlight:{type:String,render:!1},label:{type:String,render:!1}},transform(n,e){const t=n.attributes.language||"shell",r={"data-language":t},i={"data-language":t},s=n.attributes.source;typeof s=="string"&&s.length>0&&(r["data-source"]=s,i["data-source"]=s);const o=n.attributes.lines;if(typeof o=="string"&&o.length>0){r["data-lines"]=o,i["data-lines"]=o;const c=/^(\d+)/.exec(o.trim());if(c){const u=Number(c[1]);if(Number.isFinite(u)&&u>0){const f=typeof r.style=="string"?`${r.style}; `:"";r.style=`${f}--rf-start-line: ${u-1}`}}}n.attributes.linenumbers===!0&&(r["data-linenumbers"]="true",i["data-linenumbers"]="true");const a=n.attributes.highlight;typeof a=="string"&&a.length>0&&(r["data-highlight-lines"]=a,i["data-highlight-lines"]=a);for(const[c,u]of Object.entries(n.attributes))c.startsWith("data-")&&(r[c]=u,i[c]=u);const l=new bi("pre",r,[new bi("code",i,[nj(n.attributes.content)])]);return new bi("div",{class:"rf-codeblock"},[l])}},aj={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(n,e){return new bi(n.attributes.ordered?"ol":"ul",n.transformAttributes(e),n.transformChildren(e))}},lj={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"],attributes:{property:{type:String,required:!1},typeof:{type:String,required:!1}}},cj={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},uj={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},fj={attributes:{content:{type:String,required:!0},property:{type:String,required:!1}},transform(n,e){const t=n.transformAttributes(e);return t.property?new bi("span",{"data-field":t.property},[n.attributes.content]):n.attributes.content}},IA={children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}},render:"a",transform(n,e){const{urls:t,path:r}=e.variables||{},i=r?qA(r):"/";let s=n.attributes;const o=i!=="/"?RA(i,n.attributes.href):n.attributes.href;if(o in(t||{})){const a=t[o];s={...s,href:a}}return new bi(this.render,s,n.transformChildren(e))}},dj=B.nodes.hardbreak,hj={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String},property:{type:String}},transform(n,e){const t=n.transformAttributes(e),r=e.variables?.svg||[];let i=n.attributes.src;!rj(i)&&e.variables?.path&&(i=RA("/",qA(e.variables.path),i));const s=r.find(o=>o._id===i);if(s){let a=new JB.XMLParser({ignoreAttributes:!1}).parse(s.content);const l=tg("svg",a.svg);return t.property&&(l.attributes["data-field"]=t.property),l.attributes.xmlns=void 0,l}return new bi(this.render,t,n.transformChildren(e))}},pj={children:["thead","tbody","tr"],attributes:{},transform(n,e){const t=new bi("table",n.transformAttributes(e),n.transformChildren(e));return new bi("div",{class:"rf-table-wrapper"},[t])}};function tg(n,e){if(Array.isArray(e))return e.map(i=>tg(n,i));let t=[],r={};for(const[i,s]of Object.entries(e))i.startsWith("@_")?r[i.slice(2)]=s:i==="#text"?t.push(s):t.push(tg(i,s));return new bi(n,r,t)}const{Tag:MY}=B,{Ast:hf}=B;function mj(n){let e,t;return{filtered:n.filter(i=>i.type==="tag"&&i.tag==="tint"?(e=i,!1):i.type==="tag"&&i.tag==="bg"?(t=i,!1):!0),tintNode:e,bgNode:t}}function Pc(n,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(t=>Pc(n,t));if(e.startsWith("heading:")){const t=parseInt(e.slice(8),10);return n.type==="heading"&&n.attributes?.level===t}if(e==="list:ordered")return n.type==="list"&&n.attributes?.ordered===!0;if(e==="list:unordered")return n.type==="list"&&n.attributes?.ordered!==!0;if(e.startsWith("tag:")){const t=e.slice(4);return n.type==="tag"&&n.tag===t}return n.type===e}function wa(n,e){const t={};let r=0;for(const i of e){if(r>=n.length)continue;const s=n[r];if(Pc(s,i.match)){if(i.greedy){const o=[];for(;r<n.length&&Pc(n[r],i.match);)o.push(n[r]),r++;t[i.name]=o}else t[i.name]=s,r++;if(i.itemModel)if(i.emitTag){const o=i.greedy?t[i.name]:[t[i.name]],a=[];for(const l of o){if(!l||l.type!=="list")continue;const c=ng(l,i.itemModel),u=l.children??[];for(let f=0;f<c.length;f++){const d={},h=i.emitAttributes;if(h)for(const[p,O]of Object.entries(h))if(O.startsWith("$")){const v=O.slice(1).split("|");d[p]=v.map(b=>c[f][b.trim()]).find(b=>b!=null&&b!=="")??""}else d[p]=O;const m=u[f]?.children?.slice(1)??[];a.push(new hf.Node("tag",d,m,i.emitTag))}}t[i.name]=a}else{const o=t[i.name];o&&typeof o=="object"&&"type"in o&&(t[`${i.name}Data`]=ng(o,i.itemModel))}}else i.optional||r++}return t}function gj(n,e){const t=[[]];for(const i of n)Pc(i,e.delimiter)?t.push([]):t[t.length-1].push(i);if(e.dynamicZones&&e.zoneModel)return{zones:t.map(i=>Ec(i,e.zoneModel))};const r={};if(e.zones)for(let i=0;i<e.zones.length;i++){const s=e.zones[i],o=i<t.length?t[i]:[];r[s.name]=wa(o,s.fields)}return r}function d0(n){const e=[];for(const t of n.walk())t.type==="text"&&t.attributes?.content&&e.push(t.attributes.content);return e.join(" ")}function h0(n,e){const t={};let r=n;for(const i of e.fields)if(i.pattern==="remainder")t[i.name]=r.trim(),r="";else{const s=r.match(i.pattern);s?(t[i.name]=(s[1]||s[0]).trim(),r=r.slice(s[0].length)):i.optional||(t[i.name]=r.trim())}return t}function Oj(n,e){const t=n.toLowerCase().trim();for(const[r,i]of Object.entries(e)){if(r.toLowerCase()===t)return{canonicalName:r,definition:i};if(i.alias){for(const s of i.alias)if(s.toLowerCase()===t)return{canonicalName:r,definition:i}}}}function vj(n,e){const t=e.sectionHeading;let r;if(t.includes(":"))r=parseInt(t.split(":")[1],10);else{const c=n.filter(u=>u.type==="heading");if(c.length>=2){const u=c[0].attributes?.level,f=c[1].attributes?.level;u!==void 0&&f!==void 0&&f>u?r=c.filter(h=>h.attributes?.level===f).length>=2?f:u:r=u}else r=c[0]?.attributes?.level}if(r===void 0){if(e.implicitSection&&e.emitTag){const u=e.fields?wa([],e.fields):{},f=new hf.Node("tag",{...e.implicitSection.attributes??{}},n,e.emitTag);return{...u,sections:[f]}}return{...e.fields?wa(n,e.fields):{},sections:[]}}const i=[],s=[];let o=null;for(const c of n)c.type==="heading"&&c.attributes?.level===r?(o&&s.push(o),o={headingNode:c,body:[]}):o?o.body.push(c):i.push(c);if(o&&s.push(o),s.length===0&&e.implicitSection&&e.emitTag){const c=e.fields?wa([],e.fields):{},u=new hf.Node("tag",{...e.implicitSection.attributes??{}},n,e.emitTag);return{...c,sections:[u]}}const a=e.fields?wa(i,e.fields):{};if(e.emitTag){const c=s.map(u=>{const f=d0(u.headingNode),d=e.headingExtract?h0(f,e.headingExtract):{},h={};if(e.emitAttributes)for(const[m,p]of Object.entries(e.emitAttributes))p==="$heading"?h[m]=f:p.startsWith("$")?h[m]=d[p.slice(1)]??"":h[m]=p;return new hf.Node("tag",h,u.body,e.emitTag)});return{...a,sections:c}}const l=s.map(c=>{const u=d0(c.headingNode),f=e.headingExtract?h0(u,e.headingExtract):{},d=e.knownSections?Oj(u,e.knownSections):void 0,h=d?.definition.model??e.sectionModel,m=Ec(c.body,h);return{$heading:u,$headingNode:c.headingNode,...d?{$canonicalName:d.canonicalName}:{},...Object.fromEntries(Object.entries(f).map(([p,O])=>[`$${p}`,O])),...m}});return{...a,sections:l}}function bj(n,e,t){if("hasChild"in n)return e.some(r=>Pc(r,n.hasChild));if("in"in n){const r=String(t[n.attribute]??"");return n.in.includes(r)}return"exists"in n?t[n.attribute]!=null&&t[n.attribute]!=="":!1}function yj(n){return"when"in n&&Array.isArray(n.when)}function wj(n){if(n.type==="text")return n.attributes?.content??"";const e=[];for(const t of n.walk())t.type==="text"&&t.attributes?.content&&e.push(t.attributes.content);return e.join("")}function _j(n,e){if(n.type===e)return n;if(n.type==="link"&&e!=="link"){for(const t of n.children??[])if(t.type===e)return t}if((n.type==="strong"||n.type==="em")&&e!==n.type){for(const t of n.children??[])if(t.type===e)return t}return null}function ng(n,e){return(n.children??[]).map(r=>{const i={},s=[];for(const c of r.children??[])c.type==="inline"?s.push(...c.children??[]):s.push(c);const o=new Set,a=new Set;for(const c of e.fields)if(c.match!=="text"){if(c.match==="list"){const u=s.findIndex((f,d)=>!o.has(d)&&f.type==="list");u>=0&&(o.add(u),i[c.name]=c.itemModel?ng(s[u],c.itemModel):s[u]);continue}if(c.match==="paragraph"&&c.greedy){const u=[];s.forEach((f,d)=>{!o.has(d)&&f.type==="paragraph"&&(o.add(d),u.push(f))}),u.length>0&&(i[c.name]=u);continue}for(let u=0;u<s.length;u++){if(o.has(u)||a.has(u)&&c.match!==s[u].type)continue;const f=s[u],d=_j(f,c.match);if(d){if(d===f?o.add(u):a.add(u),c.extract){const h=f.attributes?.[c.extract]!=null?f:d;i[c.name]=h.attributes?.[c.extract]}else i[c.name]=wj(d);break}}}for(const c of a)o.add(c);const l=e.fields.filter(c=>c.match==="text");if(l.length>0){let u=s.filter((f,d)=>!o.has(d)).filter(f=>f.type==="text"||f.type==="softbreak").map(f=>f.attributes?.content??"").join("").trim();for(const f of l)if(f.pattern==="remainder"){const d=u.trim();(d||!f.optional)&&(i[f.name]=d)}else if(f.pattern instanceof RegExp){const d=u.match(f.pattern);d&&(i[f.name]=d[1]??d[0],u=u.replace(f.pattern,""))}}return i})}function Ec(n,e,t){if(yj(e)){for(const r of e.when)if(bj(r.condition,n,t??{}))return Ec(n,r.model,t);return Ec(n,e.default,t)}switch(e.type){case"sequence":return wa(n,e.fields);case"sections":return vj(n,e);case"delimited":return gj(n,e);case"custom":return{children:e.processChildren(n,t??{})};default:return{}}}function kj(n,e,t){const{filtered:r,tintNode:i,bgNode:s}=mj(n);return{content:Ec(r,e,t),tintNode:i,bgNode:s}}const xj=new Map;function Sj(n,e){xj.set(n,e)}const Aj=new WeakMap;function Zo(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function kn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&n.$$mdtype==="Tag"}function Rt(n,e={},t=[]){return{$$mdtype:"Tag",name:n,attributes:e,children:t}}function Cj(n,e){const t=Zo(e);return n.children.find(r=>kn(r)&&r.name==="meta"&&r.attributes["data-field"]===t)}function mr(n,e,t){return Cj(n,e)?.attributes.content??t}function Tj(n){const e=n.attributes?.["data-rune-fields"];if(typeof e!="string"||e.length===0)return{};try{const t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function So(n,e,t){const i=Tj(n)[e];if(i!=null&&typeof i!="object")return typeof i=="string"?i:String(i);const s=Zo(e),o=(n.children??[]).find(a=>!!a&&typeof a=="object"&&a.$$mdtype==="Tag"&&a.name==="meta"&&a.attributes?.["data-field"]===s);return o?o.attributes.content:void 0}const Pj={none:"0",tight:"var(--rf-spacing-sm)",default:"var(--rf-spacing-md)",loose:"var(--rf-spacing-xl)"};function p0(n){return Pj[n]??n}function Ej(n){return n.split(/\s+/).map(e=>`${e}fr`).join(" ")}const $j={sm:"var(--rf-spacing-sm)",md:"var(--rf-spacing-md)",lg:"var(--rf-spacing-lg)"};function Qj(n){return $j[n]??n}const Lj={top:"start",center:"center",bottom:"end",stretch:"stretch",baseline:"baseline"};function Mj(n){return Lj[n]??n}const Dj={left:{x:"start",y:"center"},center:{x:"center",y:"center"},right:{x:"end",y:"center"},top:{x:"center",y:"start"},bottom:{x:"center",y:"end"},"top left":{x:"start",y:"start"},"top center":{x:"center",y:"start"},"top right":{x:"end",y:"start"},"bottom left":{x:"start",y:"end"},"bottom center":{x:"center",y:"end"},"bottom right":{x:"end",y:"end"}};function qj(n){return Dj[n]??{x:"center",y:"center"}}const Rj=["bg","surface","text","muted","primary","border"],fd={duration(n){const e=n.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);if(!e)return n;const t=[];return e[1]&&t.push(`${e[1]}h`),e[2]&&t.push(`${e[2]}m`),e[3]&&t.push(`${e[3]}s`),t.join(" ")||n},uppercase:n=>n.toUpperCase(),capitalize:n=>n.charAt(0).toUpperCase()+n.slice(1)};function Ij(n){const{prefix:e,runes:t,icons:r={},tints:i={},backgrounds:s={}}=n,o=new Map(Object.keys(t).map(l=>[Zo(l),l]));function a(l,c){if(l==null||typeof l=="string"||typeof l=="number")return l;if(Array.isArray(l))return l.map(d=>a(d,c));if(!kn(l))return l;const u=l.attributes?.["data-rune"],f=u?o.get(u):void 0;if(f)return jj(l,t[f],e,r,i,s,t,o,a,c);if(l.name==="li"){const d=zj(l);if(d)return{...d,children:d.children.map(h=>a(h,c))}}return{...l,children:l.children.map(d=>a(d,c))}}return l=>a(l)}function Nj(n){if(typeof n!="string"||n.length===0)return{};try{const e=JSON.parse(n);return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function Bj(n,e,t,r){const i=e[t];return i!=null&&typeof i!="object"?i:mr(n,t,r)}function jj(n,e,t,r,i,s,o,a,l,c){const u=`${t}-${e.block}`,f=n.attributes?.["data-rune"],d=Nj(n.attributes["data-rune-fields"]),h=[],m={},p={},O=[];if(e.modifiers)for(const[xe,De]of Object.entries(e.modifiers)){De.source==="attribute"&&O.push(xe);const Ue=De.source==="meta"?Bj(n,d,xe,De.default):n.attributes[xe]??De.default;if(Ue){if(m[xe]=Ue,De.noBemClass||h.push(`${u}--${Ue}`),De.valueMap){const lt=De.valueMap[Ue]??Ue;De.mapTarget?p[De.mapTarget]=lt:m[xe]=lt}}else Ue===""&&(m[xe]="")}if(e.contextModifiers&&c&&e.contextModifiers[c]&&h.push(`${u}--${e.contextModifiers[c]}`),e.staticModifiers)for(const xe of e.staticModifiers)h.push(`${u}--${xe}`);const v=new Set,b={},_=[],C=mr(n,"tint"),y=mr(n,"tint-mode");if(C||y){let xe={},De={},Ue=y;if(C&&C!=="custom"&&i[C]){const et=i[C];if(et.light)for(const[Qt,nn]of Object.entries(et.light))nn&&(xe[Qt]=nn);if(et.dark)for(const[Qt,nn]of Object.entries(et.dark))nn&&(De[Qt]=nn);!Ue&&et.lockMode&&(Ue=et.lockMode)}for(const et of Rj){const Qt=mr(n,`tint-${et}`);Qt&&(xe[et]=Qt,v.add(`tint-${et}`));const nn=mr(n,`tint-dark-${et}`);nn&&(De[et]=nn,v.add(`tint-dark-${et}`))}const lt=Object.keys(xe).length>0;(C||lt)&&(b["data-tint"]=C||"custom"),Ue&&Ue!=="auto"&&(b["data-color-scheme"]=Ue),Object.keys(De).length>0&&(b["data-tint-dark"]="");for(const[et,Qt]of Object.entries(xe))_.push(`--tint-${et}: ${Qt}`);for(const[et,Qt]of Object.entries(De))_.push(`--tint-dark-${et}: ${Qt}`);(lt||C&&C!=="custom"&&i[C])&&h.push(`${u}--tinted`),v.add("tint"),v.add("tint-mode")}const w=n.attributes?.density,S=c?a.get(c):void 0,x=S?o[S]?.childDensity:void 0,k=w??x??e.defaultDensity??"full",E=n.attributes?.width??e.defaultWidth;E&&E!=="content"&&(m.width=E,h.push(`${u}--${E}`));const T=n.attributes?.spacing;T&&T!=="default"&&(m.spacing=T,h.push(`${u}--spacing-${T}`));const $=n.attributes?.inset;$&&$!=="default"&&(m.inset=$,h.push(`${u}--inset-${$}`));const L=new Set,P={};let D=null;const I=mr(n,"bg-preset"),W=mr(n,"bg-src"),U=mr(n,"bg-video");if(I||W||U){let xe={};if(I&&s[I]){let xt=s[I];if(xt.extends&&s[xt.extends]){const se=s[xt.extends];xt={...se,params:{...se.params,...xt.params},style:{...se.style,...xt.style}}}xt.style&&(xe={...xt.style})}const De=mr(n,"bg-overlay"),Ue=mr(n,"bg-blur"),lt=mr(n,"bg-position"),et=mr(n,"bg-fit"),Qt=mr(n,"bg-opacity"),nn=mr(n,"bg-fixed"),ke={sm:"4px",md:"8px",lg:"16px"},Ft=[];for(const[xt,se]of Object.entries(xe))Ft.push(`${xt}: ${se}`);W&&Ft.push(`--bg-image: url(${W})`),lt&&Ft.push(`--bg-position: ${lt}`),Ue&&Ft.push(`--bg-blur: ${ke[Ue]??Ue}`),et&&Ft.push(`--bg-fit: ${et}`),Qt&&Ft.push(`--bg-opacity: ${Qt}`);const wt={"data-name":"bg"};I&&(wt["data-bg-preset"]=I),Ft.length&&(wt.style=Ft.join("; ")),nn&&(wt["data-bg-fixed"]="");const Ht=[];if(U&&Ht.push(Rt("video",{"data-name":"bg-video",autoplay:"",muted:"",loop:"",playsinline:"",src:U,...Ft.length?{style:Ft.filter(xt=>!xt.startsWith("--bg-image")).join("; ")}:{}})),De){const xt={"data-name":"bg-overlay"};De==="dark"||De==="light"?xt["data-bg-overlay"]=De:xt.style=`background: ${De}`,Ht.push(Rt("div",xt))}D=Rt("div",wt,Ht),h.push(`${u}--has-bg`),P["data-bg"]="",L.add("bg-preset"),L.add("bg-src"),L.add("bg-video"),L.add("bg-overlay"),L.add("bg-blur"),L.add("bg-position"),L.add("bg-fit"),L.add("bg-opacity"),L.add("bg-fixed")}const ae={};for(const[xe,De]of Object.entries(m)){const Ue=xe.replace(/([A-Z])/g,"-$1").toLowerCase();ae[`data-${Ue}`]=De}for(const[xe,De]of Object.entries(p)){const Ue=xe.startsWith("data-")?xe:`data-${xe}`;ae[Ue]=De}const ce=n.attributes.class||"",ne=[u,...h,ce].filter(Boolean).join(" ");let G=n.children;if(e.autoLabel&&(G=NA(G,e.autoLabel)),e.blocks||e.layout)G=Kj(e,u,G,m);else if(e.structure){const xe=[],De=[];for(const[Ue,lt]of Object.entries(e.structure)){const et=pf(lt,Ue,m);et&&(lt.before?xe.push(et):De.push(et))}if(e.contentWrapper){const Ue=Rt(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},G);G=[...xe,Ue,...De]}else(xe.length||De.length)&&(G=[...xe,...G,...De])}else e.contentWrapper&&(G=[Rt(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},G)]);D&&(G=[D,...G]);let oe=G.map(xe=>kn(xe)?l(xv(xe,u,e.sections,e.mediaSlots),f):l(xe,f));e.projection&&(oe=Zj(oe,e.projection,u,e.sections,e.mediaSlots));const ie=e.modifiers?new Set(Object.keys(e.modifiers).map(xe=>Zo(xe))):void 0,j=oe.filter(xe=>{if(!kn(xe))return!0;const De=xe;if(De.name!=="meta"||!De.attributes["data-field"])return!0;const Ue=De.attributes["data-field"];return!(ie?.has(Ue)||v.has(Ue)||L.has(Ue))});if(e.sequence){const xe=e.sequenceDirection?m[e.sequenceDirection.fromModifier]??e.sequenceDirection.default:void 0;BA(j,e.sequence,xe)}let te=n.attributes.style||"";const _e=[];if(e.styles)for(const[xe,De]of Object.entries(e.styles)){const Ue=m[xe];Ue&&(typeof De=="string"?_e.push(`${De}: ${Ue}`):De.transform?_e.push(`${De.prop}: ${De.transform(Ue)}`):De.template?_e.push(`${De.prop}: ${De.template.replace("{}",Ue)}`):_e.push(`${De.prop}: ${Ue}`))}_e.push(..._),_e.length&&(te=te?`${te}; ${_e.join("; ")}`:_e.join("; "));const{width:Ee,spacing:Re,inset:ge,density:Ce,"data-rune":tt,"data-rune-fields":rt,...We}=n.attributes,Ye=O.length>0?Object.fromEntries(Object.entries(We).filter(([xe])=>!O.includes(xe))):We,ze={...n,attributes:{...Ye,...ae,...b,...P,class:ne,"data-rune":f,"data-density":k,...e.rootAttributes||{},...te?{style:te}:{}},children:j};return e.postTransform?e.postTransform(ze,{modifiers:m,parentType:c,fields:d}):ze}function NA(n,e){return n.map(t=>{if(!kn(t))return t;const r=e[t.name]??e[t.attributes?.["data-field"]],i=r&&!t.attributes["data-name"]?{...t,attributes:{...t.attributes,"data-name":r}}:t;return i.children.length===0?i:{...i,children:NA(i.children,e)}})}function xv(n,e,t,r){const i=n.attributes["data-name"];if(i){const s=`${e}__${i}`,o=n.attributes.class||"",a=n.children.map(u=>kn(u)?xv(u,e,t,r):u),l=t?.[i],c=r?.[i];return{...n,attributes:{...n.attributes,class:[s,o].filter(Boolean).join(" "),...l?{"data-section":l}:{},...c?{"data-media":c}:{}},children:a}}return n}const m0=/^\[(x|X|>|\s|-)\]\s*/,g0={x:"checked",X:"checked"," ":"unchecked",">":"active","-":"skipped"};function zj(n){const e=n.children;if(e.length===0)return null;const t=e[0];if(typeof t=="string"){const r=t.match(m0);if(!r)return null;const i=g0[r[1]]??"unchecked",s=t.slice(r[0].length);return{...n,attributes:{...n.attributes,"data-checked":i},children:[s,...e.slice(1)]}}if(kn(t)&&t.name==="p"&&t.children.length>0){const r=t.children[0];if(typeof r=="string"){const i=r.match(m0);if(!i)return null;const s=g0[i[1]]??"unchecked",o=r.slice(i[0].length),a={...t,children:[o,...t.children.slice(1)]};return{...n,attributes:{...n.attributes,"data-checked":s},children:[a,...e.slice(1)]}}}return null}function BA(n,e,t){for(let r=0;r<n.length;r++){const i=n[r];if(kn(i))if(i.name==="ol"){const s={...i.attributes,"data-sequence":e};t&&(s["data-sequence-direction"]=t),n[r]={...i,attributes:s}}else i.children.length>0&&BA(i.children,e,t)}}function jA(n,e){const t=n.findIndex(r=>kn(r)&&r.attributes?.["data-name"]===e);if(t!==-1){const r=n[t],i=[...n.slice(0,t),...n.slice(t+1)];return{element:r,rest:i}}for(let r=0;r<n.length;r++){const i=n[r];if(!kn(i))continue;const s=i;if(s.attributes?.["data-name"]!=="preamble")continue;const o=jA(s.children,e);if(!o)continue;const a=[...n];return o.rest.length===0?a.splice(r,1):a[r]={...s,children:o.rest},{element:o.element,rest:a}}return null}function zA(n,e){for(const t of n){if(!kn(t))continue;const r=t;if(r.attributes?.["data-name"]===e)return r;const i=zA(r.children,e);if(i)return i}return null}function ZA(n,e,t,r){return n.map(i=>{if(!kn(i))return i;const s=i;if(s.attributes?.["data-name"]===e){const a=r==="prepend"?[t,...s.children]:[...s.children,t];return{...s,children:a}}const o=ZA(s.children,e,t,r);return o!==s.children?{...s,children:o}:i})}function Zj(n,e,t,r,i){let s=[...n];if(e.hide){const o=new Set(e.hide);s=s.filter(a=>{if(!kn(a))return!0;const l=a.attributes?.["data-name"];return!l||!o.has(l)})}if(e.group)for(const[o,a]of Object.entries(e.group)){const l=new Set(a.members),c=[];let u=-1;for(let f=s.length-1;f>=0;f--){const d=s[f];if(!kn(d))continue;const h=d.attributes?.["data-name"];h&&l.has(h)&&(c.unshift(d),(u===-1||f<u)&&(u=f),s.splice(f,1))}if(c.length>0){let f=Rt(a.tag,{"data-name":o},c);f=xv(f,t,r,i),s.splice(u,0,f)}}if(e.relocate)for(const[o,a]of Object.entries(e.relocate)){const l=jA(s,o);if(!l)continue;s=l.rest,zA(s,a.into)&&(s=ZA(s,a.into,l.element,a.position??"append"))}return s}function pf(n,e,t,r){if(n.condition&&!t[n.condition]||n.conditionAny&&!n.conditionAny.some(l=>t[l]))return null;const i=n.ref??e;if(n.repeat){const l=parseInt(t[n.repeat.count]??"",10);if(!l||l<0||isNaN(l))return Rt(n.tag,{"data-name":i},[]);const c=n.repeat.max??10,u=Math.min(l,c),f=n.repeat.filled?parseInt(t[n.repeat.filled]??"0",10):0,d=Math.max(0,Math.min(f,u)),h=[];for(let m=0;m<u;m++){const p=m<d;if(p&&n.repeat.filledElement){const O=pf(n.repeat.filledElement,n.repeat.filledElement.ref??"",t);O&&h.push(O)}else{const O=pf(n.repeat.element,n.repeat.element.ref??"",t);O&&(n.repeat.filled?h.push({...O,attributes:{...O.attributes,"data-filled":p?"true":"false"}}):h.push(O))}}return Rt(n.tag,{"data-name":i},h)}const s={};if(n.attrs)for(const[l,c]of Object.entries(n.attrs))typeof c=="string"?s[l]=c:"fromModifier"in c&&(s[l]=t[c.fromModifier]??"");const o={"data-name":i,...s};if(n.metaType&&(o["data-meta-type"]=n.metaType),n.sentimentMap&&n.metaText){const l=t[n.metaText];if(l){const c=n.sentimentMap[l];c&&(o["data-meta-sentiment"]=c)}}if(n.icon)return Rt(n.tag,o,[]);if(n.metaText){let l=t[n.metaText]??"";if(n.transform&&fd[n.transform]&&(l=fd[n.transform](l)),n.label){const c={"data-meta-label":""};n.labelHidden&&(c["data-meta-label-hidden"]="");const u=Rt("span",c,[n.label]);let f=l;n.textPrefix&&(f=n.textPrefix+f),n.textSuffix&&(f=f+n.textSuffix);const d=Rt("span",{"data-meta-value":""},[f]);return Rt(n.tag,o,[u,d])}return n.textPrefix&&(l=n.textPrefix+l),n.textSuffix&&(l=l+n.textSuffix),Rt(n.tag,o,[l])}const a=[];if(n.children)for(const l of n.children)if(typeof l=="string")a.push(l);else{const c=pf(l,l.ref??"",t);c&&a.push(c)}return Rt(n.tag,o,a)}function Xj(n,e,t){const r=e[n];if(!r)return null;if(r.condition){const a=t[r.condition];if(!(r.renderWhenEmpty?a!==void 0:!!a))return null}let i=t[n]??"";if(!i&&r.condition&&!r.renderWhenEmpty)return null;r.transform&&fd[r.transform]&&(i=fd[r.transform](i));const s=r.href?t[r.href]??"":void 0;if(r.href&&!s)return null;const o=r.rating?t[r.rating.total??""]||"5":void 0;return{name:n,value:i,field:r,href:s,ratingTotal:o}}function XA(n,e={includeLabel:!0}){const{field:t,value:r}=n,i={class:"rf-badge"};if(t.metaType&&(i["data-meta-type"]=t.metaType),t.sentimentMap){const a=t.sentimentMap[r];a&&(i["data-meta-sentiment"]=a)}const s=t.tag??"span",o={...i};return s==="time"&&r&&(o.datetime=r),e.includeLabel&&t.label?Rt(s,o,[Rt("span",{"data-meta-label":""},[t.label]),Rt("span",{"data-meta-value":""},[r])]):Rt(s,o,[r])}function Fj(n){const{field:e,value:t}=n,r={};e.metaType&&(r["data-meta-type"]=e.metaType);const i=e.tag??"span";return i==="time"&&t&&(r.datetime=t),Rt(i,r,[t])}function FA(n){const e=n.field.splitOn;return!e||!n.value?[n.value].filter(Boolean):n.value.split(e).map(t=>t.trim()).filter(Boolean)}const Vj=new Set(["status","category","tag"]);function VA(n){return n.metaType!==void 0&&Vj.has(n.metaType)}function Wj(n){return Rt("a",{href:n.href??"","data-meta-type":"link"},[n.field.label??n.value])}function Yj(n){const e=Math.max(0,parseInt(n.value,10)||0),t=Math.max(0,parseInt(n.ratingTotal??"5",10)||5),r=[];for(let i=0;i<t;i++)r.push(Rt("span",{"data-filled":i<e?"true":"false"},[]));return Rt("span",{"data-meta-type":"rating"},r)}function Uj(n){const e=n.field.icon.group,t={};return n.field.metaType&&(t["data-meta-type"]=n.field.metaType),Rt(n.field.tag??"span",t,[Rt("span",{"data-icon-group":e,"data-icon":n.value},[]),Rt("span",{"data-meta-value":""},[n.field.label??n.value])])}function rg(n,e=!1){return n.field.href?Wj(n):n.field.rating?Yj(n):n.field.icon?Uj(n):VA(n.field)?XA(n,{includeLabel:e}):Fj(n)}function Gj(n,e,t){if(e.length===0)return null;const r=[];for(const{resolved:s,align:o}of e){const a=s.field.splitOn&&s.value?FA(s).map(l=>rg({...s,value:l})):[rg(s)];o==="end"&&a.length>0&&(a[0]={...a[0],attributes:{...a[0].attributes,"data-align":"end"}}),r.push(...a)}const i={"data-name":n,"data-zone":n,"data-zone-layout":"bar"};return t===!1&&(i["data-wrap"]="false"),Rt("div",i,r)}function Hj(n,e){if(e.length===0)return null;const t=e.map(r=>{const i=Rt("dt",{"data-meta-label":""},[r.field.label??r.name]);let s;if(r.field.splitOn&&r.value){const o=FA(r).map(a=>rg({...r,value:a}));s=Rt("dd",{"data-multi-value":""},o)}else if(VA(r.field))s=Rt("dd",{},[XA(r,{includeLabel:!1})]);else{const o={};r.field.metaType&&(o["data-meta-type"]=r.field.metaType);const a=r.field.tag==="time"&&r.value?Rt("time",{datetime:r.value},[r.value]):r.value;s=Rt("dd",o,[a])}return Rt("div",{"data-name":"row","data-field":r.name},[i,s])});return Rt("dl",{"data-name":n,"data-zone":n,"data-zone-layout":"definition-list"},t)}function Kj(n,e,t,r){const i=n.blocks??{},s=n.layout??{},o=n.metaFields??{},a=f=>{const d=i[f];if(!d)return null;const h=[];for(const m of d.fields){const p=typeof m=="string"?m:m.field,O=typeof m=="string"?void 0:m.align,v=Xj(p,o,r);v&&h.push({resolved:v,align:O})}return h.length===0?null:d.layout==="bar"?Gj(f,h,d.wrap??!0):Hj(f,h.map(m=>m.resolved))};if(Object.keys(s).length===0)return t;const l={layout:s,renderBlock:a},c=s.root;if(c){const f=Array.isArray(c)?c:c.children,d=ig(t),h=new Set,m=dd(f,d,h,l,["root"]),p=t.filter(O=>!(kn(O)&&O.attributes["data-name"]&&h.has(O.attributes["data-name"])));return[...m,...p]}let u=t;for(const[f,d]of Object.entries(s)){const h=Array.isArray(d)?d:d.children;u=e6(u,f,m=>{const p=ig(m),O=new Set,v=dd(h,p,O,l,[f]),b=m.filter(_=>!(kn(_)&&_.attributes["data-name"]&&O.has(_.attributes["data-name"])));return[...v,...b]})}return u}const O0=new Set;function Jj(n){O0.has(n)||(O0.add(n),console.warn(`[refrakt] layout reference cycle at "${n}" — skipping to break the loop.`))}function ig(n){const e=new Map;for(const t of n)kn(t)&&t.attributes["data-name"]&&e.set(t.attributes["data-name"],t);return e}function dd(n,e,t,r,i){const s=[];for(const o of n){if(t.has(o))continue;if(i.includes(o)){Jj(o);continue}const a=r.layout[o];if(a&&!Array.isArray(a)&&a.tag){t.add(o);const u=dd(a.children,e,t,r,[...i,o]);s.push(Rt(a.tag,{"data-name":o,...a.attrs??{}},u));continue}if(a){const u=e.get(o);if(u){t.add(o);const f=Array.isArray(a)?a:a.children,d=ig(u.children),h=new Set,m=dd(f,d,h,r,[...i,o]),p=u.children.filter(O=>!(kn(O)&&O.attributes["data-name"]&&h.has(O.attributes["data-name"])));s.push({...u,children:[...m,...p]});continue}}const l=r.renderBlock(o);if(l){t.add(o),s.push(l);continue}const c=e.get(o);if(c){t.add(o),s.push(c);continue}}return s}function e6(n,e,t){let r=!1;const i=s=>s.map(o=>r||!kn(o)?o:o.attributes["data-name"]===e?(r=!0,{...o,children:t(o.children)}):{...o,children:i(o.children)});return i(n)}const t6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),n6=new Set(["$$mdtype"]);function WA(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function r6(n){const e=[];for(const[t,r]of Object.entries(n))if(!n6.has(t)&&!(r==null||r===!1)){if(r===!0){e.push(t);continue}e.push(`${t}="${WA(String(r))}"`)}return e.length?" "+e.join(" "):""}function i6(n,e){return jl(n)}function jl(n){if(n==null)return"";if(typeof n=="string")return WA(n);if(typeof n=="number")return String(n);if(Array.isArray(n))return n.map(jl).join("");if(!kn(n))return"";const e=n.name;if(!e)return n.children.map(jl).join("");const t=r6(n.attributes);if(t6.has(e))return`<${e}${t} />`;const i=n.attributes?.["data-codeblock"]||n.attributes?.["data-raw-html"]?n.children.map(s=>typeof s=="string"?s:jl(s)).join(""):n.children.map(jl).join("");return`<${e}${t}>${i}</${e}>`}function s6(n,e,t,r){if(!n)return null;const i=n.endsWith("/")?n.slice(0,-1):n,s=e&&e.length>0?e:"main",o=t.split("/").map(l=>encodeURIComponent(l)).join("/"),a=r?`#${o6(r)}`:"";return`${i}/blob/${s}/${o}${a}`}function o6(n){const e=n.trim(),t=e.indexOf("-");if(t<0)return`L${e}`;const r=e.slice(0,t).trim(),i=e.slice(t+1).trim();return i?`L${r}-L${i}`:`L${r}`}const{Tag:DY}=B;function a6(n,e){if(typeof e=="function")return e(n);const t=typeof e=="string"?{node:e}:e;return!(t.node&&n.type!==t.node||t.descendant&&!Array.from(n.walk()).some(r=>r.type===t.descendant)||t.descendantTag&&!Array.from(n.walk()).some(r=>r.type==="tag"&&r.tag===t.descendantTag))}const{Ast:v0}=B;function*YA(n){yield n;for(const e of n.children)B.Tag.isTag(e)?yield*YA(e):yield e}function Sv(n){const e=n?.level,t=n?.include;return r=>{const i=e??r.find(c=>c.type==="heading")?.attributes.level;if(!i)return r;let s;const o=new v0.Node("list"),a=[];let l=[];for(let c=0;c<r.length;c++){const u=r[c];if(u.type==="heading"&&u.attributes.level===i)o.children.push(new v0.Node("item",{},[u])),s=c;else if(s===void 0)a.push(u);else if(!t||t.some(f=>a6(u,f))){const f=o.children.at(-1);f&&f.children.push(u)}else{l=r.slice(c);break}}return o.children.length===0?r:[...a,o,...l]}}class je{constructor(e){this.nodes=e,this.offset=0}static fromData(e,t){return new je([new B.Tag(t,{},[e])])}wrap(e,t={}){return new je([new B.Tag(e,t,this.nodes)])}tag(e){const t=this.nodes.filter(r=>B.Tag.isTag(r)&&r.name===e);return new je(t)}tags(...e){const t=this.nodes.filter(r=>B.Tag.isTag(r)&&e.includes(r.name));return new je(t)}headings(){return this.tags("h1","h2","h3","h4","h5","h6")}typeof(e){return new je(this.nodes.filter(t=>B.Tag.isTag(t)&&t.attributes["data-rune"]===Zo(e)))}concat(...e){const t=e.map(r=>r instanceof je?r.nodes:r).flat();return new je([...this.nodes,...t])}flatten(){const e=this.nodes.map(t=>B.Tag.isTag(t)?Array.from(YA(t)):t).flat();return new je(e)}limit(e){return new je(this.nodes.slice(0,e))}slice(e,t){return new je(this.nodes.slice(e,t))}toArray(){return this.nodes}count(){return this.nodes.length}next(){return this.nodes[this.offset++]}}function qe(n){const e=n.rune,t=n.typeof??n.schemaOrgType;if(n.properties&&n.refs){const c=new Set(Object.keys(n.properties)),u=Object.keys(n.refs).filter(f=>c.has(f));if(u.length>0)throw new Error(`Rune "${e}" has naming collisions between properties and refs: ${u.join(", ")}. Properties and refs share a flat namespace (ADR-008) and must have unique names.`)}const r=new Set;for(const c of Object.values(n.schema??{})){if(c===void 0)continue;const u=c instanceof je?c.nodes:Array.isArray(c)?c:[c];for(const f of u)r.add(f)}const i={},s=new Set;for(const[c,u]of Object.entries(n.properties??{})){if(u===void 0)continue;const f=u instanceof je?u.nodes:Array.isArray(u)?u:[u],d=[];f.forEach(h=>{if(B.Tag.isTag(h)){const m=h.name==="meta"&&r.has(h);m||(h.attributes["data-field"]=Zo(c)),h.name==="meta"&&h.attributes.content!==void 0&&(d.push(h.attributes.content),m||s.add(h))}}),d.length===1?i[c]=d[0]:d.length>1&&(i[c]=d)}for(const[c,u]of Object.entries(n.refs||{})){if(u===void 0)continue;(u instanceof je?u.nodes:Array.isArray(u)?u:[u]).forEach(d=>{B.Tag.isTag(d)&&(d.attributes["data-name"]=c)})}const o=new Set;for(const[c,u]of Object.entries(n.schema??{})){if(u===void 0)continue;(u instanceof je?u.nodes:Array.isArray(u)?u:[u]).forEach(d=>{if(B.Tag.isTag(d)){if(d.name==="meta"&&(d.attributes.content===void 0||d.attributes.content==="")){o.add(d);return}d.attributes.property=c}})}const a=(Array.isArray(n.children)?n.children:[n.children]).filter(c=>!o.has(c)&&!s.has(c));return new B.Tag(n.tag,{id:n.id,"data-field":n.property?Zo(n.property):n.property,"data-rune":e,typeof:t,class:n.class,...Object.keys(i).length>0?{"data-rune-fields":JSON.stringify(i)}:{}},a)}function l6(n){return n.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*>/gi,"")}function c6(n){let e=n.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*[^\s>]+/gi,""),e}function u6(n){return n.replace(/(\s(?:href|src|action|formaction|xlink:href)\s*=\s*)(["'])\s*javascript:[^"']*\2/gi,"$1$2$2")}function f6(n){let e=n.replace(/<iframe\b[^>]*>[\s\S]*?<\/iframe\s*>/gi,"");return e=e.replace(/<object\b[^>]*>[\s\S]*?<\/object\s*>/gi,""),e=e.replace(/<embed\b[^>]*\/?>/gi,""),e=e.replace(/<iframe\b[^>]*\/>/gi,""),e=e.replace(/<object\b[^>]*\/>/gi,""),e}function d6(n,e){if(e.trust==="trusted"||e.allowJs)return n;let t=l6(n);return t=c6(t),t=u6(t),t=f6(t),t}const h6=new WeakMap;function at(n){return Array.isArray(n)?n:n!=null?[n]:[]}const p6={tint:{type:String,required:!1,description:"Color tint preset applied to this block"},"tint-mode":{type:String,required:!1,matches:["auto","dark","light"],description:"Whether the tint adapts to auto, dark, or light mode"},bg:{type:String,required:!1,description:"Background preset applied to this block"},width:{type:String,required:!1,matches:["compact","narrow","content","wide","full"],description:"Maximum width constraint for this block"},spacing:{type:String,required:!1,matches:["flush","tight","default","loose","breathe"],description:"Vertical spacing above and below this block"},inset:{type:String,required:!1,matches:["flush","tight","default","loose","breathe"],description:"Inner padding of this block"}};function m6(n,e){if(!B.Tag.isTag(n))return n;const t=[];if(e.tintNode){const i=B.transform(e.tintNode,e.config);if(B.Tag.isTag(i))for(const s of i.children)B.Tag.isTag(s)&&s.name==="meta"&&t.push(s)}const r=i=>t.some(s=>B.Tag.isTag(s)&&s.attributes["data-field"]===i);return e.tint&&!r("tint")&&t.push(new B.Tag("meta",{"data-field":"tint",content:e.tint})),e["tint-mode"]&&e["tint-mode"]!=="auto"&&!r("tint-mode")&&t.push(new B.Tag("meta",{"data-field":"tint-mode",content:e["tint-mode"]})),t.length===0||(n.children=[...n.children,...t]),n}function g6(n,e){if(!B.Tag.isTag(n))return n;const t=[];if(e.bgNode){const i=B.transform(e.bgNode,e.config);if(B.Tag.isTag(i))for(const s of i.children)B.Tag.isTag(s)&&s.name==="meta"&&t.push(s)}const r=t.some(i=>B.Tag.isTag(i)&&i.attributes["data-field"]==="bg-preset");return e.bg&&!r&&t.push(new B.Tag("meta",{"data-field":"bg-preset",content:e.bg})),t.length===0||(n.children=[...n.children,...t]),n}function He(n){const e={};n.base&&Object.assign(e,n.base),n.attributes&&Object.assign(e,n.attributes),Object.assign(e,p6),n.deferBody&&(e["__deferred-body"]={type:String,required:!1});const t=n.deprecations;if(t){for(const[i,s]of Object.entries(t))if(!e[i]){const o=e[s.newName];e[i]={type:o?.type??String,required:!1,deprecated:!0}}}const r={attributes:e,...n.selfClosing!=null&&{selfClosing:n.selfClosing},transform:(i,s)=>{if(t){for(const[m,p]of Object.entries(t))if(i.attributes[m]!==void 0&&i.attributes[p.newName]===void 0){const O=p.transform?p.transform(i.attributes[m],i.attributes):i.attributes[m];O!==void 0&&(i.attributes[p.newName]=O)}}const o=i.transformAttributes(s),a=typeof n.contentModel=="function"?n.contentModel(o):n.contentModel,{content:l,tintNode:c,bgNode:u}=kj(i.children,a,o),f=n.transform(l,o,s,i),d={tintNode:c,bgNode:u,tint:o.tint,"tint-mode":o["tint-mode"],bg:o.bg,config:s},h=g6(m6(f,d),d);return B.Tag.isTag(h)&&(o.width&&(h.attributes.width=o.width),o.spacing&&(h.attributes.spacing=o.spacing),o.inset&&(h.attributes.inset=o.inset)),h}};return t&&(r.validate=i=>{const s=[];for(const[o,a]of Object.entries(t))i.attributes[o]!==void 0&&s.push({id:"deprecated-attribute",level:"warning",message:`Attribute "${o}" is deprecated. Use "${a.newName}" instead.`});return s}),n.deferBody&&(r.deferBody=!0),h6.set(r,n.contentModel),n.base&&Aj.set(r,n.base),r}const{Tag:Du}=B,O6=He({attributes:{type:{type:String},tag:{type:String},lines:{type:Array},error:{type:Object}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=e.error,r=new Du("td",{},[t.id]),i=new Du("td",{},[e.tag]),s=new Du("td",{},[t.level]),o=new Du("td",{},[t.message]);return qe({rune:"error",tag:"tr",property:"error",properties:{code:r,tag:i,level:s,message:o},children:[i,r,s,o]})}});class v6{validate(e,t,r){return typeof e!="string"?[{id:"attribute-type-invalid",level:"critical",message:`Attribute '${r}' is not a string`}]:[]}}class b6 extends v6{transform(e){return e?e.split(" ").map(t=>t.trim()):[]}}const{Tag:y6}=B,w6=["row","column","dense","row dense","column dense"];function _6(n,e){return!n||n.length===0?e.map(t=>({colspan:1,rowspan:void 0,children:t})):n.map((t,r)=>{const[i,s]=t.split(":");return{colspan:parseInt(i),rowspan:s?parseInt(s):void 0,children:e[r]}}).filter(t=>t.children!==void 0)}function k6(n){const e=n.items.map(({children:r,colspan:i,rowspan:s})=>r.wrap("div",{"data-colspan":i,"data-rowspan":s}).toArray()).flat(),t={"data-layout":"grid","data-columns":n.columns,"data-rows":n.rows,"data-flow":n.flow};return new y6("div",t,e)}const{Tag:Cs}=B,x6=["columns","auto","masonry"],S6=He({attributes:{columns:{type:Number,required:!1,description:"Number of grid columns"},rows:{type:Number,required:!1,description:"Number of grid rows"},flow:{type:String,required:!1,matches:w6.slice(),description:"Direction items fill the grid"},spans:{type:b6,required:!1,description:"Column span widths for each cell (space-separated)"},ratio:{type:String,required:!1,description:'Column width ratio (e.g. "2 1 1")'},gap:{type:String,required:!1,matches:["none","tight","default","loose"],description:"Space between grid cells"},valign:{type:String,required:!1,matches:["top","center","bottom","stretch","baseline"],description:"Vertical alignment of cell content"},collapse:{type:String,required:!1,matches:["sm","md","lg","never"],description:"Breakpoint at which grid collapses to a single column"},mode:{type:String,required:!1,matches:["columns","auto","masonry"],default:"columns",description:"Grid sizing: fixed columns, auto-fit, or masonry"},min:{type:String,required:!1,description:"Minimum cell width for auto-fit mode"},aspect:{type:String,required:!1,description:"Aspect ratio for grid cells"},stack:{type:String,required:!1,matches:["natural","reverse"],description:"Stacking order when collapsed"}},contentModel:{type:"delimited",delimiter:"hr",dynamicZones:!0,zoneModel:{type:"sequence",fields:[{name:"content",match:"any",greedy:!0,optional:!0}]}},deprecations:{layout:{newName:"spans",transform:(n,e)=>{if(typeof n=="string"&&x6.includes(n)){e.mode=n;return}return n}}},transform(n,e,t){const i=(n.zones??[]).map(p=>new je(B.transform(at(p.content),t))),s=k6({items:_6(e.spans,i),rows:e.rows,columns:e.columns,flow:e.flow}),o=e.ratio?new Cs("meta",{content:e.ratio}):void 0,a=e.gap&&e.gap!=="default"?new Cs("meta",{content:e.gap}):void 0,l=e.valign?new Cs("meta",{content:e.valign}):void 0,c=e.collapse?new Cs("meta",{content:e.collapse}):void 0,u=e.mode&&e.mode!=="columns"?new Cs("meta",{content:e.mode}):void 0,f=e.min?new Cs("meta",{content:e.min}):void 0,d=e.aspect?new Cs("meta",{content:e.aspect}):void 0,h=e.stack?new Cs("meta",{content:e.stack}):void 0,m=[o,a,l,c,u,f,d,h].filter(Boolean);return qe({rune:"grid",tag:"section",children:[...m,s],properties:{...u?{mode:u}:{},ratio:o,gap:a,valign:l,collapse:c,...f?{min:f}:{},...d?{aspect:d}:{},...h?{stack:h}:{}},refs:{cell:new je(s.children).tag("div")}})}}),{Tag:Al}=B,A6={js:"JavaScript",ts:"TypeScript",py:"Python",rb:"Ruby",rs:"Rust",go:"Go",sh:"Shell",bash:"Bash",zsh:"Zsh",shell:"Shell",html:"HTML",css:"CSS",json:"JSON",yaml:"YAML",sql:"SQL",swift:"Swift",kt:"Kotlin",java:"Java",cpp:"C++",c:"C",cs:"C#",php:"PHP"};function C6(n){return A6[n]||n.charAt(0).toUpperCase()+n.slice(1)}function T6(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function P6(n,e){if(!n)return"";const t=T6(n);return t?e?`${t}:${e}`:t:""}const E6=["scroll","wrap","hide"],$6=He({attributes:{title:{type:String,required:!1,description:"Title displayed above the code group"},labels:{type:String,required:!1,description:"Comma-separated custom tab labels"},overflow:{type:String,required:!1,matches:E6.slice(),description:"How overflowing code is handled"}},contentModel:{type:"sequence",fields:[{name:"panels",match:"fence",greedy:!0}]},transform(n,e,t){const r=e.labels?.split(",").map(p=>p.trim())??[],i={},s=[];if(e.title!==void 0){const p=new Al("meta",{content:e.title});i.title=p,s.push(p)}const o=e.overflow;if(o&&o!=="scroll"){const p=new Al("meta",{content:o});i.overflow=p,s.push(p)}const a=at(n.panels);if(a.length===1&&r.length===0){const p=B.transform(a[0],t);return s.push(p),qe({rune:"code-group",tag:"section",properties:i,refs:{},children:s})}const c=[],u=[];for(const p of a){const O=p.attributes.language||"shell",v=typeof p.attributes.label=="string"?p.attributes.label:"",b=P6(typeof p.attributes.source=="string"?p.attributes.source:void 0,typeof p.attributes.lines=="string"?p.attributes.lines:void 0),_=r[c.length]||v||b||C6(O),C=new Al("span",{},[_]);c.push(new Al("button",{"data-name":"tab",role:"tab"},[C]));const y=B.transform(p,t);u.push(new Al("div",{role:"tabpanel"},[y]))}const f=new je(c),d=new je(u),h=f.wrap("div",{role:"tablist"}),m=d.wrap("div");return s.push(h.next(),m.next()),qe({rune:"code-group",tag:"section",properties:i,refs:{tabs:h,panels:m,panel:d},children:s})}}),Q6=He({attributes:{path:{type:String,required:!0,description:"Path to the source file, relative to the project root. Rejected if it escapes the root."},lines:{type:String,required:!1,description:'Line range. Formats: "10-25", "10-" (to EOF), "-20" (from start), "10" (single line). 1-indexed, inclusive.'},lang:{type:String,required:!1,description:"Syntax-highlighting language hint. Overrides the extension-based inference."},linenumbers:{type:Boolean,required:!1,description:'Show line numbers in the gutter. Starting number derives from the `lines` range start (e.g. lines="74-125" → first line is 74), so numbers reflect the file\'s real offsets. WORK-304.'},highlight:{type:String,required:!1,description:'Range(s) to emphasize without cropping — Shiki-style format: "74-78", "74-78,82,90-92". Indices are file coordinates (same frame as `lines=`). Use this when you want full context visible but want to draw the eye to specific lines. WORK-304.'}},contentModel:{type:"sequence",fields:[]},transform(n,e){throw new Error("snippet rune reached the transform phase — its preprocess hook was not wired through. Ensure the content pipeline runs registered `preprocess` hooks before `Markdoc.transform` (snippet pre-resolves to a Markdoc `fence` node; see SPEC-062 § Composition).")}}),{Tag:L6}=B,M6=["caution","check","note","warning"],D6=He({attributes:{type:{type:String,matches:M6.slice(),errorLevel:"critical",description:"Visual style: caution, check, note, or warning"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new L6("meta",{content:e.type??"note"}),s=new je(B.transform(at(n.body),t)).wrap("div");return qe({rune:"hint",tag:"section",property:"contentSection",properties:{hintType:r},refs:{body:s.tag("div")},children:[r,s.next()]})}}),UA={layout:{type:String,required:!1,matches:["stacked","split","split-reverse"],description:"Display mode: stacked vertically, or split side-by-side"},ratio:{type:String,required:!1,description:'Column width ratio in split layout (e.g. "2 1")'},valign:{type:String,required:!1,matches:["top","center","bottom"],description:"Vertical alignment of columns in split layout"},gap:{type:String,required:!1,matches:["none","tight","default","loose"],description:"Space between columns in split layout"},collapse:{type:String,required:!1,matches:["sm","md","lg","never"],description:"Breakpoint at which split layout collapses to stacked"}};Sj(UA,{name:"split layout",description:"Layout controls for runes that can render stacked vertically or split into side-by-side columns."});const q6=UA;He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=n.body?Array.isArray(n.body)?n.body:[n.body]:[],i=new je(B.transform(r,{...t,nodes:{...t.nodes,text:{transform(s){return new B.Tag("span",{},[s.attributes.content])}}}}));return new B.Tag("li",{},i.toArray())}});function R6(n){const e=n.layout||"stacked",t=n.ratio||"1 1",r=n.valign||"top",i=n.gap||"default",s=n.collapse,o=new B.Tag("meta",{content:e}),a=e!=="stacked"?new B.Tag("meta",{content:t}):void 0,l=e!=="stacked"?new B.Tag("meta",{content:r}):void 0,c=i!=="default"?new B.Tag("meta",{content:i}):void 0,u=s?new B.Tag("meta",{content:s}):void 0,f=[o];return a&&f.push(a),l&&f.push(l),c&&f.push(c),u&&f.push(u),{metas:{layout:o,ratio:a,valign:l,gap:c,collapse:u},children:f}}function I6(n){for(const e of n.toArray()){if(B.Tag.isTag(e)&&e.name==="img")return e;if(B.Tag.isTag(e)&&e.name==="p"){const t=e.children.find(r=>B.Tag.isTag(r)&&r.name==="img");if(t)return t}}}function N6(n){return n.map(e=>B.Tag.isTag(e)&&e.name==="p"&&e.children.length===1&&B.Tag.isTag(e.children[0])&&(e.children[0].name==="img"||e.children[0].attributes?.["data-rune"])?e.children[0]:e)}function Jc(n){const e=n.nodes,t=c=>B.Tag.isTag(c)&&/^h[1-6]$/.test(c.name),r=c=>B.Tag.isTag(c)&&c.name==="p",i=e.findIndex(t);if(i===-1)return{eyebrow:void 0,headline:void 0,image:n.tag("img").limit(1),blurb:e.find(r)};const s=e.slice(0,i).findIndex(r);let o,a;if(s!==-1)o=e[s],a=i;else{const c=e.findIndex((u,f)=>f>i&&t(u));c!==-1?(o=e[i],a=c):(o=void 0,a=i)}const l=e.findIndex((c,u)=>u>a&&r(c));return{eyebrow:o,headline:e[a],image:n.tag("img").limit(1),blurb:l!==-1?e[l]:void 0}}const{Ast:GA,Tag:B6}=B,j6=He({attributes:{name:{type:String,required:!0},image:{type:String,required:!1}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){let r=new je([]);e.image&&(r=r.concat(B.transform(new GA.Node("image",{src:e.image}),t))),r=r.concat(new B6("span",{},[e.name??""]));const i=new je(B.transform(at(n.body),t)),s=r.tag("span"),o=r.tag("svg");return[qe({rune:"tab",tag:"button",properties:{image:o},refs:{name:s},children:r.toArray()}),qe({rune:"tab-panel",tag:"div",properties:{},children:i.toArray()})]}});function z6(n){const e=Sv()(n),t=e.length-1;if(!e[t]||e[t].type!=="list")return n;const r=e[t].children.map(i=>{const s=i.children[0],o=Array.from(s.walk()).find(l=>l.type==="image"),a=Array.from(s.walk()).filter(l=>l.type==="text").map(l=>l.attributes.content);return new GA.Node("tag",{name:a,image:o?o.attributes.src:void 0},i.children.slice(1),"tab")});return e.splice(t,1,...r),e}const Z6=He({attributes:{},contentModel:()=>({type:"custom",processChildren:n=>z6(n),description:"Converts headings at the specified level to tab tags, extracting tab name and optional image from heading content."}),transform(n,e,t){const r=at(n.children),i=[],s=[];for(const h of r)h.type==="tag"&&h.tag==="tab"?s.push(h):(h.type==="heading"||h.type==="paragraph")&&i.push(h);const o=new je(B.transform(i,t)),a=new je(B.transform(s,t)),l=a.tag("button").typeof("Tab"),c=a.tag("div").typeof("TabPanel"),u=l.wrap("div",{role:"tablist"}),f=c.wrap("div"),d=o.count()>0?[o.wrap("header").next(),u.next(),f.next()]:[u.next(),f.next()];return qe({rune:"tab-group",tag:"section",class:e.class,property:"contentSection",properties:{},refs:{...Jc(o),tabs:u,panels:f},children:d})}}),HA="__nav-auto",KA="auto";function Av(n){return B.Tag.isTag(n)&&(n.name==="ul"||n.name==="ol")}const X6=He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),{...t,nodes:{...t.nodes,text:{transform(O){return new B.Tag("span",{"data-field":"slug"},[O.attributes.content])}}}})),i=r.tag("a").toArray(),s=r.tag("span"),o=r.tag("ul"),a=r.toArray().filter(O=>B.Tag.isTag(O)&&O.attributes?.["data-rune"]==="badge"),l=r.tag("p").toArray(),c=[],u=[];for(const O of l)O.children.some(b=>B.Tag.isTag(b)&&b.name==="a")?c.push(O):u.push(O);const f=c.flatMap(O=>O.children.filter(v=>B.Tag.isTag(v)&&v.name==="a")),d=[...i,...f],h=u.flatMap(O=>O.children),m=h.length>0?new B.Tag("span",{"data-name":"description",class:"rf-nav-item__description"},h):void 0;if(d.length>0){const O=m?d.map(b=>({...b,children:[...b.children??[],m]})):d,v=[];if(a.length>0){for(const b of a)b.attributes["data-name"]="badge";v.push(...a)}return qe({rune:"nav-item",tag:"li",properties:m?{description:m}:{},children:[...O,...v]})}const p=[];if(s.count()>0&&p.push(...s.toArray()),m&&p.push(m),a.length>0){for(const O of a)O.attributes["data-name"]="badge";p.push(...a)}return o.count()>0&&p.push(...o.toArray()),qe({rune:"nav-item",tag:"li",properties:{slug:s,...m?{description:m}:{},children:o.count()>0?o.flatten().tag("li"):void 0},children:p})}});function F6(n){const e=[],t=[];let r=null;const i=()=>{r&&(t.push(r),r=null)};for(const s of n){if(B.Tag.isTag(s)&&/^h[1-6]$/.test(s.name)){i(),r={kind:"group",heading:s,children:[]};continue}if(B.Tag.isTag(s)&&s.name==="hr"){r&&i(),t.push({kind:"column-break"});continue}if(!r){B.Tag.isTag(s)&&Av(s)&&e.push(...s.children.filter(o=>B.Tag.isTag(o)&&o.name==="li"));continue}r.children.push(s)}return i(),{topLevel:e,sequence:t}}function V6(n){const e=u=>B.Tag.isTag(u)?u.name==="ul"||u.name==="ol"?!0:!!u.attributes?.["data-rune"]:!1,t=u=>B.Tag.isTag(u)&&!e(u);let r=-1,i=-1;n.forEach((u,f)=>{e(u)&&(r===-1&&(r=f),i=f)});let s,o;if(r!==-1){for(let u=0;u<r;u++)if(t(n[u])){s=u;break}for(let u=n.length-1;u>i;u--)if(t(n[u])){o=u;break}}else{const u=[];n.forEach((f,d)=>{t(f)&&u.push(d)}),u.length===1?s=u[0]:u.length>=2&&(s=u[0],o=u[u.length-1])}const a=s!==void 0?n[s]:void 0,l=o!==void 0?n[o]:void 0,c=[];return n.forEach((u,f)=>{f===s||f===o||c.push(u)}),{intro:a,body:c,footer:l}}function W6(n){const{intro:e,body:t,footer:r}=V6(n.children),i=[];for(const a of t)B.Tag.isTag(a)&&Av(a)&&i.push(...a.children.filter(l=>B.Tag.isTag(l)&&l.name==="li"));const s=[];e&&s.push(new B.Tag("div",{"data-name":"intro"},[e])),s.push(...t),r&&s.push(new B.Tag("div",{"data-name":"footer"},[r]));const o=[n.heading];return s.length>0&&o.push(new B.Tag("div",{"data-name":"panel"},s)),qe({rune:"nav-group",tag:"section",properties:{title:n.heading,item:i},children:o})}function Y6(n){const e=[];let t=[];for(const r of n)r.kind==="column-break"?(t.length>0&&e.push(t),t=[]):t.push(r);return t.length>0&&e.push(t),e}const U6=He({attributes:{ordered:{type:Boolean,required:!1,description:"Use numbered list for navigation items"},auto:{type:Boolean,required:!1,description:"Automatically generate from child pages"},layout:{type:String,required:!1,matches:["vertical","menubar","columns","cards","strip"],description:"Presentation layout: sidebar (vertical), horizontal menubar (header), column grid (footer), cards (section landing), or strip (compact secondary nav). Defaults to vertical."},collapsible:{type:Boolean,required:!1,description:"Make each group collapsible. The group containing the current page auto-expands; others start collapsed. Only meaningful for vertical layout."},defaultOpen:{type:String,required:!1,description:"Comma-separated group titles to expand by default, overriding the URL-driven auto-open behaviour."}},contentModel:{type:"custom",processChildren:n=>Sv({level:1})(n),description:"Top-level (#) headings become nav groups; the list directly under each heading becomes the group's items. Items are page slugs — wrap in markdown links to set custom labels, or use plain text to resolve the page title. Without headings, a single list becomes a flat nav."},transform(n,e,t){const r=!!e.collapsible,i=t.variables?.__sourcePath,s=O=>{if(e.layout&&(O.attributes.layout=e.layout),i&&(O.attributes["data-source-path"]=i),e.auto&&(O.attributes["data-auto"]="true"),r){O.attributes["data-collapsible"]="true";const v=O.attributes.class??"";O.attributes.class=[v,"rf-nav--collapsible"].filter(Boolean).join(" "),typeof e.defaultOpen=="string"&&e.defaultOpen.trim()&&(O.attributes["data-default-open"]=e.defaultOpen.trim())}return O},o=O=>e.layout==="menubar"?[new B.Tag("button",{"data-name":"trigger",type:"button","aria-label":"Toggle navigation","aria-expanded":"false"},[]),...O]:O;if(e.auto){const O=new B.Tag("meta",{"data-field":HA,content:"true"});return s(qe({rune:"nav",tag:"nav",properties:{group:[],item:[]},children:o([O])}))}const a=new je(B.transform(at(n.children),{...t,nodes:{...t.nodes,item:X6,list:{transform(O,v){return new B.Tag("ul",{},O.transformChildren(v))}}}}));if(e.layout==="strip"){const O=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:O},children:a.toArray()}))}const{topLevel:l,sequence:c}=F6(a.toArray()),u=c.filter(O=>O.kind==="group"),f=u.length>0,d=c.some(O=>O.kind==="column-break");if(!f){if(e.layout==="columns"&&d){const v=[];let b=[];const _=()=>{b.length>0&&(v.push([new B.Tag("ul",{},b)]),b=[])};for(const w of a.toArray()){if(B.Tag.isTag(w)&&w.name==="hr"){_();continue}B.Tag.isTag(w)&&Av(w)&&b.push(...w.children.filter(S=>B.Tag.isTag(S)&&S.name==="li"))}_();const C=v.map(w=>new B.Tag("div",{"data-name":"column"},w)),y=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:y},children:o(C)}))}const O=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:O},children:o(a.toArray())}))}const h=u.map(W6);if(r)for(const O of h)O.attributes["data-collapsed"]=KA;const m=l.length>0?new B.Tag("div",{"data-name":"top-level"},[new B.Tag("ul",{},l)]):null,p=h.flatMap(O=>{const v=[],b=_=>{if(B.Tag.isTag(_)){if(_.name==="li"){v.push(_);return}for(const C of _.children)b(C)}};for(const _ of O.children)b(_);return v});if(e.layout==="columns"&&d){const O=Y6(c),v=new Map(u.map((_,C)=>[_,h[C]])),b=O.map(_=>new B.Tag("div",{"data-name":"column"},_.map(C=>v.get(C)).filter(Boolean)));return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:h,item:[...l,...p]},children:o(m?[m,...b]:b)}))}return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:h,item:[...l,...p]},children:o(m?[m,...h]:h)}))}}),{Tag:G6}=B,H6=["replace","prepend","append"],K6=He({attributes:{name:{type:String,required:!0,description:"Name of the layout region to fill"},mode:{type:String,required:!1,matches:H6.slice(),errorLevel:"critical",default:"replace",description:"How content is placed: replace, prepend, or append"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",greedy:!0,optional:!0}]},transform(n,e,t){const r=B.transform(at(n.body),t);return new G6("div",{"data-region":e.name,"data-mode":e.mode},r)}}),{Tag:J6}=B,e8=He({attributes:{extends:{type:String,required:!1,default:"parent",description:"Layout inheritance: parent or none"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",greedy:!0,optional:!0}]},transform(n,e,t){const r=B.transform(at(n.body),t);return new J6("div",{"data-layout-def":!0,"data-extends":e.extends},r)}}),{Tag:t8}=B,n8=He({attributes:{summary:{type:String,required:!1,description:"Clickable summary text shown when collapsed"},open:{type:Boolean,required:!1,description:"Expand the details section by default"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.summary||"Details",s=new t8("summary",{},[i]),o=r.wrap("div"),a=qe({rune:"details",tag:"details",properties:{summary:s},refs:{body:o.tag("div")},children:[s,o.next()]});return e.open&&(a.attributes.open=!0),a}}),{Tag:ao}=B,sg="data-drawer-title-auto",r8=["right","left","top","bottom"],i8=["sm","md","lg"];function s8(n){const e=n.findIndex(t=>t.type==="hr");return e<0?{body:n,footer:null}:{body:n.slice(0,e),footer:n.slice(e+1)}}const o8=He({attributes:{id:{type:String,required:!0,description:'Stable id for the drawer. Used in entity registration and as the `id="drawer-{value}"` on the rendered element so xref triggers can target it via fragment.'},title:{type:String,required:!1,description:"Panel heading text. Rendered in the drawer header (or as a heading in the no-JS in-flow rendering)."},headingLevel:{type:Number,required:!1,description:"Heading level (1-6) for the title. When omitted, the level is auto-detected from outline position (one deeper than the nearest preceding heading). Out-of-range values are clamped to the 1-6 range."},shortcut:{type:String,required:!1,description:'Keyboard shortcut that opens the drawer when behaviors are loaded (e.g. ".", "cmd+k"). Surfaces as `data-shortcut`; the progressive-enhancement layer wires the listener.'},side:{type:String,required:!1,matches:r8.slice(),description:'Edge the panel slides from when enhanced. Defaults to "right".'},size:{type:String,required:!1,matches:i8.slice(),description:'Panel size. "sm" / "md" (default) / "lg" — width for left/right sides, height for top/bottom.'}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.id,i=e.title,s=e.side??"right",o=e.size??"md",a=typeof e.headingLevel=="number"?Math.min(6,Math.max(1,Math.trunc(e.headingLevel))):void 0,l=i?a?new ao(`h${a}`,{},[i]):new ao("h3",{[sg]:"true"},[i]):void 0,c=new ao("button",{type:"button","aria-label":"Close",hidden:!0},["×"]),u=[];l&&u.push(l),u.push(c);const f=new ao("header",{},u),d=s8(at(n.body)),h=new je(B.transform(d.body,t)).wrap("div"),m=d.footer!==null?new je(B.transform(d.footer,t)).wrap("footer"):null,p={side:new ao("meta",{content:s}),size:new ao("meta",{content:o})};e.shortcut&&(p.shortcut=new ao("meta",{content:e.shortcut}));const O=qe({rune:"drawer",tag:"section",id:`drawer-${r}`,properties:p,refs:{header:f,...l?{title:l}:{},close:c,body:h.tag("div"),...m?{footer:m.tag("footer")}:{}},children:[...Object.values(p),f,h.next(),...m?[m.next()]:[]]});return O.attributes["data-drawer-id"]=r,O}}),{Tag:qu}=B,a8=["small","medium","large","full"],l8=["left","center","right"],c8=He({attributes:{size:{type:String,required:!1,matches:a8.slice(),description:"Display width of the figure"},align:{type:String,required:!1,matches:l8.slice(),description:"Horizontal alignment of the figure"},caption:{type:String,required:!1,description:"Caption text displayed below the figure"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=r.flatten().tag("img").toArray(),s=r.tag("p").toArray().filter(f=>{const d=(f.children||[]).filter(h=>B.Tag.isTag(h));return!(d.length===1&&d[0].name==="img")}),o=e.caption||void 0,a=o?new qu("figcaption",{},[o]):s.length>0?new qu("figcaption",{},[s[0]]):void 0,l=e.size?new qu("meta",{content:e.size}):void 0,c=e.align?new qu("meta",{content:e.align}):void 0,u=[...i];return a&&u.push(a),l&&u.push(l),c&&u.push(c),qe({rune:"figure",schemaOrgType:"ImageObject",tag:"figure",properties:{...l?{size:l}:{},...c?{align:c}:{}},refs:{...a?{caption:a}:{}},schema:{...i.length>0?{contentUrl:i[0]}:{},...a?{caption:a}:{}},children:u})}}),{Tag:Ts}=B,u8=["grid","carousel","masonry"],f8=["none","tight","default","loose"],d8=He({attributes:{layout:{type:String,required:!1,matches:u8.slice(),description:"Arrangement of images in the gallery"},columns:{type:Number,required:!1,description:"Number of columns in grid layout"},lightbox:{type:Boolean,required:!1,description:"Allow clicking images to view full-size"},gap:{type:String,required:!1,matches:f8.slice(),description:"Space between gallery items"},caption:{type:String,required:!1,description:"Caption text displayed below the gallery"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.layout??"grid",s=e.columns??3,o=e.lightbox??!0,a=e.gap??"default",l=e.caption??"",u=r.flatten().tag("img").toArray().map(_=>{const C=_.attributes?.alt||"",y=[_];return C&&y.push(new Ts("figcaption",{},[C])),new Ts("figure",{"data-name":"item"},y)}),f=new Ts("meta",{content:i}),d=new Ts("meta",{content:String(o)}),h=s!==3?new Ts("meta",{content:String(s)}):void 0,m=a!=="default"?new Ts("meta",{content:a}):void 0,p=l?new Ts("figcaption",{},[l]):void 0,O=new Ts("div",{"data-name":"items"},u),b=[...[f,d,h,m].filter(Boolean),O];return p&&b.push(p),qe({rune:"gallery",schemaOrgType:"ImageGallery",tag:"figure",properties:{layout:f,lightbox:d,...h?{columns:h}:{},...m?{gap:m}:{},...p?{caption:p}:{}},children:b})}}),{Tag:vp}=B,h8=He({attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new vp("summary",{},[e.name??""]),i=new je(B.transform(at(n.body),t)).wrap("div"),s=i.tag("div");for(const o of s.nodes)vp.isTag(o)&&(o.attributes.typeof="Answer",o.children=[new vp("div",{property:"text"},o.children)]);return qe({rune:"accordion-item",schemaOrgType:"Question",tag:"details",properties:{name:r},refs:{body:s},schema:{name:r,acceptedAnswer:s},children:[r,i.next()]})}}),p8=He({attributes:{multiple:{type:Boolean,required:!1,description:"Allow multiple panels to be open at once"}},contentModel:()=>({type:"sections",sectionHeading:"heading",emitTag:"accordion-item",emitAttributes:{name:"$heading"},fields:[{name:"header",match:"heading|paragraph",optional:!0,greedy:!0},{name:"items",match:"tag",optional:!0,greedy:!0}],sectionModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}}),transform(n,e,t){const r=new je(B.transform(at(n.header),t)),i=[...at(n.items),...at(n.sections)],o=new je(B.transform(i,t)).tag("details").typeof("AccordionItem"),a=o.wrap("div"),l=r.count()>0?[r.wrap("header").next(),a.next()]:[a.next()];return qe({rune:"accordion",schemaOrgType:"FAQPage",tag:"section",property:"contentSection",properties:{item:o},refs:{...Jc(r),items:a},schema:{mainEntity:o},children:l})}}),{Tag:Cl}=B,m8=He({attributes:{depth:{type:Number,required:!1,default:3,description:"Maximum heading depth to include"},ordered:{type:Boolean,required:!1,default:!1,description:"Use numbered list instead of bullets"}},contentModel:{type:"sequence",fields:[]},transform(n,e,t){const r=t.variables?.headings||[],i=e.depth+1,o=r.filter(u=>u.level>=2&&u.level<=i).map(u=>new Cl("li",{"data-level":u.level},[new Cl("a",{href:`#${u.id}`},[u.text])])),a=new Cl("ul",{},o),l=new Cl("meta",{content:e.depth}),c=new Cl("meta",{content:e.ordered});return qe({rune:"table-of-contents",tag:"nav",properties:{depth:l,ordered:c},refs:{list:a},children:[l,c,a]})}}),{Tag:ta}=B,g8=["16:9","4:3","1:1","auto"];function O8(n){try{const e=new URL(n),t=e.hostname.replace("www.","");if(t==="youtube.com"||t==="youtu.be"){let r="";return t==="youtu.be"?r=e.pathname.slice(1):r=e.searchParams.get("v")||"",{provider:"youtube",embedUrl:r?`https://www.youtube-nocookie.com/embed/${r}`:n,type:"video"}}if(t==="vimeo.com")return{provider:"vimeo",embedUrl:`https://player.vimeo.com/video/${e.pathname.slice(1)}`,type:"video"};if(t==="twitter.com"||t==="x.com")return{provider:"twitter",embedUrl:n,type:"tweet"};if(t==="codepen.io")return{provider:"codepen",embedUrl:n.replace("/pen/","/embed/"),type:"codepen"};if(t==="open.spotify.com")return{provider:"spotify",embedUrl:n.replace("open.spotify.com/","open.spotify.com/embed/"),type:"spotify"}}catch{}return{provider:"generic",embedUrl:n,type:"generic"}}const v8=He({attributes:{url:{type:String,required:!0,description:"URL of the content to embed"},type:{type:String,required:!1,description:"Override auto-detected embed type"},aspect:{type:String,required:!1,matches:g8.slice(),description:"Aspect ratio of the embed frame"},title:{type:String,required:!1,description:"Accessible title for the embed iframe"}},contentModel:{type:"sequence",fields:[{name:"fallback",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.url??"",i=O8(r),s=e.aspect??"16:9",o=e.title||"Embedded content",[a,l]=s.split(":").map(Number),c=l&&a?l/a*100:56.25,u=new ta("meta",{content:r}),f=new ta("meta",{content:e.title??""}),d=new ta("meta",{content:i.embedUrl}),h=new ta("meta",{content:i.provider}),m=new je(B.transform(at(n.fallback),t)).wrap("div"),p=m.tag("div"),O=[u,f,d];let v;if(i.embedUrl){const b=new ta("iframe",{src:i.embedUrl,title:o,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",loading:"lazy"},[]);v=new ta("div",{style:`padding-bottom: ${c}%`},[b]),O.push(v)}return O.push(m.next()),qe({rune:"embed",schemaOrgType:"VideoObject",tag:"figure",properties:{provider:h},refs:{...v?{wrapper:v}:{},fallback:p},schema:{name:f,contentUrl:u,embedUrl:d},children:O})}}),{Tag:ui}=B,JA="__breadcrumb-auto",b8=He({attributes:{separator:{type:String,required:!1,default:"/",description:"Character between breadcrumb items"},auto:{type:Boolean,required:!1,default:!1,description:"Automatically generate from page hierarchy"}},contentModel:n=>n.auto?{type:"sequence",fields:[]}:{type:"sequence",fields:[{name:"list",match:"list",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ui("meta",{content:e.separator});if(e.auto){const l=new ui("meta",{"data-field":JA,content:"true"}),c=new ui("ol",{},[]);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:c},children:[r,l,c]})}const i=new je(B.transform(at(n.list),t)),s=[];let o=0;for(const l of i.toArray())if(ui.isTag(l)&&(l.name==="ul"||l.name==="ol")){for(const c of l.children)if(ui.isTag(c)&&c.name==="li"){o++;const u=new ui("meta",{content:o}),f=c.children.find(d=>ui.isTag(d)&&d.name==="a");if(f){const d=new ui("span",{hidden:!0},f.children),h=new ui("a",{href:f.attributes.href},f.children);s.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:d,url:h},schema:{name:d,item:h,position:u},children:[d,h,u]}))}else{const d=c.children.filter(m=>typeof m=="string").join("").trim(),h=new ui("span",{},d?[d]:c.children);s.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:h},schema:{name:h,position:u},children:[h,u]}))}}}const a=new ui("ol",{},s);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:a},schema:{itemListElement:s},children:[r,a]})}}),{Tag:Qi}=B,og="__pagination-auto",y8=He({attributes:{auto:{type:Boolean,required:!1,default:!1,description:"Derive prev/next from sibling page order"},prev:{type:String,required:!1,description:"Explicit previous page (slug or URL)"},next:{type:String,required:!1,description:"Explicit next page (slug or URL)"},scope:{type:String,required:!1,matches:["siblings","section"],default:"siblings",description:"Auto-mode scope: direct siblings, or all pages in the current top-level section"},"prev-label":{type:String,required:!1,description:"Override label for the previous link"},"next-label":{type:String,required:!1,description:"Override label for the next link"}},contentModel:{type:"sequence",fields:[]},selfClosing:!0,transform(n,e,t){if(e.auto){const i=new Qi("meta",{"data-field":og,content:"true"}),s=e.scope?new Qi("meta",{"data-field":"scope",content:String(e.scope)}):null,o=e["prev-label"]?new Qi("meta",{"data-field":"prev-label",content:String(e["prev-label"])}):null,a=e["next-label"]?new Qi("meta",{"data-field":"next-label",content:String(e["next-label"])}):null,l=[i,s,o,a].filter(Boolean);return qe({rune:"pagination",tag:"nav",children:l})}const r=[];if(e.prev){const s=String(e.prev).startsWith("/")||/^[a-z]+:\/\//i.test(String(e.prev))?String(e.prev):`__slug:${e.prev}`,o=e["prev-label"]??String(e.prev);r.push(new Qi("a",{href:s,"data-direction":"prev","data-name":"prev"},[new Qi("span",{"data-name":"marker"},["←"]),new Qi("span",{"data-name":"label"},[o])]))}if(e.next){const s=String(e.next).startsWith("/")||/^[a-z]+:\/\//i.test(String(e.next))?String(e.next):`__slug:${e.next}`,o=e["next-label"]??String(e.next);r.push(new Qi("a",{href:s,"data-direction":"next","data-name":"next"},[new Qi("span",{"data-name":"label"},[o]),new Qi("span",{"data-name":"marker"},["→"])]))}return qe({rune:"pagination",tag:"nav",children:r})}}),{Ast:ag,Tag:On}=B,w8=/^(.+)\s*:\s*([€$£¥]?\s*[\d].*)$/;function _8(n){const e=n.replace(/[€$£¥\s]/g,"").replace(/,/g,""),t=e.match(/^([\d.]+)\s*[-–]\s*([\d.]+)/);if(t)return(parseFloat(t[1])+parseFloat(t[2]))/2;const r=parseFloat(e);return isNaN(r)?0:r}const k8={USD:"$",EUR:"€",GBP:"£",JPY:"¥",CNY:"¥",AUD:"A$",CAD:"C$",CHF:"CHF ",SEK:"kr",NOK:"kr",DKK:"kr",INR:"₹",KRW:"₩",BRL:"R$",MXN:"MX$",ZAR:"R"};function bp(n,e){const t=(n%1===0?String(n):n.toFixed(2)).split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e+t.join(".")}function x8(n){let e=0;const t=n.match(/(\d+)\s*day/i),r=n.match(/(\d+)\s*week/i),i=n.match(/(\d+)\s*month/i);if(t&&(e+=parseInt(t[1])),r&&(e+=parseInt(r[1])*7),i&&(e+=parseInt(i[1])*30),e===0){const s=parseInt(n);isNaN(s)||(e=s)}return e}function b0(n,e){for(const t of n.children)if(B.Tag.isTag(t)&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}const S8=/^(.+?)\s*\((?:estimate|est\.?)\)\s*$/i,A8=/^~(.+?)~$/;function C8(n){const e=[];let t=!1;for(const o of n.walk())o.type==="text"&&o.attributes.content&&e.push(o.attributes.content),o.type==="s"&&(t=!0);const r=e.join(" ").trim(),i=r.match(S8);if(i)return{label:i[1].trim(),estimate:!0};const s=r.match(A8);return s?{label:s[1].trim(),estimate:!0}:t?{label:r,estimate:!0}:{label:r,estimate:!1}}const T8=He({attributes:{description:{type:String,required:!1,description:"Line item description"},amount:{type:String,required:!1,description:"Line item amount"}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=new On("span",{},[e.description??""]),r=new On("span",{},[e.amount??""]);return qe({rune:"budget-line-item",tag:"li",properties:{description:t,amount:r},children:[t,r]})}});function P8(n){const e=[];for(const t of n)if(t.type==="list")for(const r of t.children){const i=[];for(const a of r.walk())a.type==="text"&&a.attributes.content&&i.push(a.attributes.content);const s=i.join(" ").trim(),o=s.match(w8);o?e.push(new ag.Node("tag",{description:o[1].trim(),amount:o[2].trim()},[],"budget-line-item")):e.push(new ag.Node("tag",{description:s,amount:""},[],"budget-line-item"))}else e.push(t);return e}function E8(n){let e=0;for(const t of n)t.type==="tag"&&t.tag==="budget-line-item"&&t.attributes.amount&&(e+=_8(t.attributes.amount));return e}const $8=He({attributes:{label:{type:String,required:!0},estimate:{type:Boolean,required:!1}},contentModel:{type:"custom",processChildren:P8,description:'Converts list items into budget-line-item tags with "Description: $Amount" pattern.'},transform(n,e,t){const r=at(n.children),i=E8(r),s=new je(B.transform(r,t)),o=new On("meta",{content:e.label??""}),a=new On("meta",{content:e.estimate?"estimate":"false"}),l=new On("meta",{content:String(i)}),c=s.tag("li").typeof("BudgetLineItem"),u=new On("ul",{},c.toArray());return qe({rune:"budget-category",tag:"div",properties:{label:o,estimate:a,lineItem:c,subtotal:l},refs:{"line-items":u},children:[o,a,l,u]})}}),Q8=["detailed","summary"];function L8(n){const e=n,t=e.reduce((l,c,u)=>(c.type==="heading"&&l.push({idx:u,level:c.attributes.level}),l),[]);let r=[],i=e;t.length>=2&&t[0].level<t[1].level&&(r=e.slice(0,t[1].idx),i=e.slice(t[1].idx));const s=Sv()(i),o=s.length-1;if(!s[o]||s[o].type!=="list")return n;const a=s[o].children.map(l=>{const c=l.children[0],{label:u,estimate:f}=C8(c);return new ag.Node("tag",{label:u,estimate:f},l.children.slice(1),"budget-category")});return s.splice(o,1,...a),[...r,...s]}const M8=He({attributes:{currency:{type:String,required:!1,description:"Currency symbol or code (e.g. USD, EUR)"},duration:{type:String,required:!1,description:'Budget duration for per-day calculations (e.g. "5 days", "1 month")'},showPerDay:{type:Boolean,required:!1,description:"Show per-day cost breakdown"},variant:{type:String,required:!1,matches:Q8.slice(),description:"Display style: detailed line items or summary"}},contentModel:{type:"custom",processChildren:L8,description:'Converts headings into budget-category tags with estimate parsing, where list items become budget-line-items with "Description: $Amount" pattern.'},transform(n,e,t){const r=at(n.children),i=[],s=[];for(const L of r)L.type==="tag"?s.push(L):(L.type==="paragraph"||L.type==="heading")&&i.push(L);const o=new je(B.transform(i,t)),a=new je(B.transform(s,t)),l=Jc(o),c=e.currency??"USD",u=e.duration??"",f=e.showPerDay??!0,d=e.variant??"detailed",h=k8[c.toUpperCase()]||c+" ",m=new On("meta",{content:c}),p=new On("meta",{content:u}),O=new On("meta",{content:String(f)}),v=new On("meta",{content:d}),b=a.tag("div").typeof("BudgetCategory"),_=b.toArray();let C=0;for(const L of _){if(!B.Tag.isTag(L))continue;const P=b0(L,"label"),D=parseFloat(b0(L,"subtotal"))||0;C+=D;const I=new On("div",{class:"rf-budget-category__header"},[new On("span",{class:"rf-budget-category__label"},[P]),new On("span",{class:"rf-budget-category__subtotal"},[bp(D,h)])]);L.children=[I,...L.children]}const y=new On("div",{},_),w=u?x8(u):0,S=!!u&&f&&w>0,A=S?C/w:0,x=[new On("div",{class:"rf-budget__total"},[new On("span",{class:"rf-budget__total-label"},["Total"]),new On("span",{class:"rf-budget__total-amount"},[bp(C,h)])])];S&&x.push(new On("div",{class:"rf-budget__per-day"},[new On("span",{class:"rf-budget__per-day-label"},["Per day"]),new On("span",{class:"rf-budget__per-day-amount"},[bp(A,h)])]));const k=new On("div",{class:"rf-budget__footer"},x),E=new On("meta",{content:String(C)}),T=new On("meta",{content:String(A)}),$=[m,p,O,v,...o.toArray(),y,k];return qe({rune:"budget",schemaOrgType:"ItemList",tag:"section",property:"contentSection",properties:{currency:m,duration:p,showPerDay:O,variant:v,category:b,total:E,...S?{perDay:T}:{}},refs:{...l,categories:y},children:$})}}),{Tag:ts}=B,D8=["side-by-side","stacked"],q8=He({attributes:{layout:{type:String,required:!1,matches:D8.slice(),description:"Display panels side-by-side or stacked"},labels:{type:String,required:!1,description:"Comma-separated custom labels for each panel"},title:{type:String,required:!1,description:"Optional title displayed above the panels"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.layout??"side-by-side",s=e.labels??"",o=e.title??"",a=new ts("meta",{content:i}),l=[],c=s?s.split(",").map(m=>m.trim()):[];let u=0;for(const m of r.toArray()){let p;if(ts.isTag(m)&&m.name==="pre")p=m;else if(ts.isTag(m)&&m.name==="div"&&m.attributes.class==="rf-codeblock"){const O=m.children.find(v=>ts.isTag(v)&&v.name==="pre");O&&(p=O)}if(p&&ts.isTag(p)){const O=c[u]||p.attributes["data-language"]||`Panel ${u+1}`,v=new ts("span",{"data-label":!0},[O]);l.push(new ts("div",{"data-panel":!0},[v,m])),u++}}const f=new ts("div",{"data-panels":!0},l),d=o?[new ts("div",{"data-name":"header"},[o])]:[],h=qe({rune:"compare",tag:"div",properties:{layout:a},refs:{panels:f},children:[a,...d,f]});return h.attributes["data-code-host"]=!0,h}}),{Tag:ns}=B,R8=He({attributes:{sortable:{type:String,required:!1,description:'Column names to enable sorting, or "all"'},searchable:{type:Boolean,required:!1,description:"Show a search input to filter rows"},pageSize:{type:Number,required:!1,description:"Rows per page; 0 disables pagination"},defaultSort:{type:String,required:!1,description:"Column to sort by initially"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=new ns("meta",{content:e.sortable??""}),s=new ns("meta",{content:String(e.searchable??!1)}),o=new ns("meta",{content:String(e.pageSize??0)}),a=new ns("meta",{content:e.defaultSort??""});let l;const c=r.tag("table");if(c.count()>0)l=c.next();else{const u=r.toArray().find(d=>ns.isTag(d)&&d.name==="div"&&d.attributes.class==="rf-table-wrapper"),f=u&&ns.isTag(u)?u.children.find(d=>ns.isTag(d)&&d.name==="table"):void 0;l=f&&ns.isTag(f)?f:new ns("table",{},[])}return qe({rune:"data-table",schemaOrgType:"Dataset",tag:"div",properties:{sortable:i,searchable:s,pageSize:o,defaultSort:a},refs:{table:l},children:[i,s,o,a,l]})}}),{Tag:_n}=B,I8=["unified","split","inline"];function N8(n,e){const t=n.split(`
296
+ `),r=e.split(`
297
+ `),i=t.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let u=1;u<=i;u++)for(let f=1;f<=s;f++)o[u][f]=t[u-1]===r[f-1]?o[u-1][f-1]+1:Math.max(o[u-1][f],o[u][f-1]);let a=i,l=s;const c=[];for(;a>0||l>0;)a>0&&l>0&&t[a-1]===r[l-1]?(c.push({type:"equal",text:t[a-1]}),a--,l--):l>0&&(a===0||o[a][l-1]>=o[a-1][l])?(c.push({type:"add",text:r[l-1]}),l--):(c.push({type:"remove",text:t[a-1]}),a--);return c.reverse(),c}function B8(n){const e=[],t=[];let r=1,i=1,s=0;for(;s<n.length;)if(n[s].type==="equal")e.push({hunk:n[s],num:r++}),t.push({hunk:n[s],num:i++}),s++;else{const o=[],a=[];for(;s<n.length&&n[s].type==="remove";)o.push(n[s]),s++;for(;s<n.length&&n[s].type==="add";)a.push(n[s]),s++;const l=Math.max(o.length,a.length);for(let c=0;c<l;c++)e.push(c<o.length?{hunk:o[c],num:r++}:null),t.push(c<a.length?{hunk:a[c],num:i++}:null)}return{before:e,after:t}}function j8(n){const e=[];let t=1,r=1;for(const i of n)i.type==="equal"?(e.push({hunk:i,beforeNum:t,afterNum:r}),t++,r++):i.type==="remove"?(e.push({hunk:i,beforeNum:t,afterNum:null}),t++):i.type==="add"&&(e.push({hunk:i,beforeNum:null,afterNum:r}),r++);return e}function z8(n,e,t=0,r=0){const s=j8(n).map(({hunk:o,beforeNum:a,afterNum:l})=>new _n("span",{"data-name":"line","data-line-status":o.type},[new _n("span",{"data-name":"gutter-num","data-side":"before"},[a!=null?String(a+t):""]),new _n("span",{"data-name":"gutter-num","data-side":"after"},[l!=null?String(l+r):""]),new _n("span",{"data-name":"line-content",...e?{"data-language":e}:{}},[o.text])]));return[new _n("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new _n("div",{"data-name":"rows"},s)])]}function Z8(n,e,t=0,r=0){const{before:i,after:s}=B8(n);function o(a,l,c){return a.map(u=>{const f=u?u.hunk.type:"empty";return new _n("span",{"data-name":"line","data-line-status":f},[new _n("span",{"data-name":"gutter-num","data-side":l},[u?String(u.num+c):""]),new _n("span",{"data-name":"line-content",...u&&e?{"data-language":e}:{}},[u?u.hunk.text:""])])})}return[new _n("div",{"data-name":"split-container"},[new _n("div",{"data-name":"panel"},[new _n("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new _n("div",{"data-name":"rows"},o(i,"before",t))])]),new _n("div",{"data-name":"panel"},[new _n("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new _n("div",{"data-name":"rows"},o(s,"after",r))])])])]}function y0(n){if(typeof n!="string"||n.length===0)return 0;const e=/^(\d+)/.exec(n.trim());if(!e)return 0;const t=Number(e[1]);return Number.isFinite(t)&&t>0?t-1:0}function X8(n,e,t){if(n)return[new _n("div",{"data-name":"header"},[n])];if(e&&t)return e===t?[new _n("div",{"data-name":"header"},[e])]:[new _n("div",{"data-name":"header"},[`${e} → ${t}`])];const r=e||t;return r?[new _n("div",{"data-name":"header"},[r])]:[]}const F8=He({attributes:{mode:{type:String,required:!1,matches:I8.slice(),description:"Diff display style: unified, split, or inline"},language:{type:String,required:!1,description:"Programming language for syntax highlighting"},title:{type:String,required:!1,description:"Optional title or filename displayed above the diff"}},contentModel:{type:"sequence",fields:[{name:"fences",match:"fence",greedy:!0}]},transform(n,e){const t=e.mode??"unified",r=e.language??"",i=e.title??"",s=new _n("meta",{content:t}),o=new _n("meta",{content:r}),a=at(n.fences),l=a.length>0?(a[0].attributes.content||"").replace(/\n$/,""):"",c=a.length>1?(a[1].attributes.content||"").replace(/\n$/,""):"",u=r||a.length>0&&a[0].attributes.language||"",f=a.length>0&&typeof a[0].attributes.source=="string"?a[0].attributes.source:void 0,d=a.length>1&&typeof a[1].attributes.source=="string"?a[1].attributes.source:void 0,h=a.length>0?y0(a[0].attributes.lines):0,m=a.length>1?y0(a[1].attributes.lines):0,p=N8(l,c),O=t==="split"?Z8(p,u,h,m):z8(p,u,h,m),v=X8(i,f,d),b=qe({rune:"diff",tag:"div",properties:{mode:s,language:o},children:[s,o,...v,...O]});return b.attributes["data-code-host"]=!0,b}}),{Tag:yp}=B,V8=["bar","line","pie","area"];function W8(n){for(const e of n)if(B.Tag.isTag(e)){if(e.name==="table")return e;if(e.name==="div"){const t=e.children.find(r=>B.Tag.isTag(r)&&r.name==="table");if(t&&B.Tag.isTag(t))return t}}}const Y8=He({attributes:{type:{type:String,required:!1,matches:V8.slice(),description:"Chart visualization type"},title:{type:String,required:!1,description:"Title displayed above the chart"},stacked:{type:Boolean,required:!1,description:"Stack data series instead of grouping"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=B.transform(at(n.body),t),i=e.type??"bar",s=e.title??"",o=e.stacked??!1,a=W8(r),l=a?[a]:r;a&&(a.attributes["data-name"]="data",s&&(a.children=[new yp("caption",{},[s]),...a.children]));const c=new yp("meta",{content:i}),u=new yp("meta",{content:String(o)}),f=qe({rune:"chart",tag:"figure",properties:{type:c,stacked:u},children:l});return f.name="rf-chart",f}}),{Tag:na}=B,U8=["mermaid","plantuml","ascii"],G8=He({attributes:{language:{type:String,required:!1,matches:U8.slice(),description:"Diagram language: mermaid, plantuml, or ascii"},title:{type:String,required:!1,description:"Title displayed above the diagram"}},contentModel:{type:"sequence",fields:[{name:"source",match:"fence"}]},transform(n,e){const t=e.language??"mermaid",r=e.title??"",s=at(n.source)[0]?.attributes?.content||"",o=new na("meta",{content:t}),a=[];let l;r&&(l=new na("figcaption",{},[r]),a.push(l));let c;const u=[];s&&(c=new na("pre",{},[new na("code",{},[s])]),u.push(c));const f=new na("div",{},u);a.push(f),s&&a.push(new na("template",{"data-content":"source"},[s]));const d=qe({rune:"diagram",tag:"figure",properties:{language:o},refs:{...l?{title:l}:{},container:f,...c?{source:c}:{}},children:a});return d.name="rf-diagram",d}}),{Tag:H8}=B,K8=["sidenote","footnote","tooltip"],J8=He({attributes:{variant:{type:String,required:!1,matches:K8.slice(),description:"Display style: sidenote, footnote, or tooltip"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new H8("meta",{content:e.variant??"sidenote"}),s=new je(B.transform(at(n.body),t)).wrap("div");return qe({rune:"sidenote",tag:"aside",properties:{variant:r},refs:{body:s},children:[r,s.next()]})}}),{Ast:Ru,Tag:w0}=B,e9=He({attributes:{speaker:{type:String,required:!1},align:{type:String,required:!1,matches:["left","right"]}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new w0("span",{},[e.speaker??""]),i=new w0("meta",{content:e.align??"left"}),s=new je(B.transform(at(n.body),t)).wrap("div");return qe({rune:"conversation-message",tag:"div",properties:{speaker:r,align:i},refs:{body:s.tag("div")},children:[r,i,s.next()]})}});function t9(n,e){const t=e.speakers?String(e.speakers).split(",").map(s=>s.trim()):[],r=[];let i=0;for(const s of n)if(s.type==="blockquote"){let o="";const a=[...s.children],l=a.length>0&&a[0].type==="paragraph"?a[0]:null,c=l&&l.children[0]?.type==="inline"?l.children[0]:l;if(c){const f=c.children[0];f&&f.type==="strong"&&(o=Array.from(f.walk()).filter(h=>h.type==="text").map(h=>h.attributes.content).join("").replace(/:\s*$/,""))}if(!o&&t.length>0&&(o=t[i%t.length],c)){const f=new Ru.Node("strong",{},[new Ru.Node("text",{content:`${o}:`},[])]),d=new Ru.Node("text",{content:" "},[]);c.children=[f,d,...c.children]}const u=i%2===0?"left":"right";r.push(new Ru.Node("tag",{speaker:o,align:u},s.children,"conversation-message")),i++}else r.push(s);return r}const n9=He({attributes:{speakers:{type:String,required:!1,description:"Comma-separated speaker names for alternating messages"}},contentModel:{type:"custom",processChildren:(n,e)=>t9(n,e),description:"Converts blockquotes to conversation messages with alternating left/right alignment. Extracts speaker name from bold text in first paragraph, falls back to speakers list."},transform(n,e,t){const i=new je(B.transform(at(n.children),t)).tag("div").typeof("ConversationMessage"),s=i.wrap("div");return qe({rune:"conversation",tag:"div",properties:{message:i},refs:{messages:s},children:[s.next()]})}}),{Tag:eC}=B,r9=["click","scroll","auto"],i9=He({attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new eC("span",{},[e.name??""]),i=new je(B.transform(at(n.body),t)).wrap("div");return qe({rune:"reveal-step",tag:"div",properties:{name:r},refs:{body:i.tag("div")},children:[r,i.next()]})}}),s9=He({attributes:{mode:{type:String,required:!1,matches:r9.slice(),description:"Step progression: click, scroll, or auto"}},contentModel:()=>({type:"sections",sectionHeading:"heading",emitTag:"reveal-step",emitAttributes:{name:"$heading"},fields:[{name:"header",match:"heading|paragraph",optional:!0,greedy:!0},{name:"items",match:"tag",optional:!0,greedy:!0}],sectionModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}}),transform(n,e,t){const r=new je(B.transform(at(n.header),t)),i=[...at(n.items),...at(n.sections)],s=new je(B.transform(i,t)),o=new eC("meta",{content:e.mode??"click"}),a=s.tag("div").typeof("RevealStep"),l=a.wrap("div"),c=r.count()>0?[r.wrap("header").next(),o,l.next()]:[o,l.next()];return qe({rune:"reveal",tag:"section",property:"contentSection",properties:{step:a},refs:{...Jc(r),steps:l},children:c})}}),{Tag:Tl}=B,o9=["slider","toggle","fade","auto"],a9=["horizontal","vertical"],l9=He({attributes:{variant:{type:String,required:!1,matches:o9.slice(),description:"Interaction mode: slider, toggle, fade, or auto"},orientation:{type:String,required:!1,matches:a9.slice(),description:"Divider axis for slider/auto variants (horizontal or vertical)"},position:{type:Number,required:!1,description:"Initial slider position as a percentage (0-100)"},duration:{type:Number,required:!1,description:"Animation duration in milliseconds (fade/auto variants)"},labels:{type:String,required:!1,description:"Comma-separated custom labels for the two panels"}},contentModel:{type:"delimited",delimiter:"hr",dynamicZones:!0,zoneModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}},transform(n,e,t){const r=n.zones??[],i=e.labels?e.labels.split(",").map(d=>d.trim()):[],s=r.map((d,h)=>{const p=new je(N6(B.transform(at(d.body),t))).wrap("div"),O=i[h],v=O?new Tl("span",{},[O]):void 0;return qe({rune:"juxtapose-panel",tag:"div",properties:{},refs:{...v?{name:v}:{},body:p.tag("div")},children:[...v?[v]:[],p.next()]})}),o=new je(s).tag("div").typeof("JuxtaposePanel"),a=o.wrap("div"),l=new Tl("meta",{content:e.variant??"slider"}),c=new Tl("meta",{content:e.orientation??"vertical"}),u=new Tl("meta",{content:String(e.position??50)}),f=new Tl("meta",{content:String(e.duration??1e3)});return qe({rune:"juxtapose",tag:"section",properties:{panel:o,variant:l,orientation:c,position:u,duration:f},refs:{panels:a},children:[l,c,u,f,a.next()]})}}),{Tag:c9}=B,u9=He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)).wrap("div");return qe({rune:"annotate-note",tag:"aside",properties:{},refs:{body:r.tag("div")},children:[r.next()]})}}),f9=["margin","tooltip","inline"],d9=He({attributes:{variant:{type:String,required:!1,matches:f9.slice(),description:"Annotation display style: margin, tooltip, or inline"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=new c9("meta",{content:e.variant??"margin"}),s=r.tag("aside").typeof("AnnotateNote"),o=r.wrap("div");return qe({rune:"annotate",tag:"div",properties:{note:s,variant:i},refs:{body:o.tag("div")},children:[i,o.next()]})}}),{Ast:lo,Tag:en}=B,h9=["stacked","inline","compact"],p9=["GET","POST"],m9=[[["email","e-mail"],"email"],[["phone","telephone","mobile","cell"],"tel"],[["website","url","homepage","link"],"url"],[["date","birthday","dob"],"date"],[["number","amount","quantity","age","count"],"number"],[["password","pin","passcode"],"password"],[["message","comments","description","feedback","notes","bio","about"],"textarea"],[["file","upload","attachment","resume","document","cv"],"file"]];function g9(n){const e=n.toLowerCase();for(const[t,r]of m9)if(t.some(i=>e.includes(i)))return r;return"text"}function O9(n){const e=n.match(/^(.+?)\s*\(([^)]+)\)\s*$/);if(!e)return{name:n.trim(),optional:!1,placeholder:""};const t=e[1].trim(),r=e[2],i=/\boptional\b/i.test(r),s=r.match(/placeholder:\s*["']?([^"',]+)["']?/i),o=s?s[1].trim():"";return{name:t,optional:i,placeholder:o}}function co(n){return Array.from(n.walk()).filter(e=>e.type==="text").map(e=>e.attributes.content).join("")}function v9(n){if(n.type!=="paragraph")return!1;const e=Array.from(n.walk());if(!e.some(s=>s.type==="strong"))return!1;const r=e.filter(s=>s.type==="text").map(s=>s.attributes.content).join(""),i=e.filter(s=>s.type==="strong").flatMap(s=>Array.from(s.walk()).filter(o=>o.type==="text")).map(s=>s.attributes.content).join("");return r.trim()===i.trim()&&r.trim().length>0}function b9(n){const e=/\(multiple\)/i.test(n)||/select all/i.test(n),t=/\(radio\)/i.test(n),r=/\(optional\)/i.test(n);return{label:n.replace(/\s*\(multiple\)/gi,"").replace(/\s*\(radio\)/gi,"").replace(/\s*\(optional\)/gi,"").trim(),multiple:e,radio:t,optional:r}}const y9=He({attributes:{name:{type:String,required:!1},fieldType:{type:String,required:!1},required:{type:Boolean,required:!1},placeholder:{type:String,required:!1},options:{type:String,required:!1}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=e.name??"",r=e.fieldType??"text",i=e.required??!0,s=e.placeholder??"",o=e.options??"",a=`field-${t.toLowerCase().replace(/\s+/g,"-")}`,l=o?o.split(",").map(m=>m.trim()).filter(Boolean):[];if(r==="submit")return new en("button",{type:"submit","data-name":"submit"},[t]);if(r==="separator")return new en("hr",{"data-name":"separator"},[]);if(r==="help")return new en("p",{"data-name":"help"},[t]);if(r==="description")return new en("p",{"data-name":"text"},[t]);if(r==="group")return new en("fieldset",{class:"rf-form-fieldset"},[new en("legend",{},[t])]);if(r==="radio"||r==="checkbox"){const m=[t];i&&m.push(new en("span",{"data-name":"required","aria-hidden":"true"},["*"]));const p=l.map((v,b)=>new en("label",{class:"rf-form-choice"},[new en("input",{type:r,name:a,value:v,...i&&r==="radio"&&b===0?{required:""}:{}},[]),new en("span",{},[v])])),O=new en("meta",{"data-field":"field-type",content:r});return new en("fieldset",{"data-rune":"form-field",class:"rf-form-choice-group"},[O,new en("legend",{},m),...p])}const c=[t];i&&c.push(new en("span",{"data-name":"required","aria-hidden":"true"},["*"]));const u=new en("label",{for:a},c);let f;r==="textarea"?f=new en("textarea",{id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{},rows:"4"},[]):r==="select"?f=new en("select",{id:a,name:a,...i?{required:""}:{}},[new en("option",{value:"",disabled:"",selected:""},["Select an option"]),...l.map(m=>new en("option",{value:m},[m]))]):f=new en("input",{type:r,id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{}},[]);const d=new en("div",{},[u,f]),h=new en("meta",{content:r});return qe({rune:"form-field",tag:"div",properties:{fieldType:h},refs:{body:d},children:[h,d]})}});function w9(n){const e=[];let t=null,r=-1;for(let s=n.length-1;s>=0;s--)if(v9(n[s])){r=s;break}const i=()=>{if(t){const s=co(t);e.push(new lo.Node("tag",{name:s,fieldType:"help",required:!1,placeholder:"",options:""},[],"form-field")),t=null}};for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="heading"){i();const a=co(o);e.push(new lo.Node("tag",{name:a,fieldType:"group",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="list"&&t){const a=co(t),l=b9(a),c=[];for(const f of o.children)f.type==="item"&&c.push(co(f));let u;l.multiple?u="checkbox":l.radio||c.length<=4?u="radio":u="select",e.push(new lo.Node("tag",{name:l.label,fieldType:u,required:!l.optional,placeholder:"",options:c.join(",")},[],"form-field")),t=null}else if(o.type==="list"){i();for(const a of o.children)if(a.type==="item"){const l=co(a),c=O9(l),u=g9(c.name);e.push(new lo.Node("tag",{name:c.name,fieldType:u,required:!c.optional,placeholder:c.placeholder,options:""},[],"form-field"))}}else if(o.type==="blockquote")i(),t=o;else if(s===r){i();const a=co(o);e.push(new lo.Node("tag",{name:a,fieldType:"submit",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="hr")i(),e.push(new lo.Node("tag",{name:"",fieldType:"separator",required:!1,placeholder:"",options:""},[],"form-field"));else if(o.type==="paragraph"){i();const a=co(o);e.push(new lo.Node("tag",{name:a,fieldType:"description",required:!1,placeholder:"",options:""},[],"form-field"))}else i(),e.push(o)}return i(),e}const _9=He({attributes:{action:{type:String,required:!0,description:"URL the form submits to"},method:{type:String,required:!1,matches:p9.slice(),description:"HTTP method for form submission"},success:{type:String,required:!1,description:"Message shown after successful submission"},error:{type:String,required:!1,description:"Message shown when submission fails"},variant:{type:String,required:!1,matches:h9.slice(),description:"Form layout style"},name:{type:String,required:!1,description:"Form name for identification"},honeypot:{type:Boolean,required:!1,description:"Include a hidden field to prevent spam"}},contentModel:{type:"custom",processChildren:n=>w9(n),description:"Multi-pass form field parser with type inference and selection detection. Converts lists to text inputs, blockquote + list to selection fields, headings to fieldsets, bold paragraphs to submit buttons, and blockquotes to help text."},transform(n,e,t){const r=new je(B.transform(at(n.children),t)),i=new en("meta",{content:e.action??""}),s=new en("meta",{content:e.method??"POST"}),o=new en("meta",{content:e.success??""}),a=new en("meta",{content:e.error??""}),l=new en("meta",{content:e.variant??"stacked"}),c=new en("meta",{content:String(e.honeypot??!0)}),u=r.tag("div").typeof("FormField"),f=r.wrap("div");return qe({rune:"form",tag:"form",properties:{action:i,method:s,success:o,error:a,variant:l,honeypot:c,field:u},refs:{body:f},children:[i,s,o,a,l,c,f.next()]})}}),k9={".html":"html",".css":"css",".js":"js",".svg":"svg",".glsl-vert":"glsl-vert",".glsl-frag":"glsl-frag"};function x9(n,e){return n.endsWith("/")?n+e:n+"/"+e}function S9(n){if(n.endsWith(".glsl-vert"))return"glsl-vert";if(n.endsWith(".glsl-frag"))return"glsl-frag";const e=n.lastIndexOf(".");if(e===-1)return null;const t=n.slice(e);return k9[t]??null}function A9(n,e,t,r,i){const s=[],o=[];if(i&&!i(n))return{content:"",panels:[],errors:[`Sandbox src directory not found: "${e}"`],warnings:[]};const a=r(n);if(a.length===0)return{content:"",panels:[],errors:[],warnings:[`Sandbox src directory "${e}" contains no .html, .css, or .js files`]};const l=[];for(const x of a.sort()){const k=S9(x);if(!k)continue;const E=t(x9(n,x));E!=null&&l.push({name:x,role:k,content:E})}if(l.length===0)return{content:"",panels:[],errors:[],warnings:[`Sandbox src directory "${e}" contains no .html, .css, or .js files`]};const c=new Map;for(const x of l){const k=c.get(x.role)??[];k.push(x),c.set(x.role,k)}const u=c.get("html")??[];let f;u.length>1?(f=u.find(x=>x.name==="index.html")??u[0],o.push(`Sandbox src "${e}" has multiple .html files — using ${f.name}`)):u.length===1?f=u[0]:o.push(`Sandbox src "${e}" has no .html file — body will be empty`);const d=c.get("css")??[],h=d.map(x=>x.content).join(`
298
+ `),m=c.get("js")??[];let p=m.map(x=>x.content).join(`
299
+ `);const v=(c.get("svg")??[]).map(x=>x.content).join(`
300
+ `),b=(c.get("glsl-vert")??[])[0],_=(c.get("glsl-frag")??[])[0];let C="";b&&(C+=`const VERTEX_SHADER = \`${_0(b.content)}\`;
301
+ `),_&&(C+=`const FRAGMENT_SHADER = \`${_0(_.content)}\`;
302
+ `),C&&(p=C+p);const y=(f?.content??"")+(v?`
303
+ `+v:""),w=[];y&&w.push(`<div data-source="HTML">
304
+ ${y}
305
+ </div>`),h&&w.push(`<style data-source="CSS">
306
+ ${h}
307
+ </style>`),p&&w.push(`<script data-source="JavaScript">
308
+ ${p}
309
+ <\/script>`);const S=w.join(`
310
+ `),A=[];if(f&&A.push({label:"HTML",language:"html",content:y,origin:`${e}/${f.name}`}),h){const x=d.map(k=>`${e}/${k.name}`).join(", ");A.push({label:"CSS",language:"css",content:h,origin:x})}if(p){const x=[];b&&x.push(`${e}/${b.name}`),_&&x.push(`${e}/${_.name}`),x.push(...m.map(k=>`${e}/${k.name}`)),A.push({label:"JavaScript",language:"javascript",content:p,origin:x.join(", ")})}return{content:S,panels:A,errors:s,warnings:o}}function C9(n,e){const t=ra(n,"div","HTML"),r=ra(n,"style","CSS"),i=ra(n,"script","JavaScript"),s=ra(e,"div","HTML"),o=ra(e,"style","CSS"),a=ra(e,"script","JavaScript"),l=wp(t,s),c=wp(r,o),u=wp(i,a),f=[];return l&&f.push(`<div data-source="HTML">
311
+ ${l}
312
+ </div>`),c&&f.push(`<style data-source="CSS">
313
+ ${c}
314
+ </style>`),u&&f.push(`<script data-source="JavaScript">
315
+ ${u}
316
+ <\/script>`),f.join(`
317
+ `)}function ra(n,e,t){const r=new RegExp(`<${e}[^>]*data-source="${t}"[^>]*>([\\s\\S]*?)</${e}>`,"i");return n.match(r)?.[1]?.trim()??""}function wp(n,e){return n&&e?n+`
318
+ `+e:n||e}function _0(n){return n.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}const{Tag:Iu}=B;function k0(n){const e=n.split(`
319
+ `),t=e.filter(i=>i.trim().length>0).map(i=>i.match(/^(\s*)/)?.[0].length??0),r=t.length>0?Math.min(...t):0;return r>0?e.map(i=>i.slice(r)).join(`
320
+ `):n}function x0(n){const e=[],t=/<(\w+)\b([^>]*?)\bdata-source(?:="([^"]*)")?([^>]*)>([\s\S]*?)<\/\1>/g;let r;for(;(r=t.exec(n))!==null;){const[,i,s,o,a,l]=r,c=i==="style"?"css":i==="script"?"javascript":"html",u=c.charAt(0).toUpperCase()+c.slice(1);let f;if(i==="style"||i==="script")f=k0(l.trim());else{const d=(s+a).replace(/\s{2,}/g," ").trim(),h=d?` ${d}`:"",m=k0(l).split(`
321
+ `).map(p=>p.trim().length>0?" "+p:p).join(`
322
+ `);f=`<${i}${h}>${m}</${i}>`.trim()}e.push({label:o||u,language:c,content:f})}return e}function S0(n,e){const t=e.variables?.__source;if(typeof t=="string"&&n.lines?.length>=2){const r=t.split(`
323
+ `),i=n.lines[0]+1,s=n.lines[n.lines.length-1]-1;return r.slice(i,s).join(`
324
+ `).trim()}return""}const T9=He({attributes:{src:{type:String,required:!1,description:"Directory containing external source files"},framework:{type:String,required:!1,description:"JavaScript framework for the sandbox"},dependencies:{type:String,required:!1,description:"Comma-separated npm packages to include"},label:{type:String,required:!1,description:"Label displayed above the sandbox"},height:{type:Number,required:!1,description:"Height of the sandbox iframe in pixels"},context:{type:String,required:!1,description:"Shared context scope for multiple sandboxes"}},contentModel:{type:"sequence",fields:[]},transform(n,e,t,r){const i=e.src??"",s=e.framework??"",o=e.dependencies??"",a=e.label??"",l=e.height;let c="",u=[];const f=t.variables?.__sandboxReadFile,d=t.variables?.__sandboxListDir,h=t.variables?.__sandboxDirExists,m=t.variables?.__sandboxExamplesDir;if(i&&f&&d&&m){const y=m.endsWith("/")?m+i:m+"/"+i,w=A9(y,i,f,d,h);w.errors.length>0?(c=`<div data-source="HTML"><pre style="color:red;padding:1rem">${w.errors.join(`
325
+ `)}</pre></div>`,u=[]):(c=w.content,u=w.panels.map(A=>({label:A.label,language:A.language,content:A.content,origin:A.origin})));const S=S0(r,t);S&&(c=C9(c,S),u=x0(c))}else c=S0(r,t),u=x0(c);const p=t.variables?.__securityPolicy??{trust:"trusted",allowJs:!0,sandboxOrigin:void 0},O=d6(c,p),v=O?new Iu("pre",{"data-language":"html"},[new Iu("code",{"data-language":"html"},[O])]):void 0,b=u.filter(y=>y.origin).map(y=>`${y.label} ${y.origin}`),_=[];v&&_.push(new Iu("template",{"data-content":"fallback"},[v])),_.push(new Iu("template",{"data-content":"source"},[O]));const C=qe({rune:"sandbox",tag:"div",children:_});return C.name="rf-sandbox",Object.assign(C.attributes,{"data-source-content":O,...s?{"data-framework":s}:{},...o?{"data-dependencies":o}:{},...a?{"data-label":a}:{},"data-height":l!=null?String(l):"auto",...b.length>0?{"data-source-origins":b.join(`
326
+ `)}:{},"data-security-mode":p.trust,"data-allow-js":p.allowJs?"true":"false",...p.sandboxOrigin?{"data-sandbox-origin":p.sandboxOrigin}:{}}),C}}),{Tag:_p}=B;function P9(n,e){const t=n.match(/^<svg\s([^>]*)>/);if(!t)return new _p("span",{class:"rf-icon","data-icon":e});const i={...A0(t[1]),class:"rf-icon","data-icon":e},s=[],o=["path","circle","line","polyline","rect","polygon","ellipse"],a=new RegExp(`<(${o.join("|")})\\s([^>]*?)\\s*/?>`,"g");let l;for(;(l=a.exec(n))!==null;){const c=l[1],u=A0(l[2]);s.push(new _p(c,u))}return new _p("svg",i,s)}function A0(n){const e={},t=/([\w-]+)="([^"]*)"/g;let r;for(;(r=t.exec(n))!==null;)e[r[1]]=r[2];return e}const{Tag:E9}=B,$9={selfClosing:!0,attributes:{name:{type:String,required:!0,description:'Icon name, optionally prefixed with group (e.g., "rocket" or "hint/warning")'},size:{type:String,required:!1,description:"CSS size override for the icon"}},transform(n,e){const t=n.attributes.name,r=n.attributes.size;let i="global",s=t;const o=t.indexOf("/");o!==-1&&(i=t.substring(0,o),s=t.substring(o+1));const l=e.variables?.__icons?.[i]?.[s];if(l){const u=P9(l,t);return r&&(u.attributes.width=r,u.attributes.height=r),u}const c={class:"rf-icon","data-icon":t};return r&&(c.style=`width:${r};height:${r}`),new E9("span",c)}},{Tag:C0}=B,Q9=["left","center","right"],L9=["default","accent","editorial"],M9=He({attributes:{align:{type:String,required:!1,matches:Q9.slice(),description:"Text alignment of the quote"},variant:{type:String,required:!1,matches:L9.slice(),description:"Visual style of the quote block"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=new C0("meta",{content:e.align??"center"}),s=new C0("meta",{content:e.variant??"default"}),o=r.tag("blockquote"),l=[...o.count()>0?o.limit(1).toArray():r.tag("p").toArray(),i,s];return qe({rune:"pull-quote",tag:"blockquote",properties:{align:i,variant:s},children:l})}}),{Tag:Nu}=B,D9=["left","center","right","justify"],q9=He({attributes:{dropcap:{type:Boolean,required:!1,description:"Style the first letter as a large drop cap"},columns:{type:Number,required:!1,description:"Number of text columns"},lead:{type:Boolean,required:!1,description:"Style the first paragraph as a lead"},align:{type:String,required:!1,matches:D9.slice(),description:"Text alignment"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.dropcap??!1,s=e.columns??1,o=e.lead??!1,a=e.align??"left",l=i?new Nu("meta",{content:"dropcap"}):void 0,c=s>1?new Nu("meta",{content:String(s)}):void 0,u=o?new Nu("meta",{content:"lead"}):void 0,f=a!=="left"?new Nu("meta",{content:a}):void 0,d=r.wrap("div"),h=[];return l&&h.push(l),c&&h.push(c),u&&h.push(u),f&&h.push(f),h.push(d.next()),qe({rune:"text-block",tag:"div",properties:{...l?{dropcap:l}:{},...c?{columns:c}:{},...u?{lead:u}:{},...f?{align:f}:{}},refs:{body:d.tag("div")},children:h})}}),{Tag:Pl}=B,R9=["left","right"],I9=["1:2","1:1","2:1"],N9=He({attributes:{align:{type:String,required:!1,matches:R9.slice(),description:"Side the media appears on"},ratio:{type:String,required:!1,matches:I9.slice(),description:"Width ratio between media and text"},wrap:{type:Boolean,required:!1,description:"Wrap text around the media"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.align??"left",s=e.ratio??"1:1",o=e.wrap??!1,a=new Pl("meta",{content:i}),l=new Pl("meta",{content:s}),c=o?new Pl("meta",{content:"true"}):void 0,u=[],f=[];for(const p of r.toArray())B.Tag.isTag(p)&&p.name==="p"&&p.children.length===1&&B.Tag.isTag(p.children[0])&&p.children[0].name==="img"?u.push(p.children[0]):B.Tag.isTag(p)&&p.name==="img"?u.push(p):f.push(p);const d=new Pl("div",{},u),h=new Pl("div",{},f),m=[a,l];return c&&m.push(c),m.push(d,h),qe({rune:"media-text",tag:"div",properties:{align:a,ratio:l,...c?{wrap:c}:{}},refs:{media:d,body:h},children:m})}}),{Tag:ia}=B,B9=["background","surface","primary","secondary","accent","border"],j9=/^\s*(\w+)\s*:\s*(.+)\s*$/;function T0(n){const e=[];for(const t of n.walk())t.type==="text"&&t.attributes.content&&e.push(t.attributes.content);return e.join(" ").trim()}function z9(n){const e={},t={};let r="light";for(const i of n){if(i.type==="heading"){const s=T0(i).toLowerCase();s==="dark"?r="dark":s==="light"&&(r="light");continue}if(i.type==="list")for(const s of i.children){const a=T0(s).match(j9);if(a){const l=a[1].toLowerCase(),c=a[2].trim();B9.includes(l)&&(r==="dark"?t[l]=c:e[l]=c)}}}return{light:e,dark:t}}const Z9={attributes:{preset:{type:String,required:!1,description:"Named tint preset from the theme"},mode:{type:String,required:!1,matches:["auto","dark","light"],description:"Whether the tint adapts to auto, dark, or light mode"}},transform(n,e){const t=n.transformAttributes(e).preset,r=n.transformAttributes(e).mode,{light:i,dark:s}=z9(n.children),o=[];t?o.push(new ia("meta",{"data-field":"tint",content:t})):(Object.keys(i).length>0||Object.keys(s).length>0)&&o.push(new ia("meta",{"data-field":"tint",content:"custom"})),r&&r!=="auto"&&o.push(new ia("meta",{"data-field":"tint-mode",content:r}));for(const[a,l]of Object.entries(i))o.push(new ia("meta",{"data-field":`tint-${a}`,content:l}));for(const[a,l]of Object.entries(s))o.push(new ia("meta",{"data-field":`tint-dark-${a}`,content:l}));return new ia("div",{"data-tint-source":!0},o)}},{Tag:sa}=B,X9=["none","soft","hard","elevated"],F9=["none","top","bottom","both","end","bottom-end","top-end"],V9=He({attributes:{shadow:{type:String,required:!1,matches:X9.slice(),description:"Shadow style around the showcase content"},bleed:{type:String,required:!1,matches:F9.slice(),description:"Direction content extends beyond its container"},offset:{type:String,required:!1,description:"CSS offset from the container edge"},aspect:{type:String,required:!1,description:"Aspect ratio of the showcase area"},place:{type:String,required:!1,matches:["left","center","right","top","bottom","top left","top center","top right","bottom left","bottom center","bottom right"],description:"Position of content within the showcase area"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new je(B.transform(at(n.body),t)),i=e.shadow??"none",s=e.bleed??"none",o=e.offset??"",a=e.aspect??"",l=e.place??"",c={},u=[];if(i&&i!=="none"){const d=new sa("meta",{content:i});c.shadow=d,u.push(d)}if(s&&s!=="none"){const d=new sa("meta",{content:s});c.bleed=d,u.push(d)}if(o){const d=new sa("meta",{content:o});c.offset=d,u.push(d)}if(a){const d=new sa("meta",{content:a});c.aspect=d,u.push(d)}if(l){const d=new sa("meta",{content:l});c.place=d,u.push(d)}const f=new sa("div",{},r.toArray());return u.push(f),qe({rune:"showcase",tag:"div",properties:c,refs:{viewport:f},children:u})}}),{Tag:Li}=B,W9={attributes:{preset:{type:String,required:!1,description:"Named background preset from the theme"},src:{type:String,required:!1,description:"URL of the background image"},video:{type:String,required:!1,description:"URL of a background video"},overlay:{type:String,required:!1,description:"Color overlay applied on top of the background"},blur:{type:String,required:!1,matches:["none","sm","md","lg"],description:"Blur intensity applied to the background"},position:{type:String,required:!1,description:"CSS background-position value"},fit:{type:String,required:!1,matches:["cover","contain"],description:"How the background image fills its container"},opacity:{type:String,required:!1,description:"Opacity of the background layer (0 to 1)"},fixed:{type:Boolean,required:!1,description:"Fix the background so it stays in place while scrolling"}},transform(n,e){const t=n.transformAttributes(e),r=[];return t.preset&&r.push(new Li("meta",{"data-field":"bg-preset",content:t.preset})),t.src&&r.push(new Li("meta",{"data-field":"bg-src",content:t.src})),t.video&&r.push(new Li("meta",{"data-field":"bg-video",content:t.video})),t.overlay&&t.overlay!=="none"&&r.push(new Li("meta",{"data-field":"bg-overlay",content:t.overlay})),t.blur&&t.blur!=="none"&&r.push(new Li("meta",{"data-field":"bg-blur",content:t.blur})),t.position&&t.position!=="center"&&r.push(new Li("meta",{"data-field":"bg-position",content:t.position})),t.fit&&t.fit!=="cover"&&r.push(new Li("meta",{"data-field":"bg-fit",content:t.fit})),t.opacity&&t.opacity!=="1"&&r.push(new Li("meta",{"data-field":"bg-opacity",content:t.opacity})),t.fixed&&r.push(new Li("meta",{"data-field":"bg-fixed",content:"true"})),new Li("div",{"data-bg-source":!0},r)}},{Tag:oa}=B,Y9=["date-desc","date-asc","title-asc","title-desc"],U9=["list","grid","compact"],G9=He({attributes:{folder:{type:String,required:!0,description:'Content folder path to list blog posts from (e.g. "/blog")'},sort:{type:String,required:!1,default:"date-desc",matches:Y9.slice(),description:"Sort order: date-desc, date-asc, title-asc, title-desc"},filter:{type:String,required:!1,default:"",description:'Filter expression to match against frontmatter fields (e.g. "tag:javascript" or "draft:false")'},limit:{type:Number,required:!1,description:"Maximum number of posts to display"},layout:{type:String,required:!1,default:"list",matches:U9.slice(),description:"Display layout: list, grid, or compact"}},contentModel:{type:"sequence",fields:[{name:"headline",match:"heading",optional:!0},{name:"blurb",match:"paragraph",optional:!0}]},transform(n,e,t){const r=[n.headline,n.blurb].filter(Boolean),i=new je(B.transform(r,t)),s=new oa("meta",{content:e.folder}),o=new oa("meta",{content:e.sort||"date-desc"}),a=new oa("meta",{content:e.filter||""}),l=new oa("meta",{content:e.limit!=null?String(e.limit):""}),c=new oa("meta",{content:e.layout||"list"}),u=new oa("div",{},[]),f=Jc(i),d=i.count()>0?[i.wrap("header").next()]:[],h=[s,o,a,l,c,...d,u];return qe({rune:"blog",schemaOrgType:"Blog",tag:"section",property:"contentSection",properties:{folder:s,sort:o,filter:a,limit:l,layout:c},refs:{...f,posts:u},children:h})}}),{Tag:H9}=B,Cv="xref",K9={selfClosing:!0,inline:!0,attributes:{primary:{type:String,required:!0,description:"Entity ID or name to resolve"},label:{type:String,required:!1,description:"Custom link text (defaults to entity title)"},type:{type:String,required:!1,description:"Entity type hint for disambiguation"},preview:{type:String,required:!1,matches:["drawer"],description:"Preview target. `\"drawer\"` hoists a drawer containing the entity's expanded content + a link to its resolved page URL in the chrome footer, leaving an inline link at the call site that opens it. Absent → today's behaviour (just the inline link). SPEC-078."}},transform(n,e){const t=n.attributes.primary,r=n.attributes.label,i=n.attributes.type,s=n.attributes.preview,o={"data-rune":Cv,"data-xref-id":t};return r&&(o["data-xref-label"]=r),i&&(o["data-xref-type"]=i),s&&(o["data-xref-preview"]=s),new H9("span",o,[r||t])}},{Tag:J9}=B,Tv="expand-pending",ez={selfClosing:!0,attributes:{primary:{type:String,required:!0,description:"Entity ID or name to substitute inline. Same lookup chain as xref."},level:{type:Number,required:!1,description:"Optional heading-demotion opt-in. When set, embedded headings shift by `N - 1` and the embed joins the host outline instead of staying TOC-isolated."},type:{type:String,required:!1,description:"Entity type hint for disambiguation when the same ID/name lives in multiple registries."},canonical:{type:Boolean,required:!1,description:`When true, append a visible "View canonical" link pointing at the entity's canonical URL.`},label:{type:String,required:!1,description:"Custom label for the canonical link (only meaningful when `canonical=true`)."}},transform(n,e){const t=n.attributes.primary,r=n.attributes.level,i=n.attributes.type,s=n.attributes.canonical===!0,o=n.attributes.label,a={"data-rune":Tv,"data-expand-id":t};return typeof r=="number"&&(a["data-expand-level"]=String(r)),i&&(a["data-expand-type"]=i),s&&(a["data-expand-canonical"]="true"),o&&(a["data-expand-label"]=o),new J9("div",a,[])}},{Ast:qY}=B,tz="__deferred-body";function Pv(n){const e=n[tz];return typeof e=="string"&&e.length>0?e:void 0}function Ev(n,e,t){const r=B.parse(n),i={...e??{},variables:{...e?.variables??{},...t}},s=B.transform(r,i);return B.Tag.isTag(s)&&s.name==="article"&&!s.attributes?.class&&!s.attributes?.["data-rune"]?s.children:s}const{Tag:P0}=B,tC="__collection-sentinel",nz=He({attributes:{type:{type:String,required:!1,default:"",description:"Entity type(s), comma-separated."},filter:{type:String,required:!1,default:"",description:"field:value clauses (SPEC-070 grammar)."},sort:{type:String,required:!1,default:"",description:"Sort field (prefix - for descending)."},group:{type:String,required:!1,default:"",description:"Group-by field."},limit:{type:String,required:!1,default:"",description:"Max items."},show:{type:String,required:!1,default:"",description:"Alias for type (entity types to include)."},fields:{type:String,required:!1,default:"",description:"Comma-separated data fields to project."},layout:{type:String,required:!1,default:"list",description:"Arrangement: list (stacked) | grid (multi-column) | table (aligned columns). Item chrome comes from the item — the no-body built-in, or a rune like {% card %} in the body template."},"group-display":{type:String,required:!1,default:"headings",matches:["headings","accordion"],description:"How groups are presented when `group` is set: headings (default) or accordion (collapsible native <details> panels, styled like the accordion rune, with a per-group count)."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when the query yields nothing (no-body form; body-template form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(o,a)=>new P0("meta",{"data-field":o,content:a}),r=Pv(e)??"",i=[t("collection-type",String(e.type??e.show??"")),t("collection-filter",String(e.filter??"")),t("collection-sort",String(e.sort??"")),t("collection-group",String(e.group??"")),t("collection-limit",String(e.limit??"")),t("collection-fields",String(e.fields??"")),t("collection-layout",String(e.layout??"list")),t("collection-group-display",String(e["group-display"]??"headings")),t("collection-empty",String(e.empty??"")),t(tC,"true")];r&&i.push(t("collection-body",r));const s=new P0("div",{"data-name":"items"},[]);return qe({rune:"collection",tag:"section",properties:{},refs:{items:s},children:[...i,s]})}}),{Tag:E0}=B,nC="__relationships-sentinel",rz=He({attributes:{of:{type:String,required:!1,default:"",description:"Entity to describe — an id (e.g. `of=$item.id`) or a bound entity."},kind:{type:String,required:!1,default:"",description:'Edge kinds to include, comma-separated (e.g. "blocks,blocked-by").'},type:{type:String,required:!1,default:"",description:"Restrict related entity types, comma-separated."},group:{type:String,required:!1,default:"kind",description:"Group-by: kind (default) | type | none."},"group-display":{type:String,required:!1,default:"headings",matches:["headings","accordion"],description:"How groups are presented: headings (default) or accordion (collapsible native <details> panels, styled like the accordion rune, with a per-group count)."},sort:{type:String,required:!1,default:"",description:"Sort related entities by a field (prefix - for descending)."},limit:{type:String,required:!1,default:"",description:"Max edges."},fields:{type:String,required:!1,default:"",description:"Comma-separated data fields to project in the no-body built-in."},layout:{type:String,required:!1,default:"list",description:"Arrangement: list (stacked) | grid (multi-column). Item chrome comes from the item — the no-body built-in, or a rune like {% card %} in the body template."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when there are no edges (no-body form; body form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(l,c)=>new E0("meta",{"data-field":l,content:c}),r=Pv(e)??"",i=e.of,s=String(i&&typeof i=="object"?i.id??"":i??""),o=[t("relationships-of",s),t("relationships-kind",String(e.kind??"")),t("relationships-type",String(e.type??"")),t("relationships-group",String(e.group??"kind")),t("relationships-group-display",String(e["group-display"]??"headings")),t("relationships-sort",String(e.sort??"")),t("relationships-limit",String(e.limit??"")),t("relationships-fields",String(e.fields??"")),t("relationships-layout",String(e.layout??"list")),t("relationships-empty",String(e.empty??"")),t(nC,"true")];r&&o.push(t("relationships-body",r));const a=new E0("div",{"data-name":"items"},[]);return qe({rune:"relationships",tag:"section",properties:{},refs:{items:a},children:[...o,a]})}}),{Tag:iz}=B,rC="__aggregate-sentinel",sz=He({attributes:{type:{type:String,required:!1,default:"",description:"Entity type(s), comma-separated."},filter:{type:String,required:!1,default:"",description:"field:value clauses defining the primary set being measured (SPEC-070 grammar)."},value:{type:String,required:!1,default:"",description:'Optional secondary field:value clause defining the achieved subset within `filter` (e.g. value="status:done"). When set, $item.value is the count matching both; $item.percent is the ratio. Without it, the rune is a pure count + breakdown — no progress-bar semantics.'},group:{type:String,required:!1,default:"",description:"Group-by field; omit to render the body once with totals."},sort:{type:String,required:!1,default:"",description:"Sort groups by `key`, `count`, `value`, or `percent` (prefix `-` for descending). Honors SPEC-072 domain-aware ordering when the group field has one."},limit:{type:String,required:!1,default:"",description:"Cap the number of groups (after sort)."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when the query matches no entities (self-closing form; body form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(o,a)=>new iz("meta",{"data-field":o,content:a}),r=Pv(e)??"",i=r.length>0,s=[t("aggregate-type",String(e.type??"")),t("aggregate-filter",String(e.filter??"")),t("aggregate-value",String(e.value??"")),t("aggregate-group",String(e.group??"")),t("aggregate-sort",String(e.sort??"")),t("aggregate-limit",String(e.limit??"")),t("aggregate-empty",String(e.empty??"")),t(rC,"true")];return r&&s.push(t("aggregate-body",r)),qe({rune:"aggregate",tag:i?"section":"span",properties:{},children:s})}}),{Tag:$0}=B,iC="__file-ref-sentinel",oz=He({attributes:{path:{type:String,required:!0,description:"Project-root-relative file path. Same sandbox as snippet — absolute paths, traversal escapes, and out-of-root symlinks are rejected."},lines:{type:String,required:!1,description:'Line range. `"42-58"` (range), `"42"` (single line). Drives both the GitHub anchor (#L42-L58) and the drawer-body snippet slice when `preview="drawer"`.'},label:{type:String,required:!1,description:"Display text for the inline link. Defaults to the filename (e.g. `token-contract.ts`). Pass an explicit label when the file-ref refers to a symbol within the file rather than the file itself."},preview:{type:String,required:!1,matches:["drawer"],description:'Preview target. `"drawer"` hoists a drawer with the file\'s snippet + a GitHub footer link, leaving an inline link at the call site that opens it. Absent → no preview, just the inline link.'}},selfClosing:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=String(e.path??""),r=e.lines!==void 0?String(e.lines):"",i=e.label!==void 0?String(e.label):"",s=e.preview!==void 0?String(e.preview):"",o=az(t),a=(u,f)=>new $0("meta",{"data-field":u,content:f}),l=[a("file-ref-path",t),a("file-ref-lines",r),a("file-ref-label",i),a("file-ref-preview",s),a(iC,"true")],c=new $0("a",{},[i||o]);return qe({rune:"file-ref",tag:"span",properties:{},refs:{link:c},children:[...l,c]})}});function az(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}const{Tag:yi}=B,lz=/^h([1-6])$/;function cz(n,e){const t=n.attributes?.[e];return typeof t=="string"?t:void 0}function uz(n,e,t){for(const r of n){const i=[],s=new Set;lg(r.renderable,o=>{const a=cz(o,"data-drawer-id");if(!a){t.error("drawer rune is missing required `id` attribute",r.url);return}s.has(a)&&t.warn(`drawer id="${a}" is declared more than once on this page — last declaration wins`,r.url),s.add(a),i.push({id:a,title:fz(o),side:So(o,"side")??"right",size:So(o,"size")??"md",shortcut:So(o,"shortcut")})});for(const o of i)e.register({type:"drawer",id:o.id,scope:"page",sourceUrl:`${r.url}#drawer-${o.id}`,data:{title:o.title,side:o.side,size:o.size,shortcut:o.shortcut}})}}function lg(n,e){if(Array.isArray(n)){for(const r of n)lg(r,e);return}if(!yi.isTag(n))return;const t=n;if(t.attributes?.["data-rune"]==="drawer"){e(t);return}if(t.children)for(const r of t.children)lg(r,e)}function fz(n){const e=sC(n,"title");if(!e)return;const t=cg(e);return t.length>0?t:void 0}function sC(n,e){if(n.attributes?.["data-name"]===e)return n;for(const t of n.children??[])if(yi.isTag(t)){const r=sC(t,e);if(r)return r}}function cg(n){return typeof n=="string"?n:Array.isArray(n)?n.map(cg).join(""):yi.isTag(n)?(n.children??[]).map(cg).join(""):""}function dz(n){const e={lastHeadingLevel:0,mutated:!1},t=ug(n,e);return e.mutated?t:n}function ug(n,e){if(typeof n=="string"||typeof n=="number"||n==null)return n;if(Array.isArray(n)){let a=!1;const l=n.map(c=>{const u=ug(c,e);return u!==c&&(a=!0),u});return a?l:n}if(!yi.isTag(n))return n;const t=n,r=lz.exec(t.name);if(t.attributes?.[sg]==="true"){const a=e.lastHeadingLevel===0?1:e.lastHeadingLevel,l=Math.min(6,Math.max(1,a+1));e.mutated=!0;const c={...t.attributes};return delete c[sg],new yi(`h${l}`,c,t.children)}if(r&&(e.lastHeadingLevel=Number(r[1])),!t.children||t.children.length===0)return t;let s=!1;const o=t.children.map(a=>{const l=ug(a,e);return l!==a&&(s=!0),l});return s?new yi(t.name,t.attributes,o):t}const $v="hoist-drawer",oC=new Map;function aC(n,e){oC.set(n,e)}function hz(n){const e={},t=n.attributes;if(!t)return e;for(const[r,i]of Object.entries(t))r.startsWith("data-")&&typeof i=="string"&&(e[r.slice(5)]=i);return e}function pz(n,e,t,r,i){const s=mz(n),o=new Map,l={payloads:o,seenIds:new Set,authorIds:s,drawerDepth:0,pageUrl:e,ctx:i,mutated:!1},c=fg(n,l);if(o.size===0)return l.mutated?c:n;const u={pageUrl:e,registry:t,projectRoot:r,ctx:i},f=[];for(const d of o.values()){const h=d.source;if(!h){i.warn(`hoist drawer payload is missing required \`source\` attribute (target-id=${d["target-id"]??"?"})`,e);continue}const m=oC.get(h);if(!m){i.warn(`hoist drawer source "${h}" has no registered builder — skipping target-id=${d["target-id"]??"?"}`,e);continue}const p=m(d,u);p&&f.push(p)}if(f.length===0)return c;if(Array.isArray(c))return[...c,...f];if(yi.isTag(c)){const d=c;return new yi(d.name,d.attributes,[...d.children??[],...f])}return[c,...f]}function mz(n){const e=new Set,t=r=>{if(Array.isArray(r)){for(const s of r)t(s);return}if(!yi.isTag(r))return;const i=r;if(i.attributes?.["data-rune"]==="drawer"){const s=i.attributes?.["data-drawer-id"];typeof s=="string"&&e.add(s);return}for(const s of i.children??[])t(s)};return t(n),e}function fg(n,e){if(Array.isArray(n)){let o=!1;const a=[];for(const l of n){const c=fg(l,e);c!==l&&(o=!0),c!==El&&a.push(c)}return o?(e.mutated=!0,a):n}if(!yi.isTag(n))return n;const t=n;if(t.name==="meta"&&t.attributes?.["data-field"]===$v){const o=hz(t),a=o["target-id"];return a?e.authorIds.has(a)?(e.ctx.info(`Hoist preview "${a}" (source=${o.source??"?"}) collides with an author-declared {% drawer id="${a}" %} on this page — author drawer wins, hoist defers.`,e.pageUrl),El):(e.drawerDepth>0&&e.ctx.info(`Hoist preview "${a}" (source=${o.source??"?"}) appears inside another drawer's body — nested previews stack on modern browsers, consider not nesting.`,e.pageUrl),e.seenIds.has(a)||(e.payloads.set(a,o),e.seenIds.add(a)),El):(e.ctx.warn("hoist drawer sentinel is missing required `data-target-id` attribute",e.pageUrl),El)}const r=t.attributes?.["data-rune"]==="drawer";if(r&&e.drawerDepth++,!t.children||t.children.length===0)return r&&e.drawerDepth--,t;let i=!1;const s=[];for(const o of t.children){const a=fg(o,e);a!==o&&(i=!0),a!==El&&s.push(a)}return r&&e.drawerDepth--,i?(e.mutated=!0,new yi(t.name,t.attributes,s)):t}const El=Symbol("hoist-strip");function gz(n,e){const t=n.toLowerCase().replace(/[^a-z0-9.]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!e)return t;const r=e.trim(),i=r.indexOf("-");if(i<0)return`${t}-L${r}`;const s=r.slice(0,i).trim(),o=r.slice(i+1).trim();return o?`${t}-L${s}-L${o}`:`${t}-L${s}`}function Oz(n){return n.split(void 0).join("/")}function lC(n,e){if(typeof n!="string"||n.length===0)throw new Jn("snippet `path` attribute is required");(void 0)(n);const r=(void 0)((void 0)(e,n)),i=e.endsWith(void 0)?e:e+void 0;if(!r.startsWith(i)&&r!==e)throw new Jn(`snippet path "${n}" escapes the project root after normalization`);try{const s=(void 0)(r);if(!s.startsWith(i)&&s!==e)throw new Jn(`snippet path "${n}" resolves through a symlink that escapes the project root`)}catch(s){if(s.code!=="ENOENT")throw s}return r}function vz(n){if(n==null||n==="")return null;if(typeof n!="string")throw new Jn(`snippet \`lines\` attribute must be a string, got ${typeof n}`);const e=n.trim();if(e.length===0)return null;if(/^\d+$/.test(e)){const a=Number(e);if(!Number.isFinite(a)||a<1)throw new Jn(`snippet \`lines\` value "${n}" is not a positive integer`);return{start:a,end:a}}const t=/^(\d*)-(\d*)$/.exec(e);if(!t)throw new Jn(`snippet \`lines\` value "${n}" is malformed; expected "N", "N-M", "N-", or "-M"`);const r=t[1],i=t[2],s=r.length>0?Number(r):void 0,o=i.length>0?Number(i):void 0;if(s!==void 0&&(!Number.isFinite(s)||s<1))throw new Jn(`snippet \`lines\` start "${r}" is not a positive integer`);if(o!==void 0&&(!Number.isFinite(o)||o<1))throw new Jn(`snippet \`lines\` end "${i}" is not a positive integer`);if(s!==void 0&&o!==void 0&&o<s)throw new Jn(`snippet \`lines\` value "${n}" is inverted (end before start)`);return{start:s,end:o}}function bz(n,e){if(e===null)return{sliced:n,warnings:[]};const t=n.split(`
327
+ `),r=t.length,i=e.start??1;let s=e.end??r;const o=[];if(i>r)throw new Jn(`snippet \`lines\` start ${i} is past end of file (${r} lines)`);return s>r&&(o.push(`snippet \`lines\` end ${s} exceeds file length; clamped to ${r}`),s=r),{sliced:t.slice(i-1,s).join(`
328
+ `),warnings:o}}function cC(n){const e=lC(n.pathAttr,n.projectRoot);let t;try{t=(void 0)(e)}catch{const l=n.referencingPage?`
329
+
330
+ Referenced from: ${n.referencingPage}`:"";throw new Jn(`snippet path "${n.pathAttr}" cannot be resolved.
331
+
332
+ Resolved to: ${e}
333
+ Reason: file not found${l}`)}if(!t.isFile())throw new Jn(`snippet path "${n.pathAttr}" must be a file (got ${t.isDirectory()?"directory":"other"})`);const r=(void 0)(e,"utf-8"),i=vz(n.lines),{sliced:s,warnings:o}=bz(r,i),a=Oz((void 0)(n.projectRoot,e));return{content:s,absolutePath:e,relativePath:a,warnings:o}}function yz(n){if(!(void 0)(lC(n.relativePath,n.projectRoot)))throw new Jn(`source file "${n.relativePath}" does not exist`)}class Jn extends Error{constructor(e){super(e),this.name="SnippetSandboxError"}}const wz=Object.freeze({".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".svelte":"svelte",".vue":"vue",".md":"markdoc",".markdoc":"markdoc",".json":"json",".jsonc":"jsonc",".html":"html",".css":"css",".yml":"yaml",".yaml":"yaml",".toml":"toml",".sh":"bash",".bash":"bash"}),Q0="text";function uC(n){if(typeof n!="string"||n.length===0)return Q0;let e;const t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),r=t>=0?n.slice(t+1):n,i=r.lastIndexOf(".");return i===-1?e="."+r.toLowerCase():i===0?e=r.toLowerCase():e=r.slice(i).toLowerCase(),wz[e]??Q0}const{Tag:rr}=B;function Qv(n){return rr.isTag(n)}function Bu(n,e){for(const t of n.children??[])if(Qv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function _z(n){return(n.children??[]).some(e=>Qv(e)&&e.name==="meta"&&e.attributes["data-field"]===iC)}function kz(n){return{path:Bu(n,"file-ref-path"),lines:Bu(n,"file-ref-lines"),label:Bu(n,"file-ref-label"),preview:Bu(n,"file-ref-preview")}}function fC(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function xz(n,e,t,r,i){const s={value:!1},o=a=>{if(Array.isArray(a)){let f=!1;const d=a.map(h=>{const m=o(h);return m!==h&&(f=!0),m});return f?d:a}if(!Qv(a))return a;const l=a;if(l.attributes?.["data-rune"]==="file-ref"&&_z(l))return Sz(l,e,t,r,i,s);if(!l.children||l.children.length===0)return l;let c=!1;const u=l.children.map(f=>{const d=o(f);return d!==f&&(c=!0),d});return c?new rr(l.name,l.attributes,u):l};return o(n)}function Sz(n,e,t,r,i,s){const o=kz(n),a=o.label||fC(o.path)||o.path,l=gz(o.path,o.lines),c=o.preview==="drawer",u=s6(t,r,o.path,o.lines);!u&&!s.value&&(i.warn(`file-ref on this page has no GitHub URL — site config is missing \`repoUrl\` (path="${o.path}"). Configure \`SiteConfig.repoUrl\` to render canonical "View source" links.`,e),s.value=!0);const f={};c?(f.href=`#drawer-${l}`,f["aria-controls"]=`drawer-${l}`,f["aria-expanded"]="false",f["data-target-type"]="drawer"):u&&(f.href=u);const h=[new rr("a",f,[a])];if(c){const m=new rr("meta",{"data-field":$v,"data-source":"file-ref","data-target-id":l,"data-title":a,"data-path":o.path,"data-lines":o.lines,"data-github-url":u??""});h.push(m)}return new rr(n.name,n.attributes,h)}function Az(n,e){const t=n.path,r=n.lines,i=n.title||fC(t),s=n["target-id"],o=n["github-url"];if(!t||!s)return e.ctx.warn("file-ref hoist payload missing required path or target-id",e.pageUrl),null;if(!e.projectRoot)return e.ctx.error(`file-ref hoist for "${t}" requires a project root in the pipeline; none was threaded through. Drawer body will be empty.`,e.pageUrl),null;let a="",l="text";try{const _=cC({pathAttr:t,projectRoot:e.projectRoot,lines:r||void 0,referencingPage:e.pageUrl});a=_.content,l=uC(_.relativePath);for(const C of _.warnings)e.ctx.warn(`file-ref ${t}: ${C}`,e.pageUrl)}catch(_){const C=_ instanceof Jn?_.message:`file-ref ${t}: ${_ instanceof Error?_.message:String(_)}`;return e.ctx.error(C,e.pageUrl),null}const c=new rr("pre",{"data-language":l,"data-codeblock":"true"},[new rr("code",{"data-language":l,"data-codeblock":"true"},[a])]),u=new rr("figure",{class:"rf-snippet","data-rune":"snippet","data-source-path":t,...r?{"data-lines":r}:{}},[c]),f=new rr("div",{"data-name":"body",class:"rf-drawer__body"},[u]),d=new rr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),h=new rr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),m=new rr("header",{"data-name":"header",class:"rf-drawer__header"},[d,h]),p=[];o&&p.push(new rr("a",{href:o,rel:"external noopener",target:"_blank"},["View source on GitHub →"]));const O=p.length>0?new rr("footer",{"data-name":"footer",class:"rf-drawer__footer"},p):null,v=[m,f];return O&&v.push(O),new rr("section",{id:`drawer-${s}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":s,"data-side":"right","data-size":"md"},v)}aC("file-ref",Az);const{Tag:Wr}=B;function Cz(n){return Wr.isTag(n)}function Tz(n,e,t,r){const i=s=>{if(Array.isArray(s)){let c=!1;const u=[];for(const f of s){const d=i(f);d!==f&&(c=!0),Array.isArray(d)?u.push(...d):u.push(d)}return c?u:s}if(!Cz(s))return s;const o=s;if(o.attributes?.["data-rune"]===Cv&&o.attributes?.["data-xref-preview"]==="drawer")return Pz(o,t,r,e);if(!o.children||o.children.length===0)return o;let a=!1;const l=[];for(const c of o.children){const u=i(c);u!==c&&(a=!0),Array.isArray(u)?l.push(...u):l.push(u)}return a?new Wr(o.name,o.attributes,l):o};return i(n)}function Pz(n,e,t,r){const i=n.attributes,s=String(i["data-xref-id"]??""),o=i["data-xref-label"];if(!s)return t.warn(`xref preview placeholder on ${r} has no entity id`,r),[n];const a=e?dC(e,s):void 0,l=o||(a?L0(a):s),c=a?L0(a):s,u=s,f=new Wr("a",{class:"rf-xref",href:`#drawer-${u}`,"aria-controls":`drawer-${u}`,"aria-expanded":"false","data-target-type":"drawer","data-xref-id":s},[l]),d=new Wr("meta",{"data-field":$v,"data-source":"xref","data-target-id":u,"data-title":c,"data-entity-id":s});return[f,d]}function dC(n,e){const t=n.getTypes?.()??[];for(const r of t){const i=n.getById(r,e);if(i)return i}}function L0(n){const e=n.data;return String(e.title??e.name??n.id)}function Ez(n,e){const t=n["entity-id"]||n["target-id"],r=n["target-id"],i=n.title||t;if(!t||!r)return e.ctx.warn("xref hoist payload missing required entity-id or target-id",e.pageUrl),null;const s=e.registry?dC(e.registry,t):void 0,o=new Wr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),a=new Wr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),l=new Wr("header",{"data-name":"header",class:"rf-drawer__header"},[o,a]),u=[new Wr("div",{"data-rune":Tv,"data-expand-id":t},[])],f=new Wr("div",{"data-name":"body",class:"rf-drawer__body"},u),d=s?.sourceUrl??"",h=d?new Wr("footer",{"data-name":"footer",class:"rf-drawer__footer"},[new Wr("a",{href:d},["View full page →"])]):null,m=[l,f];return h&&m.push(h),new Wr("section",{id:`drawer-${r}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":r,"data-side":"right","data-size":"md"},m)}aC("xref",Ez);const{Tag:$l}=B,$z=["fraction","percent","none"],Qz=["positive","caution","negative"];function dg(n){return typeof n=="string"?n:Array.isArray(n)?n.map(dg).join(""):B.Tag.isTag(n)?dg(n.children??[]):""}const Lz=He({attributes:{value:{type:Number,required:!1,description:"Completed amount (paired with `max`)."},max:{type:Number,required:!1,description:"Total amount (paired with `value`)."},percent:{type:Number,required:!1,description:"Direct percentage 0–100, when there is no count."},display:{type:String,required:!1,matches:$z.slice(),description:"Readout: fraction (default with value/max), percent, or none."},sentiment:{type:String,required:!1,matches:Qz.slice(),description:"Tone cue: positive / caution / negative. Absent → the neutral primary fill."}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.value!=null?Number(e.value):void 0,i=e.max!=null?Number(e.max):void 0,s=e.percent!=null?Number(e.percent):void 0,o=y=>Math.max(0,Math.min(100,y)),a=r!=null&&i!=null&&Number.isFinite(r)&&Number.isFinite(i)&&i>0,l=a?o(Math.round(r/i*100)):s!=null&&Number.isFinite(s)?o(s):0,c=e.display||(a?"fraction":"percent");let u="";c==="fraction"&&a?u=`${r}/${i}`:c==="percent"&&(u=`${l}%`);const d=new je(B.transform(at(n.body),t)).toArray(),h=dg(d).trim(),m=e.sentiment,p=m?new $l("meta",{content:m}):void 0,O=new $l("span",{},[]),v=new $l("span",{},[O]),b={track:v,fill:O},_=p?[p]:[];if(d.length>0){const y=new $l("span",{},d);b.label=y,_.push(y)}if(u){const y=new $l("span",{},[u]);b.value=y,_.push(y)}_.push(v);const C=qe({rune:"progress",tag:"div",properties:p?{sentiment:p}:{},refs:b,children:_});return C.attributes.role="progressbar",C.attributes["aria-valuemin"]="0",a?(C.attributes["aria-valuenow"]=String(r),C.attributes["aria-valuemax"]=String(i)):(C.attributes["aria-valuenow"]=String(l),C.attributes["aria-valuemax"]="100"),h&&(C.attributes["aria-label"]=h),C.attributes.style=`--rf-progress: ${l}%`,C}}),{Tag:Ql}=B,Mz=He({base:q6,attributes:{href:{type:String,required:!1,default:"",description:"Optional link target; makes the whole card clickable."}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=at(n.body),i=[[]];for(const k of r)k.type==="hr"?i.push([]):i[i.length-1].push(k);let s=[],o=[],a=[];i.length===1?o=i[0]:i.length===2?(s=i[0],o=i[1]):(s=i[0],a=i[i.length-1],o=i.slice(1,-1).flat());const{metas:l,children:c}=R6(e),u=[...c];if(s.length>0){const k=new je(B.transform(s,t)),E=I6(k),T=E?[E]:k.toArray();u.push(new Ql("div",{"data-section":"media","data-name":"media"},T))}let f,d=o;o.length>=2&&o[0].type==="paragraph"&&o[1].type==="heading"&&(f=o[0],d=o.slice(1));const h=[];let m;if(f){const E=new je(B.transform([f],t)).toArray()[0];B.Tag.isTag(E)&&(m=E,h.push(m))}const O=new je(B.transform(d,t)).toArray();let v;const b=O[0];B.Tag.isTag(b)&&/^h[1-6]$/.test(b.name)&&(v=b),h.push(...O);const _=new Ql("div",{"data-name":"body"},h),C=[_];let y;if(a.length>0){const k=new je(B.transform(a,t));y=new Ql("footer",{"data-name":"footer"},k.toArray()),C.push(y)}const w=new Ql("div",{"data-name":"content"},C);u.push(w);let S;const A=String(e.href??"");A&&(S=new Ql("a",{"data-name":"link",href:A,"aria-hidden":"true",tabindex:"-1"},[]),u.push(S));const x={content:w,body:_};return v&&(x.title=v),m&&(x.eyebrow=m),y&&(x.footer=y),S&&(x.link=S),qe({rune:"card",tag:"div",properties:{layout:l.layout},refs:x,children:u})}}),{Tag:Dz}=B,qz=["positive","negative","caution","neutral"],Rz=["status","category","quantity","temporal","tag","id"],Iz={inline:!0,attributes:{sentiment:{type:String,required:!1,matches:qz.slice(),description:"Sentiment dimension: positive, negative, caution, neutral. Default: neutral."},type:{type:String,required:!1,matches:Rz.slice(),description:"Meta-type dimension: status, category, quantity, temporal, tag, id. Default: tag."}},transform(n,e){const t=n.attributes.sentiment??"neutral",r=n.attributes.type??"tag",i={class:"rf-badge","data-rune":"badge","data-meta-sentiment":t,"data-meta-type":r},s=n.transformChildren(e);return new Dz("span",i,s)}},{Tag:kp}=B;function Nz(n){const e=n.findIndex(t=>t.type==="hr");return e<0?{left:n,right:[]}:{left:n.slice(0,e),right:n.slice(e+1)}}const Bz=He({attributes:{},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=Nz(at(n.body)),i=B.transform(r.left,t),s=B.transform(r.right,t),o=new kp("div",{},i),a=r.right.length>0?new kp("div",{"data-align":"end"},s):null,l=a?[o,a]:[o];return new kp("div",{"data-rune":"bar","data-zone-layout":"bar"},l)}}),{Ast:ju,Tag:uo}=B;function jz(n){const e=n.children??[];if(e.length===0)return null;let t,r;const i=e[0];if(i?.type==="inline")t=i,r=e.slice(1);else if(i?.type==="paragraph")t=i.children?.[0],r=e.slice(1);else return null;if(!t||t.type!=="inline")return null;const s=t.children??[];if(s.length===0)return null;const o=s[0];if(!o||o.type!=="strong")return null;const a=o.children??[];let l="";for(const p of a)p.type==="text"&&typeof p.attributes?.content=="string"&&(l+=p.attributes.content);if(!l.endsWith(":"))return null;const c=l.slice(0,-1),u=[new ju.Node("text",{content:c})],f=s.slice(1),d=(()=>{const p=f[0];if(p?.type==="text"&&typeof p.attributes?.content=="string"){const O=p.attributes.content.replace(/^\s+/,"");return O===""?f.slice(1):[new ju.Node("text",{content:O}),...f.slice(1)]}return f})(),h=d.length>0?[new ju.Node("inline",{},d)]:[],m=h.length>0?[new ju.Node("paragraph",{},h)]:[];return{term:u,rest:h,restBlocks:[...m,...r]}}const zz=He({attributes:{},contentModel:{type:"sequence",fields:[{name:"list",match:"list",optional:!1}]},transform(n,e,t){const i=at(n.list).find(a=>a.type==="list");if(!i)return new uo("dl",{"data-rune":"deflist","data-zone-layout":"definition-list"},[]);const s=(i.children??[]).filter(a=>a.type==="item"),o=[];for(const a of s){const l=jz(a);let c,u;if(l){const f=B.transform(l.term,t),d=B.transform(l.restBlocks,t);c=new uo("dt",{"data-meta-label":""},f),u=new uo("dd",{},M0(d))}else{const f=B.transform(a.children??[],t);c=new uo("dt",{"data-meta-label":""},[]),u=new uo("dd",{},M0(f)),Zz(a)}o.push(new uo("div",{"data-name":"row"},[c,u]))}return new uo("dl",{"data-rune":"deflist","data-zone-layout":"definition-list"},o)}});function M0(n){if(n.length!==1)return n;const e=n[0];return!B.Tag.isTag(e)||e.name!=="p"?n:e.children}const D0=new Set;function Zz(n){const e=n.location??null,t=e?`${e.start?.line??"?"}:${e.start?.character??"?"}`:"unknown";D0.has(t)||(D0.add(t),console.warn(`[refrakt] {% deflist %} item at line ${e?.start?.line??"?"} lacks a \`**Term:**\` prefix — rendered with empty <dt>. Prefix the item with bold term text ending in \`:\` to label it.`))}class Xz{constructor(e){this.name=e.name,this.aliases=e.aliases??[],this.schema=e.schema,this.description=e.description??"",this.seoType=e.seoType,this.typeName=e.typeName,this.schemaOrgType=e.schemaOrgType,this.authoringHints=e.authoringHints,this.category=e.category,this.snippet=e.snippet}get names(){return[this.name,...this.aliases]}}function Ve(n){return new Xz(n)}function Fz(n){const e={};for(const t of Object.values(n))for(const r of t.names)e[r]=t.schema;return e}const{Ast:Vz}=B;class RY extends Vz.Node{constructor(e,t,r,i){super(e,t,r,i)}transform(e){return super.transform(e)}}const Wz=new Set(["id","type","sourceFile","sourceUrl"]);function Yz(n){const e=[];let t="",r=!1;for(const i of n){if(i==='"'){r=!r;continue}if(!r&&/\s/.test(i)){t&&(e.push(t),t="");continue}t+=i}return t&&e.push(t),e}function hg(n){const e=[],t=new Map;if(!n||!n.trim())return{clauses:[],warnings:e};for(const r of Yz(n)){const i=r.indexOf(":");if(i===-1){e.push(`Ignored filter clause "${r}": expected field:value`);continue}const s=r.slice(0,i);if(!s){e.push(`Ignored filter clause "${r}": empty field name`);continue}const o=r.slice(i+1),a=t.get(s);a?a.push(o):t.set(s,[o])}return{clauses:[...t.entries()].map(([r,i])=>({field:r,values:i})),warnings:e}}function hC(n,e){return e==="url"?n.sourceUrl??n.data.url??"":Wz.has(e)?n[e]:n.data[e]}function Uz(n){const e=n.split("*").map(t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"));return new RegExp("^"+e.join(".*")+"$")}const Gz=/^\/(.+)\/([gimsuy]*)$/,Hz=/[\\^$.+?()[\]{}|]/;function Kz(n,e){const t=e.match(Gz);if(t&&(t[2].length>0||Hz.test(t[1])))try{return new RegExp(t[1],t[2]).test(n)}catch{return n===e}return e.includes("*")?Uz(e).test(n):n===e}function Jz(n){if(Array.isArray(n))return n.map(t=>String(t??""));const e=String(n??"");return e.includes(",")?e.split(",").map(t=>t.trim()):[e]}function Lv(n,e){for(const t of e.clauses){const r=Jz(hC(n,t.field));if(!t.values.some(s=>r.some(o=>Kz(o,s))))return!1}return!0}function pg(n){return String(n??"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}const{Tag:qs,Ast:eZ}=B;function Mv(n){if(!n)return{template:""};const e=B.parse(`
334
+ `+n),t=[[]];for(const s of e.children)s.type==="hr"?t.push([]):t[t.length-1].push(s);if(t.length===1)return{template:n};const r=s=>s.length?B.format(new eZ.Node("document",{},s)):"",i=t.map(r);return i.length===2?{preamble:i[0]||void 0,template:i[1]}:{preamble:i[0]||void 0,template:i[1],fallback:i[2]||void 0}}class tZ{constructor(e,t={}){this.matches=e,this.overrides=t}order(e,t){return this.overrides[e]?.[t]??this.matches[e]?.[t]}rank(e,t,r){const i=this.order(e,t);return i?i.indexOf(r):-1}}function Dv(n){const e={},t=n?.tags??{};for(const[r,i]of Object.entries(t)){const s=i?.attributes;if(s)for(const[o,a]of Object.entries(s)){const l=a?.matches;Array.isArray(l)&&l.every(c=>typeof c=="string")&&((e[r]??={})[o]=l)}}return new tZ(e,n?.orderings??{})}function pC(n){return n.sourceUrl||String(n.data.url??"")}function nZ(n){const e=n.data;return String(e.title??e.name??n.id)}function Br(n,e){const t=hC(n,e);return Array.isArray(t)?t.join(", "):String(t??"")}function mC(n,e){const t=pC(n),r=nZ(n),i=`${e}__title`;return t?new qs("a",{class:i,href:t},[r]):new qs("span",{class:i},[r])}function qv(n){return{id:n.id,type:n.type,url:pC(n),data:n.data}}function rZ(n,e,t){if(!e)return n;let r=e.trim(),i=1;r.startsWith("-")?(i=-1,r=r.slice(1)):r.endsWith("-desc")?(i=-1,r=r.slice(0,-5)):r.endsWith("-asc")&&(r=r.slice(0,-4));const s=t&&n.some(o=>t.order(o.type,r));return[...n].sort((o,a)=>{if(s){const d=t.rank(o.type,r,Br(o,r)),h=t.rank(a.type,r,Br(a,r)),m=d>=0,p=h>=0;if(m&&p){if(d!==h)return(d-h)*i}else if(m!==p)return m?-1:1}const l=Br(o,r),c=Br(a,r),u=Number(l),f=Number(c);return l!==""&&c!==""&&Number.isFinite(u)&&Number.isFinite(f)?(u-f)*i:l.localeCompare(c)*i})}function gC(n,e){const t=new Map;for(const r of n){const i=e(r),s=t.get(i);s?s.push(r):t.set(i,[r])}return t}function OC(n,e,t){const r=gC(n,o=>Br(o,e)||"(none)");if(!t||![...n].some(o=>t.order(o.type,e)))return r;const i=o=>{let a=1/0;for(const l of o){const c=t.rank(l.type,e,Br(l,e));c>=0&&c<a&&(a=c)}return a},s=[...r.entries()].sort((o,a)=>i(o[1])-i(a[1]));return new Map(s)}function vC(n){const e=n.map(t=>new qs("details",{class:"rf-accordion-item","data-group":t.key},[new qs("summary",{class:"rf-accordion-item__header"},[new qs("span",{class:"rf-accordion-item__title"},[t.label]),new qs("span",{class:"rf-accordion-item__count"},[String(t.count)])]),new qs("div",{class:"rf-accordion-item__body"},t.nodes)]));return[new qs("div",{class:"rf-accordion"},e)]}function us(n,e,t){const r=Ev(n,e,t);return Array.isArray(r)?r:[r]}const{Tag:Zt,Ast:iZ}=B;function mg(n){return mC(n,"rf-collection")}function Rv(n){return Zt.isTag(n)}function Mi(n,e){for(const t of n.children??[])if(Rv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function sZ(n){return(n.children??[]).some(e=>Rv(e)&&e.name==="meta"&&e.attributes["data-field"]===tC)}function oZ(n){const e=Mi(n,"collection-limit"),t=Number(e);return{types:Mi(n,"collection-type").split(",").map(r=>r.trim()).filter(Boolean),filter:Mi(n,"collection-filter"),sort:Mi(n,"collection-sort"),group:Mi(n,"collection-group"),groupDisplay:Mi(n,"collection-group-display")||"headings",limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,fields:Mi(n,"collection-fields").split(",").map(r=>r.trim()).filter(Boolean),layout:Mi(n,"collection-layout")||"list",bodySource:Mi(n,"collection-body"),empty:Mi(n,"collection-empty")}}function aZ(n,e){const t=e.fields.map(r=>new Zt("span",{class:"rf-collection__field","data-field":r},[Br(n,r)]));return e.layout==="list"?new Zt("div",{class:"rf-collection__item","data-entity-id":n.id},[mg(n)]):new Zt("article",{class:"rf-collection__card","data-entity-id":n.id},[mg(n),...t])}function lZ(n,e,t){const r=B.parse(n),i=[];let s=null;for(const o of r.children)if(o.type==="heading"){const a=B.format(o).replace(/^#+\s*/,"").trim();a.includes("$item")&&e.warn(`collection: $item in a table column heading ("${a}") is not per-row; use a static label`,t),s={label:a,cellNodes:[]},i.push({label:a,cellSource:""})}else s&&(s.cellNodes.push(o),i[i.length-1].cellSource=B.format(new iZ.Node("document",{},s.cellNodes)));return i}function cZ(n,e,t,r,i){const s=lZ(e,r,i);if(!t)return r.error("collection — table column templates present but no embedConfig threaded through the pipeline",i),new Zt("table",{class:"rf-collection__table"},[]);const o=new Zt("thead",{},[new Zt("tr",{},s.map(l=>new Zt("th",{},[l.label])))]),a=n.map(l=>{const c=qv(l),u=s.map(f=>{const d=Ev(f.cellSource,t,{item:c}),h=Array.isArray(d)?d:[d];return new Zt("td",{},h)});return new Zt("tr",{"data-entity-id":l.id},u)});return new Zt("table",{class:"rf-collection__table"},[o,new Zt("tbody",{},a)])}function uZ(n,e){const t=[new Zt("th",{},["Title"]),...e.fields.map(s=>new Zt("th",{},[pg(s)]))],r=new Zt("thead",{},[new Zt("tr",{},t)]),i=n.map(s=>{const o=[new Zt("td",{},[mg(s)]),...e.fields.map(a=>new Zt("td",{"data-field":a},[Br(s,a)]))];return new Zt("tr",{"data-entity-id":s.id},o)});return new Zt("table",{class:"rf-collection__table"},[r,new Zt("tbody",{},i)])}function fZ(n,e,t,r,i){return t?n.map(s=>{const o=qv(s),a=Ev(e,t,{item:o}),l=Array.isArray(a)?a:[a];return new Zt("div",{class:"rf-collection__item","data-entity-id":s.id,"data-block":""},l)}):(r.error("collection — body template present but no embedConfig threaded through the pipeline",i),[])}function zu(n,e,t,r){if(!e.group)return r(n);const i=OC(n,e.group,t);if(e.groupDisplay==="accordion")return vC([...i].map(([o,a])=>({key:o,label:o,count:a.length,nodes:r(a)})));const s=[];for(const[o,a]of i)s.push(new Zt("div",{class:"rf-collection__group","data-group":o},[new Zt("h3",{class:"rf-collection__group-title"},[o]),...r(a)]));return s}function dZ(n,e,t,r,i,s){const o=oZ(n);let a=[];for(const O of o.types)a.push(...e.getAll(O));if(o.filter){const O=hg(o.filter);for(const v of O.warnings)i.warn(`collection filter: ${v}`,s);a=a.filter(v=>Lv(v,O))}a=rZ(a,o.sort,r);const l=a.length;o.limit!==void 0&&a.length>o.limit&&(a=a.slice(0,o.limit));const c={count:l,shown:a.length},u=Mv(o.bodySource),f=u.template,d={...n.attributes,"data-type":o.types.join(","),"data-layout":o.layout};if(a.length===0){const O=[];return u.fallback&&t?O.push(new Zt("div",{"data-name":"empty",class:"rf-collection__empty"},us(u.fallback,t,c))):o.empty&&O.push(new Zt("div",{"data-name":"empty",class:"rf-collection__empty"},[o.empty])),new Zt(n.name,d,O)}let h;o.layout==="table"&&f?h=zu(a,o,r,O=>[cZ(O,f,t,i,s)]):f?h=zu(a,o,r,O=>fZ(O,f,t,i,s)):o.layout==="table"?h=zu(a,o,r,O=>[uZ(O,o)]):h=zu(a,o,r,O=>O.map(v=>aZ(v,o)));const m=new Zt("div",{"data-name":"items",class:"rf-collection__items"},h),p=[];return u.preamble&&t&&p.push(new Zt("div",{"data-name":"preamble",class:"rf-collection__preamble"},us(u.preamble,t,c))),new Zt(n.name,d,[...p,m])}function hZ(n,e,t,r,i){const s=Dv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!Rv(a))return a;const l=a;return l.attributes?.["data-rune"]==="collection"&&sZ(l)?dZ(l,t,r,s,i,e):!l.children||l.children.length===0?l:new Zt(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:br}=B;function Iv(n){return br.isTag(n)}function fi(n,e){for(const t of n.children??[])if(Iv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function pZ(n){return(n.children??[]).some(e=>Iv(e)&&e.name==="meta"&&e.attributes["data-field"]===nC)}function xp(n){return n.split(",").map(e=>e.trim()).filter(Boolean)}function mZ(n){const e=fi(n,"relationships-limit"),t=Number(e);return{of:fi(n,"relationships-of"),kinds:xp(fi(n,"relationships-kind")),types:xp(fi(n,"relationships-type")),group:fi(n,"relationships-group")||"kind",groupDisplay:fi(n,"relationships-group-display")||"headings",sort:fi(n,"relationships-sort"),limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,fields:xp(fi(n,"relationships-fields")),layout:fi(n,"relationships-layout")||"list",bodySource:fi(n,"relationships-body"),empty:fi(n,"relationships-empty")}}function gZ(n,e,t){if(!e)return n;let r=e.trim(),i=1;r.startsWith("-")?(i=-1,r=r.slice(1)):r.endsWith("-desc")?(i=-1,r=r.slice(0,-5)):r.endsWith("-asc")&&(r=r.slice(0,-4));const s=n.some(o=>t.order(o.target.type,r));return[...n].sort((o,a)=>{if(s){const u=t.rank(o.target.type,r,Br(o.target,r)),f=t.rank(a.target.type,r,Br(a.target,r)),d=u>=0,h=f>=0;if(d&&h){if(u!==f)return(u-f)*i}else if(d!==h)return d?-1:1}const l=Br(o.target,r),c=Br(a.target,r);return l.localeCompare(c)*i})}function q0(n){return mC(n,"rf-relationships")}function OZ(n,e){const t=e.fields.map(i=>new br("span",{class:"rf-relationships__field","data-field":i},[Br(n.target,i)])),r={"data-entity-id":n.target.id,"data-kind":n.kind};return e.layout==="grid"?new br("article",{class:"rf-relationships__card",...r},[q0(n.target),...t]):new br("div",{class:"rf-relationships__item",...r},[q0(n.target),...t])}function Sp(n,e,t,r){return n.map(i=>{if(t&&r){const s=us(t,r,{item:qv(i.target),kind:i.kind});return new br("div",{class:"rf-relationships__item","data-entity-id":i.target.id,"data-kind":i.kind,"data-block":""},s)}return OZ(i,e)})}function vZ(n,e,t,r,i,s){const o=mZ(n);o.of||i.warn("relationships — no `of` entity given (pass of=$item.id on an entity page)",s);let a=o.of&&e.getRelated?e.getRelated(o.of,{kind:o.kinds.length?o.kinds:void 0,type:o.types.length?o.types:void 0}):[];a=gZ(a,o.sort,r);const l=a.length;o.limit!==void 0&&a.length>o.limit&&(a=a.slice(0,o.limit));const c={count:l,shown:a.length},u=Mv(o.bodySource),f=u.template,d={...n.attributes,"data-of":o.of,"data-layout":o.layout};if(a.length===0){const O=[];return u.fallback&&t?O.push(new br("div",{"data-name":"empty",class:"rf-relationships__empty"},us(u.fallback,t,c))):o.empty&&O.push(new br("div",{"data-name":"empty",class:"rf-relationships__empty"},[o.empty])),new br(n.name,d,O)}let h;if(o.group==="none")h=Sp(a,o,f,t);else{const O=o.group==="type"?b=>b.target.type:b=>b.kind,v=gC(a,O);if(o.groupDisplay==="accordion")h=vC([...v].map(([b,_])=>({key:b,label:pg(b),count:_.length,nodes:Sp(_,o,f,t)})));else{h=[];for(const[b,_]of v)h.push(new br("div",{class:"rf-relationships__group","data-group":b},[new br("h3",{class:"rf-relationships__group-title"},[pg(b)]),...Sp(_,o,f,t)]))}}const m=new br("div",{"data-name":"items",class:"rf-relationships__items"},h),p=[];return u.preamble&&t&&p.push(new br("div",{"data-name":"preamble",class:"rf-relationships__preamble"},us(u.preamble,t,c))),new br(n.name,d,[...p,m])}function bZ(n,e,t,r,i){const s=Dv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!Iv(a))return a;const l=a;return l.attributes?.["data-rune"]==="relationships"&&pZ(l)?vZ(l,t,r,s,i,e):!l.children||l.children.length===0?l:new br(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:Fr}=B;function Nv(n){return Fr.isTag(n)}function Ps(n,e){for(const t of n.children??[])if(Nv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function yZ(n){return(n.children??[]).some(e=>Nv(e)&&e.name==="meta"&&e.attributes["data-field"]===rC)}function wZ(n){const e=Ps(n,"aggregate-limit"),t=Number(e);return{types:Ps(n,"aggregate-type").split(",").map(r=>r.trim()).filter(Boolean),filter:Ps(n,"aggregate-filter"),value:Ps(n,"aggregate-value"),group:Ps(n,"aggregate-group"),sort:Ps(n,"aggregate-sort"),limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,bodySource:Ps(n,"aggregate-body"),empty:Ps(n,"aggregate-empty")}}function hd(n,e){return e<=0?0:Math.round(n/e*100)}function _a(n,e){return e?n.filter(t=>Lv(t,e)).length:n.length}function _Z(n,e,t,r,i){if(!e)return n;let s=e.trim(),o=1;return s.startsWith("-")?(o=-1,s=s.slice(1)):s.endsWith("-desc")?(o=-1,s=s.slice(0,-5)):s.endsWith("-asc")&&(s=s.slice(0,-4)),s==="count"?[...n].sort(([,a],[,l])=>(a.length-l.length)*o):s==="value"?[...n].sort(([,a],[,l])=>(_a(a,i)-_a(l,i))*o):s==="percent"?[...n].sort(([,a],[,l])=>{const c=hd(_a(a,i),a.length),u=hd(_a(l,i),l.length);return(c-u)*o}):[...n].sort(([a,l],[c,u])=>{const f=l[0]?.type??"",d=u[0]?.type??"",h=r.rank(f,t,a),m=r.rank(d,t,c),p=h>=0,O=m>=0;if(p&&O){if(h!==m)return(h-m)*o}else if(p!==O)return p?-1:1;return a.localeCompare(c)*o})}function kZ(n,e,t,r,i,s){const o=wZ(n);let a=[];for(const C of o.types)a.push(...e.getAll(C));if(o.filter){const C=hg(o.filter);for(const y of C.warnings)i.warn(`aggregate filter: ${y}`,s);a=a.filter(y=>Lv(y,C))}const l=o.value?hg(o.value):null;if(l)for(const C of l.warnings)i.warn(`aggregate value: ${C}`,s);const c=a.length,u=_a(a,l),f=o.value?hd(u,c):100;if(!o.bodySource)return new Fr(n.name,{...n.attributes,"data-aggregate":"count","data-count":String(c)},[String(c)]);const d=Mv(o.bodySource),h=d.template,m={...n.attributes,"data-aggregate":"breakdown"};if(c===0){const C=[];if(d.fallback&&t){const y={item:{key:"",count:0,value:0,percent:0,total:0,shown:0}};C.push(new Fr("div",{"data-name":"empty",class:"rf-aggregate__empty"},us(d.fallback,t,y)))}else o.empty&&C.push(new Fr("div",{"data-name":"empty",class:"rf-aggregate__empty"},[o.empty]));return new Fr(n.name,m,C)}const p=[];if(d.preamble&&t){const C={item:{count:c,value:u,percent:f,total:c}};p.push(new Fr("div",{"data-name":"preamble",class:"rf-aggregate__preamble"},us(d.preamble,t,C)))}if(!o.group){const C=[...p];if(h&&t){const y={item:{key:"",count:c,value:u,percent:f,total:c,shown:1}};C.push(new Fr("div",{"data-name":"items",class:"rf-aggregate__items"},us(h,t,y)))}return new Fr(n.name,m,C)}let O=[...OC(a,o.group,r).entries()];O=_Z(O,o.sort,o.group,r,l),o.limit!==void 0&&O.length>o.limit&&(O=O.slice(0,o.limit));const v=O.length,b=[];if(h&&t)for(const[C,y]of O){const w=y.length,S=_a(y,l),A=o.value?hd(S,w):100,k=us(h,t,{item:{key:C,count:w,value:S,percent:A,total:c,shown:v}});b.push(new Fr("div",{class:"rf-aggregate__group","data-group":C,"data-block":""},k))}const _=new Fr("div",{"data-name":"items",class:"rf-aggregate__items"},b);return new Fr(n.name,m,[...p,_])}function xZ(n,e,t,r,i){const s=Dv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!Nv(a))return a;const l=a;return l.attributes?.["data-rune"]==="aggregate"&&yZ(l)?kZ(l,t,r,s,i,e):!l.children||l.children.length===0?l:new Fr(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:SZ}=B;function gg(n){return n==null||typeof n=="string"||typeof n=="number"?n:SZ.isTag(n)?{$$mdtype:"Tag",name:n.name,attributes:n.attributes,children:n.children.map(gg)}:n}function AZ(n){return Array.isArray(n)?n.map(gg):gg(n)}const{Tag:pd}=B;function CZ(n,e,t,r){const i=r?[r]:n.getTypes();for(const s of i){const o=n.getById(s,e,t);if(o)return o}}function TZ(n,e,t){const r=e.toLowerCase(),i=t?[t]:n.getTypes(),s=[];for(const o of i)for(const a of n.getAll(o)){const l=a.data.name??"",c=a.data.title??"";(l.toLowerCase()===r||c.toLowerCase()===r)&&s.push(a)}return s}function PZ(n){const e=n.data.url||n.sourceUrl;if(!e)return;const t=n.data.headingId;return t?`${e}#${t}`:e}function R0(n,e,t){if(e)return e;if(t){const r=t.data.title,i=t.data.name,s=t.data.text;return r||i||s||n}return n}const bC=/\{([a-zA-Z_$][a-zA-Z0-9_$]*)\}/g;function EZ(n){return n.split("/").map(encodeURIComponent).join("/")}function $Z(n,e,t){return n.replace(bC,(r,i)=>{const s=i==="id"?e:t[i]??"";return EZ(s)})}function QZ(n,e,t){return n.replace(bC,(r,i)=>i==="id"?e:t[i]??"")}function LZ(n,e){for(const t of e){const r=t.match.exec(n);if(!r)continue;const i=r.groups??{};return{url:$Z(t.template,n,i),label:QZ(t.label,n,i),type:t.type}}}function MZ(n,e){const t=n.indexOf("#");if(t<0)return n;const r=n.slice(0,t),i=n.slice(t),s=o=>o.endsWith("/")?o.slice(0,-1):o;return s(r)===s(e)?i:n}function DZ(n,e,t,r){let i=CZ(r.registry,n,r.pageUrl,t);if(!i){const c=TZ(r.registry,n,t);if(c.length===1)i=c[0];else if(c.length>1){const u=c.map(f=>`${f.type} "${f.data.title||f.data.name||f.id}" on ${f.sourceUrl??"(no URL)"}`).join(", ");r.ctx.warn(`xref "${n}" on ${r.pageUrl} — matches ${c.length} entities (${u}). Add type hint to disambiguate.`,r.pageUrl),i=c[0]}}const s=i?PZ(i):void 0;let o;if(i&&s)o={href:s,label:R0(n,e,i),type:i.type,source:"registry",targetType:i.type,entityId:i.id};else{const c=LZ(n,r.patterns);c&&(o={href:c.url,label:R0(n,e,i)||c.label,type:i?.type??c.type,source:"pattern",targetType:i?.type,entityId:i?.id},!i&&!e&&(o.label=c.label))}if(!o)return r.ctx.warn(`xref "${n}" on ${r.pageUrl} — entity not found`,r.pageUrl),{tag:new pd("span",{class:"rf-xref rf-xref--unresolved","data-xref-id":n},[e||n])};o.href===r.pageUrl&&r.ctx.info(`xref "${n}" on ${r.pageUrl} — references itself`,r.pageUrl);const a=MZ(o.href,r.pageUrl),l={class:`rf-xref rf-xref--${o.type}`,href:a,"data-xref-id":o.entityId??n,"data-xref-source":o.source};return o.targetType&&(l["data-target-type"]=o.targetType),{tag:new pd("a",l,[o.label])}}function qZ(n,e,t,r,i){return Og(n,{pageUrl:e,registry:t,patterns:r,ctx:i})}function Og(n,e){if(!pd.isTag(n)){if(Array.isArray(n)){const i=n,s=i.map(o=>Og(o,e));return s.every((o,a)=>o===i[a])?n:s}return n}const t=n;if(t.attributes?.["data-rune"]===Cv){const i=t.attributes["data-xref-id"],s=t.attributes["data-xref-label"],o=t.attributes["data-xref-type"];return i?DZ(i,s,o,e).tag:new pd("span",{class:"rf-xref rf-xref--unresolved"},[s||"?"])}const r=(t.children??[]).map(i=>Og(i,e));return r.every((i,s)=>i===t.children[s])?t:{...t,children:r}}const{Ast:yC,Tag:vg}=B;function Zu(n,e){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="object"&&"$$mdtype"in n){const t=n;if(t.$$mdtype==="Variable"&&Array.isArray(t.path)){let r=e;for(const i of t.path){if(r==null)return"";r=r[i]}return r==null?"":String(r)}}return""}const RZ=new Set(["code-group","diff"]);function IZ(n,e,t){if(!t.projectRoot)return;let r=!1;return wC(n,e,t,t.projectRoot,i=>{i&&(r=!0)}),r?n:void 0}function wC(n,e,t,r,i){if(n.children)for(let s=0;s<n.children.length;s++){const o=n.children[s];if(o.type==="tag"&&o.tag==="snippet"){n.children[s]=NZ(o,e,t,r),i(!0);continue}wC(o,e,t,r,i)}}function Ap(n,e){return new yC.Node("fence",{content:`snippet error: ${e}
335
+ `,language:"text",source:n||"(unresolved)","data-snippet-error":e})}function NZ(n,e,t,r){const i=Zu(n.attributes.path,t.variables),s=n.attributes.lines!==void 0?Zu(n.attributes.lines,t.variables):void 0,o=n.attributes.lang!==void 0?Zu(n.attributes.lang,t.variables):void 0,a=n.attributes.linenumbers===!0,l=n.attributes.highlight!==void 0?Zu(n.attributes.highlight,t.variables):void 0;if(!i){const d="snippet `path` attribute is required (and an unresolvable variable reference resolves to empty)";return t.error(d,e.url),Ap("",d)}let c;try{c=cC({pathAttr:i,projectRoot:r,lines:s||void 0,referencingPage:e.relativePath})}catch(d){if(d instanceof Jn)return t.error(d.message,e.url),Ap(i,d.message);const h=d.message??String(d);return t.error(`snippet "${i}" failed unexpectedly: ${h}`,e.url),Ap(i,h)}for(const d of c.warnings)t.warn(d,e.url);const u=o&&o.length>0?o:uC(c.relativePath),f={content:c.content,language:u,source:c.relativePath};return s&&(f.lines=s),a&&(f.linenumbers=!0),l&&l.length>0&&(f.highlight=l),new yC.Node("fence",f)}function BZ(n,e,t){const r=bg(n.renderable,!1);return r===n.renderable?n:{...n,renderable:r}}function bg(n,e){if(Array.isArray(n)){let l=!1;const c=n.map(u=>{const f=bg(u,e);return f!==u&&(l=!0),f});return l?c:n}if(!vg.isTag(n))return n;const t=n,r=t.attributes?.["data-rune"],i=typeof r=="string"&&RZ.has(r),s=e||i;if(t.name==="pre"&&t.attributes?.["data-source"]!==void 0&&!e)return jZ(t);if(!t.children||t.children.length===0)return t;let o=!1;const a=t.children.map(l=>{const c=bg(l,s);return c!==l&&(o=!0),c});return o?new vg(t.name,t.attributes,a):t}function jZ(n){const e=n.attributes,t=String(e["data-source"]??""),r=e["data-lines"]!==void 0?String(e["data-lines"]):void 0,i={class:"rf-snippet","data-rune":"snippet","data-source-path":t};return r&&(i["data-lines"]=r),new vg("figure",i,[n])}const{Tag:Xo}=B,_C=/^h[1-6]$/,yg="data-outline-scope";function zZ(n){const e=new Set;return kg(n,[],e),e.size>0&&xg(n,e),n}function ZZ(n){const e=[];return wg(n,!1,e),e}function wg(n,e,t){if(Array.isArray(n)){for(const o of n)wg(o,e,t);return}if(!Xo.isTag(n))return;const r=n,i=r.attributes;if(_C.test(r.name)){if(e)return;const o=Number(r.name.slice(1)),a=typeof i?.id=="string"?i.id:"",l=_g(r);a&&l&&t.push({level:o,text:l,id:a});return}const s=e||i&&typeof i[yg]=="string";if(!(!r.children||r.children.length===0))for(const o of r.children)wg(o,!!s,t)}function _g(n){return typeof n=="string"?n:typeof n=="number"?String(n):Array.isArray(n)?n.map(_g).join(""):Xo.isTag(n)?(n.children??[]).map(_g).join(""):""}function kg(n,e,t){if(Array.isArray(n)){for(const a of n)kg(a,e,t);return}if(!Xo.isTag(n))return;const r=n,i=r.attributes,s=i&&typeof i[yg]=="string"?i[yg]:void 0;if(_C.test(r.name)&&e.length>0){const a=e[e.length-1],l=typeof i?.id=="string"?i.id:void 0;l&&!l.startsWith(`${a}--`)&&(t.add(l),r.attributes.id=`${a}--${l}`);return}const o=s!==void 0?[...e,s]:e;if(!(!r.children||r.children.length===0))for(const a of r.children)kg(a,o,t)}function xg(n,e){if(Array.isArray(n)){for(const i of n)xg(i,e);return}if(!Xo.isTag(n))return;const t=n;if(t.attributes?.["data-rune"]==="table-of-contents"){XZ(t,e);return}if(t.children)for(const i of t.children)xg(i,e)}function XZ(n,e){for(const t of n.children??[])Sg(t,e)}function Sg(n,e){if(Array.isArray(n)){for(const r of n)Sg(r,e);return}if(!Xo.isTag(n))return;const t=n;(t.name==="ul"||t.name==="ol")&&(t.children=(t.children??[]).filter(r=>{if(!Xo.isTag(r))return!0;const i=r;return i.name!=="li"?!0:!kC(i,e)}));for(const r of t.children??[])Sg(r,e)}function kC(n,e){for(const t of n.children??[]){if(!Xo.isTag(t))continue;const r=t;if(r.name==="a"){const i=r.attributes?.href;if(typeof i=="string"&&i.startsWith("#")&&e.has(i.slice(1)))return!0}if(kC(r,e))return!0}return!1}const{Tag:$c}=B,FZ=new Map;function VZ(n,e,t,r,i,s){return md(n,{pageUrl:e,registry:t,patterns:r,embedConfig:i,ctx:s,parseCache:FZ},[])}function md(n,e,t){if(Array.isArray(n)){let a=!1;const l=n.map(c=>{const u=md(c,e,t);return u!==c&&(a=!0),u});return a?l:n}if(!$c.isTag(n))return n;const r=n;if(r.attributes?.["data-rune"]===Tv)return WZ(r,e,t);if(!r.children||r.children.length===0)return r;let s=!1;const o=r.children.map(a=>{const l=md(a,e,t);return l!==a&&(s=!0),l});return s?new $c(r.name,r.attributes,o):r}function WZ(n,e,t){const r=n.attributes,i=String(r["data-expand-id"]??""),s=r["data-expand-type"],o=r["data-expand-level"],a=r["data-expand-canonical"]==="true",l=r["data-expand-label"];if(!i)return e.ctx.error(`expand placeholder is missing \`primary\`/id attribute on ${e.pageUrl}`,e.pageUrl),Es(i,"missing id attribute");const c=o!==void 0?Number(o):void 0,u=YZ(e.registry,i,e.pageUrl,s);if(!u)return e.ctx.error(`expand "${i}" on ${e.pageUrl} — entity not found`,e.pageUrl),Es(i,"entity not found");if(!u.embed&&!(u.sourceFile&&u.extract))return e.ctx.error(`expand "${i}" on ${e.pageUrl} — entity type "${u.type}" does not support embedding (no embed() or sourceFile/extract)`,e.pageUrl),Es(i,`entity type "${u.type}" does not support embedding`);if(t.some(_=>_.type===u.type&&_.id===u.id)){const _=[...t,{type:u.type,id:u.id}].map(C=>`${C.id} (${C.type})`).join(" → ");return e.ctx.error(`expand cycle detected on ${e.pageUrl}. Cycle: ${_}`,e.pageUrl),Es(i,"cycle detected")}let f;if(u.embed)f=u.embed();else{const _=e.embedConfig?.projectRoot;if(!_)return e.ctx.error(`expand "${i}" — no project root configured (embedConfig.projectRoot is unset)`,e.pageUrl),Es(i,"no project root configured");let C;try{C=HZ(u.sourceFile,_,e.parseCache)}catch(y){const w=(y instanceof Jn,y.message);return e.ctx.error(`expand "${i}" — failed to read source file "${u.sourceFile}": ${w}`,e.pageUrl),Es(i,w)}f=u.extract(C)}if(!f)return e.ctx.error(`expand "${i}" — extractor returned no content; the entity may be out-of-sync with the registry`,e.pageUrl),Es(i,"extractor returned no content");let d=f;if(c!==void 0&&c!==1){const _=c-1,C=[];d=xC(f,_,C),C.length>0&&e.ctx.warn(`expand "${i}" at ${e.pageUrl} — heading demotion (level=${c}) would push ${C.length} heading(s) past H6. Clamped to H6: ${C.map(y=>`"${y}"`).join(", ")}`,e.pageUrl)}if(!e.embedConfig)return e.ctx.error(`expand "${i}" — no embedConfig threaded through the pipeline`,e.pageUrl),Es(i,"no embed transform config");const h=[...t,{type:u.type,id:u.id}],m=B.transform(d,e.embedConfig),p=md(m,e,h),O=UZ(u,e.patterns),v={"data-rune":"expand","data-entity-id":u.id,"data-entity-type":u.type,"data-source":"registry"};c===void 0&&(v["data-outline-scope"]=u.id),O&&(v["data-canonical-href"]=O);const b=[];if(Array.isArray(p)?b.push(...p):b.push(p),a){const _=l||GZ(u),C={class:O?"rf-expand__canonical-link":"rf-expand__canonical-link rf-xref--unresolved"};O&&(C.href=O),b.push(new $c("a",C,[_]))}return new $c("section",v,b)}function YZ(n,e,t,r){const i=r?[r]:n.getTypes();for(const o of i){const a=n.getById(o,e,t);if(a)return a}const s=e.toLowerCase();for(const o of i)for(const a of n.getAll(o)){const l=a.data.name??"",c=a.data.title??"";if(l.toLowerCase()===s||c.toLowerCase()===s)return a}}function UZ(n,e){const t=n.sourceUrl,i=n.data.url||t;if(i){const s=n.data.headingId;return s?`${i}#${s}`:i}for(const s of e){const o=s.match.exec(n.id);if(!o)continue;const a=o.groups??{},l=/\{([a-zA-Z_$][a-zA-Z0-9_$]*)\}/g;return s.template.replace(l,(c,u)=>(u==="id"?n.id:a[u]??"").split("/").map(encodeURIComponent).join("/"))}}function GZ(n){const e=n.data.title,t=n.data.name;return e?`View ${n.type}: ${e}`:t?`View ${n.type}: ${t}`:`View ${n.type} ${n.id}`}function HZ(n,e,t){const r=t.get(n);if(r)return r;const i=yz({relativePath:n,projectRoot:e}),s=B.parse(i);return t.set(n,s),s}function xC(n,e,t){if(n.type==="heading"){const i=n.attributes.level+e;if(i>6){const s=KZ(n);t.push(s),n.attributes.level=6}else n.attributes.level=i}for(const r of n.children??[])xC(r,e,t);return n}function KZ(n){const e=[];for(const t of n.walk())t.type==="text"&&typeof t.attributes.content=="string"&&e.push(t.attributes.content);return e.join("")}function Es(n,e){return new $c("section",{"data-rune":"expand","data-entity-id":n,"data-expand-error":e},[`expand "${n}" — ${e}`])}const{Tag:Ie}=B,Xu={header:"preamble",eyebrow:"eyebrow",headline:"headline",blurb:"blurb",image:"image"},JZ={runes:{Accordion:{block:"accordion",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:Xu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},AccordionItem:{block:"accordion-item",parent:"Accordion",rootAttributes:{"data-state":"closed"},autoLabel:{name:"header"},editHints:{header:"inline",body:"none"}},Details:{block:"details",autoLabel:{summary:"summary"},editHints:{summary:"inline",body:"none"}},Grid:{block:"grid",defaultDensity:"full",childDensity:"compact",modifiers:{mode:{source:"meta",default:"columns"},collapse:{source:"meta",noBemClass:!0},aspect:{source:"meta",noBemClass:!0},stack:{source:"meta",noBemClass:!0},ratio:{source:"meta",noBemClass:!0},valign:{source:"meta",noBemClass:!0},gap:{source:"meta",noBemClass:!0},min:{source:"meta",noBemClass:!0}},styles:{ratio:{prop:"--grid-ratio",transform:Ej},valign:{prop:"--grid-valign",transform:Mj},gap:{prop:"--grid-gap",transform:p0},min:"--grid-min",aspect:"--grid-aspect"},editHints:{cell:"none"}},CodeGroup:{block:"codegroup",defaultDensity:"compact",modifiers:{title:{source:"meta",noBemClass:!0},overflow:{source:"meta",default:"scroll"}},metaFields:{title:{metaType:"code",condition:"title",renderWhenEmpty:!0}},blocks:{topbar:{fields:["title"],layout:"bar"}},layout:{root:["topbar"]},sections:{topbar:"header"},rootAttributes:{"data-code-host":"true"},editHints:{panel:"code"}},PageSection:{block:"page-section"},TableOfContents:{block:"toc"},Snippet:{block:"snippet"},Expand:{block:"expand"},Badge:{block:"badge"},Bar:{block:"bar"},Deflist:{block:"deflist"},Collection:{block:"collection"},Relationships:{block:"relationships"},FileRef:{block:"file-ref"},Aggregate:{block:"aggregate"},Progress:{block:"progress",modifiers:{sentiment:{source:"meta"}}},Card:{block:"card",rootAttributes:{"data-media-position":"top"},modifiers:{layout:{source:"meta",default:"stacked"}}},Embed:{block:"embed",defaultDensity:"compact",modifiers:{provider:{source:"meta",default:"generic",noBemClass:!0}},editHints:{fallback:"none"}},Breadcrumb:{block:"breadcrumb",defaultDensity:"minimal",editHints:{items:"none"},modifiers:{separator:{source:"meta",default:"/",noBemClass:!0}},styles:{separator:{prop:"--separator",template:'"{}"'}}},BreadcrumbItem:{block:"breadcrumb-item",parent:"Breadcrumb"},Blog:{block:"blog",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description",content:"body"},contentWrapper:{tag:"div",ref:"content"},modifiers:{layout:{source:"meta",default:"list"},sort:{source:"meta",default:"date-desc",noBemClass:!0},filter:{source:"meta",noBemClass:!0},limit:{source:"meta",noBemClass:!0},folder:{source:"meta",noBemClass:!0}},autoLabel:Xu,editHints:{headline:"inline",blurb:"inline"}},Budget:{block:"budget",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",footer:"footer"},editHints:{headline:"inline"},modifiers:{currency:{source:"meta",default:"USD"},duration:{source:"meta"},showPerDay:{source:"meta",default:"true"},variant:{source:"meta",default:"detailed"}},metaFields:{duration:{metaType:"category",condition:"duration"},currency:{metaType:"category",condition:"currency"}},blocks:{meta:{fields:["duration",{field:"currency",align:"end"}],layout:"bar"}},layout:{root:["meta","preamble"],preamble:{tag:"header",children:["headline","blurb","image"]}}},BudgetCategory:{block:"budget-category",parent:"Budget",modifiers:{estimate:{source:"meta",default:"false"},label:{source:"meta",noBemClass:!0},subtotal:{source:"meta",noBemClass:!0}},editHints:{label:"none",subtotal:"none"}},BudgetLineItem:{block:"budget-line-item",parent:"Budget"},Hint:{block:"hint",defaultDensity:"compact",modifiers:{hintType:{source:"meta",default:"note"}},contextModifiers:{hero:"in-hero",feature:"in-feature"},sections:{header:"header"},metaFields:{hintType:{icon:{group:"hint"}}},blocks:{header:{fields:["hintType"],layout:"bar"}},layout:{root:["header"]}},Drawer:{block:"drawer",defaultDensity:"compact",modifiers:{side:{source:"meta",default:"right"},size:{source:"meta",default:"md"},shortcut:{source:"meta",noBemClass:!0}},sections:{header:"header",body:"body",footer:"footer"},editHints:{title:"inline",body:"none",close:"none",footer:"none"}},Figure:{block:"figure",defaultDensity:"compact",modifiers:{size:{source:"meta",default:"default"},align:{source:"meta",default:"center"}},sections:{caption:"description"},editHints:{caption:"inline"}},Gallery:{block:"gallery",defaultDensity:"full",childDensity:"compact",modifiers:{layout:{source:"meta",default:"grid"},lightbox:{source:"meta",default:"true",noBemClass:!0},gap:{source:"meta",default:"default",noBemClass:!0},columns:{source:"meta",noBemClass:!0}},styles:{columns:"--gallery-columns",gap:{prop:"--gallery-gap",transform:p0}},editHints:{items:"none"}},Sidenote:{block:"sidenote",defaultDensity:"full",modifiers:{variant:{source:"meta",default:"sidenote"}},sections:{body:"body"},editHints:{body:"inline"}},Compare:{block:"compare",defaultDensity:"full",modifiers:{layout:{source:"meta",default:"side-by-side"}},editHints:{panels:"none"}},Conversation:{block:"conversation",defaultDensity:"compact",editHints:{messages:"none"}},ConversationMessage:{block:"conversation-message",parent:"Conversation",modifiers:{align:{source:"meta",default:"left"}},editHints:{body:"inline"}},Annotate:{block:"annotate",defaultDensity:"full",modifiers:{variant:{source:"meta",default:"margin"}},sections:{body:"body"},editHints:{body:"none",notes:"none"}},AnnotateNote:{block:"annotate-note",parent:"Annotate",editHints:{body:"inline"}},Nav:{block:"nav",defaultDensity:"compact",modifiers:{layout:{source:"attribute"}},postTransform(n){return{...n,name:"rf-nav"}}},NavGroup:{block:"nav-group",parent:"Nav"},Pagination:{block:"pagination",defaultDensity:"compact",modifiers:{scope:{source:"meta",default:"siblings",noBemClass:!0}}},NavItem:{block:"nav-item",parent:"Nav",postTransform(n){let e="";const t=n.children.filter(i=>kn(i)&&i.name==="span"&&i.attributes["data-field"]==="slug"?(e=i.children.filter(s=>typeof s=="string").join(""),!1):!0);if(e)return t.unshift(e),{...n,attributes:{...n.attributes,"data-slug":e},children:t};const r=t.map(i=>{if(kn(i)&&i.name==="a"){const s=i.attributes.class||"";return{...i,attributes:{...i.attributes,class:["rf-nav-item__link",s].filter(Boolean).join(" ")}}}return i});return{...n,children:r}}},Diff:{block:"diff",modifiers:{mode:{source:"meta",default:"unified"}},editHints:{line:"none","gutter-num":"none","gutter-prefix":"none","line-content":"none"}},Chart:{block:"chart",defaultDensity:"compact",modifiers:{type:{source:"meta",default:"bar",noBemClass:!0},stacked:{source:"meta",noBemClass:!0}},editHints:{data:"none"}},PullQuote:{block:"pullquote",defaultDensity:"compact",modifiers:{align:{source:"meta",default:"center"},variant:{source:"meta",default:"default"}},sections:{body:"body"},editHints:{body:"inline"}},TextBlock:{block:"textblock",defaultDensity:"full",modifiers:{dropcap:{source:"meta"},columns:{source:"meta"},lead:{source:"meta"},align:{source:"meta",default:"left"}},sections:{body:"body"},editHints:{body:"none"}},MediaText:{block:"mediatext",defaultDensity:"full",modifiers:{align:{source:"meta",default:"left"},ratio:{source:"meta",default:"1:1"},wrap:{source:"meta"}},sections:{body:"body",media:"media"},mediaSlots:{media:"cover"},editHints:{media:"image",body:"none"}},Showcase:{block:"showcase",defaultDensity:"compact",childDensity:"compact",sections:{viewport:"body"},modifiers:{shadow:{source:"meta",default:"none"},bleed:{source:"meta",default:"none"},aspect:{source:"meta",noBemClass:!0},offset:{source:"meta",noBemClass:!0},place:{source:"meta",noBemClass:!0}},contextModifiers:{"bento-cell":"in-bento-cell"},styles:{offset:{prop:"--showcase-offset",transform:Qj},aspect:"--showcase-aspect"},editHints:{viewport:"none"},postTransform(n,e){const t=e.modifiers.place;if(t){const{x:r,y:i}=qj(t),s=n.attributes.style||"",o=`--place-x: ${r}; --place-y: ${i}`;n.attributes.style=s?`${s}; ${o}`:o}return n}},TabGroup:{block:"tabs",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:Xu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},Tab:{block:"tab",parent:"TabGroup",rootAttributes:{"data-state":"inactive"},editHints:{name:"inline"}},TabPanel:{block:"tab-panel",parent:"TabGroup",rootAttributes:{"data-state":"inactive"}},DataTable:{block:"datatable",defaultDensity:"compact",sections:{table:"body"},modifiers:{searchable:{source:"meta",default:"false"},sortable:{source:"meta"},pageSize:{source:"meta",default:"0"},defaultSort:{source:"meta"}},editHints:{table:"none"}},Form:{block:"form",defaultDensity:"full",sections:{body:"body"},modifiers:{variant:{source:"meta",default:"stacked"},action:{source:"meta"},method:{source:"meta",default:"POST"},success:{source:"meta"},error:{source:"meta"},honeypot:{source:"meta",default:"true"}},editHints:{body:"none"}},FormField:{block:"form-field",parent:"Form",modifiers:{fieldType:{source:"meta"}}},Reveal:{block:"reveal",defaultDensity:"full",modifiers:{mode:{source:"meta",default:"click"}},sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:Xu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline",steps:"none"}},RevealStep:{block:"reveal-step",parent:"Reveal",rootAttributes:{"data-state":"closed"},editHints:{body:"none"}},Juxtapose:{block:"juxtapose",defaultDensity:"compact",modifiers:{variant:{source:"meta",default:"slider"},orientation:{source:"meta",default:"vertical",noBemClass:!0},position:{source:"meta",default:"50",noBemClass:!0},duration:{source:"meta",default:"1000",noBemClass:!0}},styles:{position:"--jx-position",duration:"--jx-duration"},editHints:{panels:"none"}},JuxtaposePanel:{block:"juxtapose-panel",parent:"Juxtapose",rootAttributes:{"data-state":"inactive"},editHints:{body:"none"}},Diagram:{block:"diagram",defaultDensity:"compact",editHints:{source:"code"},modifiers:{language:{source:"meta",default:"mermaid",noBemClass:!0}}},Tint:{block:"tint",parent:"*"},Bg:{block:"bg",parent:"*"},Region:{block:"region",parent:"Layout"},Sandbox:{block:"sandbox",defaultDensity:"compact",editHints:{source:"code"}}}},e7=JZ;function t7(n){const e=new Map;for(const r of n)e.set(r.url,{url:r.url,title:r.title,children:[]});const t={url:"/",title:"Root",children:[]};for(const r of n){const i=e.get(r.url);r.url==="/"?(t.title=r.title,t.children=i.children,e.set("/",t)):(e.get(r.parentUrl)??t).children.push(i)}return t}function n7(n){const e=new Map;for(const r of n)r.url!=="/"&&e.set(r.url,r.parentUrl);const t=new Map;for(const r of n){const i=[];let s=e.get(r.url);for(;s!==void 0;)i.unshift(s),s=e.get(s);t.set(r.url,i)}return t}function r7(n){if(n==="/"||!n.includes("/"))return"/";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t<=0?"/":e.slice(0,t+1)}function Ag(n,e,t,r,i){if(!Ie.isTag(n)){if(Array.isArray(n)){const a=n.map(l=>Ag(l,e,t,r,i));return a.every((l,c)=>l===n[c])?n:a}return n}const s=n;if(s.attributes?.["data-rune"]==="breadcrumb"&&s.children?.some(l=>Ie.isTag(l)&&l.attributes?.["data-field"]===JA))return i7(s,e,t,r,i);const o=(s.children??[]).map(a=>Ag(a,e,t,r,i));return o.every((a,l)=>a===s.children[l])?s:{...s,children:o}}function i7(n,e,t,r,i){const s=t.get(e);if(s===void 0)return i.warn(`Breadcrumb auto: page URL "${e}" not found in page registry`,e),n;const a=n.children?.find(m=>Ie.isTag(m)&&m.name==="meta"&&!m.attributes?.["data-field"])?.attributes?.content??"/",l=[];for(const m of s){const p=r.get(m);if(!p)continue;const O=new Ie("span",{hidden:!0},[p.title]),v=new Ie("a",{href:m},[p.title]);l.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:O,url:v},children:[O,v]}))}const u=r.get(e)?.title??e,f=new Ie("span",{},[u]);l.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:f},children:[f]}));const d=new Ie("meta",{content:a}),h=new Ie("ol",{},l);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:d},refs:{items:h},children:[d,h]})}function Cg(n,e,t,r){if(!Ie.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>Cg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="nav"&&i.children?.some(a=>Ie.isTag(a)&&a.attributes?.["data-field"]===HA))return s7(e,t,r,i);const s=(i.children??[]).map(o=>Cg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function s7(n,e,t,r){const i=Array.from(e.values()).filter(c=>c.parentUrl===n&&c.url!==n);i.length===0&&t.warn(`Nav auto: page '${n}' has no registered child pages`,n);const s=i.map(c=>{const u=new Ie("span",{"data-field":"slug"},[c.title]),f=new Ie("a",{href:c.url},[u]);return qe({rune:"nav-item",tag:"li",properties:{slug:u},children:[f]})}),o=new Ie("ul",{},s),a=qe({rune:"nav",tag:"nav",properties:{group:[],item:s},children:[o]}),l=["layout","data-layout","data-auto","data-source-path","data-collapsible","data-default-open"];for(const c of l){const u=r?.attributes?.[c];u!==void 0&&(a.attributes[c]=u)}return a}function tc(n){let e=n.trim();return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.endsWith("/index")&&(e=e.slice(0,-6)||"/"),e.toLowerCase()}function o7(n){const e=n.split("/").filter(Boolean);return e.pop(),e.length===0?"/":"/"+e.join("/")+"/"}function a7(n,e){if(n===e)return 0;if(n.length===0)return e.length;if(e.length===0)return n.length;const t=new Array(e.length+1),r=new Array(e.length+1);for(let i=0;i<=e.length;i++)t[i]=i;for(let i=1;i<=n.length;i++){r[0]=i;for(let s=1;s<=e.length;s++){const o=n[i-1]===e[s-1]?0:1;r[s]=Math.min(r[s-1]+1,t[s]+1,t[s-1]+o)}for(let s=0;s<=e.length;s++)t[s]=r[s]}return t[e.length]}function l7(n,e,t){const r=e.endsWith("/")?e:e+"/",i=n.toLowerCase(),s=[],o=[],a=(r+n).replace(/\/+/g,"/").toLowerCase();for(const c of t.values()){const u=c.url,f=u.toLowerCase(),h=(u.split("/").filter(Boolean).pop()??"").toLowerCase();if(h===i&&f!==a){s.push(u);continue}if(f.startsWith(r.toLowerCase())){const m=a7(i,h);m>0&&m<=2&&o.push({url:u,distance:m})}}return s.sort(),o.sort((c,u)=>c.distance-u.distance||c.url.localeCompare(u.url)),[...s,...o.map(c=>c.url)].slice(0,3)}function c7(n,e,t){if(n.startsWith("/"))return{ok:!0,url:n};const r=e.endsWith("/")?e:e+"/",i=(r+n).replace(/\/+/g,"/"),s=tc(i);for(const a of t.values())if(tc(a.url)===s)return{ok:!0,url:a.url};const o=l7(n.includes("/")?n.split("/").pop():n,r,t);return{ok:!1,reason:"not-found",attemptedUrl:i,suggestions:o}}function I0(n,e){let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t++;return t}function Qc(n,e,t){const r=Array.from(e.values()).filter(i=>i.url.endsWith("/"+n)||i.url==="/"+n);return r.length===0?null:r.length===1?r[0].url:r.slice().sort((i,s)=>I0(s.url,t)-I0(i.url,t))[0].url}function Lc(n){const e=n.attributes?.["data-slug"];if(e)return String(e);const t=r=>{if(!Ie.isTag(r)){if(Array.isArray(r))for(const s of r){const o=t(s);if(o)return o}return null}const i=r;if(i.name==="span"&&i.attributes?.["data-field"]==="slug"){const s=[];for(const o of i.children??[])typeof o=="string"&&s.push(o);return s.join("").trim()||null}for(const s of i.children??[]){const o=t(s);if(o)return o}return null};return t(n)}function u7(n,e,t){const r=[],i=s=>{if(!Ie.isTag(s)){Array.isArray(s)&&s.forEach(i);return}const o=s;if(o.attributes?.["data-rune"]==="nav-item"){const a=Mc(o);if(a)r.push(a);else{const l=Lc(o);if(l){const c=Qc(l,e,t);c&&r.push(c)}}}(o.children??[]).forEach(i)};return(n.children??[]).forEach(i),r}function f7(n){const e=t=>{if(typeof t=="string")return t;if(!Ie.isTag(t)){if(Array.isArray(t))for(const i of t){const s=e(i);if(s)return s}return null}const r=t;if(r.attributes?.["data-field"]==="title"){const i=[];for(const s of r.children??[])typeof s=="string"&&i.push(s);if(i.length>0)return i.join("").trim()}for(const i of r.children??[]){const s=e(i);if(s)return s}return null};return e(n)??""}function d7(n,e){for(const t of e){if(!t)continue;if(n===t)return!0;const r=t.endsWith("/")?t:t+"/";if(n.startsWith(r))return!0}return!1}function mf(n,e,t){if(!Ie.isTag(n)){if(Array.isArray(n)){const s=n.map(o=>mf(o,e,t));return s.every((o,a)=>o===n[a])?n:s}return n}const r=n;if(r.attributes?.["data-rune"]==="nav"&&r.attributes?.["data-collapsible"]==="true"){const s=String(r.attributes?.["data-default-open"]??""),o=s?s.split(",").map(u=>u.trim()).filter(Boolean):[],a=[],l=u=>{if(!Ie.isTag(u))return;const f=u;f.attributes?.["data-rune"]==="nav-group"&&a.push(f),(f.children??[]).forEach(l)};(r.children??[]).forEach(l);for(const u of a){if(u.attributes?.["data-collapsed"]!==KA)continue;const f=f7(u),d=f&&o.includes(f),h=u7(u,t,e),m=d7(e,h);u.attributes["data-collapsed"]=d||m?"false":"true"}const c=(r.children??[]).map(u=>mf(u,e,t));return c.every((u,f)=>u===r.children[f])?r:{...r,children:c}}const i=(r.children??[]).map(s=>mf(s,e,t));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function N0(n,e,t){const r=e?.title??t??"",i=e?.description,s=e?.icon,o=e?.url??t??"",a=[];s&&a.push(new Ie("rf-icon",{name:s,"data-name":"icon",class:"rf-nav-item__icon"},[])),a.push(new Ie("span",{"data-name":"title",class:"rf-nav-item__title"},[r])),i&&a.push(new Ie("span",{"data-name":"description",class:"rf-nav-item__description"},[i]));const l=o?new Ie("a",{href:o,class:"rf-nav-item__link"},a):new Ie("span",{class:"rf-nav-item__link"},a);return{...n,children:[l]}}function Mc(n){const e=t=>{if(!Ie.isTag(t)){if(Array.isArray(t))for(const i of t){const s=e(i);if(s)return s}return null}const r=t;if(r.name==="a"&&r.attributes?.href)return String(r.attributes.href);for(const i of r.children??[]){const s=e(i);if(s)return s}return null};return e(n)}function h7(n,e,t){const r=Mc(n);if(r){const s=/^[a-z]+:\/\//i.test(r);return{url:r,isExternal:s}}const i=Lc(n);if(i){const s=Qc(i,e,t);return s?{url:s,isExternal:!1}:null}return null}function p7(n,e){const t=(n.children??[]).map(r=>{if(!Ie.isTag(r))return r;const i=r;if(i.name!=="a")return r;const s=(i.children??[]).some(l=>Ie.isTag(l)&&l.attributes?.["data-name"]==="icon"),o=(i.children??[]).some(l=>Ie.isTag(l)&&l.attributes?.["data-name"]==="description"),a=[...i.children??[]];return e.icon&&!s&&a.unshift(new Ie("rf-icon",{name:e.icon,"data-name":"icon",class:"rf-nav-item__icon"},[])),e.description&&!o&&a.push(new Ie("span",{"data-name":"description",class:"rf-nav-item__description"},[e.description])),{...i,children:a}});return{...n,children:t}}function Tg(n,e,t){if(!Ie.isTag(n)){if(Array.isArray(n)){const s=n.map(o=>Tg(o,e,t));return s.every((o,a)=>o===n[a])?n:s}return n}const r=n;if(r.attributes?.["data-rune"]==="nav"){const o=(r.attributes?.["data-layout"]??r.attributes?.layout)==="cards",a=r.attributes?.["data-auto"]==="true";if(o||a){const l=u=>{if(!Ie.isTag(u))return Array.isArray(u)?u.map(l):u;const f=u;if(f.attributes?.["data-rune"]==="nav-item"){const h=h7(f,t,e);if(!h)return f;if(o){if(h.isExternal)return N0(f,null,h.url);const O=t.get(h.url),v=O?{url:O.url,title:O.title,description:O.description,icon:O.icon}:null;return N0(f,v,h.url)}if(h.isExternal)return f;const m=t.get(h.url);if(!m)return f;const p={url:m.url,title:m.title,description:m.description,icon:m.icon};return p7(f,p)}const d=(f.children??[]).map(l);return d.every((h,m)=>h===f.children[m])?f:{...f,children:d}},c=(r.children??[]).map(l);return{...r,children:c}}}const i=(r.children??[]).map(s=>Tg(s,e,t));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function m7(n){return/^[a-z]+:\/\//i.test(n)||n.startsWith("mailto:")||n.startsWith("//")}function g7(n,e,t,r){const i=e?` in ${e}`:"",s=`Nav item \`${n}\`${i} cannot be resolved (no page at \`${t}\`).`;if(r.length===0)return s;const o=["","Did you mean one of:",...r.map(a=>` - ${a}`),"","Use a multi-segment slug (e.g. `section/page`) or an explicit `[Label](/path)` link."];return s+`
336
+ `+o.join(`
337
+ `)}function O7(n,e,t,r){const i=n.attributes?.["data-source-path"],s=o7(i??""),o=a=>{if(!Ie.isTag(a)){if(Array.isArray(a)){const u=a.map(o);return u.every((f,d)=>f===a[d])?a:u}return a}const l=a;if(l.attributes?.["data-rune"]==="nav-item"){if(Mc(l))return l;const f=Lc(l);if(!f)return l;const d=c7(f,s,e);if(!d.ok)return t.error(g7(f,i,d.attemptedUrl,d.suggestions),r),l;const m=e.get(d.url)?.title??f,p=new Ie("a",{href:d.url},[m]),O=(l.children??[]).filter(v=>{if(typeof v=="string")return!1;if(Ie.isTag(v)){const b=v;if(b.name==="span"&&b.attributes?.["data-field"]==="slug")return!1}return!0});return{...l,children:[p,...O]}}const c=(l.children??[]).map(o);return c.every((u,f)=>u===l.children[f])?l:{...l,children:c}};return o(n)}function Pg(n,e,t,r){if(!Ie.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>Pg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="nav")return O7(i,e,t,r);const s=(i.children??[]).map(o=>Pg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function v7(n,e){const t=tc(e),r=s=>{const o=[],a=f=>{if(!Ie.isTag(f)){Array.isArray(f)&&f.forEach(a);return}const d=f;if(d.name==="a"&&typeof d.attributes?.href=="string"){const h=String(d.attributes.href);m7(h)||o.push({tag:d,href:h})}(d.children??[]).forEach(a)};(s.children??[]).forEach(a);let l=null;for(const{tag:f,href:d}of o)if(tc(d)===t){l=f;break}let c=null,u=0;for(const{tag:f,href:d}of o){if(f===l)continue;const h=tc(d);if(h==="/"&&t==="/")continue;h!==t&&(t.startsWith(h+"/")||h==="/"&&t.startsWith("/"))&&h.length>u&&(c=f,u=h.length)}return l&&(l.attributes["aria-current"]="page"),c&&(c.attributes["data-active"]="ancestor"),s},i=s=>{if(!Ie.isTag(s))return Array.isArray(s)&&s.forEach(i),s;const o=s;return o.attributes?.["data-rune"]==="nav"?(r(o),o):((o.children??[]).forEach(i),o)};return i(n),n}function b7(n,e,t){const r=[],i=s=>{if(!Ie.isTag(s)){Array.isArray(s)&&s.forEach(i);return}const o=s;if(o.attributes?.["data-rune"]==="nav"){const a=o.attributes?.layout??o.attributes?.["data-layout"];if(a&&a!=="vertical"){(o.children??[]).forEach(i);return}const l=[],c=u=>{if(!Ie.isTag(u)){Array.isArray(u)&&u.forEach(c);return}const f=u;f.attributes?.["data-rune"]==="nav-group"&&l.push(f),(f.children??[]).forEach(c)};if((o.children??[]).forEach(c),l.length===0){const u=[],f=d=>{if(!Ie.isTag(d)){Array.isArray(d)&&d.forEach(f);return}const h=d;if(h.attributes?.["data-rune"]==="nav-item"){const m=Mc(h);if(m)/^[a-z]+:\/\//i.test(m)||u.push(m);else{const p=Lc(h);if(p){const O=Qc(p,e,t);O&&u.push(O)}}}(h.children??[]).forEach(f)};(o.children??[]).forEach(f),u.length>0&&r.push(u)}else for(const u of l){const f=[],d=h=>{if(!Ie.isTag(h)){Array.isArray(h)&&h.forEach(d);return}const m=h;if(m.attributes?.["data-rune"]==="nav-item"){const p=Mc(m);if(p)/^[a-z]+:\/\//i.test(p)||f.push(p);else{const O=Lc(m);if(O){const v=Qc(O,e,t);v&&f.push(v)}}}(m.children??[]).forEach(d)};(u.children??[]).forEach(d),f.length>0&&r.push(f)}}(o.children??[]).forEach(i)};return i(n),r}function y7(n,e,t){const r=e.get(n);if(!r)return[];const i=Array.from(e.values());let s;if(t==="section"){let o=n,a=r;for(;a&&a.parentUrl&&a.parentUrl!=="/";){const c=e.get(a.parentUrl);if(!c)break;o=c.url,a=c}const l=o.endsWith("/")?o:o+"/";s=i.filter(c=>c.url===o||c.url.startsWith(l))}else s=i.filter(o=>o.parentUrl===r.parentUrl);return s.sort((o,a)=>{const l=o.order??Number.POSITIVE_INFINITY,c=a.order??Number.POSITIVE_INFINITY;return l!==c?l-c:o.url.localeCompare(a.url)}),s.map(o=>({url:o.url,title:o.title}))}function w7(n,e,t){const r=n.indexOf(e);if(r===-1)return{prev:null,next:null};const i=r>0?n[r-1]:null,s=r<n.length-1?n[r+1]:null,o=a=>{if(!a)return null;const l=t.get(a);return l?{url:l.url,title:l.title}:{url:a,title:a}};return{prev:o(i),next:o(s)}}function B0(n,e,t){const r=e==="prev"?"←":"→",i=t??n.title,s=e==="prev"?[new Ie("span",{"data-name":"marker"},[r]),new Ie("span",{"data-name":"label"},[i])]:[new Ie("span",{"data-name":"label"},[i]),new Ie("span",{"data-name":"marker"},[r])];return new Ie("a",{href:n.url,"data-direction":e,"data-name":e},s)}function Eg(n,e,t,r){if(!Ie.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>Eg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="pagination"){if((i.children??[]).some(l=>Ie.isTag(l)&&l.attributes?.["data-field"]===og)){const l=(i.children??[]).find(S=>Ie.isTag(S)&&S.attributes?.["data-field"]==="scope"),u=String(l?l.attributes?.content??"":i.attributes?.["data-scope"]??"")==="section"?"section":"siblings",f=(i.children??[]).find(S=>Ie.isTag(S)&&S.attributes?.["data-field"]==="prev-label"),d=(i.children??[]).find(S=>Ie.isTag(S)&&S.attributes?.["data-field"]==="next-label"),h=f?String(f.attributes.content??""):void 0,m=d?String(d.attributes.content??""):void 0;if(Array.from(t.values()).some(S=>S.parentUrl===e&&S.url!==e))return{...i,children:[]};let O=null;const v=b7(r,t,e);for(const S of v)if(S.includes(e)){O=S;break}let b=null,_=null;if(O)({prev:b,next:_}=w7(O,e,t));else{const S=y7(e,t,u),A=S.findIndex(x=>x.url===e);A!==-1&&(b=A>0?S[A-1]:null,_=A<S.length-1?S[A+1]:null)}const C=[];b&&C.push(B0(b,"prev",h)),_&&C.push(B0(_,"next",m));const y=new Set([og,"prev-label","next-label","scope"]),w=(i.children??[]).filter(S=>{if(!Ie.isTag(S)||S.name!=="meta")return!0;const A=S.attributes?.["data-field"];return!y.has(A)});return{...i,children:[...w,...C]}}const a=(i.children??[]).map(l=>{if(!Ie.isTag(l))return l;if(l.name==="a"&&typeof l.attributes?.href=="string"&&l.attributes.href.startsWith("__slug:")){const c=l.attributes.href.slice(7),u=Qc(c,t,e);if(u){const d=t.get(u)?.title??c,h=(l.children??[]).map(m=>Ie.isTag(m)&&m.attributes?.["data-name"]==="label"&&(m.children??[]).filter(O=>typeof O=="string").join("")===c?{...m,children:[d]}:m);return{...l,attributes:{...l.attributes,href:u},children:h}}}return l});return{...i,children:a}}const s=(i.children??[]).map(o=>Eg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function $g(n,e){if(Ie.isTag(n)){const t=e(n);if(t!==n)return t;const r=n.children.map(s=>$g(s,e));return r.some((s,o)=>s!==n.children[o])?new Ie(n.name,n.attributes,r):n}return Array.isArray(n)?n.map(t=>$g(t,e)):n}function _7(n){let e=n.trim();return e.startsWith("/")||(e="/"+e),e.endsWith("/")||(e+="/"),e}function k7(n,e){return n.startsWith(e)?n.slice(e.length).replace(/\/$/,"").split("/").filter(Boolean).length===1:!1}function x7(n){return!n||!n.trim()?[]:n.split(",").map(e=>{const t=e.indexOf(":");return t===-1?{field:e.trim(),value:""}:{field:e.slice(0,t).trim(),value:e.slice(t+1).trim()}})}function S7(n,e){for(const{field:t,value:r}of e){const i=n.frontmatter[t];if(r===""){if(i==null)return!1}else if(Array.isArray(i)){if(!i.some(s=>String(s).toLowerCase()===r.toLowerCase()))return!1}else if(String(i??"").toLowerCase()!==r.toLowerCase())return!1}return!0}function A7(n,e){const t=[...n];switch(e){case"date-asc":t.sort((r,i)=>(r.date||"").localeCompare(i.date||""));break;case"title-asc":t.sort((r,i)=>r.title.localeCompare(i.title));break;case"title-desc":t.sort((r,i)=>i.title.localeCompare(r.title));break;default:t.sort((r,i)=>(i.date||"").localeCompare(r.date||""));break}return t}function C7(n){const t=[new Ie("h3",{},[new Ie("a",{href:n.url},[n.title])])];return n.date&&t.push(new Ie("time",{datetime:n.date},[n.date])),n.description&&t.push(new Ie("p",{},[n.description])),new Ie("article",{"data-name":"post"},t)}function T7(n,e,t,r){let i=!1;const s=$g(n,o=>{if(o.attributes["data-rune"]!=="blog")return o;const a=So(o,"folder")??"",l=So(o,"sort")||"date-desc",c=So(o,"filter")??"",u=So(o,"limit")??"",f=u?parseInt(u,10):void 0;if(!a)return t.warn("Blog rune missing folder attribute",r),o;const d=_7(a),h=x7(c);let m=e.filter(_=>!(_.draft||!k7(_.url,d)||h.length>0&&!S7(_,h)));m=A7(m,l),f&&f>0&&(m=m.slice(0,f));const p=o.children.find(_=>Ie.isTag(_)&&_.attributes["data-name"]==="posts");if(!Ie.isTag(p))return o;const O=m.map(C7);i=!0;const v=new Ie(p.name,p.attributes,O),b=o.children.map(_=>_===p?v:_);return new Ie(o.name,o.attributes,b)});return i?s:n}function P7(n={}){const e=n.xrefPatterns??[],t=n.embedConfig,r=n.repoUrl,i=n.repoBranch;return{preprocess:IZ,register(s,o,a){for(const l of s){const c=r7(l.url),u=o.getById("page",l.url);u&&u.sourceUrl!==l.url&&a.warn(`Page '${l.url}' already registered from '${u.sourceUrl}'`,l.url),o.register({type:"page",id:l.url,sourceUrl:l.url,data:{title:l.title,url:l.url,parentUrl:c,draft:l.frontmatter.draft??!1,description:l.frontmatter.description,date:l.frontmatter.date,order:l.frontmatter.order,icon:l.frontmatter.icon}});for(const f of l.headings){const d=`${l.url}#${f.id}`,h=o.getById("heading",d);h&&h.sourceUrl!==l.url&&a.warn(`Heading '${d}' already registered from '${h.sourceUrl}'`,l.url),o.register({type:"heading",id:d,sourceUrl:l.url,data:{level:f.level,text:f.text,headingId:f.id,url:l.url}})}}uz(s,o,a)},aggregate(s,o){const a=s.getAll("page"),l=a.map(m=>({url:m.data.url,title:m.data.title,parentUrl:m.data.parentUrl,description:m.data.description,icon:m.data.icon,order:m.data.order})),c=t7(l),u=n7(l),f=new Map(l.map(m=>[m.url,m])),d=new Map;for(const m of s.getAll("heading"))d.set(m.id,m.data);const h=a.map(m=>({title:m.data.title||"",url:m.data.url||m.id,date:m.data.date||"",description:m.data.description||"",draft:m.data.draft||!1,frontmatter:m.data}));return{pageTree:c,breadcrumbPaths:u,pagesByUrl:f,headingIndex:d,allPosts:h,registry:s,xrefPatterns:e,embedConfig:t,repoUrl:r,repoBranch:i}},postProcess(s,o,a){const l=o.__core__;if(!l)return s;let c=Ag(s.renderable,s.url,l.breadcrumbPaths,l.pagesByUrl,a);c=Cg(c,s.url,l.pagesByUrl,a),c=Pg(c,l.pagesByUrl,a,s.url),c=mf(c,s.url,l.pagesByUrl),c=Tg(c,s.url,l.pagesByUrl),c=Eg(c,s.url,l.pagesByUrl,c),c=v7(c,s.url),c=T7(c,l.allPosts,a,s.url),c=dz(c),c=xz(c,s.url,l.repoUrl,l.repoBranch,a),c=Tz(c,s.url,l.registry,a),c=pz(c,s.url,l.registry,l.embedConfig?.projectRoot,a),c=VZ(c,s.url,l.registry,l.xrefPatterns??[],l.embedConfig,a),c=hZ(c,s.url,l.registry,l.embedConfig,a),c=bZ(c,s.url,l.registry,l.embedConfig,a),c=xZ(c,s.url,l.registry,l.embedConfig,a),c=qZ(c,s.url,l.registry,l.xrefPatterns??[],a);const u=BZ(c===s.renderable?s:{...s,renderable:c});zZ(u.renderable);const f=ZZ(u.renderable);return f.length>0||u.headings.length>0?{...u,headings:f}:u}}}P7();const E7={nav:Ve({name:"nav",schema:U6,description:"Navigation structure with page slug references and optional grouping",typeName:"Nav",category:"Site",snippet:["{% nav %}","## ${1:Section}","","- ${2:page-slug}","- ${3:another-page}","{% /nav %}"]}),region:Ve({name:"region",schema:K6,description:"Named content block within a layout definition",snippet:['{% region name="${1:header}" %}',"$0","{% /region %}"]}),layout:Ve({name:"layout",schema:e8,description:"Layout definition containing named regions",category:"Site",snippet:["{% layout %}",'{% region name="${1:header}" %}',"$0","{% /region %}","{% /layout %}"]}),codegroup:Ve({name:"codegroup",schema:$6,description:"Tabbed code block with language tabs",typeName:"CodeGroup",category:"Code & Data",snippet:["{% codegroup %}","```${1:js}","$0","```","","```${2:ts}","","```","{% /codegroup %}"]}),error:Ve({name:"error",schema:O6,description:"Error reporting table",typeName:"Error",category:"Semantic"}),grid:Ve({name:"grid",aliases:["columns"],schema:S6,description:"Grid layout container with configurable columns and rows",typeName:"Grid",category:"Layout",snippet:["{% grid columns=${1:2} %}","${2:First column content}","","---","","${3:Second column content}","{% /grid %}"]}),hint:Ve({name:"hint",aliases:["callout","alert"],schema:D6,description:"Callout/admonition block with type variants (note, warning, caution, check)",typeName:"Hint",category:"Content",snippet:['{% hint type="${1|note,warning,caution,check|}" %}',"$0","{% /hint %}"]}),tab:Ve({name:"tab",schema:j6,description:"Individual tab within a tab group",typeName:"Tab"}),tabs:Ve({name:"tabs",schema:Z6,description:"Tabbed interface with tab panels",typeName:"TabGroup",category:"Layout",snippet:["{% tabs %}","## ${1:Tab One}","","${2:Content for tab one.}","","## ${3:Tab Two}","","${4:Content for tab two.}","{% /tabs %}"]}),details:Ve({name:"details",schema:n8,description:"Collapsible disclosure block for supplementary content",typeName:"Details",category:"Content",snippet:['{% details summary="${1:Click to expand}" %}',"$0","{% /details %}"]}),drawer:Ve({name:"drawer",schema:o8,description:"Modal side panel addressed by id. Triggered by xrefs anywhere on the page; falls back to in-flow rendering without JS.",typeName:"Drawer",category:"Layout",snippet:['{% drawer id="${1:auth-explainer}" title="${2:Auth system}" %}',"$0","{% /drawer %}"]}),figure:Ve({name:"figure",schema:c8,description:"Enhanced image with caption, attribution, and sizing",seoType:"ImageObject",typeName:"Figure",schemaOrgType:"ImageObject",category:"Content",snippet:['{% figure size="${1|medium,small,large,full|}" %}',"![${2:Alt text}](${3:/path/to/image.png})","","${4:Caption text}","{% /figure %}"]}),gallery:Ve({name:"gallery",schema:d8,description:"Multi-image container with grid, carousel, or masonry layout and optional lightbox",seoType:"ImageGallery",typeName:"Gallery",schemaOrgType:"ImageGallery",category:"Content",snippet:['{% gallery layout="${1|grid,carousel,masonry|}" %}',"![${2:Alt text}](${3:/path/to/image1.png})","","![${4:Alt text}](${5:/path/to/image2.png})","{% /gallery %}"]}),accordion:Ve({name:"accordion",aliases:["faq"],schema:p8,description:"Collapsible accordion sections where headings become toggleable headers",seoType:"FAQPage",typeName:"Accordion",schemaOrgType:"FAQPage",category:"Layout",snippet:["{% accordion %}","## ${1:First Question}","","${2:Answer to the first question.}","","## ${3:Second Question}","","${4:Answer to the second question.}","{% /accordion %}"]}),"accordion-item":Ve({name:"accordion-item",schema:h8,description:"Individual accordion section",typeName:"AccordionItem",schemaOrgType:"Question"}),toc:Ve({name:"toc",aliases:["table-of-contents"],schema:m8,description:"Auto-generated table of contents from document headings",typeName:"TableOfContents",category:"Site",snippet:["{% toc /%}"]}),embed:Ve({name:"embed",schema:v8,description:"Embedded content from external services (YouTube, Twitter, CodePen, Spotify)",seoType:"VideoObject",typeName:"Embed",schemaOrgType:"VideoObject",category:"Content",snippet:['{% embed url="${1:https://}" /%}']}),breadcrumb:Ve({name:"breadcrumb",schema:b8,description:"Navigation breadcrumb trail showing page hierarchy",seoType:"BreadcrumbList",typeName:"Breadcrumb",schemaOrgType:"BreadcrumbList",category:"Site",snippet:["{% breadcrumb /%}"]}),pagination:Ve({name:"pagination",schema:y8,description:"Sequential prev/next links for ordered docs and tutorials",typeName:"Pagination",category:"Site",snippet:["{% pagination auto /%}"]}),budget:Ve({name:"budget",schema:M8,description:"Structured cost breakdown with categories, line items, and auto-calculated totals",seoType:"ItemList",typeName:"Budget",schemaOrgType:"ItemList",category:"Semantic",snippet:["{% budget %}","## ${1:Category}","","- ${2:Item description}: \\$${3:100}","- ${4:Another item}: \\$${5:200}","{% /budget %}"]}),"budget-category":Ve({name:"budget-category",schema:$8,description:"Cost category within a budget containing line items",typeName:"BudgetCategory"}),"budget-line-item":Ve({name:"budget-line-item",schema:T8,description:"Individual budget line item with description and amount",typeName:"BudgetLineItem"}),compare:Ve({name:"compare",schema:q8,description:"Side-by-side code comparison with labeled panels",typeName:"Compare",category:"Code & Data",snippet:["{% compare %}","```${1:js}","${2:// Before}","```","","```${3:js}","${4:// After}","```","{% /compare %}"]}),datatable:Ve({name:"datatable",aliases:["data-table"],schema:R8,description:"Interactive data table with sorting, filtering, and pagination from a Markdown table",seoType:"Dataset",typeName:"DataTable",schemaOrgType:"Dataset",category:"Code & Data",snippet:["{% datatable %}","| ${1:Column A} | ${2:Column B} | ${3:Column C} |","|---|---|---|","| ${4:Data} | ${5:Data} | ${6:Data} |","{% /datatable %}"]}),diff:Ve({name:"diff",schema:F8,description:"Side-by-side or unified diff view between two code blocks",typeName:"Diff",category:"Code & Data",snippet:["{% diff %}","```${1:js}","${2:// Before}","```","","```${3:js}","${4:// After}","```","{% /diff %}"]}),snippet:Ve({name:"snippet",schema:Q6,description:"Embed a project file as a syntax-highlighted code block. Composes inside codegroup, diff, and any future fence-consuming rune via pre-resolve (SPEC-062).",typeName:"Snippet",category:"Code & Data",snippet:['{% snippet path="${1:src/lib/foo.ts}" /%}']}),chart:Ve({name:"chart",schema:Y8,description:"Chart visualization from a Markdown table. First column becomes axis labels, header row becomes series names.",typeName:"Chart",category:"Code & Data",snippet:['{% chart type="${1|bar,line,pie,area|}" %}',"| ${2:Label} | ${3:Series A} | ${4:Series B} |","|---|---|---|","| ${5:Item 1} | ${6:10} | ${7:20} |","| ${8:Item 2} | ${9:30} | ${10:15} |","{% /chart %}"]}),diagram:Ve({name:"diagram",schema:G8,description:"Diagram rendering from Mermaid, PlantUML, or ASCII art code blocks",typeName:"Diagram",category:"Code & Data",snippet:['{% diagram language="${1|mermaid,plantuml,ascii|}" %}',"```${1:mermaid}","$0","```","{% /diagram %}"]}),sidenote:Ve({name:"sidenote",aliases:["footnote","marginnote"],schema:J8,description:"Margin note or footnote displayed alongside the main content",typeName:"Sidenote",category:"Content",snippet:["{% sidenote %}","$0","{% /sidenote %}"]}),conversation:Ve({name:"conversation",aliases:["dialogue","chat"],schema:n9,description:"Chat/dialogue display where blockquotes become alternating speaker messages",typeName:"Conversation",category:"Semantic",snippet:["{% conversation %}","> **${1:Alice}**: ${2:Hello!}","","> **${3:Bob}**: ${4:Hi there!}","{% /conversation %}"]}),"conversation-message":Ve({name:"conversation-message",schema:e9,description:"Individual message within a conversation",typeName:"ConversationMessage"}),reveal:Ve({name:"reveal",schema:s9,description:"Progressive disclosure where headings become reveal steps shown one at a time",typeName:"Reveal",category:"Layout",snippet:["{% reveal %}","## ${1:Step One}","","${2:Content revealed first.}","","## ${3:Step Two}","","${4:Content revealed next.}","{% /reveal %}"]}),"reveal-step":Ve({name:"reveal-step",schema:i9,description:"Individual step within a reveal sequence",typeName:"RevealStep"}),juxtapose:Ve({name:"juxtapose",schema:l9,description:"Side-by-side comparison with interactive reveal (slider, toggle, fade, or auto)",typeName:"Juxtapose",category:"Layout"}),annotate:Ve({name:"annotate",schema:d9,description:"Content with margin annotations. Nested note tags appear as margin notes alongside the main text.",typeName:"Annotate",category:"Layout",snippet:["{% annotate %}","${1:Main content here.}","","{% note %}","${2:Margin note content.}","{% /note %}","","${3:More main content.}","{% /annotate %}"]}),note:Ve({name:"note",schema:u9,description:"Annotation note within an annotate block",typeName:"AnnotateNote"}),form:Ve({name:"form",aliases:["contact-form"],schema:_9,description:"Accessible HTML form from Markdown. Lists become input fields with smart type inference, blockquotes followed by lists become select/radio/checkbox groups.",typeName:"Form",category:"Content",snippet:['{% form action="${1:/api/contact}" %}',"- Name","- Email","- Message","","**${2:Submit}**","{% /form %}"]}),"form-field":Ve({name:"form-field",schema:y9,description:"Individual form field with inferred type",typeName:"FormField"}),sandbox:Ve({name:"sandbox",schema:T9,description:"Isolated HTML/CSS/JS rendering in an iframe with optional framework loading",typeName:"Sandbox",category:"Code & Data",snippet:['{% sandbox framework="${1|,tailwind,bootstrap,bulma,pico|}" %}',"$0","{% /sandbox %}"]}),pullquote:Ve({name:"pullquote",aliases:["pull-quote"],schema:M9,description:"Decorative pull quote for magazine-style emphasis with float and block modes",typeName:"PullQuote",category:"Content",snippet:['{% pullquote variant="${1|default,accent,editorial|}" %}',"> ${2:Quote text to emphasize.}","{% /pullquote %}"]}),textblock:Ve({name:"textblock",aliases:["text-block","prose"],schema:q9,description:"Text formatting block with drop caps, multi-column layout, lead paragraphs, and alignment control",typeName:"TextBlock",category:"Content",snippet:["{% textblock dropcap %}","${1:Formatted text content with drop cap styling.}","{% /textblock %}"]}),mediatext:Ve({name:"mediatext",aliases:["media-text"],schema:N9,description:"Image and text side by side with configurable ratio and optional text wrapping",typeName:"MediaText",category:"Layout",snippet:['{% mediatext align="${1|left,right|}" ratio="${2|1:1,1:2,2:1|}" %}',"![${3:Alt text}](${4:/path/to/image.png})","","${5:Text content displayed alongside the image.}","{% /mediatext %}"]}),icon:Ve({name:"icon",schema:$9,description:"Inline icon resolved by name from the theme icon registry. Self-closing.",category:"Content",snippet:['{% icon name="${1:icon-name}" /%}']}),tint:Ve({name:"tint",schema:Z9,description:"Section-level colour override via CSS custom properties. Declared as first child of a block rune.",typeName:"Tint",snippet:["{% tint %}","- background: ${1:#1a1a2e}","- primary: ${2:#e94560}","- accent: ${3:#0f3460}","{% /tint %}"]}),showcase:Ve({name:"showcase",schema:V9,description:"Media presentation wrapper with shadow, bleed displacement, and aspect ratio enforcement",typeName:"Showcase",category:"Layout",snippet:['{% showcase shadow="${1|none,soft,hard,elevated|}" %}',"$0","{% /showcase %}"]}),bg:Ve({name:"bg",schema:W9,description:"Background image/video directive — modifies parent section backdrop",typeName:"Bg",snippet:['{% bg src="${1:/path/to/image.jpg}" overlay="${2:rgba(0,0,0,0.5)}" /%}']}),blog:Ve({name:"blog",schema:G9,description:"Blog post listing with filtering, sorting, and multiple layouts. Displays pages from a content folder as a navigable blog index.",seoType:"Blog",typeName:"Blog",schemaOrgType:"Blog",category:"Semantic"}),xref:Ve({name:"xref",aliases:["ref"],schema:K9,description:"Inline cross-reference that resolves an entity by ID or name from the registry. Self-closing."}),expand:Ve({name:"expand",schema:ez,description:"Substitute a registered entity's source content inline. Reads the entity's sourceFile via the plan plugin (or any plugin that registers extractable entities) and inlines it. Symmetric with `xref`: same lookup chain, different output (content rather than a link).",typeName:"Expand",category:"Content",snippet:['{% expand "${1:SPEC-001}" /%}']}),badge:Ve({name:"badge",schema:Iz,description:"Inline pill that flags a piece of content (status, category, recency, tag). Visual variant from the universal metadata-system dimensions (sentiment, rank, type).",typeName:"Badge",category:"Content",snippet:['{% badge sentiment="${1|positive,negative,caution,neutral|}" %}',"${2:Label}","{% /badge %}"]}),bar:Ve({name:"bar",schema:Bz,description:'Block-level wrapper that renders the SPEC-080 `bar` layout primitive (a horizontal flex row) over author-written content. Body splits on a top-level `---` into a left group and a right group; the right group is pushed to the end via `data-align="end"`. Position-agnostic.',typeName:"Bar",category:"Content",snippet:["{% bar %}","${1:Left side}","---","${2:Right side}","{% /bar %}"]}),deflist:Ve({name:"deflist",aliases:["definitions","terms"],schema:zz,description:"Block-level wrapper that renders the SPEC-079 definition-list layout primitive over a markdown list. Each `- **Term:** value` item becomes a <dt>/<dd> pair. Inline runes compose naturally inside <dd>.",typeName:"Deflist",category:"Content",snippet:["{% deflist %}","- **${1:Term}:** ${2:Value}","- **${3:Term}:** ${4:Value}","{% /deflist %}"]}),collection:Ve({name:"collection",schema:nz,description:"Render a list, grid, or table of registry entities — the plural counterpart to ref/expand. Queries the registry by type with a field:value filter, sort, group, and limit; projects fields into a built-in layout or a per-item body template ($item bound).",typeName:"Collection",category:"Content",snippet:['{% collection type="${1:work}" filter="${2:status:ready}" sort="${3:priority}" /%}']}),relationships:Ve({name:"relationships",schema:rz,description:"Render an entity's relationship edges, grouped by kind — the plural-graph counterpart to ref/expand. Reads the registry relationship graph for `of` (an id, e.g. of=$item.id); each item is a related entity with its edge $kind bound. Generic over kind, so it serves any domain (plan, storytelling, …).",typeName:"Relationships",category:"Content",snippet:['{% relationships of="${1:WORK-1}" /%}']}),aggregate:Ve({name:"aggregate",schema:sz,description:'Project numbers — counts (and per-group breakdowns) over the registry — beside collection (items) and relationships (edges). Two modes: a no-body inline integer (`{% aggregate type="work" filter="status:done" /%}`) or a body-zoned form whose preamble / template / fallback zones bind `$item` to a totals / per-group / zeros projection. Use the optional `value` sub-filter (e.g. `value="status:done"`) to drive a progress-bar ratio without a second query.',typeName:"Aggregate",category:"Content",snippet:['{% aggregate type="${1:work}" filter="${2:status:done}" /%}']}),"file-ref":Ve({name:"file-ref",schema:oz,description:'Path-based inline reference to a project file — third member of the Registry family beside `xref` (id → link) and `expand` (id → inlined content). Resolves to a deep-link `<a>` pointing at `{repoUrl}/blob/{repoBranch}/{path}#L{start}-L{end}` on GitHub. With `preview="drawer"`, hoists a drawer containing the file\'s snippet and a "View source on GitHub →" footer link, leaving an inline link at the call site that opens it.',typeName:"FileRef",category:"Content",snippet:['{% file-ref path="${1:packages/types/src/token-contract.ts}" lines="${2:42-58}" label="${3:ThemeTokensConfig}" /%}']}),progress:Ve({name:"progress",schema:Lz,description:"A generic completion bar. Renders a ratio from supplied numbers — value+max (or percent) — with an optional body label; computes nothing itself. Feed it an aggregate (e.g. value=$item.data.progressDone max=$item.data.progressTotal).",typeName:"Progress",category:"Content",snippet:['{% progress value="${1:3}" max="${2:10}" /%}']}),card:Ve({name:"card",schema:Mz,description:"A generic, self-contained content card. The body splits on `---` into [media] / body / [footer]: the media zone holds any content (image, codegroup, sandbox, …) and lays out beside the body on wide screens / as a full-bleed header on mobile; the footer is a muted meta row. Optional `href` makes the whole card a link. Knows nothing about the registry — usable standalone or inside a collection body template.",typeName:"Card",category:"Content",snippet:['{% card href="${1:/posts/slug/}" %}',"### ${2:Title}","${3:A short summary.}","{% /card %}"]})},j0={...Fz(E7),link:IA,...B.tags},$7={heading:ij,paragraph:sj,fence:oj,list:aj,item:lj,em:cj,strong:uj,text:fj,link:IA,hardbreak:dj,image:hj,table:pj,thead:B.nodes.thead,tbody:B.nodes.tbody,th:B.nodes.th,tr:B.nodes.tr,error:B.nodes.error},Q7=new Set(["nav","nav-group","nav-item"]);function L7(n,e,t){const r={...n.runes};for(const[i,s]of Object.entries(e7.runes)){if(!r[i])continue;const o={};s.postTransform&&(o.postTransform=s.postTransform),s.styles&&(o.styles=s.styles),Object.keys(o).length&&(r[i]={...r[i],...o})}if(e)for(const[i,s]of Object.entries(e))r[i]&&(r[i]={...r[i],postTransform:s});if(t)for(const[i,s]of Object.entries(t))r[i]&&(r[i]={...r[i],styles:s});return{...n,runes:r}}function SC(n,e,t,r,i,s,o){const a=B.parse(n),l=L7(e,i,o),c=r?{...j0,...r}:j0,u=B.transform(a,{tags:c,nodes:$7,variables:{__source:n,__icons:l.icons}});let f=AZ(u);s&&(f=Qg(f,s));const d=AC(f);let m=Ij(l)(f);return t&&(m=t(m)),{html:i6(m),isComponent:d}}function AC(n){return n==null||typeof n=="string"||typeof n=="number"?!1:Array.isArray(n)?n.some(AC):"attributes"in n&&n.attributes?.["data-rune"]?Q7.has(n.attributes["data-rune"]):!1}function Qg(n,e){if(n==null||typeof n=="string"||typeof n=="number")return n;if(Array.isArray(n))return n.map(r=>Qg(r,e));const t=n;if(t.attributes?.["data-rune"]==="sandbox"){const i=e.design?.contexts??{},o=t.children?.find(l=>l?.attributes?.["data-field"]==="context")?.attributes?.content??"default",a=i[o];if(a){const l={$$mdtype:"Tag",name:"meta",attributes:{"data-field":"design-tokens",content:JSON.stringify(a)},children:[]};return{...t,children:[...t.children??[],l]}}}if(t.children?.length){const r=t.children.map(i=>Qg(i,e));return{...t,children:r}}return t}function M7(n){return n.hasAttribute("x-data")||n.hasAttribute("data-controller")}let D7=0;function eo(n){return`${n}-${++D7}`}const q7="http://www.w3.org/2000/svg",z0='<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>',R7='<polyline points="20 6 9 17 4 12"/>';function Cp(n){const e=document.createElementNS(q7,"svg");return e.setAttribute("width","16"),e.setAttribute("height","16"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.innerHTML=n,e}function I7(n){const e=n.getAttribute("data-copy-selector");if(e){const t=n.querySelectorAll(e);return Array.from(t).map(r=>r.textContent??"").join(`
338
+ `)}return n.textContent??""}function N7(n){const e=n.querySelectorAll("pre"),t=[];for(const r of e){const i=r.parentElement;if(i?.classList.contains("rf-codeblock")&&i.querySelector(":scope > .rf-codeblock__copy"))continue;const s=document.createElement("button");s.className="rf-codeblock__copy",s.type="button",s.setAttribute("aria-label","Copy code"),s.appendChild(Cp(z0));let o;const a=()=>{const c=I7(r);navigator.clipboard.writeText(c).then(()=>{s.innerHTML="",s.appendChild(Cp(R7)),s.setAttribute("aria-label","Copied"),s.classList.add("rf-codeblock__copy--copied"),o&&clearTimeout(o),o=setTimeout(()=>{s.innerHTML="",s.appendChild(Cp(z0)),s.setAttribute("aria-label","Copy code"),s.classList.remove("rf-codeblock__copy--copied")},2e3)})};s.addEventListener("click",a);const l=r.parentElement?.classList.contains("rf-codeblock")?r.parentElement:null;if(l)l.appendChild(s),t.push(()=>{s.removeEventListener("click",a),o&&clearTimeout(o),s.remove()});else{const c=document.createElement("div");c.className="rf-codeblock",r.parentNode?.insertBefore(c,r),c.appendChild(r),c.appendChild(s),t.push(()=>{s.removeEventListener("click",a),o&&clearTimeout(o),c.parentNode?.insertBefore(r,c),c.remove()})}}return()=>t.forEach(r=>r())}function Z0(n){const e=Array.from(n.querySelectorAll("details"));if(e.length===0)return()=>{};const t=n.hasAttribute("data-multiple"),r=[];for(const o of e){const a=o.querySelector("summary");if(!a)continue;const l=eo("rf-accordion-panel"),c=eo("rf-accordion-trigger");a.id=c,a.setAttribute("aria-expanded",String(o.open)),o.setAttribute("data-state",o.open?"open":"closed"),a.setAttribute("data-state",o.open?"active":"inactive");const u=Array.from(o.children).find(d=>d instanceof HTMLElement&&d.tagName!=="SUMMARY");u&&(u.id=l,u.setAttribute("role","region"),u.setAttribute("aria-labelledby",c),a.setAttribute("aria-controls",l));const f=()=>{if(a.setAttribute("aria-expanded",String(o.open)),o.setAttribute("data-state",o.open?"open":"closed"),a.setAttribute("data-state",o.open?"active":"inactive"),!t&&o.open){for(const d of e)if(d!==o&&d.open){d.open=!1;const h=d.querySelector("summary");h?.setAttribute("aria-expanded","false"),d.setAttribute("data-state","closed"),h?.setAttribute("data-state","inactive")}}};o.addEventListener("toggle",f),r.push(()=>o.removeEventListener("toggle",f))}const i=e.map(o=>o.querySelector("summary")).filter(o=>o!==null),s=o=>{const a=o.target,l=i.indexOf(a);if(l===-1)return;let c=null;switch(o.key){case"ArrowDown":c=(l+1)%i.length;break;case"ArrowUp":c=(l-1+i.length)%i.length;break;case"Home":c=0;break;case"End":c=i.length-1;break;default:return}c!==null&&(o.preventDefault(),i[c].focus())};return n.addEventListener("keydown",s),r.push(()=>n.removeEventListener("keydown",s)),()=>r.forEach(o=>o())}const el=new Map,X0=new WeakSet;function B7(n){let e=el.get(n);return e||(e=new Map,el.set(n,e)),e}function j7(n){const e=n.split("+").map(i=>i.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;const t=e[e.length-1];if(!t)return null;const r=new Set(e.slice(0,-1));return{key:t,cmd:r.has("cmd")||r.has("meta"),ctrl:r.has("ctrl")||r.has("control"),alt:r.has("alt")||r.has("option"),shift:r.has("shift")}}function z7(n,e){if(e.key.toLowerCase()!==n.key)return!1;const t=e.metaKey||e.ctrlKey,r=n.cmd||n.ctrl;return!(r&&!t||!r&&t||n.alt!==e.altKey||n.shift!==e.shiftKey)}function Z7(n){const e=n.activeElement;if(!e)return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}function X7(n){const e=n.ownerDocument;if(!e||!e.defaultView)return()=>{};const t=e.defaultView,r=n instanceof t.HTMLDialogElement?n:F7(n);if(!r)return()=>{};const i=r.id;if(!i)return()=>{};const s=r.querySelector(".rf-drawer__close");s&&(s.hidden=!1);const o=r.getAttribute("data-shortcut")??void 0,a=o?j7(o)??void 0:void 0,l=B7(e);if(l.has(i))return()=>{};if(a)for(const O of l.values())O.shortcut&&V0(O.shortcut)===V0(a)&&console.warn(`[refrakt drawer] shortcut "${o}" is registered by drawers "${O.id}" and "${i}"; the later one wins.`);l.set(i,{dialog:r,id:i,shortcut:a});const c=[],u=`#${i}`,f=O=>{O.preventDefault(),Lg(r)},d=[];if(e.querySelectorAll('a[data-target-type="drawer"]').forEach(O=>{const v=O.getAttribute("href")??"";(v===u||v.endsWith(u))&&(O.addEventListener("click",f),d.push(O))}),c.push(()=>{for(const O of d)O.removeEventListener("click",f)}),s){const O=()=>gf(r);s.addEventListener("click",O),c.push(()=>s.removeEventListener("click",O))}const h=O=>{O.target===r&&gf(r)};r.addEventListener("click",h),c.push(()=>r.removeEventListener("click",h));const m=O=>{O.preventDefault(),gf(r)};r.addEventListener("cancel",m),c.push(()=>r.removeEventListener("cancel",m));const p=()=>{r.setAttribute("data-state","closed"),t.location.hash===u&&t.history.replaceState(null,"",t.location.pathname+t.location.search),F0(e)};return r.addEventListener("close",p),c.push(()=>r.removeEventListener("close",p)),t.location.hash===u&&t.queueMicrotask(()=>{r.open||Lg(r)}),X0.has(e)||(X0.add(e),Y7(e)),()=>{for(const O of c)O();l.delete(i),F0(e)}}function F7(n){const e=n.ownerDocument;if(!e)return null;const t=e.createElement("dialog");for(const r of Array.from(n.attributes))t.setAttribute(r.name,r.value);for(;n.firstChild;)t.appendChild(n.firstChild);return n.parentNode&&n.parentNode.replaceChild(t,n),t.setAttribute("data-state","closed"),t}function Lg(n){const e=n.ownerDocument;if(!e||!e.defaultView)return;const t=e.defaultView,r=el.get(e);if(r)for(const i of r.values())i.dialog!==n&&i.dialog.open&&i.dialog.close();if(!n.open)try{n.showModal()}catch{n.setAttribute("open","")}if(n.setAttribute("data-state","open"),W7(e),n.id){const i=`#${n.id}`;t.location.hash!==i&&t.history.replaceState(null,"",t.location.pathname+t.location.search+i)}}const V7=280;function gf(n){if(!n.open||n.getAttribute("data-state")==="closing")return;n.setAttribute("data-state","closing");let e=!1;const t=()=>{if(!e){e=!0,n.removeEventListener("animationend",r),i!==void 0&&clearTimeout(i);try{n.close()}catch{n.removeAttribute("open")}}},r=s=>{s.target===n&&(s.animationName&&!s.animationName.startsWith("rf-drawer-slide-out")||t())};n.addEventListener("animationend",r);const i=setTimeout(t,V7)}function W7(n){n.documentElement.classList.add("rf-drawer-open")}function F0(n){const e=el.get(n);if(!e){n.documentElement.classList.remove("rf-drawer-open");return}for(const t of e.values())if(t.dialog.open)return;n.documentElement.classList.remove("rf-drawer-open")}function V0(n){const e=[];return(n.cmd||n.ctrl)&&e.push("mod"),n.alt&&e.push("alt"),n.shift&&e.push("shift"),e.push(n.key),e.join("+")}function Y7(n){const e=n.defaultView;if(!e)return;const t=i=>{if(Z7(n))return;const s=el.get(n);if(!s)return;let o;for(const a of s.values())a.shortcut&&z7(a.shortcut,i)&&(o=a);o&&(i.preventDefault(),Lg(o.dialog))};n.addEventListener("keydown",t);const r=()=>{const i=el.get(n);if(i)for(const s of i.values())s.dialog.open&&e.location.hash!==`#${s.id}`&&gf(s.dialog)};e.addEventListener("popstate",r)}function W0(n){const e=n.querySelector('[data-name="tabs"]'),t=n.querySelector('[data-name="panels"]');if(!e||!t)return()=>{};const r=Array.from(e.children).filter(d=>d instanceof HTMLElement&&d.tagName==="BUTTON"),i=Array.from(t.children).filter(d=>d instanceof HTMLElement);if(r.length===0||i.length===0)return()=>{};const s=r.map(()=>eo("rf-tab")),o=i.map(()=>eo("rf-tabpanel"));for(let d=0;d<r.length;d++)r[d].id=s[d],o[d]&&r[d].setAttribute("aria-controls",o[d]);for(let d=0;d<i.length;d++)o[d]&&(i[d].id=o[d]),s[d]&&i[d].setAttribute("aria-labelledby",s[d]);const a=r[0].className.split(" ")[0]||"";let l=0;function c(d){l=d;for(let h=0;h<r.length;h++){const m=h===l;r[h].setAttribute("aria-selected",String(m)),r[h].setAttribute("data-state",m?"active":"inactive"),a&&r[h].classList.toggle(`${a}--active`,m)}for(let h=0;h<i.length;h++){const m=h===l;i[h].hidden=!m,i[h].setAttribute("data-state",m?"active":"inactive")}}c(0);const u=[];for(let d=0;d<r.length;d++){const h=()=>c(d);r[d].addEventListener("click",h),u.push(()=>r[d].removeEventListener("click",h))}const f=d=>{const h=d.target,m=r.indexOf(h);if(m===-1)return;let p=null;switch(d.key){case"ArrowRight":p=(m+1)%r.length;break;case"ArrowLeft":p=(m-1+r.length)%r.length;break;case"Home":p=0;break;case"End":p=r.length-1;break;default:return}p!==null&&(d.preventDefault(),r[p].focus(),c(p))};return e.addEventListener("keydown",f),u.push(()=>e.removeEventListener("keydown",f)),()=>{u.forEach(d=>d());for(const d of r)d.removeAttribute("id"),d.removeAttribute("aria-controls"),d.removeAttribute("aria-selected"),d.removeAttribute("data-state"),a&&d.classList.remove(`${a}--active`);for(const d of i)d.hidden=!1,d.removeAttribute("id"),d.removeAttribute("aria-labelledby"),d.removeAttribute("data-state")}}function U7(n){const e=n.querySelector('[data-name="steps"]')||n,t=Array.from(e.querySelectorAll('[data-rune="reveal-step"]'));if(t.length===0)return()=>{};let r=1;const i=document.createElement("button");i.className="rf-reveal__next",i.textContent="Continue";const s=document.createElement("button");s.className="rf-reveal__reset",s.textContent="Start over";function o(){for(let c=0;c<t.length;c++){const u=c<r;t[c].classList.toggle("rf-reveal-step--visible",u),t[c].classList.toggle("rf-reveal-step--hidden",!u),t[c].setAttribute("data-state",u?"open":"closed")}r<t.length?(i.parentNode||n.appendChild(i),s.remove()):t.length>1?(i.remove(),s.parentNode||n.appendChild(s)):(i.remove(),s.remove())}const a=()=>{r<t.length&&(r++,o())},l=()=>{r=1,o()};return i.addEventListener("click",a),s.addEventListener("click",l),o(),()=>{i.removeEventListener("click",a),s.removeEventListener("click",l),i.remove(),s.remove();for(const c of t)c.classList.remove("rf-reveal-step--visible","rf-reveal-step--hidden"),c.removeAttribute("data-state")}}function G7(n){const e=n.querySelector("table");if(!e)return()=>{};const t=n.getAttribute("data-searchable")==="true",i=(n.getAttribute("data-sortable")||"").split(",").map(A=>A.trim()).filter(Boolean),s=parseInt(n.getAttribute("data-pagesize")||"0",10),o=n.getAttribute("data-defaultsort")||"",a=Array.from(e.querySelectorAll("th")),l=a.map(A=>A.textContent?.trim()||""),c=e.querySelectorAll("tbody tr"),u=Array.from(c.length>0?c:e.querySelectorAll("tr:not(:first-child)")).map(A=>({el:A,cells:Array.from(A.querySelectorAll("td")).map(x=>x.textContent?.trim()||"")})),f=u.map(A=>A.el);let d="",h=o,m="asc",p=0;const O=[];let v=null,b=null;if(t){v=document.createElement("div"),v.className="rf-datatable__toolbar",b=document.createElement("input"),b.type="search",b.placeholder="Filter rows...",b.className="rf-datatable__input",v.appendChild(b),e.before(v);const A=()=>{d=b.value,p=0,S()};b.addEventListener("input",A),O.push(()=>b.removeEventListener("input",A))}for(const A of a){const x=A.textContent?.trim()||"";if(!i.includes(x))continue;A.style.cursor="pointer",A.style.userSelect="none";const k=()=>{h===x?m=m==="asc"?"desc":"asc":(h=x,m="asc"),p=0,S()};A.addEventListener("click",k),O.push(()=>{A.removeEventListener("click",k),A.style.cursor="",A.style.userSelect=""})}let _=null,C=null,y=null,w=null;if(s>0){_=document.createElement("div"),_.className="rf-datatable__pagination",C=document.createElement("button"),C.className="rf-datatable__page-btn",C.innerHTML="&larr; Prev",w=document.createElement("span"),w.className="rf-datatable__page-info",y=document.createElement("button"),y.className="rf-datatable__page-btn",y.innerHTML="Next &rarr;",_.appendChild(C),_.appendChild(w),_.appendChild(y),e.after(_);const A=()=>{p>0&&(p--,S())},x=()=>{p++,S()};C.addEventListener("click",A),y.addEventListener("click",x),O.push(()=>{C.removeEventListener("click",A),y.removeEventListener("click",x)})}function S(){let A=[...u];if(d){const $=d.toLowerCase();A=A.filter(L=>L.cells.some(P=>P.toLowerCase().includes($)))}if(h){const $=l.indexOf(h);$>=0&&A.sort((L,P)=>{const D=L.cells[$].localeCompare(P.cells[$],void 0,{numeric:!0});return m==="asc"?D:-D})}const x=A.length,k=s>0?Math.ceil(x/s):1;p>=k&&(p=Math.max(0,k-1));const E=s>0?A.slice(p*s,(p+1)*s):A,T=e.querySelector("tbody")||e;for(const $ of u)$.el.style.display="none";for(const $ of E)$.el.style.display="",T.appendChild($.el);for(const $ of a){const L=$.textContent?.replace(/[▲▼]/g,"").trim()||"",P=$.querySelector(".rf-datatable__sort-indicator");if(i.includes(L))if(h===L)if(P)P.textContent=m==="asc"?" ▲":" ▼";else{const D=document.createElement("span");D.className="rf-datatable__sort-indicator",D.textContent=m==="asc"?" ▲":" ▼",$.appendChild(D)}else P?.remove()}_&&C&&y&&w&&(C.disabled=p===0,y.disabled=p>=k-1,w.textContent=`${p+1} / ${k}`,k<=1?_.hidden=!0:_.hidden=!1)}return S(),()=>{O.forEach(x=>x()),v?.remove(),_?.remove();for(const x of a)x.querySelector(".rf-datatable__sort-indicator")?.remove();const A=e.querySelector("tbody")||e;for(const x of f)x.style.display="",A.appendChild(x)}}function H7(n){const e=n.tagName==="FORM"?n:n.querySelector("form");if(!e)return()=>{};const t=n.getAttribute("data-action")||e.getAttribute("action")||"",r=n.getAttribute("data-method")||e.getAttribute("method")||"POST",i=n.getAttribute("data-success")||"Form submitted successfully.",s=n.getAttribute("data-error")||"Something went wrong. Please try again.",o=n.getAttribute("data-honeypot")!=="false";let a=null;if(o){a=document.createElement("div"),a.className="rf-form__hp",a.setAttribute("aria-hidden","true"),a.style.display="none";const f=document.createElement("input");f.type="text",f.name="_gotcha",f.setAttribute("autocomplete","off"),f.tabIndex=-1,a.appendChild(f),e.prepend(a)}const l=document.createElement("div");l.className="rf-form__status",l.hidden=!0,e.appendChild(l);function c(f,d){l.hidden=!1,l.className=`rf-form__status rf-form__status--${f}`,l.setAttribute("role",f==="submitting"?"status":"alert"),l.setAttribute("data-state",f),l.textContent=d}const u=async f=>{if(f.preventDefault(),!!t){c("submitting","Submitting...");try{const d=new FormData(e);(await fetch(t,{method:r,body:d,headers:{Accept:"application/json"}})).ok?(c("success",i),e.reset()):c("error",s)}catch{c("error",s)}}};return e.addEventListener("submit",u),()=>{e.removeEventListener("submit",u),a?.remove(),l.remove()}}const K7="http://www.w3.org/2000/svg";function Fu(n){const e=document.createElementNS(K7,"svg");return e.setAttribute("width","14"),e.setAttribute("height","14"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.innerHTML=n,e}const os={eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>',code:'<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',mobile:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/>',tablet:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/>',desktop:'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>',sun:'<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>',moon:'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>'},J7={mobile:os.mobile,tablet:os.tablet,desktop:os.desktop},aa={mobile:{width:375,label:"375px"},tablet:{width:768,label:"768px"},desktop:{width:null,label:"Full"}};function eX(n){const e=n.getAttribute("data-theme")||"auto",r=(n.getAttribute("data-responsive")||"").split(",").map(P=>P.trim()).filter(P=>P in aa),i=r.length>0,s=n.querySelector('[data-name="source"]'),o=n.querySelector('[data-name="html-source"]'),a=n.querySelector('[data-name="themed-source"]'),l=Array.from(n.children).filter(P=>P!==s&&P!==o&&P!==a&&!P.matches?.("meta[data-field]")),c=s!==null||o!==null;let u="preview",f=e,d=i?r[r.length-1]:null;const h=[],m=document.createElement("div");m.className="rf-preview__toolbar";const p=document.createElement("span");p.className="rf-preview__title",m.appendChild(p);const O=document.createElement("div");O.className="rf-preview__controls",m.appendChild(O);let v=null,b=null;if(c){const P=document.createElement("div");P.className="rf-preview__view-toggle",v=document.createElement("button"),v.className="rf-preview__toggle-btn rf-preview__toggle-btn--active",v.setAttribute("aria-label","Preview"),v.setAttribute("title","Preview"),v.appendChild(Fu(os.eye)),b=document.createElement("button"),b.className="rf-preview__toggle-btn",b.setAttribute("aria-label","View source"),b.setAttribute("title","View source"),b.appendChild(Fu(os.code)),P.appendChild(v),P.appendChild(b),O.appendChild(P);const D=()=>{u="preview",L()},I=()=>{u="code",L()};v.addEventListener("click",D),b.addEventListener("click",I),h.push(()=>{v.removeEventListener("click",D),b.removeEventListener("click",I)})}const _=new Map;if(i){const P=document.createElement("div");P.className="rf-preview__viewport-toggle";for(const D of r){const I=document.createElement("button");I.className="rf-preview__toggle-btn",I.setAttribute("aria-label",`${aa[D].label} viewport`),I.setAttribute("title",aa[D].label),I.appendChild(Fu(J7[D]||os.desktop));const W=()=>{d=D,L()};I.addEventListener("click",W),h.push(()=>I.removeEventListener("click",W)),P.appendChild(I),_.set(D,I)}O.appendChild(P)}const C=document.createElement("div");C.className="rf-preview__toggle";const y=[{mode:"auto",label:"Auto",title:"System preference",icon:os.desktop},{mode:"light",label:"Light",title:"Light mode",icon:os.sun},{mode:"dark",label:"Dark",title:"Dark mode",icon:os.moon}],w=new Map;for(const P of y){const D=document.createElement("button");D.className="rf-preview__toggle-btn",D.setAttribute("aria-label",`${P.label} theme`),D.setAttribute("title",P.title),D.appendChild(Fu(P.icon));const I=()=>{f=P.mode,L()};D.addEventListener("click",I),h.push(()=>D.removeEventListener("click",I)),C.appendChild(D),w.set(P.mode,D)}O.appendChild(C);const S=document.createElement("div");S.className="rf-preview__canvas";let A=null,x=null;if(i){A=document.createElement("div"),A.className="rf-preview__viewport-frame",x=document.createElement("span"),x.className="rf-preview__viewport-label",x.hidden=!0,A.appendChild(x);for(const P of l)A.appendChild(P);S.appendChild(A)}else for(const P of l)S.appendChild(P);const k=[];let E=null,T=null,$="";if(c){if(E=document.createElement("div"),E.className="rf-preview__source",s){const P=document.createElement("div");P.appendChild(s),k.push({key:"markdoc",label:"Markdoc",panel:P})}if(o){const P=document.createElement("div");P.appendChild(o),k.push({key:"rune",label:"Rune",panel:P})}if(a){const P=document.createElement("div");P.appendChild(a),k.push({key:"html",label:"HTML",panel:P})}if($=k[0]?.key??"",k.length>1){const P=document.createElement("div");P.className="rf-preview__source-tabs",T=new Map;for(const D of k){const I=document.createElement("button");I.className="rf-preview__source-tab",D.key===$&&I.classList.add("rf-preview__source-tab--active"),I.textContent=D.label;const W=()=>{$=D.key,L()};I.addEventListener("click",W),h.push(()=>I.removeEventListener("click",W)),P.appendChild(I),T.set(D.key,I)}E.appendChild(P)}for(const P of k)P.panel.hidden=P.key!==$,E.appendChild(P.panel)}n.appendChild(m),E&&n.appendChild(E),n.appendChild(S);function L(){if(v&&b&&(v.classList.toggle("rf-preview__toggle-btn--active",u==="preview"),b.classList.toggle("rf-preview__toggle-btn--active",u==="code")),E&&(E.hidden=u!=="code"),S.hidden=u==="code"&&c,T)for(const[D,I]of T)I.classList.toggle("rf-preview__source-tab--active",$===D);for(const D of k)D.panel.hidden=D.key!==$;for(const[D,I]of _)I.classList.toggle("rf-preview__toggle-btn--active",d===D);if(A){const D=d&&aa[d]?aa[d].width:null;A.classList.toggle("rf-preview__viewport-frame--constrained",!!D),A.style.maxWidth=D?`${D}px`:"",x&&(D&&d?(x.textContent=aa[d].label,x.hidden=!1):x.hidden=!0)}for(const[D,I]of w)I.classList.toggle("rf-preview__toggle-btn--active",f===D);const P=f==="auto"?void 0:f;P?S.setAttribute("data-color-scheme",P):S.removeAttribute("data-color-scheme");for(const D of S.querySelectorAll("rf-sandbox"))typeof D.setTheme=="function"&&D.setTheme(P||"auto")}return L(),()=>{h.forEach(P=>P()),s&&n.appendChild(s),o&&n.appendChild(o),a&&n.appendChild(a);for(const P of Array.from(A?.children??S.children))P!==x&&n.appendChild(P);m.remove(),S.remove(),E?.remove()}}function tX(n){const e=n.querySelectorAll("[data-scrollspy]"),t=[];for(const r of e){const i=r.querySelectorAll('a[href^="#"]');if(i.length===0)continue;const s=new Map,o=[];for(const c of i){const u=c.getAttribute("href").slice(1),f=document.getElementById(u);if(!f)continue;const d=c.closest("li");d&&(s.set(f,d),o.push(f))}if(o.length===0)continue;let a=null;const l=new IntersectionObserver(c=>{for(const u of c)if(u.isIntersecting){const f=s.get(u.target);f&&f!==a&&(a?.removeAttribute("data-active"),f.setAttribute("data-active",""),a=f);break}},{rootMargin:"0px 0px -80% 0px"});for(const c of o)l.observe(c);t.push(()=>{l.disconnect(),a?.removeAttribute("data-active")})}return()=>t.forEach(r=>r())}function nX(n){const e=n.querySelectorAll("[data-version-switcher]"),t=[];for(const r of e){const i=r.querySelector("select");if(!i)continue;const s=()=>{const o=i.value;o&&o!==window.location.pathname&&(window.location.href=o)};i.addEventListener("change",s),t.push(()=>i.removeEventListener("change",s))}return()=>t.forEach(r=>r())}function rX(n){const e=[];if(n.getAttribute("data-layout")==="carousel"){const t=iX(n);t&&e.push(t)}if(n.getAttribute("data-lightbox")==="true"){const t=sX(n);t&&e.push(t)}return()=>e.forEach(t=>t())}function iX(n){const e=n.querySelector('[data-name="items"]');if(!e)return;const t=Array.from(e.querySelectorAll('[data-name="item"]'));if(t.length===0)return;const r=document.createElement("button");r.className="rf-gallery__nav rf-gallery__nav--prev",r.setAttribute("aria-label","Previous"),r.textContent="‹";const i=document.createElement("button");i.className="rf-gallery__nav rf-gallery__nav--next",i.setAttribute("aria-label","Next"),i.textContent="›",n.appendChild(r),n.appendChild(i);function s(c){const u=t[0];if(!u||!e)return;const f=u.offsetWidth+parseFloat(getComputedStyle(e).gap||"0");e.scrollBy({left:c*f,behavior:"smooth"})}const o=()=>s(-1),a=()=>s(1);r.addEventListener("click",o),i.addEventListener("click",a);const l=c=>{c.key==="ArrowLeft"&&(c.preventDefault(),s(-1)),c.key==="ArrowRight"&&(c.preventDefault(),s(1))};return n.setAttribute("tabindex","0"),n.addEventListener("keydown",l),()=>{r.removeEventListener("click",o),i.removeEventListener("click",a),n.removeEventListener("keydown",l),r.remove(),i.remove(),n.removeAttribute("tabindex")}}function sX(n){const e=Array.from(n.querySelectorAll('[data-name="item"]'));if(e.length===0)return;let t=null,r=0;function i(d){return d.querySelector("img")?.getAttribute("src")||""}function s(d){return d.querySelector("img")?.getAttribute("alt")||""}function o(d){r=d,e[r]?.setAttribute("data-state","selected"),t=document.createElement("div"),t.className="rf-gallery__lightbox",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label","Image lightbox");const h=document.createElement("img");h.src=i(e[r]),h.alt=s(e[r]);const m=document.createElement("button");m.className="rf-gallery__lightbox-close",m.setAttribute("aria-label","Close lightbox"),m.textContent="×";const p=document.createElement("button");p.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--prev",p.setAttribute("aria-label","Previous image"),p.textContent="‹";const O=document.createElement("button");O.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--next",O.setAttribute("aria-label","Next image"),O.textContent="›",t.appendChild(h),t.appendChild(m),e.length>1&&(t.appendChild(p),t.appendChild(O)),m.addEventListener("click",l),p.addEventListener("click",()=>a(-1)),O.addEventListener("click",()=>a(1)),t.addEventListener("click",v=>{v.target===t&&l()}),document.body.appendChild(t),document.addEventListener("keydown",c),m.focus()}function a(d){if(!t)return;e[r]?.removeAttribute("data-state"),r=(r+d+e.length)%e.length,e[r]?.setAttribute("data-state","selected");const h=t.querySelector("img");h&&(h.src=i(e[r]),h.alt=s(e[r]))}function l(){t&&(e[r]?.removeAttribute("data-state"),document.removeEventListener("keydown",c),t.remove(),t=null,e[r]?.focus())}function c(d){d.key==="Escape"&&(d.preventDefault(),l()),d.key==="ArrowLeft"&&(d.preventDefault(),a(-1)),d.key==="ArrowRight"&&(d.preventDefault(),a(1))}const u=[];e.forEach((d,h)=>{const m=()=>o(h);d.addEventListener("click",m),d.setAttribute("tabindex","0"),d.setAttribute("role","button"),d.setAttribute("aria-label",s(d)||`View image ${h+1}`),u.push([d,m])});const f=d=>{if(d.key==="Enter"||d.key===" "){d.preventDefault();const h=d.currentTarget,m=e.indexOf(h);m>=0&&o(m)}};return e.forEach(d=>d.addEventListener("keydown",f)),()=>{l();for(const[d,h]of u)d.removeEventListener("click",h),d.removeAttribute("tabindex"),d.removeAttribute("role"),d.removeAttribute("aria-label");e.forEach(d=>d.removeEventListener("keydown",f))}}function oX(n){switch(n.getAttribute("data-variant")||"slider"){case"toggle":return cX(n);case"fade":return uX(n);case"auto":return fX(n);default:return lX(n)}}function rh(n){const e=n.querySelector('[data-name="panels"]')||n;return Array.from(e.querySelectorAll(':scope > [data-rune="juxtapose-panel"]'))}function aX(n){return n.querySelector('[data-name="name"]')?.textContent?.trim()||""}function lX(n){const e=rh(n);if(e.length<2)return()=>{};const r=(n.getAttribute("data-orientation")||"vertical")==="horizontal",i=n.querySelector('[data-name="panels"]');if(!i)return()=>{};i.style.position="relative",i.style.overflow="hidden",e[0].style.position="absolute",e[0].style.inset="0",e[0].style.zIndex="2",e[0].style.willChange="clip-path",e[1].style.position="relative",e[1].style.zIndex="1";for(const O of e)for(const v of O.querySelectorAll('iframe[loading="lazy"]'))v.loading="eager";const s=document.createElement("div");s.className="rf-juxtapose__divider",s.setAttribute("role","slider"),s.setAttribute("aria-label","Comparison slider"),s.setAttribute("aria-valuemin","0"),s.setAttribute("aria-valuemax","100"),s.setAttribute("tabindex","0");const o=document.createElement("div");o.className="rf-juxtapose__divider-handle",s.appendChild(o),i.appendChild(s);function a(O){const v=Math.max(0,Math.min(100,O));n.style.setProperty("--jx-position",String(v)),s.setAttribute("aria-valuenow",String(Math.round(v))),r?(e[0].style.clipPath=`inset(0 0 ${100-v}% 0)`,s.style.top=`${v}%`,s.style.left=""):(e[0].style.clipPath=`inset(0 ${100-v}% 0 0)`,s.style.left=`${v}%`,s.style.top="")}const l=parseFloat(n.style.getPropertyValue("--jx-position"))||50;a(l);let c=!1;function u(O){const v=i.getBoundingClientRect();return r?(O.clientY-v.top)/v.height*100:(O.clientX-v.left)/v.width*100}const f=O=>{c=!0,s.setPointerCapture(O.pointerId),a(u(O)),O.preventDefault()},d=O=>{c&&a(u(O))},h=O=>{c&&(c=!1,s.releasePointerCapture(O.pointerId))},m=O=>{O.target===s||s.contains(O.target)||(c=!0,s.setPointerCapture(O.pointerId),a(u(O)))};s.addEventListener("pointerdown",f),s.addEventListener("pointermove",d),s.addEventListener("pointerup",h),i.addEventListener("pointerdown",m),i.addEventListener("pointermove",d),i.addEventListener("pointerup",h);const p=O=>{const v=parseFloat(n.style.getPropertyValue("--jx-position"))||50,b=O.shiftKey?10:2,_=r?["ArrowUp"]:["ArrowLeft"],C=r?["ArrowDown"]:["ArrowRight"];_.includes(O.key)?(a(v-b),O.preventDefault()):C.includes(O.key)?(a(v+b),O.preventDefault()):O.key==="Home"?(a(0),O.preventDefault()):O.key==="End"&&(a(100),O.preventDefault())};return s.addEventListener("keydown",p),()=>{s.removeEventListener("pointerdown",f),s.removeEventListener("pointermove",d),s.removeEventListener("pointerup",h),i.removeEventListener("pointerdown",m),i.removeEventListener("pointermove",d),i.removeEventListener("pointerup",h),s.removeEventListener("keydown",p),s.remove(),i.style.position="",i.style.overflow="";for(const O of e)O.style.position="",O.style.inset="",O.style.zIndex="",O.style.clipPath="",O.style.willChange=""}}function cX(n){const e=rh(n);if(e.length<2)return()=>{};let t=0;const r=document.createElement("div");r.className="rf-juxtapose__toggle-bar",r.setAttribute("role","radiogroup"),r.setAttribute("aria-label","Comparison toggle");const i=e.map((l,c)=>{const u=document.createElement("button");return u.className="rf-juxtapose__toggle-btn",u.setAttribute("role","radio"),u.textContent=aX(l)||`Panel ${c+1}`,r.appendChild(u),u}),s=n.querySelector('[data-name="panels"]');s?s.parentNode.insertBefore(r,s):n.insertBefore(r,n.firstChild);function o(){e.forEach((l,c)=>{const u=c===t;l.hidden=!u,l.setAttribute("data-state",u?"active":"inactive")}),i.forEach((l,c)=>{const u=c===t;l.setAttribute("aria-checked",String(u)),l.setAttribute("data-state",u?"active":"inactive"),l.classList.toggle("rf-juxtapose__toggle-btn--active",u)})}const a=l=>{const c=l.target.closest(".rf-juxtapose__toggle-btn");if(!c)return;const u=i.indexOf(c);u>=0&&(t=u,o())};return r.addEventListener("click",a),o(),()=>{r.removeEventListener("click",a),r.remove();for(const l of e)l.hidden=!1,l.removeAttribute("data-state")}}function uX(n){const e=rh(n);if(e.length<2)return()=>{};const t=n.querySelector('[data-name="panels"]');if(!t)return()=>{};const r=parseInt(n.style.getPropertyValue("--jx-duration")||"1000",10);t.style.position="relative",e[0].style.position="relative",e[0].style.zIndex="1",e[1].style.position="absolute",e[1].style.inset="0",e[1].style.zIndex="2",e[1].style.opacity="0",e[1].style.transition=`opacity ${r}ms ease`;for(const l of e)for(const c of l.querySelectorAll('iframe[loading="lazy"]'))c.loading="eager";let i=!1;const s=()=>{i||(e[1].style.opacity="1")},o=()=>{i||(e[1].style.opacity="0")},a=()=>{i=!i,e[1].style.opacity=i?"1":"0"};return t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",o),t.addEventListener("click",a),t.setAttribute("aria-live","polite"),()=>{t.removeEventListener("mouseenter",s),t.removeEventListener("mouseleave",o),t.removeEventListener("click",a),t.removeAttribute("aria-live"),t.style.position="";for(const l of e)l.style.position="",l.style.inset="",l.style.zIndex="",l.style.opacity="",l.style.transition=""}}function fX(n){const e=rh(n);if(e.length<2)return()=>{};const r=(n.getAttribute("data-orientation")||"vertical")==="horizontal",i=n.querySelector('[data-name="panels"]');if(!i)return()=>{};const s=parseFloat(n.style.getPropertyValue("--jx-position"))||50,o=parseInt(n.style.getPropertyValue("--jx-duration")||"1000",10);i.style.position="relative",i.style.overflow="hidden",e[0].style.position="absolute",e[0].style.inset="0",e[0].style.zIndex="2",e[0].style.willChange="clip-path",e[1].style.position="relative",e[1].style.zIndex="1";for(const d of e)for(const h of d.querySelectorAll('iframe[loading="lazy"]'))h.loading="eager";function a(d){n.style.setProperty("--jx-position",String(d)),r?e[0].style.clipPath=`inset(0 0 ${100-d}% 0)`:e[0].style.clipPath=`inset(0 ${100-d}% 0 0)`}a(0);let l=null,c=!1;function u(){if(c)return;c=!0;const d=performance.now(),h=0;function m(p){const O=p-d,v=Math.min(O/o,1),b=1-Math.pow(1-v,3);a(h+(s-h)*b),v<1&&(l=requestAnimationFrame(m))}l=requestAnimationFrame(m)}const f=new IntersectionObserver(d=>{for(const h of d)h.isIntersecting&&u()},{threshold:.3});return f.observe(n),()=>{f.disconnect(),l!==null&&cancelAnimationFrame(l),i.style.position="",i.style.overflow="";for(const d of e)d.style.position="",d.style.inset="",d.style.zIndex="",d.style.clipPath="",d.style.willChange=""}}function dX(n){if(n.getAttribute("data-collapsible")!=="true")return()=>{};const e=Array.from(n.querySelectorAll('[data-rune="nav-group"]'));if(e.length===0)return()=>{};const t=[];for(const r of e){const i=r.querySelector('[data-field="title"], h1, h2, h3, h4, h5, h6');if(!i)continue;const s=r.querySelector(':scope > [data-name="panel"], :scope > ul, :scope > ol');if(!s)continue;const o=i.id||eo("rf-nav-trigger"),a=s.id||eo("rf-nav-panel");i.id=o,s.id=a,(r.getAttribute("data-collapsed")??"true")!=="false"&&r.setAttribute("data-collapsed","true"),i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("aria-controls",a),i.setAttribute("aria-expanded",r.getAttribute("data-collapsed")==="false"?"true":"false"),s.setAttribute("aria-labelledby",o);const c=()=>{const d=r.getAttribute("data-collapsed")==="false",h=s.getBoundingClientRect().height,m=d?0:s.scrollHeight;s.style.height=h+"px",s.offsetHeight,r.setAttribute("data-collapsed",d?"true":"false"),i.setAttribute("aria-expanded",d?"false":"true"),s.style.height=m+"px";const p=()=>{s.style.height="",s.removeEventListener("transitionend",O),clearTimeout(v)},O=b=>{b.target!==s||b.propertyName!=="height"||p()};s.addEventListener("transitionend",O);const v=setTimeout(p,260)},u=d=>{d.preventDefault(),c()},f=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c())};i.addEventListener("click",u),i.addEventListener("keydown",f),t.push(()=>{i.removeEventListener("click",u),i.removeEventListener("keydown",f)})}return()=>t.forEach(r=>r())}function hX(n){if(n.getAttribute("data-layout")!=="menubar")return()=>{};const e=[],t=Array.from(n.querySelectorAll('[data-rune="nav-group"]')),r=new Map,i=new Map;for(const f of t){const d=f.querySelector('[data-field="title"], h1, h2, h3, h4, h5, h6'),h=f.querySelector(":scope > ul, :scope > ol");if(!d||!h)continue;const m=d.id||eo("rf-nav-trigger"),p=h.id||eo("rf-nav-panel");d.id=m,h.id=p,d.setAttribute("role","button"),d.setAttribute("tabindex","0"),d.setAttribute("aria-haspopup","true"),d.setAttribute("aria-expanded","false"),d.setAttribute("aria-controls",p),h.setAttribute("role","menu"),h.setAttribute("aria-labelledby",m),f.setAttribute("data-open","false"),r.set(f,d),i.set(f,h)}const s=f=>{for(const[d,h]of r)d!==f&&(d.setAttribute("data-open","false"),h.setAttribute("aria-expanded","false"))},o=f=>{const d=r.get(f);d&&(s(f),f.setAttribute("data-open","true"),d.setAttribute("aria-expanded","true"))},a=f=>{f.getAttribute("data-open")==="true"?s():o(f)};for(const[f,d]of r){const h=i.get(f),m=v=>{v.preventDefault(),a(f)},p=v=>{switch(v.key){case"Enter":case" ":v.preventDefault(),a(f);break;case"ArrowDown":{v.preventDefault(),o(f),h.querySelector("a, button, [tabindex]")?.focus();break}case"ArrowRight":case"ArrowLeft":{v.preventDefault();const b=Array.from(r.keys()),_=b.indexOf(f);if(_===-1)break;const C=v.key==="ArrowRight"?b[(_+1)%b.length]:b[(_-1+b.length)%b.length];r.get(C)?.focus(),f.getAttribute("data-open")==="true"&&o(C);break}case"Escape":s(),d.focus();break}};d.addEventListener("click",m),d.addEventListener("keydown",p),e.push(()=>{d.removeEventListener("click",m),d.removeEventListener("keydown",p)});const O=v=>{const b=Array.from(h.querySelectorAll("a, button")),_=document.activeElement,C=_?b.indexOf(_):-1;switch(v.key){case"ArrowDown":v.preventDefault(),b[Math.min(C+1,b.length-1)]?.focus();break;case"ArrowUp":v.preventDefault(),C<=0?d.focus():b[C-1]?.focus();break;case"Escape":v.preventDefault(),s(),d.focus();break}};h.addEventListener("keydown",O),e.push(()=>h.removeEventListener("keydown",O))}const l=f=>{n.contains(f.target)||s()},c=f=>{const d=f.relatedTarget;(!d||!n.contains(d))&&s()};document.addEventListener("click",l),n.addEventListener("focusout",c),e.push(()=>document.removeEventListener("click",l)),e.push(()=>n.removeEventListener("focusout",c));const u=n.querySelector(':scope > [data-name="trigger"]');if(u){const f=d=>{d.preventDefault();const h=n.getAttribute("data-open")==="true";n.setAttribute("data-open",h?"false":"true"),u.setAttribute("aria-expanded",h?"false":"true")};u.addEventListener("click",f),e.push(()=>u.removeEventListener("click",f))}return()=>e.forEach(f=>f())}const Bv=typeof HTMLElement<"u"?HTMLElement:class{};function CC(n,e){const t=n.querySelector(`[data-content="${e}"]`);return t?t instanceof HTMLTemplateElement?t.content.textContent||"":t.textContent||"":""}class pX extends Bv{connectedCallback(){const e=this.dataset.language||"mermaid",t=CC(this,"source"),r=this.querySelector(".rf-diagram__container");!r||!t||(e==="mermaid"?this.renderMermaid(t,r):e==="ascii"&&(r.textContent=t,r.style.fontFamily="var(--rf-font-mono)",r.style.whiteSpace="pre"))}async renderMermaid(e,t){try{const i=(await import("https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs")).default,s=getComputedStyle(t);i.initialize({startOnLoad:!1,theme:"base",themeVariables:{primaryColor:s.getPropertyValue("--rf-color-primary-100").trim()||"#f5f4f1",primaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",primaryBorderColor:s.getPropertyValue("--rf-color-primary-400").trim()||"#bfbab2",secondaryColor:s.getPropertyValue("--rf-color-surface-hover").trim()||"#ecebe8",secondaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",secondaryBorderColor:s.getPropertyValue("--rf-color-border").trim()||"#e2e0dd",tertiaryColor:s.getPropertyValue("--rf-color-info-bg").trim()||"#e8edf4",tertiaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",tertiaryBorderColor:s.getPropertyValue("--rf-color-info-border").trim()||"#c5d2e0",lineColor:s.getPropertyValue("--rf-color-muted").trim()||"#6b6661",textColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",mainBkg:s.getPropertyValue("--rf-color-primary-100").trim()||"#f5f4f1",nodeBorder:s.getPropertyValue("--rf-color-primary-400").trim()||"#bfbab2",clusterBkg:s.getPropertyValue("--rf-color-surface").trim()||"#fbfaf7",clusterBorder:s.getPropertyValue("--rf-color-border").trim()||"#e2e0dd",edgeLabelBackground:s.getPropertyValue("--rf-color-surface").trim()||"#fbfaf7",fontSize:"14px",fontFamily:s.getPropertyValue("--rf-font-sans").trim()||"system-ui, sans-serif"}});const o="mermaid-"+Math.random().toString(36).slice(2),{svg:a}=await i.render(o,e);t.innerHTML=a}catch{}}}const Vu={openstreetmap:{street:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",terrain:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",dark:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",minimal:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"},mapbox:{street:"streets-v12",satellite:"satellite-streets-v12",terrain:"outdoors-v12",dark:"dark-v11",minimal:"light-v11"}},Y0={openstreetmap:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',mapbox:'&copy; <a href="https://www.mapbox.com/">Mapbox</a>'},Tp=new Map;async function Pp(n){if(Tp.has(n))return Tp.get(n);try{const e=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(n)}&format=json&limit=1`,r=await(await fetch(e,{headers:{"User-Agent":"refrakt-md-map-rune/1.0"}})).json();if(r.length>0){const i=[parseFloat(r[0].lat),parseFloat(r[0].lon)];return Tp.set(n,i),i}}catch{}return null}class mX extends Bv{mapInstance=null;initializing=!1;connectedCallback(){const e=this.extractPins();e.length>0&&this.initLeaflet(e)}disconnectedCallback(){this.mapInstance&&(this.mapInstance.remove(),this.mapInstance=null)}extractPins(){const e=[],t=this.querySelector("ol");if(!t)return e;for(const r of t.querySelectorAll('li[data-rune="map-pin"]')){const i=s=>r.querySelector(`[data-name="${s}"]`)?.textContent||"";e.push({name:i("name"),description:i("description"),lat:parseFloat(r.dataset.lat||"")||0,lng:parseFloat(r.dataset.lng||"")||0,address:r.dataset.address||"",url:r.dataset.url||"",group:r.dataset.group||""})}return e}async initLeaflet(e){if(!(this.initializing||this.mapInstance)){this.initializing=!0;try{const t=this.getRootNode(),r=t instanceof ShadowRoot?t:document.head;if(!t.querySelector('link[href*="leaflet@1.9.4"]')){const A=document.createElement("link");A.rel="stylesheet",A.href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",r.appendChild(A)}const s=await import("https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js"),o=this.dataset.center||"",a=this.dataset.zoom||"",l=this.dataset.style||"street",c=this.dataset.provider||"openstreetmap",u=this.dataset.interactive!=="false",f=this.dataset.route==="true",d=this.dataset.cluster==="true",h=this.dataset.apiKey||"",p=(await Promise.all(e.map(async A=>{if(A.lat&&A.lng)return{...A};if(A.address){const x=await Pp(A.address);if(x)return{...A,lat:x[0],lng:x[1]}}if(A.name){const x=await Pp(A.name);if(x)return{...A,lat:x[0],lng:x[1]}}return null}))).filter(A=>A!==null&&A.lat!==0&&A.lng!==0);if(p.length===0)return;let O=this.querySelector(".rf-map__container");O||(O=document.createElement("div"),O.className="rf-map__container",this.prepend(O));const v=O.querySelector(".rf-map__fallback");v&&v.remove();let b;if(o){const A=o.match(/(-?\d+\.?\d*)\s*,\s*(-?\d+\.?\d*)/);A?b=[parseFloat(A[1]),parseFloat(A[2])]:b=await Pp(o)||[p[0].lat,p[0].lng]}else{const A=p.map(k=>k.lat),x=p.map(k=>k.lng);b=[(Math.min(...A)+Math.max(...A))/2,(Math.min(...x)+Math.max(...x))/2]}const _=a?parseInt(a):13,C=s.map(O,{zoomControl:u,dragging:u,scrollWheelZoom:u,doubleClickZoom:u,touchZoom:u}).setView(b,_);if(c==="mapbox"){const A=Vu.mapbox[l]||Vu.mapbox.street;s.tileLayer(`https://api.mapbox.com/styles/v1/mapbox/${A}/tiles/256/{z}/{x}/{y}@2x?access_token=${h}`,{attribution:Y0.mapbox,tileSize:512,zoomOffset:-1}).addTo(C)}else{const A=Vu.openstreetmap[l]||Vu.openstreetmap.street;s.tileLayer(A,{attribution:Y0.openstreetmap}).addTo(C)}const y=new Map;for(const A of p){const x=A.group||"";y.has(x)||y.set(x,[]),y.get(x).push(A)}const w=[],S={};for(const[A,x]of y){const k=x.map(E=>{const T=s.marker([E.lat,E.lng]);let $="";return E.name&&($+=`<strong>${E.name}</strong>`),E.description&&($+=`<br><em>${E.description}</em>`),E.address&&($+=`<br><small>${E.address}</small>`),E.url&&($+=`<br><a href="${E.url}" target="_blank" rel="noopener">More info</a>`),$&&T.bindPopup($),T});if(A){const E=s.layerGroup(k).addTo(C);S[A]=E}else k.forEach(E=>E.addTo(C));w.push(...k)}if(Object.keys(S).length>0&&s.control.layers(null,S).addTo(C),f&&p.length>1){const A=p.map(x=>[x.lat,x.lng]);s.polyline(A,{color:"var(--rf-color-primary, #3b82f6)",weight:3,opacity:.7,dashArray:"8, 8"}).addTo(C)}if(d&&w.length>0)try{const A="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster-src.js",x="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css",k="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css";for(const T of[x,k])if(!t.querySelector(`link[href="${T}"]`)){const $=document.createElement("link");$.rel="stylesheet",$.href=T,r.appendChild($)}await new Promise((T,$)=>{const L=document.createElement("script");L.src=A,L.onload=()=>T(),L.onerror=$,document.head.appendChild(L)});const E=s.markerClusterGroup();w.forEach(T=>{T.remove(),E.addLayer(T)}),C.addLayer(E)}catch{}if(!o&&!a&&p.length>1){const A=s.latLngBounds(p.map(x=>[x.lat,x.lng]));C.fitBounds(A,{padding:[30,30]})}this.mapInstance=C}catch(t){console.warn("Map rune: Leaflet failed to load",t)}finally{this.initializing=!1}}}}class pi{static pages=[];static currentUrl="";static designTokens=null;static theme="auto";static themeListeners=[];static onThemeChange(e){return pi.themeListeners.push(e),()=>{pi.themeListeners=pi.themeListeners.filter(t=>t!==e)}}static setTheme(e){pi.theme=e;for(const t of pi.themeListeners)t(e)}}const Wu={tailwind:['<script src="https://cdn.tailwindcss.com"><\/script>','<script>tailwind.config = { darkMode: "class" }<\/script>'],bootstrap:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">'],bulma:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1/css/bulma.min.css">'],pico:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">']},U0={heading:"sans-serif",body:"sans-serif",mono:"monospace",display:"sans-serif",caption:"sans-serif"};class gX extends Bv{iframe=null;messageHandler=null;themeCleanup=null;ancestorObserver=null;_content="";_framework="";_dependencies="";_label="Sandbox";_heightAttr="auto";_tokens=null;_localScheme=null;_untrusted=!1;_allowJs=!0;_sandboxOrigin="";connectedCallback(){this._content=this.dataset.sourceContent||CC(this,"source"),this._framework=this.dataset.framework||"",this._dependencies=this.dataset.dependencies||"",this._label=this.dataset.label||"Sandbox",this._heightAttr=this.dataset.height||"auto",this._untrusted=this.dataset.securityMode==="untrusted",this._allowJs=this.dataset.allowJs!=="false",this._sandboxOrigin=this.dataset.sandboxOrigin||"",this._localScheme=this.getAttribute("data-color-scheme");const e=this._localScheme?null:this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme"),t=this._localScheme||e||pi.theme,r=this.dataset.designTokens;if(this._tokens=r?JSON.parse(r):pi.designTokens,this.buildIframe(t),!this._localScheme){this.themeCleanup=pi.onThemeChange(s=>{this.closest("[data-color-scheme]")||this.setTheme(s)}),this.ancestorObserver=new MutationObserver(()=>{const o=this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme");this.setTheme(o||pi.theme)});let i=this.parentElement;for(;i;)this.ancestorObserver.observe(i,{attributes:!0,attributeFilter:["data-color-scheme"]}),i=i.parentElement}}disconnectedCallback(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.themeCleanup&&(this.themeCleanup(),this.themeCleanup=null),this.ancestorObserver&&(this.ancestorObserver.disconnect(),this.ancestorObserver=null),this.iframe=null}buildIframe(e){const t=this.iframe?.style.height;this.iframe=document.createElement("iframe");const r=this._untrusted?"allow-scripts":"allow-scripts allow-same-origin";if(this.iframe.setAttribute("sandbox",r),this._untrusted&&this._sandboxOrigin){const s=new URLSearchParams({framework:this._framework,dependencies:this._dependencies,theme:e||"auto",height:this._heightAttr});this.iframe.src=`${this._sandboxOrigin.replace(/\/$/,"")}/render?${s.toString()}`;const o=a=>{a.data?.type==="rf-sandbox-ready"&&a.source===this.iframe?.contentWindow&&(this.iframe.contentWindow.postMessage({type:"rf-sandbox-content",content:this._content,tokens:this._tokens},this._sandboxOrigin),window.removeEventListener("message",o))};window.addEventListener("message",o)}else this.iframe.srcdoc=this.buildSrcdoc(this._content,this._framework,this._dependencies,this._tokens,e);this.iframe.title=this._label,this.iframe.setAttribute("frameborder","0"),this.iframe.loading="lazy",this.iframe.style.cssText=`width: 100%; border: none; height: ${t||(this._heightAttr!=="auto"?parseInt(this._heightAttr)+"px":"150px")};`;const i=this._untrusted?this.buildUntrustedBanner():null;this.messageHandler&&window.removeEventListener("message",this.messageHandler),this._heightAttr==="auto"&&(this.messageHandler=s=>{s.data?.type==="rf-sandbox-resize"&&s.source===this.iframe?.contentWindow&&(this.iframe.style.height=s.data.height+"px")},window.addEventListener("message",this.messageHandler)),i?this.replaceChildren(i,this.iframe):this.replaceChildren(this.iframe)}buildUntrustedBanner(){const e=document.createElement("div");return e.className="rf-sandbox__untrusted-banner",e.setAttribute("role","note"),e.setAttribute("aria-label","Sandboxed user content"),e.textContent="Sandboxed user content — do not enter sensitive information.",e}setTheme(e){this._localScheme||this.buildIframe(e)}buildSrcdoc(e,t,r,i,s){const o=this.buildDependencyTags(t,r,i);s=s||pi.theme;const a=s==="dark"?' class="dark" data-theme="dark" style="color-scheme:dark"':s==="light"?' data-theme="light" style="color-scheme:light"':"",l=s==="dark"?' class="dark"':"",c=s==="dark"||s==="light"?` data-theme="${s}"`:"",u=e.replace(/\s*data-source(?:="[^"]*")?/g,""),f=this.buildCspMetaTag();return`<!DOCTYPE html>
339
+ <html${a}>
340
+ <head>${f?`
341
+ ${f}`:""}
342
+ <meta charset="utf-8">
343
+ <meta name="viewport" content="width=device-width, initial-scale=1">
344
+ ${o}
345
+ <style>
346
+ body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color-scheme: light dark; overflow: hidden; }
347
+ body.dark, body[data-theme="dark"] { color-scheme: dark; }
348
+ </style>
349
+ </head>
350
+ <body${l}${c}>
351
+ ${u}
352
+ <script>
353
+ var ro = new ResizeObserver(function() {
354
+ parent.postMessage({ type: 'rf-sandbox-resize', height: document.body.scrollHeight }, '*');
355
+ });
356
+ ro.observe(document.body);
357
+ <\/script>
358
+ <script>
359
+ // The Tailwind CDN may ignore darkMode:"class" config and generate
360
+ // @media (prefers-color-scheme: dark) rules instead. On desktop this
361
+ // works via parent color-scheme propagation; on mobile it doesn't.
362
+ // Fix: when theme is forced (not auto), rewrite the media-query rules:
363
+ // - dark: duplicate as .dark ancestor selectors, remove originals
364
+ // - light: just remove originals (prevents OS dark from leaking in)
365
+ // - auto: leave untouched (media query follows OS preference)
366
+ var forcedTheme = document.body.getAttribute('data-theme');
367
+ function patchDarkCSS() {
368
+ if (!forcedTheme) return; // auto — leave media queries intact
369
+ try {
370
+ for (var i = 0; i < document.styleSheets.length; i++) {
371
+ var sheet = document.styleSheets[i], rules;
372
+ try { rules = sheet.cssRules; } catch(e) { continue; }
373
+ for (var j = rules.length - 1; j >= 0; j--) {
374
+ var r = rules[j];
375
+ if (r instanceof CSSMediaRule && r.conditionText === '(prefers-color-scheme: dark)') {
376
+ if (forcedTheme === 'dark') {
377
+ for (var k = 0; k < r.cssRules.length; k++) {
378
+ var inner = r.cssRules[k];
379
+ if (inner.cssText) {
380
+ sheet.insertRule('.dark ' + inner.cssText, rules.length);
381
+ }
382
+ }
383
+ }
384
+ // Remove original media query rule — for dark, the .dark
385
+ // ancestor selectors replace it; for light, removing it
386
+ // prevents OS dark preference from leaking in.
387
+ sheet.deleteRule(j);
388
+ }
389
+ }
390
+ }
391
+ } catch(e) {}
392
+ }
393
+ // Run after Tailwind CDN generates CSS (deferred to after current task)
394
+ if (document.readyState === 'loading') {
395
+ document.addEventListener('DOMContentLoaded', function() { setTimeout(patchDarkCSS, 0); });
396
+ } else {
397
+ setTimeout(patchDarkCSS, 0);
398
+ }
399
+ // Also re-patch when Tailwind re-generates (MutationObserver on style tags)
400
+ new MutationObserver(function(mutations) {
401
+ for (var m = 0; m < mutations.length; m++) {
402
+ for (var n = 0; n < mutations[m].addedNodes.length; n++) {
403
+ if (mutations[m].addedNodes[n].nodeName === 'STYLE') { setTimeout(patchDarkCSS, 0); return; }
404
+ }
405
+ }
406
+ }).observe(document.head, { childList: true });
407
+ <\/script>${!s||s==="auto"?`
408
+ <script>if(window.matchMedia('(prefers-color-scheme:dark)').matches){document.body.classList.add('dark');document.body.setAttribute('data-theme','dark')}<\/script>`:""}
409
+ </body>
410
+ </html>`}buildCspMetaTag(){if(!this._untrusted)return"";const e=new Set,t=l=>{try{const c=new URL(l);e.add(`${c.protocol}//${c.host}`)}catch{}};if(this._framework&&Wu[this._framework])for(const l of Wu[this._framework]){const c=l.match(/(?:src|href)="([^"]+)"/);c&&t(c[1])}if(this._dependencies)for(const l of this._dependencies.split(",").map(c=>c.trim()).filter(Boolean))t(l);const r=["'unsafe-inline'",...e].join(" "),i=["data:","https://fonts.gstatic.com",...e].join(" "),s=["data:",...e].join(" ");return`<meta http-equiv="Content-Security-Policy" content="${["default-src 'none'",`script-src ${this._allowJs?["'unsafe-inline'",...e].join(" "):"'none'"}`,`style-src ${r}`,`font-src ${i}`,`img-src ${s}`,"connect-src 'none'","form-action 'none'","base-uri 'none'","frame-src 'none'","object-src 'none'"].join("; ")}">`}buildDependencyTags(e,t,r){const i=[];if(r&&i.push(this.buildDesignTokenTags(r)),e&&Wu[e])if(e==="tailwind"&&r){i.push('<script src="https://cdn.tailwindcss.com"><\\/script>');const s=this.buildTailwindTokenConfig(r);s?i.push(s):i.push('<script>tailwind.config = { darkMode: "class" }<\\/script>')}else i.push(...Wu[e]);if(t)for(const s of t.split(",").map(o=>o.trim()).filter(Boolean))s.endsWith(".css")?i.push(`<link rel="stylesheet" href="${s}">`):i.push(`<script src="${s}"><\\/script>`);return i.join(`
411
+ `)}buildDesignTokenTags(e){const t=[];if(e.fonts&&e.fonts.length>0){const s=`https://fonts.googleapis.com/css2?${e.fonts.map(o=>{const a=o.family.replace(/ /g,"+"),l=o.weights.sort((c,u)=>c-u).join(";");return`family=${a}:wght@${l}`}).join("&")}&display=swap`;t.push('<link rel="preconnect" href="https://fonts.googleapis.com">'),t.push('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>'),t.push(`<link href="${s}" rel="stylesheet">`)}const r=[];if(e.fonts)for(const i of e.fonts){const s=U0[i.role]||"sans-serif";r.push(` --font-${i.role}: '${i.family}', ${s};`)}if(e.colors)for(const i of e.colors){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --color-${s}: ${i.value};`)}if(e.spacing?.unit&&r.push(` --spacing-unit: ${e.spacing.unit};`),e.radii)for(const i of e.radii){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --radius-${s}: ${i.value};`)}if(e.shadows)for(const i of e.shadows){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --shadow-${s}: ${i.value};`)}if(r.length>0){const i=[`:root {
412
+ ${r.join(`
413
+ `)}
414
+ }`];if(e.fonts){const s=e.fonts.find(l=>l.role==="body"),o=e.fonts.find(l=>l.role==="heading"),a=e.fonts.find(l=>l.role==="mono");s&&i.push("body { font-family: var(--font-body); }"),o&&i.push("h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }"),a&&i.push("code, pre, kbd { font-family: var(--font-mono); }")}t.push(`<style>
415
+ ${i.join(`
416
+ `)}
417
+ </style>`)}return t.join(`
418
+ `)}buildTailwindTokenConfig(e){const t={};if(e.fonts){t.fontFamily={};for(const r of e.fonts){const i=U0[r.role]||"sans-serif";t.fontFamily[r.role]=[`'${r.family}'`,i]}}if(e.colors){t.colors={};for(const r of e.colors){const i=r.name.toLowerCase().replace(/\s+/g,"-");t.colors[i]=r.value}}if(e.radii){t.borderRadius={};for(const r of e.radii){const i=r.name.toLowerCase().replace(/\s+/g,"-");t.borderRadius[i]=r.value}}return Object.keys(t).length===0?"":`<script>tailwind.config = { darkMode: "class", theme: { extend: ${JSON.stringify(t)} } }<\/script>`}}function OX(n){const e=[],t=dX(n);t&&e.push(t);const r=hX(n);return r&&e.push(r),()=>e.forEach(i=>i?.())}const vX={accordion:Z0,"accordion-item":Z0,"tab-group":W0,"code-group":W0,reveal:U7,"data-table":G7,form:H7,preview:eX,gallery:rX,juxtapose:oX,nav:OX,drawer:X7};function TC(n=document,e){const t=[];n.querySelectorAll("[data-rune]").forEach(o=>{const a=o.getAttribute("data-rune");if(M7(o))return;const l=vX[a];if(l){const c=l(o);c&&t.push(c)}});const r=N7(n);t.push(r);const i=tX(n);t.push(i);const s=nX(n);return t.push(s),()=>t.forEach(o=>o())}var bX=V('<span class="block-card__drag svelte-15i1bgj" title="Drag to reorder"><svg width="8" height="14" viewBox="0 0 8 14" fill="currentColor"><circle cx="2" cy="2" r="1.2"></circle><circle cx="6" cy="2" r="1.2"></circle><circle cx="2" cy="7" r="1.2"></circle><circle cx="6" cy="7" r="1.2"></circle><circle cx="2" cy="12" r="1.2"></circle><circle cx="6" cy="12" r="1.2"></circle></svg></span>'),yX=V('<div class="block-card__inline-preview svelte-15i1bgj"></div>'),wX=V('<div class="block-card svelte-15i1bgj"><!> <!></div>');function _X(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"communityTags",3,null),s=Pt(e,"communityPostTransforms",3,null),o=Pt(e,"communityStyles",3,null),a=Pt(e,"aggregated",19,()=>({})),l=Pt(e,"dragHandle",3,!0),c=Pt(e,"readOnly",3,!1),u=K(void 0),f=null,d,h=null;function m(S){return S.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function p(S){const A=new Map;for(const[x,k]of Object.entries(S.runes))A.set(m(x),k);return A}function O(S,A,x){let k=S,E=null,T=null;for(;k&&k!==A;)k.hasAttribute("data-name")&&!E&&(E=k),k.hasAttribute("data-rune")&&!T&&(T=k),k=k.parentElement;if(E){const $=E.getAttribute("data-name");let L=E.parentElement,P;for(;L&&L!==A;){const I=L.getAttribute("data-rune");if(I){P=x.get(I);break}L=L.parentElement}const D=P?.editHints?.[$];if(D&&D!=="none")return{type:"section",el:E,dataName:$,editType:D}}return T?{type:"rune",el:T}:null}function v(S,A){let x=null,k=null;const E=75,T=document.createElement("div");T.className="rf-edit-tooltip",S.appendChild(T);function $(P,D){T.textContent=P,T.style.left=`${D.clientX+12}px`,T.style.top=`${D.clientY+12}px`,T.classList.add("rf-tooltip-visible")}function L(){T.classList.remove("rf-tooltip-visible")}S.addEventListener("mouseover",P=>{const D=O(P.target,S,A),I=D?.el??null;if(k!==null&&(clearTimeout(k),k=null),I!==x)if(I&&x&&x.contains(I))x.classList.remove("rf-editable-hover"),x=I,x.classList.add("rf-editable-hover");else if(x&&I&&I.contains(x)){const W=x;k=setTimeout(()=>{x===W&&(W.classList.remove("rf-editable-hover"),x=I,x.classList.add("rf-editable-hover")),k=null},E);return}else x?.classList.remove("rf-editable-hover"),x=I,x?.classList.add("rf-editable-hover");if(D){const W=D.type==="section"?D.dataName:D.el.getAttribute("data-rune")??"";$(W,P)}else L()}),S.addEventListener("mousemove",P=>{T.classList.contains("rf-tooltip-visible")&&(T.style.left=`${P.clientX+12}px`,T.style.top=`${P.clientY+12}px`)}),S.addEventListener("mouseout",P=>{const D=P.relatedTarget;if(x&&(!D||!x.contains(D))){k!==null&&clearTimeout(k);const I=x;k=setTimeout(()=>{I.classList.remove("rf-editable-hover"),x===I&&(x=null),k=null},E),L()}}),S.addEventListener("click",P=>{L();const D=O(P.target,S,A);if(D)if(P.preventDefault(),P.stopPropagation(),D.type==="section"){const{el:I,dataName:W,editType:U}=D,ae=I.getBoundingClientRect(),ce=U==="link"?I.querySelector("a"):null,ne=U==="image"?I.querySelector("img"):null,G=U==="code"?I.querySelector("code"):null,oe=U==="icon"?I.hasAttribute("data-icon")?I:I.querySelector("[data-icon]"):null;e.onsectionclick?.({dataName:W,text:(G??I).textContent?.trim()??"",rect:ae,editType:U,href:ce?.getAttribute("href")??ne?.getAttribute("src")??void 0,iconName:oe?.getAttribute("data-icon")??void 0})}else{const I=P,W=Array.from(S.querySelectorAll("[data-rune]"));let U;W.length>1&&D.el!==W[0]&&(U=W.indexOf(D.el)-1),e.onruneclick?.({x:I.clientX,y:I.clientY,nestedRuneIndex:U})}})}mn(()=>{if(!g(u)||!e.themeConfig)return;f||(f=g(u).attachShadow({mode:"open"}));const S=e.block.source,A=e.themeConfig,x=e.themeCss,k=t()||"",E=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:T,isComponent:$}=SC(S,A,E,i()??void 0,s()??void 0,a(),o()??void 0);if($)f.innerHTML=`<style>
419
+ :host { display: block; padding: 0.75rem 1.5rem; }
420
+ .placeholder { display: flex; align-items: center; gap: 0.5rem; color: #888; font-family: system-ui, sans-serif; font-size: 13px; }
421
+ .placeholder svg { opacity: 0.5; }
422
+ </style>
423
+ <div class="placeholder">
424
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
425
+ <rect x="2" y="2" width="12" height="12" rx="2" />
426
+ <path d="M6 6l4 4M10 6l-4 4" />
427
+ </svg>
428
+ Interactive component — see full preview
429
+ </div>`;else{const L=x.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${L}
430
+ ${k}
431
+ :host { display: block; }
432
+ .rf-preview-wrapper {
433
+ font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
434
+ color: var(--rf-color-text, #1a1a2e);
435
+ line-height: 1.6;
436
+ --rf-content-max: calc(100% - 6rem);
437
+ --rf-content-gutter: 1.5rem;
438
+ }
439
+ .rf-preview-wrapper > article {
440
+ display: grid;
441
+ grid-template-columns:
442
+ [full-start] 1fr
443
+ [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
444
+ [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
445
+ [content-end] minmax(0, var(--rf-wide-inset, 8rem))
446
+ [wide-end] 1fr
447
+ [full-end];
448
+ }
449
+ .rf-preview-wrapper > article > * { grid-column: content; }
450
+ .rf-preview-wrapper > article > [data-width="wide"] { grid-column: wide; }
451
+ .rf-preview-wrapper > article > [data-width="full"],
452
+ .rf-preview-wrapper > article > :is([data-tint], [data-color-scheme]):not([data-width]) {
453
+ grid-column: full;
454
+ padding-inline: max(var(--rf-content-gutter, 1.5rem), calc((100% - var(--rf-content-max)) / 2));
455
+ }
456
+ /* Base: invisible outline + transition (persists on remove for fade-out) */
457
+ [data-name] {
458
+ outline: 2px dashed transparent;
459
+ outline-offset: 4px;
460
+ border-radius: 4px;
461
+ transition: outline-color 150ms ease;
462
+ }
463
+ [data-rune] {
464
+ outline: 2px dashed transparent;
465
+ outline-offset: 4px;
466
+ border-radius: 4px;
467
+ transition: outline-color 150ms ease;
468
+ }
469
+ /* Editable section hover affordance */
470
+ [data-name].rf-editable-hover {
471
+ outline-color: rgba(59, 130, 246, 0.5);
472
+ }
473
+ [data-name].rf-editable-hover,
474
+ [data-name].rf-editable-hover * {
475
+ cursor: text !important;
476
+ }
477
+ /* Rune root hover affordance — opens block edit panel */
478
+ [data-rune].rf-editable-hover {
479
+ outline-color: rgba(59, 130, 246, 0.3);
480
+ }
481
+ [data-rune].rf-editable-hover,
482
+ [data-rune].rf-editable-hover * {
483
+ cursor: pointer !important;
484
+ }
485
+ /* Hover tooltip */
486
+ .rf-edit-tooltip {
487
+ position: fixed;
488
+ padding: 2px 8px;
489
+ font-family: system-ui, -apple-system, sans-serif;
490
+ font-size: 11px;
491
+ font-weight: 600;
492
+ line-height: 1.4;
493
+ color: #fff;
494
+ background: rgba(30, 41, 59, 0.9);
495
+ border-radius: 4px;
496
+ pointer-events: none;
497
+ z-index: 10000;
498
+ white-space: nowrap;
499
+ opacity: 0;
500
+ transition: opacity 120ms ease;
501
+ }
502
+ .rf-edit-tooltip.rf-tooltip-visible {
503
+ opacity: 1;
504
+ }
505
+ </style>
506
+ <div class="rf-preview-wrapper">${T}</div>`;const P=f.querySelector(".rf-preview-wrapper");P&&(h=TC(P),P.addEventListener("click",D=>{D.target.closest("a")&&D.preventDefault()},!0),!c()&&(e.onsectionclick||e.onruneclick)&&e.block.type==="rune"&&v(P,p(A)))}}catch{f&&(f.innerHTML="<style>:host { display: block; padding: 0.75rem 1.5rem; color: #999; font-family: system-ui; font-size: 12px; }</style><em>Preview unavailable</em>")}}},50),()=>{clearTimeout(d),h&&(h(),h=null)}});var b=wX(),_=q(b);{var C=S=>{var A=bX();z(S,A)};ue(_,S=>{l()&&S(C)})}var y=R(_,2);{var w=S=>{var A=yX();fn(A,x=>M(u,x),()=>g(u)),z(S,A)};ue(y,S=>{e.themeConfig&&S(w)})}fe(()=>Et(b,"draggable",l()?"true":"false")),ut("dragstart",b,function(...S){e.ondragstart?.apply(this,S)}),ut("dragover",b,function(...S){e.ondragover?.apply(this,S)}),ut("drop",b,function(...S){e.ondrop?.apply(this,S)}),z(n,b),vt()}var kX=V('<span class="prose-card__drag svelte-1oewfd6" title="Drag to reorder"><svg width="8" height="14" viewBox="0 0 8 14" fill="currentColor"><circle cx="2" cy="2" r="1.2"></circle><circle cx="6" cy="2" r="1.2"></circle><circle cx="2" cy="7" r="1.2"></circle><circle cx="6" cy="7" r="1.2"></circle><circle cx="2" cy="12" r="1.2"></circle><circle cx="6" cy="12" r="1.2"></circle></svg></span>'),xX=V('<div class="prose-card__preview svelte-1oewfd6"></div>'),SX=V('<div class="prose-card svelte-1oewfd6"><!> <!></div>');function AX(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"communityTags",3,null),s=Pt(e,"communityPostTransforms",3,null),o=Pt(e,"communityStyles",3,null),a=Pt(e,"aggregated",19,()=>({})),l=Pt(e,"dragHandle",3,!0),c=Pt(e,"readOnly",3,!1),u=K(void 0),f=null,d,h=null;const m=new Set(["H1","H2","H3","H4","H5","H6","P","PRE","UL","OL","BLOCKQUOTE","HR","TABLE"]);function p(x){return x.startsWith("H")&&x.length===2?`h${x[1]}`:{P:"paragraph",PRE:"code",UL:"list",OL:"list",BLOCKQUOTE:"quote",HR:"divider",TABLE:"table"}[x]??x.toLowerCase()}function O(x,k){let E=x;for(;E&&E!==k;){if(m.has(E.tagName))return E;E=E.parentElement}return null}function v(x){const k=(x.textContent??"").trim(),E=x.tagName;for(let T=0;T<e.block.children.length;T++){const $=e.block.children[T];if(E.startsWith("H")&&E.length===2&&$.type==="heading"){const L=vi($.text??"").trim();if(k===L)return T}else if(E==="P"&&$.type==="paragraph"){const L=vi($.source).trim();if(k===L)return T}else if(E==="PRE"&&$.type==="fence"){const P=(x.querySelector("code")??x).textContent?.trim()??"",D=($.code??"").trim();if(P===D)return T}else if((E==="UL"||E==="OL")&&$.type==="list"){const L=$.source.replace(/^[-*+\d.]+\s*/gm,"").trim();if(k.includes(L.slice(0,30))||L.includes(k.slice(0,30)))return T}else if(E==="BLOCKQUOTE"&&$.type==="quote"){const L=$.source.replace(/^>\s*/gm,"").trim();if(k===L)return T}else if(E==="HR"&&$.type==="hr")return T}return-1}function b(x){let k=null,E=null;const T=75,$=document.createElement("div");$.className="rf-edit-tooltip",x.appendChild($);function L(D,I){$.textContent=D,$.style.left=`${I.clientX+12}px`,$.style.top=`${I.clientY+12}px`,$.classList.add("rf-tooltip-visible")}function P(){$.classList.remove("rf-tooltip-visible")}x.addEventListener("mouseover",D=>{const I=O(D.target,x);E!==null&&(clearTimeout(E),E=null),I===k||(k?.classList.remove("rf-editable-hover"),k=I,k?.classList.add("rf-editable-hover")),I?(x.classList.remove("rf-block-hover"),L(p(I.tagName),D)):e.onblockclick?(x.classList.add("rf-block-hover"),L("prose",D)):P()}),x.addEventListener("mousemove",D=>{$.classList.contains("rf-tooltip-visible")&&($.style.left=`${D.clientX+12}px`,$.style.top=`${D.clientY+12}px`)}),x.addEventListener("mouseout",D=>{const I=D.relatedTarget;if(x.classList.remove("rf-block-hover"),k&&(!I||!k.contains(I))){E!==null&&clearTimeout(E);const W=k;E=setTimeout(()=>{W.classList.remove("rf-editable-hover"),k===W&&(k=null),E=null},T),P()}}),x.addEventListener("click",D=>{P();const I=O(D.target,x);if(!I){e.onblockclick?.({x:D.clientX,y:D.clientY});return}D.preventDefault(),D.stopPropagation();const W=v(I);if(W===-1)return;const U=e.block.children[W],ae=I.getBoundingClientRect();I.tagName;const ce={elementType:U.type,text:(I.textContent??"").trim(),rect:ae,childIndex:W};U.type==="heading"?ce.headingLevel=U.level:U.type==="fence"&&(ce.fenceLanguage=U.language??"",ce.fenceCode=U.code??""),e.onsectionclick?.(ce)})}const _=`
507
+ /* Wrapper: inset border on dead-space hover */
508
+ .rf-preview-wrapper {
509
+ transition: box-shadow 150ms ease;
510
+ cursor: pointer;
511
+ }
512
+ .rf-preview-wrapper.rf-block-hover {
513
+ box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.5);
514
+ border-radius: 4px;
515
+ }
516
+ /* Block-level elements: invisible outline + transition */
517
+ h1, h2, h3, h4, h5, h6, p, pre, ul, ol, blockquote, hr, table {
518
+ outline: 2px dashed transparent;
519
+ outline-offset: 4px;
520
+ border-radius: 4px;
521
+ transition: outline-color 150ms ease;
522
+ }
523
+ /* Hover affordance */
524
+ .rf-editable-hover {
525
+ outline-color: rgba(59, 130, 246, 0.5);
526
+ }
527
+ .rf-editable-hover, .rf-editable-hover * {
528
+ cursor: text !important;
529
+ }
530
+ /* Hover tooltip */
531
+ .rf-edit-tooltip {
532
+ position: fixed;
533
+ padding: 2px 8px;
534
+ font-family: system-ui, -apple-system, sans-serif;
535
+ font-size: 11px;
536
+ font-weight: 600;
537
+ line-height: 1.4;
538
+ color: #fff;
539
+ background: rgba(30, 41, 59, 0.9);
540
+ border-radius: 4px;
541
+ pointer-events: none;
542
+ z-index: 10000;
543
+ white-space: nowrap;
544
+ opacity: 0;
545
+ transition: opacity 120ms ease;
546
+ }
547
+ .rf-edit-tooltip.rf-tooltip-visible {
548
+ opacity: 1;
549
+ }
550
+ `;mn(()=>{if(!g(u)||!e.themeConfig)return;(!f||f.host!==g(u))&&(f=g(u).attachShadow({mode:"open"}));const x=e.block.source,k=e.themeConfig,E=e.themeCss,T=t()||"",$=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:L}=SC(x,k,$,i()??void 0,s()??void 0,a(),o()??void 0),P=E.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${P}
551
+ ${T}
552
+ :host { display: block; }
553
+ .rf-preview-wrapper {
554
+ font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
555
+ color: var(--rf-color-text, #1a1a2e);
556
+ line-height: 1.6;
557
+ --rf-content-max: calc(100% - 6rem);
558
+ --rf-content-gutter: 1.5rem;
559
+ }
560
+ .rf-preview-wrapper > article {
561
+ display: grid;
562
+ grid-template-columns:
563
+ [full-start] 1fr
564
+ [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
565
+ [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
566
+ [content-end] minmax(0, var(--rf-wide-inset, 8rem))
567
+ [wide-end] 1fr
568
+ [full-end];
569
+ }
570
+ .rf-preview-wrapper > article > * { grid-column: content; }
571
+ ${!c()&&e.onsectionclick?_:""}
572
+ </style>
573
+ <div class="rf-preview-wrapper">${L}</div>`;const D=f.querySelector(".rf-preview-wrapper");D&&(h=TC(D),D.addEventListener("click",I=>{I.target.closest("a")&&I.preventDefault()},!0),!c()&&e.onsectionclick&&b(D))}catch{f&&(f.innerHTML="<style>:host { display: block; padding: 0.75rem 1.5rem; color: #999; font-family: system-ui; font-size: 12px; }</style><em>Preview unavailable</em>")}}},50),()=>{clearTimeout(d),h&&(h(),h=null)}});var C=SX(),y=q(C);{var w=x=>{var k=kX();z(x,k)};ue(y,x=>{l()&&x(w)})}var S=R(y,2);{var A=x=>{var k=xX();fn(k,E=>M(u,E),()=>g(u)),z(x,k)};ue(S,x=>{e.themeConfig&&x(A)})}fe(()=>Et(C,"draggable",l()?"true":"false")),ut("dragstart",C,function(...x){e.ondragstart?.apply(this,x)}),ut("dragover",C,function(...x){e.ondragover?.apply(this,x)}),ut("drop",C,function(...x){e.ondrop?.apply(this,x)}),z(n,C),vt()}function Mg(n,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(t=>Mg(n,t));if(e.startsWith("heading:")){const t=parseInt(e.slice(8),10);return n.type==="heading"&&n.headingLevel===t}if(e==="list:ordered")return n.type==="list"&&n.listOrdered===!0;if(e==="list:unordered")return n.type==="list"&&n.listOrdered!==!0;if(e.startsWith("tag:")){const t=e.slice(4);return n.type==="rune"&&n.runeName===t}return e==="blockquote"?n.type==="quote":n.type===e}function Ep(n,e){const t=[];let r=0;for(const i of e){const s={name:i.name,match:i.match,optional:i.optional??!1,greedy:i.greedy??!1,filled:!1,nodes:[],description:i.description,template:i.template,emitTag:i.emitTag};if(i.greedy){for(;r<n.length&&Mg(n[r],i.match);)s.nodes.push(n[r]),r++;s.filled=s.nodes.length>0}else r<n.length&&Mg(n[r],i.match)&&(s.nodes.push(n[r]),s.filled=!0,r++);t.push(s)}return t}function CX(n,e){switch(e.type){case"sequence":return{type:"sequence",fields:Ep(n,e.fields)};case"delimited":{const t=[],r=[[]];for(const i of n)i.type==="hr"?r.push([]):r[r.length-1].push(i);if(e.zones)for(let i=0;i<e.zones.length;i++){const s=e.zones[i],o=r[i]??[];t.push({name:s.name,fields:Ep(o,s.fields)})}else if(e.dynamicZones&&e.zoneModel)for(let i=0;i<r.length;i++)t.push({name:`zone-${i+1}`,fields:Ep(r[i],e.zoneModel.fields)});return{type:"delimited",delimiter:e.delimiter,zones:t}}case"sections":return{type:"sections",description:`Sections split by ${e.sectionHeading}${e.emitTag?`, each emits ${e.emitTag}`:""}`};case"custom":return{type:"custom",description:e.description}}}var TX=V('<span class="rune-attrs__required svelte-ong743">*</span>'),PX=V('<span class="rune-attrs__info svelte-ong743"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="7"></circle><line x1="8" y1="7" x2="8" y2="11"></line><circle cx="8" cy="4.5" r="0.5" fill="currentColor" stroke="none"></circle></svg></span>'),EX=V('<button type="button"> </button>'),$X=ws('<svg class="rune-attrs__check svelte-ong743" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8l3.5 3.5L13 5"></path></svg>'),QX=ws('<svg class="rune-attrs__check svelte-ong743" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8l3.5 3.5L13 5"></path></svg>'),LX=V('<button type="button"><span class="rune-attrs__option-label svelte-ong743"> </span> <!></button>'),MX=V('<div class="rune-attrs__dropdown svelte-ong743"><button type="button"><span class="rune-attrs__option-label rune-attrs__option-label--default svelte-ong743">default</span> <!></button> <!></div>'),DX=V('<div class="rune-attrs__enum svelte-ong743"><button type="button"> </button> <!></div>'),qX=V('<input class="rune-attrs__inline-input svelte-ong743"/>'),RX=V('<button type="button"> </button>'),IX=V('<div class="rune-attrs__row svelte-ong743"><span class="rune-attrs__label svelte-ong743"> <!> <!></span> <!></div>'),NX=V('<span class="rune-attrs__empty svelte-ong743">No attributes</span>'),BX=V('<div class="rune-attrs svelte-ong743"><!> <!></div>');function G0(n,e){Ot(e,!0);const t=new Set(["ratio","align","gap","collapse"]);function r(w,S){const A={...e.attributes};S===""||S===void 0?delete A[w]:A[w]=S,e.onchange(A)}function i(w){return w.replace(/-/g," ").replace(/\b\w/g,S=>S.toUpperCase())}function s(w){if(!t.has(w)||!("layout"in e.runeInfo.attributes))return!1;const S=e.attributes.layout??"";return S!=="split"&&S!=="split-reverse"}let o=me(()=>Object.entries(e.runeInfo.attributes).filter(([w])=>!s(w)).sort(([,w],[,S])=>w.required===S.required?0:w.required?-1:1)),a=K(null),l;function c(w){M(a,g(a)===w?null:w,!0)}function u(w,S){r(w,S),M(a,null)}function f(w){g(a)&&l&&!l.contains(w.target)&&M(a,null)}function d(w){w.key==="Escape"&&g(a)&&(M(a,null),w.stopPropagation())}let h=K(null),m=K("");function p(w,S){M(h,w,!0),M(m,S,!0)}function O(w){r(w,g(m)),M(h,null)}function v(w,S){w.key==="Enter"?O(S):w.key==="Escape"&&(M(h,null),w.stopPropagation())}var b=BX();ut("mousedown",Mo,f),ut("keydown",Mo,d);var _=q(b);$t(_,17,()=>g(o),([w,S])=>w,(w,S)=>{var A=me(()=>Dc(g(S),2));let x=()=>g(A)[0],k=()=>g(A)[1];const E=me(()=>e.attributes[x()]??"");var T=IX(),$=q(T),L=q($),P=R(L);{var D=oe=>{var ie=TX();z(oe,ie)};ue(P,oe=>{k().required&&oe(D)})}var I=R(P,2);{var W=oe=>{var ie=PX();fe(()=>Et(ie,"data-tooltip",k().description)),z(oe,ie)};ue(I,oe=>{k().description&&oe(W)})}var U=R($,2);{var ae=oe=>{var ie=EX();let j;ie.__click=()=>r(x(),g(E)==="true"?"":"true");var te=q(ie);fe(()=>{j=Ze(ie,1,"rune-attrs__value svelte-ong743",null,j,{active:g(E)==="true"}),Te(te,g(E)==="true"?"Yes":"No")}),z(oe,ie)},ce=oe=>{var ie=DX(),j=q(ie);let te;j.__click=()=>c(x());var _e=q(j),Ee=R(j,2);{var Re=ge=>{var Ce=MX(),tt=q(Ce);let rt;tt.__click=()=>u(x(),"");var We=R(q(tt),2);{var Ye=xe=>{var De=$X();z(xe,De)};ue(We,xe=>{g(E)||xe(Ye)})}var ze=R(tt,2);$t(ze,17,()=>k().values,Kt,(xe,De)=>{var Ue=LX();let lt;Ue.__click=()=>u(x(),g(De));var et=q(Ue),Qt=q(et),nn=R(et,2);{var ke=Ft=>{var wt=QX();z(Ft,wt)};ue(nn,Ft=>{g(E)===g(De)&&Ft(ke)})}fe(()=>{lt=Ze(Ue,1,"rune-attrs__option svelte-ong743",null,lt,{selected:g(E)===g(De)}),Te(Qt,g(De))}),z(xe,Ue)}),fe(()=>rt=Ze(tt,1,"rune-attrs__option svelte-ong743",null,rt,{selected:!g(E)})),z(ge,Ce)};ue(Ee,ge=>{g(a)===x()&&ge(Re)})}fe(()=>{te=Ze(j,1,"rune-attrs__value svelte-ong743",null,te,{active:!!g(E),open:g(a)===x()}),Te(_e,g(E)||"default")}),z(oe,ie)},ne=oe=>{var ie=qX();ie.__keydown=j=>v(j,x()),gs(ie),fe(()=>Et(ie,"type",k().type==="Number"?"number":"text")),ut("blur",ie,()=>O(x())),Qn(ie,()=>g(m),j=>M(m,j)),z(oe,ie)},G=oe=>{var ie=RX();let j;ie.__click=()=>p(x(),g(E));var te=q(ie);fe(()=>{j=Ze(ie,1,"rune-attrs__value svelte-ong743",null,j,{active:!!g(E)}),Te(te,g(E)||(k().required?"required":"default"))}),z(oe,ie)};ue(U,oe=>{k().type==="Boolean"?oe(ae):k().values&&k().values.length>0?oe(ce,1):g(h)===x()?oe(ne,2):oe(G,!1)})}fe(oe=>Te(L,`${oe??""} `),[()=>i(x())]),z(w,T)});var C=R(_,2);{var y=w=>{var S=NX();z(w,S)};ue(C,w=>{g(o).length===0&&w(y)})}fn(b,w=>l=w,()=>l),z(n,b),vt()}Gt(["click","keydown"]);var jX=V('<div class="tree-node svelte-16z33d"><button type="button"><span class="tree-node__indicator svelte-16z33d">▾</span> <span class="tree-node__rune-dot svelte-16z33d"></span> <span class="tree-node__label tree-node__label--rune svelte-16z33d"> </span></button></div>'),zX=V('<button type="button"><span class="tree-node__indicator svelte-16z33d"> </span> <span class="tree-node__rune-dot svelte-16z33d"></span> <span class="tree-node__label tree-node__label--rune svelte-16z33d"> </span></button>'),ZX=V('<button type="button"><svg class="tree-node__icon svelte-16z33d" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="tree-node__label tree-node__label--content svelte-16z33d"> </span></button>'),XX=V('<div class="tree-node svelte-16z33d"><!></div> <!>',1),FX=V("<!> <!>",1);function PC(n,e){Ot(e,!0);let t=Pt(e,"isRootActive",3,!1),r=Pt(e,"depth",3,0),i=Pt(e,"pathPrefix",19,()=>[]);function s(d){return d.length!==e.activePath.length?!1:d.every((h,m)=>h===e.activePath[m])}function o(d){return d.length>e.activePath.length?!1:d.every((h,m)=>h===e.activePath[m])}const a={heading:"M3 3v10M13 3v10M3 8h10",paragraph:"M2 4h12M2 8h12M2 12h8",fence:"M5 4L2 8l3 4M11 4l3 4-3 4",list:"M4 4h10M4 8h10M4 12h10M2 4h0M2 8h0M2 12h0",quote:"M4 4h8M4 7h6M1 3v8",hr:"M2 8h12",image:"M2 2h12v12H2zM5 5l-3 7h12l-4-5-2 2.5"};var l=FX(),c=ot(l);{var u=d=>{var h=jX(),m=q(h);let p;m.__click=function(...b){e.onrootclick?.apply(this,b)};var O=R(q(m),4),v=q(O);fe(()=>{p=Ze(m,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,p,{active:t()}),Te(v,e.rootLabel)}),z(d,h)};ue(c,d=>{e.rootLabel&&e.onrootclick&&d(u)})}var f=R(c,2);$t(f,17,()=>e.nodes,Kt,(d,h,m)=>{const p=me(()=>[...i(),m]),O=me(()=>g(h).type==="rune"),v=me(()=>s(g(p))),b=me(()=>o(g(p))&&!g(v)),_=me(()=>g(O)&&!g(h).selfClosing&&g(h).children&&g(h).children.length>0);var C=XX(),y=ot(C),w=q(y);{var S=E=>{var T=zX();let $;T.__click=()=>e.onselect(g(p));var L=q(T),P=q(L),D=R(L,4),I=q(D);fe(()=>{$=Ze(T,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,$,{active:g(v),ancestor:g(b)}),Te(P,g(_)?"▾":"▸"),Te(I,g(h).label)}),z(E,T)},A=E=>{var T=ZX();let $;T.__click=()=>e.onselect(g(p));var L=q(T),P=q(L),D=R(L,2),I=q(D);fe(()=>{$=Ze(T,1,"tree-node__btn tree-node__btn--content svelte-16z33d",null,$,{active:g(v)}),Et(P,"d",a[g(h).type]??"M2 4h12M2 8h12M2 12h8"),Te(I,g(h).label)}),z(E,T)};ue(w,E=>{g(O)?E(S):E(A,!1)})}var x=R(y,2);{var k=E=>{var T=un(),$=ot(T);{let L=me(()=>r()+1);PC($,{get nodes(){return g(h).children},get activePath(){return e.activePath},get onselect(){return e.onselect},get depth(){return g(L)},get pathPrefix(){return g(p)}})}z(E,T)};ue(x,E=>{g(_)&&g(h).children&&E(k)})}fe(()=>Ar(y,`padding-left: ${(r()+(e.rootLabel?1:0))*16}px`)),z(d,C)}),z(n,l),vt()}Gt(["click"]);var VX=V('<button type="button" class="cm-tree__preview-line cm-tree__preview-line--rune svelte-1d9gzqq"><span class="cm-tree__rune-dot svelte-1d9gzqq"></span> </button>'),WX=V('<button type="button" class="cm-tree__preview-line cm-tree__preview-line--clickable svelte-1d9gzqq"> </button>'),YX=V('<div draggable="true"><span class="cm-tree__preview-grip svelte-1d9gzqq" title="Drag to reorder"><svg width="6" height="10" viewBox="0 0 6 10" fill="none"><circle cx="1.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="8.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="8.5" r="1" fill="currentColor"></circle></svg></span> <button type="button" class="cm-tree__preview-text cm-tree__preview-text--clickable svelte-1d9gzqq"> </button> <button type="button" class="cm-tree__preview-remove svelte-1d9gzqq" title="Remove item"><svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),UX=V('<div draggable="true"><span class="cm-tree__preview-grip svelte-1d9gzqq" title="Drag to reorder"><svg width="6" height="10" viewBox="0 0 6 10" fill="none"><circle cx="1.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="8.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="8.5" r="1" fill="currentColor"></circle></svg></span> <button type="button" class="cm-tree__preview-text cm-tree__preview-text--clickable svelte-1d9gzqq"> </button> <button type="button" class="cm-tree__preview-remove svelte-1d9gzqq" title="Remove item"><svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),GX=V('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),HX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),KX=V('<!> <button type="button" class="cm-tree__action cm-tree__action--remove svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button>',1),JX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),eF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),tF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),nF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),rF=V('<button type="button"><svg class="cm-tree__field-icon svelte-1d9gzqq" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="cm-tree__field-name svelte-1d9gzqq"> </span> <!> <span class="cm-tree__field-spacer svelte-1d9gzqq"></span> <!></button> <!>',1),iF=V('<div class="cm-tree__fields svelte-1d9gzqq"></div>'),sF=V('<div class="cm-tree__delimiter svelte-1d9gzqq"><span class="cm-tree__delimiter-line svelte-1d9gzqq"></span></div>'),oF=V('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),aF=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),lF=V('<!> <button type="button" class="cm-tree__action cm-tree__action--remove svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button>',1),cF=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),uF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),fF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),dF=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),hF=V('<button type="button"><svg class="cm-tree__field-icon svelte-1d9gzqq" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="cm-tree__field-name svelte-1d9gzqq"> </span> <!> <span class="cm-tree__field-spacer svelte-1d9gzqq"></span> <!></button> <!>',1),pF=V('<!> <div class="cm-tree__zone svelte-1d9gzqq"><div class="cm-tree__zone-label svelte-1d9gzqq"> </div> <div class="cm-tree__fields svelte-1d9gzqq"></div></div>',1),mF=V('<div class="cm-tree__description svelte-1d9gzqq"> </div>'),gF=V('<div class="cm-tree svelte-1d9gzqq"><div class="cm-tree__root svelte-1d9gzqq"><span class="cm-tree__rune-dot svelte-1d9gzqq"></span> <span class="cm-tree__root-label svelte-1d9gzqq"> </span></div> <!></div>');function OF(n,e){Ot(e,!0);const t=(T,$=Ki,L=Ki,P=Ki)=>{var D=un(),I=ot(D);$t(I,17,$,Kt,(W,U)=>{var ae=un(),ce=ot(ae);{var ne=oe=>{var ie=VX();ie.__click=()=>e.onnavigaterune(L(),g(U).nodeIndex,P());var j=R(q(ie));fe(()=>Te(j,` ${g(U).text??""}`)),z(oe,ie)},G=oe=>{var ie=WX();ie.__click=te=>e.oneditfield(L(),te.currentTarget.getBoundingClientRect(),P(),g(U).nodeIndex);var j=q(ie);fe(()=>Te(j,g(U).text)),z(oe,ie)};ue(ce,oe=>{g(U).type==="rune"&&g(U).nodeIndex!==void 0?oe(ne):oe(G,!1)})}z(W,ae)}),z(T,D)},r=(T,$=Ki,L=Ki,P=Ki)=>{var D=un(),I=ot(D);$t(I,17,$,Kt,(W,U)=>{var ae=YX();let ce;var ne=R(q(ae),2);ne.__click=ie=>{ie.stopPropagation(),e.oneditlistitem(L(),g(U).index,ie.currentTarget.getBoundingClientRect(),P())};var G=q(ne),oe=R(ne,2);oe.__click=()=>e.onremovelistitem(L(),g(U).index,P()),fe(()=>{ce=Ze(ae,1,"cm-tree__preview-item svelte-1d9gzqq",null,ce,{"cm-tree__preview-item--drag-over":g(o)===L()&&g(a)===P()&&g(c)===g(U).index&&g(l)!==g(U).index,"cm-tree__preview-item--dragging":g(o)===L()&&g(a)===P()&&g(l)===g(U).index}),Te(G,g(U).text)}),ut("dragstart",ae,ie=>u(ie,L(),g(U).index,P())),ut("dragover",ae,ie=>f(ie,g(U).index)),ut("drop",ae,ie=>d(ie,g(U).index)),ut("dragend",ae,h),z(W,ae)}),z(T,D)},i=(T,$=Ki,L=Ki,P=Ki)=>{var D=un(),I=ot(D);$t(I,17,$,Kt,(W,U)=>{var ae=UX();let ce;var ne=R(q(ae),2);ne.__click=ie=>{ie.stopPropagation(),e.oneditfield(L(),ie.currentTarget.getBoundingClientRect(),P(),g(U).index)};var G=q(ne),oe=R(ne,2);oe.__click=()=>e.onremovelistitem(L(),g(U).index,P()),fe(()=>{ce=Ze(ae,1,"cm-tree__preview-item svelte-1d9gzqq",null,ce,{"cm-tree__preview-item--drag-over":g(o)===L()&&g(a)===P()&&g(c)===g(U).index&&g(l)!==g(U).index,"cm-tree__preview-item--dragging":g(o)===L()&&g(a)===P()&&g(l)===g(U).index}),Te(G,g(U).text)}),ut("dragstart",ae,ie=>u(ie,L(),g(U).index,P())),ut("dragover",ae,ie=>f(ie,g(U).index)),ut("drop",ae,ie=>d(ie,g(U).index)),ut("dragend",ae,h),z(W,ae)}),z(T,D)};let s=Pt(e,"selectedField",3,null),o=K(null),a=K(void 0),l=K(null),c=K(null);function u(T,$,L,P){M(o,$,!0),M(a,P,!0),M(l,L,!0),M(c,L,!0),T.dataTransfer&&(T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("text/plain",String(L)))}function f(T,$){g(l)!==null&&(T.preventDefault(),T.dataTransfer&&(T.dataTransfer.dropEffect="move"),M(c,$,!0))}function d(T,$){T.preventDefault(),g(l)!==null&&g(l)!==$&&g(o)!==null&&e.onreorderlistitem(g(o),g(l),$,g(a)),M(o,null),M(a,void 0),M(l,null),M(c,null)}function h(){M(o,null),M(a,void 0),M(l,null),M(c,null)}function m(T){return T==="list"||T.startsWith("list:")}function p(T){return T.greedy&&T.filled&&T.match!=="any"}function O(T){return T.nodes.map(($,L)=>{let P;if($.type==="fence")P=$.fenceLanguage?`[${$.fenceLanguage}]`:"[code]";else if($.type==="heading"&&$.headingText)P=$.headingText;else if($.type==="rune"&&$.runeName)P=$.runeName;else if($.type==="image")P="[image]";else{const D=$.source.replace(/\n/g," ").trim();P=D.length>50?D.slice(0,47)+"...":D}return{text:P.length>50?P.slice(0,47)+"...":P,index:L}})}function v(T){switch(T.includes("|")?T.split("|")[0]:T){case"heading":case"heading:1":case"heading:2":case"heading:3":case"heading:4":case"heading:5":case"heading:6":return"M3 3v10M13 3v10M3 8h10";case"paragraph":return"M2 4h12M2 8h12M2 12h8";case"fence":return"M5 4L2 8l3 4M11 4l3 4-3 4";case"list":case"list:ordered":case"list:unordered":return"M4 4h10M4 8h10M4 12h10M2 4h0M2 8h0M2 12h0";case"blockquote":case"quote":return"M4 4h8M4 7h6M1 3v8";case"image":return"M2 2h12v12H2zM5 5l-3 7h12l-4-5-2 2.5";case"any":return"M2 8h12M8 2v12";default:return"M2 4h12M2 8h12M2 12h8"}}function b(T){const $=[];for(const L of T){if(L.type!=="list")continue;const P=Gd(L.source);for(let D=0;D<P.length;D++){const W=P[D].split(`
574
+ `)[0].replace(/^[-*+]\s+|^\d+\.\s+/,"").trim();W&&$.push({text:W.length>50?W.slice(0,47)+"...":W,index:D})}}return $}function _(T){const $=[];for(let L=0;L<T.length;L++){const P=T[L];if(P.type==="heading"&&P.headingText)$.push({text:P.headingText,type:"text",nodeIndex:L});else if(P.type==="paragraph"){const D=P.source.replace(/\n/g," ").trim();$.push({text:D.length>60?D.slice(0,57)+"...":D,type:"text",nodeIndex:L})}else if(P.type==="rune"&&P.runeName)$.push({text:P.runeName,type:"rune",nodeIndex:L});else if(P.type==="fence"){const D=P.fenceLanguage?`[${P.fenceLanguage}]`:"[code]";$.push({text:D,type:"text",nodeIndex:L})}else if(P.type==="list"){const D=P.source.split(`
575
+ `).filter(I=>I.match(/^[-*\d.]\s/)).map(I=>I.replace(/^[-*\d.]+\s+/,"").trim()).filter(Boolean);for(const I of D.slice(0,3))$.push({text:I.length>50?I.slice(0,47)+"...":I,type:"text"});D.length>3&&$.push({text:`... +${D.length-3} more`,type:"text"})}else if(P.type==="image")$.push({text:"[image]",type:"text",nodeIndex:L});else{const D=P.source.replace(/\n/g," ").trim();D&&$.push({text:D.length>50?D.slice(0,47)+"...":D,type:"text",nodeIndex:L})}}return $}var C=gF(),y=q(C),w=R(q(y),2),S=q(w),A=R(y,2);{var x=T=>{var $=iF();$t($,21,()=>e.structure.fields,Kt,(L,P)=>{const D=me(()=>_(g(P).nodes)),I=me(()=>m(g(P).match)?b(g(P).nodes):[]),W=me(()=>p(g(P))?O(g(P)):[]);var U=rF(),ae=ot(U);let ce;ae.__click=()=>e.onfieldselect(g(P).name);var ne=q(ae),G=q(ne),oe=R(ne,2),ie=q(oe),j=R(oe,2);{var te=Ye=>{var ze=GX();z(Ye,ze)};ue(j,Ye=>{!g(P).optional&&!g(P).filled&&Ye(te)})}var _e=R(j,4);{var Ee=Ye=>{var ze=KX(),xe=ot(ze);{var De=et=>{var Qt=HX();Qt.__click=nn=>{nn.stopPropagation(),e.onappenditem(g(P).name)},fe(()=>Et(Qt,"title",`Add item to ${g(P).name??""}`)),z(et,Qt)},Ue=me(()=>m(g(P).match)||p(g(P)));ue(xe,et=>{g(Ue)&&et(De)})}var lt=R(xe,2);lt.__click=et=>{et.stopPropagation(),e.onremovefield(g(P).name)},fe(()=>Et(lt,"title",`Remove ${g(P).name??""}`)),z(Ye,ze)},Re=Ye=>{var ze=JX();ze.__click=xe=>{xe.stopPropagation(),e.onaddfield(g(P).name)},fe(()=>Et(ze,"title",`Add ${g(P).name??""}`)),z(Ye,ze)};ue(_e,Ye=>{g(P).filled?Ye(Ee):Ye(Re,!1)})}var ge=R(ae,2);{var Ce=Ye=>{var ze=eF(),xe=q(ze);r(xe,()=>g(I),()=>g(P).name),z(Ye,ze)},tt=me(()=>g(P).filled&&m(g(P).match)&&g(I).length>0),rt=Ye=>{var ze=tF(),xe=q(ze);i(xe,()=>g(W),()=>g(P).name),z(Ye,ze)},We=Ye=>{var ze=nF(),xe=q(ze);t(xe,()=>g(D),()=>g(P).name),z(Ye,ze)};ue(ge,Ye=>{g(tt)?Ye(Ce):g(P).filled&&g(W).length>0?Ye(rt,1):g(P).filled&&g(D).length>0&&Ye(We,2)})}fe(Ye=>{ce=Ze(ae,1,"cm-tree__field svelte-1d9gzqq",null,ce,{"cm-tree__field--filled":g(P).filled,"cm-tree__field--empty":!g(P).filled,"cm-tree__field--required":!g(P).optional&&!g(P).filled,"cm-tree__field--selected":s()===g(P).name}),Et(G,"d",Ye),Te(ie,g(P).name)},[()=>v(g(P).match)]),z(L,U)}),z(T,$)},k=T=>{var $=un(),L=ot($);$t(L,17,()=>e.structure.zones,Kt,(P,D,I)=>{var W=pF(),U=ot(W);{var ae=ie=>{var j=sF();z(ie,j)};ue(U,ie=>{I>0&&ie(ae)})}var ce=R(U,2),ne=q(ce),G=q(ne),oe=R(ne,2);$t(oe,21,()=>g(D).fields,Kt,(ie,j)=>{const te=me(()=>_(g(j).nodes)),_e=me(()=>m(g(j).match)?b(g(j).nodes):[]),Ee=me(()=>p(g(j))?O(g(j)):[]);var Re=hF(),ge=ot(Re);let Ce;ge.__click=()=>e.onfieldselect(g(j).name,g(D).name);var tt=q(ge),rt=q(tt),We=R(tt,2),Ye=q(We),ze=R(We,2);{var xe=wt=>{var Ht=oF();z(wt,Ht)};ue(ze,wt=>{!g(j).optional&&!g(j).filled&&wt(xe)})}var De=R(ze,4);{var Ue=wt=>{var Ht=lF(),xt=ot(Ht);{var se=Ae=>{var Qe=aF();Qe.__click=St=>{St.stopPropagation(),e.onappenditem(g(j).name,g(D).name)},fe(()=>Et(Qe,"title",`Add item to ${g(j).name??""}`)),z(Ae,Qe)},Oe=me(()=>m(g(j).match)||p(g(j)));ue(xt,Ae=>{g(Oe)&&Ae(se)})}var we=R(xt,2);we.__click=Ae=>{Ae.stopPropagation(),e.onremovefield(g(j).name,g(D).name)},fe(()=>Et(we,"title",`Remove ${g(j).name??""}`)),z(wt,Ht)},lt=wt=>{var Ht=cF();Ht.__click=xt=>{xt.stopPropagation(),e.onaddfield(g(j).name,g(D).name)},fe(()=>Et(Ht,"title",`Add ${g(j).name??""}`)),z(wt,Ht)};ue(De,wt=>{g(j).filled?wt(Ue):wt(lt,!1)})}var et=R(ge,2);{var Qt=wt=>{var Ht=uF(),xt=q(Ht);r(xt,()=>g(_e),()=>g(j).name,()=>g(D).name),z(wt,Ht)},nn=me(()=>g(j).filled&&m(g(j).match)&&g(_e).length>0),ke=wt=>{var Ht=fF(),xt=q(Ht);i(xt,()=>g(Ee),()=>g(j).name,()=>g(D).name),z(wt,Ht)},Ft=wt=>{var Ht=dF(),xt=q(Ht);t(xt,()=>g(te),()=>g(j).name,()=>g(D).name),z(wt,Ht)};ue(et,wt=>{g(nn)?wt(Qt):g(j).filled&&g(Ee).length>0?wt(ke,1):g(j).filled&&g(te).length>0&&wt(Ft,2)})}fe(wt=>{Ce=Ze(ge,1,"cm-tree__field svelte-1d9gzqq",null,Ce,{"cm-tree__field--filled":g(j).filled,"cm-tree__field--empty":!g(j).filled,"cm-tree__field--required":!g(j).optional&&!g(j).filled,"cm-tree__field--selected":s()===`${g(D).name}.${g(j).name}`}),Et(rt,"d",wt),Te(Ye,g(j).name)},[()=>v(g(j).match)]),z(ie,Re)}),fe(()=>Te(G,g(D).name)),z(P,W)}),z(T,$)},E=T=>{var $=mF(),L=q($);fe(()=>Te(L,e.structure.description)),z(T,$)};ue(A,T=>{e.structure.type==="sequence"?T(x):e.structure.type==="delimited"?T(k,1):(e.structure.type==="sections"||e.structure.type==="custom")&&T(E,2)})}fe(()=>Te(S,e.rootLabel)),z(n,C),vt()}Gt(["click"]);function he(n){return new Wa(PO.define(n))}function $s(n){return re(()=>import("./index-gQivGAqF.js"),[]).then(e=>e.sql({dialect:e[n]}))}const EC=[J.of({name:"C",extensions:["c","h","ino"],load(){return re(()=>import("./index-hf5bED1X.js"),[]).then(n=>n.cpp())}}),J.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return re(()=>import("./index-hf5bED1X.js"),[]).then(n=>n.cpp())}}),J.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return $s("Cassandra")}}),J.of({name:"CSS",extensions:["css"],load(){return re(()=>Promise.resolve().then(()=>Iq),void 0).then(n=>n.css())}}),J.of({name:"Go",extensions:["go"],load(){return re(()=>import("./index-DQaYPwWx.js"),[]).then(n=>n.go())}}),J.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return re(()=>Promise.resolve().then(()=>ER),void 0).then(n=>n.html())}}),J.of({name:"Java",extensions:["java"],load(){return re(()=>import("./index-CpCVGVuH.js"),[]).then(n=>n.java())}}),J.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return re(()=>Promise.resolve().then(()=>Tu),void 0).then(n=>n.javascript())}}),J.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return re(()=>import("./index-BAY04uqY.js"),[]).then(n=>n.jinja())}}),J.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return re(()=>import("./index-B_Lr82aC.js"),[]).then(n=>n.json())}}),J.of({name:"JSX",extensions:["jsx"],load(){return re(()=>Promise.resolve().then(()=>Tu),void 0).then(n=>n.javascript({jsx:!0}))}}),J.of({name:"LESS",extensions:["less"],load(){return re(()=>import("./index-BEOY_cjs.js"),[]).then(n=>n.less())}}),J.of({name:"Liquid",extensions:["liquid"],load(){return re(()=>import("./index-DZ2eFRxY.js"),[]).then(n=>n.liquid())}}),J.of({name:"MariaDB SQL",load(){return $s("MariaSQL")}}),J.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return re(()=>Promise.resolve().then(()=>jR),void 0).then(n=>n.markdown())}}),J.of({name:"MS SQL",load(){return $s("MSSQL")}}),J.of({name:"MySQL",load(){return $s("MySQL")}}),J.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return re(()=>import("./index-CmdMXma6.js"),[]).then(n=>n.php())}}),J.of({name:"PLSQL",extensions:["pls"],load(){return $s("PLSQL")}}),J.of({name:"PostgreSQL",load(){return $s("PostgreSQL")}}),J.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return re(()=>import("./index-DdzLWKba.js"),[]).then(n=>n.python())}}),J.of({name:"Rust",extensions:["rs"],load(){return re(()=>import("./index-CV1B456q.js"),[]).then(n=>n.rust())}}),J.of({name:"Sass",extensions:["sass"],load(){return re(()=>import("./index-B5s-XDrK.js"),[]).then(n=>n.sass({indented:!0}))}}),J.of({name:"SCSS",extensions:["scss"],load(){return re(()=>import("./index-B5s-XDrK.js"),[]).then(n=>n.sass())}}),J.of({name:"SQL",extensions:["sql"],load(){return $s("StandardSQL")}}),J.of({name:"SQLite",load(){return $s("SQLite")}}),J.of({name:"TSX",extensions:["tsx"],load(){return re(()=>Promise.resolve().then(()=>Tu),void 0).then(n=>n.javascript({jsx:!0,typescript:!0}))}}),J.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return re(()=>Promise.resolve().then(()=>Tu),void 0).then(n=>n.javascript({typescript:!0}))}}),J.of({name:"WebAssembly",extensions:["wat","wast"],load(){return re(()=>import("./index-BYYoJXJT.js"),[]).then(n=>n.wast())}}),J.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return re(()=>import("./index-BntBFwWW.js"),[]).then(n=>n.xml())}}),J.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return re(()=>import("./index-DK-Oqolc.js"),[]).then(n=>n.yaml())}}),J.of({name:"APL",extensions:["dyalog","apl"],load(){return re(()=>import("./apl-B4CMkyY2.js"),[]).then(n=>he(n.apl))}}),J.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return re(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(n=>he(n.asciiArmor))}}),J.of({name:"ASN.1",extensions:["asn","asn1"],load(){return re(()=>import("./asn1-EdZsLKOL.js"),[]).then(n=>he(n.asn1({})))}}),J.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return re(()=>import("./asterisk-B-8jnY81.js"),[]).then(n=>he(n.asterisk))}}),J.of({name:"Brainfuck",extensions:["b","bf"],load(){return re(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(n=>he(n.brainfuck))}}),J.of({name:"Cobol",extensions:["cob","cpy"],load(){return re(()=>import("./cobol-CWcv1MsR.js"),[]).then(n=>he(n.cobol))}}),J.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.csharp))}}),J.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),J.of({name:"ClojureScript",extensions:["cljs"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),J.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return re(()=>import("./css-BnMrqG3P.js"),[]).then(n=>he(n.gss))}}),J.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return re(()=>import("./cmake-BQqOBYOt.js"),[]).then(n=>he(n.cmake))}}),J.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return re(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(n=>he(n.coffeeScript))}}),J.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return re(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(n=>he(n.commonLisp))}}),J.of({name:"Cypher",extensions:["cyp","cypher"],load(){return re(()=>import("./cypher-C_CwsFkJ.js"),[]).then(n=>he(n.cypher))}}),J.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return re(()=>import("./python-BuPzkPfP.js"),[]).then(n=>he(n.cython))}}),J.of({name:"Crystal",extensions:["cr"],load(){return re(()=>import("./crystal-SjHAIU92.js"),[]).then(n=>he(n.crystal))}}),J.of({name:"D",extensions:["d"],load(){return re(()=>import("./d-pRatUO7H.js"),[]).then(n=>he(n.d))}}),J.of({name:"Dart",extensions:["dart"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.dart))}}),J.of({name:"diff",extensions:["diff","patch"],load(){return re(()=>import("./diff-DbItnlRl.js"),[]).then(n=>he(n.diff))}}),J.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return re(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(n=>he(n.dockerFile))}}),J.of({name:"DTD",extensions:["dtd"],load(){return re(()=>import("./dtd-DF_7sFjM.js"),[]).then(n=>he(n.dtd))}}),J.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return re(()=>import("./dylan-DwRh75JA.js"),[]).then(n=>he(n.dylan))}}),J.of({name:"EBNF",load(){return re(()=>import("./ebnf-CDyGwa7X.js"),[]).then(n=>he(n.ebnf))}}),J.of({name:"ECL",extensions:["ecl"],load(){return re(()=>import("./ecl-Cabwm37j.js"),[]).then(n=>he(n.ecl))}}),J.of({name:"edn",extensions:["edn"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),J.of({name:"Eiffel",extensions:["e"],load(){return re(()=>import("./eiffel-CnydiIhH.js"),[]).then(n=>he(n.eiffel))}}),J.of({name:"Elm",extensions:["elm"],load(){return re(()=>import("./elm-vLlmbW-K.js"),[]).then(n=>he(n.elm))}}),J.of({name:"Erlang",extensions:["erl"],load(){return re(()=>import("./erlang-BNw1qcRV.js"),[]).then(n=>he(n.erlang))}}),J.of({name:"Esper",load(){return re(()=>import("./sql-D0XecflT.js"),[]).then(n=>he(n.esper))}}),J.of({name:"Factor",extensions:["factor"],load(){return re(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(n=>he(n.factor))}}),J.of({name:"FCL",load(){return re(()=>import("./fcl-Kvtd6kyn.js"),[]).then(n=>he(n.fcl))}}),J.of({name:"Forth",extensions:["forth","fth","4th"],load(){return re(()=>import("./forth-Ffai-XNe.js"),[]).then(n=>he(n.forth))}}),J.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return re(()=>import("./fortran-DYz_wnZ1.js"),[]).then(n=>he(n.fortran))}}),J.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.fSharp))}}),J.of({name:"Gas",extensions:["s"],load(){return re(()=>import("./gas-Bneqetm1.js"),[]).then(n=>he(n.gas))}}),J.of({name:"Gherkin",extensions:["feature"],load(){return re(()=>import("./gherkin-heZmZLOM.js"),[]).then(n=>he(n.gherkin))}}),J.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return re(()=>import("./groovy-D9Dt4D0W.js"),[]).then(n=>he(n.groovy))}}),J.of({name:"Haskell",extensions:["hs"],load(){return re(()=>import("./haskell-Cw1EW3IL.js"),[]).then(n=>he(n.haskell))}}),J.of({name:"Haxe",extensions:["hx"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>he(n.haxe))}}),J.of({name:"HXML",extensions:["hxml"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>he(n.hxml))}}),J.of({name:"HTTP",load(){return re(()=>import("./http-DBlCnlav.js"),[]).then(n=>he(n.http))}}),J.of({name:"IDL",extensions:["pro"],load(){return re(()=>import("./idl-BEugSyMb.js"),[]).then(n=>he(n.idl))}}),J.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return re(()=>import("./javascript-iXu5QeM3.js"),[]).then(n=>he(n.jsonld))}}),J.of({name:"Julia",extensions:["jl"],load(){return re(()=>import("./julia-DuME0IfC.js"),[]).then(n=>he(n.julia))}}),J.of({name:"Kotlin",extensions:["kt","kts"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.kotlin))}}),J.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return re(()=>import("./livescript-BwQOo05w.js"),[]).then(n=>he(n.liveScript))}}),J.of({name:"Lua",extensions:["lua"],load(){return re(()=>import("./lua-BgMRiT3U.js"),[]).then(n=>he(n.lua))}}),J.of({name:"mIRC",extensions:["mrc"],load(){return re(()=>import("./mirc-CjQqDB4T.js"),[]).then(n=>he(n.mirc))}}),J.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return re(()=>import("./mathematica-DTrFuWx2.js"),[]).then(n=>he(n.mathematica))}}),J.of({name:"Modelica",extensions:["mo"],load(){return re(()=>import("./modelica-Dc1JOy9r.js"),[]).then(n=>he(n.modelica))}}),J.of({name:"MUMPS",extensions:["mps"],load(){return re(()=>import("./mumps-BT43cFF4.js"),[]).then(n=>he(n.mumps))}}),J.of({name:"Mbox",extensions:["mbox"],load(){return re(()=>import("./mbox-CNhZ1qSd.js"),[]).then(n=>he(n.mbox))}}),J.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return re(()=>import("./nginx-DdIZxoE0.js"),[]).then(n=>he(n.nginx))}}),J.of({name:"NSIS",extensions:["nsh","nsi"],load(){return re(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([3,1])).then(n=>he(n.nsis))}}),J.of({name:"NTriples",extensions:["nt","nq"],load(){return re(()=>import("./ntriples-BfvgReVJ.js"),[]).then(n=>he(n.ntriples))}}),J.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.objectiveC))}}),J.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.objectiveCpp))}}),J.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.oCaml))}}),J.of({name:"Octave",extensions:["m"],load(){return re(()=>import("./octave-Ck1zUtKM.js"),[]).then(n=>he(n.octave))}}),J.of({name:"Oz",extensions:["oz"],load(){return re(()=>import("./oz-BzwKVEFT.js"),[]).then(n=>he(n.oz))}}),J.of({name:"Pascal",extensions:["p","pas"],load(){return re(()=>import("./pascal--L3eBynH.js"),[]).then(n=>he(n.pascal))}}),J.of({name:"Perl",extensions:["pl","pm"],load(){return re(()=>import("./perl-CdXCOZ3F.js"),[]).then(n=>he(n.perl))}}),J.of({name:"Pig",extensions:["pig"],load(){return re(()=>import("./pig-CevX1Tat.js"),[]).then(n=>he(n.pig))}}),J.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return re(()=>import("./powershell-CFHJl5sT.js"),[]).then(n=>he(n.powerShell))}}),J.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return re(()=>import("./properties-C78fOPTZ.js"),[]).then(n=>he(n.properties))}}),J.of({name:"ProtoBuf",extensions:["proto"],load(){return re(()=>import("./protobuf-ChK-085T.js"),[]).then(n=>he(n.protobuf))}}),J.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return re(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([4,5])).then(n=>he(n.pug))}}),J.of({name:"Puppet",extensions:["pp"],load(){return re(()=>import("./puppet-DMA9R1ak.js"),[]).then(n=>he(n.puppet))}}),J.of({name:"Q",extensions:["q"],load(){return re(()=>import("./q-pXgVlZs6.js"),[]).then(n=>he(n.q))}}),J.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return re(()=>import("./r-B6wPVr8A.js"),[]).then(n=>he(n.r))}}),J.of({name:"RPM Changes",load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>he(n.rpmChanges))}}),J.of({name:"RPM Spec",extensions:["spec"],load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>he(n.rpmSpec))}}),J.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return re(()=>import("./ruby-B2Rjki9n.js"),[]).then(n=>he(n.ruby))}}),J.of({name:"SAS",extensions:["sas"],load(){return re(()=>import("./sas-B4kiWyti.js"),[]).then(n=>he(n.sas))}}),J.of({name:"Scala",extensions:["scala"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.scala))}}),J.of({name:"Scheme",extensions:["scm","ss"],load(){return re(()=>import("./scheme-C41bIUwD.js"),[]).then(n=>he(n.scheme))}}),J.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return re(()=>import("./shell-CjFT_Tl9.js"),[]).then(n=>he(n.shell))}}),J.of({name:"Sieve",extensions:["siv","sieve"],load(){return re(()=>import("./sieve-C3Gn_uJK.js"),[]).then(n=>he(n.sieve))}}),J.of({name:"Smalltalk",extensions:["st"],load(){return re(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(n=>he(n.smalltalk))}}),J.of({name:"Solr",load(){return re(()=>import("./solr-DehyRSwq.js"),[]).then(n=>he(n.solr))}}),J.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.sml))}}),J.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return re(()=>import("./sparql-DkYu6x3z.js"),[]).then(n=>he(n.sparql))}}),J.of({name:"Spreadsheet",alias:["excel","formula"],load(){return re(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(n=>he(n.spreadsheet))}}),J.of({name:"Squirrel",extensions:["nut"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.squirrel))}}),J.of({name:"Stylus",extensions:["styl"],load(){return re(()=>import("./stylus-B533Al4x.js"),[]).then(n=>he(n.stylus))}}),J.of({name:"Swift",extensions:["swift"],load(){return re(()=>import("./swift-BzpIVaGY.js"),[]).then(n=>he(n.swift))}}),J.of({name:"sTeX",load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>he(n.stex))}}),J.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>he(n.stex))}}),J.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>he(n.verilog))}}),J.of({name:"Tcl",extensions:["tcl"],load(){return re(()=>import("./tcl-DVfN8rqt.js"),[]).then(n=>he(n.tcl))}}),J.of({name:"Textile",extensions:["textile"],load(){return re(()=>import("./textile-CnDTJFAw.js"),[]).then(n=>he(n.textile))}}),J.of({name:"TiddlyWiki",load(){return re(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(n=>he(n.tiddlyWiki))}}),J.of({name:"Tiki wiki",load(){return re(()=>import("./tiki-DGYXhP31.js"),[]).then(n=>he(n.tiki))}}),J.of({name:"TOML",extensions:["toml"],load(){return re(()=>import("./toml-Bm5Em-hy.js"),[]).then(n=>he(n.toml))}}),J.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return re(()=>import("./troff-wAsdV37c.js"),[]).then(n=>he(n.troff))}}),J.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return re(()=>import("./ttcn-CfJYG6tj.js"),[]).then(n=>he(n.ttcn))}}),J.of({name:"TTCN_CFG",extensions:["cfg"],load(){return re(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(n=>he(n.ttcnCfg))}}),J.of({name:"Turtle",extensions:["ttl"],load(){return re(()=>import("./turtle-B1tBg_DP.js"),[]).then(n=>he(n.turtle))}}),J.of({name:"Web IDL",extensions:["webidl"],load(){return re(()=>import("./webidl-ZXfAyPTL.js"),[]).then(n=>he(n.webIDL))}}),J.of({name:"VB.NET",extensions:["vb"],load(){return re(()=>import("./vb-CmGdzxic.js"),[]).then(n=>he(n.vb))}}),J.of({name:"VBScript",extensions:["vbs"],load(){return re(()=>import("./vbscript-BuJXcnF6.js"),[]).then(n=>he(n.vbScript))}}),J.of({name:"Velocity",extensions:["vtl"],load(){return re(()=>import("./velocity-D8B20fx6.js"),[]).then(n=>he(n.velocity))}}),J.of({name:"Verilog",extensions:["v"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>he(n.verilog))}}),J.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return re(()=>import("./vhdl-lSbBsy5d.js"),[]).then(n=>he(n.vhdl))}}),J.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return re(()=>import("./xquery-DzFWVndE.js"),[]).then(n=>he(n.xQuery))}}),J.of({name:"Yacas",extensions:["ys"],load(){return re(()=>import("./yacas-BJ4BC0dw.js"),[]).then(n=>he(n.yacas))}}),J.of({name:"Z80",extensions:["z80"],load(){return re(()=>import("./z80-Hz9HOZM7.js"),[]).then(n=>he(n.z80))}}),J.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.mscgen))}}),J.of({name:"Xù",extensions:["xu"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.xu))}}),J.of({name:"MsGenny",extensions:["msgenny"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.msgenny))}}),J.of({name:"Vue",extensions:["vue"],load(){return re(()=>import("./index-CN-NNXOI.js"),[]).then(n=>n.vue())}}),J.of({name:"Angular Template",load(){return re(()=>import("./index-C_qRdog9.js"),[]).then(n=>n.angular())}})];var vF=V('<div class="inline-editor svelte-1ewoogg"></div>');function po(n,e){Ot(e,!0);let t,r=K(void 0),i="";const s=new ps,o=new ps,a=new ps,l=Pe.theme({"&":{color:"#1a1a2e",fontSize:"13px",height:"auto"},".cm-scroller":{overflow:"visible",fontFamily:"'SF Mono', 'Fira Code', ui-monospace, monospace",lineHeight:"1.6"},".cm-content":{padding:"0.75rem",caretColor:"#1e293b",minHeight:"3rem"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},"&.cm-focused":{outline:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-tooltip.cm-tooltip-autocomplete":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",backgroundColor:"#ffffff",overflow:"hidden"},".cm-tooltip.cm-tooltip-autocomplete ul":{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",maxHeight:"280px"},".cm-tooltip.cm-tooltip-autocomplete ul li":{padding:"4px 8px",borderBottom:"1px solid #f1f5f9"},".cm-tooltip.cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:"#f0f9ff",color:"#0369a1"},".cm-tooltip.cm-completionInfo":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)",backgroundColor:"#ffffff",padding:"6px 10px",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",color:"#475569",maxWidth:"300px"},".cm-completionDetail":{color:"#94a3b8",fontStyle:"normal",marginLeft:"0.5em"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1});mn(()=>{if(!t)return;const u=!!Sr(()=>e.language)?.trim(),f=Mt.create({doc:Sr(()=>e.content),extensions:[s.of(Ka()),o.of(u?[]:Ac()),a.of(u?[]:Dm({override:[Vm(e.runes),Wm(e.runes,e.aggregated)],icons:!1})),MO(),l,mc(JS),mc(S2),FS(),Yo.of([...RO,...DO,...KS,{key:"Mod-/",run:h=>(Hl(h),!0)}]),Pe.updateListener.of(h=>{h.docChanged&&(i=h.state.doc.toString(),e.onchange(i))}),Pe.lineWrapping]}),d=new Pe({state:f,parent:t});return M(r,d,!0),()=>{M(r,void 0),d.destroy()}}),mn(()=>{const u=g(r);if(!u)return;const f=e.language?.trim();if(!f){u.dispatch({effects:[s.reconfigure(Ka()),o.reconfigure(Ac()),a.reconfigure(Dm({override:[Vm(e.runes),Wm(e.runes,e.aggregated)],icons:!1}))]});return}u.dispatch({effects:[o.reconfigure([]),a.reconfigure([])]});const d=J.matchLanguageName(EC,f,!0);d&&d.load().then(h=>{g(r)===u&&u.dispatch({effects:s.reconfigure(h)})})}),mn(()=>{const u=e.content,f=g(r);if(!f)return;const d=f.state.doc.toString();if(u!==d){if(i&&d===i){i="";return}i="",f.dispatch({changes:{from:0,to:f.state.doc.length,insert:u}})}});var c=vF();fn(c,u=>t=u,()=>t),z(n,c),vt()}var bF=V('<span class="edit-panel__category svelte-1t8cclf"> </span>'),yF=ws('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="2"></circle><path d="M6.7 1.6h2.6l.4 1.8.8.4 1.7-.7 1.8 1.8-.7 1.7.4.8 1.8.4v2.6l-1.8.4-.4.8.7 1.7-1.8 1.8-1.7-.7-.8.4-.4 1.8H6.7l-.4-1.8-.8-.4-1.7.7-1.8-1.8.7-1.7-.4-.8-1.8-.4V6.7l1.8-.4.4-.8-.7-1.7 1.8-1.8 1.7.7.8-.4z"></path></svg> Settings',1),wF=ws('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h4M2 7h4M6 11h4M6 15h4M4 3v8M8 11v4"></path></svg> Structure',1),_F=ws('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4h12M2 8h12M2 12h8"></path></svg> Content',1),kF=V('<button type="button"><!></button>'),xF=V('<div class="edit-panel__tabs svelte-1t8cclf"></div>'),SF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Level</span> <select class="edit-panel__select svelte-1t8cclf"><option>H1</option><option>H2</option><option>H3</option><option>H4</option><option>H5</option><option>H6</option></select></label> <label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Text</span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label></div>'),AF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Language</span> <input class="edit-panel__input svelte-1t8cclf" type="text" placeholder="e.g. js, python, html"/></label></div>'),CF=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">No settings for this element</span></div>'),TF=V('<label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf"> </span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label>'),PF=V('<div class="edit-panel__unknown svelte-1t8cclf"><span class="edit-panel__unknown-label svelte-1t8cclf"> </span> <!></div>'),EF=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),$F=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),QF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),LF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),MF=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">Edit heading text in Settings</span></div>'),DF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Source</span> <textarea class="edit-panel__textarea svelte-1t8cclf"></textarea></label></div>'),qF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),RF=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">This rune has no inner content</span></div>'),IF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),NF=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),BF=V("<!> <!> <!>",1),jF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Level</span> <select class="edit-panel__select svelte-1t8cclf"><option>H1</option><option>H2</option><option>H3</option><option>H4</option><option>H5</option><option>H6</option></select></label> <label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Text</span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label></div>'),zF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Language</span> <input class="edit-panel__input svelte-1t8cclf" type="text" placeholder="e.g. js, python, html"/></label></div> <div class="edit-panel__content-editor svelte-1t8cclf"><!></div>',1),ZF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),XF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Source</span> <textarea class="edit-panel__textarea svelte-1t8cclf"></textarea></label></div>'),FF=V('<div class="edit-panel__body svelte-1t8cclf"><!></div>'),VF=V('<div class="edit-panel svelte-1t8cclf"><div class="edit-panel__top svelte-1t8cclf"><div class="edit-panel__header svelte-1t8cclf"><span class="edit-panel__type svelte-1t8cclf"> </span> <!> <div class="edit-panel__spacer svelte-1t8cclf"></div> <button class="edit-panel__btn edit-panel__btn--danger svelte-1t8cclf" title="Remove block"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="2" x2="10" y2="2"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button> <button class="edit-panel__btn svelte-1t8cclf" title="Close panel">&times;</button></div> <!></div> <!></div>');function WF(n,e){Ot(e,!0);let t=Pt(e,"aggregated",19,()=>({})),r=Pt(e,"initialRuneIndex",3,null),i=me(()=>hv(e.block)),s=me(()=>e.block.type==="rune"?e.runeMap.get(e.block.runeName)??null:null),o=me(()=>g(s)?.category??null),a=K(tn([])),l=me(()=>{if(e.block.type!=="rune")return[];const se=e.block;return se.selfClosing||!se.innerContent.trim()?[]:fv(se.innerContent)}),c=me(()=>g(l).some(se=>se.type==="rune")),u=me(()=>g(v)?.type==="rune"&&g(b)?g(b):g(s)),f=me(()=>g(v)?.type==="rune"&&g(v).children?g(v).children:g(l)),d=me(()=>g(u)?.contentModel!=null),h=me(()=>g(u)?.contentModel?CX(g(f),g(u).contentModel):null),m=K(null);function p(se,Oe){let we=0;function Ae(Qe,St){for(let pt=0;pt<Qe.length;pt++)if(Qe[pt].type==="rune"){if(we===Oe)return[...St,pt];we++;const Ke=Ae(Qe[pt].children??[],[...St,pt]);if(Ke)return Ke}return null}return Ae(se,[])}mn(()=>{if(r()!=null&&g(l).length>0){const se=p(g(l),r());se&&M(a,se,!0)}});function O(se,Oe){if(Oe.length===0)return null;const[we,...Ae]=Oe,Qe=se[we];return Qe?Ae.length===0?Qe:O(Qe.children??[],Ae):null}let v=me(()=>O(g(l),g(a))),b=me(()=>g(v)?.runeName?e.runeMap.get(g(v).runeName)??null:null),_=me(()=>g(v)!=null&&g(v).type!=="rune"),C=me(()=>g(v)?g(v).type==="rune"?g(v).runeName??g(i):g(v).type:g(i)),y=K("settings"),w=me(()=>{if(e.block.type!=="rune")return[];const se=e.block,Oe=["settings"];return(g(d)||!g(v)&&g(c))&&Oe.push("structure"),se.selfClosing||Oe.push("content"),Oe});mn(()=>{g(y)==="structure"&&!g(w).includes("structure")&&M(y,"settings")});function S(se){M(a,se,!0);const Oe=O(g(l),se);Oe&&Oe.type!=="rune"&&M(y,"content")}function A(){M(a,[],!0)}function x(se,Oe){M(m,Oe?`${Oe}.${se}`:se,!0)}function k(se){const Oe=e.block;if(g(v)?.type==="rune"&&g(v).innerContent!==void 0){const we=se(g(v).innerContent);if(we===g(v).innerContent)return;const Ae=ff(g(v).attributes??{}),Qe=we.trim(),St=Qe?`{% ${g(v).runeName}${Ae} %}
576
+ ${Qe}
577
+ {% /${g(v).runeName} %}`:`{% ${g(v).runeName}${Ae} %}
578
+
579
+ {% /${g(v).runeName} %}`,pt=$u(Oe.innerContent,g(v).source,St),Ke={...Oe,innerContent:pt,source:""};Ke.source=Hn(Ke),e.onupdate(Ke)}else{const we=se(Oe.innerContent);if(we===Oe.innerContent)return;const Ae={...Oe,innerContent:we,source:""};Ae.source=Hn(Ae),e.onupdate(Ae)}}function E(se,Oe){g(h)&&k(we=>CI(we,g(h),se,Oe))}function T(se,Oe){g(h)&&k(we=>TI(we,g(h),se,Oe))}function $(se,Oe){return g(h)?g(h).type==="sequence"?g(h).fields.find(we=>we.name===se)??null:g(h).type==="delimited"&&Oe?g(h).zones.find(Ae=>Ae.name===Oe)?.fields.find(Ae=>Ae.name===se)??null:null:null}function L(se){return se.greedy&&se.match!=="any"}function P(se,Oe){if(!g(h))return;const we=$(se,Oe);we&&L(we)?k(Ae=>QI(Ae,g(h),se,Oe)):k(Ae=>PI(Ae,g(h),se,Oe))}function D(se,Oe,we){if(!g(h))return;const Ae=$(se,we);Ae&&L(Ae)?k(Qe=>LI(Qe,g(h),se,Oe,we)):k(Qe=>EI(Qe,g(h),se,Oe,we))}function I(se,Oe,we,Ae){if(!g(h))return;const Qe=$(se,Ae);Qe&&L(Qe)?k(St=>MI(St,g(h),se,Oe,we,Ae)):k(St=>$I(St,g(h),se,Oe,we,Ae))}function W(se,Oe,we,Ae){if(!g(h))return;let Qe;if(g(h).type==="sequence"?Qe=g(h).fields.find(Vt=>Vt.name===se):g(h).type==="delimited"&&we&&(Qe=g(h).zones.find(rn=>rn.name===we)?.fields.find(rn=>rn.name===se)),!Qe||!Qe.filled)return;const St=Ae??0;if(St>=Qe.nodes.length||Ae===void 0&&Qe.nodes.length!==1)return;const pt=Qe.nodes[St],Ke=pt.source;if(pt.type==="fence"&&e.oneditcode){const Vt=pt.fenceCode??"",rn=pt.fenceLanguage??"",_t=Ke.split(`
580
+ `)[0],Jt=_t.match(/^(`{3,}|~{3,})/),Nn=Jt?Jt[1]:"```",Gn={source:Ke,code:Vt,language:rn,opener:_t,delimiter:Nn};e.oneditcode(Vt,rn,Oe,Gn);return}if(!e.oneditfield)return;const At=Ke.trim();let bt="",dt=At;const Ct=At.match(/^(#{1,6}\s+)(.*)/);if(Ct)bt=Ct[1],dt=Ct[2];else{const Vt=At.match(/^(>\s*)(.*)/);Vt&&(bt=Vt[1],dt=Vt[2])}const xn={dataName:se,text:vi(dt),source:Ke,sourcePrefix:bt,inlineSource:dt};e.oneditfield(se,dt,Oe,xn)}function U(se,Oe,we,Ae){if(!g(h)||!e.oneditfield)return;let Qe;if(g(h).type==="sequence"?Qe=g(h).fields.find(xn=>xn.name===se):g(h).type==="delimited"&&Ae&&(Qe=g(h).zones.find(Vt=>Vt.name===Ae)?.fields.find(Vt=>Vt.name===se)),!Qe||!Qe.filled||Qe.nodes.length===0)return;const St=Qe.nodes[0],pt=Gd(St.source);if(Oe<0||Oe>=pt.length)return;const Ke=pt[Oe],At=Ke.match(/^([-*+]\s+|\d+\.\s+)/),bt=At?At[1]:"",dt=At?Ke.slice(bt.length):Ke,Ct={dataName:`${se}[${Oe}]`,text:vi(dt),source:Ke,sourcePrefix:bt,inlineSource:dt};e.oneditfield(`${se}[${Oe}]`,dt,we,Ct)}function ae(se,Oe,we){if(!g(h))return;let Ae;if(g(h).type==="sequence"?Ae=g(h).fields.find(Ke=>Ke.name===se):g(h).type==="delimited"&&we&&(Ae=g(h).zones.find(At=>At.name===we)?.fields.find(At=>At.name===se)),!Ae||Oe<0||Oe>=Ae.nodes.length)return;const Qe=Ae.nodes[Oe];if(Qe.type!=="rune")return;const pt=g(f).findIndex(Ke=>Ke.source===Qe.source);pt!==-1&&(g(v)?.type==="rune"?M(a,[...g(a),pt],!0):M(a,[pt],!0),M(y,"settings"))}function ce(se){const we={...e.block,text:se,source:""};we.source=Um(we),e.onupdate(we)}function ne(se){const we={...e.block,level:se,source:""};we.source=Um(we),e.onupdate(we)}function G(se){const we={...e.block,attributes:se,source:""};we.source=Hn(we),e.onupdate(we)}function oe(se){const we={...e.block,innerContent:se,source:""};we.source=Hn(we),e.onupdate(we)}function ie(se){if(!g(v)||!g(v).runeName)return;const Oe=g(v).source,we=ff(se);let Ae;if(g(v).selfClosing)Ae=`{% ${g(v).runeName}${we} /%}`;else{const Ke=(g(v).innerContent??"").trim();Ae=Ke?`{% ${g(v).runeName}${we} %}
581
+ ${Ke}
582
+ {% /${g(v).runeName} %}`:`{% ${g(v).runeName}${we} %}
583
+
584
+ {% /${g(v).runeName} %}`}const Qe=e.block,St=$u(Qe.innerContent,Oe,Ae),pt={...Qe,innerContent:St,source:""};pt.source=Hn(pt),e.onupdate(pt)}function j(se){if(!g(v)||!g(v).runeName)return;const Oe=g(v).source,we=ff(g(v).attributes??{}),Ae=se.trim(),Qe=Ae?`{% ${g(v).runeName}${we} %}
585
+ ${Ae}
586
+ {% /${g(v).runeName} %}`:`{% ${g(v).runeName}${we} %}
587
+
588
+ {% /${g(v).runeName} %}`,St=e.block,pt=$u(St.innerContent,Oe,Qe),Ke={...St,innerContent:pt,source:""};Ke.source=Hn(Ke),e.onupdate(Ke)}function te(se){const we={...e.block,code:se,source:""};we.source=id(we),e.onupdate(we)}function _e(se){const we={...e.block,language:se,source:""};we.source=id(we),e.onupdate(we)}function Ee(se){e.onupdate({...e.block,source:se})}function Re(se){if(!g(v))return;const Oe=e.block,we=$u(Oe.innerContent,g(v).source,se),Ae={...Oe,innerContent:we,source:""};Ae.source=Hn(Ae),e.onupdate(Ae)}function ge(se){g(v)&&Re(`${"#".repeat(se)} ${g(v).headingText??""}`)}function Ce(se){g(v)&&Re(`${"#".repeat(g(v).headingLevel??1)} ${se}`)}function tt(se){if(!g(v))return;const Oe=g(v).fenceCode??"";Re(`\`\`\`${se}
589
+ ${Oe}
590
+ \`\`\``)}function rt(se){if(!g(v))return;const Oe=g(v).fenceLanguage??"";Re(`\`\`\`${Oe}
591
+ ${se}
592
+ \`\`\``)}function We(se){Re(se)}var Ye=VF(),ze=q(Ye),xe=q(ze),De=q(xe),Ue=q(De),lt=R(De,2);{var et=se=>{var Oe=bF(),we=q(Oe);fe(()=>Te(we,g(o))),z(se,Oe)};ue(lt,se=>{!g(_)&&g(o)&&se(et)})}var Qt=R(lt,4);Qt.__click=function(...se){e.onremove?.apply(this,se)};var nn=R(Qt,2);nn.__click=function(...se){e.onclose?.apply(this,se)};var ke=R(xe,2);{var Ft=se=>{var Oe=xF();$t(Oe,21,()=>g(w),Kt,(we,Ae)=>{var Qe=kF();let St;Qe.__click=()=>M(y,g(Ae),!0);var pt=q(Qe);{var Ke=dt=>{var Ct=yF();z(dt,Ct)},At=dt=>{var Ct=wF();z(dt,Ct)},bt=dt=>{var Ct=_F();z(dt,Ct)};ue(pt,dt=>{g(Ae)==="settings"?dt(Ke):g(Ae)==="structure"?dt(At,1):g(Ae)==="content"&&dt(bt,2)})}fe(()=>St=Ze(Qe,1,"edit-panel__tab svelte-1t8cclf",null,St,{active:g(y)===g(Ae)})),z(we,Qe)}),z(se,Oe)};ue(ke,se=>{e.block.type==="rune"&&g(w).length>1&&se(Ft)})}var wt=R(ze,2);{var Ht=se=>{const Oe=me(()=>e.block);var we=BF(),Ae=ot(we);{var Qe=bt=>{var dt=EF(),Ct=q(dt);{var xn=_t=>{var Jt=un(),Nn=ot(Jt);{var Gn=Nt=>{var Z=SF(),Xe=q(Z),hn=R(q(Xe),2);hn.__change=dr=>ge(Number(dr.target.value));var Sn=q(hn);Sn.value=Sn.__value="1";var Ge=R(Sn);Ge.value=Ge.__value="2";var fr=R(Ge);fr.value=fr.__value="3";var Ti=R(fr);Ti.value=Ti.__value="4";var Mn=R(Ti);Mn.value=Mn.__value="5";var Ui=R(Mn);Ui.value=Ui.__value="6";var Dn;yf(hn);var ks=R(Xe,2),Gi=R(q(ks),2);Gi.__input=dr=>Ce(dr.target.value),fe(dr=>{Dn!==(Dn=dr)&&(hn.value=(hn.__value=dr)??"",rc(hn,dr)),ln(Gi,g(v).headingText??"")},[()=>String(g(v).headingLevel??1)]),z(Nt,Z)},ur=Nt=>{var Z=AF(),Xe=q(Z),hn=R(q(Xe),2);hn.__input=Sn=>tt(Sn.target.value),fe(()=>ln(hn,g(v).fenceLanguage??"")),z(Nt,Z)},dn=Nt=>{var Z=CF();z(Nt,Z)};ue(Nn,Nt=>{g(v).type==="heading"?Nt(Gn):g(v).type==="fence"?Nt(ur,1):Nt(dn,!1)})}z(_t,Jt)},Vt=_t=>{{let Jt=me(()=>g(v).attributes??{});G0(_t,{get runeInfo(){return g(b)},get attributes(){return g(Jt)},onchange:ie})}},rn=_t=>{var Jt=un(),Nn=ot(Jt);{var Gn=dn=>{G0(dn,{get runeInfo(){return g(s)},get attributes(){return g(Oe).attributes},onchange:G})},ur=dn=>{var Nt=PF(),Z=q(Nt),Xe=q(Z),hn=R(Z,2);$t(hn,17,()=>Object.entries(g(Oe).attributes),Kt,(Sn,Ge)=>{var fr=me(()=>Dc(g(Ge),2));let Ti=()=>g(fr)[0],Mn=()=>g(fr)[1];var Ui=TF(),Dn=q(Ui),ks=q(Dn),Gi=R(Dn,2);Gi.__input=dr=>{const H={...g(Oe).attributes,[Ti()]:dr.target.value};G(H)},fe(()=>{Te(ks,Ti()),ln(Gi,Mn())}),z(Sn,Ui)}),fe(()=>Te(Xe,`Unknown rune: ${g(Oe).runeName??""}`)),z(dn,Nt)};ue(Nn,dn=>{g(s)?dn(Gn):dn(ur,!1)})}z(_t,Jt)};ue(Ct,_t=>{g(_)&&g(v)?_t(xn):g(v)&&g(b)?_t(Vt,1):g(v)||_t(rn,2)})}z(bt,dt)};ue(Ae,bt=>{g(y)==="settings"&&bt(Qe)})}var St=R(Ae,2);{var pt=bt=>{var dt=$F(),Ct=q(dt);{var xn=rn=>{{let _t=me(()=>g(v)?.runeName??g(Oe).runeName);OF(rn,{get structure(){return g(h)},get rootLabel(){return g(_t)},onaddfield:E,onremovefield:T,onappenditem:P,onremovelistitem:D,onreorderlistitem:I,oneditfield:W,oneditlistitem:U,onnavigaterune:ae,onfieldselect:x,get selectedField(){return g(m)}})}},Vt=rn=>{{let _t=me(()=>g(a).length===0);PC(rn,{get nodes(){return g(l)},get activePath(){return g(a)},onselect:S,get rootLabel(){return g(Oe).runeName},onrootclick:A,get isRootActive(){return g(_t)}})}};ue(Ct,rn=>{g(d)&&g(h)?rn(xn):!g(v)&&g(c)&&rn(Vt,1)})}z(bt,dt)};ue(St,bt=>{g(y)==="structure"&&bt(pt)})}var Ke=R(St,2);{var At=bt=>{var dt=NF(),Ct=q(dt);{var xn=_t=>{var Jt=un(),Nn=ot(Jt);{var Gn=Z=>{var Xe=QF(),hn=q(Xe);{let Sn=me(()=>g(v).fenceCode??"");po(hn,{get content(){return g(Sn)},onchange:rt,get language(){return g(v).fenceLanguage},get runes(){return e.runes},aggregated:()=>t()})}z(Z,Xe)},ur=Z=>{var Xe=LF(),hn=q(Xe);po(hn,{get content(){return g(v).source},onchange:We,get runes(){return e.runes},aggregated:()=>t()}),z(Z,Xe)},dn=Z=>{var Xe=MF();z(Z,Xe)},Nt=Z=>{var Xe=DF(),hn=q(Xe),Sn=R(q(hn),2);Sn.__input=Ge=>We(Ge.target.value),fe(Ge=>{ln(Sn,g(v).source),Et(Sn,"rows",Ge)},[()=>Math.max(4,g(v).source.split(`
593
+ `).length)]),z(Z,Xe)};ue(Nn,Z=>{g(v).type==="fence"?Z(Gn):g(v).type==="paragraph"?Z(ur,1):g(v).type==="heading"?Z(dn,2):Z(Nt,!1)})}z(_t,Jt)},Vt=_t=>{var Jt=un(),Nn=ot(Jt);{var Gn=dn=>{var Nt=qF(),Z=q(Nt);po(Z,{get content(){return g(v).innerContent},onchange:j,get runes(){return e.runes},aggregated:()=>t()}),z(dn,Nt)},ur=dn=>{var Nt=RF();z(dn,Nt)};ue(Nn,dn=>{!g(v).selfClosing&&g(v).innerContent!==void 0?dn(Gn):dn(ur,!1)})}z(_t,Jt)},rn=_t=>{var Jt=IF(),Nn=q(Jt);po(Nn,{get content(){return g(Oe).innerContent},onchange:oe,get runes(){return e.runes},aggregated:()=>t()}),z(_t,Jt)};ue(Ct,_t=>{g(_)&&g(v)?_t(xn):g(v)&&g(b)?_t(Vt,1):g(v)||_t(rn,2)})}z(bt,dt)};ue(Ke,bt=>{g(y)==="content"&&!g(Oe).selfClosing&&bt(At)})}z(se,we)},xt=se=>{var Oe=FF(),we=q(Oe);{var Ae=Ke=>{const At=me(()=>e.block);var bt=jF(),dt=q(bt),Ct=R(q(dt),2);Ct.__change=Nt=>ne(Number(Nt.target.value));var xn=q(Ct);xn.value=xn.__value="1";var Vt=R(xn);Vt.value=Vt.__value="2";var rn=R(Vt);rn.value=rn.__value="3";var _t=R(rn);_t.value=_t.__value="4";var Jt=R(_t);Jt.value=Jt.__value="5";var Nn=R(Jt);Nn.value=Nn.__value="6";var Gn;yf(Ct);var ur=R(dt,2),dn=R(q(ur),2);dn.__input=Nt=>ce(Nt.target.value),fe(Nt=>{Gn!==(Gn=Nt)&&(Ct.value=(Ct.__value=Nt)??"",rc(Ct,Nt)),ln(dn,g(At).text)},[()=>String(g(At).level)]),z(Ke,bt)},Qe=Ke=>{const At=me(()=>e.block);var bt=zF(),dt=ot(bt),Ct=q(dt),xn=R(q(Ct),2);xn.__input=_t=>_e(_t.target.value);var Vt=R(dt,2),rn=q(Vt);po(rn,{get content(){return g(At).code},onchange:te,get language(){return g(At).language},get runes(){return e.runes},aggregated:()=>t()}),fe(()=>ln(xn,g(At).language)),z(Ke,bt)},St=Ke=>{var At=ZF(),bt=q(At);po(bt,{get content(){return e.block.source},onchange:Ee,get runes(){return e.runes},aggregated:()=>t()}),z(Ke,At)},pt=Ke=>{var At=XF(),bt=q(At),dt=R(q(bt),2);dt.__input=Ct=>Ee(Ct.target.value),fe(Ct=>{ln(dt,e.block.source),Et(dt,"rows",Ct)},[()=>Math.max(4,e.block.source.split(`
594
+ `).length)]),z(Ke,At)};ue(we,Ke=>{e.block.type==="heading"?Ke(Ae):e.block.type==="fence"?Ke(Qe,1):e.block.type==="paragraph"?Ke(St,2):Ke(pt,!1)})}z(se,Oe)};ue(wt,se=>{e.block.type==="rune"?se(Ht):se(xt,!1)})}fe(()=>Te(Ue,g(C))),z(n,Ye),vt()}Gt(["click","change","input"]);var YF=V('<div draggable="true"><span class="structure-item__drag svelte-1lv3l5p" title="Drag to reorder"><svg width="8" height="12" viewBox="0 0 8 12" fill="currentColor"><circle cx="2" cy="2" r="1"></circle><circle cx="6" cy="2" r="1"></circle><circle cx="2" cy="6" r="1"></circle><circle cx="6" cy="6" r="1"></circle><circle cx="2" cy="10" r="1"></circle><circle cx="6" cy="10" r="1"></circle></svg></span> <span class="structure-item__icon svelte-1lv3l5p"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><!></svg></span> <span class="structure-item__info svelte-1lv3l5p"><span class="structure-item__type svelte-1lv3l5p"> </span> <span class="structure-item__preview svelte-1lv3l5p"> </span></span> <button class="structure-item__remove svelte-1lv3l5p" title="Remove"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),UF=V('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="structure-list svelte-1lv3l5p"></div></div>'),GF=V('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="edit-panel__content-editor svelte-1lv3l5p"><!></div></div>'),HF=V('<div class="edit-panel svelte-1lv3l5p"><div class="edit-panel__top svelte-1lv3l5p"><div class="edit-panel__header svelte-1lv3l5p"><span class="edit-panel__type svelte-1lv3l5p">prose</span> <span class="edit-panel__count svelte-1lv3l5p"> </span> <div class="edit-panel__spacer svelte-1lv3l5p"></div> <button class="edit-panel__btn edit-panel__btn--danger svelte-1lv3l5p" title="Remove block"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="2" x2="10" y2="2"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button> <button class="edit-panel__btn svelte-1lv3l5p" title="Close panel">&times;</button></div> <div class="edit-panel__tabs svelte-1lv3l5p"><button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h4M2 7h4M6 11h4M6 15h4M4 3v8M8 11v4"></path></svg> Structure</button> <button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4h12M2 8h12M2 12h8"></path></svg> Content</button></div></div> <!> <!></div>');function KF(n,e){Ot(e,!0);let t=Pt(e,"aggregated",19,()=>({})),r=K("structure");function i(P){switch(P.type){case"heading":return P.text;case"paragraph":return P.source.length>60?P.source.slice(0,60)+"...":P.source;case"fence":{const D=P,I=D.language?`${D.language}: `:"",W=D.code.split(`
595
+ `)[0]??"";return I+(W.length>50?W.slice(0,50)+"...":W)}case"list":return P.source.split(`
596
+ `)[0]??"";case"quote":return P.source.replace(/^>\s*/gm,"").split(`
597
+ `)[0]??"";case"hr":return"---";case"image":return P.source;default:return P.source.split(`
598
+ `)[0]??""}}function s(P){switch(P.type){case"heading":return'<path d="M3 3v10M13 3v10M3 8h10" />';case"paragraph":return'<path d="M2 4h12M2 8h12M2 12h8" />';case"fence":return'<polyline points="4 6 1 9 4 12" /><polyline points="12 6 15 9 12 12" />';case"list":return'<circle cx="3" cy="4" r="1" fill="currentColor" /><line x1="6" y1="4" x2="14" y2="4" /><circle cx="3" cy="8" r="1" fill="currentColor" /><line x1="6" y1="8" x2="14" y2="8" /><circle cx="3" cy="12" r="1" fill="currentColor" /><line x1="6" y1="12" x2="14" y2="12" />';case"quote":return'<path d="M3 5h10M5 5v8M5 9h6" />';case"hr":return'<line x1="2" y1="8" x2="14" y2="8" />';case"image":return'<rect x="2" y="2" width="12" height="12" rx="1" /><circle cx="5.5" cy="5.5" r="1.5" /><path d="M14 10l-3-3-5 5" />';default:return'<path d="M2 4h12M2 8h12M2 12h8" />'}}let o=K(null),a=K(null);function l(P,D){M(o,D,!0),P.dataTransfer&&(P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",String(D)))}function c(P,D){P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect="move"),M(a,D,!0)}function u(P,D){P.preventDefault(),g(o)!==null&&g(o)!==D&&d(g(o),D),M(o,null),M(a,null)}function f(){M(o,null),M(a,null)}function d(P,D){const I=[...e.block.children],[W]=I.splice(P,1);I.splice(D,0,W);const U=Ym(I);e.onupdate({...e.block,children:I,source:U})}function h(P){const D=e.block.children.filter((W,U)=>U!==P);if(D.length===0){e.onremove();return}const I=Ym(D);e.onupdate({...e.block,children:D,source:I})}function m(P){if(!P.trim()){e.onremove();return}const D=nA(P);e.onupdate({...e.block,children:D,source:P})}var p=HF(),O=q(p),v=q(O),b=R(q(v),2),_=q(b),C=R(b,4);C.__click=function(...P){e.onremove?.apply(this,P)};var y=R(C,2);y.__click=function(...P){e.onclose?.apply(this,P)};var w=R(v,2),S=q(w);let A;S.__click=()=>M(r,"structure");var x=R(S,2);let k;x.__click=()=>M(r,"content");var E=R(O,2);{var T=P=>{var D=UF(),I=q(D);$t(I,23,()=>e.block.children,W=>W.id,(W,U,ae)=>{var ce=YF();let ne;var G=R(q(ce),2),oe=q(G),ie=q(oe);Xw(ie,()=>s(g(U)),!0);var j=R(G,2),te=q(j),_e=q(te),Ee=R(te,2),Re=q(Ee),ge=R(j,2);ge.__click=()=>h(g(ae)),fe((Ce,tt)=>{ne=Ze(ce,1,"structure-item svelte-1lv3l5p",null,ne,{"drag-source":g(o)===g(ae),"drag-over":g(a)===g(ae)&&g(o)!==g(ae)}),Te(_e,Ce),Te(Re,tt)},[()=>hv(g(U)),()=>i(g(U))]),ut("dragstart",ce,Ce=>l(Ce,g(ae))),ut("dragover",ce,Ce=>c(Ce,g(ae))),ut("drop",ce,Ce=>u(Ce,g(ae))),ut("dragend",ce,f),z(W,ce)}),z(P,D)};ue(E,P=>{g(r)==="structure"&&P(T)})}var $=R(E,2);{var L=P=>{var D=GF(),I=q(D),W=q(I);po(W,{get content(){return e.block.source},onchange:m,get runes(){return e.runes},aggregated:()=>t()}),z(P,D)};ue($,P=>{g(r)==="content"&&P(L)})}fe(()=>{Te(_,`${e.block.children.length??""} block${e.block.children.length!==1?"s":""}`),A=Ze(S,1,"edit-panel__tab svelte-1lv3l5p",null,A,{active:g(r)==="structure"}),k=Ze(x,1,"edit-panel__tab svelte-1lv3l5p",null,k,{active:g(r)==="content"})}),z(n,p),vt()}Gt(["click"]);var JF=V('<div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w"> </span> <div class="edit-panel__custom-row svelte-1wxsk8w"><input class="edit-panel__input svelte-1wxsk8w" type="text"/> <button class="edit-panel__remove-btn svelte-1wxsk8w">&times;</button></div></div>'),eV=V('<div class="edit-panel__custom-section svelte-1wxsk8w"><span class="edit-panel__section-label svelte-1wxsk8w">Custom fields</span> <!></div>'),tV=V('<div class="edit-panel svelte-1wxsk8w"><div class="edit-panel__header svelte-1wxsk8w"><span class="edit-panel__type svelte-1wxsk8w">Frontmatter</span> <div class="edit-panel__spacer svelte-1wxsk8w"></div> <button class="edit-panel__btn svelte-1wxsk8w" title="Close panel">&times;</button></div> <div class="edit-panel__body svelte-1wxsk8w"><div class="edit-panel__field-group svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Title</span> <input class="edit-panel__input svelte-1wxsk8w" type="text"/></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Description</span> <textarea class="edit-panel__textarea svelte-1wxsk8w"></textarea></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Slug</span> <input class="edit-panel__input svelte-1wxsk8w" type="text" placeholder="auto-derived from filename"/></label> <div class="edit-panel__row svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Author</span> <input class="edit-panel__input svelte-1wxsk8w" type="text"/></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Date</span> <input class="edit-panel__input svelte-1wxsk8w" type="date"/></label></div> <div class="edit-panel__row svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Order</span> <input class="edit-panel__input svelte-1wxsk8w" type="number"/></label> <div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Draft</span> <div role="switch" tabindex="0"><div class="fm-toggle__track svelte-1wxsk8w"><div class="fm-toggle__thumb svelte-1wxsk8w"></div></div> <span class="fm-toggle__label svelte-1wxsk8w"> </span></div></div></div> <div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Tags</span> <!></div> <!> <div class="edit-panel__add-field svelte-1wxsk8w"><input class="edit-panel__input svelte-1wxsk8w" type="text" placeholder="Field name"/> <button class="edit-panel__add-btn svelte-1wxsk8w">+ Add field</button></div></div></div></div>');function nV(n,e){Ot(e,!0);const t=new Set(["title","description","tags","draft","order","date","author","slug"]);let r=K(""),i=me(()=>Object.entries(X.frontmatter).filter(([G])=>!t.has(G)));function s(G,oe){X.updateFrontmatterField(G,oe)}function o(){const G=g(r).trim();!G||G in X.frontmatter||(X.updateFrontmatterField(G,""),M(r,""))}function a(G){X.updateFrontmatterField(G,void 0)}var l=tV(),c=q(l),u=R(q(c),4);u.__click=function(...G){e.onclose?.apply(this,G)};var f=R(c,2),d=q(f),h=q(d),m=R(q(h),2);m.__input=G=>s("title",G.target.value);var p=R(h,2),O=R(q(p),2);O.__input=G=>s("description",G.target.value),Et(O,"rows",2);var v=R(p,2),b=R(q(v),2);b.__input=G=>s("slug",G.target.value);var _=R(v,2),C=q(_),y=R(q(C),2);y.__input=G=>s("author",G.target.value);var w=R(C,2),S=R(q(w),2);S.__input=G=>s("date",G.target.value);var A=R(_,2),x=q(A),k=R(q(x),2);k.__input=G=>{const oe=G.target.value;s("order",oe===""?void 0:Number(oe))};var E=R(x,2),T=R(q(E),2);let $;T.__click=()=>s("draft",X.frontmatter.draft===!0?void 0:!0),T.__keydown=G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),s("draft",X.frontmatter.draft===!0?void 0:!0))};var L=R(q(T),2),P=q(L),D=R(A,2),I=R(q(D),2);{let G=me(()=>X.frontmatter.tags??[]);Z_(I,{get tags(){return g(G)},onchange:oe=>s("tags",oe)})}var W=R(D,2);{var U=G=>{var oe=eV(),ie=R(q(oe),2);$t(ie,17,()=>g(i),Kt,(j,te)=>{var _e=me(()=>Dc(g(te),2));let Ee=()=>g(_e)[0],Re=()=>g(_e)[1];var ge=JF(),Ce=q(ge),tt=q(Ce),rt=R(Ce,2),We=q(rt);We.__input=ze=>s(Ee(),ze.target.value);var Ye=R(We,2);Ye.__click=()=>a(Ee()),fe(ze=>{Te(tt,Ee()),ln(We,ze),Et(Ye,"aria-label",`Remove ${Ee()??""}`)},[()=>String(Re()??"")]),z(j,ge)}),z(G,oe)};ue(W,G=>{g(i).length>0&&G(U)})}var ae=R(W,2),ce=q(ae);ce.__keydown=G=>{G.key==="Enter"&&(G.preventDefault(),o())};var ne=R(ce,2);ne.__click=o,fe(G=>{ln(m,X.frontmatter.title??""),ln(O,X.frontmatter.description??""),ln(b,X.frontmatter.slug??""),ln(y,X.frontmatter.author??""),ln(S,X.frontmatter.date??""),ln(k,X.frontmatter.order??""),$=Ze(T,1,"fm-toggle svelte-1wxsk8w",null,$,{active:X.frontmatter.draft===!0}),Et(T,"aria-checked",X.frontmatter.draft===!0),Te(P,X.frontmatter.draft===!0?"Draft":"Published"),ne.disabled=G},[()=>!g(r).trim()]),Qn(ce,()=>g(r),G=>M(r,G)),z(n,l),vt()}Gt(["click","input","keydown"]);var rV=V('<button type="button"> </button>'),iV=V('<div class="insert-dialog__tabs svelte-gvk8wi"></div>'),sV=V('<div class="insert-dialog__empty svelte-gvk8wi"> </div>'),oV=V('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),aV=V('<button class="insert-dialog__btn insert-dialog__btn--rune svelte-gvk8wi"><span class="insert-dialog__rune-dot svelte-gvk8wi"></span> <span class="insert-dialog__rune-info svelte-gvk8wi"><span class="insert-dialog__rune-name svelte-gvk8wi"> </span> <!></span></button>'),lV=V('<div class="insert-dialog__grid svelte-gvk8wi"></div>'),cV=V('<button class="insert-dialog__btn svelte-gvk8wi"><svg class="insert-dialog__btn-icon svelte-gvk8wi" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="insert-dialog__btn-info svelte-gvk8wi"><span class="insert-dialog__btn-name svelte-gvk8wi"> </span> <span class="insert-dialog__btn-desc svelte-gvk8wi"> </span></span></button>'),uV=V('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),fV=V('<button class="insert-dialog__btn insert-dialog__btn--rune svelte-gvk8wi"><span class="insert-dialog__rune-dot svelte-gvk8wi"></span> <span class="insert-dialog__rune-info svelte-gvk8wi"><span class="insert-dialog__rune-name svelte-gvk8wi"> </span> <!></span></button>'),dV=V('<div class="insert-dialog__grid svelte-gvk8wi"><!> <!></div>'),hV=V('<dialog class="insert-dialog svelte-gvk8wi"><div class="insert-dialog__inner svelte-gvk8wi"><div class="insert-dialog__header svelte-gvk8wi"><h2 class="insert-dialog__title svelte-gvk8wi">Insert Block</h2> <div class="insert-dialog__search-wrap svelte-gvk8wi"><svg class="insert-dialog__search-icon svelte-gvk8wi" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="4.5"></circle><path d="M10.5 10.5L14 14"></path></svg> <input class="insert-dialog__search svelte-gvk8wi" type="text" placeholder="Search blocks..."/></div> <button class="insert-dialog__close svelte-gvk8wi"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg></button></div> <!> <div class="insert-dialog__body svelte-gvk8wi"><!></div></div></dialog>');function pV(n,e){Ot(e,!0);const t=["Content","Section","Layout","Code & Data","Semantic","Design","Site"];let r=K("Content"),i=K(""),s,o,a=me(()=>{const x=new Set(e.runesByCategory.keys()),k=t.filter(E=>x.has(E));for(const E of x)k.includes(E)||k.push(E);return k}),l=me(()=>{if(!g(i).trim())return null;const x=g(i).toLowerCase();return e.runes.filter(k=>k.name.toLowerCase().includes(x)||k.description&&k.description.toLowerCase().includes(x))});const c=[{type:"heading",name:"Heading",description:"Section heading",icon:"M3 3v10M13 3v10M3 8h10"},{type:"paragraph",name:"Paragraph",description:"Body text",icon:"M2 4h12M2 8h12M2 12h8"},{type:"fence",name:"Code Block",description:"Fenced code",icon:"M5 4L2 8l3 4M11 4l3 4-3 4"},{type:"hr",name:"Divider",description:"Horizontal rule",icon:"M2 8h12"}];mn(()=>{s?.showModal(),o?.focus()});function u(x){x.target===s&&e.onclose()}function f(x){e.oninsert(x)}function d(x){e.oninsert("rune",x)}var h=hV();h.__click=u,h.__keydown=x=>{x.key==="Escape"&&(x.preventDefault(),e.onclose())};var m=q(h),p=q(m),O=R(q(p),2),v=R(q(O),2);fn(v,x=>o=x,()=>o);var b=R(O,2);b.__click=function(...x){e.onclose?.apply(this,x)};var _=R(p,2);{var C=x=>{var k=iV();$t(k,21,()=>g(a),Kt,(E,T)=>{var $=rV();let L;$.__click=()=>M(r,g(T),!0);var P=q($);fe(()=>{L=Ze($,1,"insert-dialog__tab svelte-gvk8wi",null,L,{active:g(r)===g(T)}),Te(P,g(T))}),z(E,$)}),z(x,k)};ue(_,x=>{g(l)||x(C)})}var y=R(_,2),w=q(y);{var S=x=>{var k=un(),E=ot(k);{var T=L=>{var P=sV(),D=q(P);fe(()=>Te(D,`No blocks match "${g(i)??""}"`)),z(L,P)},$=L=>{var P=lV();$t(P,21,()=>g(l),Kt,(D,I)=>{var W=aV();W.__click=()=>d(g(I).name);var U=R(q(W),2),ae=q(U),ce=q(ae),ne=R(ae,2);{var G=oe=>{var ie=oV(),j=q(ie);fe(()=>Te(j,g(I).description)),z(oe,ie)};ue(ne,oe=>{g(I).description&&oe(G)})}fe(()=>Te(ce,g(I).name)),z(D,W)}),z(L,P)};ue(E,L=>{g(l).length===0?L(T):L($,!1)})}z(x,k)},A=x=>{var k=dV(),E=q(k);{var T=L=>{var P=un(),D=ot(P);$t(D,17,()=>c,Kt,(I,W)=>{var U=cV();U.__click=()=>f(g(W).type);var ae=q(U),ce=q(ae),ne=R(ae,2),G=q(ne),oe=q(G),ie=R(G,2),j=q(ie);fe(()=>{Et(ce,"d",g(W).icon),Te(oe,g(W).name),Te(j,g(W).description)}),z(I,U)}),z(L,P)};ue(E,L=>{g(r)==="Content"&&L(T)})}var $=R(E,2);$t($,17,()=>e.runesByCategory.get(g(r))??[],Kt,(L,P)=>{var D=fV();D.__click=()=>d(g(P).name);var I=R(q(D),2),W=q(I),U=q(W),ae=R(W,2);{var ce=ne=>{var G=uV(),oe=q(G);fe(()=>Te(oe,g(P).description)),z(ne,G)};ue(ae,ne=>{g(P).description&&ne(ce)})}fe(()=>Te(U,g(P).name)),z(L,D)}),z(x,k)};ue(w,x=>{g(l)?x(S):x(A,!1)})}fn(h,x=>s=x,()=>s),ut("close",h,function(...x){e.onclose?.apply(this,x)}),Qn(v,()=>g(i),x=>M(i,x)),z(n,h),vt()}Gt(["click","keydown"]);var mV=V('<div class="inline-edit-popover__link-editor svelte-1c50n5q"><div class="inline-edit-popover__link-row svelte-1c50n5q"><label class="inline-edit-popover__link-label svelte-1c50n5q">Text</label> <input class="inline-edit-popover__link-input svelte-1c50n5q" type="text"/></div> <div class="inline-edit-popover__link-row svelte-1c50n5q"><label class="inline-edit-popover__link-label svelte-1c50n5q">URL</label> <input class="inline-edit-popover__link-input svelte-1c50n5q" type="text" placeholder="https://..."/></div> <div class="inline-edit-popover__link-actions svelte-1c50n5q"><button class="inline-edit-popover__link-btn inline-edit-popover__link-btn--apply svelte-1c50n5q">Apply</button> <button class="inline-edit-popover__link-btn inline-edit-popover__link-btn--remove svelte-1c50n5q">Remove link</button></div></div>'),gV=V('<div><div class="inline-edit-popover__header svelte-1c50n5q"><span class="inline-edit-popover__label svelte-1c50n5q"> </span> <button class="inline-edit-popover__close svelte-1c50n5q" aria-label="Close">&times;</button></div> <div class="inline-edit-popover__toolbar svelte-1c50n5q"><button title="Bold (Ctrl+B)"><strong>B</strong></button> <button title="Italic (Ctrl+I)"><em>I</em></button> <button title="Inline code">&lt;/&gt;</button> <button class="inline-edit-popover__tool-btn svelte-1c50n5q" title="Link (Ctrl+K)"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 9.5a3 3 0 0 0 4.2.3l2-2a3 3 0 0 0-4.2-4.3l-1.1 1.1"></path><path d="M9.5 6.5a3 3 0 0 0-4.2-.3l-2 2a3 3 0 0 0 4.2 4.3l1.1-1.1"></path></svg></button></div> <div class="inline-edit-popover__editable svelte-1c50n5q" contenteditable="true"></div> <!></div>');function H0(n,e){Ot(e,!0);let t,r,i=K(0),s=K(0),o=K(!0),a=K(null),l=K(void 0),c;to(()=>{r.innerHTML=bB(e.inlineSource);const j=t.getBoundingClientRect(),te=j.width,_e=j.height,Ee=8;let Re=e.anchorRect.left+e.anchorRect.width/2-te/2;Re<Ee&&(Re=Ee),Re+te>window.innerWidth-Ee&&(Re=window.innerWidth-te-Ee),M(i,Re,!0);const ge=e.anchorRect.top-_e-Ee;ge>=Ee?(M(s,ge),M(o,!0)):(M(s,e.anchorRect.bottom+Ee),M(o,!1)),r.focus();const Ce=window.getSelection();if(Ce&&r.childNodes.length>0){const We=document.createRange();We.selectNodeContents(r),We.collapse(!1),Ce.removeAllRanges(),Ce.addRange(We)}function tt(We){t&&!t.contains(We.target)&&e.onclose()}function rt(We){We.key==="Escape"&&(g(a)?M(a,null):e.onclose())}return requestAnimationFrame(()=>{document.addEventListener("mousedown",tt)}),document.addEventListener("keydown",rt),()=>{document.removeEventListener("mousedown",tt),document.removeEventListener("keydown",rt),clearTimeout(c)}});function u(){clearTimeout(c),c=setTimeout(()=>{H1(r);const j=wB(r);e.onchange(j)},100)}function f(j){if(j.key==="Enter"){j.preventDefault();return}(j.metaKey||j.ctrlKey)&&(j.key==="b"?(j.preventDefault(),m("bold")):j.key==="i"?(j.preventDefault(),m("italic")):j.key==="k"&&(j.preventDefault(),p()))}function d(j){j.preventDefault();const te=j.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,te)}function h(j){const _e=j.target.closest("a");_e&&r.contains(_e)&&(j.preventDefault(),O(_e))}function m(j){r.focus();const te=window.getSelection();if(!(!te||te.rangeCount===0)){if(j==="code"){const _e=te.getRangeAt(0);if(_e.collapsed)return;const Ee=A(_e.commonAncestorContainer,"CODE",r);if(Ee){const Re=document.createTextNode(Ee.textContent??"");Ee.replaceWith(Re);const ge=document.createRange();ge.selectNode(Re),te.removeAllRanges(),te.addRange(ge)}else{const Re=document.createElement("code");Re.textContent=_e.toString(),_e.deleteContents(),_e.insertNode(Re);const ge=document.createRange();ge.selectNodeContents(Re),te.removeAllRanges(),te.addRange(ge)}}else{const _e=j==="bold"?"bold":"italic";document.execCommand(_e,!1)}H1(r),u()}}function p(){const j=window.getSelection();if(!j||j.rangeCount===0)return;const te=j.getRangeAt(0),_e=A(te.commonAncestorContainer,"A",r);if(_e){O(_e);return}if(te.collapsed)return;const Ee=te.toString(),Re=document.createElement("a");Re.href="",Re.textContent=Ee,te.deleteContents(),te.insertNode(Re),O(Re)}function O(j){M(a,{anchorEl:j,href:j.getAttribute("href")??"",text:j.textContent??"",rect:j.getBoundingClientRect()},!0),requestAnimationFrame(()=>{g(l)?.focus(),g(l)?.select()})}function v(){g(a)&&(g(a).anchorEl.href=g(a).href,g(a).anchorEl.textContent=g(a).text,M(a,null),r.focus(),u())}function b(){if(!g(a))return;const j=document.createTextNode(g(a).anchorEl.textContent??"");g(a).anchorEl.replaceWith(j),M(a,null),r.focus(),u()}function _(j){j.key==="Enter"&&(j.preventDefault(),v())}let C=K(!1),y=K(!1),w=K(!1);function S(){M(C,document.queryCommandState("bold"),!0),M(y,document.queryCommandState("italic"),!0);const j=window.getSelection();j&&j.rangeCount>0?M(w,!!A(j.getRangeAt(0).commonAncestorContainer,"CODE",r)):M(w,!1)}function A(j,te,_e){let Ee=j;for(;Ee&&Ee!==_e;){if(Ee.nodeType===globalThis.Node.ELEMENT_NODE&&Ee.tagName===te)return Ee;Ee=Ee.parentNode}return null}var x=gV();let k;var E=q(x),T=q(E),$=q(T),L=R(T,2);L.__click=function(...j){e.onclose?.apply(this,j)};var P=R(E,2),D=q(P);let I;D.__click=()=>m("bold");var W=R(D,2);let U;W.__click=()=>m("italic");var ae=R(W,2);let ce;ae.__click=()=>m("code");var ne=R(ae,2);ne.__click=p;var G=R(P,2);G.__input=u,G.__keydown=f,G.__keyup=S,G.__mouseup=S,G.__click=h,fn(G,j=>r=j,()=>r);var oe=R(G,2);{var ie=j=>{var te=mV(),_e=q(te),Ee=R(q(_e),2);Ee.__keydown=_;var Re=R(_e,2),ge=R(q(Re),2);ge.__keydown=_,fn(ge,We=>M(l,We),()=>g(l));var Ce=R(Re,2),tt=q(Ce);tt.__click=v;var rt=R(tt,2);rt.__click=b,Qn(Ee,()=>g(a).text,We=>g(a).text=We),Qn(ge,()=>g(a).href,We=>g(a).href=We),z(j,te)};ue(oe,j=>{g(a)&&j(ie)})}fn(x,j=>t=j,()=>t),fe(()=>{k=Ze(x,1,"inline-edit-popover svelte-1c50n5q",null,k,{above:g(o),below:!g(o)}),Ar(x,`left: ${g(i)??""}px; top: ${g(s)??""}px`),Te($,e.dataName),I=Ze(D,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,I,{active:g(C)}),U=Ze(W,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,U,{active:g(y)}),ce=Ze(ae,1,"inline-edit-popover__tool-btn inline-edit-popover__tool-btn--code svelte-1c50n5q",null,ce,{active:g(w)})}),ut("paste",G,d),z(n,x),vt()}Gt(["click","input","keydown","keyup","mouseup"]);var OV=V('<div><div class="action-edit-popover__header svelte-15w9shn"><span class="action-edit-popover__label svelte-15w9shn">action</span> <button class="action-edit-popover__close svelte-15w9shn" aria-label="Close">&times;</button></div> <div class="action-edit-popover__row svelte-15w9shn"><label class="action-edit-popover__field-label svelte-15w9shn">Text</label> <input class="action-edit-popover__input svelte-15w9shn" type="text"/></div> <div class="action-edit-popover__row svelte-15w9shn"><label class="action-edit-popover__field-label svelte-15w9shn">URL</label> <input class="action-edit-popover__input svelte-15w9shn" type="text" placeholder="https://..."/></div> <div class="action-edit-popover__actions svelte-15w9shn"><button class="action-edit-popover__btn action-edit-popover__btn--apply svelte-15w9shn">Apply</button> <button class="action-edit-popover__btn action-edit-popover__btn--remove svelte-15w9shn">Remove</button></div></div>');function vV(n,e){Ot(e,!0);let t,r,i=K(0),s=K(0),o=K(!0),a=K(tn(e.text)),l=K(tn(e.href));to(()=>{const w=t.getBoundingClientRect(),S=w.width,A=w.height,x=8;let k=e.anchorRect.left+e.anchorRect.width/2-S/2;k<x&&(k=x),k+S>window.innerWidth-x&&(k=window.innerWidth-S-x),M(i,k,!0);const E=e.anchorRect.top-A-x;E>=x?(M(s,E),M(o,!0)):(M(s,e.anchorRect.bottom+x),M(o,!1)),r?.focus(),r?.select();function T(L){t&&!t.contains(L.target)&&c()}function $(L){L.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",T)}),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",$)}});function c(){(g(a)!==e.text||g(l)!==e.href)&&e.onchange(g(a),g(l)),e.onclose()}function u(w){w.key==="Enter"&&(w.preventDefault(),c())}var f=OV();let d;var h=q(f),m=R(q(h),2);m.__click=function(...w){e.onclose?.apply(this,w)};var p=R(h,2),O=R(q(p),2);O.__keydown=u,fn(O,w=>r=w,()=>r);var v=R(p,2),b=R(q(v),2);b.__keydown=u;var _=R(v,2),C=q(_);C.__click=c;var y=R(C,2);y.__click=function(...w){e.onremove?.apply(this,w)},fn(f,w=>t=w,()=>t),fe(()=>{d=Ze(f,1,"action-edit-popover svelte-15w9shn",null,d,{above:g(o),below:!g(o)}),Ar(f,`left: ${g(i)??""}px; top: ${g(s)??""}px`)}),Qn(O,()=>g(a),w=>M(a,w)),Qn(b,()=>g(l),w=>M(l,w)),z(n,f),vt()}Gt(["click","keydown"]);var bV=V("<option> </option>"),yV=V('<div><div class="code-edit-popover__header svelte-rmoejq"><span class="code-edit-popover__label svelte-rmoejq">code</span> <button class="code-edit-popover__close svelte-rmoejq" aria-label="Close">&times;</button></div> <div class="code-edit-popover__toolbar svelte-rmoejq"><select class="code-edit-popover__lang-select svelte-rmoejq"><option>No language</option><!></select></div> <div class="code-edit-popover__editor svelte-rmoejq"></div> <div class="code-edit-popover__actions svelte-rmoejq"><button class="code-edit-popover__btn code-edit-popover__btn--apply svelte-rmoejq">Apply</button> <button class="code-edit-popover__btn code-edit-popover__btn--remove svelte-rmoejq">Remove</button></div></div>');function wV(n,e){Ot(e,!0);const t=["bash","sh","shell","javascript","typescript","python","html","css","json","yaml","markdown","markdoc","go","rust","java","c","cpp","ruby","php","sql","swift","kotlin","dart","lua","r","perl","scala","haskell","elixir","toml","xml","graphql","dockerfile","diff","plaintext"];let r,i,s=K(void 0),o=K(0),a=K(0),l=K(!0),c=K(tn(e.code)),u=K(tn(e.language));const f=new ps,d=new ps,h=fl.define([{tag:N.keyword,color:"#8839ef"},{tag:[N.atom,N.bool],color:"#fe640b"},{tag:N.number,color:"#fe640b"},{tag:[N.string,N.special(N.string)],color:"#40a02b"},{tag:[N.regexp,N.escape],color:"#ea76cb"},{tag:N.definition(N.variableName),color:"#1e66f5"},{tag:N.local(N.variableName),color:"#1e66f5"},{tag:N.variableName,color:"#4c4f69"},{tag:N.definition(N.propertyName),color:"#1e66f5"},{tag:N.propertyName,color:"#1e66f5"},{tag:[N.typeName,N.className,N.namespace],color:"#df8e1d"},{tag:[N.macroName,N.labelName],color:"#d20f39"},{tag:N.function(N.variableName),color:"#1e66f5"},{tag:N.operator,color:"#04a5e5"},{tag:N.punctuation,color:"#7c7f93"},{tag:N.comment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.lineComment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.blockComment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.meta,color:"#7c7f93"},{tag:N.link,color:"#1e66f5",textDecoration:"underline"},{tag:N.url,color:"#1e66f5"},{tag:N.invalid,color:"#d20f39"}]),m=Pe.theme({"&":{fontSize:"13px",height:"auto",backgroundColor:"var(--ed-surface-1, #f8fafc)",border:"1px solid var(--ed-border-default, #e2e8f0)",borderRadius:"var(--ed-radius-sm, 4px)"},"&.cm-focused":{outline:"none",borderColor:"var(--ed-accent, #3b82f6)",boxShadow:"0 0 0 2px var(--ed-accent-ring, rgba(59, 130, 246, 0.2))"},".cm-scroller":{overflow:"auto",maxHeight:"12rem",fontFamily:"var(--ed-font-mono, 'SF Mono', 'Fira Code', monospace)",lineHeight:"1.5"},".cm-content":{padding:"var(--ed-space-2, 0.5rem)",caretColor:"#1e293b",minHeight:"3rem"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},".cm-activeLine":{backgroundColor:"transparent"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1}),p=me(()=>t.includes(g(u))||!g(u)?t:[g(u),...t]);function O(){if(!r)return;const I=r.getBoundingClientRect(),W=I.width,U=I.height,ae=8;let ce=e.anchorRect.left+e.anchorRect.width/2-W/2;ce<ae&&(ce=ae),ce+W>window.innerWidth-ae&&(ce=window.innerWidth-W-ae),M(o,ce,!0);const ne=e.anchorRect.top-U-ae;ne>=ae?(M(a,ne),M(l,!0)):(M(a,e.anchorRect.bottom+ae),M(l,!1))}to(()=>{O();function I(U){r&&!r.contains(U.target)&&b()}function W(U){U.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",I)}),document.addEventListener("keydown",W),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",W)}}),mn(()=>{if(!i)return;const I=Mt.create({doc:Sr(()=>g(c)),extensions:[f.of(Ka()),d.of(Sr(()=>g(u))==="markdoc"?Ac():[]),MO(),m,mc(h),mc(S2,{fallback:!0}),Yo.of([...RO,...DO,tD,{key:"Mod-Enter",run:()=>(b(),!0)},{key:"Escape",run:()=>(e.onclose(),!0)}]),Pe.updateListener.of(U=>{U.docChanged&&M(c,U.state.doc.toString(),!0)}),Pe.lineWrapping]}),W=new Pe({state:I,parent:i});return M(s,W,!0),W.focus(),v(W,Sr(()=>g(u))),requestAnimationFrame(()=>O()),()=>{M(s,void 0),W.destroy()}});function v(I,W){const U=W?.trim();if(!U)return;if(U==="markdoc"){I.dispatch({effects:[f.reconfigure(Ka()),d.reconfigure(Ac())]});return}I.dispatch({effects:d.reconfigure([])});const ae=J.matchLanguageName(EC,U,!0);ae&&ae.load().then(ce=>{I.dispatch({effects:f.reconfigure(ce)})}).catch(console.error)}function b(){g(c)!==e.code&&e.onchange(g(c)),e.onclose()}function _(I){const W=I.target;M(u,W.value,!0),e.onlanguagechange(g(u)),g(s)&&v(g(s),g(u))}var C=yV();let y;var w=q(C),S=R(q(w),2);S.__click=function(...I){e.onclose?.apply(this,I)};var A=R(w,2),x=q(A);x.__change=_;var k=q(x);k.value=k.__value="";var E=R(k);$t(E,17,()=>g(p),Kt,(I,W)=>{var U=bV(),ae=q(U),ce={};fe(()=>{Te(ae,g(W)),ce!==(ce=g(W))&&(U.value=(U.__value=g(W))??"")}),z(I,U)});var T;yf(x);var $=R(A,2);fn($,I=>i=I,()=>i);var L=R($,2),P=q(L);P.__click=b;var D=R(P,2);D.__click=function(...I){e.onremove?.apply(this,I)},fn(C,I=>r=I,()=>r),fe(()=>{y=Ze(C,1,"code-edit-popover svelte-rmoejq",null,y,{above:g(l),below:!g(l)}),Ar(C,`left: ${g(o)??""}px; top: ${g(a)??""}px`),T!==(T=g(u))&&(x.value=(x.__value=g(u))??"",rc(x,g(u)))}),z(n,C),vt()}Gt(["click","change"]);const In="";async function K0(){const n=await fetch(`${In}/api/tree`);if(!n.ok)throw new Error(`Failed to load tree: ${n.status}`);return n.json()}async function $p(n){const e=await fetch(`${In}/api/files/${encodeURIComponent(n)}`);if(!e.ok)throw new Error(`Failed to load file: ${e.status}`);return e.json()}async function _V(n,e){const t=await fetch(`${In}/api/files/${encodeURIComponent(n)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})});if(!t.ok)throw new Error(`Failed to save file: ${t.status}`)}async function kV(n,e){const t=await fetch(`${In}/api/preview`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n,content:e})});if(!t.ok)throw new Error(`Preview failed: ${t.status}`);return t.text()}async function xV(n,e){const t=await fetch(`${In}/api/preview-data`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n,content:e})});if(!t.ok)throw new Error(`Preview data failed: ${t.status}`);return t.json()}async function SV(){const n=await fetch(`${In}/api/config`);if(!n.ok)throw new Error(`Config failed: ${n.status}`);return n.json()}async function AV(){const n=await fetch(`${In}/api/route-rules`);if(!n.ok)throw new Error(`Failed to load route rules: ${n.status}`);return(await n.json()).routeRules}async function CV(n){const e=await fetch(`${In}/api/route-rules`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({routeRules:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to update route rules: ${e.status}`)}}async function TV(n){const e=await fetch(`${In}/api/pages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to create page: ${e.status}`)}return e.json()}async function J0(n){const e=await fetch(`${In}/api/directories`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to create directory: ${e.status}`)}return e.json()}async function PV(n,e){const t=await fetch(`${In}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:n,newName:e})});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error??`Failed to rename: ${t.status}`)}return t.json()}async function EV(n){const e=await fetch(`${In}/api/duplicate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to duplicate: ${e.status}`)}return e.json()}async function $V(n){const e=await fetch(`${In}/api/files/${encodeURIComponent(n)}`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to delete: ${e.status}`)}}async function QV(n){const e=await fetch(`${In}/api/toggle-draft`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to toggle draft: ${e.status}`)}return e.json()}async function LV(){const n=await fetch(`${In}/api/assets`);if(!n.ok)throw new Error(`Failed to load assets: ${n.status}`);return(await n.json()).images}async function MV(n){const e=new FormData;e.append("file",n);const t=await fetch(`${In}/api/assets/upload`,{method:"POST",body:e});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error??`Upload failed: ${t.status}`)}return t.json()}async function DV(){const n=await fetch(`${In}/api/runes`);if(!n.ok)throw new Error(`Failed to load runes: ${n.status}`);return(await n.json()).runes}async function qV(){const n=await fetch(`${In}/api/aggregated`);return n.ok?n.json():{}}function RV(n){const e=new EventSource(`${In}/api/events`);return e.addEventListener("file-changed",t=>n("file-changed",JSON.parse(t.data))),e.addEventListener("file-created",t=>n("file-created",JSON.parse(t.data))),e.addEventListener("file-deleted",t=>n("file-deleted",JSON.parse(t.data))),()=>e.close()}var IV=V('<div class="image-edit-modal__empty svelte-1yd8alm">Loading images...</div>'),NV=V('<div class="image-edit-modal__empty svelte-1yd8alm">No images found. Upload one to get started.</div>'),BV=V('<div class="image-edit-modal__empty svelte-1yd8alm"> </div>'),jV=V('<button><img loading="lazy" class="svelte-1yd8alm"/></button>'),zV=V('<div class="image-edit-modal__grid svelte-1yd8alm"></div>'),ZV=V('<div class="image-edit-backdrop svelte-1yd8alm" role="dialog" aria-modal="true" aria-label="Select image"><div><div class="image-edit-modal__header svelte-1yd8alm"><span class="image-edit-modal__label svelte-1yd8alm">image</span> <button class="image-edit-modal__close svelte-1yd8alm" aria-label="Close">&times;</button></div> <div class="image-edit-modal__search svelte-1yd8alm"><input class="image-edit-modal__search-input svelte-1yd8alm" type="text" placeholder="Search images..."/></div> <div class="image-edit-modal__grid-area svelte-1yd8alm"><!></div> <div class="image-edit-modal__upload-bar svelte-1yd8alm"><button class="image-edit-modal__upload-btn svelte-1yd8alm"> </button> <span class="image-edit-modal__upload-hint svelte-1yd8alm">or drag & drop</span> <input type="file" accept="image/*" style="display: none"/></div> <div class="image-edit-modal__footer svelte-1yd8alm"><div class="image-edit-modal__row svelte-1yd8alm"><label class="image-edit-modal__field-label svelte-1yd8alm" for="image-alt">Alt</label> <input id="image-alt" class="image-edit-modal__input svelte-1yd8alm" type="text" placeholder="Describe this image..."/></div> <div class="image-edit-modal__actions svelte-1yd8alm"><button class="image-edit-modal__btn image-edit-modal__btn--apply svelte-1yd8alm">Apply</button> <button class="image-edit-modal__btn image-edit-modal__btn--remove svelte-1yd8alm">Remove</button></div></div></div></div>');function XV(n,e){Ot(e,!0);let t,r,i,s=K(tn([])),o=K(!0),a=K(!1),l=K(""),c=K(tn(e.currentSrc)),u=K(tn(e.currentAlt)),f=K(!1);const d=me(()=>g(l)?g(s).filter(ge=>ge.name.toLowerCase().includes(g(l).toLowerCase())):g(s));to(()=>{h();function ge(Ce){Ce.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",ge),()=>document.removeEventListener("keydown",ge)});async function h(){M(o,!0);try{M(s,await LV(),!0)}catch{M(s,[],!0)}M(o,!1)}function m(ge){ge.target===ge.currentTarget&&e.onclose()}function p(ge){if(M(c,ge.path,!0),!g(u)){const Ce=ge.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");M(u,Ce,!0)}}function O(){g(c)&&e.onchange(g(c),g(u))}function v(){r?.click()}async function b(ge){const Ce=ge.target,tt=Ce.files?.[0];tt&&(await _(tt),Ce.value="")}async function _(ge){if(ge.type.startsWith("image/")){M(a,!0);try{const Ce=await MV(ge);if(await h(),M(c,Ce.path,!0),!g(u)){const tt=Ce.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");M(u,tt,!0)}}catch(Ce){console.error("Upload failed:",Ce)}M(a,!1)}}function C(ge){ge.preventDefault(),M(f,!0)}function y(){M(f,!1)}async function w(ge){ge.preventDefault(),M(f,!1);const Ce=ge.dataTransfer?.files[0];Ce&&await _(Ce)}function S(ge){ge.key==="Enter"&&(ge.preventDefault(),O())}var A=ZV();A.__click=m,A.__keydown=()=>{};var x=q(A);let k;var E=q(x),T=R(q(E),2);T.__click=function(...ge){e.onclose?.apply(this,ge)};var $=R(E,2),L=q($),P=R($,2),D=q(P);{var I=ge=>{var Ce=IV();z(ge,Ce)},W=ge=>{var Ce=NV();z(ge,Ce)},U=ge=>{var Ce=BV(),tt=q(Ce);fe(()=>Te(tt,`No images match "${g(l)??""}"`)),z(ge,Ce)},ae=ge=>{var Ce=zV();$t(Ce,21,()=>g(d),tt=>tt.path,(tt,rt)=>{var We=jV();let Ye;We.__click=()=>p(g(rt));var ze=q(We);fe(()=>{Ye=Ze(We,1,"image-edit-modal__thumb svelte-1yd8alm",null,Ye,{selected:g(c)===g(rt).path}),Et(We,"title",g(rt).name),Et(ze,"src",g(rt).path),Et(ze,"alt",g(rt).name)}),z(tt,We)}),z(ge,Ce)};ue(D,ge=>{g(o)?ge(I):g(d).length===0&&!g(l)?ge(W,1):g(d).length===0?ge(U,2):ge(ae,!1)})}var ce=R(P,2),ne=q(ce);ne.__click=v;var G=q(ne),oe=R(ne,4);oe.__change=b,fn(oe,ge=>r=ge,()=>r);var ie=R(ce,2),j=q(ie),te=R(q(j),2);te.__keydown=S,fn(te,ge=>i=ge,()=>i);var _e=R(j,2),Ee=q(_e);Ee.__click=O;var Re=R(Ee,2);Re.__click=function(...ge){e.onremove?.apply(this,ge)},fn(x,ge=>t=ge,()=>t),fe(()=>{k=Ze(x,1,"image-edit-modal svelte-1yd8alm",null,k,{"drag-over":g(f)}),ne.disabled=g(a),Te(G,g(a)?"Uploading...":"Upload image"),Ee.disabled=!g(c)}),ut("dragover",x,C),ut("dragleave",x,y),ut("drop",x,w),Qn(L,()=>g(l),ge=>M(l,ge)),Qn(te,()=>g(u),ge=>M(u,ge)),z(n,A),vt()}Gt(["click","keydown","change"]);var FV=V('<div class="icon-picker-modal__empty svelte-1rc2pkk">No icons available.</div>'),VV=V('<div class="icon-picker-modal__empty svelte-1rc2pkk"> </div>'),WV=V('<button><span class="icon-picker-modal__icon-svg svelte-1rc2pkk"><!></span> <span class="icon-picker-modal__icon-name svelte-1rc2pkk"> </span></button>'),YV=V('<div class="icon-picker-modal__group svelte-1rc2pkk"><div class="icon-picker-modal__group-label svelte-1rc2pkk"> </div> <div class="icon-picker-modal__grid svelte-1rc2pkk"></div></div>'),UV=V('<div class="icon-picker-backdrop svelte-1rc2pkk" role="dialog" aria-modal="true" aria-label="Select icon"><div class="icon-picker-modal svelte-1rc2pkk"><div class="icon-picker-modal__header svelte-1rc2pkk"><span class="icon-picker-modal__label svelte-1rc2pkk">icon</span> <button class="icon-picker-modal__close svelte-1rc2pkk" aria-label="Close">&times;</button></div> <div class="icon-picker-modal__search svelte-1rc2pkk"><input class="icon-picker-modal__search-input svelte-1rc2pkk" type="text" placeholder="Search icons..."/></div> <div class="icon-picker-modal__grid-area svelte-1rc2pkk"><!></div> <div class="icon-picker-modal__footer svelte-1rc2pkk"><button class="icon-picker-modal__btn icon-picker-modal__btn--apply svelte-1rc2pkk">Apply</button> <button class="icon-picker-modal__btn icon-picker-modal__btn--cancel svelte-1rc2pkk">Cancel</button></div></div></div>');function GV(n,e){Ot(e,!0);let t,r=K(tn(e.currentIcon)),i=K("");const s=me(()=>{const x=[];for(const[k,E]of Object.entries(e.icons))for(const[T,$]of Object.entries(E)){const L=k==="global"?T:`${k}/${T}`;x.push({name:T,qualifiedName:L,group:k,svg:$})}return x}),o=me(()=>g(i)?g(s).filter(x=>x.name.toLowerCase().includes(g(i).toLowerCase())||x.qualifiedName.toLowerCase().includes(g(i).toLowerCase())):g(s)),a=me(()=>{const x=new Map;for(const k of g(o)){const E=x.get(k.group)??[];E.push(k),x.set(k.group,E)}return x});to(()=>{t?.focus();function x(k){k.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)});function l(x){x.target===x.currentTarget&&e.onclose()}function c(x){M(r,x.qualifiedName,!0)}function u(){g(r)&&e.onchange(g(r))}var f=UV();f.__click=l,f.__keydown=()=>{};var d=q(f),h=q(d),m=R(q(h),2);m.__click=function(...x){e.onclose?.apply(this,x)};var p=R(h,2),O=q(p);fn(O,x=>t=x,()=>t);var v=R(p,2),b=q(v);{var _=x=>{var k=FV();z(x,k)},C=x=>{var k=VV(),E=q(k);fe(()=>Te(E,`No icons match "${g(i)??""}"`)),z(x,k)},y=x=>{var k=un(),E=ot(k);$t(E,17,()=>[...g(a)],([T,$])=>T,(T,$)=>{var L=me(()=>Dc(g($),2));let P=()=>g(L)[0],D=()=>g(L)[1];var I=YV(),W=q(I),U=q(W),ae=R(W,2);$t(ae,21,D,ce=>ce.qualifiedName,(ce,ne)=>{var G=WV();let oe;G.__click=()=>c(g(ne));var ie=q(G),j=q(ie);Xw(j,()=>g(ne).svg);var te=R(ie,2),_e=q(te);fe(()=>{oe=Ze(G,1,"icon-picker-modal__icon svelte-1rc2pkk",null,oe,{selected:g(r)===g(ne).qualifiedName}),Et(G,"title",g(ne).qualifiedName),Te(_e,g(ne).name)}),z(ce,G)}),fe(()=>Te(U,P())),z(T,I)}),z(x,k)};ue(b,x=>{g(s).length===0?x(_):g(o).length===0?x(C,1):x(y,!1)})}var w=R(v,2),S=q(w);S.__click=u;var A=R(S,2);A.__click=function(...x){e.onclose?.apply(this,x)},fe(()=>S.disabled=!g(r)),Qn(O,()=>g(i),x=>M(i,x)),z(n,f),vt()}Gt(["click","keydown"]);var HV=V('<div class="block-editor__empty svelte-10brcoc"><svg class="block-editor__empty-icon svelte-10brcoc" width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="8" width="36" height="32" rx="3"></rect><line x1="14" y1="18" x2="34" y2="18"></line><line x1="14" y1="24" x2="28" y2="24"></line><line x1="14" y1="30" x2="22" y2="30"></line></svg> <span class="block-editor__empty-text svelte-10brcoc">No content blocks yet</span> <span class="block-editor__empty-hint svelte-10brcoc">Use the + button to add your first block</span></div>'),KV=V('<span class="block-editor__fm-desc svelte-10brcoc"> </span>'),JV=V('<div class="block-editor__fm-header svelte-10brcoc"><div class="block-editor__fm-info svelte-10brcoc"><span class="block-editor__fm-title svelte-10brcoc"> </span> <!></div> <button title="Edit frontmatter"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M11.5 1.5l3 3L5 14H2v-3L11.5 1.5z"></path></svg> Edit</button></div>'),eW=V('<button class="block-editor__insert-marker block-editor__insert-marker--top svelte-10brcoc" title="Insert block above"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><line x1="5" y1="2" x2="5" y2="8"></line><line x1="2" y1="5" x2="8" y2="5"></line></svg></button> <button class="block-editor__insert-marker block-editor__insert-marker--bottom svelte-10brcoc" title="Insert block below"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><line x1="5" y1="2" x2="5" y2="8"></line><line x1="2" y1="5" x2="8" y2="5"></line></svg></button>',1),tW=V('<button class="block-editor__hover-label svelte-10brcoc"> </button>'),nW=V('<div><div class="block-editor__block-cell svelte-10brcoc"><!></div> <!> <!></div>'),rW=V('<div class="block-editor__popover-backdrop svelte-10brcoc"></div> <div class="block-editor__popover svelte-10brcoc"><!></div>',1),iW=V('<div class="block-editor svelte-10brcoc"><!> <div class="block-editor__stage svelte-10brcoc"><div class="block-editor__scroll svelte-10brcoc"><div class="block-editor__list-wrap svelte-10brcoc"><!> <!></div></div></div> <!> <!> <!> <!> <!> <!> <!> <!></div>');function sW(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"showInsertMenu",3,!0),s=Pt(e,"frontmatter",19,()=>({})),o=Pt(e,"readOnly",3,!1),a=Pt(e,"communityTags",3,null),l=Pt(e,"communityPostTransforms",3,null),c=Pt(e,"communityStyles",3,null),u=Pt(e,"aggregated",19,()=>({})),f=K(tn([])),d=me(()=>qI(e.runes)),h="";function m(H,ee){if(H.length===0)return;const de=new Set(H.map(nt=>nt.id)),be=new Set(ee.map(nt=>nt.id)),$e=H.filter(nt=>!be.has(nt.id)),it=ee.filter(nt=>!de.has(nt.id));if($e.length===0||it.length===0)return;const Je=[...$e];for(const nt of it){let ct=-1,Bt=1/0;for(let ht=0;ht<Je.length;ht++){const Pn=Je[ht],pn=Pn.type===nt.type?0:1e3,mt=Math.abs(Pn.startLine-nt.startLine)+pn;mt<Bt&&(Bt=mt,ct=ht)}ct>=0&&(nt.id=Je[ct].id,Je.splice(ct,1))}}mn(()=>{const H=e.bodyContent;if(H!==h){const ee=nA(H);m(g(f),ee),M(f,ee,!0),h=H,M(k,null),M(S,!1),M(T,null),M(ze,null),M(C,null)}});function p(){const H=Ym(g(f));h=H,e.onchange(H)}let O=me(()=>N1(g(f)));function v(H){const ee=g(O)[H];if(!ee)return[0,0];if(ee.type==="prose"){const be=ee.children[0],$e=ee.children[ee.children.length-1],it=g(f).indexOf(be),Je=g(f).indexOf($e);return[it,Je]}const de=g(f).indexOf(ee);return[de,de]}function b(H,ee){const[de,be]=v(H),$e=g(f).slice(de,be+1);m($e,ee.children),M(f,[...g(f).slice(0,de),...ee.children,...g(f).slice(be+1)],!0),p()}function _(H,ee){const de=g(O)[H];if(!de||de.type!=="prose")return;const be=de.children[ee.childIndex];if(!be)return;const[$e]=v(H),it=$e+ee.childIndex;if(be.type==="fence"){const ht=be,Pn=ht.code,pn=ht.language,mt=be.source.split(`
599
+ `)[0],Bn=mt.match(/^(`{3,}|~{3,})/),Xr=Bn?Bn[1]:"```";M(ke,{blockIndex:it,rect:ee.rect,mapping:{source:be.source,code:Pn,language:pn,opener:mt,delimiter:Xr}},!0);return}const Je=be.source.trim();let nt="",ct=Je;if(be.type==="heading"){const ht=Je.match(/^(#{1,6}\s+)(.*)/);ht&&(nt=ht[1],ct=ht[2])}else if(be.type==="quote"){const ht=Je.match(/^(>\s*)(.*)/);ht&&(nt=ht[1],ct=ht[2])}const Bt={dataName:be.type,text:vi(ct),source:Je,sourcePrefix:nt,inlineSource:ct};M(C,{editorIndex:H,childIndex:ee.childIndex,flatIndex:it,inlineSource:ct,rect:ee.rect,mapping:Bt},!0)}let C=K(null);function y(H){if(!g(C))return;const ee=g(f)[g(C).flatIndex];if(!ee)return;const de=g(C).mapping.sourcePrefix+H;let be;ee.type==="heading"?(be={...ee,text:H,source:""},be.source=Um(be)):be={...ee,source:de},M(C,{...g(C),inlineSource:H,mapping:{...g(C).mapping,text:vi(H),source:de,inlineSource:H}},!0),ie(g(C).flatIndex,be)}function w(){M(C,null)}let S=K(!1),A=me(()=>s().title||""),x=me(()=>()=>{const H=s().description||"";return H.length>80?H.slice(0,80)+"...":H}),k=K(null),E=K(null),T=K(null),$=K(null),L=K(0);const P=420,D=12;function I(H){if(!H.target.closest(".edit-panel__header")||H.target.closest("button"))return;H.preventDefault();const de=H.currentTarget,be=de.getBoundingClientRect(),$e=H.clientX,it=H.clientY,Je=be.left,nt=be.top;function ct(ht){de.style.left=`${Je+(ht.clientX-$e)}px`,de.style.top=`${nt+(ht.clientY-it)}px`}function Bt(){window.removeEventListener("mousemove",ct),window.removeEventListener("mouseup",Bt)}window.addEventListener("mousemove",ct),window.addEventListener("mouseup",Bt)}let W=me(()=>{if(!g(T))return"";const H=window.innerWidth,ee=window.innerHeight;let de=g(T).x+D;de+P>H-16&&(de=g(T).x-P-D),de<16&&(de=H-P-16);let be=g(T).y;const $e=ee-120,it=ee-Math.min(600,$e)-16;return be>it&&(be=it),be<60&&(be=60),`left: ${de}px; top: ${be}px; max-height: min(600px, ${$e}px);`});function U(H,ee,de){M(S,!1),g(O)[H]&&(g(k)===H?(M(k,null),M(T,null),M($,null)):(sh(L),M(k,H,!0),M(T,{x:ee,y:de},!0),M($,null)))}function ae(H,ee,de,be){M(S,!1),sh(L),M(k,H,!0),M(T,{x:ee,y:de},!0),M($,be??null,!0)}function ce(H){M(k,null),g(S)?(M(S,!1),M(T,null)):(M(S,!0),M(T,{x:H.clientX,y:H.clientY},!0))}function ne(H){if(!o()&&H.key==="Escape"){if(g(C)){w();return}(g(k)!==null||g(S))&&(M(k,null),M(S,!1),M(T,null),M($,null))}}function G(){(g(k)!==null||g(S))&&(M(k,null),M(S,!1),M(T,null),M($,null))}function oe(){g(T)&&M(T,{...g(T)},!0)}function ie(H,ee){M(f,g(f).map((de,be)=>be===H?ee:de),!0),p()}function j(H){const[ee,de]=v(H);g(k)!==null&&(g(k)===H?M(k,null):g(k)>H&&sh(k,-1)),M(f,[...g(f).slice(0,ee),...g(f).slice(de+1)],!0),p()}let te=K(null),_e=K(null);function Ee(H,ee){M(te,ee,!0),M(k,null),M(S,!1),M(T,null),H.dataTransfer&&(H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",String(ee)))}function Re(H,ee){H.preventDefault(),H.dataTransfer&&(H.dataTransfer.dropEffect="move"),M(_e,ee,!0)}function ge(H,ee){if(H.preventDefault(),g(te)!==null&&g(te)!==ee){const[de,be]=v(g(te)),$e=g(f).slice(de,be+1),it=[...g(f).slice(0,de),...g(f).slice(be+1)];let Je;if(ee>=g(O).length)Je=it.length;else{const[nt]=v(ee);Je=nt>be?nt-$e.length:nt}if(it.splice(Je,0,...$e),M(f,it,!0),g(k)!==null)if(g(k)===g(te))M(k,ee>g(te)?ee-1:ee,!0);else{let nt=g(k);g(te)<g(k)&&ee>=g(k)?nt--:g(te)>g(k)&&ee<=g(k)&&nt++,M(k,nt,!0)}p()}M(te,null),M(_e,null)}let Ce=K(!1),tt=K(null);function rt(H){M(tt,H,!0),M(Ce,!0)}function We(){M(Ce,!1),M(tt,null)}function Ye(H,ee){let de;const be=`blk_new_${Date.now()}`;switch(H){case"heading":de={id:be,type:"heading",source:"## New heading",startLine:0,endLine:0,level:2,text:"New heading"};break;case"paragraph":de={id:be,type:"paragraph",source:"New paragraph text.",startLine:0,endLine:0};break;case"fence":de={id:be,type:"fence",source:"```\n\n```",startLine:0,endLine:0,language:"",code:""};break;case"hr":de={id:be,type:"hr",source:"---",startLine:0,endLine:0};break;case"rune":{const Je=ee??"hint",nt=g(d).get(Je),ct=nt?.selfClosing??!1,Bt={};if(nt)for(const[pn,mt]of Object.entries(nt.attributes))mt.required&&(Bt[pn]=mt.values?.[0]??"");const ht=Object.entries(Bt).map(([pn,mt])=>`${pn}="${mt}"`).join(" "),Pn=ht?" "+ht:"";if(ct)de={id:be,type:"rune",source:`{% ${Je}${Pn} /%}`,startLine:0,endLine:0,runeName:Je,selfClosing:!0,attributes:Bt,innerContent:""};else{const pn=nt?.example?RI(nt.example,Je):"";de={id:be,type:"rune",source:`{% ${Je}${Pn} %}
600
+ ${pn}
601
+ {% /${Je} %}`,startLine:0,endLine:0,runeName:Je,selfClosing:!1,attributes:Bt,innerContent:pn}}break}}const $e=g(tt)??g(O).length;let it;if($e>=g(O).length)it=g(f).length;else{const[Je]=v($e);it=Je}if(M(f,[...g(f).slice(0,it),de,...g(f).slice(it)],!0),M(tt,null),M(Ce,!1),M(S,!1),H==="rune"){const Je=N1(g(f));M(k,Je.findIndex(nt=>nt.type==="rune"&&nt===g(f)[it]),!0),g(k)===-1&&M(k,null)}else M(k,null);p()}let ze=K(null);function xe(H,ee){const de=g(O)[H];if(!de||de.type!=="rune")return;const[be]=v(H),$e=g(f)[be];if($e.type!=="rune")return;const it=$e,Je=be;if(ee.editType==="link"){const ct=EB(it.innerContent,ee.text,ee.href??"");if(!ct)return;M(lt,{blockIndex:Je,rect:ee.rect,mapping:ct},!0);return}if(ee.editType==="code"){const ct=QB(it.innerContent,ee.text);if(!ct)return;M(ke,{blockIndex:Je,rect:ee.rect,mapping:ct},!0);return}if(ee.editType==="image"){const ct=ee.href??"",Bt=DB(it.innerContent,ct);if(!Bt)return;M(se,{blockIndex:Je,mapping:Bt},!0);return}if(ee.editType==="icon"){const ct=ee.iconName??"",Bt=RB(it.innerContent,ct);if(!Bt)return;M(Qe,{blockIndex:Je,mapping:Bt},!0);return}const nt=LA(it.innerContent,ee.dataName,ee.text);nt&&M(ze,{blockIndex:Je,dataName:ee.dataName,inlineSource:nt.inlineSource,rect:ee.rect,mapping:nt},!0)}function De(H){if(!g(ze))return;const ee=g(f)[g(ze).blockIndex];if(ee.type!=="rune")return;const de=ee,be=PB(de.innerContent,g(ze).mapping,H),$e={...de,innerContent:be,source:""};$e.source=Hn($e),M(ze,{...g(ze),inlineSource:H,mapping:{...g(ze).mapping,text:vi(H),source:g(ze).mapping.sourcePrefix+H,inlineSource:H}},!0),ie(g(ze).blockIndex,$e)}function Ue(){M(ze,null)}let lt=K(null);function et(H,ee){if(!g(lt))return;const de=g(f)[g(lt).blockIndex];if(de.type!=="rune")return;const be=de,$e=$B(be.innerContent,g(lt).mapping,H,ee),it={...be,innerContent:$e,source:""};it.source=Hn(it),ie(g(lt).blockIndex,it)}function Qt(){if(!g(lt))return;const H=g(lt).blockIndex,ee=g(f)[H];if(ee.type!=="rune")return;const de=ee,be=de.innerContent.replace(g(lt).mapping.source+`
602
+ `,"").replace(g(lt).mapping.source,""),$e={...de,innerContent:be,source:""};$e.source=Hn($e),M(lt,null),ie(H,$e)}function nn(){M(lt,null)}let ke=K(null);function Ft(H){if(!g(ke))return;const ee=g(f)[g(ke).blockIndex];if(ee.type==="fence"){const Je={...ee,code:H,source:""};Je.source=id(Je),ie(g(ke).blockIndex,Je);return}if(ee.type!=="rune")return;const de=ee,be=LB(de.innerContent,g(ke).mapping,H),$e={...de,innerContent:be,source:""};$e.source=Hn($e),ie(g(ke).blockIndex,$e)}function wt(){if(!g(ke))return;const H=g(ke).blockIndex,ee=g(f)[H];if(ee.type==="fence"){M(ke,null),M(f,g(f).filter((it,Je)=>Je!==H),!0),p();return}if(ee.type!=="rune")return;const de=ee,be=de.innerContent.replace(g(ke).mapping.source+`
603
+ `,"").replace(g(ke).mapping.source,""),$e={...de,innerContent:be,source:""};$e.source=Hn($e),M(ke,null),ie(H,$e)}function Ht(){M(ke,null)}function xt(H){if(!g(ke))return;const ee=g(f)[g(ke).blockIndex];if(ee.type==="fence"){const ht={...ee,language:H,source:""};ht.source=id(ht);const pn=g(ke).mapping.opener.slice(g(ke).mapping.delimiter.length).replace(/^\w*/,"").trim(),mt=g(ke).mapping.delimiter+H+(pn?" "+pn:""),Bn=mt+`
604
+ `+g(ke).mapping.code+`
605
+ `+g(ke).mapping.delimiter;M(ke,{...g(ke),mapping:{...g(ke).mapping,language:H,opener:mt,source:Bn}},!0),ie(g(ke).blockIndex,ht);return}if(ee.type!=="rune")return;const de=ee,be=MB(de.innerContent,g(ke).mapping,H),$e={...de,innerContent:be,source:""};$e.source=Hn($e);const Je=g(ke).mapping.opener.slice(g(ke).mapping.delimiter.length).replace(/^\w*/,"").trim(),nt=g(ke).mapping.delimiter+H+(Je?" "+Je:""),ct=nt+`
606
+ `+g(ke).mapping.code+`
607
+ `+g(ke).mapping.delimiter;M(ke,{...g(ke),mapping:{...g(ke).mapping,language:H,opener:nt,source:ct}},!0),ie(g(ke).blockIndex,$e)}let se=K(null);function Oe(H,ee){if(!g(se))return;const de=g(f)[g(se).blockIndex];if(de.type!=="rune")return;const be=de,$e=qB(be.innerContent,g(se).mapping,ee,H),it={...be,innerContent:$e,source:""};it.source=Hn(it),ie(g(se).blockIndex,it)}function we(){if(!g(se))return;const H=g(se).blockIndex,ee=g(f)[H];if(ee.type!=="rune")return;const de=ee,be=de.innerContent.replace(g(se).mapping.source+`
608
+ `,"").replace(g(se).mapping.source,""),$e={...de,innerContent:be,source:""};$e.source=Hn($e),M(se,null),ie(H,$e)}function Ae(){M(se,null)}let Qe=K(null);function St(H){if(!g(Qe))return;const ee=g(f)[g(Qe).blockIndex];if(ee.type!=="rune")return;const de=ee,be=IB(de.innerContent,g(Qe).mapping,H),$e={...de,innerContent:be,source:""};$e.source=Hn($e),ie(g(Qe).blockIndex,$e)}function pt(){M(Qe,null)}function Ke(H,ee,de,be){if(g(k)===null)return;const[$e]=v(g(k));M(ke,null),M(ze,{blockIndex:$e,dataName:H,inlineSource:ee,rect:de,mapping:be},!0)}function At(H,ee,de,be){if(g(k)===null)return;const[$e]=v(g(k));M(ze,null),M(ke,{blockIndex:$e,rect:de,mapping:be},!0)}let bt=me(()=>{const H=new Map;for(const ee of e.runes){const de=H.get(ee.category)??[];de.push(ee),H.set(ee.category,de)}return H});var dt=iW();ut("keydown",Mo,ne),ut("resize",Mo,oe);var Ct=q(dt);{var xn=H=>{var ee=HV();z(H,ee)};ue(Ct,H=>{g(f).length===0&&!o()&&H(xn)})}var Vt=R(Ct,2),rn=q(Vt),_t=q(rn),Jt=q(_t);{var Nn=H=>{var ee=JV(),de=q(ee),be=q(de),$e=q(be),it=R(be,2);{var Je=ht=>{var Pn=KV(),pn=q(Pn);fe(mt=>Te(pn,mt),[()=>g(x)()]),z(ht,Pn)},nt=me(()=>g(x)());ue(it,ht=>{g(nt)&&ht(Je)})}var ct=R(de,2);let Bt;ct.__click=ht=>ce(ht),fe(()=>{Te($e,g(A)||"Untitled"),Bt=Ze(ct,1,"block-editor__fm-edit svelte-10brcoc",null,Bt,{active:g(S)})}),z(H,ee)};ue(Jt,H=>{o()||H(Nn)})}var Gn=R(Jt,2);$t(Gn,19,()=>g(O),H=>H.id,(H,ee,de)=>{var be=nW();let $e;var it=q(be),Je=q(it);{var nt=mt=>{{let Bn=me(()=>o()?void 0:cn=>_(g(de),cn)),Xr=me(()=>o()?void 0:cn=>U(g(de),cn.x,cn.y)),Pr=me(()=>o()?void 0:cn=>Ee(cn,g(de))),Uo=me(()=>o()?void 0:cn=>Re(cn,g(de))),Go=me(()=>o()?void 0:cn=>ge(cn,g(de)));AX(mt,{get block(){return g(ee)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return t()},get highlightTransform(){return r()},get communityTags(){return a()},get communityPostTransforms(){return l()},get communityStyles(){return c()},get aggregated(){return u()},get readOnly(){return o()},get onsectionclick(){return g(Bn)},get onblockclick(){return g(Xr)},get ondragstart(){return g(Pr)},get ondragover(){return g(Uo)},get ondrop(){return g(Go)}})}},ct=mt=>{{let Bn=me(()=>o()?void 0:cn=>xe(g(de),cn)),Xr=me(()=>o()?void 0:cn=>ae(g(de),cn.x,cn.y,cn.nestedRuneIndex)),Pr=me(()=>o()?void 0:cn=>Ee(cn,g(de))),Uo=me(()=>o()?void 0:cn=>Re(cn,g(de))),Go=me(()=>o()?void 0:cn=>ge(cn,g(de)));_X(mt,{get block(){return g(ee)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return t()},get highlightTransform(){return r()},get communityTags(){return a()},get communityPostTransforms(){return l()},get communityStyles(){return c()},get aggregated(){return u()},get readOnly(){return o()},get onsectionclick(){return g(Bn)},get onruneclick(){return g(Xr)},get ondragstart(){return g(Pr)},get ondragover(){return g(Uo)},get ondrop(){return g(Go)}})}};ue(Je,mt=>{g(ee).type==="prose"?mt(nt):mt(ct,!1)})}var Bt=R(it,2);{var ht=mt=>{var Bn=eW(),Xr=ot(Bn);Xr.__click=()=>rt(g(de));var Pr=R(Xr,2);Pr.__click=()=>rt(g(de)+1),z(mt,Bn)};ue(Bt,mt=>{!o()&&i()&&mt(ht)})}var Pn=R(Bt,2);{var pn=mt=>{var Bn=tW();Bn.__click=Pr=>U(g(de),Pr.clientX,Pr.clientY);var Xr=q(Bn);fe(Pr=>{Et(Bn,"aria-pressed",g(k)===g(de)),Te(Xr,Pr)},[()=>hv(g(ee))]),z(mt,Bn)};ue(Pn,mt=>{o()||mt(pn)})}fe(()=>$e=Ze(be,1,"block-editor__row svelte-10brcoc",null,$e,{hovered:!o()&&g(E)===g(de),active:!o()&&g(k)===g(de),"drag-source":!o()&&g(te)===g(de),"drag-over":!o()&&g(_e)===g(de)&&g(te)!==g(de)})),ut("mouseenter",be,()=>{o()||M(E,g(de),!0)}),ut("mouseleave",be,()=>{!o()&&g(E)===g(de)&&M(E,null)}),z(H,be)});var ur=R(Vt,2);{var dn=H=>{var ee=rW(),de=ot(ee);de.__mousedown=()=>{M(k,null),M(S,!1),M(T,null),M($,null)};var be=R(de,2);be.__mousedown=I;var $e=q(be);{var it=ct=>{nV(ct,{onclose:()=>{M(S,!1),M(T,null)}})},Je=ct=>{const Bt=me(()=>g(f)[v(g(k))[0]]);var ht=un(),Pn=ot(ht);ib(Pn,()=>g(L),pn=>{WF(pn,{get block(){return g(Bt)},get runeMap(){return g(d)},runes:()=>e.runes,get aggregated(){return u()},get initialRuneIndex(){return g($)},onupdate:mt=>ie(v(g(k))[0],mt),onremove:()=>{const mt=g(k);M(k,null),M(T,null),M($,null),j(mt)},onclose:()=>{M(k,null),M(T,null),M($,null)},oneditfield:Ke,oneditcode:At})}),z(ct,ht)},nt=ct=>{const Bt=me(()=>g(O)[g(k)]);var ht=un(),Pn=ot(ht);ib(Pn,()=>g(L),pn=>{KF(pn,{get block(){return g(Bt)},runes:()=>e.runes,get aggregated(){return u()},onupdate:mt=>b(g(k),mt),onremove:()=>{const mt=g(k);M(k,null),M(T,null),j(mt)},onclose:()=>{M(k,null),M(T,null)}})}),z(ct,ht)};ue($e,ct=>{g(S)?ct(it):g(k)!==null&&g(O)[g(k)]?.type==="rune"?ct(Je,1):g(k)!==null&&g(O)[g(k)]?.type==="prose"&&ct(nt,2)})}fe(()=>Ar(be,g(W))),z(H,ee)};ue(ur,H=>{!o()&&(g(k)!==null||g(S))&&H(dn)})}var Nt=R(ur,2);{var Z=H=>{pV(H,{get runes(){return e.runes},get runesByCategory(){return g(bt)},oninsert:Ye,onclose:We})};ue(Nt,H=>{g(Ce)&&H(Z)})}var Xe=R(Nt,2);{var hn=H=>{H0(H,{get anchorRect(){return g(ze).rect},get dataName(){return g(ze).dataName},get inlineSource(){return g(ze).inlineSource},onchange:De,onclose:Ue})};ue(Xe,H=>{g(ze)&&H(hn)})}var Sn=R(Xe,2);{var Ge=H=>{vV(H,{get anchorRect(){return g(lt).rect},get text(){return g(lt).mapping.text},get href(){return g(lt).mapping.href},onchange:et,onremove:Qt,onclose:nn})};ue(Sn,H=>{g(lt)&&H(Ge)})}var fr=R(Sn,2);{var Ti=H=>{wV(H,{get anchorRect(){return g(ke).rect},get code(){return g(ke).mapping.code},get language(){return g(ke).mapping.language},onchange:Ft,onlanguagechange:xt,onremove:wt,onclose:Ht})};ue(fr,H=>{g(ke)&&H(Ti)})}var Mn=R(fr,2);{var Ui=H=>{XV(H,{get currentSrc(){return g(se).mapping.src},get currentAlt(){return g(se).mapping.alt},onchange:(ee,de)=>{Oe(ee,de),Ae()},onremove:we,onclose:Ae})};ue(Mn,H=>{g(se)&&H(Ui)})}var Dn=R(Mn,2);{var ks=H=>{{let ee=me(()=>e.themeConfig?.icons??{});GV(H,{get icons(){return g(ee)},get currentIcon(){return g(Qe).mapping.name},onchange:de=>{St(de),pt()},onclose:pt})}};ue(Dn,H=>{g(Qe)&&H(ks)})}var Gi=R(Dn,2);{var dr=H=>{H0(H,{get anchorRect(){return g(C).rect},get dataName(){return g(C).mapping.dataName},get inlineSource(){return g(C).inlineSource},onchange:y,onclose:w})};ue(Gi,H=>{g(C)&&H(dr)})}ut("scroll",_t,G),z(n,dt),vt()}Gt(["click","mousedown"]);const ew=/\{%\s*region\s+([^%]*?)%\}([\s\S]*?)\{%\s*\/region\s*%\}/g,tw=/(\w+)="([^"]*)"/g;function oW(n){const e=[];let t;for(ew.lastIndex=0;(t=ew.exec(n))!==null;){const r=t[1],i=t[2],s={};let o;for(tw.lastIndex=0;(o=tw.exec(r))!==null;)s[o[1]]=o[2];const a=s.name||"",l=s.mode||"replace";let c=i;c.startsWith(`
609
+ `)&&(c=c.slice(1)),c.endsWith(`
610
+ `)&&(c=c.slice(0,-1)),e.push({name:a,mode:l,content:c})}return{regions:e}}function aW(n){const e=["{% layout %}"];for(const t of n.regions){const r=t.mode!=="replace"?` mode="${t.mode}"`:"";e.push(`{% region name="${t.name}"${r} %}`),e.push(t.content),e.push("{% /region %}"),e.push("")}return e.push("{% /layout %}"),e.join(`
611
+ `)}const jv=/\{%\s*nav\s*%\}/,$C=/\{%\s*\/nav\s*%\}/;function lW(n){return jv.test(n)}function cW(n){const e=jv.exec(n);if(!e)return null;const t=e.index+e[0].length,r=$C.exec(n.slice(t));if(!r)return null;let i=n.slice(t,t+r.index);return i.startsWith(`
612
+ `)&&(i=i.slice(1)),i.endsWith(`
613
+ `)&&(i=i.slice(0,-1)),i}function uW(n,e){const t=jv.exec(n);if(!t)return n;const r=t.index+t[0].length,i=$C.exec(n.slice(r));if(!i)return n;const s=n.slice(0,r),o=n.slice(r+i.index);return`${s}
614
+ ${e}
615
+ ${o}`}function fW(n){const e=n.split(`
616
+ `),t=[],r=[];let i=null;for(const s of e){const o=s.trim(),a=o.match(/^##\s+(.+)$/);if(a){i={title:a[1],items:[]},t.push(i);continue}const l=o.match(/^-\s+(.+)$/);if(l){const c=l[1].trim();i?i.items.push(c):r.push(c);continue}}return{groups:t,ungrouped:r}}function dW(n){const e=[];for(const t of n.ungrouped)e.push(`- ${t}`);n.ungrouped.length>0&&n.groups.length>0&&e.push("");for(let t=0;t<n.groups.length;t++){const r=n.groups[t];e.push(`## ${r.title}`),e.push("");for(const i of r.items)e.push(`- ${i}`);t<n.groups.length-1&&e.push("")}return e.join(`
617
+ `)}var hW=V('<input class="nav-item__input svelte-8xlxf2" type="text"/>'),pW=V('<button class="nav-item__slug svelte-8xlxf2"> </button>'),mW=V('<div class="nav-item svelte-8xlxf2"><button class="nav-item__grip svelte-8xlxf2" title="Drag to reorder"><svg width="10" height="14" viewBox="0 0 10 14" fill="none"><circle cx="3" cy="3" r="1.2" fill="currentColor"></circle><circle cx="7" cy="3" r="1.2" fill="currentColor"></circle><circle cx="3" cy="7" r="1.2" fill="currentColor"></circle><circle cx="7" cy="7" r="1.2" fill="currentColor"></circle><circle cx="3" cy="11" r="1.2" fill="currentColor"></circle><circle cx="7" cy="11" r="1.2" fill="currentColor"></circle></svg></button> <!> <button class="nav-item__remove svelte-8xlxf2" title="Remove item"><svg width="12" height="12" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div>');function gW(n,e){Ot(e,!0);let t=K(!1),r=K(tn(e.slug));function i(){M(r,e.slug,!0),M(t,!0)}function s(){const h=g(r).trim();h&&h!==e.slug&&e.onchange(h),M(t,!1)}function o(h){h.key==="Enter"?(h.preventDefault(),s()):h.key==="Escape"&&M(t,!1)}var a=mW(),l=q(a);l.__pointerdown=function(...h){e.ondragstart?.apply(this,h)};var c=R(l,2);{var u=h=>{var m=hW();m.__keydown=o,gs(m),ut("blur",m,s),Qn(m,()=>g(r),p=>M(r,p)),z(h,m)},f=h=>{var m=pW();m.__dblclick=i;var p=q(m);fe(()=>Te(p,e.slug)),z(h,m)};ue(c,h=>{g(t)?h(u):h(f,!1)})}var d=R(c,2);d.__click=function(...h){e.ondelete?.apply(this,h)},z(n,a),vt()}Gt(["pointerdown","keydown","dblclick","click"]);var OW=V('<div role="listitem"><!></div>'),vW=V('<div class="nav-editor__add-item svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Page slug..."/></div>'),bW=V('<button class="nav-editor__add-item-btn svelte-1h0zo48">+ Add item</button>'),yW=V('<div class="nav-editor__group svelte-1h0zo48"><div class="nav-editor__group-header svelte-1h0zo48"><input class="nav-editor__group-title svelte-1h0zo48" type="text" placeholder="Group title"/> <button class="nav-editor__group-delete svelte-1h0zo48" title="Delete group"><svg width="12" height="12" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div> <div class="nav-editor__items svelte-1h0zo48"></div> <!></div>'),wW=V('<div class="nav-editor__add-group svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Group title..."/></div>'),_W=V('<button class="nav-editor__add-group-btn svelte-1h0zo48">+ Add group</button>'),kW=V('<div class="nav-editor svelte-1h0zo48"><!> <!></div>');function xW(n,e){Ot(e,!0);let t=K(tn({groups:[],ungrouped:[]})),r=K(null),i=K(""),s=K(""),o=K(!1),a=K(null),l=K(null);mn(()=>{const k=cW(e.content);k!==null&&M(t,fW(k),!0)});function c(){const k=dW(g(t)),E=uW(e.content,k);e.onchange(E)}function u(k,E){g(t).groups[k]={...g(t).groups[k],title:E},M(t,{...g(t)},!0),c()}function f(k){const E=g(t).groups[k];E.items.length>0&&!confirm(`Delete group "${E.title}" and its ${E.items.length} items?`)||(g(t).groups.splice(k,1),M(t,{...g(t)},!0),c())}function d(){const k=g(s).trim();k&&(g(t).groups.push({title:k,items:[]}),M(t,{...g(t)},!0),M(s,""),M(o,!1),c())}function h(k,E,T){g(t).groups[k].items[E]=T,M(t,{...g(t)},!0),c()}function m(k,E){g(t).groups[k].items.splice(E,1),M(t,{...g(t)},!0),c()}function p(k){const E=g(i).trim();E&&(g(t).groups[k].items.push(E),M(t,{...g(t)},!0),M(i,""),M(r,null),c())}function O(k,E){k.key==="Enter"?(k.preventDefault(),p(E)):k.key==="Escape"&&(M(r,null),M(i,""))}function v(k){k.key==="Enter"?(k.preventDefault(),d()):k.key==="Escape"&&(M(o,!1),M(s,""))}function b(k,E,T){k.currentTarget.setPointerCapture(k.pointerId),M(a,{groupIdx:E,itemIdx:T},!0)}function _(k,E,T){g(a)&&M(l,{groupIdx:E,itemIdx:T},!0)}function C(k){if(!g(a)||!g(l)){M(a,null),M(l,null);return}const{groupIdx:E,itemIdx:T}=g(a),{groupIdx:$,itemIdx:L}=g(l);if(E===$&&T===L){M(a,null),M(l,null);return}const[P]=g(t).groups[E].items.splice(T,1);let D=L;E===$&&T<L&&(D=L-1),g(t).groups[$].items.splice(D,0,P),M(t,{...g(t)},!0),M(a,null),M(l,null),c()}var y=kW(),w=q(y);$t(w,17,()=>g(t).groups,Kt,(k,E,T)=>{var $=yW(),L=q($),P=q(L);P.__input=ce=>u(T,ce.target.value);var D=R(P,2);D.__click=()=>f(T);var I=R(L,2);$t(I,21,()=>g(E).items,Kt,(ce,ne,G)=>{var oe=OW();let ie;oe.__pointermove=te=>_(te,T,G),oe.__pointerup=C;var j=q(oe);gW(j,{get slug(){return g(ne)},onchange:te=>h(T,G,te),ondelete:()=>m(T,G),ondragstart:te=>b(te,T,G)}),fe(()=>ie=Ze(oe,1,"nav-editor__item-wrapper svelte-1h0zo48",null,ie,{"drag-over":g(l)?.groupIdx===T&&g(l)?.itemIdx===G})),z(ce,oe)});var W=R(I,2);{var U=ce=>{var ne=vW(),G=q(ne);G.__keydown=oe=>O(oe,T),gs(G),ut("blur",G,()=>{M(r,null),M(i,"")}),Qn(G,()=>g(i),oe=>M(i,oe)),z(ce,ne)},ae=ce=>{var ne=bW();ne.__click=()=>{M(r,T,!0),M(i,"")},z(ce,ne)};ue(W,ce=>{g(r)===T?ce(U):ce(ae,!1)})}fe(()=>ln(P,g(E).title)),z(k,$)});var S=R(w,2);{var A=k=>{var E=wW(),T=q(E);T.__keydown=v,gs(T),ut("blur",T,()=>{M(o,!1),M(s,"")}),Qn(T,()=>g(s),$=>M(s,$)),z(k,E)},x=k=>{var E=_W();E.__click=()=>{M(o,!0),M(s,"")},z(k,E)};ue(S,k=>{g(o)?k(A):k(x,!1)})}z(n,y),vt()}Gt(["input","click","pointermove","pointerup","keydown"]);var SW=V("<button> </button>"),AW=V("<button> </button>"),CW=V('<textarea class="region-card__textarea svelte-1ah7fba" placeholder="Region content..." rows="4"></textarea>'),TW=V('<div class="region-card svelte-1ah7fba"><div class="region-card__header svelte-1ah7fba"><div class="region-card__name-row svelte-1ah7fba"><input class="region-card__name svelte-1ah7fba" type="text" placeholder="Region name"/> <div class="region-card__mode svelte-1ah7fba"></div></div> <div class="region-card__actions svelte-1ah7fba"><!> <button class="region-card__delete-btn svelte-1ah7fba" title="Delete region"><svg width="14" height="14" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div></div> <div class="region-card__body svelte-1ah7fba"><!></div></div>');function PW(n,e){Ot(e,!0);let t=K(!1),r=me(()=>lW(e.region.content));function i(A){const x=A.target;e.onchange({...e.region,name:x.value})}function s(A){e.onchange({...e.region,mode:A})}function o(A){const x=A.target;e.onchange({...e.region,content:x.value})}function a(A){e.onchange({...e.region,content:A})}function l(){e.region.content.trim()&&!confirm(`Delete region "${e.region.name}"? Its content will be lost.`)||e.ondelete()}function c(A){A.style.height="auto",A.style.height=`${A.scrollHeight}px`}function u(A){const x=A.target;c(x),o(A)}var f=TW(),d=q(f),h=q(d),m=q(h);m.__input=i;var p=R(m,2);$t(p,20,()=>["replace","prepend","append"],Kt,(A,x)=>{var k=SW();let E;k.__click=()=>s(x);var T=q(k);fe(()=>{E=Ze(k,1,"region-card__mode-btn svelte-1ah7fba",null,E,{active:e.region.mode===x}),Te(T,x)}),z(A,k)});var O=R(h,2),v=q(O);{var b=A=>{var x=AW();let k;x.__click=()=>{M(t,!g(t))};var E=q(x);fe(()=>{k=Ze(x,1,"region-card__toggle-btn svelte-1ah7fba",null,k,{active:g(t)}),Te(E,g(t)?"Text":"Visual")}),z(A,x)};ue(v,A=>{g(r)&&A(b)})}var _=R(v,2);_.__click=l;var C=R(d,2),y=q(C);{var w=A=>{xW(A,{get content(){return e.region.content},onchange:a})},S=A=>{var x=CW();x.__input=u,oP(x,k=>c?.(k)),fe(()=>ln(x,e.region.content)),z(A,x)};ue(y,A=>{g(r)&&g(t)?A(w):A(S,!1)})}fe(()=>ln(m,e.region.name)),z(n,f),vt()}Gt(["input","click"]);var EW=V('<span class="layout-editor__path svelte-u2phg9"> </span>'),$W=V('<div class="layout-editor__raw svelte-u2phg9"><!></div>'),QW=V('<div class="layout-editor__empty svelte-u2phg9"><p class="svelte-u2phg9">No regions defined. Add a region to get started.</p></div>'),LW=V('<div class="layout-editor__regions svelte-u2phg9"><!> <!> <button class="layout-editor__add-btn svelte-u2phg9"><svg width="14" height="14" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg> Add Region</button></div>'),MW=V('<div class="layout-editor svelte-u2phg9"><div class="layout-editor__header svelte-u2phg9"><div class="layout-editor__title-row svelte-u2phg9"><svg class="layout-editor__icon svelte-u2phg9" width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="1" width="14" height="14" rx="2" stroke="currentColor" stroke-width="1.2"></rect><path d="M1 5h14M6 5v10" stroke="currentColor" stroke-width="1.2"></path></svg> <span class="layout-editor__title svelte-u2phg9">Layout</span> <!></div> <div class="layout-editor__mode-track svelte-u2phg9"><button>Visual</button> <button>Raw</button></div></div> <!></div>');function DW(n,e){Ot(e,!0);let t=K(!1),r=K(tn({regions:[]})),i="";mn(()=>{const w=X.editorContent;w!==i&&(M(r,oW(w),!0),i=w)});function s(){const w=aW(g(r));i=w,X.editorContent=w,X.bodyContent=w}function o(w,S){g(r).regions[w]=S,M(r,{...g(r)},!0),s()}function a(w){g(r).regions.splice(w,1),M(r,{...g(r)},!0),s()}function l(){g(r).regions.push({name:"",mode:"replace",content:""}),M(r,{...g(r)},!0),s()}var c=MW(),u=q(c),f=q(u),d=R(q(f),4);{var h=w=>{var S=EW(),A=q(S);fe(()=>Te(A,X.currentPath)),z(w,S)};ue(d,w=>{X.currentPath&&w(h)})}var m=R(f,2),p=q(m);let O;p.__click=()=>{M(t,!1)};var v=R(p,2);let b;v.__click=()=>{M(t,!0)};var _=R(u,2);{var C=w=>{var S=$W(),A=q(S);eA(A,{}),z(w,S)},y=w=>{var S=LW(),A=q(S);{var x=T=>{var $=QW();z(T,$)};ue(A,T=>{g(r).regions.length===0&&T(x)})}var k=R(A,2);$t(k,17,()=>g(r).regions,Kt,(T,$,L)=>{PW(T,{get region(){return g($)},onchange:P=>o(L,P),ondelete:()=>a(L)})});var E=R(k,2);E.__click=l,z(w,S)};ue(_,w=>{g(t)?w(C):w(y,!1)})}fe(()=>{O=Ze(p,1,"layout-editor__mode-btn svelte-u2phg9",null,O,{active:!g(t)}),b=Ze(v,1,"layout-editor__mode-btn svelte-u2phg9",null,b,{active:g(t)})}),z(n,c),vt()}Gt(["click"]);var qW=V('<div class="preview__empty svelte-1iqwj2q"><svg class="preview__empty-icon svelte-1iqwj2q" width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="8" width="40" height="32" rx="3" class="svelte-1iqwj2q"></rect><line x1="4" y1="16" x2="44" y2="16" class="svelte-1iqwj2q"></line><circle cx="10" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><circle cx="15" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><circle cx="20" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><line x1="14" y1="26" x2="34" y2="26" class="svelte-1iqwj2q"></line><line x1="14" y1="32" x2="28" y2="32" class="svelte-1iqwj2q"></line></svg> <span class="preview__empty-text svelte-1iqwj2q">Select a page to preview</span></div>'),RW=V('<div class="preview__progress svelte-1iqwj2q"></div>'),IW=V('<iframe title="Preview" src="/preview/" class="preview__iframe svelte-1iqwj2q"></iframe>'),NW=V('<iframe title="Preview" class="preview__iframe svelte-1iqwj2q"></iframe>'),BW=V('<div class="preview__container svelte-1iqwj2q"><!> <div class="preview__viewport svelte-1iqwj2q"><!></div></div>');function jW(n,e){Ot(e,!0);let t=K(""),r=K(void 0),i=K(void 0),s,o=new Map,a=K(!1);const l=me(()=>g(t).replace("<html",`<html data-theme="${X.previewTheme}"`));mn(()=>{function m(p){if(p.data?.type==="preview-ready")X.previewRuntimeReady=!0;else if(p.data?.type==="preview-navigate"){const O=p.data.href,v=o.get(O);v&&e.onnavigate&&e.onnavigate(v)}}return window.addEventListener("message",m),()=>window.removeEventListener("message",m)});const c=me(()=>X.previewRuntimeAvailable&&X.previewRuntimeReady);mn(()=>{const m=_T(X.routeRules);g(c)&&g(r)?.contentWindow&&g(r).contentWindow.postMessage({type:"route-rules-update",routeRules:m},"*")}),mn(()=>{const m=X.previewTheme;g(c)&&g(r)?.contentWindow&&g(r).contentWindow.postMessage({type:"theme-update",theme:m},"*")}),mn(()=>{const m=X.currentPath,p=X.editorContent,O=g(c);if(!m||!p){M(t,"");return}return M(a,!0),clearTimeout(s),s=setTimeout(async()=>{try{if(O){const v=await xV(m,p);v.pages&&(o=new Map(v.pages.map(b=>[b.url,b.path]))),g(r)?.contentWindow?.postMessage({type:"preview-update",page:v},"*")}else M(t,await kV(m,p),!0)}catch{}finally{M(a,!1)}},400),()=>clearTimeout(s)});var u=un(),f=ot(u);{var d=m=>{var p=qW();z(m,p)},h=m=>{var p=BW(),O=q(p);{var v=w=>{var S=RW();z(w,S)};ue(O,w=>{g(a)&&w(v)})}var b=R(O,2),_=q(b);{var C=w=>{var S=IW();fn(S,A=>M(r,A),()=>g(r)),z(w,S)},y=w=>{var S=NW();fn(S,A=>M(i,A),()=>g(i)),fe(()=>Et(S,"srcdoc",g(l))),z(w,S)};ue(_,w=>{X.previewRuntimeAvailable?w(C):w(y,!1)})}z(m,p)};ue(f,m=>{X.currentPath?m(h,!1):m(d)})}z(n,u),vt()}var zW=V('<div class="page-card svelte-1nxc0wz"><!></div>');function ZW(n,e){Ot(e,!0);const t={desktop:1440,tablet:768,mobile:375},r=me(()=>X.editorMode==="preview"?t[X.viewport]??1440:1440);var i=zW(),s=q(i);da(s,()=>e.children),fe(()=>Ar(i,`--page-card-width: ${g(r)??""}px`)),z(n,i),vt()}var XW=V('<div class="popover svelte-ohlzgl"><!></div>');function QC(n,e){Ot(e,!0);let t,r=K(e.anchorRect.x+e.anchorRect.width+8),i=K(tn(e.anchorRect.y));to(()=>{if(t){const c=t.getBoundingClientRect();c.right>window.innerWidth-8&&M(r,e.anchorRect.x-c.width-8),c.bottom>window.innerHeight-8&&M(i,window.innerHeight-c.height-8),g(i)<8&&M(i,8)}function a(c){t&&!t.contains(c.target)&&e.onclose()}function l(c){c.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("click",a)}),document.addEventListener("keydown",l),()=>{document.removeEventListener("click",a),document.removeEventListener("keydown",l)}});var s=XW(),o=q(s);da(o,()=>e.children),fn(s,a=>t=a,()=>t),fe(()=>Ar(s,`left: ${g(r)??""}px; top: ${g(i)??""}px`)),z(n,s),vt()}var FW=V('<span class="modal__location svelte-vqemeo"> </span>'),VW=V('<span class="modal__hint svelte-vqemeo">Auto-derived from title</span>'),WW=V('<label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Title</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="My New Page"/></label> <label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Slug</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="my-new-page"/> <!></label> <label class="modal__checkbox svelte-vqemeo"><input type="checkbox"/> <span>Create as draft</span></label> <div class="modal__actions svelte-vqemeo"><button type="button" class="modal__btn modal__btn--cancel svelte-vqemeo">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-vqemeo">Create</button></div>',1),YW=V('<span class="modal__error svelte-vqemeo">Use lowercase letters, numbers, and hyphens</span>'),UW=V('<label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Name</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="my-section"/> <!></label> <label class="modal__checkbox svelte-vqemeo"><input type="checkbox"/> <span>Create with _layout.md</span></label> <div class="modal__actions svelte-vqemeo"><button type="button" class="modal__btn modal__btn--cancel svelte-vqemeo">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-vqemeo">Create</button></div>',1),GW=V('<form class="modal__form svelte-vqemeo"><div class="modal__tabs svelte-vqemeo"><button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z"></path><polyline points="9 1.5 9 6 13.5 6"></polyline></svg> File</button> <button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13z"></path><path d="M1.5 4v-1.5h4.5l1.5 1.5"></path></svg> Folder</button></div> <!> <!></form>');function HW(n,e){Ot(e,!0);let t=Pt(e,"initialDirectory",3,""),r=K("file"),i=K(""),s=K(""),o=K(!1),a=K(!1),l=me(()=>g(i).toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),c=me(()=>g(o)?g(s):g(l)),u=K(""),f=K(!0),d=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(g(u)));function h(m){if(m.preventDefault(),g(r)==="file"){if(!g(c))return;e.oncreate({directory:t(),slug:g(c),title:g(i)||g(c),template:"blank",draft:g(a)})}else{if(!g(d))return;e.oncreatefolder({parent:t(),name:g(u),createLayout:g(f)})}}QC(n,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(m,p)=>{var O=GW(),v=q(O),b=q(v);let _;b.__click=()=>M(r,"file");var C=R(b,2);let y;C.__click=()=>M(r,"folder");var w=R(v,2);{var S=E=>{var T=FW(),$=q(T);fe(()=>Te($,`in ${t()??""}/`)),z(E,T)};ue(w,E=>{t()&&E(S)})}var A=R(w,2);{var x=E=>{var T=WW(),$=ot(T),L=R(q($),2);gs(L);var P=R($,2),D=R(q(P),2);D.__input=oe=>{M(s,oe.target.value,!0),M(o,!0)};var I=R(D,2);{var W=oe=>{var ie=VW();z(oe,ie)};ue(I,oe=>{!g(o)&&g(i)&&oe(W)})}var U=R(P,2),ae=q(U),ce=R(U,2),ne=q(ce);ne.__click=function(...oe){e.onclose?.apply(this,oe)};var G=R(ne,2);fe(()=>{ln(D,g(c)),G.disabled=!g(c)}),Qn(L,()=>g(i),oe=>M(i,oe)),Np(ae,()=>g(a),oe=>M(a,oe)),z(E,T)},k=E=>{var T=UW(),$=ot(T),L=R(q($),2);gs(L);var P=R(L,2);{var D=ne=>{var G=YW();z(ne,G)};ue(P,ne=>{g(u)&&!g(d)&&ne(D)})}var I=R($,2),W=q(I),U=R(I,2),ae=q(U);ae.__click=function(...ne){e.onclose?.apply(this,ne)};var ce=R(ae,2);fe(()=>ce.disabled=!g(d)),Qn(L,()=>g(u),ne=>M(u,ne)),Np(W,()=>g(f),ne=>M(f,ne)),z(E,T)};ue(A,E=>{g(r)==="file"?E(x):E(k,!1)})}fe(()=>{_=Ze(b,1,"modal__tab svelte-vqemeo",null,_,{active:g(r)==="file"}),y=Ze(C,1,"modal__tab svelte-vqemeo",null,y,{active:g(r)==="folder"})}),ut("submit",O,h),z(m,O)},$$slots:{default:!0}}),vt()}Gt(["click","input"]);var KW=V('<span class="modal__error svelte-fv7j9w">Use lowercase letters, numbers, and hyphens</span>'),JW=V("<option> </option>"),eY=V('<dialog class="modal svelte-fv7j9w"><form class="modal__form svelte-fv7j9w"><h2 class="modal__title svelte-fv7j9w">New Directory</h2> <label class="modal__field svelte-fv7j9w"><span class="modal__label svelte-fv7j9w">Name</span> <input class="modal__input svelte-fv7j9w" type="text" placeholder="my-section"/> <!></label> <label class="modal__field svelte-fv7j9w"><span class="modal__label svelte-fv7j9w">Parent directory</span> <select class="modal__select svelte-fv7j9w"></select></label> <label class="modal__checkbox svelte-fv7j9w"><input type="checkbox"/> <span>Create with _layout.md</span></label> <div class="modal__actions svelte-fv7j9w"><button type="button" class="modal__btn modal__btn--cancel svelte-fv7j9w">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-fv7j9w">Create</button></div></form></dialog>');function tY(n,e){Ot(e,!0);let t=K(""),r=K(""),i=K(!0),s;function o(A,x=[]){if(!A||A.type!=="directory")return x;x.push(A.path);for(const k of A.children??[])o(k,x);return x}let a=me(()=>o(X.tree)),l=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(g(t)));mn(()=>{s&&!s.open&&s.showModal()});function c(A){A.preventDefault(),g(l)&&e.oncreate({parent:g(r),name:g(t),createLayout:g(i)})}function u(A){A.key==="Escape"&&e.onclose()}var f=eY();f.__keydown=u;var d=q(f),h=R(q(d),2),m=R(q(h),2);gs(m);var p=R(m,2);{var O=A=>{var x=KW();z(A,x)};ue(p,A=>{g(t)&&!g(l)&&A(O)})}var v=R(h,2),b=R(q(v),2);$t(b,21,()=>g(a),Kt,(A,x)=>{var k=JW(),E=q(k),T={};fe(()=>{Te(E,g(x)||"/ (root)"),T!==(T=g(x))&&(k.value=(k.__value=g(x))??"")}),z(A,k)});var _=R(v,2),C=q(_),y=R(_,2),w=q(y);w.__click=function(...A){e.onclose?.apply(this,A)};var S=R(w,2);fn(f,A=>s=A,()=>s),fe(()=>S.disabled=!g(l)),ut("close",f,function(...A){e.onclose?.apply(this,A)}),ut("submit",d,c),Qn(m,()=>g(t),A=>M(t,A)),Fw(b,()=>g(r),A=>M(r,A)),Np(C,()=>g(i),A=>M(i,A)),z(n,f),vt()}Gt(["keydown","click"]);var nY=V('<span class="modal__error svelte-e8lnud">Use lowercase letters, numbers, and hyphens</span>'),rY=V('<span class="modal__hint svelte-e8lnud"> </span>'),iY=V("<option> </option>"),sY=V('<form class="modal__form svelte-e8lnud"><h2 class="modal__title svelte-e8lnud">New Category</h2> <p class="modal__desc svelte-e8lnud">Creates a directory with a route rule and layout.</p> <label class="modal__field svelte-e8lnud"><span class="modal__label svelte-e8lnud">Name</span> <input class="modal__input svelte-e8lnud" type="text" placeholder="tutorials"/> <!></label> <label class="modal__field svelte-e8lnud"><span class="modal__label svelte-e8lnud">Layout</span> <select class="modal__select svelte-e8lnud"></select></label> <div class="modal__actions svelte-e8lnud"><button type="button" class="modal__btn modal__btn--cancel svelte-e8lnud">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-e8lnud">Create</button></div></form>');function oY(n,e){Ot(e,!0);let t=K(""),r=K("default"),i=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(g(t))),s=me(()=>{const a=X.themeConfig;return a?.layouts?Object.keys(a.layouts):["default"]});function o(a){a.preventDefault(),g(i)&&e.oncreate({name:g(t),layout:g(r)})}QC(n,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(a,l)=>{var c=sY(),u=R(q(c),4),f=R(q(u),2);gs(f);var d=R(f,2);{var h=C=>{var y=nY();z(C,y)},m=C=>{var y=rY(),w=q(y);fe(()=>Te(w,`Pattern: ${g(t)??""}/** · Directory: ${g(t)??""}/`)),z(C,y)};ue(d,C=>{g(t)&&!g(i)?C(h):g(t)&&C(m,1)})}var p=R(u,2),O=R(q(p),2);$t(O,21,()=>g(s),Kt,(C,y)=>{var w=iY(),S=q(w),A={};fe(()=>{Te(S,g(y)),A!==(A=g(y))&&(w.value=(w.__value=g(y))??"")}),z(C,w)});var v=R(p,2),b=q(v);b.__click=function(...C){e.onclose?.apply(this,C)};var _=R(b,2);fe(()=>_.disabled=!g(i)),ut("submit",c,o),Qn(f,()=>g(t),C=>M(t,C)),Fw(O,()=>g(r),C=>M(r,C)),z(a,c)},$$slots:{default:!0}}),vt()}Gt(["click"]);var aY=ws('<svg class="context-menu__icon svelte-1ksg7ac" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path></path></svg>'),lY=V("<button><!> </button>"),cY=V('<div class="context-menu svelte-1ksg7ac"></div>');function uY(n,e){Ot(e,!0);let t,r=K(tn(e.x)),i=K(tn(e.y));function s(l){switch(l){case"Rename":return"M12.5 3.5l-9 9L2 16l3.5-1.5 9-9zM10.5 5.5l2 2";case"Duplicate":return"M5 3h6l3 3v7H5zM3 6v9h8";case"Delete":return"M3 5h12M6 5V3h6v2M5 5v9h8V5";case"Publish":case"Set as Draft":return"M2 8h5v6H2zM9 4h5v10H9z";default:return null}}to(()=>{if(t){const c=t.getBoundingClientRect();c.right>window.innerWidth&&M(r,window.innerWidth-c.width-4),c.bottom>window.innerHeight&&M(i,window.innerHeight-c.height-4)}function l(c){t&&!t.contains(c.target)&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("click",l),document.addEventListener("contextmenu",l)}),()=>{document.removeEventListener("click",l),document.removeEventListener("contextmenu",l)}});function o(l){l(),e.onclose()}var a=cY();$t(a,21,()=>e.items,Kt,(l,c)=>{const u=me(()=>s(g(c).label));var f=lY();let d;f.__click=()=>o(g(c).action);var h=q(f);{var m=O=>{var v=aY(),b=q(v);fe(()=>Et(b,"d",g(u))),z(O,v)};ue(h,O=>{g(u)&&O(m)})}var p=R(h);fe(()=>{d=Ze(f,1,"context-menu__item svelte-1ksg7ac",null,d,{danger:g(c).danger}),Te(p,` ${g(c).label??""}`)}),z(l,f)}),fn(a,l=>t=l,()=>t),fe(()=>Ar(a,`left: ${g(r)??""}px; top: ${g(i)??""}px`)),z(n,a),vt()}Gt(["click"]);var fY=V('<dialog class="dialog svelte-19l8tke"><form class="dialog__form svelte-19l8tke"><h2 class="dialog__title svelte-19l8tke">Rename</h2> <input class="dialog__input svelte-19l8tke" type="text"/> <div class="dialog__actions svelte-19l8tke"><button type="button" class="dialog__btn dialog__btn--cancel svelte-19l8tke">Cancel</button> <button type="submit" class="dialog__btn dialog__btn--primary svelte-19l8tke">Rename</button></div></form></dialog>');function dY(n,e){Ot(e,!0);let t=K(tn(e.currentName)),r;mn(()=>{r&&!r.open&&r.showModal()});function i(f){f.preventDefault();const d=g(t).trim();d&&d!==e.currentName&&e.onrename(d)}var s=fY(),o=q(s),a=R(q(o),2);gs(a),a.__keydown=f=>{f.key==="Escape"&&e.onclose()};var l=R(a,2),c=q(l);c.__click=function(...f){e.onclose?.apply(this,f)};var u=R(c,2);fn(s,f=>r=f,()=>r),fe(f=>u.disabled=f,[()=>!g(t).trim()||g(t).trim()===e.currentName]),ut("close",s,function(...f){e.onclose?.apply(this,f)}),ut("submit",o,i),Qn(a,()=>g(t),f=>M(t,f)),z(n,s),vt()}Gt(["keydown","click"]);var hY=V('<dialog class="dialog svelte-1r8rwv8"><form class="dialog__form svelte-1r8rwv8"><h2 class="dialog__title svelte-1r8rwv8"> </h2> <p class="dialog__message svelte-1r8rwv8"> </p> <div class="dialog__actions svelte-1r8rwv8"><button type="button" class="dialog__btn dialog__btn--cancel svelte-1r8rwv8">Cancel</button> <button type="submit" class="dialog__btn dialog__btn--danger svelte-1r8rwv8"> </button></div></form></dialog>');function pY(n,e){Ot(e,!0);let t=Pt(e,"confirmLabel",3,"Delete"),r;mn(()=>{r&&!r.open&&r.showModal()});function i(p){p.preventDefault(),e.onconfirm()}var s=hY(),o=q(s),a=q(o),l=q(a),c=R(a,2),u=q(c),f=R(c,2),d=q(f);d.__click=function(...p){e.onclose?.apply(this,p)};var h=R(d,2),m=q(h);fn(s,p=>r=p,()=>r),fe(()=>{Te(l,e.title),Te(u,e.message),Te(m,t())}),ut("close",s,function(...p){e.onclose?.apply(this,p)}),ut("submit",o,i),z(n,s),vt()}Gt(["click"]);var mY=V('<div class="banner svelte-toaoe3"><span class="banner__text svelte-toaoe3"> </span> <button class="banner__btn banner__btn--reload svelte-toaoe3">Reload</button> <button class="banner__btn banner__btn--dismiss svelte-toaoe3">Dismiss</button></div>');function gY(n,e){Ot(e,!0);const t=me(()=>X.externalChange?.event==="file-deleted");var r=un(),i=ot(r);{var s=o=>{var a=mY(),l=q(a),c=q(l),u=R(l,2);u.__click=function(...d){e.onreload?.apply(this,d)};var f=R(u,2);f.__click=()=>{X.externalChange=null},fe(()=>Te(c,g(t)?"This file was deleted outside the editor.":"This file was changed outside the editor.")),z(o,a)};ue(i,o=>{X.externalChange&&o(s)})}z(n,r),vt()}Gt(["click"]);var OY=V("<!> <!>",1),vY=V("<!> <!>",1),bY=V('<div class="editor-placeholder svelte-16t0oly"><svg width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-16t0oly"><rect x="6" y="4" width="24" height="32" rx="2"></rect><polyline points="20 4 20 14 30 14"></polyline><line x1="12" y1="22" x2="24" y2="22"></line><line x1="12" y1="27" x2="20" y2="27"></line><path d="M34 24l6 6M34 36l6-6"></path></svg> <span>Select a file to edit</span></div>'),yY=V('<div class="editor-app svelte-16t0oly"><!></div> <!> <!> <!> <!> <!> <!>',1);function wY(n,e){Ot(e,!0),customElements.get("rf-diagram")||customElements.define("rf-diagram",pX),customElements.get("rf-sandbox")||customElements.define("rf-sandbox",gX),customElements.get("rf-map")||customElements.define("rf-map",mX);let t=K(!1),r=K(!1),i=K(!1),s=K(""),o=K(null),a=K(null),l=K(null),c=K(null),u=K(null),f="",d=0;to(()=>{(async()=>{X.treeLoading=!0;try{const[_e,Ee,Re,ge,Ce]=await Promise.all([K0(),DV(),SV(),AV(),qV()]);X.tree=_e,X.runes=Ee,X.previewRuntimeAvailable=Re.previewRuntime,X.themeCss=Re.themeCss,X.themeConfig=Re.themeConfig,X.routeRules=ge??[],X.aggregated=Ce,Re.hasCommunityTags&&re(()=>import("/api/community-tags.js"),[]).then(rt=>{X.communityTags=rt.communityTags??null,X.communityPostTransforms=rt.communityPostTransforms??null,X.communityStyles=rt.communityStyles??null}).catch(()=>{}),re(async()=>{const{createHighlightTransform:rt}=await import("./index-Dew90JY6.js");return{createHighlightTransform:rt}},[]).then(({createHighlightTransform:rt})=>rt().then(We=>{X.highlightTransform=We,X.highlightCss=We.css})).catch(()=>{});const tt=_e.children?.find(rt=>rt.type==="page"&&rt.name==="index.md");tt&&m(tt.path)}catch(_e){X.error=_e instanceof Error?_e.message:"Failed to load content tree"}finally{X.treeLoading=!1}})();let j;const te=RV((_e,Ee)=>{if(clearTimeout(j),j=setTimeout(()=>h(),500),Ee.path===X.currentPath){if(f===Ee.path&&Date.now()-d<2e3)return;X.externalChange={path:Ee.path,event:_e}}});return()=>{te(),clearTimeout(j)}});async function h(){try{X.tree=await K0()}catch{}}async function m(j){if(!(X.dirty&&!confirm("You have unsaved changes. Discard them?"))){X.externalChange=null,X.fileLoading=!0,X.error=null;try{const te=await $p(j);X.loadFile(j,te.raw)}catch(te){X.error=te instanceof Error?te.message:"Failed to load file"}finally{X.fileLoading=!1}}}async function p(){if(!(!X.currentPath||!X.dirty)){X.saving=!0,X.error=null;try{f=X.currentPath,d=Date.now(),await _V(X.currentPath,X.editorContent),X.savedContent=X.editorContent,X.saveJustCompleted=!0,setTimeout(()=>{X.saveJustCompleted=!1},1500)}catch(j){X.error=j instanceof Error?j.message:"Failed to save file"}finally{X.saving=!1}}}function O(j){(j.metaKey||j.ctrlKey)&&j.key==="s"&&(j.preventDefault(),p())}async function v(j){try{const te=await TV(j);M(t,!1),await h(),await m(te.path)}catch(te){X.error=te instanceof Error?te.message:"Failed to create page"}}async function b(j){try{await J0(j),M(r,!1),M(t,!1),await h()}catch(te){X.error=te instanceof Error?te.message:"Failed to create directory"}}async function _(j){try{await J0({parent:"",name:j.name,createLayout:!0});const te={pattern:`${j.name}/**`,layout:j.layout},_e=[...X.routeRules],Ee=_e.findIndex(Re=>Re.pattern==="**");Ee>=0?_e.splice(Ee,0,te):_e.push(te),await CV(_e),X.routeRules=_e,M(i,!1),await h()}catch(te){X.error=te instanceof Error?te.message:"Failed to create category"}}function C(j,te){M(l,{x:j.clientX,y:j.clientY,node:te},!0)}function y(j){const te=[];return j.type==="page"||j.type==="layout"?(te.push({label:"Rename",action:()=>{M(c,j,!0)}}),j.type==="page"&&(te.push({label:"Duplicate",action:()=>S(j)}),te.push({label:j.draft?"Publish":"Set as Draft",action:()=>k(j)})),te.push({label:"Delete",action:()=>{M(u,j,!0)},danger:!0})):j.type==="directory"&&(te.push({label:"Rename",action:()=>{M(c,j,!0)}}),te.push({label:"Delete",action:()=>{M(u,j,!0)},danger:!0})),te}async function w(j){if(!g(c))return;const te=g(c).path;try{const _e=await PV(te,j);M(c,null),await h(),X.currentPath===te&&await m(_e.newPath)}catch(_e){X.error=_e instanceof Error?_e.message:"Failed to rename"}}async function S(j){try{const te=await EV(j.path);await h(),await m(te.path)}catch(te){X.error=te instanceof Error?te.message:"Failed to duplicate"}}async function A(){if(!g(u))return;const j=g(u).path;try{await $V(j),M(u,null),await h(),X.currentPath===j&&(X.currentPath=null,X.editorContent="",X.savedContent="",X.bodyContent="",X.frontmatter={})}catch(te){X.error=te instanceof Error?te.message:"Failed to delete"}}async function x(){if(!(X.dirty&&!confirm("You have unsaved changes. Reload will discard them."))){if(X.externalChange?.event==="file-deleted")X.currentPath=null,X.editorContent="",X.savedContent="",X.bodyContent="",X.frontmatter={};else if(X.externalChange){const j=await $p(X.externalChange.path);X.loadFile(j.path,j.raw)}X.externalChange=null}}async function k(j){try{if(await QV(j.path),await h(),X.currentPath===j.path){const te=await $p(j.path);X.loadFile(j.path,te.raw)}}catch(te){X.error=te instanceof Error?te.message:"Failed to toggle draft"}}var E=yY();ut("keydown",Mo,O);var T=ot(E),$=q(T);ZE($,{header:Re=>{jE(Re,{onsave:p})},left:Re=>{o$(Re,{onselectfile:m,onnewpage:(ge,Ce)=>{M(s,ge??"",!0),M(o,Ce,!0),M(t,!0)},onnewdirectory:ge=>{M(r,!0)},onnewcategory:ge=>{M(a,ge,!0),M(i,!0)},oncontextmenu:C})},center:Re=>{var ge=vY(),Ce=ot(ge);gY(Ce,{onreload:x});var tt=R(Ce,2);{var rt=Ye=>{DW(Ye,{})},We=Ye=>{var ze=OY(),xe=ot(ze);b$(xe,{forceRawMode:!0});var De=R(xe,2);eA(De,{}),z(Ye,ze)};ue(tt,Ye=>{X.currentFileType==="layout"?Ye(rt):X.currentPath&&Ye(We,1)})}z(Re,ge)},right:Re=>{var ge=un(),Ce=ot(ge);{var tt=We=>{var Ye=bY();z(We,Ye)},rt=We=>{ZW(We,{children:(Ye,ze)=>{var xe=un(),De=ot(xe);{var Ue=et=>{jW(et,{onnavigate:m})},lt=et=>{{let Qt=me(()=>X.editorMode==="code");sW(et,{get bodyContent(){return X.bodyContent},onchange:nn=>X.updateBody(nn),get runes(){return X.runes},get themeConfig(){return X.themeConfig},get themeCss(){return X.themeCss},get highlightCss(){return X.highlightCss},get highlightTransform(){return X.highlightTransform},get frontmatter(){return X.frontmatter},get readOnly(){return g(Qt)},get communityTags(){return X.communityTags},get communityPostTransforms(){return X.communityPostTransforms},get communityStyles(){return X.communityStyles},get aggregated(){return X.aggregated}})}};ue(De,et=>{X.editorMode==="preview"?et(Ue):et(lt,!1)})}z(Ye,xe)},$$slots:{default:!0}})};ue(Ce,We=>{X.currentPath?X.currentFileType!=="layout"&&We(rt,1):We(tt)})}z(Re,ge)},$$slots:{header:!0,left:!0,center:!0,right:!0}});var L=R(T,2);{var P=j=>{HW(j,{oncreate:v,oncreatefolder:b,onclose:()=>{M(t,!1)},get initialDirectory(){return g(s)},get anchorRect(){return g(o)}})};ue(L,j=>{g(t)&&g(o)&&j(P)})}var D=R(L,2);{var I=j=>{oY(j,{oncreate:_,onclose:()=>{M(i,!1)},get anchorRect(){return g(a)}})};ue(D,j=>{g(i)&&g(a)&&j(I)})}var W=R(D,2);{var U=j=>{tY(j,{oncreate:b,onclose:()=>{M(r,!1)}})};ue(W,j=>{g(r)&&j(U)})}var ae=R(W,2);{var ce=j=>{{let te=me(()=>y(g(l).node));uY(j,{get x(){return g(l).x},get y(){return g(l).y},get items(){return g(te)},onclose:()=>{M(l,null)}})}};ue(ae,j=>{g(l)&&j(ce)})}var ne=R(ae,2);{var G=j=>{dY(j,{get currentName(){return g(c).name},onrename:w,onclose:()=>{M(c,null)}})};ue(ne,j=>{g(c)&&j(G)})}var oe=R(ne,2);{var ie=j=>{{let te=me(()=>g(u).type==="directory"?"directory":"file");pY(j,{get title(){return`Delete ${g(te)??""}`},get message(){return`Are you sure you want to delete "${g(u).name??""}"? This cannot be undone.`},onconfirm:A,onclose:()=>{M(u,null)}})}};ue(oe,j=>{g(u)&&j(ie)})}z(n,E),vt()}JT(wY,{target:document.getElementById("app")});export{zx as C,Zr as E,Wt as I,Xa as L,m2 as N,re as _,Wa as a,ul as b,lf as c,rD as d,dx as e,Yc as f,Ua as g,wn as h,kn as i,Yf as j,$L as k,EL as l,k2 as m,gr as n,Pe as o,pe as p,TS as q,g2 as r,cl as s,N as t,iS as u,A2 as v,ni as w};